1 2018-11-18 Alan Modra <amodra@gmail.com>
3 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
4 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
5 (GNU_USER_TARGET_CRTN): Define.
6 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
7 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
9 2018-11-18 Alan Modra <amodra@gmail.com>
11 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
13 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
15 2018-11-17 Nick Clifton <nickc@redhat.com>
16 Sandra Loosemore <sandra@codesourcery.com>
19 * doc/invoke.texi (Overall Options): Document that --help and
20 --help=<value> options cannot be combined.
22 2018-11-17 Jim Wilson <jimw@sifive.com>
24 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
25 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
26 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
27 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
28 to step2 if frame_pointer_needed and step1 is 0.
30 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
33 * doc/cpp.texi (System Headers): Add note about implicit
34 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
36 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
39 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
40 -fno-implicit-templates.
42 2018-11-17 Jakub Jelinek <jakub@redhat.com>
44 PR tree-optimization/87546
45 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
46 min_precision variable, initially set it to orig_precision, only does
47 something if op_type's precision is <= min_precision and update
48 min_precision whenever calling set_op.
50 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
53 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
55 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
57 * doc/invoke.texi (Option Summary): Fix whitespace and line
58 breaks in @gccoptlist environments.
59 (Warning Options): Likewise.
60 (Optimize Options): Likewise.
61 (PowerPC SPE Options): Likewise.
62 (RS/6000 and PowerPC Options): Likewise.
64 2018-11-16 Jeff Law <law@redhat.com>
66 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
69 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
72 * doc/invoke.texi (Optimize Options): Update options enabled by
73 fprofile-generate, -fprofile-use, and -fauto-profile.
75 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
78 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
79 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
80 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
82 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
83 * targhooks.c (default_print_patchable_function_entry): Assert
84 asm_int_op does not return a NULL string.
85 * varasm.c (integer_asm_op): Return the op for a partial int type
86 when the requested size does not correspond to an integer type.
87 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
88 * doc/tm.texi: Regenerate.
90 2018-11-12 Jason Merrill <jason@redhat.com>
92 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
94 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
96 * config/rs6000/constraints.md (wF constraint): Remove power9
97 fusion documentation. Just document wF's use for power8 fusion.
98 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
99 (fusion_gpr_addis): Delete power9 fusion support. Change power8
100 fusion support to require the upper 12 bits to be all 0's or all
102 (fusion_gpr_mem_load): Add comment.
103 (fusion_addis_mem_combo_load): Remove power9 fusion support.
104 (fusion_addis_mem_combo_store): Delete.
105 (fusion_offsettable_mem_operand): Delete.
106 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
108 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
109 (POWERPC_MASKS): Delete power9 fusion.
110 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
111 (fusion_p9_p): Delete.
112 (expand_fusion_p9_load): Delete.
113 (expand_fusion_p9_store): Delete.
114 (emit_fusion_p9_load): Delete.
115 (emit_fusion_p9_store): Delete.
116 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
118 (rs6000_option_override_internal): Set power8 fusion based on
119 whether we are tuning for power8. Delete power9 fusion support.
120 (rs6000_opt_masks): Delete -mpower9-fusion switch.
121 (emit_fusion_load): Rename emit_fusion_load_store to
122 emit_fusion_load, and drop fusion store support. Update callers.
123 (emit_fusion_load_store): Likewise.
124 (emit_fusion_gpr_load): Likewise.
125 (fusion_p9_p): Delete.
126 (expand_fusion_p9_load): Delete.
127 (expand_fusion_p9_store): Delete.
128 (emit_fusion_p9_load): Delete.
129 (emit_fusion_p9_store): Delete.
130 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
131 (GPR_FUSION): Delete.
132 (FPR_FUSION): Delete.
133 (power9 fusion peephole2s): Delete.
134 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
135 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
136 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
137 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
138 (fusion_p9_<mode>_constant): Delete.
139 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
140 power9 fusion switch.
141 * doc/md.texi (PowerPC constraints): Update wF constraint
142 documentation for power8 fusion only.
144 2018-11-16 Jakub Jelinek <jakub@redhat.com>
146 PR rtl-optimization/87475
147 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
148 CROSSING_JUMP_P insns.
149 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
151 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
154 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
155 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
156 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
158 2018-11-16 Jakub Jelinek <jakub@redhat.com>
161 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
162 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
164 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
166 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
167 location_t parameter.
168 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
169 (switch_decision_tree::do_jump_if_equal): Likewise.
170 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
171 of switch statement to emit_case_nodes.
172 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
173 set it on the newly built GIMPLE comparison statement.
174 (switch_decision_tree::do_jump_if_equal): Likewise.
175 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
176 in calls to do_jump_if_equal as well as recursive calls.
178 2018-11-16 Andi Kleen <ak@linux.intel.com>
180 * config/i386/i386.md: Allow memory operands to ptwrite.
182 2018-11-16 Michael Matz <matz@suse.de>
184 * system.h (PRsa): New macro.
185 (SIZE_AMOUNT): Cast number to uint64_t.
186 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
187 (pool_usage::dump_footer): Likewise and also use PRIu64.
188 * bitmap.h (bitmap_usage::dump): Likewise.
189 * ggc-common.c (ggc_usage::dump): Likewise.
190 * ggc-page.c (ggc_print_statistics): Likewise.
191 * input.c (dump_line_table_statistics): Likewise.
192 * mem-stats.h (mem_usage::dump): Likewise.
193 (mem_usage::dump_footer): Likewise.
194 * rtl.c (dump_rtx_statistics): Likewise.
195 * tree-cfg.c (dump_cfg_stats): Likewise.
196 * tree-dfa.c (dump_dfa_stats): Likewise.
197 * tree-phinodes.c (phinodes_print_statistics): Likewise.
198 * tree-ssanames (ssanames_print_statistics): Likewise.
199 * vec.c (vec_usage::dump): Likewise.
200 (vec_usage::dump_footer): Likewise.
202 2018-11-16 Richard Biener <rguenther@suse.de>
204 PR tree-optimization/88011
205 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
206 replacing set_value_range_to_undefined and
207 set_value_range_to_varying with method calls.
209 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
211 * config/s390/s390.md
212 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
214 (*r<noxa>sbg_<mode>_sll): Likewise.
215 (*r<noxa>sbg_<mode>_srl): Likewise.
216 (*r<noxa>sbg_sidi_srl): New pattern.
218 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
220 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
221 Default to TARGET_VXWORKS_RTP.
222 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
223 of TARGET_VXWORKS_RTP.
224 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
225 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
226 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
228 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
231 * doc/extend.texi (Common Type Attributes): Make it explicit
232 that attribute "packed" can apply to C++ classes.
234 2018-11-15 Martin Sebor <msebor@redhat.com>
238 * tree.c (type_argument_type): New function.
239 * tree.h (type_argument_type): Declare it.
240 * gcc/doc/extend.texi (alloc_align): Update and clarify.
241 (alloc_size, nonnull, sentinel): Same.
243 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
244 Kwok Cheung Yeung <kcy@codesourcery.com>
246 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
247 int_mode_for_size fails.
248 (vectorizable_load): Likewise.
250 2018-11-15 David Malcolm <dmalcolm@redhat.com>
252 * doc/ux.texi (Group logically-related diagnostics): Move
253 discussion of auto_diagnostic_group into this new subsection.
254 Give an example of where this grouping is used.
256 2018-11-15 David Malcolm <dmalcolm@redhat.com>
259 * Makefile.in (OBJS): Move json.o to...
260 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
261 * common.opt (fdiagnostics-format=): New option.
262 (diagnostics_output_format): New enum.
263 * diagnostic-format-json.cc: New file.
264 * diagnostic.c (default_diagnostic_final_cb): New function, taken
265 from start of diagnostic_finish.
266 (diagnostic_initialize): Initialize final_cb to
267 default_diagnostic_final_cb.
268 (diagnostic_finish): Move "being treated as errors" messages to
269 default_diagnostic_final_cb. Call any final_cb.
270 (default_diagnostic_finalizer): Add diagnostic_t param.
271 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
272 diagnostic_finalizer callback.
273 * diagnostic.h (enum diagnostics_output_format): New enum.
274 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
275 (struct diagnostic_context): Add "final_cb".
276 (default_diagnostic_finalizer): Add diagnostic_t param.
277 (diagnostic_output_format_init): New decl.
278 * doc/invoke.texi (-fdiagnostics-format): New option.
279 * dwarf2out.c (gen_producer_string): Ignore
280 OPT_fdiagnostics_format_.
281 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
282 * lto-wrapper.c (append_diag_options): Ignore it.
283 * opts.c (common_handle_option): Handle it.
285 2018-11-15 David Malcolm <dmalcolm@redhat.com>
287 PR tree-optimization/88015
288 * graphite-isl-ast-to-gimple.c
289 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
291 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
293 2018-11-15 Richard Biener <rguenther@suse.de>
296 * gimple.c (gimple_call_flags): Union flags from decl, type
298 * trans-mem.c (is_tm_pure_call): Simplify.
300 2018-11-15 Richard Biener <rguenther@suse.de>
302 PR tree-optimization/88031
303 * tree-vect-loop.c (vectorizable_reduction): Move check
304 for multiple types earlier so we get the expected dump.
305 Simplify calls to vectorizable_condition.
306 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
307 * tree-vect-stmts.c (vectorizable_condition): Instead of
308 reduc_def and reduc_index take just a flag. Simplify
309 code-generation now that we can rely on the defs being set up.
310 (vectorizable_comparison): Remove unused argument.
312 2018-11-15 Richard Biener <rguenther@suse.de>
314 PR tree-optimization/88030
315 * tree-complex.c (need_eh_cleanup): New global.
316 (update_complex_assignment): Mark blocks that need EH update.
317 (expand_complex_comparison): Likewise.
318 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
319 perform EH cleanup and schedule CFG cleanup if that did anything.
321 2018-11-15 Jakub Jelinek <jakub@redhat.com>
323 PR rtl-optimization/88018
324 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
325 on the presence of fallthru edge, rather than if it is a USE or not.
327 2018-11-15 Richard Biener <rguenther@suse.de>
330 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
331 analyze_subscript_affine_affine properly.
333 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
335 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
336 (GLIBC_DYNAMIC_LINKER): Define.
337 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
339 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
341 PR tree-optimization/84648
342 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
343 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
344 by calling adjust_cond_for_loop_until_wrap.
346 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
349 * doc/extend.texi (Common Function Attributes): Clarify linker
350 restrictions on "aligned" attribute.
351 (Common Variable Attributes): Likewise. Mention that linker
352 restrictions don't apply to stack-allocated variables.
354 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
356 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
359 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
363 * doc/invoke.texi (Optimize Options): Remove bad example about
364 interaction between -flto and -O. Replace it with a note that
365 you need to compile with -O and not just link. Copy-edit -flto
366 discussion to reduce verbiage and improve flow.
368 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
371 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
372 also suppress many optimizations. Alphabetize option lists for
373 -O1, -O2, and -Os. Add list of options disabled with -Og, and
374 correct documentation for those options to say that.
375 * opts.c (default_options_table): Sort table by level and option
376 name, to make it easier to correlate to the manual.
378 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
380 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
381 printing of the names of segment registers.
383 2018-11-14 Nathan Sidwell <nathan@acm.org>
387 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
390 2018-11-14 David Malcolm <dmalcolm@redhat.com>
392 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
394 2018-11-14 Jakub Jelinek <jakub@redhat.com>
396 P1236R1 - Signed integers are two's complement
397 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
400 * hash-map.h (hash_map::iterator::reference_pair): New class.
401 (hash_map::iterator::operator*): Return it rather than std::pair.
403 2018-11-14 Jeff Law <law@redhat.com>
405 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
406 iff the operand is a constant.
408 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
410 * gimple-ssa-evrp-analyze.c
411 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
412 ignore_equivs_equal_p to equal_p.
413 * ipa-cp.c (meet_with_1): Use equal_p instead of
414 ignore_equivs_equal_p.
415 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
416 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
417 (value_range::operator==): Remove.
418 (value_range::operator!=): Remove.
419 (vrp_prop::visit_stmt): Use equal_p.
420 * tree-vrp.h (value_range): Remove operator==, operator!=,
421 ignore_equivs_equal_p.
422 * vr-values.c (update_value_range): Use equal_p.
424 2018-11-14 Michael Matz <matz@suse.de>
427 * gimplify.c (collect_fallthrough_labels): Add new argument,
428 return location via that, don't modify statements.
429 (warn_implicit_fallthrough_r): Adjust call, don't use
430 statement location directly.
432 2018-11-14 Richard Biener <rguenther@suse.de>
435 * tree-data-ref.c (split_constant_offset): Add wrapper
436 allocating a cache hash-map.
437 (split_constant_offset_1): Cache results of expanding
438 expressions from SSA def stmts.
440 2018-11-14 Richard Biener <rguenther@suse.de>
443 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
445 (lambda_vector_mult_const): Likewise.
446 (lambda_matrix_right_hermite): Use lambda_int temporaries.
448 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
449 Jackson Woodruff <jackson.woodruff@arm.com>
451 PR 71026/tree-optimization
452 * match.pd: Simplify floating point comparisons.
454 2018-11-14 Jakub Jelinek <jakub@redhat.com>
456 PR rtl-optimization/87817
457 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
458 last argument has low 8 bits clear, fold to 0.
460 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
462 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
463 MAX_OFILE_ALIGNMENT as needed.
465 2018-11-14 Richard Biener <rguenther@suse.de>
467 PR tree-optimization/88019
468 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
469 COND_EXPR arguments to non-trapping overflow.
471 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
473 * config/arc/arc.h (reg_class): Reorder registers classes, remove
474 unused register classes.
475 (REG_CLASS_NAMES): Likewise.
476 (REG_CLASS_CONTENTS): Likewise.
477 (FIXED_REGISTERS): Make lp_count fixed.
478 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
479 (PROGRAM_COUNTER_REGNO): Remove.
480 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
481 register classes, use constants for register numbers, remove
482 reg_class_contents references.
483 (arc_process_double_reg_moves): Add asserts.
484 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
485 lra_in_progress predicate.
486 (arc_init_reg_tables): Remove unused register classes.
487 (arc_register_move_cost): Likewise.
488 (arc_preferred_reload_class): Likewise.
489 (hwloop_optimize): Update rtx patterns involving lp_count register.
490 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
491 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
492 CHEAP_CORE_REGS. Former one will be used for LRA.
493 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
494 one will be used for LRA.
495 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
496 one will be used for LRA.
497 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
498 Former one will be used for LRA.
499 ("f"): Delete constraint.
502 ("l"): Change it from register constraint to constraint.
503 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
504 (movhi_insn): Likewise.
505 (movsi_insn): Update pattern.
508 (stack_tie): Remove 'b' constraint letter.
510 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
511 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
512 (R57_REG, R59_REG, PCL_REG): Likewise.
513 (ILINK1_REGNUM): Renamed to ILINK1_REG.
514 (ILINK2_REGNUM): Renamed to ILINK2_REG.
517 (Rcw): Remove unused reg classes.
518 * config/arc/predicates.md (dest_reg_operand): Just default on
519 register_operand predicate.
520 (mpy_dest_reg_operand): Likewise.
521 (move_dest_operand): Use macros instead of constants.
522 * config/arc/arc.opt (mlra): Switch to lra as default.
524 2018-11-14 Richard Biener <rguenther@suse.de>
526 PR tree-optimization/87974
527 * tree-vect-loop.c (vectorizable_reduction): When computing
528 the vectorized reduction PHI vector type ignore constant
531 2018-11-14 Jakub Jelinek <jakub@redhat.com>
533 PR tree-optimization/87977
534 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
535 stmt, build a new one and replace the old one with it. Formatting fix.
536 Call release_ssa_name (x) if !has_other_use and !delete_div.
537 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
538 verify lhs of stmt is still def.
540 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
542 PR rtl-optimization/87507
543 * lower-subreg.c (operand_for_swap_move_operator): New function.
544 (simple_move): Strip simple operators.
545 (find_pseudo_copy): Likewise.
546 (resolve_operand_for_swap_move_operator): New function.
547 (resolve_simple_move): Strip simple operators and swap operands.
549 2018-11-13 Jakub Jelinek <jakub@redhat.com>
551 PR tree-optimization/87898
552 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
553 (ipa_simd_modify_function_body): Remove debug stmts where the first
554 argument was changed into a non-decl.
556 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
558 PR rtl-optimization/87899
559 * lra-lives.c (start_living): Update white space in comment.
560 (enum point_type): New.
561 (sparseset_contains_pseudos_p): New function.
562 (update_pseudo_point): Likewise.
563 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
564 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
565 handling. Move early exit after adding conflicts.
566 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
567 if regno is already live. Remove all handling of program points.
568 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
569 after adding conflicts. Remove all handling of program points and
570 ignore_reg_for_conflicts.
571 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
572 and do not guard call to mark_pseudo_live.
573 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
574 and do not guard call to mark_pseudo_dead.
575 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
576 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
577 Use new function update_pseudo_point. Handle register copies by
578 removing the source register from the live set. Handle INOUT operands.
579 Update to the next program point using the unused_set, dead_set and
581 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
583 2018-11-13 David Malcolm <dmalcolm@redhat.com>
585 * builtins.c: Replace "source_location" with "location_t".
586 * diagnostic-show-locus.c: Likewise.
587 * diagnostic.c: Likewise.
588 * dumpfile.c: Likewise.
589 * gcc-rich-location.h: Likewise.
590 * genmatch.c: Likewise.
591 * gimple.h: Likewise.
592 * gimplify.c: Likewise.
594 * input.h: Likewise. Eliminate the typedef.
595 * omp-expand.c: Likewise.
596 * selftest.h: Likewise.
597 * substring-locations.h (get_source_location_for_substring):
599 (get_location_within_string): ...this.
600 * tree-cfg.c: Replace "source_location" with "location_t".
601 * tree-cfgcleanup.c: Likewise.
602 * tree-diagnostic.c: Likewise.
603 * tree-into-ssa.c: Likewise.
604 * tree-outof-ssa.c: Likewise.
605 * tree-parloops.c: Likewise.
606 * tree-phinodes.c: Likewise.
607 * tree-phinodes.h: Likewise.
608 * tree-ssa-loop-ivopts.c: Likewise.
609 * tree-ssa-loop-manip.c: Likewise.
610 * tree-ssa-phiopt.c: Likewise.
611 * tree-ssa-phiprop.c: Likewise.
612 * tree-ssa-threadupdate.c: Likewise.
613 * tree-ssa.c: Likewise.
614 * tree-ssa.h: Likewise.
615 * tree-vect-loop-manip.c: Likewise.
617 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
619 * doc/extend.texi: Fix typo in the weakref description.
621 2018-11-13 Richard Biener <rguenther@suse.de>
623 PR tree-optimization/86991
624 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
625 group building until we have successfully detected the SLP
627 (vect_is_simple_reduction): Remove fixup code here.
629 2018-11-13 David Malcolm <dmalcolm@redhat.com>
631 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
632 (dump_gimple_stmt): Use it.
633 (dump_gimple_stmt_loc): Likewise.
634 (dump_gimple_expr): Likewise.
635 (dump_gimple_expr_loc): Likewise.
636 (dump_generic_expr): Likewise.
637 (dump_generic_expr_loc): Likewise.
638 (dump_printf): Likewise.
639 (dump_printf_loc): Likewise.
640 (dump_dec): Likewise.
641 (dump_dec): Likewise.
642 (dump_hex): Likewise.
643 (dump_symtab_node): Likewise.
644 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
645 Guard dump call with dump_enabled_p.
646 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
647 * graphite-optimize-isl.c (optimize_isl): Likewise.
648 * graphite.c (graphite_transform_loops): Likewise.
649 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
650 * tree-parloops.c (parallelize_loops): Likewise.
651 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
652 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
653 (vect_prune_runtime_alias_test_list): Likewise.
654 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
655 (vect_estimate_min_profitable_iters): Likewise.
656 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
657 (vect_build_slp_tree_2): Likewise.
658 (vect_supported_load_permutation_p): Likewise.
659 (vect_slp_analyze_operations): Likewise.
660 (vect_slp_analyze_bb_1): Likewise.
661 (vect_slp_bb): Likewise.
662 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
663 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
664 (pass_slp_vectorize::execute): Likewise.
665 (increase_alignment): Likewise.
667 2018-11-13 David Malcolm <dmalcolm@redhat.com>
670 * ipa-inline.c (report_inline_failed_reason): Guard calls to
671 cl_target_option_print_diff and cl_optimization_print_diff with
674 2018-11-13 David Malcolm <dmalcolm@redhat.com>
676 * doc/invoke.texi (-fsave-optimization-record): Note that the
677 output is compressed.
678 * optinfo-emit-json.cc: Include <zlib.h>.
679 (optrecord_json_writer::write): Compress the output.
681 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
683 * tree-vrp.c (value_range_base::dump): Dump type.
684 Do not use INF nomenclature for 1-bit types.
685 (dump_value_range): Group all variants to common dumping code.
686 (debug): New overloaded functions for value_ranges.
687 (value_range_base::dump): Remove no argument version.
688 (value_range::dump): Same.
690 2018-11-13 Richard Biener <rguenther@suse.de>
692 PR tree-optimization/87931
693 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
694 nested cycles we support to latch computations vectorizable_reduction
697 2018-11-13 Martin Liska <mliska@suse.cz>
699 PR tree-optimization/87885
700 * cfghooks.c (account_profile_record): Rename
702 (profile_record_check_consistency): ... this.
703 Calculate missing num_mismatched_freq_in.
704 (profile_record_account_profile): New function
705 that calculates time and size of a function.
706 * cfghooks.h (struct profile_record): Remove
708 (struct cfg_hooks): Remove after_pass flag.
709 (account_profile_record): Rename to ...
710 (profile_record_check_consistency): ... this.
711 (profile_record_account_profile): New.
712 * cfgrtl.c (rtl_account_profile_record): Remove
714 * passes.c (check_profile_consistency): Do only
716 (account_profile): Calculate size and time of
718 (pass_manager::dump_profile_report): Reformat
720 (execute_one_ipa_transform_pass): Call
721 consistency check before clean upand call account_profile
722 after a clean up is done.
723 (execute_one_pass): Call check_profile_consistency and
724 account_profile instead of using after_pass flag..
725 * tree-cfg.c (gimple_account_profile_record): Likewise.
727 2018-11-13 Martin Liska <mliska@suse.cz>
730 * config/i386/i386.c (ix86_option_override_internal): Error
731 about usage -mabi=ms and -fsanitize={,kernel-}address.
733 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
735 * config/aarch64/aarch64.c
736 (aarch64_vectorize_preferred_vector_alignment): Change return type to
738 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
739 alignment being a poly int.
740 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
741 return type to poly_uint64.
742 * target.def (default_preferred_vector_alignment): Likewise.
743 * targhooks.c (default_preferred_vector_alignment): Likewise.
744 * targhooks.h (default_preferred_vector_alignment): Likewise.
745 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
746 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
748 (vect_update_misalignment_for_peel): Likewise.
749 (vect_enhance_data_refs_alignment): Likewise.
750 (vect_find_same_alignment_drs): Likewise.
751 (vect_duplicate_ssa_name_ptr_info): Likewise.
752 (vect_setup_realignment): Likewise.
753 (vect_can_force_dr_alignment_p): Change alignment parameter type to
755 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
756 mask with a compile time variable vector alignment.
757 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
759 (vect_do_peeling): Exit early if vector alignment is not constant.
760 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
762 (vectorizable_store): Likewise.
763 (vectorizable_load): Likweise.
764 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
766 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
768 (vect_can_force_dr_alignment_p): Change alignment parameter type to
771 2018-11-13 Richard Biener <rguenther@suse.de>
773 PR tree-optimization/87962
774 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
775 detect outer reduction for disqualifying in-loop uses.
777 2018-11-13 Richard Biener <rguenther@suse.de>
779 PR tree-optimization/87967
780 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
781 for constants for the scalar loop.
783 2018-11-13 Alan Modra <amodra@gmail.com>
785 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
786 integer constants when -mcmodel=medium.
788 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
790 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
791 * config/arc/elf.h (PROFILE_HOOK): Define.
792 * config/arc/linux.h (PROFILE_HOOK): Likewise.
794 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
796 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
797 jump table data in the text section.
799 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
801 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
802 to fit the eh_return pattern.
803 * config/arc/arc.md (eh_return): Define.
804 (VUNSPEC_ARC_EH_RETURN): Likewise.
805 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
807 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
810 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
812 * common/config/arc/arc-common.c (arc_option_optimization_table):
813 Millicode optimization is default on for size optimizations.
814 * config/arc/arc-protos.h (arc_check_multi): New function.
815 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
816 (ENTER_LEAVE_START_REG): Define.
817 (ENTER_LEAVE_END_REG): Likewise.
818 (arc_override_options): Disable millicode when long calls option
820 (arc_frame_info): Change it from int to bool.
821 (arc_compute_frame_size): Clean up.
822 (arc_save_restore): Remove.
823 (frame_save_reg): New function.
824 (frame_restore_reg): Likewise.
825 (arc_enter_leave_p): Likewise.
826 (arc_save_callee_saves): Likewise.
827 (arc_restore_callee_saves): Likewise.
828 (arc_save_callee_enter): Likewise.
829 (arc_restore_callee_leave): Likewise.
830 (arc_save_callee_milli): Likewise.
831 (arc_restore_callee_milli): Likewise.
832 (arc_expand_prologue): Reimplement to emit enter/leave
834 (arc_expand_epilogue): Likewise.
835 (arc_check_multi): New function.
836 * config/arc/arc.md (push_multi_fp): New pattern.
837 (push_multi_fp_blink): Likewise.
838 (pop_multi_fp): Likewise.
839 (pop_multi_fp_blink): Likewise.
840 (pop_multi_fp_ret): Likewise.
841 (pop_multi_fp_blink_ret): Likewise.
842 * config/arc/arc.opt (mmillicode): Update option.
843 (mcode-density-frame): New option.
844 * config/arc/predicates.md (push_multi_operand): New predicate.
845 (pop_multi_operand): Likewise.
846 * doc/invoke.texi (ARC): Update ARC options information.
849 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
851 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
852 * config/arc/arc.c (operands_ok_ldd_std): New function.
853 (mem_ok_for_ldd_std): Likewise.
854 (gen_operands_ldd_std): Likewise.
855 * config/arc/arc.md: Add peephole2 rules for std/ldd.
857 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
859 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
860 test on stack_usage_file.
861 (lang_dependent_init): Do not open the .su file if generating LTO.
863 2018-11-13 Jakub Jelinek <jakub@redhat.com>
865 PR rtl-optimization/87918
866 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
867 simplify_gen_relational rather than simplify_gen_binary.
869 2018-11-13 Richard Biener <rguenther@suse.de>
871 * tree-ssanames.h (set_range_info): Use value_range_base.
872 (get_range_info): Likewise.
873 * tree-ssanames.c (set_range_info): Likewise.
874 (get_range_info): Likewise.
875 * tree-vrp.c (value_range_base::union_helper): Split
876 out common parts of value_range[_base]::union_.
877 (value_range_base::union_): Update.
878 (value_range::union_): Likewise.
879 (determine_value_range_1): Use value_range_base.
880 (determine_value_range): Likewise.
881 * tree-vrp.h (value_range_base::union_helper): Move ...
882 (value_range::union_helper): ... from here.
884 2018-11-13 Alan Modra <amodra@gmail.com>
886 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
888 (rs6000_secondary_reload_gpr): Don't call find_replacement.
890 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
893 * doc/invoke.texi (Optimize Options): Clarify that the
894 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
895 apply to data cache size.
897 2018-11-13 Alan Modra <amodra@gmail.com>
899 * config/rs6000/predicates.md (logical_const_operand),
900 (logical_operand): Correct comment.
901 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
903 2018-11-13 Alan Modra <amodra@gmail.com>
905 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
907 2018-11-13 Alan Modra <amodra@gmail.com>
909 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
911 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
912 covered by alternative.
913 (movcc_internal1): Ignore h for register preference.
914 (mov<mode>_hardfloat64): Likewise.
915 (mov<mode>_softfloat): Ignore c, l, h for register preference.
917 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
919 PR preprocessor/47823
920 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
923 * doc/extend.texi (Pragmas): Note additional pragmas documented
926 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
930 * tree-scalar-evolution.c (expression_expensive_p): Make
931 BUILTIN POPCOUNT as expensive when backend does not define it.
933 2018-11-12 Fredrik Noring <noring@nocrew.org>
935 * config.gcc: Update with-llsc defaults for MIPS r5900.
937 2018-11-12 Martin Liska <mliska@suse.cz>
939 PR gcov-profile/87442
940 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
942 * doc/invoke.texi: Document them.
943 * tree-profile.c (parse_profile_filter): New.
944 (parse_profile_file_filtering): Likewise.
945 (release_profile_file_filtering): Likewise.
946 (include_source_file_for_profile): Likewise.
947 (tree_profiling): Filter source files based on the
950 2018-11-12 Martin Liska <mliska@suse.cz>
953 * doc/extend.texi: Add missing values for __builtin_cpu_is and
954 __builtin_cpu_supports for x86 target.
956 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
959 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
961 (Arithmetic): Likewise for "lo_sum".
963 2018-11-12 Renlin Li <renlin.li@arm.com>
966 * dse.c (get_stored_val): Add check for compile-time constantness
969 2018-11-12 Sudakshina Das <sudi.das@arm.com>
971 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
972 (ARMv8_5a): New fgroup.
973 (armv8.5-a): New arch.
974 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
976 * config/arm/arm-tables.opt: Regenerate.
977 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
978 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
979 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
980 Add matching rules for -march=armv8.5-a and extensions.
981 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
982 Add sb and predres to all armv8-a except armv8.5-a.
984 2018-11-12 Richard Biener <rguenther@suse.de>
986 * tree-vrp.h (value_range[_base]::set): Make public. Provide
987 overload for single value.
988 (value_range[_base]::set_nonnull): New.
989 (value_range[_base]::set_null): Likewise.
990 (value_range): Document bitmap copying behavior, mark
991 copy constructor and assignment operator deleted.
992 (value_range::move): New.
993 (value_range::set_and_canonicalize): Default bitmap to zero.
994 (set_value_range_to_nonnull): Remove.
995 (set_value_range_to_null): Likewise.
996 (set_value_range): Likewise.
997 (set_value_range_to_value): Likewise.
998 (extract_range_from_unary_expr): Work on value_range_base.
999 (extract_range_from_binary_expr_1): Likewise. Rename to...
1000 (extract_range_from_binary_expr): ... this.
1001 * tree-vrp.c (value_range::update): Clear equiv bitmap
1003 (value_range::move): New, move equiv bitmap.
1004 (value_range_base::set_undefined): Avoid assignment.
1005 (value_range::set_undefined): Likewise.
1006 (value_range_base::set_varying): Likewise.
1007 (value_range::set_varying): Likewise.
1008 (set_value_range): Remove.
1009 (value_range_base::set): New overload for value.
1010 (value_range::set): Likewise.
1011 (set_value_range_to_nonnull): Remove.
1012 (value_range_base::set_nonnull): New.
1013 (value_range::set_nonnull): Likewise.
1014 (set_value_range_to_null): Remove.
1015 (value_range_base::set_null): New.
1016 (value_range::set_null): Likewise.
1017 (range_is_null): Work on value_range_base.
1018 (range_is_nonnull): Likewise.
1019 (ranges_from_anti_range): Likewise.
1020 (extract_range_into_wide_ints): Likewise.
1021 (extract_range_from_multiplicative_op): Likewise.
1022 (extract_range_from_binary_expr): Likewise. Update for API changes.
1023 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
1025 (value_range::intersect_helper): Avoid copy and assignment.
1026 (value_range::union_helper): Likewise.
1027 (determine_value_range_1): Adjust.
1028 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
1029 Avoid assignment by using move.
1030 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
1031 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1033 * tree-ssanames.c (get_range_info): Likewise.
1034 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
1035 * vr-values.c (vr_values::get_value_range): Adjust.
1036 (vr_values::update_value_range): Likewise.
1037 (symbolic_range_based_on_p): Work on value_range_base.
1038 (vr_values::extract_range_from_binary_expr): Use value_range_base.
1039 (vr_values::extract_range_from_unary_expr): Likewise.
1040 (vr_values::extract_range_from_cond_expr): Avoid assignment.
1041 (vr_values::extract_range_from_comparison): Adjust.
1042 (vr_values::check_for_binary_op_overflow): Use value_range_base.
1043 (vr_values::extract_range_basic): Adjust.
1044 (vr_values::adjust_range_with_scev): Likewise.
1045 (vr_values::vrp_visit_assignment_or_call): Likewise.
1046 (vr_values::get_vr_for_comparison): Change API to avoid
1047 assignment and copy construction.
1048 (vr_values::compare_name_with_value): Adjust accordingly.
1049 (vr_values::compare_names): Likewise.
1050 (vr_values::extract_range_from_phi_node): Avoid assignment and
1051 bogus in-place modify of equiv bitmap.
1052 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
1053 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
1054 for extract_range_from_unary_expr API change.
1055 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
1057 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
1059 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
1061 2018-11-12 Richard Biener <rguenther@suse.de>
1063 * tree-vrp.h (value_range_base::symbolic_p,
1064 value_range_base::constant_p, value_range_base::zero_p,
1065 value_range_base::singleton_p): Move from value_range.
1066 (value_range::dump): Add.
1067 * gimple-ssa-evrp-analyze.c
1068 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
1069 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
1070 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1072 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
1073 (value_range::constant_p): Likewise.
1074 (value_range::singleton_p): Likewise.
1075 (value_range_base::dump): Add.
1076 (set_value_range_to_undefined): Remove.
1077 (set_value_range_to_varying): Likewise.
1078 (range_int_cst_p): Take value_range_base argument.
1079 (range_int_cst_singleton_p): Likewise.
1080 (value_range_constant_singleton): Likewise.
1081 (vrp_set_zero_nonzero_bits): Likewise.
1082 (extract_range_from_multiplicative_op): Use set_varying.
1083 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
1084 (extract_range_from_unary_expr): Likewise.
1085 (dump_value_range_base): Change to overload of dump_value_range.
1086 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
1087 (vrp_prop::visit_stmt): Likewise.
1088 (value_range::intersect_helper): Likewise.
1089 (value_range::union_helper): Likewise.
1090 (determine_value_range_1): Likewise.
1092 2018-11-12 Richard Biener <rguenther@suse.de>
1094 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
1095 (set_value_range_to_null): Likewise.
1096 * vr-values.c (vr_values::extract_range_from_comparison):
1097 Clear equiv for constant singleton ranges.
1099 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
1101 * config/i386/sse.md: Combine VFIXUPIMM* patterns
1102 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1103 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1104 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
1105 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1106 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1107 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
1109 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1112 * doc/extend.texi (Common Type Attributes): For the align type
1113 attribute, copy language about decreasing alignment from the
1114 corresponding variable attribute.
1116 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1118 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
1121 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1124 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
1125 -frtti and -fno-rtti code.
1127 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1130 * doc/extend.texi (Other Builtins): Document probability associated
1131 with __builtin_expect.
1133 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
1136 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
1137 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
1138 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
1139 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
1141 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1143 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
1145 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1147 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
1149 2018-11-11 Richard Biener <rguenther@suse.de>
1151 * tree-vrp.h (class value_range_base): New base class for
1152 value_range containing all but the m_equiv member.
1153 (dump_value_range_base): Add.
1154 (range_includes_zero_p): Work on value_range_base.
1155 * tree-vrp.c (value_range_base::set): Split out base handling
1157 (value_range::set): this.
1158 (value_range::set_equiv): New.
1159 (value_range_base::value_range_base): New constructors.
1160 (value_range_base::check): Split out base handling from...
1161 (value_range::check): this.
1162 (value_range::equal_p): Refactor in terms of
1163 ignore_equivs_equal_p which is now member of the base.
1164 (value_range_base::set_undefined): New.
1165 (value_range_base::set_varying): Likewise.
1166 (value_range_base::dump):Split out base handling from...
1167 (value_range::dump): this.
1168 (value_range_base::set_and_canonicalize): Split out base handling
1170 (value_range::set_and_canonicalize): this.
1171 (value_range_base::union_): New.
1172 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
1174 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
1175 instead of value_range everywhere.
1176 (ipcp_vr_lattice::print): Use dump_value_range_base.
1177 (ipcp_vr_lattice::meet_with): Adjust.
1178 (ipcp_vr_lattice::meet_with_1): Likewise.
1179 (ipa_vr_operation_and_type_effects): Likewise.
1180 (propagate_vr_across_jump_function): Likewise.
1181 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
1182 (ipa_get_value_range): Likewise.
1183 (ipa_set_jfunc_vr): Likewise.
1184 (ipa_compute_jump_functions_for_edge): Likewise.
1186 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
1189 * doc/invoke.texi (Optimize Options): Add @opindex entries
1190 for the positive forms of -fno-xxx and -mno-xxx options
1191 that were lacking them.
1193 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
1195 * combine.c (make_more_copies): Only make an intermediate copy if the
1196 dest of a move is a pseudo.
1198 2018-11-09 Maya Rashish <coypu@sdf.org>
1201 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1202 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1204 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
1208 * doc/invoke.texi (Optimize Options): Clarify default behavior
1209 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
1211 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
1213 PR tree-optimization/87940
1214 * expr.c (string_constant): Don't strip NOPS in subexpressions.
1215 Fold PLUS_EXPR correctly.
1217 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
1220 * config/s390/s390.c (s390_safe_relative_long_p): New function.
1221 (annotate_constant_pool_refs): Skip insns which support
1222 relative addressing.
1223 (annotate_constant_pool_refs_1): New helper function.
1224 (find_constant_pool_ref): Skip insns which support relative
1226 (find_constant_pool_ref_1): New helper function.
1227 (replace_constant_pool_ref): Skip insns which support
1228 relative addressing.
1229 (replace_constant_pool_ref_1): New helper function.
1230 (s390_mainpool_start): Adapt to the new signature.
1231 (s390_mainpool_finish): Likewise.
1232 (s390_chunkify_start): Likewise.
1233 (s390_chunkify_finish): Likewise.
1234 (pass_s390_early_mach::execute): Likewise.
1235 (s390_prologue_plus_offset): Likewise.
1236 (s390_emit_prologue): Likewise.
1237 (s390_emit_epilogue): Likewise.
1239 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1241 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1242 but unsupported lastprivate with conditional modifier.
1244 2018-11-09 Jeff Law <law@redhat.com>
1246 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1247 unused argument better. Add gcc_unreachable to silence warning.
1249 2018-11-09 Martin Sebor <msebor@redhat.com>
1252 * attribs.c (has_attribute): New helper function.
1253 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1254 * attribs.h (decls_mismatched_attributes): Declare.
1255 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1256 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1257 * common.opt (-Wattribute-alias): Take an argument.
1258 (-Wno-attribute-alias): New option.
1259 * doc/extend.texi (Common Function Attributes): Document copy.
1260 (Common Variable Attributes): Same.
1261 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1262 (-Wattribute-alias): Document new option argument.
1264 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1266 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1267 matching criteria. Remove unused array initializer.
1269 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
1270 Jinsong Ji <jji@us.ibm.com>
1272 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1273 constraints by introducing a new temporary.
1274 (_mm_cvtss_si64): Likewise.
1276 2018-11-09 Martin Liska <mliska@suse.cz>
1278 * common.opt: Add -fipa-stack-alignment flag.
1279 * doc/invoke.texi: Document it.
1280 * final.c (rest_of_clean_state): Guard stack
1281 shrinking with flag.
1283 2018-11-09 Martin Liska <mliska@suse.cz>
1285 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1287 (ipa_discover_variable_flags): ... this.
1288 * common.opt: Come up with new flag -fipa-reference-addressable.
1289 * doc/invoke.texi: Document it.
1290 * ipa-reference.c (propagate): Call the renamed fn.
1291 * ipa-visibility.c (whole_program_function_and_variable_visibility):
1293 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1295 (ipa_discover_variable_flags): ... this. Discover
1296 non-addressable variables only with the newly added flag.
1297 * opts.c: Enable the newly added flag with -O1 and higher
1300 2018-11-09 David Malcolm <dmalcolm@redhat.com>
1302 * json.cc (selftest::test_writing_literals): Fix comment.
1304 2018-11-09 Martin Liska <mliska@suse.cz>
1306 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1307 string to a stack buffer.
1308 (aarch64_parse_cpu): Likewise.
1309 (aarch64_parse_tune): Likewise.
1311 2018-11-09 Richard Biener <rguenther@suse.de>
1313 PR tree-optimization/87953
1314 * tree-vect-loop.c (vectorizable_reduction): For analysis
1315 always pass ops[0] to vectorizable_condition.
1317 2018-11-09 Stafford Horne <shorne@gmail.com>
1318 Richard Henderson <rth@twiddle.net>
1319 Joel Sherrill <joel@rtems.org>
1321 * common/config/or1k/or1k-common.c: New file.
1322 * config/or1k/*: New.
1323 * config.gcc (or1k*-*-*): New.
1324 * configure.ac (or1k*-*-*): New test for openrisc tls.
1325 * configure: Regenerated.
1326 * doc/install.texi: Document OpenRISC triplets.
1327 * doc/invoke.texi: Document OpenRISC arguments.
1328 * doc/md.texi: Document OpenRISC.
1330 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1332 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1333 (arm7tdmi-s): Delete CPU.
1334 (arm710t): Add aliases for arm720t and arm740t.
1335 (arm720t, arm740t): Delete CPUs.
1336 (arm920t): Add aliases for arm920, arm922t and arm940t.
1337 (arm920, arm922t, arm940t): Delete CPUs.
1338 (arm10tdmi): Add alias for arm1020t.
1339 (arm1020t): Delete CPU.
1340 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1341 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1342 (arm10e): Add aliases for arm1020e and arm1022e.
1343 (arm1020e, arm1022e): Delete CPU.
1344 * config/arm/arm.md (generic_sched): Remove entries that are now
1346 (generic_vfp): Likewise.
1347 * config/arm/arm1020e.md: Simplify tuning selection based on alias
1349 * config/arm/arm-tune.md: Regenerated.
1350 * config/arm/arm-tables.opt: Regenerated.
1352 2018-11-09 Richard Biener <rguenther@suse.de>
1354 PR tree-optimization/87621
1355 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1356 op with only phi inputs.
1357 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1358 (ch_base::copy_headers): Run CSE on copied loop headers.
1359 (pass_ch_vect::process_loop_p): Simplify.
1361 2018-11-09 Alexandre Oliva <oliva@adacore.com>
1363 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1364 for non-w64 x86_64 biarch.
1366 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
1368 PR rtl-optimization/86438
1369 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1370 of in_b for the compare if in_b is SET_DEST.
1373 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1374 non-toplevel UNSPEC.
1376 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1378 * tree-vrp.c (value_range::check): Do not access internals
1380 (value_range::singleton_p): Same.
1381 (value_range::type): Same.
1382 (vrp_finalize): Use value_range API.
1384 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1386 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1388 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1390 * vr-values.c (vr_values::get_value_range): Use value_range API
1391 instead of piecing together ranges.
1392 (vr_values::update_value_range): Same.
1394 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1396 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1397 of performing ad-hoc calculations.
1398 * tree-ssanames.c (set_range_info): New overloaded function
1399 accepting value_range &.
1400 (get_range_info): Same.
1401 * tree-ssanames.h (set_range_info_raw): Remove.
1402 (set_range_info): New prototype.
1403 (get_range_info): Same.
1404 * tree-vrp.h (value_range::null_p): Rename to zero_p.
1405 * tree-vrp.c (value_range::null_p): Same.
1407 2018-11-09 Jan Hubicka <jh@suse.cz>
1409 * tree.c (fld_type_variant_equal_p): Test user align flag.
1410 (flt_type_variant): Copy user align flag.
1411 (fld_incomplete_type_of): Clear it.
1413 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1415 * config/arm/neon.md (div<mode>3): New pattern.
1417 2018-11-08 Andi Kleen <ak@linux.intel.com>
1419 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1420 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1421 (ix86_handle_option): Handle OPT_mptwrite.
1422 * config/i386/cpuid.h (bit_PTWRITE): Add.
1423 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1424 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1425 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1426 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1427 (ix86_option_override_internal): Handle PTA_PTWRITE.
1428 (ix86_valid_target_attribute_inner_p): Define ptwrite.
1429 (def_builtin2): Force UINT64 to be 64bit only.
1430 * config/i386/i386.h (TARGET_PTWRITE): Add.
1431 (TARGET_PTWRITE_P): Add.
1433 * config/i386/i386.md: Define ptwrite.
1434 * config/i386/i386.opt: Add -mptwrite.
1435 * config/i386/immintrin.h (_ptwrite64): Add.
1437 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1438 * doc/invoke.texi: Document -mptwrite.
1440 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
1442 PR rtl-optimization/87600
1443 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1444 * lra-constraints.c (process_alt_operands): Skip illegal hard
1445 register usage. Prefer reloading non hard register operands.
1447 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
1450 * doc/invoke.texi (Optimize Options): Clarify default behavior
1451 for -fno-sched-interblock and -fno-sched-spec.
1453 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
1455 * collect2.c (linker_select): Add USE_LLD_LD.
1456 (ld_suffixes): Add ld.lld.
1457 (main): Handle -fuse-ld=lld.
1458 * common.opt (-fuse-ld=lld): New option.
1459 * doc/invoke.texi (-fuse-ld=lld): Document.
1460 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1462 2018-11-08 Paul Koning <ni1d@arrl.net>
1464 * config/pdp11/constraints.md: Add "Z" series constraints for use
1465 with pre-dec and post-inc addressing.
1466 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1467 (pdp11_expand_operands): Add int argument (word count).
1468 (pdp11_sp_frame_offset): Delete.
1469 (pdp11_cmp_length): New function.
1470 (pushpop_regeq): New function.
1471 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1473 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1475 (pdp11_initial_elimination_offset): Ditto.
1476 (pdp11_expand_operands): Add word count argument. Bugfixes.
1477 (output_move_multiple): Change how pointer adjustment is done.
1478 (pdp11_gen_int_label): Correct format.
1479 (output_ascii): Ditto.
1480 (pdp11_asm_output_var): Add code for DEC assembler case.
1481 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1483 (legitimate_const_double_p): Ditto.
1484 (pdp11_register_move_cost): Adjust for new register classes.
1485 (pdp11_regno_reg_class): Ditto.
1486 (expand_block_move): Delete.
1487 (pushpop_regeq): New function.
1488 (pdp11_legitimate_address_p): Bugfix in check for constant
1490 (pdp11_sp_frame_offset): Delete.
1491 (pdp11_reg_save_size): New helper function for new frame layout.
1492 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1493 (pdp11_expand_shift): Bugfix in check for constant shift count.
1494 (pdp11_shift_length): Ditto.
1495 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1496 (pdp11_cmp_length): New function.
1497 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1498 some compile options.
1499 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1500 (CALL_USED_REGISTERS): Ditto.
1501 (ELIMINABLE_REGS): Ditto.
1502 (REGISTER_NAMES): Ditto.
1503 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1505 (REG_CLASS_NAMES): Ditto.
1506 (REG_CLASS_CONTENTS): Ditto. Also remove
1507 HARD_FRAME_POINTER_REGNUM.
1508 (CPU_REG_CLASS): New macro.
1509 (CLASS_MAX_NREGS): Adjust for new register classes.
1510 (FUNCTION_PROFILER): Make no-op.
1511 (may_call_alloca): Remove unused declaration.
1512 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1513 (ASM_OUTPUT_SKIP): Fix format.
1514 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1515 (HARD_FRAME_POINTER_REGNUM): Remove.
1517 (*rts): Rename. Remove epilogue related checks.
1518 (cmpsi, cmpdi): New insn.
1519 (cbranch<mode>4): Change to apply to SI and DI modes as well.
1520 (mov<mode>): Change constraints to enforce that push/pop
1521 destination cannot use the same register as source.
1522 (*mov<mode><cc_cc>): Ditto.
1523 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1524 at assembly output rather than as RTL expander.
1525 (zero_extendqihi2): Bugfix in check for same registers.
1526 (adddi3_nocc): Bugfix in check for constant operand.
1527 (addsi3_nocc): Ditto.
1528 (subdi3_nocc): Ditto.
1529 (subsi3_nocc): Ditto.
1530 (negdi2_nocc): Copy input to pdp11_expand_operands.
1531 (negsi2_nocc): Ditto.
1532 (bswap2_nocc): Ditto.
1533 * config/pdp11/pdp11.opt (mlra): Fix documentation.
1534 * config/pdp11/t-pdp11: Use -Os.
1536 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
1538 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1539 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1540 (gen_comm_data): Print out CPU alias tables.
1541 (check_cpu): Match aliases when checking the CPU name.
1542 * config/arm/arm-protos.h (cpu_alias): New structure.
1543 (cpu_option): Add entry for aliases.
1544 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1545 strongarm1100 and strongarm1110.
1546 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1547 (config/arm/arm-generic.md): Remove redundant references to
1548 strongarm110, strongarm1100 and strongarm1110.
1549 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1550 Scan aliases for additional hints.
1551 (arm_parse_cpu_option_name): Also match a cpu name against the list
1553 * config/arm/arm-tables.opt: Regenerated.
1554 * config/arm/arm-tune.md: Regenerated.
1556 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1558 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1559 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1560 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1561 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1562 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1563 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1564 * gengtype.c (open_base_files): Add omp-general.h.
1565 * gimple.c (gimple_build_omp_critical):
1566 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1567 gimple_omp_taskgroup_set_clauses.
1568 (gimple_build_omp_atomic_load): Add mo argument, call
1569 gimple_omp_atomic_set_memory_order.
1570 (gimple_build_omp_atomic_store): Likewise.
1571 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1572 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1574 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1575 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1576 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1577 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1578 different value for GF_OMP_ATOMIC_NEED_VALUE.
1579 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1581 (struct gimple_statement_omp_single_layout): And remove here.
1582 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1583 than gimple_statement_omp_single_layout.
1584 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1586 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1587 (gimple_omp_subcode): Formatting fix.
1588 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1589 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1590 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1591 gimple_omp_teams_host, gimple_omp_teams_set_host,
1592 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1593 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1594 gimple_omp_taskgroup_set_clauses): New inline functions.
1595 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1596 (gimple_build_omp_atomic_store): Likewise.
1597 (gimple_omp_atomic_seq_cst_p): Remove.
1598 (gimple_omp_atomic_memory_order): New function.
1599 (gimple_omp_atomic_set_seq_cst): Remove.
1600 (gimple_omp_atomic_set_memory_order): New function.
1601 (gimple_build_omp_taskgroup): Add clauses argument.
1602 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1603 (dump_gimple_omp_task): Print taskwait with depend clauses.
1604 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1605 dump_omp_atomic_memory_order.
1606 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1607 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1608 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1609 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1610 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1611 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1612 ORT_UNTIED_TASKLOOP enumerators.
1613 (enum gimplify_defaultmap_kind): New.
1614 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1615 target_map_pointers_as_0len_arrays members, add defaultmap.
1616 (new_omp_context): Initialize defaultmap member.
1617 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1618 (maybe_fold_stmt): Don't fold even in host teams regions.
1619 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1620 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1621 ctx->omp_firstprivatize_variable.
1622 (omp_add_variable): Don't add private/firstprivate for VLAs in
1624 (omp_default_clause): Print "taskloop" rather than "task" if
1626 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1627 Handle new defaultmap clause kinds.
1628 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
1629 iterator to be lastprivate or private. Fix up diagnostics if linear
1630 is used on collapse>1 simd iterator.
1631 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1632 (gimplify_omp_depend): New function.
1633 (gimplify_scan_omp_clauses): Add shared clause on parallel for
1634 combined parallel master taskloop{, simd} if taskloop has
1635 firstprivate, lastprivate or reduction clause. Handle
1636 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
1637 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
1638 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
1639 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
1640 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
1642 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
1643 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
1644 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
1645 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1646 (gimplify_omp_task): Handle taskwait with depend clauses.
1647 (gimplify_omp_for): Add shared clause on parallel for combined
1648 parallel master taskloop{, simd} if taskloop has firstprivate,
1649 lastprivate or reduction clause. Use ORT_TASKLOOP or
1650 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
1651 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
1652 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
1653 __for_end and __for_range temporaries on OMP_PARALLEL for
1654 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
1655 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1656 sandwiched in between two taskloops.
1657 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1658 instead of ctx->omp_firstprivatize_variable.
1659 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1660 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
1661 host teams, use gimplify_and_return_first etc. for body like
1662 for target or target data constructs, and at the end call
1663 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1664 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1665 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1666 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1667 gimple_omp_atomic_set_seq_cst calls.
1668 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1669 case, handle taskgroup clauses.
1670 * lto-streamer-out.c (hash_tree): Handle
1671 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1672 * Makefile.in (GTFILES): Add omp-general.h.
1673 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1674 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1675 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1676 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1677 BUILT_IN_GOMP_LOOP_DOACROSS_START,
1678 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1679 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1680 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1681 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1682 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1683 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1684 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1685 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1686 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1687 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1688 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1689 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1690 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1691 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1692 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1693 * omp-expand.c (workshare_safe_to_combine_p): Return false for
1694 non-worksharing loops.
1695 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1696 (determine_parallel_type): Don't combine parallel with worksharing
1697 which has _reductemp_ clause.
1698 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1699 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1700 if there is nonmonotonic modifier or if there is no modifier and no
1701 ordered clause. For dynamic and guided schedule without monotonic
1702 and nonmonotonic modifier, default to nonmonotonic.
1703 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
1704 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1706 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1707 there are any reduction clauses.
1708 (expand_taskwait_call): New function.
1709 (expand_teams_call): New function.
1710 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1711 expand_teams_call for it. Formatting fix. Handle taskwait with
1713 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
1714 of worksharing loops with task reductions.
1715 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1716 expansion of worksharing loops with task reductions.
1717 (expand_omp_sections): Handle expansion of sections with task
1719 (expand_omp_synch): For host teams call expand_omp_taskreg.
1720 (omp_memory_order_to_memmodel): New function.
1721 (expand_omp_atomic_load, expand_omp_atomic_store,
1722 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1723 instead of gimple_omp_atomic_seq_cst_p.
1724 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1725 depend clauses as a standalone directive.
1726 * omp-general.c (enum omp_requires): New variable.
1727 (omp_extract_for_data): Initialize have_reductemp member. Allow
1728 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1729 GT_EXPR loops depending on incr sign. Formatting fixes.
1730 * omp-general.h (struct omp_for_data): Add have_reductemp member.
1731 (enum omp_requires): New enum.
1732 (omp_requires_mask): Declare.
1733 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1735 * omp-low.c (struct omp_context): Add task_reductions and
1736 task_reduction_map fields.
1737 (is_host_teams_ctx): New function.
1738 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1739 (use_pointer_for_field): Use is_global_var instead of
1740 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1742 (build_outer_var_ref): Ignore taskgroup outer contexts.
1743 (delete_omp_context): Release task_reductions and task_reduction_map.
1744 (scan_sharing_clauses): Don't add any fields for reduction clause on
1745 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
1746 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1747 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
1748 Handle OMP_CLAUSE_NONTEMPORAL.
1749 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1751 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1752 clauses with task modifier.
1753 (scan_omp_task): Handle taskwait with depend clauses.
1754 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1755 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1756 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1757 (scan_omp_for): Fix comment formatting.
1758 (scan_omp_teams): Handle host teams constructs.
1759 (check_omp_nesting_restrictions): Allow teams with no outer
1760 OpenMP context. Adjust diagnostics for teams strictly nested into
1761 some explicit OpenMP construct other than target. Allow OpenMP atomics
1762 inside of simd regions.
1763 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1764 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1765 taskreg_nesting_level while scanning host teams construct.
1766 (task_reduction_read): New function.
1767 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1768 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1769 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
1770 second argument create_tmp_var if it is NULL. Don't ignore shared
1771 clauses in is_host_teams_ctx contexts. Handle
1772 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1774 (lower_reduction_clauses): Ignore reduction clauses with task
1775 modifier. Remove second argument create_tmp_var if it is NULL.
1776 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1777 (lower_send_clauses): Ignore reduction clauses with task modifier.
1778 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
1779 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
1780 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1781 rely that it is the last stmt in body so far. Ignore outer taskgroup
1783 (omp_task_reductions_find_first, omp_task_reduction_iterate,
1784 lower_omp_task_reductions): New functions.
1785 (lower_omp_sections): Handle reduction clauses with taskgroup
1786 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
1787 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1788 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
1790 (lower_omp_taskgroup): Handle taskgroup reductions.
1791 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1792 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1793 (lower_depend_clauses): If there are any
1794 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1795 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
1796 seen, assume lowering is done already and return early. Set kind
1797 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1798 (lower_omp_taskreg): Handle reduction clauses with task modifier on
1799 parallel construct. Handle reduction clause on taskloop construct.
1800 Handle taskwait with depend clauses.
1801 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1802 for host teams constructs.
1803 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1804 nontemporal and _reductemp_ clause entries.
1805 (omp_clause_code_name): Likewise.
1806 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1807 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1808 * tree-core.h (enum omp_clause_code): Add
1809 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1810 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1811 (struct tree_base): Add omp_atomic_memory_order field into union.
1812 Remove OMP_ATOMIC_SEQ_CST comment.
1813 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1814 and OMP_CLAUSE_DEPEND_DEPOBJ.
1815 (struct tree_omp_clause): Add subcode.defaultmap_kind.
1816 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1817 OpenMP constructs with body and clauses operands.
1818 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1819 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1820 (OMP_TASKGROUP_CLAUSES): Define.
1821 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1822 OMP_CLAUSE__LOOPTEMP_.
1823 (OMP_ATOMIC_SEQ_CST): Remove.
1824 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1825 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1826 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1827 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1828 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1829 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1830 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1831 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1832 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1833 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1835 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1836 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1837 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1838 (convert_local_omp_clauses): Likewise. Remove useless test.
1839 * tree-parloops.c (create_call_for_reduction_1): Pass
1840 OMP_MEMORY_ORDER_RELAXED as new argument to
1841 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1842 * tree-pretty-print.c (dump_omp_iterators): New function.
1843 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1844 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
1845 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1846 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
1847 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
1848 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
1849 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1850 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1851 (dump_omp_atomic_memory_order): New function.
1852 (dump_generic_node): Use it. Print taskgroup clauses. Print
1853 taskwait with depend clauses.
1854 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1855 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1856 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1857 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1858 write_ts_omp_clause_tree_pointers): Likewise.
1860 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1863 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1864 "-missed", "-note", and "-all" sub-options.
1865 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1867 (can_early_inline_edge_p): Likewise.
1868 (want_early_inline_function_p): Likewise.
1869 (want_inline_self_recursive_call_p): Likewise.
1870 (recursive_inlining): Likewise.
1871 (inline_small_functions): Likewise.
1872 (flatten_function): Likewise.
1873 (ipa_inline): Likewise.
1874 (inline_always_inline_functions): Likewise.
1875 (early_inline_small_functions): Likewise.
1876 (early_inliner): Likewise.
1877 * tree-inline.c (expand_call_inline): Likewise.
1879 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1881 * pretty-print.c (pp_format): Handle %f.
1882 (selftest::test_pp_format): Add test of %f.
1883 * pretty-print.h (pp_double): New macro.
1885 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1887 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1888 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1889 (dump_pretty_printer::decode_format): Implement "%C" for
1891 (selftest::test_capture_of_dump_calls): Rename "where" to
1892 "stmt_loc". Convert test_decl to a function decl and set its
1893 location. Add a symbol_table_test RAII instance and a
1894 cgraph_node, using it to test "%C" and dump_symtab_node.
1896 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
1899 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1901 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1903 * cgraph.c: Include "selftest.h".
1904 (saved_symtab): New variable.
1905 (selftest::symbol_table_test::symbol_table_test): New ctor.
1906 (selftest::symbol_table_test::~symbol_table_test): New dtor.
1907 (selftest::test_symbol_table_test): New test.
1908 (selftest::cgraph_c_tests): New.
1909 * cgraph.h (saved_symtab): New decl.
1910 (selftest::symbol_table_test): New class.
1911 * selftest-run-tests.c (selftest::run_tests): Call
1912 selftest::cgraph_c_tests.
1913 * selftest.h (selftest::cgraph_c_tests): New decl.
1915 2018-11-08 Richard Biener <rguenther@suse.de>
1917 * tree-data-ref.h (lambda_int): New typedef.
1918 (lambda_vector_gcd): Adjust.
1919 (lambda_vector_new): Likewise.
1920 (lambda_matrix_new): Likewise.
1921 * tree-data-ref.c (print_lambda_vector): Adjust.
1923 2018-11-08 Richard Biener <rguenther@suse.de>
1925 PR tree-optimization/87929
1926 * tree-complex.c (expand_complex_comparison): Clean EH.
1928 2018-11-08 Martin Liska <mliska@suse.cz>
1930 * doc/extend.texi: Reword.
1931 * predict.c (expr_expected_value_1): Likewise.
1933 2018-11-08 Richard Biener <rguenther@suse.de>
1935 PR tree-optimization/87913
1936 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1937 of extreme values to ordered comparisons.
1939 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1942 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1944 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1946 * doc/invoke.texi: Remove leading dash from @opindex entries
1947 throughout the file.
1949 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1952 * doc/invoke.texi (Option Summary): Add -e and --entry.
1953 (Link Options): Likewise.
1955 2018-11-07 Nathan Sidwell <nathan@acm.org>
1958 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1959 --disable-checking bootstrap.
1961 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
1963 * configure: Regenerated.
1965 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1968 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1969 to the mode of the widest field iff the widest field has mode class
1970 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1973 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
1975 * common.opt: Add -Wattribute-warning.
1976 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1977 * expr.c (expand_expr_real_1): Add new attribute to warning_at
1978 call to allow user configure behavior of "warning" attribute.
1980 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
1982 * target.def: Put @: after every vs., e.g., and i.e. where it is
1983 followed by whitespace.
1984 * doc/extend.texi: Ditto.
1985 * doc/fragments.texi: Ditto.
1986 * doc/gimple.texi: Ditto.
1987 * doc/implement-c.texi: Ditto.
1988 * doc/install.texi: Ditto.
1989 * doc/invoke.texi: Ditto.
1990 * doc/md.texi: Ditto.
1991 * doc/plugins.texi: Ditto.
1992 * doc/rtl.texi: Ditto.
1993 * doc/sourcebuild.texi: Ditto.
1994 * doc/tm.texi.in: Ditto.
1995 * doc/ux.texi: Ditto.
1996 * doc/tm.texi: Regenerate.
1998 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2000 * config/arm/arm-cpus.in (ares): New entry.
2001 * config/arm/arm-tables.opt: Regenerate.
2002 * config/arm/arm-tune.md: Likewise.
2003 * doc/invoke.texi (ARM Options): Document ares.
2005 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2007 * config/aarch64/aarch64-cores.def (ares): Define.
2008 * config/aarch64/aarch64-tune.md: Regenerate.
2009 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
2011 2018-11-07 Jan Hubicka <jh@suse.cz>
2013 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
2014 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
2015 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
2018 2018-11-07 Richard Biener <rguenther@suse.de>
2020 PR tree-optimization/87914
2021 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
2023 (vectorizable_reduction): Handle shifts and rotates by dispatching
2024 to vectorizable_shift.
2025 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
2026 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
2028 (vectorizable_shift): Export and handle being called as
2030 (vect_analyze_stmt): Call vectorizable_shift after
2031 vectorizable_reduction.
2032 * tree-vectorizer.h (vectorizable_shift): Declare.
2034 2018-11-07 Jan Hubicka <jh@suse.cz>
2036 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
2037 than const decls in TREE_VALUE of enum.
2038 (dump_type_inheritance_graph): Improve duplicate dumping.
2039 (free_enum_values): New.
2040 (build_type_inheritance_graph): Use it.
2041 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
2042 which are not main variants or not ODR types.
2043 (verify_type_variant): Expect variants to have no TYPE_VALUES.
2045 2018-11-07 Richard Biener <rguenther@suse.de>
2047 * ipa-inline.c (want_inline_small_function_p): Compute
2048 big_speedup_p lazily and last.
2050 2018-11-07 Jan Hubicka <jh@suse.cz>
2052 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
2053 building incomplete variant of complete type.
2054 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
2055 variant of complete type.
2057 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2059 * config/mips/mips.c: Fix typo in documentation of
2060 mips_loongson_ext2_prefetch_cookie.
2061 (mips_option_override): fix brain twister logical.
2062 * config/mips/mips.h: Fix typo in documentation of
2063 ISA_HAS_CTZ_CTO and define pattern.
2064 * config/mips/mips.md (prefetch): Hoist EXT2 above
2066 (prefetch_indexed): Hoist EXT2 above the EXT block.
2068 2018-11-07 Jan Hubicka <jh@suse.cz>
2070 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
2071 return and parameter types of function and method types.
2072 (free_lang_data_in_cgraph): Update.
2074 2018-11-07 Martin Liska <mliska@suse.cz>
2076 PR rtl-optimization/87868
2077 * postreload-gcse.c (eliminate_partially_redundant_load): Set
2078 threshold to max_count if we would overflow.
2079 * profile-count.h: Make max_count a public constant.
2081 2018-11-07 Martin Liska <mliska@suse.cz>
2083 * mem-stats.h: Fix GNU coding style.
2085 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2087 * config/mips/gs264e.md: New.
2088 * config/mips/mips-cpus.def: Define gs264e.
2089 * config/mips/mips-tables.opt: Regenerate.
2090 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2092 (mips_issue_rate): Add support for gs264e.
2093 (mips_multipass_dfa_lookahead): Likewise.
2094 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
2095 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
2096 (MIPS_ASE_MSA_SPEC): New.
2097 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
2098 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
2099 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
2100 * config/mips/mips.md: Include gs264e.md.
2101 (processor): Add gs264e.
2102 * config/mips/mips.opt (MSA): Use Mask instead of Var.
2103 * doc/invoke.texi: Add gs264e to supported architectures.
2105 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2107 * config/mips/gs464e.md: New.
2108 * config/mips/mips-cpus.def: Define gs464e.
2109 * config/mips/mips-tables.opt: Regenerate.
2110 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2112 (mips_issue_rate): Add support for gs464e.
2113 (mips_multipass_dfa_lookahead): Likewise.
2114 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
2115 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
2116 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
2117 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
2118 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
2119 * config/mips/mips.md: Include gs464e.md.
2120 (processor): Add gs464e.
2121 * doc/invoke.texi: Add gs464e to supported architectures.
2123 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2125 * config/mips/loongson3a.md: Rename to ...
2126 * config/mips/gs464.md: ... here.
2127 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
2128 as an alias of gs464 processor.
2129 * config/mips/mips-tables.opt: Regenerate.
2130 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
2131 instead of PROCESSOR_LOONGSON_3A.
2132 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
2134 (mips_option_override): Enable MMI and EXT for gs464.
2135 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
2136 Rename TUNE_LOONGSON_3A to TUNE_GS464.
2137 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
2138 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
2139 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
2141 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
2142 (processor): Add gs464;
2143 * doc/invoke.texi: Add gs464 to supported architectures.
2145 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2147 * config/mips/mips-protos.h
2148 (mips_loongson_ext2_prefetch_cookie): New prototype.
2149 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
2150 (mips_option_override): Enable TARGET_LOONGSON_EXT when
2151 TARGET_LOONGSON_EXT2 is true.
2152 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
2153 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
2154 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
2155 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
2156 TARGET_LOONGSON_EXT2.
2157 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
2158 (define_insn "ctz<mode>2"): New insn pattern.
2159 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
2160 (define_insn "prefetch_indexed_<mode>"): Include
2161 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
2162 * config/mips/mips.opt (-mloongson-ext2): Add option.
2163 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
2165 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2167 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
2168 __mips_loongson_ext.
2169 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
2170 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
2172 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
2173 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
2174 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
2175 instead of TARGET_LOONGSON_3A.
2176 * config/mips/mips.opt (-mloongson-ext): Add option.
2177 * gcc/doc/invoke.texi (-mloongson-ext): Document.
2179 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2181 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
2182 * config/mips/loongson.md: Move to ...
2183 * config/mips/loongson-mmi.md: here; Adjustment.
2184 * config/mips/loongson.h: Move to ...
2185 State as deprecated. Include loongson-mmiintrin.h for back
2186 compatibility and warning.
2187 * config/mips/loongson-mmiintrin.h: ... here.
2188 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
2189 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
2190 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2191 (mips_option_override): Make sure MMI use hard float;
2192 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
2193 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
2194 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
2195 TARGET_LOONGSON_VECTORS.
2196 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
2197 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
2198 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
2199 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2201 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2202 TARGET_LOONGSON_VECTORS.
2203 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2204 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2205 (Loongson MMI patterns): Include loongson-mmi.md instead of
2207 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
2208 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
2210 2018-11-07 Richard Biener <rguenther@suse.de>
2213 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
2214 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2216 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
2218 PR rtl-optimization/87874
2219 * lra.c (lra_substitute_pseudo): Do not create a subreg for
2222 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
2224 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
2225 if not in indexed or indirect form.
2226 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
2227 (bswap<mode>2_store): Ditto.
2229 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
2231 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
2234 2018-11-06 Richard Biener <rguenther@suse.de>
2236 PR tree-optimization/86850
2237 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
2238 instead of src.m_vec.
2240 2018-11-06 Jan Hubicka <jh@suse.cz>
2242 * tree.c (fld_simplified_type_name): Break out form ...
2243 (free_lang_data_in_type): ... here.
2244 (fld_type_variant_equal_p): Use it.
2246 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2248 * config/default-d.c: Include memmodel.h.
2250 * config/sol2-d.c: New file.
2251 * config/t-sol2 (sol2-d.o): New rule.
2252 * config.gcc <*-*-solaris2*>: Set d_target_objs,
2253 target_has_targetdm.
2255 2018-11-06 Jan Hubicka <jh@suse.cz>
2257 * tree.c (fld_type_variant): Also copy alignment; be sure that
2258 new variant is equal.
2260 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
2263 * config/s390/s390.md: Add relative_long attribute.
2265 2018-11-06 Jan Hubicka <jh@suse.cz>
2267 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2268 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2269 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2270 stream TYPE_NEEDS_CONSTRUCTING.
2271 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2272 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2274 2018-11-06 Richard Biener <rguenther@suse.de>
2276 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2278 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2280 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2282 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2283 REG_CLASS_CONTENTS[GEN_REGS].
2284 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2286 2018-11-06 Jan Hubicka <jh@suse.cz>
2288 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2290 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2293 * config/sol2.h (ASAN_CC1_SPEC): Define.
2294 (LD_WHOLE_ARCHIVE_OPTION): Define.
2295 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2296 (ASAN_REJECT_SPEC): Provide default.
2297 (LIBASAN_EARLY_SPEC): Define.
2298 (LIBTSAN_EARLY_SPEC): Define.
2299 (LIBLSAN_EARLY_SPEC): Define.
2300 * config/i386/sol2.h (CC1_SPEC): Redefine.
2301 (ASAN_REJECT_SPEC): Define.
2303 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2304 (TARGET_ASAN_SHADOW_OFFSET): Define.
2305 (sparc_asan_shadow_offset): New function.
2306 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2307 (ASAN_REJECT_SPEC): Define.
2309 2018-11-06 Jan Hubicka <jh@suse.cz>
2311 * tree.c (fld_type_variant): Copy canonical type.
2312 (fld_incomplete_type_of): Check that canonical types looks sane;
2313 copy canonical type.
2314 (verify_type): Accept when incomplete type has complete canonical type.
2316 2018-11-06 Jan Hubicka <jh@suse.cz>
2318 * tree.c (free_lang_data): Reset overwite_assembler_name,
2319 print_xnode, print_decl, print_type and print_identifier of
2322 2018-11-06 Richard Biener <rguenther@suse.de>
2324 PR tree-optimization/87889
2325 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2326 Do nothing if old and new arg are the same
2328 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
2331 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2332 attributes for operands 3 and 4.
2334 2018-11-06 Richard Biener <rguenther@suse.de>
2337 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2338 matching bitfield insertion.
2340 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2342 * auto-inc-dec.c: Include valtrack.h. Improve comments.
2343 (reg_next_debug_use): New.
2344 (attempt_change): Propagate adjusted expression into affected
2346 (merge_in_block): Track uses in debug insns.
2347 (pass_inc_dec::execute): Allocate and release
2350 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2352 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2353 (_mm512_fixupimm_round_pd): Update parameters and builtin.
2354 (_mm512_maskz_fixupimm_round_pd): Ditto.
2355 (_mm512_fixupimm_round_ps): Ditto.
2356 (_mm512_maskz_fixupimm_round_ps): Ditto.
2357 (_mm_fixupimm_round_sd): Ditto.
2358 (_mm_maskz_fixupimm_round_sd): Ditto.
2359 (_mm_fixupimm_round_ss): Ditto.
2360 (_mm_maskz_fixupimm_round_ss): Ditto.
2361 (_mm512_fixupimm_pd): Ditto.
2362 (_mm512_maskz_fixupimm_pd): Ditto.
2363 (_mm512_fixupimm_ps): Ditto.
2364 (_mm512_maskz_fixupimm_ps): Ditto.
2365 (_mm_fixupimm_sd): Ditto.
2366 (_mm_maskz_fixupimm_sd): Ditto.
2367 (_mm_fixupimm_ss): Ditto.
2368 (_mm_maskz_fixupimm_ss): Ditto.
2369 (_mm512_mask_fixupimm_round_pd): Update builtin.
2370 (_mm512_mask_fixupimm_round_ps): Ditto.
2371 (_mm_mask_fixupimm_round_sd): Ditto.
2372 (_mm_mask_fixupimm_round_ss): Ditto.
2373 (_mm512_mask_fixupimm_pd): Ditto.
2374 (_mm512_mask_fixupimm_ps): Ditto.
2375 (_mm_mask_fixupimm_sd): Ditto.
2376 (_mm_mask_fixupimm_ss): Ditto.
2377 * config/i386/avx512vlintrin.h:
2378 (_mm256_fixupimm_pd): Update parameters and builtin.
2379 (_mm256_maskz_fixupimm_pd): Ditto.
2380 (_mm256_fixupimm_ps): Ditto.
2381 (_mm256_maskz_fixupimm_ps): Ditto.
2382 (_mm_fixupimm_pd): Ditto.
2383 (_mm_maskz_fixupimm_pd): Ditto.
2384 (_mm_fixupimm_ps): Ditto.
2385 (_mm_maskz_fixupimm_ps): Ditto.
2386 (_mm256_mask_fixupimm_pd): Update builtin.
2387 (_mm256_mask_fixupimm_ps): Ditto.
2388 (_mm_mask_fixupimm_pd): Ditto.
2389 (_mm_mask_fixupimm_ps): Ditto.
2390 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2391 * config/i386/i386-builtin.def: Update builtin definitions.
2392 * config/i386/i386.c: Handle new builtin types and remove useless ones.
2393 * config/i386/sse.md: Update VFIXUPIMM* patterns.
2394 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2395 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2396 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2397 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2398 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2399 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2400 * config/i386/subst.md:
2401 (round_saeonly_sd_mask_operand4): Add new subst_attr.
2402 (round_saeonly_sd_mask_op4): Ditto.
2403 (round_saeonly_expand_operand5): Ditto.
2404 (round_saeonly_expand): Update.
2406 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2408 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2410 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
2412 PR rtl-optimization/87871
2413 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2415 2018-11-05 Paul Koning <ni1d@arrl.net>
2417 * doc/sourcebuild.texi (target attributes): Document new "inf"
2418 effective target keyword.
2420 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2422 * config/s390/s390.c (s390_register_move_cost): Increase costs for
2423 moves involving the CC reg.
2425 2018-11-05 Richard Biener <rguenther@suse.de>
2427 PR tree-optimization/87873
2428 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2430 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2431 * tree-vect-loop.c (vect_transform_loop): When splitting the
2432 loop exit also create forwarder PHIs for constants.
2433 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2434 Handle constant to_arg, add extra checking we match up the correct
2437 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2439 * config/s390/s390.md: QImode and HImode for load on condition.
2441 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2443 * config/s390/predicates.md: Fix typo.
2444 * config/s390/s390.md: Allow immediates for load on condition.
2446 2018-11-05 Martin Liska <mliska@suse.cz>
2448 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2449 * bitmap.h (struct bitmap_usage): Likewise.
2450 * ggc-common.c (SCALE): Remove.
2452 (struct ggc_usage): Use SIZE_AMOUNT. And update
2454 * ggc-page.c (SCALE): Remove.
2455 (STAT_LABEL): Remove.
2456 (ggc_print_statistics): Use SIZE_AMOUNT.
2457 * gimple.h (SCALE): Remove.
2459 * input.c (ONE_K): Remove.
2462 (STAT_LABEL): Likewise.
2463 (FORMAT_AMOUNT): Likewise.
2464 (dump_line_table_statistics): Use SIZE_AMOUNT.
2465 * mem-stats.h (struct mem_usage): Likewise.
2466 * rtl.c (dump_rtx_statistics): Likewise.
2467 (rtx_alloc_counts): Change type to size_t.
2468 (rtx_alloc_sizes): Likewise.
2469 (rtx_count_cmp): New.
2470 (dump_rtx_statistics): Sort first based on counts.
2471 * tree.c (tree_nodes_cmp): New.
2472 (tree_codes_cmp): New.
2473 (dump_tree_statistics): Sort first based on counts.
2474 * system.h (ONE_K): New.
2476 (SIZE_SCALE): Likewise.
2477 (SIZE_LABEL): Likewise.
2478 (SIZE_AMOUNT): Likewise.
2479 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2480 * tree-dfa.c (dump_dfa_stats): Likewise.
2481 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2482 * tree-ssanames.c (ssanames_print_statistics): Likewise.
2483 * tree.c (dump_tree_statistics): Likewise.
2484 * vec.c (struct vec_usage): Likewise.
2485 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2486 trigger a -Werror=format-overflow with
2487 --enable-gather-detailed-stats.
2489 2018-11-05 Martin Liska <mliska@suse.cz>
2491 * mem-stats.h (mem_alloc_description::release_instance_overhead):
2493 * vec.c (struct vec_usage): Register m_element_size.
2494 (vec_prefix::register_overhead): New arguments: elements and
2496 (vec_prefix::release_overhead): Subtract elements.
2497 * vec.h (struct vec_prefix): Change signature.
2498 (va_heap::reserve): Pass proper arguments.
2499 (va_heap::release): Likewise.
2501 2018-11-05 Martin Liska <mliska@suse.cz>
2503 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2507 2018-11-05 Richard Biener <rguenther@suse.de>
2509 * tree-scalar-evolution.h (final_value_replacement_loop): Update
2511 * tree-scalar-evolution.c (final_value_replacement_loop): Return
2512 whether anything was done.
2513 (scev_const_prop): Remove constant propagation part, fold
2515 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2516 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2519 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2521 PR tree-optimization/87859
2522 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2523 only_constants and first_nonmergeable_order members.
2524 (merged_store_group::merged_store_group): Initialize them.
2525 (merged_store_group::do_merge): Clear only_constants member if
2526 adding something other than INTEGER_CST store.
2527 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2528 stores with order >= first_nonmergeable_order. Use
2529 merged_store->only_constants instead of always recomputing it.
2530 Set merged_store->first_nonmergeable_order if we've skipped any
2531 stores. Attempt to merge overlapping INTEGER_CST stores that
2532 we would otherwise skip.
2535 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2537 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2540 * config/i386/emmintrin.h (__v16qs): New to cope with option
2542 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2543 (_mm_cmplt_epi8): Likewise.
2544 (_mm_cmpgt_epi8): Likewise.
2546 2018-11-05 Richard Biener <rguenther@suse.de>
2548 PR rtl-optimization/87852
2549 * fwprop.c (use_killed_between): Only consider single-defs of the
2550 use whose definition statement dominates the use.
2552 2018-11-05 Martin Liska <mliska@suse.cz>
2555 * doc/invoke.texi: Remove options that are
2556 not disabled with -Os.
2558 2018-11-05 Martin Liska <mliska@suse.cz>
2561 * doc/extend.texi: Update constrain about the last argument
2562 of __builtin_expect_with_probability.
2564 2018-11-05 Martin Liska <mliska@suse.cz>
2567 * predict.c (expr_expected_value_1): Verify
2568 that last argument is a real constants and emit
2571 2018-11-05 Martin Liska <mliska@suse.cz>
2573 PR gcov-profile/77698
2574 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2577 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2579 PR tree-optimization/86572
2580 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2582 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2584 PR tree-optimization/87672
2585 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2586 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2588 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2591 * cfgexpand.c (pass_expand::execute): Move the call to
2592 finish_eh_generation in front of the call to expand_stack_alignment.
2594 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2596 * common/config/i386/i386-common.c (processor_alias_table): Add
2598 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2599 (case ${target}): Add znver2.
2600 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2601 -march=native recognize znver2 processors.
2602 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2603 * config/i386/i386.c (m_znver2): New definition.
2604 (m_ZNVER): New definition.
2605 (m_AMD_MULTIPLE): Includes m_znver2.
2606 (processor_cost_table): Add znver2 entry.
2607 (processor_target_table): Add znver2 entry.
2608 (get_builtin_code_for_version): Set priority for
2610 (processor_model): Add M_AMDFAM17H_ZNVER2.
2611 (arch_names_table): Ditto.
2612 (ix86_reassociation_width): Include znver2.
2613 * config/i386/i386.h (TARGET_znver2): New definition.
2614 (struct ix86_size_cost): Add TARGET_ZNVER2.
2615 (enum processor_type): Add PROCESSOR_ZNVER2.
2616 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2617 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2618 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2619 (ix86_adjust_cost): Add znver2.
2620 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2621 * gcc/doc/extend.texi: Add details about znver2.
2622 * gcc/doc/invoke.texi: Add details about znver2.
2624 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2628 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2631 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2633 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2634 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2636 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
2638 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2639 shrink-wrapping when -mtrack-speculation.
2641 2018-11-02 Richard Biener <rguenther@suse.de>
2643 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2644 (pop_cost_one_pair): Do not free pair.
2645 (pop_best_coalesce): Likewise.
2646 (create_coalesce_list): Initialize obstack.
2647 (delete_coalesce_list): Free obstack.
2648 (find_coalesce_pair): Obstack-allocate coalesce pairs.
2649 (add_cost_one_coalesce): Likewise.
2650 (struct live_track): Remove bitmap pointer indirections.
2651 (new_live_track): Adjust.
2652 (delete_live_track): Likewise.
2653 (live_track_remove_partition): Likewise.
2654 (live_track_add_partition): Likewise.
2655 (live_track_live_p): Likewise.
2656 (live_track_process_def): Likewise.
2657 (live_track_clear_base_vars): Likewise.
2659 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2661 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2662 * configure: Regenerate.
2663 * config.in: Regenerate.
2664 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2665 HAVE_AS_REGISTER_PSEUDO_OP guard.
2666 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2667 !HAVE_AS_REGISTER_PSEUDO_OP support.
2668 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2671 2018-11-02 Richard Biener <rguenther@suse.de>
2673 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2676 2018-11-02 Richard Biener <rguenther@suse.de>
2678 PR tree-optimization/87776
2679 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2680 executable when iterating but running into rpo-vn-max-loop-depth
2681 and not eliding the iteration.
2683 2018-11-30 Jan Hubicka <jh@suse.cz>
2685 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2688 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
2690 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2692 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2693 Combine with rs6000_address_for_fpconvert.
2694 (rs6000_address_for_fpconvert): Combine with
2695 rs6000_force_indexed_or_indirect_mem.
2696 (rs6000_expand_vector_init): Change function call from
2697 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2698 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2699 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2700 (floatsi<mode>2_lfiwax_mem): Ditto.
2701 (floatunssi<mode>2_lfiwzx): Ditto.
2702 (floatunssi<mode>2_lfiwzx_mem): Ditto.
2703 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2704 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2705 (fix_trunc<mode>si2_stfiwx): Ditto.
2706 (fixuns_trunc<mode>si2_stfiwx): Ditto.
2707 (float_<mode>si2_hw): Ditto.
2708 (floatuns_<mode>si2_hw): Ditto.
2709 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2710 (vsx_splat_<mode>): Ditto.
2712 2018-11-01 Joseph Myers <joseph@codesourcery.com>
2714 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2715 at end of assembler input text.
2716 * configure: Regenerate.
2718 2018-11-01 Jakub Jelinek <jakub@redhat.com>
2720 PR tree-optimization/87826
2721 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2722 negative or larger or equal to type's precision.
2724 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
2726 * opts.c (default_options_table): Do not enable
2727 OPT_fdelayed_branch at -Og.
2728 * doc/invoke.texi (-fdelayed-branch): Document it.
2730 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2732 * optabs-libfuncs.c (build_libfunc_function_visibility):
2733 New, split out from...
2734 (build_libfunc_function): ... here.
2735 (init_one_libfunc_visibility): New, split out from ...
2736 (init_one_libfunc): ... here.
2738 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2739 scratch register need not be early-clobber. Document the reason
2740 why we cannot use ST<OP>.
2742 2018-10-31 Joseph Myers <joseph@codesourcery.com>
2745 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
2746 line for second argument of AC_DEFINE_UNQUOTED.
2747 * doc/install.texi (Tools/packages necessary for modifying GCC):
2748 Update to autoconf 2.69 and automake 1.15.1.
2749 * aclocal.m4, config.in, configure: Regenerate.
2751 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
2753 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2756 2018-10-31 Martin Liska <mliska@suse.cz>
2759 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2760 Add new argument invalid_extension.
2761 (aarch64_get_all_extension_candidates): New function.
2762 (aarch64_rewrite_selected_cpu): Add NULL to function call.
2763 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2765 (aarch64_get_all_extension_candidates): New function.
2766 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2767 argument invalid_extension.
2768 (aarch64_parse_cpu): Likewise.
2769 (aarch64_print_hint_for_extensions): New function.
2770 (aarch64_validate_mcpu): Provide hint about invalid extension.
2771 (aarch64_validate_march): Likewise.
2772 (aarch64_handle_attr_arch): Pass new argument.
2773 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2774 (aarch64_handle_attr_isa_flags): Likewise.
2776 2018-10-31 Richard Biener <rguenther@suse.de>
2780 * tree-outof-ssa.c (insert_backedge_copies): Restrict
2781 copy generation to useful cases. Place the copy before
2782 the definition of the backedge value when possible.
2784 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2786 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2787 * config/arc/arc.c (arc_active_insn): New function.
2788 (check_store_cacheline_hazard): Likewise.
2789 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2790 (arc_override_options): Disable delay slot scheduler for older
2792 (arc_store_addr_hazard_p): New implementation, old one renamed to
2794 (arc_store_addr_hazard_internal_p): Renamed.
2795 (arc_reorg): Don't combine into brcc instructions which are part
2796 of hardware hazard solution.
2797 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2798 (tune_arc700): Likewise.
2799 * config/arc/arc.opt (arc7xx): New tune value.
2800 * config/arc/arc700.md: Improve A7 scheduler.
2802 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2804 * config/arc/arc.c (arc_override_options): Remove
2805 TARGET_COMPACT_CASESI.
2806 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2807 (CASE_VECTOR_MODE): Likewise.
2808 (CASE_VECTOR_PC_RELATIVE): Likewise.
2809 (CASE_VECTOR_SHORTEN_MODE): Likewise.
2810 (CASE_VECTOR_SHORTEN_MODE1): Delete.
2811 (ADDR_VEC_ALIGN): Update.
2812 (ASM_OUTPUT_CASE_LABEL): Undefine.
2813 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2814 (TARGET_BI_BIH): Define.
2815 (DEFAULT_BRANCH_INDEX): Likewise.
2816 * config/arc/arc.md (casesi): Rework to accept BI/BIH
2817 instructions, remove compact_casesi use case.
2818 (casesi_compact_jump): Remove.
2819 (casesi_dispatch): New pattern.
2820 * config/arc/arc.opt: Add mbranch-index option. Deprecate
2821 compact_casesi option.
2822 * doc/invoke.texi: Document mbranch-index option.
2824 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2826 * config/arc/arc.c (arc_get_tp): Remove function.
2827 (arc_emit_call_tls_get_addr): Likewise.
2828 (arc_call_tls_get_addr): New function.
2829 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2830 * config/arc/arc.md (tls_load_tp_soft): Remove.
2831 (tls_gd_get_addr): Likewise.
2833 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2835 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2836 (mulsi3_600_lib): Remove pattern.
2837 (umulsi3_highpart_600_lib_le): Likewise.
2838 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2839 (umulsidi3): Remove call to umulsidi3_600_lib.
2840 (umulsidi3_600_lib): Remove pattern.
2841 (peephole2): Remove peephole using the above deprecated patterns.
2843 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2846 * config/arm/arm.c (arm_option_check_internal): Disable the combined
2847 use of -mslow-flash-data and -mword-relocations.
2848 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2849 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2851 * doc/invoke.texi (-mword-relocations): Mention conflict with
2853 (-mslow-flash-data): Reciprocally.
2855 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2857 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2858 16-byte modes held in GP registers to use an even regno.
2860 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2861 (aarch64_atomic_ldop_supported_p): Remove.
2862 (aarch64_gen_atomic_ldop): Remove.
2863 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2864 Fully expand LSE operations here.
2865 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2866 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2867 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2868 and use ATOMIC_LDOP instead; use register_operand for the input;
2869 drop the split and emit insns directly.
2870 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2871 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2872 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2874 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2875 (aarch64_gen_atomic_ldop): Don't call it.
2876 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2877 Use aarch64_reg_or_zero.
2878 (aarch64_atomic_exchange<ALLI>): Likewise.
2879 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2880 operand 0; use aarch64_reg_or_zero for input; merge ...
2881 (@aarch64_atomic_swp<ALLI>): ... this and remove.
2883 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2884 (aarch64_split_compare_and_swap): Use it.
2885 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
2886 test oldval against the proper predicate.
2887 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2888 Use nonmemory_operand for expected.
2889 (cas_short_expected_pred): New.
2890 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2891 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2892 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2893 (aarch64_plushi_operand): New.
2895 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2896 Force oldval into the rval register for TARGET_LSE; emit the compare
2897 during initial expansion so that it may be deleted if unused.
2898 (aarch64_gen_atomic_cas): Remove.
2899 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2900 Change =&r to +r for operand 0; use match_dup for operand 2;
2901 remove is_weak and mod_f operands as unused. Drop the split
2903 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2904 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2905 (@aarch64_atomic_cas<GPI>): Similarly.
2907 2018-10-31 Richard Biener <rguenther@suse.de>
2909 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2912 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2914 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2915 * config/aarch64/aarch64.md: Include saphira.md
2916 * config/aarch64/saphira.md: New file for pipeline description.
2918 2018-10-30 Martin Sebor <msebor@redhat.com>
2921 * gimple-ssa-sprintf.c (format_directive): Use %G to include
2923 (sprintf_dom_walker::compute_format_length):
2924 Avoid setting POSUNDER4K here.
2925 (get_destination_size): Handle null argument values.
2926 (get_user_idx_format): New function.
2927 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2928 functions, including user-defined with attribute format printf.
2929 Use %G to include inlining context.
2930 Set POSUNDER4K here.
2932 2018-10-30 Jan Hubicka <jh@suse.cz>
2934 * params.def (lto-partitions): Bump from 32 to 128.
2936 2018-10-30 Jan Hubicka <jh@suse.cz>
2939 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2941 (free_lang_data_in_type): Forward declare.
2942 (fld_type_variant_equal_p): New function.
2943 (fld_type_variant): New function
2944 (fld_incomplete_types): New hash.
2945 (fld_incomplete_type_of): New function
2946 (fld_simplfied-type): New function.
2947 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2948 (free_lang_data): Allocate and free fld_incomplete_type; update call
2949 of free_lang_data_in_decl.
2951 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
2953 * gcov.c (output_lines): Remove duplicate line.
2955 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2957 * config/rs6000/rs6000.md (bswapdi2): Force address into register
2958 if not in indexed or indirect form.
2959 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2960 (bswapdi2_store): Ditto.
2961 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2963 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2964 Prototype for helper function.
2966 2018-10-30 Martin Sebor <msebor@redhat.com>
2968 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2969 (target, pragma GCC optimize, pragma GCC target): Ditto.
2971 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
2973 * doc/extend.texi: Fix prototype and description of
2974 __builtin_expect_with_probability.
2976 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2978 * cgraph.h (clone_function_name_1): Replaced by new
2979 clone_function_name_numbered that takes name as string; for
2980 privatize_symbol_name_1 use only.
2981 (clone_function_name): Renamed to
2982 clone_function_name_numbered to be explicit about numbering.
2983 (clone_function_name): New two-argument function that does
2984 not number its output.
2985 (clone_function_name): New three-argument function that
2986 takes a number to append to its output.
2987 * cgraphclones.c (duplicate_thunk_for_node):
2988 (clone_function_name_1): Renamed.
2989 (clone_function_name_numbered): Two new functions.
2990 (clone_function_name): Improved documentation.
2991 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2992 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2993 * final.c (final_scan_insn_1): Use the new clone_function_name
2995 * multiple_target.c (create_dispatcher_calls): Ditto.
2996 (create_target_clone): Ditto.
2997 * omp-expand.c (grid_expand_target_grid_body): Ditto.
2998 * omp-low.c (create_omp_child_function_name): Ditto.
2999 * omp-simd-clone.c (simd_clone_create): Ditto.
3000 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
3001 new clone_function_name without numbering.
3003 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
3005 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
3006 Assert that the allocation size is not zero.
3008 2018-10-30 Richard Biener <rguenther@suse.de>
3010 PR tree-optimization/87800
3011 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
3012 non-induction or reduction PHIs.
3014 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
3016 * config/aarch64/falkor-tag-collision-avoidance.c
3017 (execute_tag_collision_avoidance): Call df_note_add_problem.
3019 2018-10-30 Martin Liska <mliska@suse.cz>
3021 * doc/extend.texi: Fix typo in documentation
3022 of __builtin_expect_with_probability.
3024 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3027 * input.c (get_substring_ranges_for_loc): Detect if
3028 linemap_resolve_location gives us a NULL map, and reject
3031 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
3033 * config.gcc (xstormy16-*-elf): Set tm_d_file.
3035 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3036 Martin Sebor <msebor@redhat.com>
3037 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3039 * doc/ux.texi (Quoting): New subsection, adapted from material at
3040 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
3041 MartinSebor and ManuelLopezIbanez.
3042 (Fix-it hints): Note that fix-it hints shouldn't be marked for
3045 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
3048 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
3051 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3053 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
3055 2018-10-29 Paul Koning <ni1d@arrl.net>
3057 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
3059 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3061 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
3062 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
3063 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
3064 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
3065 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
3066 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
3067 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
3068 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
3069 Change 'vector' to '__vector'.
3070 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
3071 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
3072 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
3073 _mm_avg_pu16): Likewise. And, whitespace corrections.
3075 2018-10-29 Richard Biener <rguenther@suse.de>
3077 PR tree-optimization/87785
3078 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
3081 2018-10-29 Olivier Hainque <hainque@adacore.com>
3083 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
3085 2018-10-29 Olivier Hainque <hainque@adacore.com>
3087 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
3088 ports configuration macro, defaults to "gnu".
3089 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
3090 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
3092 2018-10-29 Olivier Hainque <hainque@adacore.com>
3094 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
3096 2018-10-29 Richard Biener <rguenther@suse.de>
3098 PR tree-optimization/87790
3099 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
3100 (vect_make_slp_decision): Adjust.
3101 (vect_slp_analyze_bb_1): Likewise.
3102 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
3105 2018-10-29 Richard Biener <rguenther@suse.de>
3107 PR tree-optimization/87785
3108 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
3110 (vect_build_slp_tree): Likewise.
3111 (vect_gather_slp_loads): New function.
3112 (vect_analyze_slp_instance): Gather loads separately from the
3115 2018-10-29 Martin Liska <mliska@suse.cz>
3117 * Makefile.in: Make dependency to json.o.
3118 * doc/gcov.texi: Document new JSON format, remove
3119 old intermediate format documentation.
3120 * gcov.c (struct function_info): Come up with m_name and
3122 (function_info::function_info): Initialize it.
3123 (function_info::~function_info): Release it.
3124 (main): Rename flag_intermediate_format to flag_json_format.
3125 (print_usage): Describe --json-format.
3126 (process_args): Set flag_json_format.
3127 (output_intermediate_line): Remove.
3128 (output_intermediate_json_line): Likewise.
3129 (get_gcov_intermediate_filename): Return new extension
3131 (output_intermediate_file): Implement JSON emission.
3132 (output_json_intermediate_file): Implement JSON emission.
3133 (generate_results): Use ::get_name for function name.
3134 Handle JSON output file.
3135 (read_graph_file): Use ::get_name instead of cplus_demangle.
3136 (read_count_file): Likewise.
3137 (solve_flow_graph): Likewise.
3138 (add_line_counts): Likewise.
3139 (accumulate_line_counts): Use new flag_json_format.
3140 (output_function_details): Use ::get_name instead of cplus_demangle.
3141 (output_lines): Likewise.
3142 * json.cc (test_writing_literals): Add new tests.
3143 * json.h (class literal): Add new boolean constructor.
3145 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
3147 PR rtl-optimization/87701
3148 PR rtl-optimization/87780
3149 * combine.c (make_more_copies): Rewrite.
3151 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
3153 * doc/generic.texi (ABSU_EXPR): Document.
3154 * match.pd (absu(x)*absu(x) -> x*x): Handle.
3155 (absu(absu(X)) -> absu(X)): Likewise.
3156 (absu(-X) -> absu(X)): Likewise.
3157 (absu(X) where X is nonnegative -> X): Likewise.
3159 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
3161 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
3162 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
3163 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
3164 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
3165 (s-tm-texi): Also check timestamp on d-target.def.
3166 (generated_files): Add TM_D_H and d-target-hooks-def.h.
3167 (build/genhooks.o): Also depend on D_TARGET_DEF.
3168 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
3170 * config/aarch64/aarch64-d.c: New file.
3171 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
3173 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
3175 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
3176 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
3177 * config/arm/arm-d.c: New file.
3178 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
3179 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
3180 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3181 * config/arm/t-arm (arm-d.o): New rule.
3182 * config/default-d.c: New file.
3183 * config/glibc-d.c: New file.
3184 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3185 * config/i386/i386-d.c: New file.
3186 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
3187 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
3188 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3189 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
3190 * config/i386/t-i386 (i386-d.o): New rule.
3191 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3192 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3193 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
3194 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3195 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3196 * config/mips/mips-d.c: New file.
3197 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
3198 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
3199 * config/mips/t-mips (mips-d.o): New rule.
3200 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3201 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3202 * config/powerpcspe/powerpcspe-d.c: New file.
3203 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3205 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3206 Support GNU D by using 0 as the language type.
3207 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
3208 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
3209 * config/riscv/riscv-d.c: New file.
3210 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
3212 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
3213 * config/riscv/t-riscv (riscv-d.o): New rule.
3214 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3215 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3216 * config/rs6000/rs6000-d.c: New file.
3217 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
3219 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3220 Support GNU D by using 0 as the language type.
3221 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
3222 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
3223 * config/s390/s390-d.c: New file.
3224 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
3225 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
3226 * config/s390/t-s390 (s390-d.o): New rule.
3227 * config/sparc/sparc-d.c: New file.
3228 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
3230 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
3231 * config/sparc/t-sparc (sparc-d.o): New rule.
3232 * config/t-glibc (glibc-d.o): New rule.
3233 * configure: Regenerated.
3234 * configure.ac (tm_d_file): New variable.
3235 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
3236 * doc/contrib.texi (Contributors): Add self for the D frontend.
3237 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
3238 * doc/install.texi (Configuration): Mention libphobos as an option for
3239 --enable-shared. Mention d as an option for --enable-languages.
3240 (Testing): Mention check-d as a target.
3241 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3242 name suffixes. Mention d as a -x option.
3243 * doc/sourcebuild.texi (Top Level): Mention libphobos.
3244 * doc/standards.texi (Standards): Add section on D language.
3245 * doc/tm.texi: Regenerated.
3246 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3247 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3248 * dwarf2out.c (is_dlang): New function.
3249 (gen_compile_unit_die): Use DW_LANG_D for D.
3250 (declare_in_namespace): Return module die for D, instead of adding
3251 extra declarations into the namespace.
3252 (gen_namespace_die): Generate DW_TAG_module for D.
3253 (gen_decl_die): Handle CONST_DECLSs for D.
3254 (dwarf2out_decl): Likewise.
3255 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3256 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3257 kinds of aggregates.
3258 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3259 * genhooks.c: Include d/d-target.def.
3261 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
3264 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3265 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3266 (STACK_DYNAMIC_OFFSET): Likewise.
3268 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
3271 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3274 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3276 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3277 return type and other typos.
3279 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3281 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3282 a shorter sequence with fewer branches.
3283 (emit_final_str_compare_gpr): Ditto.
3285 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3287 * config/rs6000/tmmintrin.h: New file.
3288 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3290 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3292 * config/rs6000/mmintrin.h: Enable 32bit compilation.
3293 * config/rs6000/xmmintrin.h: Likewise.
3295 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3297 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3299 2018-10-26 Richard Biener <rguenther@suse.de>
3301 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3303 (vect_mark_slp_stmts_relevant): Likewise.
3304 (vect_detect_hybrid_slp_stmts): Likewise.
3305 (vect_bb_slp_scalar_cost): Likewise.
3306 (vect_remove_slp_scalar_calls): Likewise.
3308 2018-10-26 Jan Hubicka <jh@suse.cz>
3310 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3311 (warn_types_mismatch): Fix walk of DECL_NAME.
3312 (odr_types_equivalent_p): Fix overactive assert.
3314 2018-10-26 Richard Biener <rguenther@suse.de>
3316 PR tree-optimization/87105
3317 * tree-vectorizer.h (_slp_tree::refcnt): New member.
3318 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3320 (vect_create_new_slp_node): Initialize refcnt to one.
3322 (scalar_stmts_set_t, bst_fail): Remove.
3323 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3324 (vect_build_slp_tree): Add bst_map argument and lookup
3325 already created SLP nodes.
3326 (vect_print_slp_tree): Handle a SLP graph, print SLP node
3328 (vect_slp_rearrange_stmts): Handle a SLP graph.
3329 (vect_analyze_slp_instance): Adjust and free SLP nodes from
3330 the CSE map. Fix indenting.
3331 (vect_schedule_slp_instance): Add short-cut.
3333 2018-10-26 Martin Liska <mliska@suse.cz>
3336 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3337 addr_expr and not with pointers.
3339 2018-10-26 Jan Hubicka <jh@suse.cz>
3341 * tree.c (free_lang_data_in_type): Only check main variants.
3342 * ipa-devirt.c (warn_odr): Make static.
3343 (types_same_for_odr): Drop strict variant.
3344 (types_odr_comparable): Likewise.
3345 (odr_or_derived_type_p): Look for main variants.
3346 (odr_name_hasher::equal): Cleanup comment.
3347 (odr_subtypes_equivalent): Add warn and warned arguments; check main
3349 (type_variants_equivalent_p): break out from ...
3350 (odr_types_equivalent): ... here; go for main variants where needed.
3351 (warn_odr): ... here; turn static.
3352 (warn_types_mismatch): Compare mangled names of main variants.
3353 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3354 (type_with_linkage_p): Sanity check that we look at main variant.
3355 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3356 * tree.h (types_same_for_odr): Drop strict argument.
3358 2018-10-26 Richard Biener <rguenther@suse.de>
3360 PR tree-optimization/87746
3361 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3362 Simplify and fix WRT strided store groups with size not
3363 equal to step in element count.
3364 (vect_analyze_group_access_1): Dump the whole group.
3366 2018-10-25 Carl Love <cel@us.ibm.com>
3368 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3369 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3370 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
3371 precicion entry for each overloaded builtin.
3372 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3373 VSCEDPUO): Rename overloaded name.
3374 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3375 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3376 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3377 define_expand for xscmpexqp instruction.
3378 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3380 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3381 Jinsong Ji <jji@us.ibm.com>
3383 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3384 function with vec_sl.
3385 (_mm_slli_epi32): Likewise.
3386 (_mm_slli_epi64): Likewise.
3387 (_mm_srai_epi16): Replace deprecated function with vec_sra.
3388 (_mm_srai_epi32): Likewise.
3389 (_mm_srli_epi16): Replace deprecated function with vec_sr.
3390 (_mm_srli_epi32): Likewise.
3391 (_mm_srli_epi64): Likewise.
3392 (_mm_sll_epi16): Replace deprecated function with vec_sl.
3393 (_mm_sll_epi32): Likewise.
3394 (_mm_sll_epi64): Likewise.
3395 (_mm_sra_epi16): Replace deprecated function with vec_sra.
3396 (_mm_sra_epi32): Likewise.
3397 (_mm_srl_epi16): Replace deprecated function with vec_sr.
3398 (_mm_srl_epi32): Likewise.
3399 (_mm_srl_epi64): Likewise.
3401 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3402 Jinsong Ji <jji@us.ibm.com>
3404 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3405 comparison operators with vec_cmp* for compatibility due to
3406 unfortunate history; clean up formatting and use types more
3408 (_mm_sll_epi32): Likewise.
3409 (_mm_sll_epi64): Likewise.
3410 (_mm_srl_epi16): Likewise.
3411 (_mm_srl_epi32): Likewise.
3412 (_mm_srl_epi64): Likewise.
3414 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3415 Jinsong Ji <jji@us.ibm.com>
3417 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3418 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3419 __vector __bool int. Use vec_cmpgt in preference to deprecated
3420 function vec_vcmpgtfp.
3421 (_mm_max_ps): Likewise.
3423 2018-10-25 Jeff Law <law@redhat.com>
3425 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3428 2018-10-25 Martin Sebor <msebor@redhat.com>
3430 * doc/extend.texi (aligned): Expand attribute description.
3431 (Alignment): Rename section. Discuss function arguments.
3433 2018-10-25 Jan Hubicka <jh@suse.cz>
3435 * ipa-devirt.c (main_odr_variant): Remove.
3436 (hash_odr_name, types_same_for_odr, types_odr_comparable,
3437 odr_name_hasher::equal, odr_subtypes_equivalent_p):
3438 Drop use of main_odr_variant.
3439 (add_type_duplicate): Silence confused warnings on integer types.
3440 (get_odr_type): Always look for main variant.
3441 (register_odr_type): Simplify.
3443 2018-10-25 Richard Biener <rguenther@suse.de>
3445 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3446 Initialize ng to silence error with release checking bootstrap.
3448 2018-10-25 Richard Biener <rguenther@suse.de>
3450 * tree-if-conv.c: Include tree-ssa-sccvn.h.
3451 (tree_if_conversion): Run CSE on the if-converted loop body.
3453 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3455 * config/s390/constraints.md (ZL): New constraint.
3456 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3458 * config/s390/s390.md (movdi_larl): Remove.
3459 (movdi_64): Add the LARL alternative.
3461 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3464 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3465 (RTX_CODE_HWINT_P): New macro.
3466 (rtx_code_size): Use RTX_CODE_HWINT_P ().
3468 2018-10-25 Jan Hubicka <jh@suse.cz>
3470 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3473 2018-10-25 Richard Biener <rguenther@suse.de>
3475 PR tree-optimization/87665
3476 PR tree-optimization/87745
3477 * tree-vectorizer.h (get_earlier_stmt): Remove.
3478 (get_later_stmt): Pick up UID from the original non-pattern stmt.
3480 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
3482 * options.texi (Deprecated): Move list to Var section.
3484 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
3485 Jinsong Ji <jji@us.ibm.com>
3487 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3488 __vector long to __vector long long.
3489 (_mm_cvtpd_ps): Likewise.
3490 (_mm_cvttpd_epi32): Likewise.
3491 (_mm_cvtpi32_pd): Likewise.
3492 (_mm_unpackhi_epi64): Likewise.
3493 (_mm_unpacklo_epi64): Likewise.
3495 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
3497 PR rtl-optimization/87720
3498 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3500 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
3502 * gimple-ssa-isolate-paths.c
3503 (find_implicit_erroneous_behavior): Do not change code if the
3504 pass is running for warnings only.
3505 (find_explicit_erroneous_behavior): Likewise.
3507 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
3509 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3510 Define as rs6000_mangle_decl_assembler_name.
3511 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3512 long double to IEEE long double, switch the names of the long
3513 double built-in functions to be <func>f128 instead of <func>l.
3515 2018-10-24 Martin Sebor <msebor@redhat.com>
3517 * doc/extend.texi (nonnull): List no-argument form. Reference
3518 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3520 2018-10-24 Richard Biener <rguenther@suse.de>
3522 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3524 2018-10-24 Martin Liska <mliska@suse.cz>
3526 PR tree-optimization/84436
3527 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3529 (switch_conversion::contains_linear_function_p): New.
3530 (switch_conversion::build_one_array): Support linear
3531 transformation on input.
3532 * tree-switch-conversion.h (struct switch_conversion): Add
3533 contains_linear_function_p declaration.
3535 2018-10-24 Richard Biener <rguenther@suse.de>
3537 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3538 if its argument is CONSTANT_CLASS_P.
3540 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3542 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3543 it is wrong for forward declarations.
3545 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3547 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3548 SYMBOL_REF_P () check.
3550 2018-10-24 Richard Biener <rguenther@suse.de>
3552 PR tree-optimization/87105
3553 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3554 dump classification.
3555 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3556 stores by splitting the affected group after the fact.
3557 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3558 fail the SLP build because of size constraints.
3560 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3562 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3563 * configure: Regenerate.
3564 * config.in: Regenerate.
3565 * varasm.c (mergeable_string_section): Use readonly_data_section
3566 if linker doesn't support SHF_MERGE with alignment > 8.
3567 (mergeable_constant_section): Likewise.
3569 2018-10-24 Richard Biener <rguenther@suse.de>
3571 PR tree-optimization/84013
3572 * tree-ssa-structalias.c (struct msdi_data): New struct for
3573 marshalling data to walk_stmt_load_store_ops.
3574 (maybe_set_dependence_info): Refactor as callback for
3575 walk_stmt_load_store_ops.
3576 (compute_dependence_clique): Set restrict info on all stmt kinds.
3578 2018-10-24 Martin Liska <mliska@suse.cz>
3580 * cgraph.c (cgraph_node::dump):
3581 Remove reduntant dumps and make tp_first_run dump more compact.
3583 2018-10-24 Richard Biener <rguenther@suse.de>
3585 PR tree-optimization/87665
3586 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3589 2018-10-12 Jeff Law <law@redhat.com>
3591 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3594 2018-10-23 Richard Biener <rguenther@suse.de>
3596 * tree-vrp.c (add_assert_info): Guard dump_printf with
3598 * gimple-ssa-evrp-analyze.c
3599 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3600 Use value_range::ignore_equivs_equal_p.
3602 2018-10-23 Richard Biener <rguenther@suse.de>
3604 PR tree-optimization/87105
3605 PR tree-optimization/87608
3606 * passes.def (pass_all_early_optimizations): Add early phi-opt
3608 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3609 addition to debug stmts.
3610 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3611 and abs replacement early.
3612 * tree-cfg.c (gimple_empty_block_p): Likewise.
3614 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3617 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3618 specified to configure.
3619 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3621 2018-10-23 Richard Biener <rguenther@suse.de>
3623 PR tree-optimization/87700
3624 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3626 2018-10-23 Jakub Jelinek <jakub@redhat.com>
3629 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3630 second argument from __mmask16 to __mmask8.
3631 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3632 _mm_mask_packs_epi32): Likewise.
3633 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3635 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
3637 2018-10-23 Richard Biener <rguenther@suse.de>
3639 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3641 2018-10-23 Richard Biener <rguenther@suse.de>
3643 PR tree-optimization/86144
3644 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3645 over simd attribute.
3647 2018-10-23 Richard Biener <rguenther@suse.de>
3649 PR tree-optimization/87693
3650 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3651 the case we do not find the taken edge.
3653 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
3654 Jinsong Ji <jji@us.ibm.com>
3656 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3657 (_mm_store_pd): Use unaligned vector type for pointer cast.
3658 (_mm_maskmoveu_si128): Likewise.
3659 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3660 (_mm_store_ps): Use unaligned vector type for pointer cast.
3662 2018-10-22 Paul Koning <ni1d@arrl.net>
3664 * symtab.c (symtab_node::increase_alignment): Correct max
3667 2018-10-22 Yury Gribov <tetra2005@gmail.com>
3669 PR tree-optimization/87633
3670 * match.pd: Do not generate unordered integer comparisons.
3672 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3674 PR rtl-optimization/87600
3675 * combine.c: Add include of expr.h.
3676 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3677 register to a pseudo.
3678 (make_more_copies): New function, add a copy to a new pseudo after
3679 the moves from hard registers into pseudos.
3680 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3681 later. Call make_more_copies.
3683 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
3685 * lra-constraints.c (process_alt_operands): New local array,
3686 matching_early_clobber. Check matching_early_clobber before
3687 decrementing reject, and set matching_early_clobber after.
3689 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3692 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3693 call output_addr_const and hope for the best.
3695 2018-10-22 Richard Biener <rguenther@suse.de>
3697 * gimple-ssa-evrp-analyze.c
3698 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3699 smarter about what ranges to use.
3700 * tree-vrp.c (add_assert_info): Dump here.
3701 (register_edge_assert_for_2): Instead of here at multiple but
3704 * gcc.dg/tree-ssa/evrp12.c: New testcase.
3705 * gcc.dg/predict-6.c: Adjust.
3706 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3707 * gcc.dg/tree-ssa/vrp02.c: Likewise.
3708 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3710 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
3711 Richard Biener <rguenther@suse.de>
3713 * bitmap.h: Update data structure documentation, including a
3714 description of bitmap views as either linked-lists or splay trees.
3715 (struct bitmap_element_def): Update comments for splay tree bitmaps.
3716 (struct bitmap_head_def): Likewise.
3717 (bitmap_list_view, bitmap_tree_view): New prototypes.
3718 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3720 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3721 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3722 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3723 released bitmap element here.
3724 (bitmap_element_free): Remove.
3725 (bitmap_elt_clear_from): Work on splay tree bitmaps.
3726 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
3727 this function similar ones such that linked-list bitmap implementation
3728 functions are grouped.
3729 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3730 and moved for grouping.
3731 (bitmap_list_insert_element_after): Renamed from
3732 bitmap_elt_insert_after, and moved for grouping.
3733 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3734 (bitmap_tree_link_left, bitmap_tree_link_right,
3735 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3736 bitmap_tree_link_element, bitmap_tree_unlink_element,
3737 bitmap_tree_find_element): New functions for splay-tree bitmap
3739 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3740 Renamed and moved, see above entries.
3741 (bitmap_tree_listify_from): New function to convert part of a splay
3742 tree bitmap to a linked-list bitmap.
3743 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3744 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3745 (bitmap_find_bit): Remove.
3746 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3747 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3748 Handle splay tree bitmaps.
3749 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3750 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3751 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3752 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3753 bitmap_intersect_compl_p, bitmap_ior_and_compl,
3754 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3755 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
3756 corresponding changes to use linked-list specific bitmap_element
3757 manipulation functions as applicable for efficiency.
3758 (bitmap_tree_to_vec): New function.
3759 (debug_bitmap_elt_file): New function split out from ...
3760 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
3761 (bitmap_print): Likewise.
3763 PR tree-optimization/63155
3764 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3766 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3769 2018-10-22 Martin Liska <mliska@suse.cz>
3771 PR tree-optimization/87686
3773 2018-08-29 Martin Liska <mliska@suse.cz>
3775 * tree-switch-conversion.c (switch_conversion::expand):
3776 Strenghten assumption about gswitch statements.
3778 2018-10-22 Martin Liska <mliska@suse.cz>
3780 * ipa-icf.c (sem_item::compare_attributes): Remove.
3781 (sem_item::compare_referenced_symbol_properties): Use
3782 attribute_list_equal instead.
3783 (sem_function::equals_wpa): Likewise.
3784 * ipa-icf.h: Remove compare_attributes.
3786 2018-10-22 Richard Biener <rguenther@suse.de>
3789 * mem-stats.h (mem_usage::operator==): Fix pasto.
3791 2018-10-22 Richard Biener <rguenther@suse.de>
3793 PR tree-optimization/87640
3794 * tree-vrp.c (set_value_range_with_overflow): Decompose
3796 (extract_range_from_binary_expr_1): Adjust.
3798 2018-10-22 Martin Jambor <mjambor@suse.cz>
3800 * tree-eh.h (stmt_could_throw_p): Add function parameter.
3801 (stmt_can_throw_external): Likewise.
3802 (stmt_can_throw_internal): Likewise.
3803 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3804 (lower_eh_constructs_2): Likewise.
3805 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3806 (stmt_can_throw_external): Likewise.
3807 (stmt_can_throw_internal): Likewise.
3808 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3809 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3810 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3811 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3812 (pass_lower_eh_dispatch::execute): Pass cfun to
3813 stmt_can_throw_external.
3814 (cleanup_empty_eh): Likewise.
3815 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3816 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3817 stmt_can_throw_external instead of pushing it to cfun.
3818 (symbol_table::create_edge): Likewise.
3819 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3820 stmt_can_throw_internal.
3821 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3822 to stmt_could_throw_p.
3823 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3824 stmt_can_throw_internal.
3825 (pass_store_merging::execute): Likewise.
3826 * gimple-ssa-strength-reduction.c
3827 (find_candidates_dom_walker::before_dom_children): Pass cfun to
3829 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3830 stmt_can_throw_internal.
3831 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3832 to stmt_can_throw_external.
3833 (check_stmt): Pass cfun to stmt_could_throw_p.
3834 (check_stmt): Pass cfun to stmt_can_throw_external.
3835 (pass_nothrow::execute): Likewise.
3836 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3837 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3838 stmt_can_throw_internal.
3839 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3840 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3841 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3842 * tree-complex.c (expand_complex_libcall): Pass cfun to
3843 stmt_could_throw_p and to stmt_can_throw_internal.
3844 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3845 * tree-inline.c (copy_edges_for_bb): Likewise.
3846 (maybe_move_debug_stmts_to_successors): Likewise.
3847 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3849 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3850 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3851 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3852 stmt_can_throw_internal.
3853 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3854 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3856 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3857 stmt_can_throw_internal.
3858 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3859 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3861 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3862 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3863 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3864 (convert_mult_to_fma_1): Likewise.
3865 (convert_to_divmod): Likewise.
3866 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3867 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3868 * tree-ssa-propagate.c
3869 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3870 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3871 (maybe_optimize_range_tests): Likewise.
3872 (linearize_expr_tree): Likewise.
3873 (reassociate_bb): Likewise.
3874 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3875 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3876 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3877 (handle_char_store): Likewise.
3878 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3879 stmt_can_throw_internal.
3880 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3882 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3883 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3884 (vectorizable_simd_clone_call): Likewise.
3885 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3886 (gimple_stringop_fixed_value): Likewise.
3888 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
3890 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3891 literal pool references.
3892 (s390_check_qrst_address): Adapt to the new behavior of
3893 s390_loadrelative_operand_p ().
3895 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3898 * config/i386/sse.md (*andnot<mode>3_bcst): New.
3900 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3903 * config/i386/sse.md (*<code><mode>3_bcst): New.
3905 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3908 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3909 V4DI, V16SI and V8DI.
3910 (*sub<mode>3<mask_name>_bcst): New.
3911 (*add<mode>3<mask_name>_bcst): Likewise.
3913 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
3914 Jinsong Ji <jji@us.ibm.com>
3916 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3917 __m64 with __vector unsigned long long for compatibility.
3918 (_mm_movemask_epi8): Likewise.
3919 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3920 (_mm_cvttps_pi32): Likewise.
3921 (_mm_cvtpi32_ps): Likewise.
3922 (_mm_cvtps_pi16): Likewise.
3923 (_mm_loadh_pi): Likewise.
3924 (_mm_storeh_pi): Likewise.
3925 (_mm_movehl_ps): Likewise.
3926 (_mm_movelh_ps): Likewise.
3927 (_mm_loadl_pi): Likewise.
3928 (_mm_storel_pi): Likewise.
3929 (_mm_movemask_ps): Likewise.
3930 (_mm_shuffle_pi16): Likewise.
3932 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3935 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3936 __builtin_ia32_vfnmsubpd512_mask.
3937 (_mm512_mask_fnmsub_round_pd): Likewise.
3938 (_mm512_fnmsub_pd): Likewise.
3939 (_mm512_mask_fnmsub_pd): Likewise.
3940 (_mm512_maskz_fnmsub_round_pd): Use
3941 __builtin_ia32_vfnmsubpd512_maskz.
3942 (_mm512_maskz_fnmsub_pd): Likewise.
3943 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3944 (_mm512_mask_fnmsub_round_ps): Likewise.
3945 (_mm512_fnmsub_ps): Likewise.
3946 (_mm512_mask_fnmsub_ps): Likewise.
3947 (_mm512_maskz_fnmsub_round_ps): Use
3948 __builtin_ia32_vfnmsubps512_maskz.
3949 (_mm512_maskz_fnmsub_ps): Likewise.
3950 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3951 __builtin_ia32_vfnmsubpd256_mask.
3952 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3953 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3954 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3955 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3956 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3957 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3958 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3959 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3960 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3961 __builtin_ia32_vfnmsubpd.
3962 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3963 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3964 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3965 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3966 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3967 * config/i386/i386-builtin.def: Add
3968 __builtin_ia32_vfnmsubpd256_mask,
3969 __builtin_ia32_vfnmsubpd256_maskz,
3970 __builtin_ia32_vfnmsubpd128_mask,
3971 __builtin_ia32_vfnmsubpd128_maskz,
3972 __builtin_ia32_vfnmsubps256_mask,
3973 __builtin_ia32_vfnmsubps256_maskz,
3974 __builtin_ia32_vfnmsubps128_mask,
3975 __builtin_ia32_vfnmsubps128_maskz,
3976 __builtin_ia32_vfnmsubpd512_mask,
3977 __builtin_ia32_vfnmsubpd512_maskz,
3978 __builtin_ia32_vfnmsubps512_mask,
3979 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3980 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3981 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3982 __builtin_ia32_vfnmsubpd256.
3983 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3984 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3985 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3987 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3989 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3991 (fmai_vmfnmsub_<mode><round_name>): Likewise.
3993 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3996 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3997 __builtin_ia32_vfnmaddpd512_mask.
3998 (_mm512_mask_fnmadd_round_pd): Likewise.
3999 (_mm512_fnmadd_pd): Likewise.
4000 (_mm512_mask_fnmadd_pd): Likewise.
4001 (_mm512_maskz_fnmadd_round_pd): Use
4002 __builtin_ia32_vfnmaddpd512_maskz.
4003 (_mm512_maskz_fnmadd_pd): Likewise.
4004 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
4005 (_mm512_mask_fnmadd_round_ps): Likewise.
4006 (_mm512_fnmadd_ps): Likewise.
4007 (_mm512_mask_fnmadd_ps): Likewise.
4008 (_mm512_maskz_fnmadd_round_ps): Use
4009 __builtin_ia32_vfnmaddps512_maskz.
4010 (_mm512_maskz_fnmadd_ps): Likewise.
4011 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
4012 __builtin_ia32_vfnmaddpd256_mask.
4013 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
4014 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
4015 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
4016 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4017 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4018 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
4019 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
4020 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
4021 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
4022 __builtin_ia32_vfnmaddpd.
4023 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
4024 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
4025 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
4026 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
4027 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
4028 * config/i386/i386-builtin.def: Add
4029 __builtin_ia32_vfnmaddpd256_mask,
4030 __builtin_ia32_vfnmaddpd256_maskz,
4031 __builtin_ia32_vfnmaddpd128_mask,
4032 __builtin_ia32_vfnmaddpd128_maskz,
4033 __builtin_ia32_vfnmaddps256_mask,
4034 __builtin_ia32_vfnmaddps256_maskz,
4035 __builtin_ia32_vfnmaddps128_mask,
4036 __builtin_ia32_vfnmaddps128_maskz,
4037 __builtin_ia32_vfnmaddpd512_mask,
4038 __builtin_ia32_vfnmaddpd512_maskz,
4039 __builtin_ia32_vfnmaddps512_mask,
4040 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
4041 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
4042 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
4043 __builtin_ia32_vfnmaddpd256.
4044 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
4045 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
4046 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
4048 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
4050 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
4052 (fmai_vmfnmadd_<mode><round_name>): Likewise.
4054 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4057 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
4058 __builtin_ia32_vfmsubpd512_mask.
4059 (_mm512_mask_fmsub_round_pd): Likewise.
4060 (_mm512_fmsub_pd): Likewise.
4061 (_mm512_mask_fmsub_pd): Likewise.
4062 (_mm512_maskz_fmsub_round_pd): Use
4063 __builtin_ia32_vfmsubpd512_maskz.
4064 (_mm512_maskz_fmsub_pd): Likewise.
4065 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
4066 (_mm512_mask_fmsub_round_ps): Likewise.
4067 (_mm512_fmsub_ps): Likewise.
4068 (_mm512_mask_fmsub_ps): Likewise.
4069 (_mm512_maskz_fmsub_round_ps): Use
4070 __builtin_ia32_vfmsubps512_maskz.
4071 (_mm512_maskz_fmsub_ps): Likewise.
4072 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
4073 __builtin_ia32_vfmsubpd256_mask.
4074 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
4075 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4076 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
4077 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4078 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4079 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
4080 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
4081 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
4082 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
4083 __builtin_ia32_vfmsubpd.
4084 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
4085 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
4086 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
4087 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
4088 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
4089 * config/i386/i386-builtin.def: Add
4090 __builtin_ia32_vfmsubpd256_mask,
4091 __builtin_ia32_vfmsubpd256_maskz,
4092 __builtin_ia32_vfmsubpd128_mask,
4093 __builtin_ia32_vfmsubpd128_maskz,
4094 __builtin_ia32_vfmsubps256_mask,
4095 __builtin_ia32_vfmsubps256_maskz,
4096 __builtin_ia32_vfmsubps128_mask,
4097 __builtin_ia32_vfmsubps128_maskz,
4098 __builtin_ia32_vfmsubpd512_mask,
4099 __builtin_ia32_vfmsubpd512_maskz,
4100 __builtin_ia32_vfmsubps512_mask,
4101 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
4102 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
4103 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
4104 __builtin_ia32_vfmsubpd256.
4105 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
4106 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
4107 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
4109 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
4111 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
4113 (fmai_vmfmsub_<mode><round_name>): Likewise.
4115 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4117 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
4118 Remove plus. Renamed to ...
4119 (*sub<mode>3<mask_name>_bcst): This.
4120 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
4121 (*add<mode>3<mask_name>_bcst): This.
4123 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4126 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
4128 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4131 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
4132 (_mm_or_epi32): Likewise.
4133 (_mm256_xor_epi32): Likewise.
4134 (_mm_xor_epi32): Likewise.
4135 (_mm256_or_epi64): Likewise.
4136 (_mm_or_epi64): Likewise.
4137 (_mm256_xor_epi64): Likewise.
4138 (_mm_xor_epi64): Likewise.
4140 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
4143 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
4145 2018-10-20 Jakub Jelinek <jakub@redhat.com>
4148 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
4150 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
4152 * doc/ux.texi: Move @section directly after @node.
4154 2018-10-19 Jakub Jelinek <jakub@redhat.com>
4158 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
4159 depend closely nested inside of loop with ordered clause with
4162 2018-10-19 David Malcolm <dmalcolm@redhat.com>
4164 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
4165 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
4166 * doc/ux.texi: New file.
4168 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
4170 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
4171 be the first CR field allocated.
4173 2018-10-19 Richard Biener <rguenther@suse.de>
4176 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
4177 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
4179 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4182 * config/i386/sse.md
4183 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
4184 (*add<mode>3<mask_name>_bcst_2): Likewise.
4186 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4188 * config/i386/sse.md
4189 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4190 Replace nonimmediate_operand with register_operand.
4191 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4193 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4196 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
4198 PR rtl-optimization/87596
4199 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
4200 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4201 for instructions in FROM..TO range.
4203 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
4205 * cfgexpand.c (expand_one_var): Use specific wording in error message
4206 for non-local frame variables.
4207 * stor-layout.c (layout_decl): Do not issue a warning for them.
4209 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
4211 * haifa-sched.c (priority): Add force_recompute parameter.
4212 (apply_replacement): Call priority () with force_recompute = true.
4213 (restore_pattern): Likewise.
4215 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4217 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
4218 HOST_BITS_PER_WIDE_INT.
4219 (test_vector_ops_duplicate): Likewise.
4221 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4224 * config/i386/sse.md (VF_AVX512): New.
4225 (avx512bcst): Likewise.
4226 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4228 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4230 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4233 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
4235 * doc/invoke.texi (-dumpversion): Improve grammar.
4236 (-dumpfullversion): Make more consistent with -dumpversion.
4238 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
4240 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4241 Set JUMP_LABEL to the jump insn.
4242 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4243 Predict emitted jump and add label to jump insn.
4245 2018-10-18 David Malcolm <dmalcolm@redhat.com>
4247 PR tree-optimization/87562
4248 * input.c (get_substring_ranges_for_loc): Use
4249 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4250 getting the linemap for the endpoint. Verify that it's either
4251 in the same linemap as the start point's spelling location, or
4252 at least in the same file.
4254 2018-10-18 Richard Biener <rguenther@suse.de>
4256 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4257 feed width-specific load/store costs through ix86_vec_cost.
4258 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4259 (k8_cost): Likewise.
4260 (bdver_cost): Likewise.
4261 (znver1_cost): Likewise.
4262 (btver1_cost): Likewise.
4263 (btver2_cost): Likewise.
4265 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4267 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4268 to simplify subreg of vec_merge.
4270 2018-10-18 Richard Biener <rguenther@suse.de>
4272 * config/i386/i386.c: Fix costing of vector FMA.
4274 2018-10-18 Richard Biener <rguenther@suse.de>
4276 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4278 (ix86_builtin_vectorization_cost): For vec_construct properly
4279 cost insertion into SSE regs.
4280 (...): Adjust calls to ix86_vec_cost.
4282 2018-10-18 Richard Biener <rguenther@suse.de>
4286 2018-02-07 Richard Biener <rguenther@suse.de>
4288 PR tree-optimization/84204
4289 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4292 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4295 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4297 (test_vector_ops_duplicate): Add test for a scalar subreg of a
4298 VEC_MERGE of a VEC_DUPLICATE.
4300 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4302 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4303 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4304 * doc/standards.texi (C Language): Document C2X.
4305 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4306 (rl78_option_override): Handle "GNU C2X" language name.
4308 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4310 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4311 Document C17 as published in 2018.
4313 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
4316 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4317 bail out if both sides do not have the same storage order.
4319 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4321 * bitmap.c (bitmap_head::dump): New.
4322 * bitmap.h (bitmap_head): Add dump().
4323 * gimple-ssa-evrp-analyze.c
4324 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4325 (evrp_range_analyzer::set_ssa_range_info): Same.
4326 (evrp_range_analyzer::record_ranges_from_phis): Same.
4327 (evrp_range_analyzer::record_ranges_from_stmt): Same.
4328 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4329 * gimple-ssa-sprintf.c (get_int_range): Same.
4330 (format_integer): Same.
4331 (sprintf_dom_walker::handle_gimple_call): Same.
4332 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4333 (ipcp_vr_lattice::top_p): Same.
4334 (ipcp_vr_lattice::bottom_p): Same.
4335 (ipcp_vr_lattice::set_to_bottom): Same.
4336 (ipa_vr_operation_and_type_effects): Same.
4337 (propagate_vr_across_jump_function): Same.
4338 (ipcp_store_vr_results): Same.
4339 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4340 (ipa_print_node_jump_functions_for_edge): Same.
4341 (ipa_get_value_range): Same.
4342 (ipa_compute_jump_functions_for_edge): Same.
4343 (ipa_write_jump_function): Same.
4344 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4345 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4347 * vr-values.c (set_value_range_to_nonnegative): Same.
4348 (set_value_range_to_truthvalue): Same.
4349 (vr_values::get_value_range): Same.
4350 (vr_values::set_defs_to_varying): Same.
4351 (vr_values::update_value_range): Same.
4352 (symbolic_range_based_on_p): Same.
4353 (vr_values::op_with_boolean_value_range_p): Same.
4354 (vr_values::extract_range_for_var_from_comparison_expr): Same.
4355 (vr_values::extract_range_from_ssa_name): Same.
4356 (vr_values::extract_range_from_binary_expr): Same.
4357 (vr_values::extract_range_from_unary_expr): Same.
4358 (vr_values::extract_range_from_cond_expr): Same.
4359 (vr_values::extract_range_from_comparison): Same.
4360 (vr_values::check_for_binary_op_overflow): Same.
4361 (vr_values::extract_range_basic): Same.
4362 (vr_values::extract_range_from_assignment): Same.
4363 (compare_ranges): Same.
4364 (compare_range_with_value): Same.
4365 (vr_values::adjust_range_with_scev): Same.
4366 (vrp_valueize): Same.
4367 (vrp_valueize_1): Same.
4368 (vr_values::get_vr_for_comparison): Same.
4369 (vr_values::compare_name_with_value): Same.
4370 (vr_values::compare_names): Same.
4371 (vr_values::vrp_evaluate_conditional): Same.
4372 (find_case_label_ranges): Same.
4373 (vr_values::vrp_visit_switch_stmt): Same.
4374 (vr_values::extract_range_from_phi_node): Same.
4375 (vr_values::simplify_div_or_mod_using_ranges): Same.
4376 (vr_values::simplify_bit_ops_using_ranges): Same.
4377 (test_for_singularity): Same.
4378 (range_fits_type_p): Same.
4379 (vr_values::simplify_cond_using_ranges_1): Same.
4380 (vr_values::simplify_switch_using_ranges): Same.
4381 (vr_values::simplify_float_conversion_using_ranges): Same.
4382 (vr_values::two_valued_val_range_p): Same.
4383 (vr_values::add_equivalence): Move to value_range::equiv_add.
4384 * vr-values.h (vr_values::add_equivalence): Remove.
4385 (VR_INITIALIZER): Remove.
4386 * tree-vrp.c (value_range::set): New.
4387 (value_range::equiv_add): New.
4388 (value_range::value_range): New.
4389 (value_range::deep_copy): New.
4390 (value_range::check): New.
4391 (value_range::equal_p): New.
4392 (value_range::ignore_equivs_equal_p): New.
4393 (value_range::operator==): New.
4394 (value_range::operator!=): New.
4395 (value_range::symbolic_p): New.
4396 (value_range::numeric_p): New.
4397 (value_range::set_undefined): New.
4398 (value_range::set_varying): New.
4399 (value_range::may_contain_p): New.
4400 (value_range::equiv_clear): New.
4401 (value_range::singleton_p): New.
4402 (value_range::intersect): New.
4403 (value_range::dump): New.
4404 (value_range::set_and_canonicalize): New.
4405 (set_value_range): Adjust for value_range API.
4406 (set_value_range_to_undefined): Same.
4407 (set_value_range_to_varying): Same.
4408 (set_and_canonicalize_value_range): Same.
4409 (set_value_range_to_nonnull): Same.
4410 (set_value_range_to_null): Same.
4411 (range_is_null): Same.
4412 (range_is_nonnull): Same.
4413 (range_int_cst_p): Same.
4414 (range_int_cst_singleton_p): Same.
4415 (symbolic_range_p): Same.
4416 (range_includes_zero_p): Same.
4417 (value_range_constant_singleton): Same.
4418 (vrp_set_zero_nonzero_bits): Same.
4419 (ranges_from_anti_range): Same.
4420 (extract_range_into_wide_ints): Same.
4421 (extract_range_from_multiplicative_op): Same.
4422 (set_value_range_with_overflow): Same.
4423 (extract_range_from_binary_expr_1): Same.
4424 (extract_range_from_unary_expr): Same.
4425 (dump_value_range): Same.
4426 (debug_value_range): Same.
4427 (vrp_prop::check_array_ref): Same.
4428 (vrp_prop::check_mem_ref): Same.
4429 (vrp_prop::vrp_initialize): Same.
4430 (vrp_prop::visit_stmt): Same.
4431 (intersect_ranges): Same.
4432 (vrp_prop::visit_phi): Same.
4433 (vrp_prop::vrp_finalize): Same.
4434 (determine_value_range_1): Same.
4435 (determine_value_range): Same.
4436 (vrp_intersect_ranges_1): Rename to...
4437 (vrp_intersect_1): this.
4438 (vrp_intersect_ranges): Rename to...
4439 (value_range::intersect_helper): ...this.
4440 (vrp_meet_1): Rename to...
4441 (value_range::union_helper): ...this.
4442 (vrp_meet): Rename to...
4443 (value_range::union_): ...this.
4444 (copy_value_range): Remove.
4445 * tree-vrp.h (struct value_range): Rewrite into a proper class.
4446 (value_range::vrtype): New.
4447 (value_range::type): New.
4448 (value_range::equiv): New.
4449 (value_range::min): New.
4450 (value_range::max): New.
4451 (value_range::varying_p): New.
4452 (value_range::undefined_p): New.
4453 (value_range::null_p): New.
4454 (value_range::equiv_add): New.
4455 (copy_value_range): Remove.
4457 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4459 * Makefile.in (SELFTEST_TARGETS): New.
4460 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4461 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4462 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4464 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4465 (selftest-c++-gdb, selftest-c++-valgrind): Move to
4467 * configure: Regenerate.
4468 * configure.ac (selftest_languages): New.
4470 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4472 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4473 overflow wraps argument.
4474 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4475 wide_int_range_multiplicative_op.
4476 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4477 overflow wraps argument.
4478 (wide_int_range_multiplicative_op): Same.
4479 (wide_int_range_lshift): Same.
4480 (wide_int_range_div): Same.
4481 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4482 (wide_int_range_lshift): Same.
4483 (wide_int_range_div): Same.
4485 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4487 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4488 use sign as argument.
4489 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4490 wide_int_range_shift_undefined_p.
4492 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4494 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4496 (@despeculate_copy<ALLI_TI:mode>): ... This.
4497 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4500 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4502 * config.gcc: Obsolete *-*-solaris2.10*.
4503 * doc/install.texi (Specific, *-*-solaris2*): Document it.
4505 2018-10-12 Jeff Law <law@redhat.com>
4507 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4508 reg + sym +- const_int addressing modes.
4510 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4512 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4513 * diagnostic-show-locus.c (layout::layout): Apply the minimum
4515 (layout::start_annotation_line): Only print up to 3 of the
4516 margin character, to avoid touching the left-hand side.
4517 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4518 minimum margin width, as set by test_diagnostic_context's ctor.
4519 (selftest::test_fixit_insert_containing_newline): Likewise.
4520 (selftest::test_fixit_insert_containing_newline_2): Likewise.
4521 (selftest::test_line_numbers_multiline_range): Clear
4522 dc.min_margin_width.
4523 * diagnostic.c (diagnostic_initialize): Initialize
4525 * diagnostic.h (struct diagnostic_context): Add field
4527 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4528 * opts.c (common_handle_option): Handle
4529 OPT_fdiagnostics_minimum_margin_width_.
4530 * selftest-diagnostic.c
4531 (selftest::test_diagnostic_context::test_diagnostic_context):
4532 Initialize min_margin_width to 6.
4533 * toplev.c (general_init): Initialize global_dc->min_margin_width.
4535 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4537 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4538 Fix usage of "error_at_rich_loc" in the comment.
4540 2018-10-15 Renlin Li <renlin.li@arm.com>
4543 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4544 if-conversioned loop when it contains ifn with types not
4545 supported by backend.
4546 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4547 (direct_internal_fn_supported_p): New helper function.
4548 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4550 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4553 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4554 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4555 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4557 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4559 PR tree-optimization/87022
4560 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4561 bits in dist vector rather than the first one.
4563 2018-10-15 Richard Biener <rguenther@suse.de>
4566 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4567 (visit_loadstore): When a used restrict tag escaped verify that
4568 the points-to solution of "other" pointers do not include
4570 (compute_dependence_clique): If a used restrict tag escaped
4571 communicated that down to visit_loadstore.
4573 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4575 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4576 into reg if it isn't a general operand.
4578 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4581 * config/i386/sse.md (*vec_dupv2di): Add register source to
4584 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4587 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4588 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4589 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4590 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4592 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4594 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4595 (notice_args_size): Set it in the current trace if no insn that can
4596 throw internally has been seen yet.
4597 (connect_traces): When connecting args_size between traces, allow the
4598 incoming values not to match if there is an insn setting it before the
4599 first insn that can throw internally; in that case, force the creation
4600 of a CFI note on this latter insn.
4602 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4604 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4605 the base class, because using the injected-class-name was not clearly
4606 specified until DR 176.
4608 2018-10-12 Paul Koning <ni1d@arrl.net>
4610 * config/pdp11/pdp11.md (doloop_end): New expander.
4611 (doloop_end_insn): renamed from "doloop_end".
4612 (addqi3): New pattern.
4613 (subqi3): New pattern.
4614 * config/pdp11/predicates.md (incdec_operand): New predicate.
4616 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4619 * real.c (format_helper::can_represent_integral_type_p): New function
4620 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4621 * match.pd: New pattern.
4623 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4625 * configure.ac: Introduce --enable-large-address-aware
4626 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4627 * doc/install.texi: Document it.
4628 * configure, config.in: Rebuilt.
4629 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4630 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4631 (LINK_SPEC): Insert it.
4632 * config/i386/mingw-w64.h: Likewise.
4634 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4636 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
4638 PR rtl-optimization/87600
4639 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4641 2018-10-12 Paul Koning <ni1d@arrl.net>
4643 * doc/md.texi (doloop_end): Document that the pattern code may
4644 need to check operand mode.
4646 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
4648 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4649 to zero-extend between int and floating-point registers.
4650 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4651 ldp into floating-point registers. Add type and arch attributes.
4652 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4653 Use f_loads for type attribute.
4655 2018-10-11 Martin Sebor <msebor@redhat.com>
4657 * doc/extend.texi (attribute packed): Correct typos.
4659 2018-10-11 Martin Sebor <msebor@redhat.com>
4661 * doc/extend.texi (attribute flatten): Mention interaction with
4664 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4667 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4668 Set new_decl virtual flag to zero.
4670 2018-10-11 Martin Sebor <msebor@redhat.com>
4673 * doc/extend.texi (attribute format_arg): Discuss using multiple
4674 attributes on a single function.
4676 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
4678 PR tree-optimization/86829
4679 * match.pd (sin (atan (x))): New simplification rules.
4680 (cos (atan (x))): Likewise.
4681 * real.c (build_sinatan_real): New function.
4682 * real.h (build_sinatan_real): Prototype.
4684 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
4686 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4688 (fold_mergeeo_helper): New helper function.
4689 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4690 intrinsics. Correct some whitespace indentation issues.
4692 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
4695 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4696 Use HOST_WIDE_INT_1U for shift.
4698 2018-10-11 Doug Rupp <rupp@adacore.com>
4699 Olivier Hainque <hainque@adacore.com>
4701 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4702 Pass --relax to the linker for RTPs.
4703 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4705 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
4706 Jan Hubicka <jh@suse.cz>
4707 Martin Jambor <mjambor@suse.cz>
4709 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4710 the same elements are repeated rather than printing all of them.
4711 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4712 "repeated" elements.
4713 * read-rtl-function.c (test_loading_repeat): New function.
4714 (read_rtl_function_c_tests): Call test_loading_repeat.
4715 * rtl-tests.c (test_dumping_repeat): New function.
4716 (rtl_tests_c_tests): Call test_dumping_repeat.
4718 2018-10-11 Richard Biener <rguenther@suse.de>
4720 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4721 bdver?_cost): Unify to ...
4722 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4723 * config/i386/i386.c (processor_cost_table): Adjust.
4725 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
4728 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4729 the thunk when expanding to GIMPLE.
4731 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
4733 * varasm.c (mergeable_string_section): Don't try to move zero-length
4734 strings to the merge section.
4736 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
4739 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4741 2018-10-10 Jakub Jelinek <jakub@redhat.com>
4744 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4745 to special_args set.
4747 2018-10-10 Richard Biener <rguenther@suse.de>
4749 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4750 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4751 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4752 and recursing and pattern terminating the recursion on SSE
4753 vector width using ix86_expand_reduc.
4754 (reduc_sminmax_scal_<mode>): Split into part reducing to half
4755 width and recursing and SSE2 vector variant doing the final
4756 reduction with ix86_expand_reduc.
4757 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4758 with terminating the recursion at AVX level, splitting that
4761 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4763 * genmatch.c (error_cb): Rename to...
4764 (diagnostic_cb): ...this, converting int params to enums.
4765 (fatal_at): Update for renaming.
4766 (warning_at): Likewise.
4768 * input.c (selftest::ebcdic_execution_charset::apply):
4769 Update for renaming of...
4770 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4772 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4773 converting level and reason to enums.
4774 (class selftest::lexer_error_sink): Rename to...
4775 (class selftest::lexer_test_options): ...this, renaming field
4776 "m_errors" to "m_diagnostics".
4777 (selftest::lexer_test_options::apply): Update for renaming of...
4778 (selftest::lexer_test_options::on_error): ...this, renaming to...
4779 (selftest::lexer_test_options::on_diagnostic): ...this
4780 converting level and reason to enums.
4781 (selftest::test_lexer_string_locations_raw_string_unterminated):
4782 Update for renamings.
4783 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4786 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
4788 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4789 * config/rs6000/pmmintrin.h: New file.
4791 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
4793 PR tree-optimization/86659
4794 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4796 2018-10-09 Richard Biener <rguenther@suse.de>
4798 PR tree-optimization/63155
4799 * tree-ssa-structalias.c: Include tree-ssa.h.
4800 (get_constraint_for_ssa_var): For undefs return nothing_id.
4801 (find_func_aliases): Cleanup PHI handling.
4803 2018-10-09 Richard Biener <rguenther@suse.de>
4805 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4808 2018-10-09 Martin Liska <mliska@suse.cz>
4810 * asan.c (asan_emit_stack_protection): If a stack variable
4811 is located in a same file as current function, then emit
4812 line info into variable definition string.
4814 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4816 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4819 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4821 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4824 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4826 PR tree-optimization/86659
4827 * gimple-match.h (struct gimple_match_op): Add reverse field.
4828 (gimple_match_op::set_op): New overloaded method.
4829 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4830 the REF_REVERSE_STORAGE_ORDER flag on the value.
4831 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4832 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4834 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4837 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4838 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4840 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
4843 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4844 Defined with __builtin_ia32_vfmaddsubpd512_mask.
4846 2018-10-08 Richard Biener <rguenther@suse.de>
4848 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4849 cost the same as AVX128 ones.
4851 2018-10-08 Paul Koning <ni1d@arrl.net>
4853 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4854 (expand_block_move): New function.
4855 * config/pdp11/pdp11.c (output_block_move): Remove.
4856 (expand_block_move): New function.
4857 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4858 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4859 (*movmemhi1): Remove.
4861 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
4863 * config/s390/2827.md: Increase latencies for some FP instructions.
4865 2018-10-08 Richard Biener <rguenther@suse.de>
4867 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4869 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4870 * tree-vectorizer.h (dump_stmt_cost): Adjust.
4871 (add_stmt_cost): Dump return value of the hook.
4873 2018-10-08 Richard Biener <rguenther@suse.de>
4875 PR tree-optimization/63155
4876 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4877 (ssa_propagation_engine::ssa_propagate): Remove redundant
4878 bitmap bit clearing.
4880 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
4882 PR rtl-optimization/86939
4883 PR rtl-optimization/87479
4884 * ira.h (non_conflicting_reg_copy_p): New prototype.
4885 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4886 (make_hard_regno_dead): Don't add conflicts for register
4887 ignore_reg_for_conflicts.
4888 (make_object_dead): Likewise.
4889 (non_conflicting_reg_copy_p): New function.
4890 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4891 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4892 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4893 (make_hard_regno_dead): Don't add conflicts for register
4894 ignore_reg_for_conflicts. Remove special conflict handling of
4895 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
4896 check_pic_pseudo_p and update callers.
4897 (mark_pseudo_dead): Don't add conflicts for register
4898 ignore_reg_for_conflicts.
4899 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4901 2018-10-05 Andrew Waterman <andrew@sifive.com>
4902 Jim Wilson <jimw@sifive.com>
4904 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4905 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
4906 new pattern using HONOR_SNANS that emits one extra instruction.
4908 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4910 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4911 patterns): Merge SI and DI patterns to a GPR pattern.
4912 (unnamed define_insn and define_split for record form of that): Merge
4913 to a single define_insn_and_split pattern.
4915 2018-10-05 David Malcolm <dmalcolm@redhat.com>
4918 * input.c (expand_location_to_spelling_point): Add param "aspect"
4919 and use rather than hardcoding LOCATION_ASPECT_CARET.
4920 (get_substring_ranges_for_loc): Handle the case of a single token
4921 within a macro expansion.
4922 * input.h (expand_location_to_spelling_point): Add "aspect" param,
4923 defaulting to LOCATION_ASPECT_CARET.
4925 2018-10-05 Paul Koning <ni1d@arrl.net>
4927 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4928 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4929 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4930 (pdp11_guard_type): New function.
4932 2018-10-05 Paul Koning <ni1d@arrl.net>
4934 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4935 * config/pdp11/pdp11.opt (mfloat32): Remove.
4937 * doc/invoke.texi (pdp11 -mfloat32): Remove:
4938 (pdp11 -mfloat64): Remove.
4940 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4942 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4943 (*cmp<mode>_cc_i387): Ditto.
4944 (*cmpu<mode>_cc_i387): Ditto.
4945 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4946 * config/i386/i386.c (ix86_expand_fp_compare): Remove
4948 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4949 Emit x86_sahf_1 pattern.
4950 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4951 (ix86_expand_carry_flag_compare): Ditto.
4953 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4955 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4956 to reg_or_0_operand. Add "C" constraint.
4957 (*cmpxf_cc_i387): Ditto.
4958 (*cmp<mode>_i387): Change operand 2 predicate
4959 to nonimm_or_0_operand. Add "C" constraint.
4960 (*cmp<mode>_cc_i387): Ditto.
4961 (*cmp<mode>_0_i387): Remove insn pattern.
4962 (*cmp<mode>_0_cc_i387): Ditto.
4964 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4966 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4967 * config/i386/predicates.md (nonimm_or_0_operand): Rename
4968 from vector_move_operand. Update all uses.
4970 2018-10-05 Martin Sebor <msebor@redhat.com>
4972 PR tree-optimization/87490
4973 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4976 2018-10-05 Richard Biener <rguenther@suse.de>
4978 PR tree-optimization/63155
4979 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4980 vertical space in dumpfiles.
4981 * tree-ssa-propagate.h
4982 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4983 * tree-ssa-propagate.c (cfg_blocks_back): New global.
4984 (ssa_edge_worklist_back): Likewise.
4985 (curr_order): Likewise.
4986 (cfg_blocks_get): Remove abstraction.
4987 (cfg_blocks_add): Likewise.
4988 (cfg_blocks_empty_p): Likewise.
4989 (add_ssa_edge): Add to current or next worklist based on
4991 (add_control_edge): Likewise.
4992 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4994 (ssa_propagation_engine::ssa_propagate): ... here. Unify
4995 iteration from CFG and SSA edge worklist so we process
4996 everything in RPO order, prioritizing forward progress
4998 (ssa_prop_init): Allocate new worklists, do not dump
5000 (ssa_prop_fini): Free new worklists.
5002 2018-10-05 Richard Biener <rguenther@suse.de>
5004 * tree-core.h (tree_block::abstract_flag): Remove.
5005 (tree_block::block_num): Make full 32bits.
5006 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
5007 * tree.h (BLOCK_ABSTRACT): Remove.
5008 * dwarf2out.c (gen_lexical_block_die): Remove dead code
5009 resulting from BLOCK_ABSTRACT being always false.
5010 (gen_inlined_subroutine_die): Likewise.
5011 (gen_block_die): Likewise.
5012 * tree.c (block_ultimate_origin): Likewise.
5013 * tree-pretty-print.c (dump_block_node): Remove code dealing
5014 with BLOCK_ABSTRACT.
5015 * tree-ssa-live.c (dump_scope_block): Likewise.
5016 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
5017 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
5019 2018-10-05 Richard Biener <rguenther@suse.de>
5021 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
5022 is asked for initialize mode to the component mode of the
5025 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
5028 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
5029 assembler for -mavx.
5030 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
5032 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
5035 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
5037 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
5038 to be DImode. When using mffscrn, force the operand to a register.
5040 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
5042 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
5043 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
5044 X87MODEF mode iterator.
5045 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
5046 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
5047 X87MODEF mode iterator.
5049 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
5051 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
5052 -Wno-prio-ctor-dtor.
5054 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5056 * Makefile.in (OBJS): Add opt-problem.o.
5057 * dump-context.h: Include "selftest.h.
5058 (selftest::temp_dump_context): New forward decl.
5059 (class dump_context): Make friend of class
5060 selftest::temp_dump_context.
5061 (dump_context::dump_loc_immediate): New decl.
5062 (class dump_pretty_printer): Move here from dumpfile.c.
5063 (class temp_dump_context): Move to namespace selftest.
5064 (temp_dump_context::temp_dump_context): Add param
5065 "forcibly_enable_dumping".
5066 (selftest::verify_dumped_text):
5067 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
5068 (selftest::verify_item):
5069 (ASSERT_IS_TEXT): Move here from dumpfile.c.
5070 (ASSERT_IS_TREE): Likewise.
5071 (ASSERT_IS_GIMPLE): Likewise.
5072 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
5074 (dump_context::dump_loc_immediate): ...this new function.
5075 (class dump_pretty_printer): Move to dump-context.h.
5076 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
5077 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
5078 (temp_dump_context::temp_dump_context): Move to "selftest"
5079 namespace. Add param "forcibly_enable_dumping", and use it to
5080 conditionalize the use of m_pp;
5081 (selftest::verify_dumped_text): Make non-static.
5082 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
5083 (selftest::verify_item): Make non-static.
5084 (ASSERT_IS_TEXT): Move to dump-context.h.
5085 (ASSERT_IS_TREE): Likewise.
5086 (ASSERT_IS_GIMPLE): Likewise.
5087 (selftest::test_capture_of_dump_calls): Pass "true" for new
5088 param of temp_dump_context.
5089 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
5090 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
5092 * opt-problem.cc: New file.
5093 * opt-problem.h: New file.
5094 * optinfo-emit-json.cc
5095 (selftest::test_building_json_from_dump_calls): Pass "true" for
5096 new param of temp_dump_context.
5097 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
5098 (optinfo::emit_for_opt_problem): New function.
5099 (optinfo::emit): Clarity which emit_item is used.
5100 * optinfo.h (optinfo::get_dump_location): New accessor.
5101 (optinfo::emit_for_opt_problem): New decl.
5102 (optinfo::emit): Make const.
5103 * selftest-run-tests.c (selftest::run_tests): Call
5104 selftest::opt_problem_cc_tests.
5105 * selftest.h (selftest::opt_problem_cc_tests): New decl.
5106 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
5107 bool to opt_result, converting fprintf messages to
5108 opt_result::failure_at calls. Add "stmt" param for use by the
5110 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
5111 (runtime_alias_check_p): Convert return type from bool to
5112 opt_result, converting dump_printf calls to
5113 opt_result::failure_at, using the statement DDR_A for their
5115 (find_data_references_in_stmt): Convert return type from bool to
5116 opt_result, converting "return false" to opt_result::failure_at
5118 * tree-data-ref.h: Include "opt-problem.h".
5119 (dr_analyze_innermost): Convert return type from bool to opt_result,
5120 and add a const gimple * param.
5121 (find_data_references_in_stmt): Convert return type from bool to
5123 (runtime_alias_check_p): Likewise.
5124 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
5125 dr_analyze_innermost.
5126 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
5127 Convert return type from bool to opt_result, adding a message for
5128 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
5129 (vect_analyze_data_ref_dependence): Convert return type from bool
5130 to opt_result. Change sense of return type from "false"
5131 effectively meaning "no problems" to "false" meaning a problem,
5132 so that "return false" becomes "return opt_result::success".
5133 Convert "return true" calls to opt_result::failure_at, using
5134 the location of statement A rather than vect_location.
5135 (vect_analyze_data_ref_dependences): Convert return type from bool
5137 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
5138 calls to opt_result::failure_at, using the stmt location rather
5140 (vect_verify_datarefs_alignment): Convert return type from bool
5142 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
5143 into multiple more-tightly-scoped copies.
5144 (vect_analyze_data_refs_alignment): Convert return type from bool
5146 (vect_analyze_data_ref_accesses): Likewise, converting a
5147 "return false" to a "return opt_result::failure_at", adding a
5149 (vect_prune_runtime_alias_test_list): Convert return type from
5150 bool to opt_result, converting dump_printf_loc to
5151 opt_result::failure_at. Add a %G to show the pertinent statement,
5152 and use the stmt's location rather than vect_location.
5153 (vect_find_stmt_data_reference): Convert return type from
5154 bool to opt_result, converting dump_printf_loc to
5155 opt_result::failure_at, using stmt's location.
5156 (vect_analyze_data_refs): Convert return type from bool to
5157 opt_result. Convert "return false" to "return
5158 opt_result::failure_at", adding messages as needed.
5159 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
5160 type from bool to opt_result.
5161 (vect_determine_vf_for_stmt): Likewise.
5162 (vect_determine_vectorization_factor): Likewise, converting
5163 dump_printf_loc to opt_result::failure_at, using location of phi
5164 rather than vect_location.
5165 (vect_analyze_loop_form_1): Convert return type from bool to
5166 opt_result, converting dump_printf_loc calls, retaining the use of
5168 (vect_analyze_loop_form): Convert return type from loop_vec_info
5169 to opt_loop_vec_info.
5170 (vect_analyze_loop_operations): Convert return type from bool to
5171 opt_result, converting dump_printf_loc calls, using the location
5172 of phi/stmt rather than vect_location where available. Convert
5173 various "return false" to "return opt_result::failure_at" with
5174 "unsupported phi" messages.
5175 (vect_get_datarefs_in_loop): Convert return type from bool to
5176 opt_result. Add a message for the
5177 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
5178 (vect_analyze_loop_2): Convert return type from bool to
5179 opt_result. Ensure "ok" is set to a opt_result::failure_at before
5180 each "goto again;", adding new messages where needed.
5181 Add "unsupported grouped {store|load}" messages.
5182 (vect_analyze_loop): Convert return type from loop_vec_info to
5184 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
5186 * tree-vect-stmts.c (process_use): Likewise, converting
5187 dump_printf_loc call and using stmt location, rather than
5189 (vect_mark_stmts_to_be_vectorized): Likeise.
5190 (vect_analyze_stmt): Likewise, adding a %G.
5191 (vect_get_vector_types_for_stmt): Convert return type from bool to
5192 opt_result, converting dump_printf_loc calls and using stmt
5193 location, rather than vect_location.
5194 (vect_get_mask_type_for_stmt): Convert return type from tree to
5195 opt_tree, converting dump_printf_loc calls and using stmt location.
5196 * tree-vectorizer.c: Include "opt-problem.h.
5197 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
5198 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
5199 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
5200 enabled, use it to report at the top level "couldn't vectorize
5201 loop" followed by the problem.
5202 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5203 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5205 (vect_analyze_stmt): Likewise.
5206 (vect_get_vector_types_for_stmt): Likewise.
5207 (tree vect_get_mask_type_for_stmt): Likewise.
5208 (vect_analyze_data_ref_dependences): Likewise.
5209 (vect_enhance_data_refs_alignment): Likewise.
5210 (vect_analyze_data_refs_alignment): Likewise.
5211 (vect_verify_datarefs_alignment): Likewise.
5212 (vect_analyze_data_ref_accesses): Likewise.
5213 (vect_prune_runtime_alias_test_list): Likewise.
5214 (vect_find_stmt_data_reference): Likewise.
5215 (vect_analyze_data_refs): Likewise.
5216 (vect_analyze_loop): Convert return type from loop_vec_info to
5218 (vect_analyze_loop_form): Likewise.
5219 (vect_analyze_slp): Convert return type from bool to opt_result.
5221 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5223 * doc/invoke.texi (-fopt-info): Document new "internals"
5225 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
5226 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
5228 (optinfo_verbosity_options): Add "internals".
5229 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
5230 (dump_context::apply_dump_filter_p): New member function.
5231 (dump_context::dump_loc): Use apply_dump_filter_p rather than
5232 explicitly masking the dump_kind.
5233 (dump_context::begin_scope): Increment the scope depth first. Use
5234 apply_dump_filter_p rather than explicitly masking the dump_kind.
5235 (dump_context::emit_item): Use apply_dump_filter_p rather than
5236 explicitly masking the dump_kind.
5237 (dump_dec): Likewise.
5238 (dump_hex): Likewise.
5239 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
5240 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
5241 (opt_info_switch_p): Update handling of default
5242 MSG_OPTIMIZED_LOCATIONS to cope with default of
5243 MSG_PRIORITY_USER_FACING.
5244 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5245 masking the dump_kind.
5246 (selftest::test_capture_of_dump_calls): Update test_dump_context
5247 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5248 than MSG_ALL. Generalize scope test to be run at all four
5249 combinations of with/without MSG_PRIORITY_USER_FACING and
5250 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5251 for each of the two values.
5252 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5253 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
5254 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5255 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5256 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5257 with MSG_PRIORITY_*.
5258 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5259 dump messages as MSG_PRIORITY_USER_FACING.
5260 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5261 about the interaction with MSG_PRIORITY_*.
5263 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
5265 * varasm.c (output_constant): Add new parameter merge_strings.
5266 Make strings properly zero terminated in merge string sections.
5267 (mergeable_string_section): Don't fail if the last char is non-zero.
5268 (assemble_variable_contents): Handle merge string sections.
5269 (assemble_variable): Likewise.
5270 (assemble_constant_contents): Likewise.
5271 (output_constant_def_contents): Likewise.
5272 (output_constructor_array_range,
5273 output_constructor_regular_field): Adjust call to output_constant.
5274 (output_object_block): Adjust call to assemble_constant_contents
5275 and assemble_variable_contents.
5277 2018-10-04 Martin Liska <mliska@suse.cz>
5280 * cgraphunit.c (process_function_and_variable_attributes):
5281 Warn about a function with alias attribute and a body.
5283 2018-10-04 Martin Liska <mliska@suse.cz>
5286 * multiple_target.c (redirect_to_specific_clone): New function.
5287 (ipa_target_clone): Use it.
5288 * tree-inline.c: Fix comment.
5290 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5292 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5294 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5295 (gcc::dump_manager::register_pass): New member function, adapted
5296 from loop body in gcc::pass_manager::register_pass, adding a
5297 call to update_dfi_for_opt_info.
5298 (gcc::dump_manager::opt_info_enable_passes): Store the
5299 -fopt-info options into the new fields. Move the loop
5301 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5303 * dumpfile.h (struct opt_pass): New forward decl.
5304 (gcc::dump_manager::register_pass): New decl.
5305 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5306 (class gcc::dump_manager): Add fields "m_optgroup_flags",
5307 "m_optinfo_flags", and "m_optinfo_filename".
5308 * passes.c (gcc::pass_manager::register_pass): Move all of the
5309 dump-handling code to gcc::dump_manager::register_pass.
5311 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
5313 PR rtl-optimization/87466
5314 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5315 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5316 * doc/tm.texi: Regenerate.
5317 * ira-lives.c (process_bb_node_lives): Use the new target hook.
5318 * lra-lives.c (process_bb_lives): Likewise.
5319 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5322 2018-10-04 Tamar Christina <tamar.christina@arm.com>
5324 * params.c (add_params): Fix initialization.
5326 2018-10-04 Martin Liska <mliska@suse.cz>
5328 PR gcov-profile/84107
5329 * tree-profile.c (init_ic_make_global_vars):
5330 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5331 Come up with new ic_tuple* variables. Emit
5332 __gcov_indirect_call{,_topn} variables.
5333 (gimple_gen_ic_profiler): Access the variable
5335 (gimple_gen_ic_func_profiler): Access
5336 __gcov_indirect_call.callee field.
5337 (gimple_init_gcov_profiler): Use ptr_type_node.
5338 * value-prof.c (gimple_ic): Use ptr_type_node.
5340 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5342 PR tree-optimization/85787
5343 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5344 malloc_candidate_p into this function and add support for
5345 detecting multiple phis.
5346 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5348 2018-10-04 Martin Liska <mliska@suse.cz>
5351 * ipa-inline.c (inline_to_all_callers_1):
5352 Call ultimate_alias_target for node being inlined.
5354 2018-10-03 Jeff Law <law@redhat.com>
5356 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5358 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5359 * tree.h (get_typenode_from_name): Prototype.
5361 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5363 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5364 Change operand 2 predicate to nonimmediate_operand.
5365 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5367 2018-10-03 Martin Sebor <msebor@redhat.com>
5368 Jeff Law <law@redhat.com>
5370 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5372 (get_string_length): Detect unterminated arrays.
5373 (format_string): Same.
5374 (format_directive): Warn about unterminated arrays.
5375 (handle_gimple_call): Mark statements with no_warning as needed.
5377 2018-10-03 Jim Wilson <jimw@sifive.com>
5379 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5380 also define __riscv_abi_rve. Delete trailing white space.
5382 2018-10-03 Paul Koning <ni1d@arrl.net>
5384 Enable LRA register allocator for PDP11.
5385 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5388 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5389 * config/pdp11/pdp11.opt (-mlra): New option.
5390 * doc/invoke.texi (PDP-11 Options): Document -mlra.
5392 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5394 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5395 (*<absneg:code>extend<mode>xf2): Ditto.
5397 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5399 PR tree-optimization/87415
5400 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5403 2018-10-02 Jeff Law <law@redhat.com>
5405 * gimple-fold.c (get_range_strlen): Only set *nonstr when
5406 an unterminated string is discovered. Bubble up range
5407 even for unterminated strings.
5408 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5409 indicates the string was not terminated via NONSTR.
5411 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5413 * tree-vrp.c (extract_range_from_unary_expr): Special case all
5414 pointer conversions.
5415 Do not do anything special for anti-ranges.
5417 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
5419 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5420 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5422 2018-10-03 Martin Liska <mliska@suse.cz>
5424 PR gcov-profile/86109
5425 * coverage.c (coverage_begin_function): Do not
5426 mark lambdas as artificial.
5427 * tree-core.h (struct GTY): Remove tm_clone_flag
5428 and introduce new lambda_function.
5429 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5431 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5434 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5435 P8_VECTOR and VSX are enabled.
5437 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5439 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5440 0x3907 as CPU model number.
5442 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5444 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5445 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5446 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5447 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5448 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5449 * config/s390/s390.md: Likewise. Rename also the cpu attribute
5450 value from arch12 to z14.
5452 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5454 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5456 (isinf<mode>2): Ditto.
5458 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5460 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5461 before emitting fxam. Perform calculations in XFmode.
5463 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5465 * match.pd (((X /[ex] A) +- B) * A): New transformation.
5467 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5470 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5471 * tree.c (signed_or_unsigned_type_for): Handle complex.
5473 2018-10-02 Jeff Law <law@redhat.com>
5475 * gimple-fold.c (get_range_strlen): Remove dead code.
5477 2018-10-02 Martin Sebor <msebor@redhat.com>
5478 Jeff Law <law@redhat.com>
5480 * builtins.c (unterminated_array): Add new arguments.
5481 If argument is not terminated, bubble up size and exact
5483 (expand_builtin_strnlen): Detect, avoid expanding
5484 and diagnose unterminated arrays.
5485 (c_strlen): Fill in offset of start of unterminated strings.
5486 * builtins.h (unterminated_array): Update prototype.
5488 2018-10-02 Richard Biener <rguenther@suse.de>
5490 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5491 of haddv4df, first reduce to SSE width and exploit the fact
5492 that we only need element zero with the reduction result.
5493 (reduc_plus_scal_v2df): Likewise.
5495 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5497 * dojump.h (do_jump): Delete.
5498 (do_jump_1): Likewise.
5499 (split_comparison): Move around.
5500 * dojump.c (do_jump): Make static.
5501 (do_jump_1): Likewise.
5502 (jumpifnot): Move around.
5503 (jumpifnot_1): Likewise.
5505 (jumpif_1): Likewise.
5506 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5508 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5510 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5511 insns in the delay slot and add_insn_after for the jump insn.
5513 2018-10-02 Richard Biener <rguenther@suse.de>
5515 * tree-inline.c (expand_call_inline): Use the location of
5516 the callee declaration for the inline-entry marker.
5517 * final.c (notice_source_line): Remove special-casing of
5518 NOTE_INSN_INLINE_ENTRY.
5520 2018-10-01 Carl Love <cel@us.ibm.com>
5523 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5524 (__builtin_mtfsb0): New.
5525 (__builtin_mtfsb1): New.
5526 ( __builtin_set_fpscr_rn): New.
5527 (__builtin_set_fpscr_drn): New.
5528 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5529 (rs6000_expand_set_fpscr_rn_builtin): Add.
5530 (rs6000_expand_set_fpscr_drn_builtin): Add.
5531 (rs6000_expand_builtin): Add case statement entries for
5532 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5533 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5534 RS6000_BUILTIN_MFFSL.
5535 (rs6000_init_builtins): Add ftype initialization and def_builtin
5536 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5537 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5538 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5539 rs6000_mffscdrn): Add define_insn.
5540 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5541 * doc/extend.texi: Add documentation for the builtins.
5543 2018-10-01 Richard Biener <rguenther@suse.de>
5545 PR tree-optimization/87465
5546 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5547 causing branch miscounts.
5549 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5551 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5552 aarch64_option_default_param): New.
5553 (params.h): Include.
5554 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5555 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5556 stack-clash protection validation code.
5558 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5560 * params.c (validate_param): New.
5561 (add_params): Use it.
5562 (set_param_value): Refactor param validation into validate_param.
5563 (diagnostic.h): Include.
5564 * diagnostic.h (diagnostic_ready_p): New.
5566 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5568 * params.c (set_param_value):
5569 Add index of parameter being validated.
5570 * common/common-target.def (option_validate_param): New.
5571 * common/common-targhooks.h (default_option_validate_param): New.
5572 * common/common-targhooks.c (default_option_validate_param): New.
5573 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5574 * doc/tm.texi: Regenerate.
5576 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5579 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5580 Add validation for stack-clash parameters and set defaults.
5582 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5585 * configure.ac: Add stack-clash-protection-guard-size.
5586 * doc/install.texi: Document it.
5587 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5588 * params.def: Update comment for guard-size.
5589 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5590 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5591 * configure: Regenerate.
5593 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5596 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5597 STACK_DYNAMIC_OFFSET): New.
5598 * config/aarch64/aarch64.c (aarch64_layout_frame):
5599 Update outgoing args size.
5600 (aarch64_stack_clash_protection_alloca_probe_range,
5601 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5603 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5606 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5608 * target.def (stack_clash_protection_alloca_probe_range): New.
5609 (stack_clash_protection_final_dynamic_probe): Remove.
5610 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5611 (default_stack_clash_protection_final_dynamic_probe): Remove.
5612 * targhooks.c: Likewise.
5613 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5614 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5615 * doc/tm.texi: Regenerate.
5617 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5620 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5621 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5622 aarch64_clamp_to_uimm12_shift): New.
5623 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5624 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5626 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5629 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5631 2018-10-01 Jeff Law <law@redhat.com>
5632 Richard Sandiford <richard.sandiford@linaro.org>
5633 Tamar Christina <tamar.christina@arm.com>
5636 * config/aarch64/aarch64.md
5637 (probe_stack_range): Add k (SP) constraint.
5638 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5639 STACK_CLASH_MAX_UNROLL_PAGES): New.
5640 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5641 stack probes for stack clash.
5642 (aarch64_allocate_and_probe_stack_space): New.
5643 (aarch64_expand_prologue): Use it.
5644 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5645 (aarch64_sub_sp): Add emit_move_imm optional param.
5647 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
5649 PR tree-optimization/87261
5650 * match.pd: Remove trailing whitespace.
5651 Add (x & y) | ~(x | y) -> ~(x ^ y),
5652 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5654 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5656 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5658 (ashlsi3_insn): Update instruction constraints.
5659 (ashrsi3_insn): Likewise.
5660 (rotrsi3): Likewise.
5661 (add_shift): Likewise.
5662 * config/arc/constraints.md (Csz): New 32 bit constraint. It
5663 avoids placing in the limm field small constants which, otherwise,
5664 could end into a small instruction.
5666 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5668 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5669 destination register is not odd-even.
5670 (umaddsidi4_split): Likewise.
5672 2018-10-01 Richard Biener <rguenther@suse.de>
5674 * tree-inline.c (expand_call_inline): Store origin of fn
5675 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5676 * tree.c (block_ultimate_origin): Simplify and do some
5679 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
5681 * config/i386/mmx.md (EMMS): New int iterator.
5682 (emms): New int attribute.
5683 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5684 EMMS int iterator. Explicitly declare clobbers.
5685 (mmx_emms): Remove expander.
5687 * config/i386/predicates.md (emms_operation): Remove predicate.
5688 (vzeroall_pattern): New predicate.
5689 (vzeroupper_pattern): Rename from vzeroupper_operation.
5690 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5691 vzeroupper_pattern and vzeroall_pattern predicates.
5693 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
5695 PR rtl-optimization/86939
5696 * ira-lives.c (make_hard_regno_born): Rename from this...
5697 (make_hard_regno_live): ... to this. Remove update to conflict
5698 information. Update function comment.
5699 (make_hard_regno_dead): Add conflict information update. Update
5701 (make_object_born): Rename from this...
5702 (make_object_live): ... to this. Remove update to conflict information.
5703 Update function comment.
5704 (make_object_dead): Add conflict information update. Update function
5706 (mark_pseudo_regno_live): Call make_object_live.
5707 (mark_pseudo_regno_subword_live): Likewise.
5708 (mark_hard_reg_dead): Update function comment.
5709 (mark_hard_reg_live): Call make_hard_regno_live.
5710 (process_bb_node_lives): Likewise.
5711 * lra-lives.c (make_hard_regno_born): Rename from this...
5712 (make_hard_regno_live): ... to this. Remove update to conflict
5713 information. Remove now uneeded check_pic_pseudo_p argument.
5714 Update function comment.
5715 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5716 to conflict information. Update function comment.
5717 (mark_pseudo_live): Remove update to conflict information. Update
5719 (mark_pseudo_dead): Add conflict information update.
5720 (mark_regno_live): Call make_hard_regno_live.
5721 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5722 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5724 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
5727 * config/i386/i386.c (construct_container): Use TImode for
5728 BLKmode values in 2 integer registers.
5730 2018-09-29 Jeff Law <law@redhat.com>
5732 * builtins.c (unterminated_array): Pass in c_strlen_data * to
5733 c_strlen rather than just a tree *.
5734 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5735 Update recursive calls appropriately. If caller did not provide a
5736 suitable data pointer, create a local one. When a non-terminated
5737 string is discovered, bubble up information about the string via the
5738 c_strlen_data object.
5739 * builtins.h (c_strlen): Update prototype.
5740 (c_strlen_data): New structure.
5741 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5742 For a type 2 call, if c_strlen indicates a non-terminated string
5743 use the length of the non-terminated string.
5744 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5746 2018-09-29 Jakub Jelinek <jakub@redhat.com>
5749 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5750 __m512d type for __A argument rather than __m512.
5752 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
5754 * match.pd (simple_comparison): Don't optimize if either operand is
5755 a function pointer when target needs function pointer canonicalization.
5757 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5759 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5760 power5 .. power9 to remove indirection.
5761 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5762 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5763 ASM_CPU_476_SPEC): Delete.
5764 (ASM_CPU_SPEC): Adjust.
5765 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5766 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5768 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5770 * config.in: Delete HAVE_AS_DCI.
5771 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5772 * config/rs6000/rs6000.h: Ditto.
5773 * configure.ac: Delete HAVE_AS_DCI.
5774 * configure: Regenerate.
5776 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5778 * config.in (HAVE_AS_LWSYNC): Delete.
5779 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5780 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5782 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5783 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5785 * configure.ac: Delete HAVE_AS_LWSYNC.
5786 * configure: Regenerate.
5788 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5789 Pierre-Marie de Rodat <derodat@adacore.com>
5791 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5792 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5793 (cgraph_node::create_thunk): Add indirect_offset parameter.
5794 (thunk_adjust): Likewise.
5795 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5796 and initialize the corresponding field with it.
5797 (cgraph_node::dump): Dump indirect_offset field.
5798 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5799 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5800 (thunk_adjust): Add indirect_offset parameter and deal with it.
5801 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5802 pass it to thunk_adjust. Do not call the target hook if it's non-zero
5803 or if the thunk is external or local. Fix formatting. Do not chain
5804 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
5805 if any, in the GIMPLE representation.
5806 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5807 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5808 (input_node): Read indirect_offset field.
5809 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5810 call to thunk_adjust.
5811 * tree-nested.c (struct nesting_info): Add thunk_p field.
5812 (create_nesting_tree): Set it.
5813 (convert_all_function_calls): Copy static chain from targets to thunks.
5814 (finalize_nesting_tree_1): Return early for thunks.
5815 (unnest_nesting_tree_1): Do not finalize thunks.
5816 (gimplify_all_functions): Do not gimplify thunks.
5818 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5820 * opt-suggestions.c (option_proposer::build_option_suggestions):
5821 Release "option_values".
5823 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5825 * coverage.c (get_coverage_counts): Convert problem-reporting dump
5826 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5827 * dumpfile.c (kind_as_string): New function.
5828 (dump_loc): Rather than a hardcoded prefix of "note: ", use
5829 kind_as_string to vary the prefix based on dump_kind.
5830 (selftest::test_capture_of_dump_calls): Update for above.
5832 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5834 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5835 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
5837 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5839 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5840 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5841 INVALID_REGNUM instead of FPSR_REG.
5842 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5843 * config/i386/i386.md: Update comment of FP compares.
5844 (fldenv): Do not clobber FPSR_REG.
5846 2018-09-28 Richard Biener <rguenther@suse.de>
5848 * tree.h (BLOCK_ORIGIN): New.
5849 * omp-expand.c (grid_expand_target_grid_body): Assign
5850 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5851 * tree-inline.c (remap_block): Likewise.
5852 * auto-profile.c (get_function_decl_from_block): Simplify
5853 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5854 * langhooks.c (lhd_print_error_function): Likewise.
5855 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5857 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5858 * tree.c (block_nonartificial_location): Likewise.
5859 (block_ultimate_origin): Likewise.
5860 * tree-pretty-print.c (percent_K_format): Likewise. Remove
5861 no longer needed LTO case.
5863 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
5864 Jan Hubicka <jh@suse.cz>
5865 Martin Jambor <mjambor@suse.cz>
5867 * simplify-rtx.c (simplify_merge_mask): New function.
5868 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5869 same masks are used in op1 or op2.
5870 (test_vec_merge): New function.
5871 (test_vector_ops): Call test_vec_merge.
5873 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5875 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5876 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5877 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5878 (cypress_costs): Set it.
5879 (supersparc_costs): Likewise.
5880 (hypersparc_costs): Likewise.
5881 (leon_cost): Likewise.
5882 (leon3_costs): Likewise.
5883 (sparclet_costs): Likewise.
5884 (ultrasparc_costs): Likewise.
5885 (ultrasparc_costs): Likewise.
5886 (niagara_costs): Likewise.
5887 (niagara2_costs): Likewise.
5888 (niagara3_costs): Likewise.
5889 (niagara4_costs): Likewise.
5890 (niagara7_costs): Likewise.
5891 (m8_costs): Likewise.
5892 (TARGET_CAN_FOLLOW_JUMP): Define.
5893 (pass_work_around_errata::gate): Minor tweak.
5894 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5895 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5896 Automaitcally clear MASK_FSMULD mask for V7 processors.
5897 (sparc_can_follow_jump): New static function.
5898 (output_ubranch): Deal with CROSSING_JUMP_P.
5899 (sparc_use_sched_lookahead): Rewrite using switch statement.
5900 (sparc_issue_rate): Reorder.
5901 (sparc_branch_cost): New function.
5903 2018-09-27 Martin Sebor <msebor@redhat.com>
5905 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5906 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5907 (int_fits_type_p): Same.
5909 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
5911 * config/i386/i386.md (FPCR_REG): Remove.
5912 (UNSPEC_FLDCW): Remove.
5913 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5914 (x86_fldcw_1): Remove insn pattern.
5915 (fnstenv): Do not clobber FPCR_REG.
5917 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5918 (CALL_USED_REGISTERS): Ditto.
5919 (REG_ALLOC_ORDER): Ditto.
5920 (REG_CLASS_CONTENTS): Ditto.
5921 (HI_REGISTER_NAMES): Ditto.
5922 (ADDITIONAL_REGISTER_NAMES): Use defines instead
5923 of numerical constants.
5924 * config/i386/i386.c (regclass_map): Remove fpsr register.
5925 (dbx_register_map): Ditto.
5926 (dbx64_register_map): Ditto.
5927 (svr4_dbx_register_map): Ditto.
5928 (print_reg): Do not handle FPCR_REG.
5930 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
5933 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5934 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5935 Delete, always treat as true.
5936 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5937 Ditto. Simplify remaining code.
5938 * config/powerpcspe/powerpcspe.h: Ditto.
5939 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5940 Simplify remaining code.
5941 (rs6000_expand_builtin): Ditto.
5942 * config/rs6000/rs6000.h: Ditto.
5943 * configure.ac: Ditto.
5944 * configure: Regenerate.
5946 2018-09-27 Martin Liska <mliska@suse.cz>
5948 * coverage.c (get_coverage_counts): Revert the formatting
5949 of missing profile opt info.
5951 2018-09-27 Richard Biener <rguenther@suse.de>
5955 * dwarf2out.c (set_block_origin_self): Do not mark outermost
5956 block as we do not output that.
5957 (gen_inlined_subroutine_die): Elide the originally outermost
5958 block, matching what we do for concrete instances.
5959 (decls_for_scope): Add parameter specifying whether to recurse
5962 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
5963 Tom de Vries <tom@codesourcery.com>
5967 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5968 STORE_FLAG_VALUE == 1.
5970 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
5972 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5973 constant definitions.
5974 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5975 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5976 ("speculation_barrier"): New expander definition.
5978 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
5980 PR gcov-profile/86957
5981 * common.opt: New warning option -Wmissing-profile.
5982 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5983 * doc/invoke.texi: Document -Wmissing-profile.
5985 2018-09-26 Jim Wilson <jimw@sifive.com>
5987 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5988 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5990 2018-09-26 Martin Sebor <msebor@redhat.com>
5992 * tree.c (zerop): Change return type to bool.
5993 (integer_zerop, integer_onep, integer_each_onep): Same.
5994 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5995 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5996 (real_onep, real_minus_onep, chain_index): Same.
5997 (print_type_hash_statistics, type_list_equal): Same.
5998 * tree.h (zerop): Same.
5999 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
6000 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6001 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6002 (real_onep, real_minus_onep, chain_index): Same.
6003 (print_type_hash_statistics, type_list_equal): Same.
6005 2018-09-26 Jim Wilson <jimw@sifive.com>
6007 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
6009 2018-09-26 Jakub Jelinek <jakub@redhat.com>
6012 * config/i386/i386.c: Include debug.h and dwarf2out.h.
6013 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
6016 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
6018 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
6020 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6022 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
6023 and FP_SECOND_SSE_REGS.
6024 (REG_CLASS_NAMES): Ditto.
6025 (REG_CLASS_CONTENTS): Ditto.
6026 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
6027 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
6028 (ix86_preferred_output_reload_class): Ditto.
6029 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
6030 clobber constraint to "=&f".
6031 (fix_truncdi_i387): Ditto.
6032 (lrintxfdi2): Ditto.
6033 (fistdi2_<rounding>): Ditto.
6034 (fpremxf4_i387): Change "=u" constraint to "=f".
6035 (fprem1xf4_i387): Ditto.
6037 (fptanxf4_i387): Ditto.
6038 (fxtractxf3_i387): Ditto.
6039 (fscalexf4_i387): Ditto.
6040 (atan2xf3): Change "u" constraint to "f".
6041 (fyl2xxf3_i387): Ditto.
6042 (fyl2xp1xf3_i387): Ditto.
6044 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6047 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
6048 for removed I387_MASK_PM entity.
6051 2018-09-26 Jeff Law <law@redhat.com>
6053 2018-09-26 Alexey Neyman <stilor@att.net>
6055 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6056 headers are no longer pulled in by <isl/val.h>.
6058 2018-09-26 Richard Biener <rguenther@suse.de>
6061 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
6062 or concrete instance DIE to the tree. Create abstract origin
6063 attributes also for concrete instances.
6065 2018-09-26 Alexey Neyman <stilor@att.net>
6067 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6068 headers are no longer pulled in by <isl/val.h>.
6070 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
6072 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
6073 Use new helper functions.
6074 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
6075 Use new helper functions.
6076 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
6077 aarch_mm_needs_release): New declarations.
6078 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
6079 aarch_mm_needs_release): New.
6081 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
6083 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
6084 (arm32_output_mi_thunk): Deal with long calls.
6086 2018-09-26 Richard Biener <rguenther@suse.de>
6090 * tree-inline.c (expand_call_inline): When the location
6091 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
6092 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
6093 the inserted BLOCK to make inlined_function_outer_scope_p
6095 * dwarf2out.c (add_call_src_coords_attributes): Do not add
6096 coords for reserved locations.
6098 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6100 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
6101 (*call_indirect_nonlocal_sysv<mode>): Ditto.
6102 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
6103 (*sibcall_nonlocal_sysv<mode>): Ditto.
6104 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
6105 (<bd>_<mode>): Ditto.
6106 (<bd>tf_<mode>): Ditto.
6108 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6110 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
6111 control string as a list of templates instead of as C code.
6112 (*altivec_movti): Ditto.
6113 * config/rs6000/darwin.md (movdf_low_di): Ditto.
6115 2018-09-25 Jim Wilson <jimw@sifive.com>
6117 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
6118 when target symbol is weak.
6120 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6123 * builtins.c (unterminated_array): Simplify.
6124 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
6125 where pointer arithmetic is safe.
6127 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6130 * config/rs6000/altivec.md (altivec_vspltb): Use
6131 const_0_to_15_operand instead of u5bit_cint_operand.
6132 (*altivec_vspltb_internal): Ditto.
6133 (altivec_vspltb_direct): Ditto.
6134 (altivec_vsplth): Use const_0_to_7_operand instead of
6136 (*altivec_vsplth_internal): Ditto.
6137 (altivec_vsplth_direct): Ditto.
6138 (altivec_vspltw): Use const_0_to_3_operand instead of
6140 (*altivec_vspltw_internal): Ditto.
6141 (altivec_vspltw_direct): Ditto.
6142 (altivec_vspltsf): Ditto.
6143 (*altivec_vspltsf_internal): Ditto.
6144 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
6145 various splats with the proper size immediate. Reorder the various
6146 cases by ascending size of immediate, and put all such together.
6148 2018-09-25 Richard Biener <rguenther@suse.de>
6151 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
6153 (maybe_create_die_with_external_ref): Do not create
6154 DW_TAG_imported_unit here.
6155 (add_abstract_origin_attribute): Handle external BLOCK refs.
6156 (dwarf2out_abstract_function): Simplify LTO case.
6157 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
6158 rather than using maybe_create_die_with_external_ref.
6160 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
6163 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
6164 (frndintxf2_mask_pm_i387): Ditto.
6165 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
6166 Enable for !flag_trapping_math.
6167 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
6168 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
6169 Change operand 1 predicate to nonimmediate_operand.
6170 (attr "i387_cw"): Remove mask_pm.
6171 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
6172 (enum ix86_entity): Remove I387_MASK_PM.
6173 * config/i386/i386.c (ix86_i387_mode_needed): Do not
6174 handle I387_MASK_PM.
6175 (ix86_mode_needed): Ditto.
6176 (ix86_mode_after): Ditto.
6177 (ix86_mode_entry): Ditto.
6178 (ix86_mode_exit): Ditto.
6179 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
6181 2018-09-25 Jakub Jelinek <jakub@redhat.com>
6183 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
6184 to_update_switch_stmts to vNULL instead of calling create on them
6187 2018-09-25 Richard Biener <rguenther@suse.de>
6189 PR tree-optimization/87402
6190 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
6191 (visit_phi): Re-instantiate handling of supposed to be VARYING
6192 but non-VARYING backedge value.
6194 2018-09-25 Richard Biener <rguenther@suse.de>
6197 * dwarf2out.c (struct sym_off_pair): New.
6198 (external_die_map): New global.
6199 (lookup_decl_die): When in LTO create DIEs lazily from the
6201 (lookup_block_die): New function, create DIEs lazily in LTO.
6202 (equate_block_to_die): New function.
6203 (dwarf2out_die_ref_for_decl): During WPA get the association
6204 from the external DIE map.
6205 (dwarf2out_register_external_die): Record mapping into the
6207 (maybe_create_die_with_external_ref): New function split out from
6208 DIE generation part of old dwarf2out_register_external_die.
6209 (add_abstract_origin_attribute): Do not return the DIE. When
6210 in LTO reference externals directly.
6211 (dwarf2out_abstract_function): When in LTO ignore calls for
6212 decls with external DIEs (already present abstract instances).
6213 (gen_call_site_die): Adjust.
6214 (add_high_low_attributes): Likewise.
6215 (gen_lexical_block_die): Likewise.
6216 (gen_inlined_subroutine_die): Likewie.
6217 (gen_block_die): Likewise.
6218 (dwarf2out_inline_entry): Likewise.
6219 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
6222 2018-09-25 Martin Liska <mliska@suse.cz>
6224 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
6225 integers and not by a float value.
6227 2018-09-25 Martin Liska <mliska@suse.cz>
6230 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
6232 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
6233 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
6234 * godump.c (go_format_type): Remove extra parenthesis.
6236 2018-09-25 Martin Liska <mliska@suse.cz>
6238 * alias.c (set_dest_equal_p): Remove unused function.
6239 * config/i386/i386.c (def_builtin_pure2): Likewise.
6240 * diagnostic-show-locus.c (class layout): Remove
6242 (layout::layout): Likewise here.
6243 * dump-context.h (class temp_dump_context): Likewise.
6244 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6245 (add_AT_loclistsptr): Likewise.
6246 (add_AT_offset): Likewise.
6247 (get_AT_hi_pc): Likewise.
6248 (is_comdat_die): Likewise.
6249 (type_is_enum): Likewise.
6250 (ceiling): Likewise.
6251 (add_AT_vms_delta): Likewise.
6252 (is_class_die): Likewise.
6253 * edit-context.c (class line_event): Remove unused field.
6254 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6256 * ipa-cp.c (ipa_get_vr_lat): Likewise.
6257 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6258 (ok_for_base_p_nonstrict): Likewise.
6259 * tree-chrec.c (is_not_constant_evolution): Likewise.
6260 (chrec_fold_poly_cst): Likewise.
6261 * tree-if-conv.c (has_pred_critical_p): Likewise.
6262 * tree-ssa-coalesce.c (print_exprs): Likewise.
6263 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6264 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6265 * tree-vrp.c (value_ranges_intersect_p): Likewise.
6266 (value_range_nonnegative_p): Likewise.
6268 2018-09-25 Martin Liska <mliska@suse.cz>
6270 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6271 Do not handle "GNU Pascal".
6272 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6274 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6275 from documentation. Likewise.
6276 * dbxout.c (dbxout_range_type): Likewise.
6277 * doc/cpp.texi: Likewise.
6278 * doc/extend.texi: Likewise.
6279 * doc/frontends.texi: Likewise.
6280 * doc/invoke.texi: Remove Pascal entry.
6281 * tree.def (CLEANUP_POINT_EXPR): Likewise.
6282 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6284 2018-09-25 Martin Liska <mliska@suse.cz>
6287 * doc/invoke.texi: Document all parameters and remove default
6290 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
6293 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6294 contains HOST_WIDE_INTs when computing its size.
6296 2018-09-24 Jim Wilson <jimw@sifive.com>
6299 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6301 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6303 2018-09-24 Andrew Pinski <apinski@marvell.com>
6305 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6306 access prev before checking it for NULLness in the
6307 AARCH64_FUSE_CMP_BRANCH case.
6309 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
6312 * config/i386/i386.c (rest_of_insert_endbranch): Set
6313 endbr_queued_at_entrance to true and don't insert ENDBR if
6314 x86_function_profiler will be called.
6315 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6317 * config/i386/i386.h (machine_function): Add
6318 endbr_queued_at_entrance.
6320 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6322 * genattrtab.c (mk_attr_alt): Use alternative_mask.
6323 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6325 (check_attr_test): Use alternative_mask.
6326 (get_attr_value): Likewise.
6327 (compute_alternative_mask): Use alternative_mask and XWINT.
6328 (make_alternative_compare): Use alternative_mask.
6329 (attr_alt_subset_p): Use XWINT.
6330 (attr_alt_subset_of_compl_p): Likewise.
6331 (attr_alt_intersection): Use alternative_mask and XWINT.
6332 (attr_alt_union): Likewise.
6333 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6334 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6335 (simplify_test_exp): Use alternative_mask and XWINT.
6336 (write_test_expr): Use alternative_mask and XWINT, adjust bit
6337 number calculation to support 64 bits. Generate code that
6338 checks 64-bit masks.
6339 (main): Use alternative_mask.
6340 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6342 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6345 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6346 RETURN+USE when returning via %r14.
6348 2018-09-24 Martin Liska <mliska@suse.cz>
6350 * gcov.c (output_lines): Print colorization legend
6351 for both flag_use_colors and flag_use_hotness_colors.
6354 2018-09-24 Martin Liska <mliska@suse.cz>
6356 * coverage.c (get_coverage_counts): Use warning_at
6357 with current_function_decl location. Use %qD in warning
6360 2018-09-24 Martin Liska <mliska@suse.cz>
6362 * memory-block.h (memory_block_pool::release): Annotate with
6363 valgrind that the memory is not accessible.
6365 2018-09-24 Martin Liska <mliska@suse.cz>
6368 * asan.c: Make asan_handled_variables extern.
6370 * cfgexpand.c (expand_stack_vars): Make sure
6371 a representative is unpoison if another
6372 variable in the partition is handled by
6373 use-after-scope sanitization.
6375 2018-09-24 Richard Biener <rguenther@suse.de>
6377 PR tree-optimization/63155
6378 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6379 the worklist when the edge of the respective argument isn't
6382 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6384 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6385 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6386 (MASK_CLASS_P): Update for rename.
6387 (MAYBE_MASK_CLASS_P): Ditto.
6388 (REG_CLASS_NAMES): Update.
6389 (REG_CLASS_CONTENT): Update.
6390 * config/i386/i386.c (regclass_map): Update for MASK_REG
6391 and ALL_MASK_REGS rename.
6392 * config/i386/constraints.md (Yk): Update for rename.
6395 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6397 * config/i386/i386.h (enum reg_class): Remove
6398 EVEX_SSE_REGS and MOD4_SSE_REGS.
6399 (REG_CLASS_NAMES): Update.
6400 (REG_CLASS_CONTENT): Update.
6401 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6402 registers as ALL_SSE_REGS.
6403 (ix86_additional_allocno_class_p): Remove.
6404 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6405 (ix86_register_priority): Lower priority of EVEX SSE registers.
6406 Use IN_RANGE macro where appropriate.
6407 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6408 AVX-5124VNNIW checks.
6409 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6410 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6411 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6412 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6413 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6414 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6415 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6416 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6417 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6418 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6419 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6420 * config/i386/constraints.md (Yh): Remove.
6422 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6424 * config/i386/i386.c (regclass_map): Declare integer REX registers
6427 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
6429 * doc/service.texi (Service): Switch the fsf.org link to https.
6431 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
6434 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6435 Define to speculation_safe_value_not_needed.
6437 2018-09-21 Florian Weimer <fweimer@redhat.com>
6440 * doc/extend.texi (Common Function Attributes): Mention that
6441 noreturn suppresses tail call optimization.
6443 2018-09-21 Jeff Law <law@redhat.com>
6445 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6446 vr_values::cleanup_edges_and_switches.
6447 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6449 (identify_jump_threads): Remove EDGE_IGNORE handling.
6450 (execute_vrp): Move handling of to_remove_edges and
6451 to_update_switch_stmts into vr_values class member functions.
6452 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6453 (to_update_switch_stmts): Likewise.
6454 * vr-values.c: Include cfghooks.h.
6455 (vr_values::vr_values): Initialize to_remove_edges and
6456 to_update_switch_stmts.
6457 (vr_values::~vr_values): Verify to_remove_edges and
6458 to_update_switch_stmts are empty.
6459 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6460 (vr_values::cleanup_edges_and_switches): New member function.
6461 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6462 function. Add new data members.
6464 2018-09-21 David Malcolm <dmalcolm@redhat.com>
6466 PR tree-optimization/87309
6467 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6468 calls with pflags and alt_flags.
6469 (selftest::test_capture_of_dump_calls): Add test of interaction of
6470 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6472 2018-09-21 Olivier Hainque <hainque@adacore.com>
6474 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6476 2018-09-21 Olivier Hainque <hainque@adacore.com>
6478 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6480 2018-09-21 Olivier Hainque <hainque@adacore.com>
6482 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6483 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6484 (VXWORKS_LIBS_RTP): Minor reordering.
6486 2018-09-21 Olivier Hainque <hainque@adacore.com>
6488 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6489 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6491 2018-09-21 Olivier Hainque <hainque@adacore.com>
6493 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6494 (PTRDIFF_TYPE): Likewise.
6496 2018-09-21 Olivier Hainque <hainque@adacore.com>
6498 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6499 triplet, similar to support for VxWorks7.
6500 * config/vxworks-dummy.h: Provide a default definition
6501 of TARGET_VXWORKS64 to 0.
6503 2018-09-21 Olivier Hainque <hainque@adacore.com>
6505 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6506 * config/vxworks-dummy.h: here.
6508 2018-09-21 Olivier Hainque <hainque@adacore.com>
6510 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6512 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
6513 Bo Zhou <zbo.zhou@hisilicon.com>
6515 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6516 * config/aarch64/aarch64-tune.md: Regenerated.
6517 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6518 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6519 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6521 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
6522 Julian Brown <julian@codesourcery.com>
6524 * builtins.c (get_builtin_sync_mem): Handle address spaces.
6526 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6528 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6529 if the call takes a static chain.
6531 2018-09-21 Martin Liska <mliska@suse.cz>
6533 * auto-profile.c (autofdo_source_profile::read): Do not
6535 (read_profile): Do not add working sets.
6536 (read_autofdo_file): Remove sum_all.
6537 (afdo_callsite_hot_enough_for_early_inline): Remove const
6539 * coverage.c (struct counts_entry): Remove gcov_summary.
6540 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6541 do not support GCOV_TAG_PROGRAM_SUMMARY.
6542 (get_coverage_counts): Remove summary and expected
6544 * coverage.h (get_coverage_counts): Likewise.
6545 * doc/gcov-dump.texi: Remove -w option.
6546 * gcov-dump.c (dump_working_sets): Remove.
6547 (main): Do not support '-w' option.
6548 (print_usage): Likewise.
6549 (tag_summary): Likewise.
6550 * gcov-io.c (gcov_write_summary): Do not dump
6552 (gcov_read_summary): Likewise.
6553 (gcov_histo_index): Remove.
6554 (gcov_histogram_merge): Likewise.
6555 (compute_working_sets): Likewise.
6556 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6558 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6559 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6560 (GCOV_HISTOGRAM_SIZE): Remove.
6561 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6562 (struct gcov_summary): Simplify rapidly just
6563 to runs and sum_max fields.
6564 (gcov_histo_index): Remove.
6565 (NUM_GCOV_WORKING_SETS): Likewise.
6566 (compute_working_sets): Likewise.
6567 * gcov-tool.c (print_overlap_usage_message): Remove
6568 trailing empty line.
6569 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6570 (output_lines): Remove program related line.
6571 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6572 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6574 (input_profile_summary): Do not read it.
6575 (merge_profile_summaries): And do not merge it.
6576 (input_symtab): Do not call removed function.
6577 * modulo-sched.c (sms_schedule): Do not print sum_max.
6578 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6579 removed when histogram method was invented.
6580 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6582 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6584 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6585 and dump selected value.
6586 * profile.c (add_working_set): Remove.
6587 (get_working_sets): Likewise.
6588 (find_working_set): Likewise.
6589 (get_exec_counts): Do not work with working sets.
6590 (read_profile_edge_counts): Do not inform as sum_max is removed.
6591 (compute_branch_probabilities): Likewise.
6592 (compute_value_histograms): Remove argument for call of
6593 get_coverage_counts.
6594 * profile.h: Do not make gcov_summary const.
6596 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6598 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6600 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6602 PR tree-optimization/86990
6603 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6604 Check that the entire merged store group is made of constants only for
6607 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6609 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6610 (VTABLE_VERIFICATION_SPEC): Likewise.
6611 (SANITIZER_EARLY_SPEC): Likewise.
6612 (SANITIZER_SPEC): Likewise.
6613 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6614 * doc/invoke.texi (Link Options): Document -r.
6616 2018-09-20 Richard Biener <rguenther@suse.de>
6619 * gimplify.c (gimplify_expr): Retain alignment of
6620 addressable lvalue in dereference.
6622 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6625 * configure.ac: Check for .loc is_stmt support.
6626 * configure, config.in: Rebuilt.
6627 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6630 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6632 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6633 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6636 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6638 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6640 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6643 2018-09-20 Marek Polacek <polacek@redhat.com>
6645 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6647 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6649 PR tree-optimization/87288
6650 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6651 into account when determining PEELING_FOR_NITERS.
6653 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6655 PR tree-optimization/86877
6656 * tree-vect-loop.c (vect_analyze_loop_2): Call
6657 vect_verify_datarefs_alignment.
6659 2018-09-19 Marek Polacek <polacek@redhat.com>
6661 * doc/invoke.texi: Document -Wclass-conversion.
6663 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
6665 * config/pa/pa.c (pa_adjust_priority): Delete.
6666 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6668 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6669 (atomic_storehi): Likewise.
6670 (atomic_storesi): Likewise.
6671 (atomic_loaddi): Restore compare and swap exchange loop code.
6673 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
6675 PR rtl-optimization/86902
6676 * combine.c (try_combine): When changing the CC mode used, don't change
6677 an unrelated mode in other_insn to that new CC mode.
6679 2018-09-19 David Malcolm <dmalcolm@redhat.com>
6681 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6682 with %T in place of calls to dump_generic_expr.
6683 (prune_runtime_alias_test_list): Likewise.
6684 (create_runtime_alias_checks): Likewise.
6685 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6686 (vect_analyze_data_ref_dependence): Likewise.
6687 (vect_slp_analyze_data_ref_dependence): Likewise.
6688 (vect_record_base_alignment): Likewise. Use %G in place of call
6689 to dump_gimple_stmt.
6690 (vect_compute_data_ref_alignment): Likewise.
6691 (verify_data_ref_alignment): Likewise.
6692 (vect_find_same_alignment_drs): Likewise.
6693 (vect_analyze_group_access_1): Likewise.
6694 (vect_analyze_data_ref_accesses): Likewise.
6695 (dependence_distance_ge_vf): Likewise.
6696 (dump_lower_bound): Likewise.
6697 (vect_prune_runtime_alias_test_list): Likewise.
6698 (vect_find_stmt_data_reference): Likewise.
6699 (vect_analyze_data_refs): Likewise.
6700 (vect_create_addr_base_for_vector_ref): Likewise.
6701 (vect_create_data_ref_ptr): Likewise.
6702 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6703 (vect_can_advance_ivs_p): Likewise.
6704 (vect_update_ivs_after_vectorizer): Likewise.
6705 (vect_gen_prolog_loop_niters): Likewise.
6706 (vect_prepare_for_masked_peels): Likewise.
6707 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6708 (vect_determine_vectorization_factor): Likewise.
6709 (vect_is_simple_iv_evolution): Likewise.
6710 (vect_analyze_scalar_cycles_1): Likewise.
6711 (vect_analyze_loop_operations): Likewise.
6712 (report_vect_op): Likewise.
6713 (vect_is_slp_reduction): Likewise.
6714 (check_reduction_path): Likewise.
6715 (vect_is_simple_reduction): Likewise.
6716 (vect_create_epilog_for_reduction): Likewise.
6717 (vect_finalize_reduction:): Likewise.
6718 (vectorizable_induction): Likewise.
6719 (vect_transform_loop_stmt): Likewise.
6720 (vect_transform_loop): Likewise.
6721 (optimize_mask_stores): Likewise.
6722 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6723 (vect_split_statement): Likewise.
6724 (vect_recog_over_widening_pattern): Likewise.
6725 (vect_recog_average_pattern): Likewise.
6726 (vect_determine_min_output_precision_1): Likewise.
6727 (vect_determine_precisions_from_range): Likewise.
6728 (vect_determine_precisions_from_users): Likewise.
6729 (vect_mark_pattern_stmts): Likewise.
6730 (vect_pattern_recog_1): Likewise.
6731 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6732 (vect_record_max_nunits): Likewise.
6733 (vect_build_slp_tree_1): Likewise.
6734 (vect_build_slp_tree_2): Likewise.
6735 (vect_print_slp_tree): Likewise.
6736 (vect_analyze_slp_instance): Likewise.
6737 (vect_detect_hybrid_slp_stmts): Likewise.
6738 (vect_detect_hybrid_slp_1): Likewise.
6739 (vect_slp_analyze_operations): Likewise.
6740 (vect_slp_analyze_bb_1): Likewise.
6741 (vect_transform_slp_perm_load): Likewise.
6742 (vect_schedule_slp_instance): Likewise.
6743 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6744 (vect_mark_stmts_to_be_vectorized): Likewise.
6745 (vect_init_vector_1): Likewise.
6746 (vect_get_vec_def_for_operand): Likewise.
6747 (vect_finish_stmt_generation_1): Likewise.
6748 (vect_check_load_store_mask): Likewise.
6749 (vectorizable_call): Likewise.
6750 (vectorizable_conversion): Likewise.
6751 (vectorizable_operation): Likewise.
6752 (vectorizable_load): Likewise.
6753 (vect_analyze_stmt): Likewise.
6754 (vect_is_simple_use): Likewise.
6755 (vect_get_vector_types_for_stmt): Likewise.
6756 (vect_get_mask_type_for_stmt): Likewise.
6757 * tree-vectorizer.c (increase_alignment): Likewise.
6759 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
6761 * doc/rtl.texi: Adjust vec_select description.
6762 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6763 non-constant selectors.
6765 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
6767 * config/aarch64/aarch64-protos.h
6768 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6769 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6770 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6771 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6772 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6773 (AARCH64_FL_PROFILE): Move index so flags are ordered.
6774 (AARCH64_ISA_RCPC8_4): New flag.
6775 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6776 to aarch64_offset_9bit_signed_unscaled_p.
6777 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6779 * config/aarch64/constraints.md (Ust): New constraint.
6780 * config/aarch64/predicates.md.
6781 (aarch64_9bit_offset_memory_operand): New predicate.
6782 (aarch64_rcpc_memory_operand): New predicate.
6784 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
6786 PR rtl-optimization/87361
6787 * rtlanal.c (nonzero_bits1): Revert accidental change.
6789 2018-09-19 Richard Biener <rguenther@suse.de>
6791 PR tree-optimization/87349
6792 PR tree-optimization/87342
6793 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6795 2018-09-18 Marek Polacek <polacek@redhat.com>
6797 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6798 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6800 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6802 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6804 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6806 PR rtl-optimization/86882
6807 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6809 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
6811 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6812 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6814 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
6817 * doc/invoke.texi (Link Options): Fix formatting and grammar.
6819 2018-09-18 Richard Biener <rguenther@suse.de>
6822 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6823 (compute_samebase_partition_bases): Likewise.
6824 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6825 (gimple_can_coalesce_p): Simplify.
6827 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
6829 Handle a library implementation of ffs calling __builtin_ffs.
6830 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6831 (mmix_init_libfuncs): New function: make __builtin_ffs expand
6834 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6836 * diagnostic-show-locus.c (class layout_range): Add field
6838 (layout_range::layout_range): Add "original_idx" param and use it
6839 to initialize new field.
6840 (make_range): Use 0 for original_idx.
6841 (layout::layout): Pass in index to calls to
6842 maybe_add_location_range.
6843 (layout::maybe_add_location_range): Add param "original_idx" and
6844 pass it on to layout_range.
6845 (layout::print_any_labels): Pass on range->m_original_idx to
6847 (gcc_rich_location::add_location_if_nearby): Use 0 for
6849 * gcc-rich-location.h (text_range_label::get_text): Update for new
6851 (range_label_for_type_mismatch::get_text): Likewise.
6853 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6855 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6857 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6859 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6860 format_string_diagnostic_t.
6861 (fmtwarn_n): Likewise.
6862 * substring-locations.c
6863 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6864 (format_warning_n_va): Convert to...
6865 (format_string_diagnostic_t::emit_warning_n_va): ...this.
6866 (format_warning_va): Convert to...
6867 (format_string_diagnostic_t::emit_warning_va): ...this.
6868 (format_warning_at_substring): Convert to...
6869 (format_string_diagnostic_t::emit_warning): ...this.
6870 (format_warning_at_substring_n): Convert to...
6871 (format_string_diagnostic_t::emit_warning_n): ...this.
6872 * substring-locations.h (class format_string_diagnostic_t): New
6874 (format_warning_va): Convert to
6875 format_string_diagnostic_t::emit_warning_va.
6876 (format_warning_n_va): Convert to
6877 format_string_diagnostic_t::emit_warning_n_va.
6878 (format_warning_at_substring): Convert to
6879 format_string_diagnostic_t::emit_warning.
6880 (format_warning_at_substring_n): Convert to
6881 format_string_diagnostic_t::emit_warning_n.
6883 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
6884 Bernd Schmidt <bernds_cb1@t-online.de>
6886 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6889 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6891 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6892 operand 0 predicate to nonimmediate operand.
6893 (rint<mode>2_frndint): Remove insn pattern.
6894 (rint<mode>2): Change operand 1 predicate to general_operand.
6895 Extend operand 1 to XFmode and generate rintxf2 insn.
6896 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6897 Do not use X87MODEF mode macro.
6898 (frndintxf2_<rounding>_i387): Rename from
6899 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
6900 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6901 to XFmode and generate significandxf3 insn.
6903 2018-09-17 Richard Biener <rguenther@suse.de>
6905 PR tree-optimization/87328
6906 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6907 visiting unexecutable backedges when not iterating.
6908 (do_rpo_vn): Mark all edges not executable even when not
6911 2018-09-17 Martin Jambor <mjambor@suse.cz>
6914 * doc/invoke.texi (Warning Options): Likewise.
6916 2018-09-17 Richard Biener <rguenther@suse.de>
6918 PR tree-optimization/87301
6919 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6920 clean EH info from leftover copy assignments.
6922 2018-09-17 Martin Liska <mliska@suse.cz>
6924 PR gcov-profile/85871
6925 * gcov.c (output_intermediate_file): Fix out of bounds
6928 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
6930 * config/arc/arc.c: Object attributes for core4 not reflected
6932 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6935 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
6937 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6939 2018-09-17 Martin Liska <mliska@suse.cz>
6941 * doc/gcov.texi: Document new option --use-hotness-colors.
6942 * gcov.c (struct source_info): Declare new field.
6943 (source_info::source_info): Set default for maximum_count.
6944 (print_usage): Add new -q option.
6945 (process_args): Process it.
6946 (accumulate_line_info): Save src->maximum_count.
6947 (output_line_beginning): Make color line number if
6948 flag_use_hotness_colors is set.
6949 (output_line_details): Pass default argument value.
6950 (output_lines): Pass src->maximum_count.
6952 2018-09-17 Martin Liska <mliska@suse.cz>
6954 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6955 Use processor_names table.
6956 * config/i386/i386.c (ix86_default_align): Use
6957 processor_cost_table for alignment values.
6958 (ix86_option_override_internal): Use processor_names.
6959 (ix86_function_specific_print): Likewise.
6960 * config/i386/i386.h (struct processor_costs):
6961 Add alignment values.
6962 (struct ptt): Remove and replace with const char *.
6963 * config/i386/x86-tune-costs.h (struct processor_costs):
6964 Declare default alignments for all costs.
6966 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
6968 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6969 symbolics or VR_VARYING ranges for ABS_EXPR.
6970 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6971 when range will wrap.
6973 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
6976 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6977 before and after a JUMP_TABLE_DATA.
6979 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
6982 * dojump.c (do_compare_and_jump): Canonicalize function pointers
6983 when one operand is a function pointer. Use POINTER_TYPE_P and
6984 FUNC_OR_METHOD_TYPE_P.
6985 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6986 * fold-const.c (build_range_check): Likewise.
6987 * match.pd (simple_comparison): Likewise.
6989 2018-09-14 David Malcolm <dmalcolm@redhat.com>
6992 * spellcheck.c (get_edit_distance_cutoff): New function.
6993 (selftest::test_edit_distance_unit_test_oneway): Rename to...
6994 (selftest::test_get_edit_distance_one_way): ...this.
6995 (selftest::test_get_edit_distance_unit): Rename to...
6996 (selftest::test_get_edit_distance_both_ways): ...this.
6997 (selftest::test_edit_distances): Move tests to this new function,
6998 and test some more pairs of strings. Update for above renaming.
6999 (selftest::get_old_cutoff): New function.
7000 (selftest::test_get_edit_distance_cutoff): New function.
7001 (selftest::assert_suggested_for): New function.
7002 (ASSERT_SUGGESTED_FOR): New macro.
7003 (selftest::assert_not_suggested_for): New function.
7004 (ASSERT_NOT_SUGGESTED_FOR): New macro.
7005 (selftest::test_suggestions): New function.
7006 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
7007 tests to selftest::test_edit_distances and call it. Add calls to
7008 selftest::test_get_edit_distance_cutoff and
7009 selftest::test_suggestions.
7010 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
7011 (best_match::consider): Replace hard-coded cutoff calculation with
7013 (best_match::get_cutoff): New declaration.
7014 (best_match::get_best_meaningful_candidate): Likewise.
7016 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7018 * builtins.c (fold_builtin_strlen): Remove TODO comment.
7020 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7023 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7025 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7026 terminated string literal.
7028 2018-09-14 Martin Sebor <msebor@redhat.com>
7030 * builtins.c (unterminated_array): Handle ARRAY_REF.
7031 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
7032 * builtins.h (unterminated_array): Declare extern.
7033 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
7035 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
7038 2018-09-14 Martin Sebor <msebor@redhat.com>
7039 Jeff Law <law@redhat.com>
7041 * builtins.c (unterminated_array): New.
7042 (expand_builtin_strcpy): Adjust.
7043 (expand_builtin_strcpy_args): Detect unterminated arrays.
7044 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
7045 unterminated arrays.
7046 * gimple-fold.h (get_maxval_strlen): Add argument.
7047 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
7049 * gimple-fold.c (get_range_strlen): Add argument.
7050 (get_maxval_strlen): Adjust.
7051 * gimple-fold.h (get_range_strlen): Add argument.
7053 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
7055 * config/i386/movdirintrin.h: Fix copyright year.
7057 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
7059 * reg-stack.c: Include regs.h.
7060 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
7061 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
7062 FIRST_STACK_REG, not DFmode.
7063 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
7064 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
7065 (change stack): Default register mode to the reg_raw_mode of
7066 FIRST_STACK_REG, not DFmode.
7067 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
7068 (*swapxf): Rename from swapxf.
7070 2018-09-14 Carl Love <cel@us.ibm.com>
7072 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
7073 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
7075 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
7078 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
7081 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
7084 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
7086 2018-09-14 Jason Merrill <jason@redhat.com>
7088 Fix --enable-gather-detailed-mem-stats.
7089 * hash-table.c (hash_table_usage): Change from variable to function.
7090 * hash-table.h: Adjust.
7091 * Makefile.in: Add missing dependencies on hash-table.h.
7093 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7095 PR tree-optimization/87259
7097 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
7098 execute_cse_reciprocals_1 has tried transforming.
7100 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
7102 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
7103 VR_VARYING for PLUS/MINUS_EXPR.
7105 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
7107 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
7110 2018-09-14 Richard Biener <rguenther@suse.de>
7113 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
7114 bits for the merged partition.
7116 2018-09-13 Martin Sebor <msebor@redhat.com>
7117 Bernd Edlinger <bernd.edlinger@hotmail.de>
7119 * builtins.h (c_srlen): Add argument.
7120 * builtins.c (warn_string_no_nul): New function.
7121 (c_strlen): Add argument and use it. Update recursive calls.
7122 Pass DECL argument to string_constant to get info on non
7123 terminated strings. Update *NONSTR as needed.
7124 (fold_builtin_strlen): Add argument to calls to c_strlen.
7125 Warn for unterminated arrays.
7126 (warn_string_no_null): Add prototype.
7127 * expr.c (string_constant): Update arguments. Update recursive
7128 calls appropriately. Detect missing NUL terminator and outermost
7129 declaration its missing in.
7130 Improve checks for arrays with nonzero lower bound or elements
7131 that are not a single byte. Simplify offset computation.
7132 Simplify checks for non-NUL terminated strings.
7133 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
7134 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
7136 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
7138 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
7140 * fold-const.c (c_getstr): Fix function comment. Remove unused third
7141 argument. Fix range checks.
7142 * fold-const.h (c_getstr): Adjust protoype.
7143 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
7144 string is constant but contains no NUL byte.
7146 * expr.c (string_constant): Adjust function comment.
7147 Remove bogus check for zero termination.
7149 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
7151 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
7152 (get_constant_size): Don't make STRING_CSTs larger than they are.
7153 (check_string_literal): New check function for STRING_CSTs.
7154 (output_constant): Use it.
7156 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
7159 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
7161 2018-09-13 Richard Biener <rguenther@suse.de>
7163 PR tree-optimization/87263
7164 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
7165 (struct unwind_state): Add max_rpo field.
7166 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
7167 Compute max_rpo, the max RPO number a block can be backwards reached
7168 from. Re-write non-iterating mode to a RPO ordered worklist approach,
7169 separating it from the iterating mode.
7171 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7173 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
7174 (rfs_decision): New scheduling decision.
7176 2018-09-13 Richard Biener <rguenther@suse.de>
7179 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
7180 (vn_nary_op_insert_pieces_predicated): Do not write useless
7181 valid_dominated_by_p entry outside of the allocated storage.
7183 2018-09-13 Omar Sandoval <osandov@osandov.com>
7184 Tom de Vries <tdevries@suse.de>
7187 * dwarf2out.c (is_c): New function.
7188 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
7190 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
7193 * config/aarch64/aarch64.md (*aarch64_bfxil):
7195 * config/aarch64/constraints.md (Ulc): Define.
7196 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
7198 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7201 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7203 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7204 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7205 aarch64_layout_frame call.
7206 (aarch64_expand_epilogue): Likewise.
7207 (aarch64_initial_elimination_offset): Likewise.
7208 (aarch64_get_separate_components): Likewise.
7209 (aarch64_use_return_insn_p): Likewise.
7210 (aarch64_layout_frame): Remove unneeded check.
7212 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7214 * configure.ac: Only append
7215 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
7216 gcc_config_arguments if it was never reconfigured or last reconfigure
7217 was with different arguments.
7218 * configure: Regenerated.
7220 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7221 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7224 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
7225 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
7227 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7229 PR tree-optimization/87287
7230 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
7231 X % C == 0 to X % (unsigned) C == 0 optimization to ...
7232 * match.pd (X % C == 0): ... here. New optimization.
7234 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7237 * expr.h (maybe_optimize_mod_cmp): Declare.
7238 * expr.c (mod_inv): New function.
7239 (maybe_optimize_mod_cmp): New function.
7240 (do_store_flag): Use it.
7241 * cfgexpand.c (expand_gimple_cond): Likewise.
7243 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
7244 Julian Brown <julian@codesourcery.com>
7247 * gimplify.c (gimplify_scan_omp_clauses): Set
7248 target_firstprivatize_array_bases in OpenACC parallel and kernels
7249 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7250 OpenACC data regions.
7252 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
7254 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7255 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7257 2018-09-12 Richard Biener <rguenther@suse.de>
7259 PR tree-optimization/87280
7260 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7261 edge but unreachable target.
7262 (do_rpo_vn): For conservatively handling a PHI only mark
7263 the backedge executable but not the block reachable.
7265 2018-09-12 Richard Biener <rguenther@suse.de>
7267 PR tree-optimization/87266
7268 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7271 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
7273 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7275 ("trunc<BFP:mode><DFP_ALL:mode>2")
7276 ("trunc<DFP_ALL:mode><BFP:mode>2")
7277 ("extend<BFP:mode><DFP_ALL:mode>2")
7278 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7279 according to the target operand type.
7281 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7282 Andreas Krebbel <krebbel@linux.ibm.com>
7284 PR tree-optimization/86844
7285 * gimple-ssa-store-merging.c
7286 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7287 there are any overlapping stores in between them, make sure they are
7288 also coalesced or we give up completely.
7290 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7293 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7294 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
7296 2018-09-12 Tom de Vries <tdevries@suse.de>
7298 * common.opt (gdescribe-dies): Add option.
7299 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7300 attribute for artifical and nameless decls.
7301 (dwarf2out_register_external_die): Add description attribute to
7302 external reference die.
7303 (add_desc_attribute): New functions.
7304 (gen_subprogram_die): Add description attribute to
7305 DW_TAG_call_site_parameter.
7306 * tree-pretty-print.c (print_generic_expr_to_str): New function.
7307 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7308 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7310 (@item -gdescribe-dies): Add.
7312 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7314 * tree-vrp.c (vrp_shift_undefined_p): Remove.
7315 (extract_range_from_binary_expr_1: Call
7316 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7317 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7320 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7322 * gimple-ssa-warn-alloca.c
7323 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7324 field for ALLOCA_BOUND_*_LARGE.
7326 2018-09-11 Nathan Sidwell <nathan@acm.org>
7328 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7330 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7332 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7333 for clobbers. Remove obsolete comment.
7335 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7337 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7338 mpxchk, mpxld and mpxst types.
7339 (define_attr length_immediate): Remove all processing of mpx types.
7340 (define_attr prefix_0f): Ditto.
7341 (define_attr memory): Ditto.
7343 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7345 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7346 (log<mode>2): Change operand 1 predicate to general_operand.
7347 Extend operand 1 to XFmode and generate logxf3 insn.
7348 (log10<mode>2): Change operand 1 predicate to general_operand.
7349 Extend operand 1 to XFmode and generate log10xf3 insn.
7350 (log2<mode>2): Change operand 1 predicate to general_operand.
7351 Extend operand 1 to XFmode and generate log2xf3 insn.
7352 (fyl2xp1_extend<mode>xf3_i387): Remove.
7353 (log1p<mode>2): Change operand 1 predicate to general_operand.
7354 Extend operand 1 to XFmode and generate log1pxf3 insn.
7355 (fxtract_extend<mode>xf3_i387): Remove.
7356 (logb<mode>2): Change operand 1 predicate to general_operand.
7357 Extend operand 1 to XFmode and generate logbxf3 insn.
7358 (ilogb<mode>2): Change operand 1 predicate to general_operand.
7359 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7360 (significand<mode>2): Change operand 1 predicate to general_operand.
7361 Extend operand 1 to XFmode and generate significandxf3 insn.
7363 2018-09-11 Nathan Sidwell <nathan@acm.org>
7365 * gcc.c (perror_with_name, pfatal_with_name): Delete.
7366 (load_specs): Use fatal_error.
7367 (DELETE_IF_ORDINARY, process_command): Use error.
7368 (execute, run_attempt): Use fatal_error.
7370 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
7372 * diagnostic-core.h (sorry_at): New prototype.
7373 * diagnostic.c (sorry_at): New function.
7375 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
7377 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7378 by zero as VR_UNDEFINED.
7380 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7382 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7383 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7384 (<sincos>mode2): New expander.
7385 (sincos_extend<mode>xf3_i387): Remove insn pattern.
7386 (sincos -> sin, cos splitters): Remove splitter patterns.
7387 (sincos<mode>3): Change operand 2 predicate to general_operand.
7388 Extend operand 2 to XFmode and generate sincosxf3 insn.
7389 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7390 Change operand 3 predicate to const1_operand.
7391 (fptan_extend<mode>xf4_i387): Remove insn pattern.
7392 (tanxf2): Update operands in the call to fptanxf4_i387.
7393 (tan<mode>2): Change operand 1 predicate to general_operand.
7394 Extend operand 1 to XFmode and generate tanxf3 insn.
7395 (atan2xf3): Rename from *fpatanxf3_i387.
7396 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7397 (atan2xf3): Remove expander.
7398 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
7399 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7400 (atan<mode>2): Change operand 1 predicate to general_operand.
7401 Extend operand 1 to XFmode and generate atanxf3 insn.
7403 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7405 * config/i386/i386.md (x87/SSE constant load splitter): Use
7406 memory_operand instead of nonimmediate_operand for input operand
7409 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
7411 * config/i386/i386.md (float partial SSE register stall splitter): Move
7412 splitter near its instruction pattern.
7413 (float_extend partial SSE register stall splitter): Ditto.
7414 (float_truncate partial SSE register stall splitter): Ditto.
7416 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
7419 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7420 to speculation_safe_value_not_needed.
7423 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7424 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7425 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7426 leaf_function_p, instead use has_hard_reg_initial_val.
7428 2018-09-09 Nathan Sidwell <nathan@acm.org>
7430 * gcc.h (pfatal_with_name): Don't declare here.
7431 * gcc.c (pfatal_with_name): Make static.
7433 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
7435 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7438 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
7440 PR rtl-optimization/85458
7441 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7442 priority hook to reduce the priority of EXPR.
7444 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
7446 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7447 DImode for x87 on 32bit targets. Conditionally disable x87 modes
7448 with X87_ENABLE_FLOAT. Remove preparation code.
7449 (*float<SWI48:mode><MODEF:mode>2): Rename from
7450 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
7451 math using "enabled" attribute.
7452 (*floatdi<MODEF:mode>2_i387): Rename from
7453 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
7454 enable for 32bit targets only.
7455 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7457 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7458 as operand 1 predicate. Rewrite as define_insn_and_split.
7459 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7461 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7463 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7464 to fallthru to FLOAT case.
7466 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7469 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7470 around folding of vec_sl to handle out of range shift values.
7472 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7474 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7475 Update callers to gen_fix_trunc<mode>_i387_fisttp
7476 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7477 nonimmediate_operand.
7478 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7479 and corresponding splitters.
7480 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7481 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7482 (fix_truncdi_i387_with_temp): Remove insn pattern
7483 and corresponding splitters.
7484 (fix_trunc<mode>_i387): Change operand 0 predicate to
7485 nonimmediate_operand.
7486 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7487 and corresponding splitters.
7488 (*fistdi2_1): Remove.
7490 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7491 (lrintxfdi2): Remove expander. Reimplement as define_insn.
7492 (*fist<mode>2_1): Remove.
7493 (fist<mode>2): Ditto.
7494 (fist<mode>2_with_temp): Remove insn pattern and corresponding
7496 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
7497 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7498 (fistdi2_<rounding>): Change operand 0 predicate to
7499 nonimmediate_operand.
7500 (fistdi2_<rounding>_with_temp): Remove insn pattern
7501 and corresponding splitters.
7502 (fist<mode>2_<rounding>): Change operand 0 predicate to
7503 nonimmediate_operand.
7504 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7505 and corresponding splitters.
7507 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7509 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
7511 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7514 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7516 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7517 early gimple folding of vec_splat().
7518 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7519 * gimple-fold.h: Add an extern define for tree_vec_extract().
7521 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7523 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7524 wrappers around TREE_TYPE comparisons.
7526 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7529 * config/s390/predicates.md: Add nonsym_memory_operand.
7530 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7531 contains a SYMBOL_REF, load it into an intermediate pseudo.
7532 (s390_emit_compare_and_swap): Legitimize operand.
7533 * config/s390/s390.md: Use the new nonsym_memory_operand
7534 with UNSPECV_CAS patterns.
7536 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7539 * config/s390/s390-passes.def: New file.
7540 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7542 (make_pass_s390_early_mach): Add declaration.
7543 * config/s390/s390.c (make_pass_s390_early_mach):
7544 (s390_option_override): Remove dynamic registration.
7545 * config/s390/t-s390: Add s390-passes.def.
7547 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7549 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7550 Remove UNSPEC_LTREL_BASE check.
7551 (annotate_constant_pool_refs): Likewise.
7552 (find_constant_pool_ref): Likewise.
7553 (find_ltrel_base): Removed.
7554 (replace_ltrel_base): Removed.
7555 (s390_mainpool_finish): Remove replace_ltrel_base call.
7556 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7557 (s390_chunkify_finish): Remove replace_ltrel_base call.
7558 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7560 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7563 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7564 to speculation_safe_value_not_needed.
7566 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7567 Bernd Schmidt <bernds_cb1@t-online.de>
7569 * config/nvptx/nvptx-opts.h: New file.
7570 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7571 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7573 (TARGET_SM35): New macro.
7574 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7576 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7578 (misa=): New option.
7579 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7581 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7583 * config/i386/i386.md (truncdfsf2): Remove expander.
7584 (truncdfsf2_with_temp): Ditto.
7585 (truncxf<mode>2): Ditto.
7586 (*truncdfsf_fast_mixed): Remove insn pattern.
7587 (*truncdfsf_fast_i387): Ditto.
7588 (*truncdfsf_mixed): Ditto.
7589 (*truncdfsf_i387): Ditto.
7590 (*truncdfsf2_i387_1): Ditto.
7591 (*truncxfsf2_mixed): Ditto.
7592 (*truncxfdf2_mixed): Ditto.
7593 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7594 to call gen_truncxf<mode>2 instead.
7595 (*truncxf<mode>2_i387): Remove.
7596 (reg->reg splitters): Remove splitter pattern.
7597 (reg->mem splitters): Ditto.
7599 (truncdfsf2): New insn pattern.
7600 (truncxf<mode>2): Ditto.
7602 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7604 * tree-ssa-math-opts.c (is_mult_by): New function.
7605 (is_square_of): Use the above.
7606 (optimize_recip_sqrt): New function.
7607 (pass_cse_reciprocals::execute): Use the above.
7609 2018-09-05 Richard Biener <rguenther@suse.de>
7612 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7613 to zero-init the emplaced vec.
7615 2018-09-05 Martin Liska <mliska@suse.cz>
7617 PR tree-optimization/87205
7618 * tree-switch-conversion.c (pass_lower_switch::execute):
7619 Group cases for switch statements.
7621 2018-09-05 Richard Biener <rguenther@suse.de>
7623 PR tree-optimization/87217
7624 * tree-ssa-sccvn.c (vuse_valueize): New.
7625 (vn_reference_lookup_pieces): Use it.
7626 (vn_reference_lookup): Likewise.
7628 2018-09-05 Nathan Sidwell <nathan@acm.org>
7631 * stor-layout.c (place_field): Scan forwards to check last
7632 bitfield when ms_bitfield_placement is in effect.
7634 2018-09-05 Richard Biener <rguenther@suse.de>
7637 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7640 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
7641 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7643 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7644 * config.gcc (extra_objs): Build it.
7645 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7647 * config/aarch64/aarch64-passes.def
7648 (pass_tag_collision_avoidance): New pass.
7649 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7650 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7651 (aarch64_classify_address): Remove static qualifier.
7652 (aarch64_address_info, aarch64_address_type): Move to...
7653 * config/aarch64/aarch64-protos.h: ... here.
7654 (make_pass_tag_collision_avoidance): New function.
7655 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7658 2018-09-05 Martin Liska <mliska@suse.cz>
7660 * doc/gcov.texi: Update documentation of humar
7662 * gcov.c (format_count): Print one decimal place, it provides
7663 more fine number of situations like '1G' vs. '1.4G'.
7665 2018-09-05 Martin Liska <mliska@suse.cz>
7668 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7669 * optc-gen.awk: Allow 'Var' for Deprecated options in order
7670 to generate a MASK value.
7672 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
7675 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7676 if frame pointer isn't used.
7677 (compute_frame_pointer_to_fb_displacement): Likewise.
7679 2018-09-04 Jakub Jelinek <jakub@redhat.com>
7682 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7683 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7684 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7685 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7686 and OPTION_MASK_ISA_XSAVEC_UNSET.
7688 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
7690 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7691 XOR operations in NAND case.
7693 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7695 * wide-int-range.cc (wide_int_range_convert): New.
7696 * wide-int-range.h (wide_int_range_convert): New.
7697 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7698 code into wide_int_range_convert.
7699 (extract_range_into_wide_ints): Do not munge anti range constants
7700 into the entire domain. Just return the range back.
7702 2018-09-04 Martin Liska <mliska@suse.cz>
7704 * genmatch.c (output_line_directive): Add new argument
7706 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7708 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7710 * doc/invoke.texi (Option Summary): Add whitespace.
7712 * doc/invoke.texi (Option Summary): Add -Waligned-new.
7714 2018-09-04 Richard Biener <rguenther@suse.de>
7716 PR tree-optimization/87211
7717 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7718 backedge value we're supposed to treat as VARYING also number
7719 the PHI to VARYING in case it got a different value-number already.
7721 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7723 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7724 (extract_range_from_binary_expr_1): Do not call
7725 vrp_can_optimize_bit_op.
7726 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7728 (wide_int_range_get_mask_and_bounds): New.
7729 (wide_int_range_optimize_bit_op): New.
7730 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7731 (wide_int_range_bit_and): Same.
7732 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7733 (wide_int_range_optimize_bit_op): New.
7734 (wide_int_range_get_mask_and_bounds): New.
7736 2018-09-04 Richard Biener <rguenther@suse.de>
7738 PR tree-optimization/87176
7739 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7740 variable. When value-numbering a virtual PHI node make sure
7741 to not value-number to the backedge value.
7743 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7745 * doc/extend.texi (Long Long, Hex Floats): Document support for
7746 long long and hex floats in more recent versions of ISO C++.
7748 2018-09-03 Richard Biener <rguenther@suse.de>
7750 PR tree-optimization/87177
7751 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7754 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7756 * bb-reorder.c (edge_order): Convert to C-qsort-style
7757 tri-state comparator.
7758 (reorder_basic_blocks_simple): Change std::stable_sort to
7761 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7763 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7764 tri-state comparator.
7765 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7767 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7769 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
7770 (mergesort): ... here as maximum count for using netsort.
7771 (gcc_qsort): Set nlim to 3 if stable sort is requested.
7772 (gcc_stablesort): New.
7773 * system.h (gcc_stablesort): Declare.
7775 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7777 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7778 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
7779 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
7781 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
7783 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7784 lxsdx and stxsdx alternatives.
7785 (*mov<mode>_hardfloat64): Ditto.
7786 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7788 2018-09-03 Richard Biener <rguenther@suse.de>
7790 PR tree-optimization/87200
7791 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7794 2018-09-03 Martin Liska <mliska@suse.cz>
7796 PR tree-optimization/87201
7797 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7798 Fix parenthesis in an expression.
7800 2018-09-03 Richard Biener <rguenther@suse.de>
7802 PR tree-optimization/87197
7803 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7804 visited. CSE the VN_INFO hashtable lookup.
7806 PR tree-optimization/87169
7807 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7808 iterating make sure there's no extra backedges from irreducible
7809 regions feeding the header. Mark the destination block
7812 2018-09-03 Martin Liska <mliska@suse.cz>
7815 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7816 * common/common-targhooks.c (default_get_valid_option_values):
7818 * common/common-targhooks.h (default_get_valid_option_values):
7820 * common/config/i386/i386-common.c: Move processor_target_table
7822 (ix86_get_valid_option_values): New function.
7823 (TARGET_GET_VALID_OPTION_VALUES): New macro.
7824 * config/i386/i386.c (struct ptt): Move to i386-common.c.
7825 (PTA_*): Move all defined masks into i386-common.c.
7826 (ix86_function_specific_restore): Use new processor_cost_table.
7827 * config/i386/i386.h (struct ptt): Moved from i386.c.
7828 (struct pta): Likewise.
7829 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7830 * doc/tm.texi.in: Likewise.
7831 * opt-suggestions.c (option_proposer::suggest_option):
7832 Pass prefix to build_option_suggestions.
7833 (option_proposer::get_completions): Likewise.
7834 (option_proposer::build_option_suggestions): Use the new target
7836 * opts.c (struct option_help_tuple): New struct.
7837 (print_filtered_help): Use the new target hook.
7839 2018-09-03 Martin Liska <mliska@suse.cz>
7842 * predict.c (set_even_probabilities): Add likely_edges
7843 argument and handle cases where we have precisely one
7845 (combine_predictions_for_bb): Catch also likely_edges.
7846 (tree_predict_by_opcode): Handle gswitch statements.
7847 * tree-cfg.h (find_case_label_for_value): New declaration.
7848 (find_taken_edge_switch_expr): Likewise.
7849 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7850 Find pivot in decision tree based on probabily, not by number of
7853 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
7855 * doc/standards.texi (Standards): Update Objective-C reference.
7857 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7859 * doc/install.texi (Prerequisites): Update link for MPC.
7861 2018-09-01 Michael Matz <matz@suse.de>
7863 PR tree-optimization/87074
7864 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7865 PHIs for outer-loop uses.
7867 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7869 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7870 * doc/invoke.texi (C Dialect Options): Ditto.
7872 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7874 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7876 2018-08-31 Richard Biener <rguenther@suse.de>
7878 PR tree-optimization/87168
7879 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7880 (rpo_elim::eliminate_avail): When OP was not visited it must
7883 2018-08-31 David Malcolm <dmalcolm@redhat.com>
7885 * tree-vrp.c (copy_value_range): Convert param "from" from
7886 "value_range *" to "const value_range *".
7887 (range_is_null): Likewise for param "vr".
7888 (range_int_cst_p): Likewise.
7889 (range_int_cst_singleton_p): Likewise.
7890 (symbolic_range_p): Likewise.
7891 (value_ranges_intersect_p): Likewise for both params.
7892 (value_range_nonnegative_p): Likewise for param "vr".
7893 (value_range_constant_singleton): Likewise.
7894 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7895 (extract_range_into_wide_ints): Likewise for param "vr".
7896 (extract_range_from_multiplicative_op): Likewise for params "vr0"
7898 (vrp_can_optimize_bit_op): Likewise.
7899 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7901 (extract_range_from_unary_expr): Likewise.
7902 (debug_value_range): Likewise for param "vr".
7903 (value_range::dump): Add "const" qualifier.
7904 (vrp_prop::check_array_ref): Convert local "vr" from
7905 "value_range *" to "const value_range *".
7906 (vrp_prop::check_mem_ref): Likewise.
7907 (vrp_prop::visit_stmt): Likewise for local "old_vr".
7908 (vrp_intersect_ranges_1): Likewise for param "vr_1".
7909 (vrp_intersect_ranges): Likewise.
7910 (simplify_stmt_for_jump_threading): Likewise for local "vr".
7911 (vrp_prop::vrp_finalize): Likewise.
7912 * tree-vrp.h (value_range::dump): Add "const" qualifier.
7913 (vrp_intersect_ranges): Add "const" qualifier to params as above.
7914 (extract_range_from_unary_expr): Likewise.
7915 (value_range_constant_singleton): Likewise.
7916 (symbolic_range_p): Likewise.
7917 (copy_value_range): Likewise.
7918 (extract_range_from_binary_expr_1): Likewise.
7919 (range_int_cst_p): Likewise.
7920 (vrp_set_zero_nonzero_bits): Likewise.
7921 (range_int_cst_singleton_p): Likewise.
7923 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
7925 * config/aarch64/arm_neon.h (vabsd_s64): New.
7926 (vnegd_s64): Likewise.
7928 2018-08-31 Martin Jambor <mjambor@suse.cz>
7930 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7932 2018-08-31 Martin Liska <mliska@suse.cz>
7934 * ipa-icf.c (sem_item::add_type): Use
7935 sem_item::m_type_hash_cache.
7936 * ipa-icf.h: Move the cache from sem_item_optimizer
7939 2018-08-31 Nathan Sidwell <nathan@acm.org>
7941 * doc/extend.texi (Backwards Compatibility): Remove implicit
7942 extern C leeway of () being (...).
7944 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7946 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7948 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
7952 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7954 2018-08-31 Jakub Jelinek <jakub@redhat.com>
7957 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7958 gen_int_mode. Formatting fixes.
7960 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
7962 * target.def (custom_function_descriptors): Improve documentation.
7963 * doc/tm.texi.in (Trampolines): Expand discussion of function
7964 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7965 beginning of the section.
7966 * doc/tm.texi: Regenerated.
7968 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
7970 * cfg.h (class auto_edge_flag): Spell out the template-id of the
7971 base class in the initializer list. This is a workaround for
7972 building with older GCC.
7973 (class auto_bb_flag): Likewise.
7975 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
7977 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7978 (altivec_vcmpequ<VI_char>_p): Remove star.
7979 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7981 (expand_strncmp_vec_sequence): New function.
7982 (emit_final_str_compare_vec): New function.
7983 (expand_strn_compare): Add support for vector strncmp.
7984 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7985 length specification to bytes.
7986 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7987 (vcmpnezb_p): New pattern.
7988 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7989 for option -mstring-compare-inline-limit.
7991 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
7993 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7994 (PTA_SKYLAKE): Add PTA_AES.
7995 (PTA_GOLDMONT): Likewise.
7997 2018-08-29 Jan Hubicka <jh@suse.cz>
8000 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
8001 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
8003 2018-08-29 Jan Hubicka <jh@suse.cz>
8005 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
8007 (hash_tree): Do not visit TYPE_STUB_DECL.
8008 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
8009 stream TYPE_STUB_DECL.
8010 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
8011 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
8012 after free_lang_data.
8013 (type_in_anonymous_namespace_p): Likewise.
8015 2018-08-29 Jan Hubicka <jh@suse.cz>
8017 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8018 comment that it has to be even number.
8019 (class sreal): Change m_sig type to int32_t.
8020 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8021 int64_t for temporary calculations.
8022 (sreal_verify_basics): Drop one bit from minimum and maximum.
8024 2018-08-30 Richard Biener <rguenther@suse.de>
8026 PR tree-optimization/87147
8027 * tree-ssa-sccvn.c (SSA_VISITED): New function.
8028 (visit_phi): When the degenerate result is from the backedge and
8029 we didn't visit its definition yet drop to VARYING.
8030 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
8032 2018-08-29 Jan Hubicka <jh@suse.cz>
8034 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
8036 (hash_tree): Likewise.
8038 2018-08-29 Jan Hubicka <jh@suse.cz>
8040 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
8041 and TYPE_NEXT_REF_TO.
8043 2018-08-29 Jan Hubicka <jh@suse.cz>
8045 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8046 comment that it has to be even number.
8047 (class sreal): Change m_sig type to int32_t.
8048 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8049 int64_t for temporary calculations.
8050 (sreal_verify_basics): Drop one bit from minimum and maximum.
8052 2018-08-30 Tamar Christina <tamar.christina@arm.com>
8054 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
8056 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
8059 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
8060 if to_add is negative.
8062 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
8065 * builtins.c (c_strlen): Improve range checks.
8067 2018-08-29 Martin Sebor <msebor@redhat.com>
8068 Jeff Law <law@redhat.com>
8070 PR tree-optimization/86714
8071 PR tree-optimization/86711
8072 * builtins.c (c_strlen): Add arguments to call to string_constant.
8073 * expr.c (string_constant): Add argument. Detect missing nul
8074 terminator and outermost declaration it's missing in.
8075 * expr.h (string_constant): Add argument.
8076 * fold-const.c (read_from_constant_string): Add arguments to call to
8078 (c_getstr): Likewise.
8079 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8081 * tree-ssa-strlen.c (get_stridx): Likewise.
8083 2018-08-29 Jan Hubicka <jh@suse.cz>
8085 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
8086 Do not stream DECL_VINDEX.
8087 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
8088 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
8089 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
8091 2018-08-29 Richard Biener <rguenther@suse.de>
8093 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
8094 virtual operands that are not default defs to honor region
8096 (rpo_vn_valueize): Remove ineffective code here.
8098 2018-08-29 Richard Biener <rguenther@suse.de>
8100 PR tree-optimization/87132
8101 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
8102 when skipping defs reachable over backedges.
8104 2018-08-29 Richard Biener <rguenther@suse.de>
8106 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
8107 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
8108 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
8109 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
8110 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
8111 (vn_reference_lookup_3): Remove use of const_parms.
8112 (free_rpo_vn): Do not free const_parms.
8113 (do_rpo_vn): Do not call init_const_parms.
8114 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
8115 SSA_NAME_POINTS_TO_READONLY_MEMORY.
8116 (call_may_clobber_ref_p_1): Likewise.
8118 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
8121 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
8123 (-ftree-scev-cprop): Document.
8125 2018-08-29 Jan Hubicka <jh@suse.cz>
8127 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
8129 (sreal constructor): Update.
8130 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
8131 sreal:operator/): Update.
8133 2018-08-29 Martin Liska <mliska@suse.cz>
8135 * tree-switch-conversion.c (switch_conversion::expand):
8136 Strenghten assumption about gswitch statements.
8138 2018-08-29 Richard Biener <rguenther@suse.de>
8140 PR tree-optimization/87117
8141 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
8142 re-value-number released SSA VDEFs.
8144 2018-08-29 Richard Biener <rguenther@suse.de>
8146 PR tree-optimization/87126
8147 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
8149 2018-08-28 Jim Wilson <jimw@sifive.com>
8151 * config/riscv/pic.md: Rewrite.
8152 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
8154 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
8155 (SOFTF, default_load, softload, softstore): New.
8157 2018-08-28 Jeff Law <law@redhat.com>
8159 * fold-const.c (fold_binary_loc): Remove recently added assert.
8161 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
8163 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8164 to OP parmeter of generated function.
8166 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
8168 PR tree-optimization/87009
8169 * match.pd: Add boolean optimizations.
8171 2018-08-28 Martin Sebor <msebor@redhat.com>
8174 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
8175 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
8176 (pass_walloca::gate): Use it.
8177 (alloca_call_type): Same.
8178 (pass_walloca::execute): Same.
8179 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
8181 2018-08-28 David Malcolm <dmalcolm@redhat.com>
8183 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
8184 GCC_VERSION for usage of "__gcc_dump_printf__" format from
8187 2018-08-28 Richard Biener <rguenther@suse.de>
8189 PR tree-optimization/87124
8190 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
8191 constants before looking up avail.
8193 2018-08-28 Jakub Jelinek <jakub@redhat.com>
8196 * calls.c (maybe_warn_nonstring_arg): Punt early if
8197 warn_stringop_overflow is zero. Don't call get_range_strlen
8198 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
8199 Swap comparison operands to have constants on rhs. Only use
8200 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
8201 increment lenrng[0].
8203 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
8205 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8206 use of tree_to_shwi. Remove duplicated test for the size being
8207 a whole number of bytes.
8209 2018-08-28 Richard Biener <rguenther@suse.de>
8211 PR tree-optimization/87117
8212 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
8213 Handle removed stmt without LHS (GIMPLE_NOP).
8215 2018-08-28 Richard Biener <rguenther@suse.de>
8217 PR tree-optimization/87117
8218 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
8219 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
8221 2018-08-28 Richard Biener <rguenther@suse.de>
8223 PR tree-optimization/87117
8224 * tree-ssa-pre.c (compute_avail): Do not make expressions
8225 with predicated values available.
8226 (get_expr_value_id): Assert we do not run into predicated value
8229 2018-08-28 Richard Biener <rguenther@suse.de>
8231 PR tree-optimization/87117
8232 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
8233 get virtual operands.
8234 (get_expr_operands): Handle STRING_CST like other decls.
8236 2018-08-28 Martin Liska <mliska@suse.cz>
8238 * tree.h: Update documentation of fndecl_built_in_p
8242 2018-08-27 Jeff Law <law@redhat.com>
8243 PR tree-optimization/87110
8244 * tree-ssa-dse.c (compute_trims): Handle non-constant
8247 2018-08-27 Martin Sebor <msebor@redhat.com>
8249 PR tree-optimization/86914
8250 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8252 2018-08-27 Martin Sebor <msebor@redhat.com>
8254 PR tree-optimization/87112
8255 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8256 the type of the bound argument.
8258 2018-08-27 Jeff Law <law@redhat.com>
8260 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8261 type does not have a TYPE_SIZE_UNIT.
8263 2018-08-27 Steve Ellcey <sellcey@cavium.com>
8265 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8266 with include of backend.h.
8268 2018-08-27 Richard Biener <rguenther@suse.de>
8270 PR tree-optimization/86927
8271 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8272 use const cond reduction code.
8274 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
8276 PR tree-optimization/85758
8277 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8279 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8282 * diagnostic-show-locus.c (class layout_range): Update for
8283 conversion of show_caret_p to a tri-state.
8284 (layout_range::layout_range): Likewise.
8285 (make_range): Likewise.
8286 (layout::maybe_add_location_range): Likewise.
8287 (layout::should_print_annotation_line_p): Don't show annotation
8288 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8289 (layout::get_state_at_point): Update for conversion of
8290 show_caret_p to a tri-state. Bail out early for
8291 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8292 underlining or source colorization.
8293 (gcc_rich_location::add_location_if_nearby): Update for conversion
8294 of show_caret_p to a tri-state.
8295 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8296 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8298 (selftest::test_one_liner_labels): Likewise.
8299 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8300 conversion of show_caret_p to a tri-state.
8301 * pretty-print.c (text_info::set_location): Likewise.
8302 * pretty-print.h (text_info::set_location): Likewise.
8303 * substring-locations.c (format_warning_n_va): Likewise.
8304 * tree-diagnostic.c (default_tree_printer): Likewise.
8305 * tree-pretty-print.c (newline_and_indent): Likewise.
8307 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8310 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8311 line above for line-insertion fix-it hints.
8312 (selftest::test_fixit_insert_containing_newline): Update the
8313 expected results, and add a test with line-numbering enabled.
8315 2018-08-27 Martin Liska <mliska@suse.cz>
8318 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8319 params with DECL_HAS_VALUE_EXPR_P.
8321 2018-08-27 Martin Liska <mliska@suse.cz>
8323 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8324 selected expansion strategy.
8326 2018-08-27 Martin Liska <mliska@suse.cz>
8328 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8329 * builtins.c (is_builtin_fn): Likewise.
8330 * attribs.c (diag_attr_exclusions): Use new function
8331 fndecl_built_in_p and remove check for FUNCTION_DECL if
8333 (builtin_mathfn_code): Likewise.
8334 (fold_builtin_expect): Likewise.
8335 (fold_call_expr): Likewise.
8336 (fold_builtin_call_array): Likewise.
8337 (fold_call_stmt): Likewise.
8338 (set_builtin_user_assembler_name): Likewise.
8339 (is_simple_builtin): Likewise.
8340 * calls.c (gimple_alloca_call_p): Likewise.
8341 (maybe_warn_nonstring_arg): Likewise.
8342 * cfgexpand.c (expand_call_stmt): Likewise.
8343 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8344 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8345 (cgraph_node::verify_node): Likewise.
8346 * cgraphclones.c (build_function_decl_skip_args): Likewise.
8347 (cgraph_node::create_clone): Likewise.
8348 * config/arm/arm.c (arm_insert_attributes): Likewise.
8349 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8350 * dse.c (scan_insn): Likewise.
8351 * expr.c (expand_expr_real_1): Likewise.
8352 * fold-const.c (operand_equal_p): Likewise.
8353 (fold_binary_loc): Likewise.
8354 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8355 * gimple-low.c (lower_stmt): Likewise.
8356 * gimple-pretty-print.c (dump_gimple_call): Likewise.
8357 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8359 * gimple.c (gimple_build_call_from_tree): Likewise.
8360 (gimple_call_builtin_p): Likewise.
8361 (gimple_call_combined_fn): Likewise.
8362 * gimplify.c (gimplify_call_expr): Likewise.
8363 (gimple_boolify): Likewise.
8364 (gimplify_modify_expr): Likewise.
8365 (gimplify_addr_expr): Likewise.
8366 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8367 * ipa-cp.c (determine_versionability): Likewise.
8368 * ipa-fnsummary.c (compute_fn_summary): Likewise.
8369 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8370 * ipa-split.c (visit_bb): Likewise.
8371 (split_function): Likewise.
8372 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8373 * lto-cgraph.c (input_node): Likewise.
8374 * lto-streamer-out.c (write_symbol): Likewise.
8375 * omp-low.c (setjmp_or_longjmp_p): Likewise.
8376 (lower_omp_1): Likewise.
8377 * predict.c (strip_predict_hints): Likewise.
8378 * print-tree.c (print_node): Likewise.
8379 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8380 * trans-mem.c (is_tm_irrevocable): Likewise.
8381 (is_tm_load): Likewise.
8382 (is_tm_simple_load): Likewise.
8383 (is_tm_store): Likewise.
8384 (is_tm_simple_store): Likewise.
8385 (is_tm_abort): Likewise.
8386 (tm_region_init_1): Likewise.
8387 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8388 * tree-cfg.c (verify_gimple_call): Likewise.
8389 (move_stmt_r): Likewise.
8390 (stmt_can_terminate_bb_p): Likewise.
8391 * tree-eh.c (lower_eh_constructs_2): Likewise.
8392 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8393 * tree-inline.c (remap_gimple_stmt): Likewise.
8394 (copy_bb): Likewise.
8395 (estimate_num_insns): Likewise.
8396 (fold_marked_statements): Likewise.
8397 * tree-sra.c (scan_function): Likewise.
8398 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8399 (optimize_stack_restore): Likewise.
8400 (pass_fold_builtins::execute): Likewise.
8401 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8402 (mark_all_reaching_defs_necessary_1): Likewise.
8403 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8404 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8405 (pass_forwprop::execute): Likewise.
8406 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8407 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8408 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8409 * tree-ssa-strlen.c (get_string_length): Likewise.
8410 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8411 (find_func_aliases_for_call): Likewise.
8412 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8413 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8414 * tree-tailcall.c (find_tail_calls): Likewise.
8415 * tree.c (need_assembler_name_p): Likewise.
8416 (free_lang_data_in_decl): Likewise.
8417 (get_call_combined_fn): Likewise.
8418 * ubsan.c (is_ubsan_builtin_p): Likewise.
8419 * varasm.c (incorporeal_function_p): Likewise.
8420 * tree.h (DECL_BUILT_IN): Remove and replace with
8422 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8423 (fndecl_built_in_p): New.
8425 2018-08-27 Martin Liska <mliska@suse.cz>
8427 PR tree-optimization/86847
8428 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8429 Dump also subtree probability.
8430 (switch_decision_tree::do_jump_if_equal): New function.
8431 (switch_decision_tree::emit_case_nodes): Handle special
8432 situations in balanced tree that can be emitted much simpler.
8433 Fix calculation of probabilities that happen in tree expansion.
8434 * tree-switch-conversion.h (struct cluster): Add
8436 (struct simple_cluster): Likewise.
8437 (struct case_tree_node): Add new function has_child.
8438 (do_jump_if_equal): New.
8440 2018-08-27 Martin Liska <mliska@suse.cz>
8442 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8443 Add new argument to bit_test_cluster constructor.
8444 (bit_test_cluster::emit): Set bits really number of values
8446 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8447 probability argument.
8448 * tree-switch-conversion.h (struct bit_test_cluster):
8449 Add m_handles_entire_switch.
8451 2018-08-27 Martin Liska <mliska@suse.cz>
8453 PR tree-optimization/86702
8454 * tree-switch-conversion.c (jump_table_cluster::emit):
8455 Make probabilities even for values in jump table
8456 according to number of cases handled.
8457 (switch_decision_tree::compute_cases_per_edge): Pass
8458 argument to reset_out_edges_aux function.
8459 (switch_decision_tree::analyze_switch_statement): Likewise.
8460 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8463 2018-08-27 Martin Liska <mliska@suse.cz>
8465 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8466 cfun argument explicitly.
8467 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8468 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8469 function gimple_switch_default_bb.
8470 (convert_switch_statements):
8472 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8473 * stmt.c (label_to_block_fn): Use label_to_block and pass
8474 cfun argument explicitly and use gimple_switch_label_bb.
8475 (expand_case): Likewise.
8476 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8477 cfun argument explicitly. Likewise.
8478 (make_edges_bb): Likewise.
8479 (make_cond_expr_edges): Likewise.
8480 (get_cases_for_edge): Likewise.
8481 (make_gimple_switch_edges): Likewise.
8482 (label_to_block_fn): Likewise.
8483 (label_to_block): Likewise.
8484 (make_goto_expr_edges): Likewise.
8485 (make_gimple_asm_edges): Likewise.
8486 (main_block_label): Likewise.
8487 (group_case_labels_stmt): Likewise.
8488 (find_taken_edge_computed_goto): Likewise.
8489 (find_taken_edge_switch_expr): Likewise.
8490 (gimple_verify_flow_info): Likewise.
8491 (gimple_redirect_edge_and_branch): Likewise.
8492 (gimple_switch_label_bb): New function.
8493 (gimple_switch_default_bb): Likewise.
8494 (gimple_switch_edge): Likewise.
8495 (gimple_switch_default_edge): Likewise.
8496 * tree-cfg.h (label_to_block_fn): Remove and replace ...
8497 (label_to_block): ... with this.
8498 (gimple_switch_label_bb): New.
8499 (gimple_switch_default_bb): Likewise.
8500 (gimple_switch_edge): Likewise.
8501 (gimple_switch_default_edge): Likewise.
8502 * tree-cfgcleanup.c (convert_single_case_switch): Use
8503 new gimple functions and pass new argument to label_to_block.
8504 (cleanup_control_flow_bb):
8505 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8506 cfun argument explicitly.
8507 (make_eh_edges): Likewise.
8508 (redirect_eh_dispatch_edge): Likewise.
8509 (lower_resx): Likewise.
8510 (lower_eh_dispatch): Likewise.
8511 (maybe_remove_unreachable_handlers): Likewise.
8512 (unsplit_eh): Likewise.
8513 (cleanup_empty_eh): Likewise.
8514 (verify_eh_edges): Likewise.
8515 (verify_eh_dispatch_edge): Likewise.
8516 * tree-ssa-dom.c (record_edge_info): Likewise.
8517 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8518 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8519 (thread_through_normal_block): Likewise.
8520 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8521 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8522 * tree-switch-conversion.c (switch_conversion::collect): Use new
8524 (switch_conversion::check_final_bb): Likewise.
8525 (switch_conversion::gather_default_values): Pass new argument
8527 (switch_conversion::build_constructors): Likewise.
8528 (switch_decision_tree::compute_cases_per_edge): Use new
8529 gimple_switch_edge function.
8530 (switch_decision_tree::analyze_switch_statement): Pass new argument
8532 (switch_decision_tree::try_switch_expansion): Use
8533 gimple_switch_default_edge.
8534 * tree-vrp.c (find_switch_asserts): Pass new argument
8536 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8537 (vr_values::simplify_switch_using_ranges): Likewise.
8539 2018-08-27 Richard Biener <rguenther@suse.de>
8541 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8542 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8544 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8545 (struct vn_nary_op_s): Add unwind_to member. Add
8546 predicated_values flag and put result into a union together
8547 with a linked list of vn_pval.
8548 (struct vn_ssa_aux): Add name member to make maintaining
8549 a map of SSA name to vn_ssa_aux possible. Remove no longer
8550 needed info, dfsnum, low, visited, on_sccstack, use_processed
8551 and range_info_anti_range_p members.
8552 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8553 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8555 (vn_valueize): New global.
8556 (vn_context_bb): Likewise.
8557 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8558 VN_INFO_PTR_INFO): Remove.
8559 * tree-ssa-sccvn.c: ... (rewrite)
8560 (pass_fre::execute): For -O2+ initialize loops and run
8561 RPO VN in optimistic mode (iterating). For -O1 and -Og
8562 run RPO VN in non-optimistic mode.
8563 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8564 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8565 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8566 (rpo-vn-max-loop-depth): Document.
8567 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8568 when valuezing the VUSE signals we walked out of the region.
8569 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8570 (phi_translate): Set VN context block to use for availability
8572 (compute_avail): Likewise.
8573 (pre_valueize): New function.
8574 (pass_pre::execute): Adjust to the RPO VN API.
8576 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8577 (propagate_constants_for_unrolling): Remove.
8578 (tree_unroll_loops_completely): Perform value-numbering
8579 on the unrolled bodies loop parent.
8581 2018-08-27 Richard Biener <rguenther@suse.de>
8583 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8584 for partial antic compute.
8586 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8588 PR rtl-optimization/87065
8589 * combine.c (simplify_if_then_else): Formatting fix.
8590 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8592 (known_cond): Don't return const_true_rtx for vector modes. Use
8593 CONST0_RTX instead of const0_rtx. Formatting fixes.
8595 2018-08-27 Martin Liska <mliska@suse.cz>
8597 PR gcov-profile/87069
8598 * gcov.c (process_file): Record files already processed
8599 and warn about a file being processed multiple times.
8601 2018-08-27 Martin Liska <mliska@suse.cz>
8604 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8605 Set default values for x_aarch64_*_string strings.
8606 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8607 prefix. For -mabi do not print '=ABI' in help and use
8608 <option_value> format for -msve-vector-bits and -moverride
8611 2018-08-26 Jeff Law <law@redhat.com>
8613 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8616 2018-08-26 Marek Polacek <polacek@redhat.com>
8618 PR c++/87029, Implement -Wredundant-move.
8619 * doc/invoke.texi: Document -Wredundant-move.
8621 2018-08-25 Martin Sebor <msebor@redhat.com>
8623 PR tree-optimization/87059
8624 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8625 to the same type as the other.
8626 * fold-const.c (fold_binary_loc): Assert expectation.
8628 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
8630 * config/darwin.c (machopic_legitimize_pic_address): Clean up
8631 extraneous parentheses, dead code section and formatting.
8633 2018-08-24 David Malcolm <dmalcolm@redhat.com>
8636 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8637 wide enough for jumps in the line-numbering to be visible.
8638 (layout::print_gap_in_line_numbering): New member function.
8639 (layout::calculate_line_spans): When using line numbering, merge
8640 line spans that are only 1 line apart.
8641 (diagnostic_show_locus): When printing line numbers, show gaps in
8642 line numbering directly, rather than printing headers.
8643 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8644 line-numbering with multiple line spans.
8645 (selftest::test_fixit_insert_containing_newline_2): Add test of
8646 line-numbering, in which the spans are close enough to be merged.
8648 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8650 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8651 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
8652 * tree-vrp.c (range_is_nonnull): Remove.
8653 (range_includes_zero_p): Accept value_range instead of min/max.
8654 (extract_range_from_binary_expr_1): Do not early bail on
8656 Use range_includes_zero_p instead of range_is_nonnull.
8657 (extract_range_from_unary_expr): Use range_includes_zero_p instead
8658 of range_is_nonnull.
8659 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
8660 special case VR_ANTI_RANGE.
8661 (vrp_finalize): Same.
8662 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8664 (range_is_nonnull): Remove.
8665 * vr-values.c (vrp_stmt_computes_nonzero): Use
8666 range_includes_zero_p instead of range_is_nonnull.
8667 (extract_range_basic): Pass value_range to range_includes_zero_p
8668 instead of range_is_nonnull.
8670 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
8672 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8673 * emit-rtl.h (rtl_data): Remove return_bnd.
8674 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8675 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8676 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8677 (POINTER_BOUNDS_MODE): Remove definition.
8678 (make_pointer_bounds_mode): Remove.
8679 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8680 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8681 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8682 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8683 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8684 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8685 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8687 * config/i386/i386-modes.def (BND32, BND64): Remove.
8688 * config/i386/i386.c (dbx_register_map): Remove bound registers.
8689 (dbx64_register_map): Ditto.
8690 (svr4_dbx_register_map): Ditto.
8691 (indirect_thunk_bnd_needed): Remove.
8692 (indirect_thunks_bnd_used): Ditto.
8693 (indirect_return_bnd_needed): Ditto.
8694 (indirect_return_via_cx_bnd): Ditto.
8695 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8696 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8697 (output_indirect_thunk): Ditto. Remove need_prefix argument.
8698 (output_indirect_thunk_function): Remove handling of
8699 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8700 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8701 (ix86_save_reg): Remove handling of crtl->return_bnd.
8702 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8703 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8704 and UNSPEC_BNDLX_ADDR.
8705 (ix86_output_indirect_branch_via_reg): Remove handling of
8706 indirect_thunk_prefix_bnd.
8707 (ix86_output_indirect_branch_via_push): Ditto.
8708 (ix86_output_function_return): Ditto.
8709 (ix86_output_indirect_function_return): Ditto.
8710 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8711 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8712 (CALL_USED_REGISTERS): Ditto.
8713 (REG_ALLOC_ORDER): Update for removal of bound registers.
8714 (HI_REGISTER_NAMES): Ditto.
8715 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8716 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8717 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8718 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8719 (FIRST_PSEUDO_REG): Update.
8720 (BND): Remove mode iterator.
8721 * config/i386/predicates.md (bnd_mem_operator): Remove.
8723 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8725 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8728 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8730 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8731 the case in which the permute needs only a single element and
8732 repeats for every vector of the result. Extend that case to
8733 handle variable-length vectors.
8734 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8736 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
8739 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8740 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8742 2018-08-24 Richard Biener <rguenther@suse.de>
8744 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8745 bb_flags_allocated members.
8746 (auto_flag): New RAII class for allocating flags.
8747 (auto_edge_flag): New RAII class for allocating edge flags.
8748 (auto_bb_flag): New RAII class for allocating bb flags.
8749 * cfgloop.c (verify_loop_structure): Allocate temporary edge
8751 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8752 in favor of temporarily allocated BB flag.
8753 * hsa-brig.c: Re-order includes.
8754 * hsa-dump.c: Likewise.
8755 * hsa-regalloc.c: Likewise.
8756 * print-rtl.c: Likewise.
8757 * profile-count.c: Likewise.
8759 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
8762 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8765 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8768 * wide-int-range.cc (wide_int_range_div): Do not ignore result
8769 from wide_int_range_multiplicative_op.
8771 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8773 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8776 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
8778 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8781 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
8783 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8784 full GENERIC expression used for replacement.
8786 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
8788 * tree-vrp.c (abs_extent_range): Remove.
8789 (extract_range_into_wide_ints): Pass wide ints by reference.
8790 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8791 Pass wide ints by reference in all calls to
8792 extract_range_into_wide_ints.
8793 * wide-int-range.cc (wide_int_range_div): New.
8794 * wide-int-range.h (wide_int_range_div): New.
8795 (wide_int_range_includes_zero_p): New.
8796 (wide_int_range_zero_p): New.
8798 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
8800 * config/aarch64/aarch64.md (arches): New enum.
8801 (arch): New enum attr.
8802 (arch_enabled): New attr.
8803 (enabled): Now uses arch_enabled only.
8804 (simd, sve, fp16): Removed attribute.
8805 (fp): Attr now defined in terms of 'arch'.
8806 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8807 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8808 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8809 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8810 attributes into 'arch'.
8811 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8812 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8813 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8814 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8815 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8816 'simd' attribute into 'arch'.
8817 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8818 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8819 Convert use of 'fp' attribute to 'arch'.
8820 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8821 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8823 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8824 (different modes) Merge 'fp' and 'simd' into 'arch'.
8825 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8828 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
8830 PR rtl-optimization/87026
8831 * expmed.c (canonicalize_comparison): If we can no longer create
8832 pseudoregisters, don't.
8834 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
8837 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8839 * config/arm/arm.c (speculation_barrier_libfunc): New static
8841 (arm_init_libfuncs): Initialize it.
8842 (arm_emit_speculation_barrier): New function.
8843 * config/arm/arm.md (speculation_barrier): Call
8844 arm_emit_speculation_barrier for architectures that do not have
8846 (speculation_barrier_insn): Only match on Armv7 or later.
8848 2018-08-23 Richard Biener <rguenther@suse.de>
8851 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8854 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8856 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8857 of single-vector TBLs.
8858 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8861 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8864 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8865 aarch64_evpc_tbl guard.
8867 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
8869 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8872 2018-08-22 Martin Sebor <msebor@redhat.com>
8875 * tree-pretty-print.c (pretty_print_string): Add argument.
8876 (dump_generic_node): Call to pretty_print_string with string size.
8878 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
8880 PR rtl-optimization/86771
8881 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8882 of two SETs into those two SETs, one to be placed at i2, if that SETs
8883 destination is modified between i2 and i3.
8885 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8887 PR tree-optimization/86725
8888 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8890 (vect_analyze_scalar_cycles_1): Check it.
8892 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8894 PR tree-optimization/86725
8895 * tree-vect-loop.c (vect_is_simple_reduction): When treating
8896 an outer loop phi as a double reduction, make sure that the
8897 single user of the phi result is an inner loop phi.
8899 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8901 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8902 grouped stores with gaps to a strided group.
8904 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8906 * tree-vect-stmts.c (get_group_load_store_type)
8907 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8908 first statement in a group.
8910 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8912 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8913 the sequence used in gcc/gcc.c.
8915 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8918 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8921 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8923 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8924 Darwin10-specific unwinder-shim.
8925 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8926 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8927 New to cater for Darwin10 Rosetta.
8929 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8931 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8932 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8934 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8939 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8940 (dwarf2out_switch_text_section): Generate a local label for the
8941 second function sub-section and apply it as the second FDE start
8943 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8944 second sub-section start.
8946 2018-08-22 Richard Biener <rguenther@suse.de>
8948 PR tree-optimization/86988
8949 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8951 2018-08-22 Richard Biener <rguenther@suse.de>
8953 PR tree-optimization/86945
8954 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8956 2018-08-22 Alexandre Oliva <oliva@adacore.com>
8958 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8959 a comment about how uses of r2 for .sdata2 come about.
8961 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8963 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8965 2018-08-21 Marek Polacek <polacek@redhat.com>
8967 PR c++/86981, Implement -Wpessimizing-move.
8968 * doc/invoke.texi: Document -Wpessimizing-move.
8970 2018-08-21 Jan Hubicka <jh@suse.cz>
8972 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8973 * tree.h (is_redundant_typedef): Remove.
8974 * dwarf2out.c (is_redundant_typedef): Turn into static function.
8976 2018-08-21 Jan Hubicka <jh@suse.cz>
8978 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8981 2018-08-21 Tamar Christina <tamar.christina@arm.com>
8983 * expmed.c (extract_low_bits): Reject invalid subregs early.
8985 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8988 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8991 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8993 * config/vxworks.h: Guard vxworks_asm_out_constructor and
8994 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8995 * config/vxworks.c: Likewise.
8997 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8999 * config/vxworks.c: Set targetm.have_ctors_dtors
9000 if HAVE_INITFINI_ARRAY_SUPPORT.
9001 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
9002 if HAVE_INITFINI_ARRAY_SUPPORT.
9004 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9006 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
9007 default search path for VxWorks < 7.
9009 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
9011 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
9012 (get_format_string): Refer to c_getstr.
9014 2018-08-21 Tom de Vries <tdevries@suse.de>
9016 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9017 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9018 (debuginfo_early_stop): Declare.
9019 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9020 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9021 (debuginfo_early_stop): New function.
9022 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
9023 and debuginfo_early_stop.
9024 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
9025 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
9026 (general_init): Call debuginfo_early_init.
9027 (finalize): Call debuginfo_fini.
9028 (do_compile): Call debuginfo_init.
9029 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
9031 (@item -fdump-debug, @item -fdump-earlydebug): Add.
9033 2018-08-21 Tom de Vries <tdevries@suse.de>
9035 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
9036 flag_dump_noaddr and flag_dump_unnumbered.
9038 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
9040 * wide-int-range.cc (wide_int_range_abs): New.
9041 (wide_int_range_order_set): Rename from wide_int_range_min_max.
9042 * wide-int-range.h (wide_int_range_abs): New.
9043 (wide_int_range_min_max): New.
9044 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
9045 case to call wide_int_range_abs.
9046 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
9047 (extract_range_from_abs_expr): Delete.
9049 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
9052 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
9053 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
9056 2018-08-20 Nathan Sidwell <nathan@acm.org>
9057 Jeff Law <law@redhat.com>
9059 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
9060 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
9062 2018-08-20 David Malcolm <dmalcolm@redhat.com>
9065 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
9066 (decl_attributes): Likewise.
9067 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
9069 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9070 * diagnostic-core.h (class auto_diagnostic_group): New class.
9071 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
9072 (diagnostic_report_diagnostic): Handle the first diagnostics within
9074 (emit_diagnostic): Add auto_diagnostic_group instance.
9076 (inform_n): Likewise.
9077 (warning): Likewise.
9078 (warning_at): Likewise.
9079 (warning_n): Likewise.
9080 (pedwarn): Likewise.
9081 (permerror): Likewise.
9083 (error_n): Likewise.
9084 (error_at): Likewise.
9086 (fatal_error): Likewise.
9087 (internal_error): Likewise.
9088 (internal_error_no_backtrace): Likewise.
9089 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
9090 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
9091 * diagnostic.h (struct diagnostic_context): Add fields
9092 "diagnostic_group_nesting_depth",
9093 "diagnostic_group_emission_count", "begin_group_cb",
9095 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
9096 Add auto_diagnostic_group instance(s).
9097 (find_explicit_erroneous_behavior): Likewise.
9098 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
9099 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
9100 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
9101 (gimplify_va_arg_expr): Likewise.
9102 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
9103 (HSA_SORRY_AT): Likewise.
9104 * ipa-devirt.c (compare_virtual_tables): Likewise.
9105 (warn_odr): Likewise.
9106 * multiple_target.c (expand_target_clones): Likewise.
9107 * opts-common.c (cmdline_handle_error): Likewise.
9108 * reginfo.c (globalize_reg): Likewise.
9109 * substring-locations.c (format_warning_n_va): Likewise.
9110 * tree-inline.c (expand_call_inline): Likewise.
9111 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
9112 * tree-ssa-loop-niter.c
9113 (do_warn_aggressive_loop_optimizations): Likewise.
9114 * tree-ssa-uninit.c (warn_uninit): Likewise.
9115 * tree.c (warn_deprecated_use): Likewise.
9117 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
9120 * config/i386/i386.md (eh_return): Always update EH return
9121 address in word_mode.
9123 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
9125 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
9126 TARGET_SPLIT_COMPLEX_ARG is defined.
9128 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9130 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
9132 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9135 * expr.c (expand_assignment): Assert that bitpos is positive.
9136 (store_field): Likewise
9137 (expand_expr_real_1): Make sure that bitpos is positive.
9138 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
9141 2018-08-20 Nathan Sidwell <nathan@acm.org>
9143 * Makefile.in (CPP_ID_DATA_H): Delete.
9144 (CPP_INTERNAL_H): Don't add it.
9145 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
9146 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
9148 2018-08-20 Richard Biener <rguenther@suse.de>
9150 PR tree-optimization/78655
9151 * tree-vrp.c (extract_range_from_binary_expr_1): Make
9152 pointer + offset nonnull if either operand is nonnull work.
9154 2018-08-20 Tom de Vries <tdevries@suse.de>
9156 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
9157 unless the referenced die describes the added property using
9158 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
9159 Otherwise, add a DW_AT_location to the referenced die.
9161 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
9164 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
9165 register_operand when calling ix86_set_reg_reg_cost.
9166 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
9167 Set *total to 0 for operands that satisfy x86_64_immediate_operand
9168 predicate and to 1 otherwise.
9170 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
9172 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
9173 emit a diagnostic that it is not supported and reset the option.
9174 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
9175 supported and consume the option. (ASM_FINAL_SPEC): New.
9177 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9179 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
9182 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
9184 C-SKY port: Documentation
9186 * doc/extend.texi (C-SKY Function Attributes): New section.
9187 * doc/invoke.texi (Option Summary): Add C-SKY options.
9188 (C-SKY Options): New section.
9189 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
9191 2018-08-17 Jojo <jijie_rong@c-sky.com>
9192 Huibin Wang <huibin_wang@c-sky.com>
9193 Sandra Loosemore <sandra@codesourcery.com>
9194 Chung-Lin Tang <cltang@codesourcery.com>
9196 C-SKY port: Backend implementation
9198 * config/csky/*: New.
9199 * common/config/csky/*: New.
9201 2018-08-17 Jojo <jijie_rong@c-sky.com>
9202 Huibin Wang <huibin_wang@c-sky.com>
9203 Sandra Loosemore <sandra@codesourcery.com>
9204 Chung-Lin Tang <cltang@codesourcery.com>
9205 Andrew Jenner <andrew@codesourcery.com>
9207 C-SKY port: Configury
9209 * config.gcc (csky-*-*): New.
9210 * configure.ac: Add csky to targets for dwarf2 debug_line support.
9211 * configure: Regenerated.
9213 2018-08-17 David Malcolm <dmalcolm@redhat.com>
9215 * dump-context.h: Include "dumpfile.h".
9216 (dump_context::dump_printf_va): Convert final param from va_list
9217 to va_list *. Convert from ATTRIBUTE_PRINTF to
9218 ATTRIBUTE_GCC_DUMP_PRINTF.
9219 (dump_context::dump_printf_loc_va): Likewise.
9220 * dumpfile.c: Include "stringpool.h".
9221 (make_item_for_dump_printf_va): Delete.
9222 (make_item_for_dump_printf): Delete.
9223 (class dump_pretty_printer): New class.
9224 (dump_pretty_printer::dump_pretty_printer): New ctor.
9225 (dump_pretty_printer::emit_items): New member function.
9226 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
9228 (dump_pretty_printer::emit_item): New member function.
9229 (dump_pretty_printer::stash_item): New member function.
9230 (dump_pretty_printer::format_decoder_cb): New member function.
9231 (dump_pretty_printer::decode_format): New member function.
9232 (dump_context::dump_printf_va): Reimplement in terms of
9233 dump_pretty_printer.
9234 (dump_context::dump_printf_loc_va): Convert final param from va_list
9236 (dump_context::begin_scope): Reimplement call to
9237 make_item_for_dump_printf.
9238 (dump_printf): Update for change to dump_printf_va.
9239 (dump_printf_loc): Likewise.
9240 (selftest::test_capture_of_dump_calls): Convert "stmt" from
9241 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
9242 with %T, %E, and %G.
9243 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9244 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9245 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9246 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9247 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9248 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9249 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9250 within a dump_printf_loc call to "%wu".
9251 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9252 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
9253 missing space after "=".
9254 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9255 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9256 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9257 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9258 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
9259 duplicate "vectorized" from message.
9261 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
9263 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9264 polyNxK_t element's TYPE_STRING_FLAG.
9266 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9268 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9269 (they were unnamed before). Fix comments.
9271 2018-08-17 Nathan Sidwell <nathan@acm.org>
9273 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9275 2018-08-17 Richard Biener <rguenther@suse.de>
9277 PR tree-optimization/86841
9278 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9280 2018-08-17 Martin Liska <mliska@suse.cz>
9282 * common.opt: Remove Warn, Init and Report for options with
9283 Ignore/Deprecated flag. Warning is done automatically for
9285 * config/i386/i386.opt: Likewise.
9286 * config/ia64/ia64.opt: Likewise.
9287 * config/rs6000/rs6000.opt: Likewise.
9288 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9289 Remove usage of flag_check_pointer_bounds.
9290 * lto-wrapper.c (merge_and_complain): Do not handle
9291 OPT_fcheck_pointer_bounds.
9292 (append_compiler_options): Likewise.
9293 * opt-functions.awk: Do not handle Deprecated.
9294 * optc-gen.awk: Check that Var, Report and Init are not
9295 used for an option with Ignore/Deprecated flag.
9296 * opts-common.c (decode_cmdline_option): Do not report
9298 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9300 * opts.h (struct cl_option): Remove cl_deprecated flag.
9301 (CL_ERR_DEPRECATED): Remove error enum value.
9303 2018-08-17 Richard Biener <rguenther@suse.de>
9306 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9307 across a va-arg-pack using call adjust its return value accordingly.
9309 2018-08-16 Martin Sebor <msebor@redhat.com>
9311 PR tree-optimization/86853
9312 * gimple-ssa-sprintf.c (struct format_result): Rename member.
9313 (struct fmtresult): Add member and initialize it in ctors.
9314 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
9315 (format_string): Handle %S the same as %ls. Set MAYFAIL.
9316 (format_directive): Set POSUNDER4K when MAYFAIL is set.
9317 (parse_directive): Handle %C same as %c.
9318 (sprintf_dom_walker::compute_format_length): Adjust.
9319 (is_call_safe): Adjust.
9321 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9323 * builtins.c (c_strlen): Add new parameter eltsize. Use it
9324 for determining how to count the elements.
9325 * builtins.h (c_strlen): Adjust prototype.
9326 * expr.c (string_constant): Add new parameter mem_size.
9327 Set *mem_size appropriately.
9328 * expr.h (string_constant): Adjust protoype.
9329 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9330 * gimple-fold.h (get_range_strlen): Adjust prototype.
9331 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9332 (format_string): Call get_string_length with eltsize.
9334 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9336 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9337 to emit the span, rather than setting it as the prefix.
9339 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9341 * diagnostic-show-locus.c (layout::start_annotation_line): Add
9342 "margin_char" parameter, defaulting to space. Use it in place
9343 of pp_space for the initial part of the margin.
9344 (layout::print_leading_fixits): Use '+' when filling the margin
9345 of line-insertion fix-it hints.
9347 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9349 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9352 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9354 * config/rs6000/altivec.md: Don't set length attribute to the default
9356 * config/rs6000/darwin.md: Ditto.
9357 * config/rs6000/dfp.md: Ditto.
9358 * config/rs6000/htm.md: Ditto.
9359 * config/rs6000/rs6000.md: Ditto.
9360 * config/rs6000/sync.md: Ditto.
9361 * config/rs6000/vsx.md: Ditto.
9363 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9365 * config/rs6000/altivec.md: Don't set length attribute to the default
9366 value, for branch instructions.
9367 * config/rs6000/darwin.md: Ditto.
9368 * config/rs6000/rs6000.md: Ditto.
9370 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9372 * config/rs6000/rs6000.md (length): Always define as const_int 4.
9373 (unnamed conditional branch define_insn): Set length to 4 or 8
9374 depending on offset.
9375 (<bd>_<mode>): Similar, for alternative 0.
9376 (<bd>tf_<mode>): Ditto.
9378 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9380 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9382 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
9384 * doc/rtl.texi: Replace old RTX class names with new names.
9387 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
9389 * expmed.h (canonicalize_comparison): New declaration.
9390 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9391 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9392 * optabs.c (prepare_cmp_insn): Likewise.
9393 * rtl.h (unsigned_condition_p): New function which checks if a
9394 comparison operator is unsigned.
9396 2018-08-16 Nathan Sidwell <nathan@acm.org>
9398 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9399 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9401 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9404 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9405 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9406 (mov<mov>): ..this and enable unconditionally.
9408 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9410 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9412 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
9414 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9415 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9416 "Common" with "Target".
9418 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9420 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9421 * doc/invoke.texi (mmitigate-rop): Remove.
9422 * config/i386/i386.c: Do not include "regrename.h".
9423 (ix86_rop_should_change_byte_p, reg_encoded_number)
9424 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9426 (ix86_reorg): Remove call to ix86_mitigate_rop.
9427 * config/i386/i386.md (attr "modrm_class"): Remove.
9428 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9429 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9430 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9432 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
9434 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9435 allow folding of mergeh() and mergel() for the float and double types.
9436 (fold_mergehl_helper): Rework to handle building a permute tree
9439 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9441 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9444 2018-08-15 David Malcolm <dmalcolm@redhat.com>
9446 * common.opt (fdiagnostics-show-labels): New option.
9447 * diagnostic-show-locus.c (class layout_range): Add field
9449 (class layout): Add field "m_show_labels_p".
9450 (layout_range::layout_range): Add param "label" and use it to
9452 (make_range): Pass in NULL for new "label" param of layout_range's
9454 (layout::layout): Initialize m_show_labels_p.
9455 (layout::maybe_add_location_range): Pass in loc_range->m_label
9456 when constructing layout_range instances.
9457 (struct line_label): New struct.
9458 (layout::print_any_labels): New member function.
9459 (layout::print_line): Call it if label-printing is enabled.
9460 (selftest::test_one_liner_labels): New test.
9461 (selftest::test_diagnostic_show_locus_one_liner): Call it.
9462 * diagnostic.c (diagnostic_initialize): Initialize
9463 context->show_labels_p.
9464 * diagnostic.h (struct diagnostic_context): Add field
9466 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9467 -fno-diagnostics-show-labels.
9468 * dwarf2out.c (gen_producer_string): Add
9469 OPT_fdiagnostics_show_labels to the ignored options.
9470 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9472 (gcc_rich_location::maybe_add_expr): Likewise.
9473 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9474 label" param, defaulting to NULL.
9475 (gcc_rich_location::add_expr): Add "label" param.
9476 (gcc_rich_location::maybe_add_expr): Likewise.
9477 (class text_range_label): New class.
9478 (class range_label_for_type_mismatch): New class.
9479 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9480 of format_warning_va.
9481 (fmtwarn_n): Likewise for new params of format_warning_n_va.
9482 * lto-wrapper.c (merge_and_complain): Add
9483 OPT_fdiagnostics_show_labels to the "pick one setting" options.
9484 (append_compiler_options): Likewise to the dropped options.
9485 (append_diag_options): Likewise to the passed-on options.
9486 * opts.c (common_handle_option): Handle the new option.
9487 * selftest-diagnostic.c
9488 (test_diagnostic_context::test_diagnostic_context): Enable
9490 * substring-locations.c: Include "gcc-rich-location.h".
9491 (format_warning_n_va): Add "fmt_label" and "param_label" params
9492 and use them as appropriate.
9493 (format_warning_va): Add "fmt_label" and "param_label" params,
9494 passing them on to format_warning_n_va.
9495 (format_warning_at_substring): Likewise.
9496 (format_warning_at_substring_n): Likewise.
9497 * substring-locations.h (format_warning_va): Add "fmt_label" and
9498 "param_label" params.
9499 (format_warning_n_va): Likewise.
9500 (format_warning_at_substring): Likewise.
9501 (format_warning_at_substring_n): Likewise.
9502 * toplev.c (general_init): Initialize global_dc->show_labels_p.
9504 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
9507 * builtins.c (expand_builtin_memcmp): Do not expand the call
9508 when overflow is detected.
9510 2018-08-15 Martin Sebor <msebor@redhat.com>
9512 PR tree-optimization/71625
9513 * config/aarch64/aarch64-builtins.c
9514 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9516 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
9518 * config/s390/s390.c (s390_reorg): Remove loop.
9520 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9523 (darwin_function_switched_text_sections): Delete.
9524 * gcc/config/darwin.h
9525 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9527 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9530 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9531 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
9532 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9534 2018-08-15 Martin Liska <mliska@suse.cz>
9536 PR tree-optimization/86925
9537 * predict.c (expr_expected_value_1): When taking
9538 later predictor, assign also probability.
9539 Use fold_build2_initializer_loc in order to fold
9540 the expression in -frounding-math.
9542 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9544 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9546 (expand_vec_perm_1): Try the new method.
9548 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9551 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9552 Check whether lra_live_max_point is 0 before dividing.
9554 2018-08-14 Martin Sebor <msebor@redhat.com>
9556 PR tree-optimization/86650
9557 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9558 (vrp_prop::check_mem_ref): Same.
9560 2018-08-13 Liu Hao <lh_mouse@126.com>
9562 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9563 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9564 and clear it thereafter, as it only works for DBCS.
9566 2018-08-13 Liu Hao <lh_mouse@126.com>
9568 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9569 handle returned by _get_osf_handle().
9571 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9573 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9574 for folding vec_perm.
9576 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9578 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9579 Add support for gimple-folding of vec_pack() and vec_unpack()
9582 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9584 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9585 vec_xst variants to the list.
9586 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9587 vector loads and stores.
9589 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9591 * config.gcc (rs6000-ibm-aix4.x): Delete.
9592 (rs6000-ibm-aix5.1): Delete.
9593 (rs6000-ibm-aix5.2): Delete.
9594 (rs6000-ibm-aix5.3): Delete.
9595 * config/rs6000/aix43.h: Delete.
9596 * config/rs6000/aix51.h: Delete.
9597 * config/rs6000/aix52.h: Delete.
9598 * config/rs6000/t-aix43: Delete.
9600 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9602 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9604 (s390_decompose_address): Factor out constant pool ref
9607 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9609 * config/nds32/nds32-predicates.c
9610 (nds32_can_use_bclr_p): Change return type as bool.
9611 (nds32_can_use_bset_p): Ditto.
9612 (nds32_can_use_btgl_p): Ditto.
9613 (nds32_can_use_bitci_p): Ditto.
9614 * config/nds32/nds32-protos.h
9615 (nds32_can_use_bclr_p): Change declaration.
9616 (nds32_can_use_bset_p): Ditto.
9617 (nds32_can_use_btgl_p): Ditto.
9618 (nds32_can_use_bitci_p): Ditto.
9620 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9622 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9623 Support -msched-prolog-epilog option.
9624 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9626 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9628 * common/config/nds32/nds32-common.c
9629 (nds32_option_optimization_table): Enalbe -malways-align.
9631 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9633 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9635 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9636 OPT_misr_secure_ case.
9637 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9638 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9639 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9641 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9642 (nds32_isr_info): New field security_level.
9643 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9644 * config/nds32/nds32.md (return_internal): Consider critical attribute.
9645 * config/nds32/nds32.opt (misr-secure): New option.
9646 * config/nds32/nds32_init.inc: New file.
9647 * config/nds32/nds32_isr.h: New file.
9649 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
9651 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9652 Update comment for atomic instructions.
9653 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9654 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9656 (atomic_loaddi): Revise fence expansion to only emit fence prior to
9657 load for __ATOMIC_SEQ_CST model.
9658 (atomic_loaddi_1): Remove float register target.
9659 (atomic_storedi): Handle CONST_INT values.
9660 (atomic_storedi_1): Remove float register source. Add special case
9662 (memory_barrier): New expander and insn.
9664 2018-08-11 Jakub Jelinek <jakub@redhat.com>
9666 PR tree-optimization/86835
9667 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9668 new_stmt after def_gsi, make sure to insert new_square_stmt after
9669 that stmt, not 2 stmts before it.
9671 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
9674 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9677 2018-08-10 Martin Liska <mliska@suse.cz>
9680 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9682 * builtins.c (expand_builtin_expect_with_probability):
9684 (expand_builtin_expect_with_probability): New function.
9685 (build_builtin_expect_predicate): Add new argumnet probability
9686 for BUILT_IN_EXPECT_WITH_PROBABILITY.
9687 (fold_builtin_expect):
9690 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9691 * builtins.h (fold_builtin_expect): Set new argument.
9692 * doc/extend.texi: Document __builtin_expect_with_probability.
9693 * doc/invoke.texi: Likewise.
9694 * gimple-fold.c (gimple_fold_call): Pass new argument.
9695 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9696 also BUILT_IN_EXPECT_WITH_PROBABILITY.
9697 * predict.c (get_predictor_value): New function.
9698 (expr_expected_value): Add new argument probability. Assume
9699 that predictor and probability are always non-null.
9700 (expr_expected_value_1): Likewise. For __builtin_expect and
9701 __builtin_expect_with_probability set probability. Handle
9702 combination in binary expressions.
9703 (tree_predict_by_opcode): Simplify code by simply calling
9704 get_predictor_value.
9705 (pass_strip_predict_hints::execute): Add handling of
9706 BUILT_IN_EXPECT_WITH_PROBABILITY.
9707 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9709 * tree.h (DECL_BUILT_IN_P): New function.
9711 2018-08-10 Martin Liska <mliska@suse.cz>
9713 PR tree-optimization/85799
9714 * passes.def: Add argument for pass_strip_predict_hints.
9715 * predict.c (class pass_strip_predict_hints): Add new argument
9717 (strip_predictor_early): New function.
9718 (pass_strip_predict_hints::execute): Call the function to
9720 (strip_predict_hints): New function.
9721 * predict.def: Fix comment.
9723 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
9725 * Makefile.in: Clarify which tm.texi to copy over to assert the
9726 right to grant a GFDL license for all.
9728 2018-08-09 Jeff Law <law@redhat.com>
9730 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9733 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
9735 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9738 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9740 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9741 reductions for variable-length vectors.
9743 2018-08-09 David Malcolm <dmalcolm@redhat.com>
9746 * common.opt (fdiagnostics-show-line-numbers): New option.
9747 * diagnostic-show-locus.c (class layout): Add fields
9748 "m_show_line_numbers_p" and "m_linenum_width";
9749 (num_digits): New function.
9750 (test_num_digits): New function.
9751 (layout::layout): Initialize new fields. Update m_x_offset
9752 logic to handle any left margin.
9753 (layout::print_source_line): Print line number when requested.
9754 (layout::start_annotation_line): New member function.
9755 (layout::print_annotation_line): Call it.
9756 (layout::print_leading_fixits): Likewise.
9757 (layout::print_trailing_fixits): Likewise. Update calls to
9758 move_to_column for new parameter.
9759 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9760 it to potentially call start_annotation_line.
9761 (layout::show_ruler): Call start_annotation_line.
9762 (selftest::test_line_numbers_multiline_range): New selftest.
9763 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9764 and selftest::test_line_numbers_multiline_range.
9765 * diagnostic.c (diagnostic_initialize): Initialize
9766 show_line_numbers_p.
9767 * diagnostic.h (struct diagnostic_context): Add field
9768 "show_line_numbers_p".
9769 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9770 -fno-diagnostics-show-line-numbers.
9771 * dwarf2out.c (gen_producer_string): Add
9772 OPT_fdiagnostics_show_line_numbers to the ignored options.
9773 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9774 one setting" options.
9775 (append_compiler_options): Likewise to the dropped options.
9776 (append_diag_options): Likewise to the passed-on options.
9777 * opts.c (common_handle_option): Handle the new option.
9778 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9780 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
9782 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9783 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
9784 third argument of type "const signed char" to descriptions of
9785 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9786 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9787 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9788 __builtin_bcdsub_ov functions.
9790 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9792 PR tree-optimization/86858
9793 * tree-vect-loop.c (vect_is_simple_reduction): Restore
9794 flow_bb_inside_loop_p calls.
9796 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9798 PR tree-optimization/86871
9799 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9800 instead of gimple_assign_lhs.
9802 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
9805 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9806 register constraint to operand 0.
9807 (add<mode>3_carryinC): Likewise.
9808 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9810 2018-08-09 Martin Liska <mliska@suse.cz>
9813 * common.opt: Remove extra line.
9815 2018-08-09 Martin Liska <mliska@suse.cz>
9817 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9818 at the end of a line, make first letter capital and end up
9819 a sentence with a dot.
9820 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9821 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9822 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9823 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9824 (PARAM_MAX_ISL_OPERATIONS): Likewise.
9825 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9826 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9827 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9828 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9829 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9830 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9831 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9832 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9833 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9834 (PARAM_TREE_REASSOC_WIDTH): Likewise.
9835 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9836 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9837 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9839 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
9842 * config/s390/s390.c (s390_option_override_internal): Reduce the
9843 stack-clash-protection-probe-interval param if it would be too big
9846 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
9849 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9850 * config/m68k/m68k.c (handle_move_double): Don't call
9851 m68k_final_prescan_insn.
9852 (m68k_adjust_decorated_operand): Renamed from
9853 m68k_final_prescan_insn, remove first and third operand and
9855 (print_operand): Call it.
9856 (print_operand_address): Call it.
9858 2018-08-08 Nathan Sidwell <nathan@acm.org>
9860 * diagnostic.c (diagnostic_report_current_module): Use
9861 linemap_included_from & linemap_included_from_linemap.
9863 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
9865 * config/aarch64/aarch64-cores.def: Add phecda core.
9866 * config/aarch64/aarch64-tune.md: Regenerate.
9867 * doc/invoke.texi: Add phecda core.
9869 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9872 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9874 * config/s390/s390.md ("movti"): Add more alternatives for
9875 constant to GPR copies.
9877 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9879 * config/s390/s390.c: Fix whitespace damage throughout the file.
9880 * config/s390/s390.h: Likewise.
9881 * config/s390/tpf.h: Likewise.
9883 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9885 * config/s390/s390.c (s390_loadrelative_operand_p):
9886 Remove TARGET_CPU_ZARCH usages.
9887 (s390_rtx_costs): Likewise.
9888 (s390_legitimate_constant_p): Likewise.
9889 (s390_cannot_force_const_mem): Likewise.
9890 (legitimate_reload_constant_p): Likewise.
9891 (s390_preferred_reload_class): Likewise.
9892 (legitimize_pic_address): Likewise.
9893 (legitimize_tls_address): Likewise.
9894 (s390_split_branches): Removed.
9895 (s390_add_execute): Removed.
9896 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9897 (s390_mainpool_start): Likewise.
9898 (s390_mainpool_finish): Likewise.
9899 (s390_mainpool_cancel): Removed.
9900 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9901 (s390_chunkify_cancel): Likewise.
9902 (s390_return_addr_rtx): Likewise.
9903 (s390_register_info): Remove split_branches_pending_p uages.
9904 (s390_optimize_register_info): Likewise.
9905 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9906 split_branches_pending_p usages.
9907 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9908 (s390_load_got): Likewise.
9909 (s390_expand_split_stack_prologue): Likewise.
9910 (output_asm_nops): Likewise.
9911 (s390_function_profiler): Likewise.
9912 (s390_emit_call): Likewise.
9913 (s390_conditional_register_usage): Likewise.
9914 (s390_optimize_prologue): Likewise.
9915 (s390_reorg): Remove TARGET_CPU_ZARCH and
9916 split_branches_pending_p usages.
9917 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9919 (s390_output_indirect_thunk_function): Likewise.
9920 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9921 (TARGET_CPU_ZARCH_P): Removed.
9922 (struct machine_function): Remove split_branches_pending_p.
9923 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9925 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9927 * common/config/s390/s390-common.c (processor_flags_table):
9929 * config.gcc: Remove with_arch/with_tune support.
9930 * config/s390/2064.md: Remove cpu attribute comparisons.
9931 * config/s390/driver-native.c (s390_host_detect_local_cpu):
9933 * config/s390/linux.h (ASM_SPEC):
9934 Remove -march support.
9935 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9936 Use a table to get an arch level.
9937 * config/s390/s390-opts.h (enum processor_type):
9939 * config/s390/s390.c
9940 (processor_table): Remove entries, add arch_level values.
9941 (s390_issue_rate): Remove cases.
9942 (s390_option_override): Adjust
9943 s390_option_override_internal() call.
9944 (s390_option_override_internal): Remove deprecation warning.
9945 (s390_valid_target_attribute_tree): Adjust
9946 s390_option_override_internal() call.
9947 * config/s390/s390.h (struct s390_processor):
9948 Share with s390-c.c, add arch_level field.
9949 * config/s390/s390.md:
9950 Remove occurrences in cpu attribute.
9951 * config/s390/s390.opt: Remove -march/-mtune support.
9952 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9953 * doc/invoke.texi: Remove deprecation warning.
9955 2018-08-08 Luis Machado <luis.machado@linaro.org>
9957 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9959 (qdf24xx_tunings): Set vector cost structure to
9960 qdf24xx_vector_cost.
9962 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9963 <register_sextend>: Set to 3.
9965 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
9968 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9969 * config/aarch64/aarch64-simd.md
9970 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9971 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9972 (aarch64_frecpx<mode>): ...this new pattern.
9973 * config/aarch64/aarch64-simd-builtins.def: Remove comment
9974 about aarch64_frecp<FRECP:frecp_suffix><mode>.
9976 2018-08-07 Martin Liska <mliska@suse.cz>
9979 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9980 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9981 * predict.def (PRED_MALLOC_NONNULL): New predictor.
9982 * doc/extend.texi: Document that malloc attribute adds
9985 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
9988 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9989 Define to speculation_safe_value_not_needed.
9991 2018-08-06 Jeff Law <law@redhat.com>
9993 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9994 the vr_values instance to cprop_into_stmt.
9995 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9996 (cprop_operand): Also query EVRP to determine if OP is a constant.
9998 2018-08-06 Nathan Sidwell <nathan@acm.org>
10000 * diagnostic.c (diagnostic_report_current_module): Reroll
10001 included-at loop. Translate text.
10003 2018-08-06 David Malcolm <dmalcolm@redhat.com>
10005 * function-tests.c (selftest::test_expansion_to_rtl): Call
10006 free_after_compilation.
10008 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10010 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
10012 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
10014 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
10015 loops with memory block operations from getting unrolled.
10017 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
10020 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10021 Define to speculation_safe_value_not_needed.
10023 2018-08-06 Jeff Law <law@redhat.com>
10025 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
10028 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10031 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
10032 with all enabled __intN types.
10034 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
10036 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10038 * alias.c (record_set): Check for clobber high.
10039 * cfgexpand.c (expand_gimple_stmt): Likewise.
10040 * combine-stack-adj.c (single_set_for_csa): Likewise.
10041 * combine.c (find_single_use_1): Likewise.
10042 (set_nonzero_bits_and_sign_copies): Likewise.
10043 (get_combine_src_dest): Likewise.
10044 (is_parallel_of_n_reg_sets): Likewise.
10045 (try_combine): Likewise.
10046 (record_dead_and_set_regs_1): Likewise.
10047 (reg_dead_at_p_1): Likewise.
10048 (reg_dead_at_p): Likewise.
10049 * dce.c (deletable_insn_p): Likewise.
10050 (mark_nonreg_stores_1): Likewise.
10051 (mark_nonreg_stores_2): Likewise.
10052 * df-scan.c (df_find_hard_reg_defs): Likewise.
10053 (df_uses_record): Likewise.
10054 (df_get_call_refs): Likewise.
10055 * dwarf2out.c (mem_loc_descriptor): Likewise.
10056 * haifa-sched.c (haifa_classify_rtx): Likewise.
10057 * ira-build.c (create_insn_allocnos): Likewise.
10058 * ira-costs.c (scan_one_insn): Likewise.
10059 * ira.c (equiv_init_movable_p): Likewise.
10060 (rtx_moveable_p): Likewise.
10061 (interesting_dest_for_shprep): Likewise.
10062 * jump.c (mark_jump_label_1): Likewise.
10063 * postreload-gcse.c (record_opr_changes): Likewise.
10064 * postreload.c (reload_cse_simplify): Likewise.
10065 (struct reg_use): Add source expr.
10066 (reload_combine): Check for clobber high.
10067 (reload_combine_note_use): Likewise.
10068 (reload_cse_move2add): Likewise.
10069 (move2add_note_store): Likewise.
10070 * print-rtl.c (print_pattern): Likewise.
10071 * recog.c (decode_asm_operands): Likewise.
10072 (store_data_bypass_p): Likewise.
10073 (if_test_bypass_p): Likewise.
10074 * regcprop.c (kill_clobbered_value): Likewise.
10075 (kill_set_value): Likewise.
10076 * reginfo.c (reg_scan_mark_refs): Likewise.
10077 * reload1.c (maybe_fix_stack_asms): Likewise.
10078 (eliminate_regs_1): Likewise.
10079 (elimination_effects): Likewise.
10080 (mark_not_eliminable): Likewise.
10081 (scan_paradoxical_subregs): Likewise.
10082 (forget_old_reloads_1): Likewise.
10083 * reorg.c (find_end_label): Likewise.
10084 (try_merge_delay_insns): Likewise.
10085 (redundant_insn): Likewise.
10086 (own_thread_p): Likewise.
10087 (fill_simple_delay_slots): Likewise.
10088 (fill_slots_from_thread): Likewise.
10089 (dbr_schedule): Likewise.
10090 * resource.c (update_live_status): Likewise.
10091 (mark_referenced_resources): Likewise.
10092 (mark_set_resources): Likewise.
10093 * rtl.c (copy_rtx): Likewise.
10094 * rtlanal.c (reg_referenced_p): Likewise.
10095 (single_set_2): Likewise.
10096 (noop_move_p): Likewise.
10097 (note_stores): Likewise.
10098 * sched-deps.c (sched_analyze_reg): Likewise.
10099 (sched_analyze_insn): Likewise.
10101 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10103 * cse.c (invalidate_reg): New function extracted from...
10104 (invalidate): ...here.
10105 (canonicalize_insn): Check for clobber high.
10106 (invalidate_from_clobbers): invalidate clobber highs.
10107 (invalidate_from_sets_and_clobbers): Likewise.
10108 (count_reg_usage): Check for clobber high.
10109 (insn_live_p): Likewise.
10110 * cselib.c (cselib_expand_value_rtx_1):Likewise.
10111 (cselib_invalidate_regno): Check for clobber in setter.
10112 (cselib_invalidate_rtx): Pass through setter.
10113 (cselib_invalidate_rtx_note_stores):
10114 (cselib_process_insn): Check for clobber high.
10115 * cselib.h (cselib_invalidate_rtx): Add operand.
10117 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10119 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
10120 (mark_not_eliminable): Likewise.
10121 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
10122 * lra-lives.c (process_bb_lives): Check for clobber high.
10123 * lra.c (new_insn_reg): Remember clobber highs.
10124 (collect_non_operand_hard_regs): Check for clobber high.
10125 (lra_set_insn_recog_data): Likewise.
10126 (add_regs_to_insn_regno_info): Likewise.
10127 (lra_update_insn_regno_info): Likewise.
10129 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10131 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
10132 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
10134 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10136 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
10137 (copy_insn_1): Likewise.
10138 (gen_hard_reg_clobber_high): New gen function.
10139 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
10140 * genemit.c (gen_exp): Likewise.
10141 (gen_emit_seq): Pass through info.
10142 (gen_insn): Check for CLOBBER_HIGH.
10143 (gen_expand): Pass through info.
10144 (gen_split): Likewise.
10145 (output_add_clobbers): Likewise.
10146 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
10147 (remove_clobbers): Likewise.
10148 * rtl.h (gen_hard_reg_clobber_high): New declaration.
10150 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10152 * doc/rtl.texi (clobber_high): Add.
10153 (parallel): Add in clobber high
10154 * rtl.c (rtl_check_failed_code3): Add function.
10155 * rtl.def (CLOBBER_HIGH): Add expression.
10156 * rtl.h (RTL_CHECKC3): Add macro.
10157 (rtl_check_failed_code3): Add declaration.
10158 (XC3EXP): Add macro.
10160 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
10163 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
10164 cfun->machine->max_used_stack_alignment if needed.
10166 2018-08-04 Martin Sebor <msebor@redhat.com>
10168 PR tree-optimization/86571
10169 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
10172 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
10175 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10178 2018-08-03 Jeff Law <law@redhat.com>
10181 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10182 Define to speculation_safe_value_not_needed.
10184 2018-08-03 David Malcolm <dmalcolm@redhat.com>
10186 * doc/gcov.texi (-x): Remove duplicate "to".
10187 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
10188 (-Wif-not-aligned): Remove duplicate "is".
10189 (-flto): Remove duplicate "the".
10190 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
10191 duplicate "v5.00.b".
10192 (MSP430 Options): Remove duplicate "and" from the description
10193 of "-mgprel-sec=regexp".
10194 (x86 Options): Remove duplicate copies of "vmldLog102" and
10195 vmlsLog104 from description of "-mveclibabi=type".
10197 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
10199 * internal-fn.h (first_commutative_argument): Declare.
10200 * internal-fn.c (first_commutative_argument): New function.
10201 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10202 restrictions for pattern statements. Use first_commutative_argument
10203 to look for commutative operands in calls to internal functions.
10205 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
10207 * Makefile.in (wide-int-range.o): New.
10208 * tree-vrp.c: Move all the wide_int_* functions to...
10209 * wide-int-range.cc: ...here.
10210 * tree-vrp.h: Move all the wide_int_* prototypes to...
10211 * wide-int-range.h: ...here.
10213 2018-08-03 Tom de Vries <tdevries@suse.de>
10215 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
10217 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
10218 * except.c (output_function_exception_table): Do early exit if
10219 targetm_common.except_unwind_info (&global_options) == UI_NONE.
10221 2018-08-03 Martin Liska <mliska@suse.cz>
10223 * predict.c (dump_prediction): Change to 2 digits
10226 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
10228 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
10230 (falkor_am_1_gtov_gtov): ... a new insn reservation.
10232 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
10234 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
10235 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
10236 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
10237 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
10238 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
10240 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10242 * diagnostic-show-locus.c (diagnostic_show_locus): Use
10243 pp_take_prefix when saving the existing prefix.
10244 * diagnostic.c (diagnostic_append_note): Likewise.
10245 * langhooks.c (lhd_print_error_function): Likewise.
10246 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10247 param's type. Free the existing prefix.
10248 (pp_take_prefix): New function.
10249 (pretty_printer::pretty_printer): Drop the prefix parameter.
10250 Rename the length parameter to match the comment.
10251 (pretty_printer::~pretty_printer): Free the prefix.
10252 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10254 (struct pretty_printer): Drop the "const" from "prefix" field's
10255 type and clarify memory management.
10256 (pp_set_prefix): Drop the "const" from the 2nd param.
10257 (pp_take_prefix): New decl.
10259 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
10261 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10262 for word_mode_ok here instead of passing as argument.
10263 (expand_block_compare): Change select_block_compare_mode() call.
10264 (expand_strncmp_gpr_sequence): New function.
10265 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10267 2018-08-02 Jeff Law <law@redhat.com>
10270 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10271 Define to speculation_safe_value_not_needed.
10274 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10275 Define to speculation_safe_value_not_needed.
10277 2018-08-02 Tom de Vries <tdevries@suse.de>
10280 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10281 function. Return UI_TARGET unconditionally.
10282 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10283 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10285 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10287 * genemit.c (print_overload_test): Fix typo.
10289 2018-08-02 Richard Biener <rguenther@suse.de>
10291 PR tree-optimization/86816
10292 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10293 which checks for value availability before querying it.
10294 (gvn_uses_equal): Use it.
10295 (same_succ_hash): Likewise.
10296 (gimple_equal_p): Likewise.
10298 2018-08-02 Nick Clifton <nickc@redhat.com>
10301 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10302 Define to speculation_safe_value_not_needed.
10305 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10306 Define to speculation_safe_value_not_needed.
10309 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10310 Define to speculation_safe_value_not_needed.
10313 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10314 Define to speculation_safe_value_not_needed.
10317 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10318 Define to speculation_safe_value_not_needed.
10321 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10322 Define to speculation_safe_value_not_needed.
10325 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10326 Define to speculation_safe_value_not_needed.
10329 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10330 Define to speculation_safe_value_not_needed.
10333 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10334 speculation_safe_value_not_needed.
10337 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10338 to speculation_safe_value_not_needed.
10340 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10342 * doc/md.texi: Expand the documentation of instruction names
10343 to mention port-local uses. Document '@' in pattern names.
10344 * read-md.h (overloaded_instance, overloaded_name): New structs.
10345 (mapping): Declare.
10346 (md_reader::handle_overloaded_name): New member function.
10347 (md_reader::get_overloads): Likewise.
10348 (md_reader::m_first_overload): New member variable.
10349 (md_reader::m_next_overload_ptr): Likewise.
10350 (md_reader::m_overloads_htab): Likewise.
10351 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10352 m_next_overload_ptr and m_overloads_htab.
10353 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10354 (get_mode_token, get_code_token, get_int_token): New functions.
10355 (map_attr_string): Add an optional argument that passes back
10356 the associated iterator.
10357 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10358 (md_reader::handle_overloaded_name, add_overload_instance): New
10360 (apply_iterators): Handle '@' names. Report an error if '@'
10361 is used without iterators.
10362 (initialize_iterators): Initialize the new iterator_group fields.
10363 * genopinit.c (handle_overloaded_code_for)
10364 (handle_overloaded_gen): New functions.
10365 (main): Use them to print declarations of maybe_code_for_* and
10366 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10367 * genemit.c (print_overload_arguments, print_overload_test)
10368 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10369 (main): Use it to print definitions of maybe_code_for_* and
10370 maybe_gen_* functions.
10371 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10372 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10373 instead of explicit mode checks.
10374 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10375 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10376 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10377 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10378 (aarch64_expand_compare_and_swap): Likewise
10379 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10380 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10381 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10382 (aarch64_constant_pool_reload_icode): Delete.
10383 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10384 instead of aarch64_constant_pool_reload_icode. Use
10385 code_for_aarch64_reload_mov instead of explicit mode checks.
10386 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10387 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10388 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10389 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10390 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10391 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10392 (aarch64_atomic_load_op_code): Delete.
10393 (aarch64_emit_atomic_load_op): Likewise.
10394 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10395 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
10396 instead of aarch64_emit_atomic_load_op.
10397 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10398 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10399 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10400 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10401 character before the pattern name.
10402 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10403 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10404 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10405 (aarch64_frecps<mode>): Likewise.
10406 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10407 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10408 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10409 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10410 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10412 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10414 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10415 Allow HFmode constants if TARGET_FP_F16INST.
10417 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
10420 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10421 No longer check last store for clobber of address register.
10423 2018-08-02 Martin Liska <mliska@suse.cz>
10425 PR gcov-profile/86817
10426 * gcov.c (process_all_functions): New function.
10428 (process_file): Move functions processing to
10429 process_all_functions.
10431 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10433 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10434 "const" to the "gimple *" and "rtx_insn *" parameters.
10435 * dumpfile.h (dump_user_location_t::dump_user_location_t):
10437 (dump_location_t::dump_location_t): Likewise.
10439 2018-08-01 Martin Sebor <msebor@redhat.com>
10441 PR tree-optimization/86650
10442 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10443 rather than a "gcall *". Directly pass the data of interest
10444 to percent_K_format, rather than building a temporary CALL_EXPR
10446 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10447 (gimple_fold_builtin_strncat): Adjust.
10448 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10449 gcall* argument with gimple*.
10450 * gimple-ssa-warn-restrict.c (check_call): Same.
10451 (wrestrict_dom_walker::before_dom_children): Same.
10452 (builtin_access::builtin_access): Same.
10453 (check_bounds_or_overlap): Same
10454 (maybe_diag_overlap): Same.
10455 (maybe_diag_offset_bounds): Same.
10456 * tree-diagnostic.c (default_tree_printer): Move usage of
10457 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10459 * tree-pretty-print.c (percent_K_format): Add argument.
10460 * tree-pretty-print.h: Add argument.
10461 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10462 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10463 (maybe_diag_stxncpy_trunc): Same.
10464 (handle_builtin_stxncpy): Same.
10465 (handle_builtin_strcat): Same.
10467 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10469 * match.pd: Optimise pointer range checks.
10471 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10473 PR tree-optimization/86758
10474 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10475 to remove pattern statements.
10477 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10479 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10480 result of dfs_enumerate_from when constructing stmt_vec_infos,
10481 instead of additionally calling get_loop_body.
10483 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10485 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10487 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10488 When creating an iv, assert that the step is not known to be zero.
10489 (vect_setup_realignment): Update call accordingly.
10490 * tree-vect-stmts.c (vectorizable_store): Likewise.
10491 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
10493 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10495 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10496 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10497 (vectorizable_reduction): Likewise.
10498 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10499 (vect_detect_hybrid_slp_stmts): Likewise.
10500 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10502 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
10504 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10505 (wide_int_set_zero_nonzero_bits): ...this.
10506 (zero_nonzero_bits_from_vr): Rename to...
10507 (vrp_set_zero_nonzero_bits): ...this.
10508 (extract_range_from_multiplicative_op_1): Abstract wide int
10510 (wide_int_range_multiplicative_op): ...here.
10511 (extract_range_from_binary_expr_1): Extract wide int binary
10512 operations into their own functions.
10513 (wide_int_range_lshift): New.
10514 (wide_int_range_can_optimize_bit_op): New.
10515 (wide_int_range_shift_undefined_p): New.
10516 (wide_int_range_bit_xor): New.
10517 (wide_int_range_bit_ior): New.
10518 (wide_int_range_bit_and): New.
10519 (wide_int_range_trunc_mod): New.
10520 (extract_range_into_wide_ints): New.
10521 (vrp_shift_undefined_p): New.
10522 (extract_range_from_multiplicative_op): New.
10523 (vrp_can_optimize_bit_op): New.
10524 * tree-vrp.h (value_range::dump): New.
10525 (wide_int_range_multiplicative_op): New.
10526 (wide_int_range_lshift):New.
10527 (wide_int_range_shift_undefined_p): New.
10528 (wide_int_range_bit_xor): New.
10529 (wide_int_range_bit_ior): New.
10530 (wide_int_range_bit_and): New.
10531 (wide_int_range_trunc_mod): New.
10532 (zero_nonzero_bits_from_bounds): Rename to...
10533 (wide_int_set_zero_nonzero_bits): ...this.
10534 (zero_nonzero_bits_from_vr): Rename to...
10535 (vrp_set_zero_nonzero_bits): ...this.
10536 (range_easy_mask_min_max): Rename to...
10537 (wide_int_range_can_optimize_bit_op): this.
10538 * vr-values.c (simplify_bit_ops_using_ranges): Rename
10539 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10541 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10543 * tree-vectorizer.h (vect_orig_stmt): New function.
10544 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10545 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10546 (vect_create_epilog_for_reduction): Likewise.
10547 (vectorizable_live_operation): Likewise.
10548 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10549 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10550 * tree-vect-stmts.c (vectorizable_call): Likewise.
10551 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10553 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10555 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10557 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10558 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10559 (vect_transform_loop): Likewise.
10560 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10562 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10564 * tree-vectorizer.h (vect_schedule_slp): Return void.
10565 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10566 (vect_schedule_slp): Likewise.
10568 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10570 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10572 (vect_transform_loop): Update calls accordingly. Schedule SLP
10573 instances before the main loop, if any exist.
10575 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10577 PR tree-optimization/86749
10578 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10579 If the lhs is used in a COND_EXPR, check that it is being used
10580 as the "then" or "else" value.
10582 2018-08-01 Tom de Vries <tdevries@suse.de>
10585 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10586 speculation_safe_value_not_needed.
10588 2018-08-01 Richard Biener <rguenther@suse.de>
10590 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10591 as base and offset.
10593 2018-08-01 Martin Liska <mliska@suse.cz>
10595 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10596 format how successful transformation is dumped.
10597 (gimple_mod_pow2_value_transform): Likewise.
10598 (gimple_mod_subtract_transform): Likewise.
10599 (gimple_stringops_transform): Likewise.
10601 2018-08-01 Martin Liska <mliska@suse.cz>
10603 PR value-prof/35543
10604 * value-prof.c (interesting_stringop_to_profile_p):
10605 Simplify the code and add BUILT_IN_MEMMOVE.
10606 (gimple_stringops_transform): Likewise.
10608 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10610 * config/aarch64/aarch64-simd.md
10611 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10612 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10613 use GPI iterator instead of SI mode.
10615 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10617 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10618 rs6000_speculation_barrier.
10619 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10620 new barrier pattern name.
10622 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10624 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10625 (speculation_barrier): New insn.
10627 2018-08-01 Richard Biener <rguenther@suse.de>
10630 * graphite.h: Include isl/id.h and isl/space.h to allow build
10633 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
10636 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10637 mode for COFF targets.
10638 * defaults.h (TARGET_COFF): Define.
10639 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10640 TARGET_COFF): Define.
10641 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10642 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10643 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10645 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10647 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10648 * gimple-streamer-out.c (output_bb): Save it.
10649 * lto-streamer-in.c (input_struct_function_base): Restore
10650 instance discriminator if available. Create map on demand.
10651 * lto-streamer-out.c (output_struct_function_base): Save it if
10653 * final.c (decl_to_instance_map): Document LTO strategy.
10655 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10656 Olivier Hainque <hainque@adacore.com>
10658 * debug.h (decl_to_instance_map_t): New type.
10659 (decl_to_instance_map): Declare.
10660 (maybe_create_decl_to_instance_map): New inline function.
10661 * final.c (bb_discriminator, last_bb_discriminator): New statics,
10662 to track basic block discriminators.
10663 (final_start_function_1): Initialize them.
10664 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10666 (decl_to_instance_map): New variable.
10667 (map_decl_to_instance, maybe_set_discriminator): New functions.
10668 (notice_source_line): Set discriminator.
10670 2018-07-31 Ian Lance Taylor <iant@golang.org>
10672 * targhooks.c (default_have_speculation_safe_value): Add
10675 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10677 * dump-context.h: Include "pretty-print.h".
10678 (dump_context::refresh_dumps_are_enabled): New decl.
10679 (dump_context::emit_item): New decl.
10680 (class dump_context): Add fields "m_test_pp" and
10682 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10683 (temp_dump_context::get_dumped_text): New decl.
10684 (class temp_dump_context): Add field "m_pp".
10685 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10686 (dump_context::refresh_dumps_are_enabled): ...and add a test for
10688 (set_dump_file): Update for above change.
10689 (set_alt_dump_file): Likewise.
10690 (dump_loc): New overload, taking a pretty_printer *.
10691 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
10692 to any test pretty-printer.
10693 (make_item_for_dump_gimple_stmt): New function, adapted from
10694 optinfo::add_gimple_stmt.
10695 (dump_context::dump_gimple_stmt): Call it, and use the result,
10696 eliminating the direct usage of dump_file and alt_dump_file in
10697 favor of indirectly using them via emit_item.
10698 (make_item_for_dump_gimple_expr): New function, adapted from
10699 optinfo::add_gimple_expr.
10700 (dump_context::dump_gimple_expr): Call it, and use the result,
10701 eliminating the direct usage of dump_file and alt_dump_file in
10702 favor of indirectly using them via emit_item.
10703 (make_item_for_dump_generic_expr): New function, adapted from
10705 (dump_context::dump_generic_expr): Call it, and use the result,
10706 eliminating the direct usage of dump_file and alt_dump_file in
10707 favor of indirectly using them via emit_item.
10708 (make_item_for_dump_printf_va): New function, adapted from
10709 optinfo::add_printf_va.
10710 (make_item_for_dump_printf): New function.
10711 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10712 and use the result, eliminating the direct usage of dump_file and
10713 alt_dump_file in favor of indirectly using them via emit_item.
10714 (make_item_for_dump_dec): New function.
10715 (dump_context::dump_dec): Call it, and use the result,
10716 eliminating the direct usage of dump_file and alt_dump_file in
10717 favor of indirectly using them via emit_item.
10718 (make_item_for_dump_symtab_node): New function, adapted from
10719 optinfo::add_symtab_node.
10720 (dump_context::dump_symtab_node): Call it, and use the result,
10721 eliminating the direct usage of dump_file and alt_dump_file in
10722 favor of indirectly using them via emit_item.
10723 (dump_context::begin_scope): Reimplement, avoiding direct usage
10724 of dump_file and alt_dump_file in favor of indirectly using them
10726 (dump_context::emit_item): New member function.
10727 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10728 Set up test pretty-printer on the underlying context. Call
10729 refresh_dumps_are_enabled.
10730 (temp_dump_context::~temp_dump_context): Call
10731 refresh_dumps_are_enabled.
10732 (temp_dump_context::get_dumped_text): New member function.
10733 (selftest::verify_dumped_text): New function.
10734 (ASSERT_DUMPED_TEXT_EQ): New macro.
10735 (selftest::test_capture_of_dump_calls): Run all tests twice, with
10736 and then without optinfo enabled. Add uses of
10737 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
10738 * dumpfile.h: Update comment for the dump_* API.
10739 * optinfo-emit-json.cc
10740 (selftest::test_building_json_from_dump_calls): Update for new
10741 param for temp_dump_context ctor.
10742 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10743 and "m_owned" field.
10744 (optinfo_item::~optinfo_item): Likewise.
10745 (optinfo::add_item): New member function.
10746 (optinfo::emit): Update comment.
10747 (optinfo::add_string): Delete.
10748 (optinfo::add_printf): Delete.
10749 (optinfo::add_printf_va): Delete.
10750 (optinfo::add_gimple_stmt): Delete.
10751 (optinfo::add_gimple_expr): Delete.
10752 (optinfo::add_tree): Delete.
10753 (optinfo::add_symtab_node): Delete.
10754 (optinfo::add_dec): Delete.
10755 * optinfo.h (class dump_context): New forward decl.
10756 (optinfo::add_item): New decl.
10757 (optinfo::add_string): Delete.
10758 (optinfo::add_printf): Delete.
10759 (optinfo::add_printf_va): Delete.
10760 (optinfo::add_gimple_stmt): Delete.
10761 (optinfo::add_gimple_expr): Delete.
10762 (optinfo::add_tree): Delete.
10763 (optinfo::add_symtab_node): Delete.
10764 (optinfo::add_dec): Delete.
10765 (optinfo::add_poly_int): Delete.
10766 (optinfo_item::optinfo_item): Remove "owned" param.
10767 (class optinfo_item): Remove field "m_owned".
10769 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10771 PR middle-end/86705
10772 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10773 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10774 requested variable alignment.
10775 (expand_one_ssa_partition): Likewise.
10776 (expand_one_var): Likewise.
10778 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10780 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10781 to speculation_safe_value_not_needed.
10783 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10785 * targhooks.h (speculation_safe_value_not_needed): New prototype.
10786 * targhooks.c (speculation_safe_value_not_needed): New function.
10787 * target.def (have_speculation_safe_value): Update documentation.
10788 * doc/tm.texi: Regenerated.
10790 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10792 * config/aarch64/iterators.md (ALLI_TI): New iterator.
10793 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10795 (despeculate_copy<ALLI:mode>_insn): New insn.
10796 (despeculate_copyti_insn): New insn.
10797 (despeculate_simple<ALLI:mode>): New insn
10798 (despeculate_simpleti): New insn.
10799 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10801 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10802 aarch64_speculation_safe_value.
10803 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10805 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10807 * config/aarch64/aarch64-speculation.cc: New file.
10808 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10809 before pass_reorder_blocks.
10810 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10812 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10813 X14 and X15 when tracking speculation.
10814 * config/aarch64/aarch64.md (register name constants): Add
10815 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10816 (unspec): Add UNSPEC_SPECULATION_TRACKER.
10817 (speculation_barrier): New insn attribute.
10818 (cmp<mode>): Allow SP in comparisons.
10819 (speculation_tracker): New insn.
10820 (speculation_barrier): Add speculation_barrier attribute.
10821 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10822 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10823 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10825 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10827 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10828 aarch64_track_speculation is true.
10829 (tb<optab><mode>1): Likewise.
10830 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10831 generate CB[N]Z when tracking speculation.
10832 (aarch64_split_compare_and_swap): Likewise.
10833 (aarch64_split_atomic_op): Likewise.
10835 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10837 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10839 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10841 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10842 (speculation_barrier): New insn.
10844 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10846 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10847 * config/arm/arm.md (speculation_barrier): New expand.
10848 (speculation_barrier_insn): New pattern.
10850 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10852 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10853 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10854 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10855 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10857 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10858 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10859 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10860 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10861 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10862 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10863 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10864 * builtins.c (expand_speculation_safe_value): New function.
10865 (expand_builtin): Call it.
10866 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10867 * doc/extend.texi: Document __builtin_speculation_safe_value.
10868 * doc/md.texi: Document "speculation_barrier" pattern.
10869 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10870 TARGET_HAVE_SPECULATION_SAFE_VALUE.
10871 * doc/tm.texi: Regenerated.
10872 * target.def (have_speculation_safe_value, speculation_safe_value): New
10874 * targhooks.c (default_have_speculation_safe_value): New function.
10875 (default_speculation_safe_value): New function.
10876 * targhooks.h (default_have_speculation_safe_value): Add prototype.
10877 (default_speculation_safe_value): Add prototype.
10879 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10881 * dump-context.h (dump_context::dump_loc): New decl.
10882 * dumpfile.c (dump_context::dump_loc): New member function.
10883 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10884 and dump_gimple_stmt.
10885 (dump_context::dump_gimple_expr_loc): Likewise, using
10887 (dump_context::dump_generic_expr_loc): Likewise, using
10889 (dump_context::dump_printf_loc_va): Likewise, using
10891 (dump_context::begin_scope): Explicitly using the global function
10892 "dump_loc", rather than the member function.
10894 2018-07-31 Martin Sebor <msebor@redhat.com>
10896 PR tree-optimization/86741
10897 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10899 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
10901 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10902 depend on whether prefetch instructions will be emitted or not.
10903 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10904 will be emitted or not.
10905 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10906 (TARGET_SETMEM_PFD): New macros.
10908 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10910 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10911 (NULL_STMT_VEC_INFO): Delete.
10912 (stmt_vec_info::operator*): Likewise.
10913 (stmt_vec_info::operator gimple *): Likewise.
10914 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10915 of NULL_STMT_VEC_INFO.
10916 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10917 (vect_reassociating_reduction_p): Likewise.
10918 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10919 (vectorizable_store): Likewise.
10920 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10921 (vec_info::free_stmt_vec_infos): Likewise.
10923 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10925 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10926 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10928 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10930 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10931 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10932 (vec_info::free_stmt_vec_info): New private member functions.
10933 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10934 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10935 * tree-parloops.c (gather_scalar_reductions): Remove calls to
10936 set_stmt_vec_info_vec and free_stmt_vec_infos.
10937 * tree-vect-loop.c (_loop_vec_info): Remove call to
10938 set_stmt_vec_info_vec.
10939 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10940 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10941 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10942 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10943 (vec_info::free_stmt_vec_info): ...these new functions. Remove
10944 assignments in {vec_info::,}new_stmt_vec_info that are redundant
10945 with the clearing in the xcalloc.
10946 (stmt_vec_info_vec): Delete.
10947 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10948 (vectorize_loops): Likewise.
10949 (vec_info::~vec_info): Remove argument from call to
10950 free_stmt_vec_infos.
10951 (vec_info::add_stmt): Remove vinfo argument from call to
10954 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10956 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10957 rather than a gimple stmt.
10958 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
10959 information for pattern statements when passed the original
10960 statement; instead wait to be passed the pattern statement itself.
10961 Don't call set_vinfo_for_stmt here.
10962 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10963 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10964 stmt_vec_infos here.
10965 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10966 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10967 stmt_vec_infos entry.
10969 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10971 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10972 * tree-vectorizer.c (vec_info::replace_stmt): New function.
10973 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10974 * tree-vect-stmts.c (vectorizable_call): Likewise.
10975 (vectorizable_simd_clone_call): Likewise.
10977 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10979 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10980 * tree-vectorizer.c (vec_info::remove_stmt): New function.
10981 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10982 * tree-vect-loop.c (vect_transform_loop): Likewise.
10983 * tree-vect-slp.c (vect_schedule_slp): Likewise.
10984 * tree-vect-stmts.c (vect_remove_stores): Likewise.
10986 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10988 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10989 (vect_dr_stmt): Delete.
10990 * tree-vectorizer.c (vec_info::lookup_dr): New function.
10991 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10993 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10994 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10995 (vect_verify_datarefs_alignment, vect_peeling_supportable)
10996 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10997 (vect_analyze_data_refs): Likewise.
10998 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
11000 (vect_find_same_alignment_drs): Likewise.
11001 (vect_slp_analyze_node_dependences): Update calls accordingly.
11002 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
11003 instead of DR_VECT_AUX.
11004 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
11005 of a vector data references. Use vec_info::lookup_dr instead of
11007 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
11008 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
11009 instead of DR_VECT_AUX.
11011 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11013 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
11015 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11017 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11018 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11019 (vect_gen_prolog_loop_niters): Likewise.
11021 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11023 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
11024 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
11025 (vect_known_alignment_in_bytes, vect_dr_behavior)
11026 (vect_get_scalar_dr_size): Take references as dr_vec_infos
11027 instead of data_references. Update calls to other routines for
11028 which the same change has been made.
11029 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
11030 dr_vec_infos instead of stmt_vec_infos.
11031 (vect_analyze_data_ref_dependence): Update call accordingly.
11032 (vect_slp_analyze_data_ref_dependence)
11033 (vect_record_base_alignments): Use DR_VECT_AUX.
11034 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
11035 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
11036 (vector_alignment_reachable_p, vect_get_data_access_cost)
11037 (vect_peeling_supportable, vect_analyze_group_access_1)
11038 (vect_analyze_group_access, vect_analyze_data_ref_access)
11039 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
11040 (vect_compile_time_alias, vect_small_gap_p)
11041 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
11042 (vect_supportable_dr_alignment): Take references as dr_vec_infos
11043 instead of data_references. Update calls to other routines for
11044 which the same change has been made.
11045 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
11046 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11047 (vect_slp_analyze_and_verify_node_alignment)
11048 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11049 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11050 (vect_setup_realignment): Use dr_vec_infos. Update calls after
11052 (_vect_peel_info::dr): Replace with...
11053 (_vect_peel_info::dr_info): ...this new field.
11054 (vect_peeling_hash_get_most_frequent)
11055 (vect_peeling_hash_choose_best_peeling): Update accordingly.
11056 (vect_peeling_hash_get_lowest_cost):
11057 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
11058 routines for which the same change has been made.
11059 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
11061 * tree-vect-loop-manip.c (get_misalign_in_elems)
11062 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
11064 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11065 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
11066 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
11067 (get_group_load_store_type, get_negative_load_store_type)
11068 (vect_get_data_ptr_increment, vectorizable_store)
11069 (vectorizable_load): Likewise.
11070 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
11071 Update calls to other routines for which the same change has been made.
11073 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11075 * tree-vectorizer.h (vec_info::move_dr): New member function.
11076 (dataref_aux): Rename to...
11077 (dr_vec_info): ...this and add "dr" and "stmt" fields.
11078 (_stmt_vec_info::dr_aux): Update accordingly.
11079 (_stmt_vec_info::data_ref_info): Delete.
11080 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
11081 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
11082 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
11083 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
11085 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
11086 (STMT_VINFO_DR_INFO): New macro.
11087 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
11088 (set_dr_misalignment): Update after rename of dataref_aux.
11089 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
11090 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
11091 initialization of STMT_VINFO_DATA_REF.
11092 * tree-vectorizer.c (vec_info::move_dr): New function.
11093 * tree-vect-patterns.c (vect_recog_bool_pattern)
11094 (vect_recog_mask_conversion_pattern)
11095 (vect_recog_gather_scatter_pattern): Use it.
11096 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
11097 the "dr" and "stmt" fields of dr_vec_info instead of
11098 STMT_VINFO_DATA_REF.
11100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11102 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
11103 (is_pattern_stmt_p): Use it.
11104 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
11105 on pattern statements.
11107 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11109 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
11110 original stmt as a stmt_vec_info rather than a gimple stmt.
11111 (vect_pattern_recog_1): Take the statement directly as a
11112 stmt_vec_info, rather than via a gimple_stmt_iterator.
11113 Update call to vect_mark_pattern_stmts.
11114 (vect_pattern_recog): Update calls accordingly.
11116 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11118 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
11119 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
11120 a vect_def_type for the first argument.
11121 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
11122 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
11123 operand if it isn't defined by a vectorized statement.
11124 (vect_build_gather_load_calls): Remove the mask_dt argument and
11125 update calls to vect_get_vec_def_for_stmt_copy.
11126 (vectorizable_bswap): Likewise the dt argument.
11127 (vectorizable_call): Update calls to vectorizable_bswap and
11128 vect_get_vec_def_for_stmt_copy.
11129 (vectorizable_simd_clone_call, vectorizable_assignment)
11130 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
11131 (vectorizable_comparison): Update calls to
11132 vect_get_vec_def_for_stmt_copy.
11133 (vectorizable_store): Likewise. Remove now-unnecessary calls to
11134 vect_is_simple_use.
11135 (vect_get_loop_based_defs): Remove dt argument and update call
11136 to vect_get_vec_def_for_stmt_copy.
11137 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
11138 and vect_get_vec_def_for_stmt_copy.
11139 (vectorizable_load): Update calls to vect_build_gather_load_calls
11140 and vect_get_vec_def_for_stmt_copy.
11141 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11142 (vectorizable_reduction, vectorizable_live_operation): Update calls
11143 to vect_get_vec_def_for_stmt_copy.
11145 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11147 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
11148 and gimple stmt arguments with a stmt_vec_info.
11149 (vect_record_base_alignments): Update calls accordingly.
11150 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
11151 and gimple stmt arguments with a stmt_vec_info.
11152 (vect_build_slp_tree_1): Remove vinfo argument and update call
11153 to vect_record_max_nunits.
11154 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11155 and vect_record_max_nunits.
11157 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11159 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
11160 file and take a stmt_vec_info instead of a gimple stmt.
11161 (supportable_widening_operation, vect_finish_replace_stmt)
11162 (vect_finish_stmt_generation, vect_get_store_rhs)
11163 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
11164 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
11165 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
11166 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
11167 (vect_create_data_ref_ptr, bump_vector_ptr)
11168 (vect_permute_store_chain, vect_setup_realignment)
11169 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
11170 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
11171 (vectorizable_reduction, vectorizable_induction)
11172 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
11173 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
11174 than gimple stmts as arguments.
11175 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
11176 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
11177 (can_group_stmts_p, vect_check_gather_scatter)
11178 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11179 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
11180 (vect_permute_load_chain, vect_shift_permute_load_chain)
11181 (vect_transform_grouped_load)
11182 (vect_record_grouped_load_vectors): Likewise.
11183 * tree-vect-loop.c (vect_fixup_reduc_chain)
11184 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
11185 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
11186 (vectorizable_reduction, vectorizable_induction)
11187 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
11188 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
11189 (vect_get_load_store_mask): Likewise.
11190 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
11191 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
11192 * tree-vect-stmts.c (vect_mark_relevant)
11193 (is_simple_and_all_uses_invariant)
11194 (exist_non_indexing_operands_for_use_p, process_use)
11195 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
11196 (vect_get_vec_def_for_operand, vect_get_vec_defs)
11197 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
11198 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
11199 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
11200 (get_negative_load_store_type, get_load_store_type)
11201 (vect_check_load_store_mask, vect_check_store_rhs)
11202 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11203 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11204 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11205 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11206 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11207 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
11208 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
11209 (supportable_widening_operation): Likewise.
11211 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11213 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
11214 a stmt_vec_info instead of a gcall.
11215 (vect_check_gather_scatter): Update call accordingly.
11216 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
11218 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
11219 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
11220 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
11221 instead of a gimple stmt.
11222 (vect_transform_loop): Update calls accordingly.
11223 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
11224 stmt_vec_infos instead of gimple stmts.
11225 (vect_analyze_slp_instance): Update use accordingly.
11226 * tree-vect-stmts.c (read_vector_array, write_vector_array)
11227 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
11228 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
11229 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
11230 (vect_gen_widened_results_half, vect_get_loop_based_defs)
11231 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
11232 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
11233 down to subroutines.
11235 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11237 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
11238 of the worklist from a vector of gimple stmts to a vector of
11240 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11241 (vect_mark_stmts_to_be_vectorized): Likewise
11243 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11245 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11246 statement before passing it to vect_analyze_stmt.
11247 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11248 the chain of phi vector definitions. Track the exit phi via its
11250 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11251 STMT_VINFO_REDUC_DEF.
11252 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11253 stmt_vec_infos to handle the statement chains.
11254 (vect_get_slp_defs): Record the first statement in the node
11255 using a stmt_vec_info.
11256 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11257 statements here and pass their stmt_vec_info down to subroutines.
11258 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11259 down to vect_finish_stmt_generation.
11260 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11261 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11262 stmt_vec_infos to subroutines.
11263 (vect_remove_stores): Use stmt_vec_infos to handle the statement
11266 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11268 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11269 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11270 (vect_permute_store_chain, vect_setup_realignment)
11271 (vect_permute_load_chain, vect_shift_permute_load_chain)
11272 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11273 stmts internally, and when passing values to other vectorizer routines.
11274 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11275 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11276 (vect_analyze_loop_operations, get_initial_def_for_reduction)
11277 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11278 (vectorizable_reduction, vectorizable_induction)
11279 (vectorizable_live_operation, vect_transform_loop_stmt)
11280 (vect_transform_loop): Likewise.
11281 * tree-vect-patterns.c (vect_reassociating_reduction_p)
11282 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11283 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11284 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11285 (vect_slp_analyze_node_operations_1): Likewise.
11286 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11287 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11288 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11289 (vect_finish_stmt_generation_1, get_group_load_store_type)
11290 (get_load_store_type, vect_build_gather_load_calls)
11291 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11292 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11293 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11294 (vectorizable_store, vectorizable_load, vectorizable_condition)
11295 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11296 (supportable_widening_operation): Likewise.
11297 (vect_get_vector_types_for_stmt): Likewise.
11298 * tree-vectorizer.h (vect_dr_behavior): Likewise.
11300 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11302 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11303 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11304 (vect_permute_store_chain, vect_permute_load_chain)
11305 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11306 repeated stmt_vec_info lookups.
11307 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11308 (vect_update_ivs_after_vectorizer): Likewise.
11309 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11310 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11311 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11312 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11313 (vect_bb_slp_scalar_cost): Likewise.
11314 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11318 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11319 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11320 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11321 to get gassigns and gcalls, rather than operating on generc gimple
11323 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11324 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11325 (vectorizable_load, vect_analyze_stmt): Likewise.
11326 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11328 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11330 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11331 return stmt_vec_infos rather than gimple stmts. Do not accept
11333 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11335 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11336 Update use of get_later_stmt.
11337 (vect_get_constant_vectors): Update call accordingly.
11338 (vect_schedule_slp_instance): Likewise
11339 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11340 (vect_slp_analyze_instance_dependence): Likewise.
11341 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11343 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11345 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11346 (stmt_info_for_cost::stmt_info): ...this new field.
11347 (add_stmt_costs): Update accordingly.
11348 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11349 (vect_get_known_peeling_cost): Likewise.
11350 (vect_estimate_min_profitable_iters): Likewise.
11351 * tree-vect-stmts.c (record_stmt_cost): Likewise.
11353 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11355 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11356 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11357 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11359 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11361 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11363 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11364 a gimple stmt to a stmt_vec_info.
11365 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11367 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11369 * tree-vectorizer.h (vec_info::grouped_stores): Change from
11370 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11371 (_loop_vec_info::reduction_chains): Likewise.
11372 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11374 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11378 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11379 a gimple stmt to a stmt_vec_info.
11380 (_stmt_vec_info::next_element): Likewise.
11381 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11382 (vect_slp_analyze_and_verify_node_alignment)
11383 (vect_analyze_group_access_1, vect_analyze_group_access)
11384 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11385 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11386 (vect_supportable_dr_alignment): Update accordingly.
11387 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11388 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11389 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11390 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11391 * tree-vect-slp.c (vect_build_slp_tree_1)
11392 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11393 (vect_split_slp_store_group, vect_analyze_slp_instance)
11394 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11395 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11396 (get_group_load_store_type, get_load_store_type)
11397 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11398 (vect_transform_stmt, vect_remove_stores): Likewise.
11400 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11402 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11403 than a gimple stmt.
11404 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11405 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11406 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11407 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11408 (vector_alignment_reachable_p, vect_get_data_access_cost)
11409 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11410 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11411 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11412 (vect_analyze_group_access_1, vect_analyze_group_access)
11413 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11414 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11415 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11416 result of vect_dr_stmt and use the stmt_vec_info instead of
11417 the associated gimple stmt.
11418 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11419 (vect_gen_prolog_loop_niters): Likewise.
11420 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11422 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11424 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11425 to a vec<stmt_vec_info>.
11426 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11427 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11428 vec<stmt_vec_info>.
11429 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11430 to a vec<stmt_vec_info>.
11431 (bst_traits::value_type, bst_traits::value_type): Likewise.
11432 (bst_traits::hash): Update accordingly.
11433 (vect_get_and_check_slp_defs): Change the stmts parameter from
11434 a vec<gimple *> to a vec<stmt_vec_info>.
11435 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11436 (vect_build_slp_tree): Likewise.
11437 (vect_build_slp_tree_2): Likewise. Update uses of
11438 SLP_TREE_SCALAR_STMTS.
11439 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11440 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11441 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11442 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11443 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11444 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11445 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11446 (vect_get_constant_vectors, vect_get_slp_defs)
11447 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11448 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11449 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11450 instead of gimple stmts.
11451 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11452 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11453 (vect_slp_analyze_instance_dependence): Update uses of
11454 SLP_TREE_SCALAR_STMTS.
11455 (vect_slp_analyze_and_verify_node_alignment): Likewise.
11456 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11457 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11458 (get_initial_defs_for_reduction): Likewise.
11459 (vect_create_epilog_for_reduction): Likewise.
11460 (vectorize_fold_left_reduction): Likewise.
11461 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11462 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11463 (can_vectorize_live_stmts): Likewise.
11465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11467 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11468 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11469 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11471 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11473 (gather_scalar_reductions): Update after above interface changes.
11474 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11475 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11477 (vect_force_simple_reduction): Likewise.
11478 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11479 LOOP_VINFO_REDUCTIONS.
11480 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11482 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11484 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11485 a gimple stmt to a stmt_vec_info.
11486 * tree-vect-loop.c (vect_active_double_reduction_p)
11487 (vect_force_simple_reduction, vectorizable_reduction): Update
11490 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11492 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11493 vec<gimple *> to a vec<stmt_vec_info>.
11494 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11495 the reduction_phis argument from a vec<gimple *> to a
11496 vec<stmt_vec_info>.
11497 (vectorizable_reduction): Likewise the phis local variable that
11498 is passed to vect_create_epilog_for_reduction. Update for new type
11499 of SLP_TREE_VEC_STMTS.
11500 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11501 (vectorizable_live_operation): Likewise.
11502 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11503 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11505 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11507 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11508 a gimple stmt to a stmt_vec_info.
11509 (vectorizable_condition, vectorizable_live_operation)
11510 (vectorizable_reduction, vectorizable_induction): Pass back the
11511 vectorized statement as a stmt_vec_info.
11512 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11513 use of STMT_VINFO_VEC_STMT.
11514 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11515 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11516 as stmt_vec_infos rather than gimple stmts.
11517 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11518 to a stmt_vec_info.
11519 (vectorizable_live_operation): Likewise.
11520 (vectorizable_reduction, vectorizable_induction): Likewise,
11521 updating use of STMT_VINFO_VEC_STMT.
11522 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11523 of STMT_VINFO_VEC_STMT.
11524 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11525 (vectorizable_simd_clone_call, vectorizable_conversion)
11526 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11527 (vectorizable_store, vectorizable_load, vectorizable_condition)
11528 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11529 from a gimple stmt to a stmt_vec_info.
11530 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
11531 pointer to a stmt_vec_info to the vectorizable_* routines.
11533 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11535 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11536 a gimple stmt to a stmt_vec_info.
11537 (is_pattern_stmt_p): Update accordingly.
11538 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11539 (vect_record_grouped_load_vectors): Likewise.
11540 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11541 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11542 (vect_model_reduction_cost): Likewise.
11543 (vect_create_epilog_for_reduction): Likewise.
11544 (vectorizable_reduction, vectorizable_induction): Likewise.
11545 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11546 Return the stmt_vec_info for the pattern statement.
11547 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11548 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11549 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11550 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11551 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11552 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11553 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11554 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11556 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11558 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11559 (vect_finish_stmt_generation): Likewise.
11560 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11561 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11562 (vect_build_gather_load_calls): Use the return value of the above
11563 functions instead of a separate call to vinfo_for_stmt. Use narrow
11564 scopes for the input gimple stmt and wider scopes for the associated
11565 stmt_vec_info. Use vec_info::lookup_def when setting these
11566 stmt_vec_infos from an SSA_NAME definition.
11567 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11568 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11569 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11570 (vectorizable_store, vectorizable_load, vectorizable_condition)
11571 (vectorizable_comparison): Likewise.
11572 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11573 (vectorizable_reduction): Likewise.
11575 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11577 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11578 stmt_vec_info * parameter before the optional gimple **.
11579 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11580 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11581 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11582 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11583 (vectorizable_live_operation): Likewise.
11584 * tree-vect-patterns.c (type_conversion_p): Likewise.
11585 (vect_look_through_possible_promotion): Likewise.
11586 (vect_recog_rotate_pattern): Likewise.
11587 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11589 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11591 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11592 a typedef to a wrapper class.
11593 (NULL_STMT_VEC_INFO): New macro.
11594 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11595 (stmt_vec_info::operator*): New function.
11596 (stmt_vec_info::operator gimple *): Likewise.
11597 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11598 (add_stmt_costs): Likewise.
11599 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11600 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11601 (vect_get_known_peeling_cost): Likewise.
11602 (vect_estimate_min_profitable_iters): Likewise.
11603 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11604 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11605 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11606 (vectorizable_store, free_stmt_vec_infos): Likewise.
11607 (new_stmt_vec_info): Change return type of xcalloc to
11610 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11612 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11613 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11614 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11615 a single_imm_use-based sequence.
11616 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11618 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11620 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11621 * tree-vectorizer.c (vec_info::lookup_def): New function.
11622 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11623 (vect_widened_op_tree): Likewise.
11624 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11625 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11626 (vectorizable_reduction): Likewise.
11627 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11629 (vect_is_slp_reduction): Update calls accordingly. Use
11630 vec_info::lookup_def.
11631 (vect_is_simple_reduction): Likewise
11632 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11634 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11636 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11637 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11638 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11640 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11641 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11642 (vect_update_vf_for_slp, vect_analyze_loop_operations)
11643 (vect_is_slp_reduction, vectorizable_induction)
11644 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11645 * tree-vect-patterns.c (vect_init_pattern_stmt):
11646 (vect_determine_min_output_precision_1, vect_determine_precisions)
11647 (vect_pattern_recog): Likewise.
11648 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11649 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11650 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11651 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11652 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11653 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
11654 info field from a loop to a loop_vec_info.
11656 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11658 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11659 (vec_info::add_stmt): Declare.
11660 * tree-vectorizer.c (vec_info::add_stmt): New function.
11661 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11662 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11663 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11664 (vectorizable_induction): Likewise.
11665 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11666 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11667 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11668 (vectorizable_load): Likewise.
11669 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11670 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11671 (vect_recog_gather_scatter_pattern): Likewise.
11672 (append_pattern_def_seq): Likewise. Remove a check that is
11673 performed by add_stmt itself.
11675 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11677 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11678 which make_ssa_name was called with new_stmt before new_stmt
11681 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11683 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11685 (vect_is_slp_reduction): ...here...
11686 (vect_is_simple_reduction): ...and here. Remove repetition of tests
11687 that are already known to be false.
11689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11691 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11692 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
11693 STMT_VINFO_NUM_SLP_USES when it's true.
11694 (vect_free_slp_instance): Add a final_p parameter and pass it to
11695 vect_free_slp_tree.
11696 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11697 (vect_analyze_slp_instance): Likewise.
11698 (vect_slp_analyze_operations): Likewise.
11699 (vect_slp_analyze_bb_1): Likewise.
11700 * tree-vectorizer.c (vec_info): Likewise.
11701 * tree-vect-loop.c (vect_transform_loop): Likewise.
11703 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11705 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11706 function is not called for second and subsequent members of
11709 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11711 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11712 cases for nested loops from here to ...
11713 (vect_create_epilog_for_reduction): ...here. Only call
11714 vect_is_simple_use for inner-loop reductions.
11716 2018-07-31 Martin Liska <mliska@suse.cz>
11718 PR gcov-profile/85338
11719 PR gcov-profile/85350
11720 PR gcov-profile/85372
11721 * profile.c (struct location_triplet): New.
11722 (struct location_triplet_hash): Likewise.
11723 (output_location): Do not output a BB that
11724 is already recorded for a line.
11725 (branch_prob): Use streamed_locations.
11727 2018-07-31 Martin Liska <mliska@suse.cz>
11729 PR gcov-profile/85370
11730 * coverage.c (coverage_begin_function): Do not mark target
11731 clones as artificial functions.
11733 2018-07-31 Martin Liska <mliska@suse.cz>
11735 PR gcov-profile/83813
11736 PR gcov-profile/84758
11737 PR gcov-profile/85217
11738 PR gcov-profile/85332
11739 * profile.c (branch_prob): Do not record GOTO expressions
11740 for GIMPLE statements which locations are already streamed.
11742 2018-07-31 Olivier Hainque <hainque@adacore.com>
11744 * gcc.c (handle_spec_function): Accept a soft_matched_part
11745 argument, as do_spec_1. Pass it down to ...
11746 (eval_spec_function): Accept a soft_matched_part argument,
11747 and pass it down to ...
11748 (do_spec_2): Accept a soft_matched_part argument, and pass
11749 it down to do_spec_1.
11750 (do_spec_1): Pass soft_matched_part to handle_spec_function.
11751 (handle_braces): Update call to handle_spec_function.
11752 (driver::set_up_specs): Update calls to do_spec_2.
11753 (compare_debug_dump_opt_spec_function): Likewise.
11754 (compare_debug_self_opt_spec_function): Likewise.
11756 2018-07-31 Olivier Hainque <hainque@adacore.com>
11758 * common.opt (nolibc): New option.
11759 * doc/invoke.texi (Link Options): Document it.
11760 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11761 * config/alpha/linux.h: Likewise.
11762 * config/arc/elf.h: Likewise.
11763 * config/arm/uclinux-elf.h: Likewise.
11764 * config/arm/unknown-elf.h: Likewise.
11765 * config/avr/avrlibc.h: Likewise.
11766 * config/bfin/bfin.h: Likewise.
11767 * config/bfin/linux.h: Likewise.
11768 * config/bfin/uclinux.h: Likewise.
11769 * config/darwin.h: Likewise.
11770 * config/darwin10.h: Likewise.
11771 * config/darwin12.h: Likewise.
11772 * config/gnu-user.h: Likewise.
11773 * config/lm32/uclinux-elf.h: Likewise.
11774 * config/pa/pa-hpux11.h: Likewise.
11775 * config/pa/pa64-hpux.h: Likewise.
11776 * config/sparc/sparc.h: Likewise.
11778 2018-07-31 Olivier Hainque <hainque@adacore.com>
11780 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11781 undefined variables.
11783 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11786 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11787 instead of GEN_INT.
11789 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11791 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11792 terminated string literal.
11794 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11796 PR rtl-optimization/85160
11797 * combine.c (is_just_move): New function.
11798 (try_combine): Allow combining two instructions into two if neither of
11799 the original instructions was a move.
11801 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
11804 * doc/extend.texi (Global Register Variables): Discourage use of type
11806 (Local Register Variables): Likewise.
11808 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
11810 PR tree-optimization/86506
11811 * hwint.h (ceil_log2): Resync with hwint.c implementation.
11813 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
11816 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11817 hard_regno, make sure no insn between `from` and `to` clobbers it.
11819 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
11820 Tom de Vries <tdevries@suse.de>
11822 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11823 (PTX_DEFAULT_RUNTIME_DIM): ... this.
11824 (nvptx_goacc_validate_dims): Set default worker and gang dims to
11825 PTX_DEFAULT_RUNTIME_DIM.
11826 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11828 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
11830 * config/pa/pa.c (pa_output_addr_vec): Align address table.
11831 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11832 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11834 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
11836 * config/rs6000/constraints.md (wG constraint): Delete, no longer
11838 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11839 predicate to reflect toc fusion has been deleted.
11840 (toc_fusion_mem_raw): Delete, no longer used.
11841 (toc_fusion_mem_wrapped): Likewise.
11842 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11844 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11845 Delete, no longer used.
11846 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11847 meant to be used for toc fusion.
11848 (rs6000_debug_print_mode): Delete toc fusion debugging.
11849 (rs6000_debug_reg_global): Likewise.
11850 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11851 fusion and secondary reload support that were never used.
11852 (rs6000_option_override_internal): Delete TOC fusion, that was only
11853 partially defined, and it did not work unless you also used the
11855 (rs6000_legitimate_address_p): Delete TOC fusion support.
11856 (rs6000_opt_masks): Likewise.
11857 (fusion_wrap_memory_address): Delete function, no longer used.
11858 (fusion_split_address); Delete TOC fusion support.
11859 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11860 longer used with toc fusion being deleted.
11861 (TARGET_TOC_FUSION_FP): Likewise.
11862 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11864 (toc fusion spliter): Delete TOC fusion support.
11865 (toc_fusionload_<mode>): Likewise.
11866 (toc_fusionload_di): Likewise.
11867 (fusion_gpr_load_<mode>): Delete generator function, this insn no
11868 longer needs to be named. Rename predicate to delete TOC fusion.
11869 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11870 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11871 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11872 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11873 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11875 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
11877 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11878 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
11879 __int128 in built-in function prototypes.
11880 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11881 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11883 2018-07-27 Martin Sebor <msebor@redhat.com>
11885 PR tree-optimization/86696
11886 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11887 types, including enums.
11888 (handle_char_store): Be prepared for the above function to fail.
11890 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
11892 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11893 when optimization level is lower than 2 or optimize for size.
11895 2018-07-26 Martin Sebor <msebor@redhat.com>
11897 PR tree-optimization/86043
11898 PR tree-optimization/86042
11899 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11900 (get_string_cst_length): Rename...
11901 (get_min_string_length): ...to this. Add argument.
11902 (handle_char_store): Extend to handle multi-character stores by
11904 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
11905 * tree.h (initializer_zerop): Add argument.
11907 2018-07-26 Jakub Jelinek <jakub@redhat.com>
11909 PR middle-end/86660
11910 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11911 declare target to variables if they have always,{to,from,tofrom} map
11914 2018-07-26 Martin Liska <mliska@suse.cz>
11917 * lto-wrapper.c: Add linker_output as prefix
11918 for ltrans_output_file.
11920 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
11922 PR rtl-optimization/85805
11923 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11924 value for hard registers if that was written in the same mode.
11926 2018-07-26 Martin Liska <mliska@suse.cz>
11928 PR gcov-profile/86536
11929 * gcov.c (format_gcov): Use printf format %.*f directly
11930 and do not handle special values.
11932 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11934 * common/config/arc/arc-common.c (arc_option_optimization_table):
11935 Update default optimizations for size.
11937 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11939 * config/arc/arc.md (movsf_insn): Add short instruction selection.
11940 * config/arc/constraints.md (CfZ): New constraint.
11941 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11942 (subsf3_fpu): Likewise.
11943 (cmpsf_fpu): Likewise.
11944 (cmpsf_fpu_uneq): Likewise.
11946 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11948 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11950 (arc_is_uncached_mem_p): uncached applies to both the variable and
11953 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11955 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11958 2018-07-25 David Malcolm <dmalcolm@redhat.com>
11960 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11961 field "m_scopes" from vec to auto_vec.
11963 2018-07-25 Martin Liska <mliska@suse.cz>
11965 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11968 2018-07-25 Richard Biener <rguenther@suse.de>
11971 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11972 special wrt context_die late.
11973 (gen_subprogram_die): Re-use DIEs in local scope.
11975 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
11977 PR tree-optimization/86644
11978 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
11980 2018-07-25 Martin Liska <mliska@suse.cz>
11982 PR middle-end/86645
11983 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11984 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11986 2018-07-25 Martin Liska <mliska@suse.cz>
11989 * params.def: Explain ASan abbreviation and provide
11990 a documentation link.
11992 2018-07-24 Martin Sebor <msebor@redhat.com>
11994 PR tree-optimization/86622
11995 PR tree-optimization/86532
11996 * builtins.h (string_length): Declare.
11997 * builtins.c (c_strlen): Correct handling of non-constant offsets.
11998 (check_access): Be prepared for non-constant length ranges.
11999 (string_length): Make extern.
12000 * expr.c (string_constant): Only handle the minor non-constant
12001 array index. Use string_constant to compute the length of
12002 a generic string constant.
12004 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
12006 PR tree-optimization/86618
12007 * tree-vect-stmts.c (vectorizable_call): Don't take the address
12008 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
12010 2018-07-24 David Malcolm <dmalcolm@redhat.com>
12012 PR tree-optimization/86636
12013 * json.cc (json::object::set): Fix comment. Add assertions.
12014 (json::array::append): Move here from json.h. Add comment and an
12016 (json::string::string): Likewise.
12017 * json.h (json::array::append): Move to json.cc.
12018 (json::string::string): Likewise.
12019 * optinfo-emit-json.cc
12020 (optrecord_json_writer::impl_location_to_json): Assert that we
12021 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
12022 wrapper around it. Expand the location once, rather than three
12024 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
12025 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
12027 (optrecord_json_writer::optinfo_to_json): Likewise, in four
12028 places. Fix some overlong lines.
12030 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
12032 * config/aarch64/aarch64-simd.md
12033 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
12034 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
12035 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
12036 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
12037 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
12038 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
12039 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
12040 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
12041 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
12043 2018-07-24 Jakub Jelinek <jakub@redhat.com>
12045 PR middle-end/86627
12046 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
12047 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
12048 and abs_d == d, do the power of two handling if profitable.
12050 2018-07-24 Richard Biener <rguenther@suse.de>
12052 * match.pd: Add BIT_FIELD_REF canonicalizations.
12054 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12057 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
12059 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12061 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
12062 terminated STRING_CST object.
12064 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12066 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
12068 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12070 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
12071 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
12072 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
12073 the elements into a register.
12074 (rs6000_split_v4si_init_di_reg): Delete.
12075 (rs6000_split_v4si_init): Delete.
12076 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
12077 (vsx_init_v4si): Rewrite as a define_expand.
12079 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12081 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
12082 zero_extend argument from memory): New.
12084 2018-07-22 Martin Sebor <msebor@redhat.com>
12087 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
12088 diagnosing calls with unknown arguments unless -Walloca-larger-than
12089 is restricted to less than PTRDIFF_MAX bytes.
12091 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
12093 * doc/gcov.texi (Invoking Gcov): Editorial changes.
12095 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12097 * pretty-print.c (text_info::set_location): Remove redundant
12098 "line_table" parameter from call to rich_location::set_range.
12100 2018-07-20 Martin Sebor <msebor@redhat.com>
12102 PR middle-end/82063
12103 * builtins.c (expand_builtin_alloca): Adjust.
12104 * calls.c (alloc_max_size): Simplify.
12105 * cgraphunit.c (cgraph_node::expand): Adjust.
12106 * common.opt (larger_than_size, warn_frame_larger_than): Remove
12108 (frame_larger_than_size): Same.
12109 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
12110 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12112 * doc/invoke.texi (GCC Command Options): Document option arguments.
12113 Explain byte-size arguments and suffixes.
12114 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
12115 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
12116 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
12117 * doc/options.texi (UInteger): Expand.
12118 (Host_Wide_Int, ByteSize): Document new properties.
12119 * final.c (final_start_function_1): Include sizes in an error message.
12120 * function.c (frame_offset_overflow): Same.
12121 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
12122 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
12123 Diagnose unbounded alloca calls only for limits of less than
12125 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
12126 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
12128 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
12129 only for limits of less than PTRDIFF_MAX.
12130 * langhooks-def.h (lhd_handle_option): Change function argument
12132 * langhooks.c (lhd_handle_option): Same.
12133 * langhooks.h (handle_option): Same.
12134 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
12136 (var_type, var_type_struct): Same.
12137 (var_set): Handle ByteSize flag.
12138 * optc-gen.awk: Add comments to output to ease debugging. Make
12139 use of HOST_WIDE_INT where appropriate.
12140 * opts-gen-save.awk: Use %lx to format unsigned long.
12141 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
12142 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
12143 arguments. Parse bytes-size suffixes.
12144 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
12145 (enum_value_to_arg): Same.
12146 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
12147 (handle_option): Adjust.
12148 (generate_option): Change function argument to HOST_WIDE_INT.
12149 (cmdline_handle_error): Adjust.
12150 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
12151 (set_option): Change function argument to HOST_WIDE_INT.
12152 (option_enabled): Handle cl_host_wide_int.
12153 (get_option_state): Handle CLVC_SIZE.
12154 (control_warning_option): Same.
12155 * opts.c (common_handle_option): Change function argument to
12156 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
12157 OPT_Wvla_larger_than_.
12158 * opts.h (enum cl_var_type): Add an enumerator.
12159 * stor-layout.c (layout_decl): Print a more meaningful warning.
12160 * toplev.c (output_stack_usage): Adjust.
12162 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
12164 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
12165 call to inline_expand_builtin_string_cmp.
12166 (expand_builtin_strcmp): Likewise.
12167 (expand_builtin_strncmp): Likewise.
12168 (inline_string_cmp): Delete the last parameter, change char_type_node
12169 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
12171 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
12172 the inlining expansion on target where the type of the call has same or
12173 narrower precision than unsigned char.
12175 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12177 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
12178 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
12179 * common.opt (fsave-optimization-record): New option.
12180 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
12181 * doc/invoke.texi (-fsave-optimization-record): New option.
12182 * dumpfile.c: Include "optinfo-emit-json.h".
12183 (struct kv_pair): Move to coretypes.h.
12184 (optgroup_options): Make non-static.
12185 (dump_context::end_scope): Call
12186 optimization_records_maybe_pop_dump_scope.
12187 * dumpfile.h (optgroup_options): New decl.
12188 * json.cc: New file.
12189 * json.h: New file.
12190 * optinfo-emit-json.cc: New file.
12191 * optinfo-emit-json.h: New file.
12192 * optinfo.cc: Include "optinfo-emit-json.h".
12193 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
12194 (optinfo_enabled_p): Check optimization_records_enabled_p.
12195 (optinfo_wants_inlining_info_p): Likewise.
12196 * optinfo.h: Update comment.
12197 * profile-count.c (profile_quality_as_string): New function.
12198 * profile-count.h (profile_quality_as_string): New decl.
12199 (profile_count::quality): New accessor.
12200 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12201 and optinfo_emit_json_cc_tests.
12202 * selftest.h (selftest::json_cc_tests): New decl.
12203 (selftest::optinfo_emit_json_cc_tests): New decl.
12204 * toplev.c: Include "optinfo-emit-json.h".
12205 (compile_file): Call optimization_records_finish.
12206 (do_compile): Call optimization_records_start.
12207 * tree-ssa-live.c: Include optinfo.h.
12208 (remove_unused_scope_block_p): Retain inlining information if
12209 optinfo_wants_inlining_info_p returns true.
12211 2018-07-20 Richard Biener <rguenther@suse.de>
12214 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
12215 to cover -flto-partition=none.
12217 2018-07-20 Martin Liska <mliska@suse.cz>
12219 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
12220 (get_decl_source_range): Remove unused function.
12222 2018-07-20 Richard Biener <rguenther@suse.de>
12224 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
12225 (struct vn_phi_s): Likewise.
12226 (struct vn_reference_s): Likewise.
12227 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
12228 for searching the slot of an entry known to be in the hash itself.
12229 (vn_phi_hasher::equal): Likewise.
12230 (vn_reference_hasher::equal): Likewise.
12231 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
12233 (optimistic_info, current_info): Remove, keeping only valid_info.
12234 (vn_reference_lookup_1): Remove fallback lookup.
12235 (vn_reference_lookup_2): Likewise.
12236 (vn_nary_op_lookup_1): Likewise.
12237 (vn_phi_lookup): Likewise.
12238 (vn_nary_build_or_lookup_1): Make sure to not chain the built
12240 (vn_reference_insert): Adjust, chain the inserted hash element
12241 at last_inserted_ref.
12242 (vn_reference_insert_pieces): Likewise.
12243 (visit_reference_op_call): Likewise.
12244 (vn_nary_op_insert_into): Chain the inserted hash element at
12245 last_inserted_nary.
12246 (vn_nary_op_insert_pieces): Adjust.
12247 (vn_nary_op_insert): Likewise.
12248 (vn_nary_op_insert_stmt): Likewise.
12249 (vn_phi_insert): Adjust, chain the inserted hash element at
12251 (process_scc): Remove clearing and copying the optimistic
12252 table. Instead remove elements inserted during an optimistic
12253 iteration from the single table we maintain.
12254 (init_scc_vn): Adjust.
12255 (free_scc_vn): Likewise.
12256 (sccvn_dom_walker::record_cond): Likewise.
12257 (sccvn_dom_walker::after_dom_children): Likewise.
12259 2018-07-19 Martin Sebor <msebor@redhat.com>
12261 PR tree-optimization/84047
12262 PR tree-optimization/83776
12263 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12264 (check_array_bounds): Call it.
12266 2018-07-19 Martin Sebor <msebor@redhat.com>
12268 * align.h (align_flags): Use member initialization.
12270 2018-07-19 David Malcolm <dmalcolm@redhat.com>
12272 * Makefile.in (OBJS): Add optinfo.o.
12273 * coretypes.h (class symtab_node): New forward decl.
12274 (struct cgraph_node): New forward decl.
12275 (class varpool_node): New forward decl.
12276 * dump-context.h: New file.
12277 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12279 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12280 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12281 (set_alt_dump_file): Likewise.
12282 (dump_context::~dump_context): New dtor.
12283 (dump_gimple_stmt): Move implementation to...
12284 (dump_context::dump_gimple_stmt): ...this new member function.
12285 Add the stmt to any pending optinfo, creating one if need be.
12286 (dump_gimple_stmt_loc): Move implementation to...
12287 (dump_context::dump_gimple_stmt_loc): ...this new member function.
12288 Start a new optinfo and add the stmt to it.
12289 (dump_gimple_expr): Move implementation to...
12290 (dump_context::dump_gimple_expr): ...this new member function.
12291 Add the stmt to any pending optinfo, creating one if need be.
12292 (dump_gimple_expr_loc): Move implementation to...
12293 (dump_context::dump_gimple_expr_loc): ...this new member function.
12294 Start a new optinfo and add the stmt to it.
12295 (dump_generic_expr): Move implementation to...
12296 (dump_context::dump_generic_expr): ...this new member function.
12297 Add the tree to any pending optinfo, creating one if need be.
12298 (dump_generic_expr_loc): Move implementation to...
12299 (dump_context::dump_generic_expr_loc): ...this new member
12300 function. Add the tree to any pending optinfo, creating one if
12302 (dump_printf): Move implementation to...
12303 (dump_context::dump_printf_va): ...this new member function. Add
12304 the text to any pending optinfo, creating one if need be.
12305 (dump_printf_loc): Move implementation to...
12306 (dump_context::dump_printf_loc_va): ...this new member function.
12307 Start a new optinfo and add the stmt to it.
12308 (dump_dec): Move implementation to...
12309 (dump_context::dump_dec): ...this new member function. Add the
12310 value to any pending optinfo, creating one if need be.
12311 (dump_context::dump_symtab_node): New member function.
12312 (dump_context::get_scope_depth): New member function.
12313 (dump_context::begin_scope): New member function.
12314 (dump_context::end_scope): New member function.
12315 (dump_context::ensure_pending_optinfo): New member function.
12316 (dump_context::begin_next_optinfo): New member function.
12317 (dump_context::end_any_optinfo): New member function.
12318 (dump_context::s_current): New global.
12319 (dump_context::s_default): New global.
12320 (dump_scope_depth): Delete global.
12321 (dumpfile_ensure_any_optinfo_are_flushed): New function.
12322 (dump_symtab_node): New function.
12323 (get_dump_scope_depth): Reimplement in terms of dump_context.
12324 (dump_begin_scope): Likewise.
12325 (dump_end_scope): Likewise.
12326 (selftest::temp_dump_context::temp_dump_context): New ctor.
12327 (selftest::temp_dump_context::~temp_dump_context): New dtor.
12328 (selftest::verify_item): New function.
12329 (ASSERT_IS_TEXT): New macro.
12330 (ASSERT_IS_TREE): New macro.
12331 (ASSERT_IS_GIMPLE): New macro.
12332 (selftest::test_capture_of_dump_calls): New test.
12333 (selftest::dumpfile_c_tests): Call it.
12334 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12335 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12336 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12337 descriptive comment.
12338 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12339 (dump_node, dump_bb): Move these unrelated decls.
12340 (class dump_manager): Add leading comment.
12341 * optinfo.cc: New file.
12342 * optinfo.h: New file.
12344 2018-07-19 Michael Collison <michael.collison@arm.com>
12345 Richard Henderson <rth@redhat.com>
12347 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12348 (subti): Handle op1 zero.
12349 (subvti4, usub4ti4): New.
12350 (*sub<GPI>3_compare1_imm): New.
12351 (sub<GPI>3_carryinCV): New.
12352 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12353 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12355 2018-07-19 Michael Collison <michael.collison@arm.com>
12356 Richard Henderson <rth@redhat.com>
12358 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12359 (addti3): Create simpler code if low part is already known to be 0.
12360 (addvti4, uaddvti4): New.
12361 (*add<GPI>3_compareC_cconly_imm): New.
12362 (*add<GPI>3_compareC_cconly): New.
12363 (*add<GPI>3_compareC_imm): New.
12364 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12365 handle constants within this pattern..
12366 (*add<GPI>3_compareV_cconly_imm): New.
12367 (*add<GPI>3_compareV_cconly): New.
12368 (*add<GPI>3_compareV_imm): New.
12369 (add<GPI>3_compareV): New.
12370 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12371 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12372 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12373 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12374 with 'comparison' operator.
12375 (*add<GPI>3_compareV_cconly_imm): Ditto.
12376 (*add<GPI>3_compareV_cconly): Ditto.
12377 (*add<GPI>3_compareV_imm): Ditto.
12378 (add<GPI>3_compareV): Ditto.
12379 (add<mode>3_carryinC): Ditto.
12380 (*add<mode>3_carryinC_zero): Ditto.
12381 (*add<mode>3_carryinC): Ditto.
12382 (add<mode>3_carryinV): Ditto.
12383 (*add<mode>3_carryinV_zero): Ditto.
12384 (*add<mode>3_carryinV): Ditto.
12386 2018-07-19 Michael Collison <michael.collison@arm.com>
12387 Richard Henderson <rth@redhat.com>
12389 * config/aarch64/aarch64-modes.def (CC_V): New.
12390 * config/aarch64/aarch64-protos.h
12391 (aarch64_addti_scratch_regs): Declare
12392 (aarch64_subvti_scratch_regs): Declare.
12393 (aarch64_expand_subvti): Declare.
12394 (aarch64_gen_unlikely_cbranch): Declare
12395 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12396 for signed overflow using CC_Vmode.
12397 (aarch64_get_condition_code_1): Handle CC_Vmode.
12398 (aarch64_gen_unlikely_cbranch): New function.
12399 (aarch64_addti_scratch_regs): New function.
12400 (aarch64_subvti_scratch_regs): New function.
12401 (aarch64_expand_subvti): New function.
12403 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12405 * config/aarch64/aarch64-option-extensions.def: New entry for profile
12407 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12408 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12411 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12414 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12415 address check not strict.
12417 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12419 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12421 (store_pair_lanes<mode>): Likewise.
12422 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12423 enum value 'ADDR_QUERY_LDP_STP_N'.
12424 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12425 (aarch64_print_address_internal): Add declaration.
12426 (aarch64_print_ldpstp_address): Remove.
12427 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12428 (aarch64_print_operand): Change printing of 'y'.
12429 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12430 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12431 'true' rather than '1'.
12432 * config/aarch64/constraints.md (Uml): Likewise.
12433 (Uml): Rename to Umn.
12436 2018-07-19 Richard Biener <rguenther@suse.de>
12438 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12440 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12441 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12442 (vn_reference_hasher): Likewise.
12443 (struct vn_tables_s): Remove obstack and alloc-pool members.
12444 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12445 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12446 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12447 (vn_reference_insert_pieces): Likewise.
12448 (alloc_vn_nary_op_noinit): Adjust.
12449 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12450 (vn_phi_eq): Adjust.
12451 (shared_lookup_phiargs): Remove.
12452 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12453 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12454 (visit_reference_op_call): Likewise.
12455 (copy_nary, copy_phi, copy_reference): Remove.
12456 (process_scc): Rewind the obstack when iterating. Do not
12457 copy the elements to valid_info but just move them from one
12458 hashtable to the other.
12459 (allocate_vn_table): Adjust.
12460 (free_vn_table): Likewise.
12461 (init_scc_vn): Likewise.
12462 (free_scc_vn): Likewise.
12464 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
12467 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12468 indirect_return as function type attribute.
12469 (ix86_attribute_table): Change indirect_return to function
12471 * doc/extend.texi: Update indirect_return attribute.
12473 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
12475 * wide-int.h (widest2_int): New.
12476 * gimple-fold.c (arith_overflowed_p): Use it.
12477 * tree.h (widest2_int_cst): New.
12478 * tree-vrp.c (wide_int_binop_overflow): Rename from
12479 vrp_int_const_binop.
12480 Rewrite to work on trees.
12481 (extract_range_from_multiplicative_op_1): Abstract code to...
12482 (wide_int_range_min_max): ...here.
12483 (wide_int_range_cross_product): ...and here.
12484 (extract_range_from_binary_expr_1): Abstract overflow code to...
12485 (wide_int_range_mult_wrapping): ...here.
12486 * tree-vrp.h (wide_int_range_cross_product): New.
12487 (wide_int_range_mult_wrapping): New.
12489 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
12490 Julia Koval <julia.koval@intel.com>
12492 * config/i386/x86-tune-costs.h (skylake_memcpy,
12493 skylake_memset): Replace rep_prefix with unrolling for size 512.
12495 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
12497 PR middle-end/86544
12498 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12499 comparision with EQ_EXPR in last stmt.
12501 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
12503 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12504 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12505 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12506 previously known as "PowerPC AltiVec Built-in Functions". Move
12507 some material to new subsubsections "PowerPC AltiVec Built-in
12508 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12510 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12511 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12512 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12513 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12515 2018-07-18 Richard Biener <rguenther@suse.de>
12517 PR tree-optimization/86557
12518 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12521 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
12523 * config/s390/s390.c (s390_function_profiler): Generate CFI.
12525 2018-07-17 Jeff Law <law@redhat.com>
12527 * config/arm/arm.c (get_label_padding): Update for recent
12528 changes to label_to_alignment.
12530 PR tree-optimization/86010
12531 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12533 * config/mips/mips.c (vr4130_align_insns): Update for recent
12534 changes to label_to_alignment.
12536 * config/frv/frv.c (frv_label_align): Update for recent changes
12537 to label_to_alignment.
12539 * config/nios2/nios2.c (nios2_label_align): Update for recent
12540 changes which dropped ALIGN_LABELS_LOG.
12542 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12544 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12545 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12547 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12549 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12550 deprecated align_labels_log.
12552 2018-07-17 Richard Biener <rguenther@suse.de>
12555 * dwarf2out.c (init_sections_and_labels): Always generate
12556 a debug_line_str_section for early LTO debug.
12557 (dwarf2out_finish): Reset debug_line_str_hash output early.
12558 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12560 (dwarf2out_early_finish): Output debug_line_str.
12562 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12564 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12565 index register on z196 or later.
12567 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12569 * config/s390/s390.c (s390_default_align): Set default function
12571 (s390_override_options_after_change): Call s390_default align.
12572 (s390_option_override_internal): Call s390_default_align.
12573 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12575 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12577 PR middle-end/86542
12578 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12579 to _looptemp_ clauses, other than the first two.
12581 2018-07-17 Martin Liska <mliska@suse.cz>
12583 * opts.c: Do not enable OPT_falign_* for -Os.
12585 2018-07-17 Martin Liska <mliska@suse.cz>
12587 * align.h (MAX_CODE_ALIGN): New.
12588 (MAX_CODE_ALIGN_VALUE): New.
12589 * common/config/i386/i386-common.c (ix86_handle_option):
12590 (MAX_CODE_ALIGN): Moved to align.h.
12591 * final.c (MAX_CODE_ALIGN): Likewise.
12592 * opts.c (parse_and_check_align_values):
12593 (MAX_CODE_ALIGN): Likewise.
12594 (MAX_CODE_ALIGN_VALUE): Likewise.
12596 2018-07-17 Martin Liska <mliska@suse.cz>
12598 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12599 in order to fulfil coding style.
12600 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12601 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12602 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12603 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12604 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12605 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12606 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12607 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12608 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12610 2018-07-17 Martin Liska <mliska@suse.cz>
12612 * align.h: New file.
12613 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12615 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12616 align_flags of label_to_alignment.
12617 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12619 * config/m68k/m68k.c: Do not use removed align_labels_value and
12621 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12622 (LOOP_ALIGN): Likewise.
12623 (LABEL_ALIGN): Likewise.
12624 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12625 Remove not used macro.
12626 (rs6000_loop_align): Change return type to align_flags.
12627 (rs6000_loop_align_max_skip): Remove.
12628 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12629 Change return type to align_flags.
12630 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12631 Remove not used macro.
12632 (rs6000_loop_align): Change return type to align_flags.
12633 (rs6000_loop_align_max_skip): Remove.
12634 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12635 * config/rx/rx-protos.h (rx_align_for_label): Make it
12637 * config/rx/rx.c (rx_align_for_label): Change return type
12639 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12641 into align_flags class.
12642 (LABEL_ALIGN): Likewise.
12643 (LOOP_ALIGN): Likewise.
12644 * config/s390/s390.c (s390_label_align): Use align_flags
12646 (s390_asm_output_function_label): Likewise.
12647 * config/sh/sh.c (sh_override_options_after_change):
12648 Use align_flags class directly without macros.
12649 (find_barrier): Likewise.
12650 (barrier_align): Likewise.
12651 (sh_loop_align): Likewise.
12652 * config/spu/spu.c (spu_option_override):
12653 Use align_flags_tuple::get_value instead of removed macros.
12654 (spu_sched_init): Likewise.
12655 * config/spu/spu.h (GTY): Likewise.
12656 * config/visium/visium.c (visium_option_override):
12657 Set "8" as default secondary alignment.
12658 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12659 in order to guarantee secondary alignment of 8.
12660 * coretypes.h: Include align.h header file.
12661 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12662 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12663 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12664 * doc/tm.texi.in: Likewise.
12665 * final.c (struct label_alignment): Remove not used structure.
12666 (LABEL_ALIGN): Change type to align_flags.
12667 (LOOP_ALIGN): Likewise.
12668 (JUMP_ALIGN): Likewise.
12669 (default_loop_align_max_skip): Remove.
12670 (default_label_align_max_skip): Likewise.
12671 (default_jump_align_max_skip): Likewise.
12672 (default_label_align_after_barrier_max_skip):
12673 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12674 (LABEL_TO_MAX_SKIP): Remove.
12675 (label_to_alignment): Return align_flags type instead of integer.
12676 (label_to_max_skip): Remove.
12677 (align_fuzz): Use align_flags type.
12678 (compute_alignments): Use align_flags type and use align_flags::max
12679 to combine multiple alignments.
12680 (grow_label_align): Grow vec instead of C array.
12681 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12682 (shorten_branches): Use align_flags type and use align_flags::max
12683 to combine multiple alignments.
12684 (final_scan_insn_1): Remove usage of secondary alignment that comes
12685 from label alignment, but instead use proper secondary alignment
12686 which is computed in grow_label_align.
12687 * flags.h (struct align_flags_tuple): Move to align.h.
12688 (struct align_flags): Likewise.
12689 (state_align_loops): Rename to align_loops.
12690 (state_align_jumps): Rename to align_jumps.
12691 (state_align_labels): Rename to align_labels.
12692 (state_align_functions): Rename to align_functions.
12693 (align_loops_log): Remove.
12694 (align_jumps_log): Remove.
12695 (align_labels_log): Remove.
12696 (align_functions_log): Remove.
12697 (align_loops_max_skip): Remove.
12698 (align_jumps_max_skip): Remove.
12699 (align_labels_max_skip): Remove.
12700 (align_functions_max_skip): Remove.
12701 (align_loops_value): Remove.
12702 (align_jumps_value): Remove.
12703 (align_labels_value): Remove.
12704 (align_functions_value): Remove.
12705 * output.h (label_to_alignment): Change return type to align_flags.
12706 (label_to_max_skip): Remove.
12707 * target.def: Remove loop_align_max_skip, label_align_max_skip,
12708 jump_align_max_skip macros.
12709 * targhooks.h (default_loop_align_max_skip): Remove.
12710 (default_label_align_max_skip): Likewise.
12711 (default_jump_align_max_skip): Likewise.
12712 (default_label_align_after_barrier_max_skip): Remove.
12713 * toplev.c (read_log_maxskip): Use ::normalize function.
12714 (parse_N_M): Remove not used argument and also call ::normalize.
12715 (parse_alignment_opts): Do not pass unused arguments.
12716 * varasm.c (assemble_start_function): Use directly align_functions
12717 instead of removed macros.
12718 * system.h: Do not poison removed macros.
12720 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12722 PR middle-end/86539
12723 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12724 and cond temporaries don't have reference type if iterator has
12725 pointer type. For init use &for_pre_body instead of pre_p if
12726 for_pre_body is non-empty.
12728 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12730 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12731 double-double modes to SFmode directly directly.
12732 (trunc<mode>sf2_fprs): Delete.
12734 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12736 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12737 for conversions between IFmode and the decimal floating point modes.
12738 (init_float128_ieee): Use the correct names for conversions between
12739 KFmode and the decimal floating point modes.
12741 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12743 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12744 for the conversions between TDmode and IFmode.
12745 (init_float128_ieee): Use more correct names for the conversions
12746 between TDmode and KFmode.
12748 2018-07-16 Jakub Jelinek <jakub@redhat.com>
12750 PR tree-optimization/86526
12751 * builtins.c (expand_builtin_memcmp): Formatting fixes.
12752 (inline_expand_builtin_string_cmp): Likewise.
12753 (inline_string_cmp): Likewise. Use c_readstr instead of
12754 builtin_memcpy_read_str. Add unit_mode temporary.
12756 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12758 PR middle-end/86528
12759 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12760 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12762 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
12764 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12765 Alphabetize prototypes of built-in functions, separating out
12766 built-in functions that are listed in this section but should be
12767 described elsewhere.
12769 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
12772 * expmed.c (emit_store_flag): Do not emit setcc followed by a
12773 conditional move when trapping comparison was split to a
12774 non-trapping one (and vice versa).
12776 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12778 * config/s390/s390.c (s390_function_profiler): Generate nops
12779 instead of profiler call sequences.
12780 * config/s390/s390.opt: Add the new option.
12782 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12784 * config/s390/s390.c (s390_function_profiler): Generate
12785 __mcount_loc section.
12786 * config/s390/s390.opt: Add the new option.
12788 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12790 * common.opt: Add the new warning.
12791 * config/s390/s390.c (s390_function_profiler): Emit "brasl
12792 %r0,__fentry__" when -mfentry is specified.
12793 (s390_option_override_internal): Disallow -mfentry for 31-bit
12795 * config/s390/s390.opt: Add the new option.
12797 2018-07-16 Richard Biener <rguenther@suse.de>
12800 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12801 for function-local FUNCTION_DECL and RESULT_DECL immediately.
12803 2018-07-16 Martin Liska <mliska@suse.cz>
12806 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12809 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12811 * config/arc/arcHS.md: Update ARCHS scheduling rules.
12813 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12815 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12817 * config/arc/arc-cpus.def (hs4x): New cpu.
12819 * config/arc/arc-tables.opt: Regenerate.
12820 * config/arc/arc.c (arc_sched_issue_rate): New function.
12821 (TARGET_SCHED_ISSUE_RATE): Define.
12822 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12823 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12825 (attr tune): Add ARCHS4x tune values.
12826 (attr tune_dspmpy): Define.
12827 (*tst): Correct instruction type.
12828 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12829 * config/arc/arcHS4x.md: New file.
12830 * config/arc/fpu.md: Update instruction type attributes.
12831 * config/arc/t-multilib: Regenerate.
12833 2018-07-16 Tom de Vries <tdevries@suse.de>
12836 * var-tracking.c (vt_initialize): Fix pre_dec handling.
12838 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12840 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12843 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
12845 PR tree-optimization/86514
12846 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12847 conversion to a boolean type from a type with greater precision.
12849 2018-07-16 Tom de Vries <tdevries@suse.de>
12851 * var-tracking.c (vt_initialize): Print adjusted insn slim if
12852 dump_flags request TDF_SLIM.
12854 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
12856 * fold-const.c (int_const_binop_1): Abstract...
12857 (wide_int_binop): ...wide int code here.
12858 (poly_int_binop): ...poly int code here.
12859 Abstract the rest of int_const_binop_1 into int_const_binop.
12860 * fold-const.h (wide_int_binop): New.
12861 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12862 Remove useless PLUS/MINUS_EXPR case.
12863 (zero_nonzero_bits_from_vr): Move wide int code...
12864 (zero_nonzero_bits_from_bounds): ...here.
12865 (extract_range_from_binary_expr_1): Move mask optimization code...
12866 (range_easy_mask_min_max): ...here.
12867 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12868 (range_easy_mask_min_max): New.
12870 2018-07-15 Jeff Law <law@redhat.com>
12873 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12876 2018-07-14 Jim Wilson <jimw@sifive.com>
12878 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12880 2018-07-14 Paul Koning <ni1d@arrl.net>
12882 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12884 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
12886 * lto-streamer-out.c (copy_function_or_variable): Dump info about
12889 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
12890 Steve Munroe <munroesj52@gmail.com>
12892 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12893 (_mm_andnot_si128): Likewise.
12894 (_mm_or_si128): Likewise.
12895 (_mm_xor_si128): Likewise.
12897 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
12899 PR middle-end/78809
12900 * builtins.c (expand_builtin_memcmp): Inline the calls first
12901 when result_eq is false.
12902 (expand_builtin_strcmp): Inline the calls first.
12903 (expand_builtin_strncmp): Likewise.
12904 (inline_string_cmp): New routine. Expand a string compare
12905 call by using a sequence of char comparison.
12906 (inline_expand_builtin_string_cmp): New routine. Inline expansion
12907 a call to str(n)cmp/memcmp.
12908 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12910 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12912 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
12914 * config/arm/driver-arm.c: Include arm-native.h.
12915 (host_detect_local_cpu): Use auto-generated data tables.
12916 (vendors, arm_cpu_table): Delete. Move part information to ...
12917 * config/arm/arm-cpus.in: ... here.
12918 * config/arm/parsecpu.awk (gen_native): New function.
12919 (vendor, part): New CPU fields.
12920 (END): Add support for building the native CPU detection tables.
12921 * config/arm/t-arm (arm-native.h): Add build rule.
12922 (driver-arm.o): Add dependency on arm-native.h.
12924 2018-07-13 Richard Biener <rguenther@suse.de>
12926 PR middle-end/85974
12927 * match.pd (addr1 - addr2): Allow either of the operand to
12930 2018-07-13 Tom de Vries <tdevries@suse.de>
12932 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12935 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
12937 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12938 arrays instead of numbered variables.
12940 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
12942 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12943 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12945 2018-07-13 Richard Biener <rguenther@suse.de>
12948 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12949 instead of get_context_die.
12951 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
12952 Richard Biener <rguenther@suse.de>
12954 PR middle-end/86489
12955 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12956 that the loop latch destination where phi is defined.
12958 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
12960 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12961 (riscv_expand_epilogue): Add assertion to check interrupt mode.
12962 (riscv_set_current_function): Extract getting interrupt type to new
12964 (riscv_get_interrupt_type): New function.
12965 (riscv_merge_decl_attributes): New function, checking interrupt type is
12967 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12969 2018-07-12 Paul Koning <ni1d@arrl.net>
12971 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12974 2018-07-12 Paul Koning <ni1d@arrl.net>
12976 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12977 zero reference, add doloop_end instead.
12978 * doc/md.texi (decrement_and_branch_until_zero): Remove.
12979 (Looping patterns): Remove decrement_and_branch_until_zero. Add
12980 detail for doloop_end.
12982 2018-07-12 Martin Sebor <msebor@redhat.com>
12985 * attribs.c (decl_attributes): Reject conflicting attributes before
12986 calling attribute handlers.
12988 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12990 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12992 (gcc::dump_manager::get_dump_file_name): likewise.
12993 (dump_begin): Likewise.
12994 * dumpfile.h (dump_begin): Update prototype.
12995 (gcc::dump_manager::get_dump_file_name,
12996 gcc::dump_manager::get_dump_file_name): Update prototype.
12998 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13000 * internal-fn.h (vectorizable_internal_fn_p): New function.
13001 * tree-vect-slp.c (compatible_calls_p): Likewise.
13002 (vect_build_slp_tree_1): Remove nops argument. Handle calls
13003 to internal functions.
13004 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
13006 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13008 * fold-const.h (inverse_conditions_p): Declare.
13009 * fold-const.c (inverse_conditions_p): New function.
13010 * match.pd: Use inverse_conditions_p. Add folds of view_converts
13011 that test the inverse condition of a conditional internal function.
13012 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
13013 * internal-fn.c (internal_fn_mask_index): Handle conditional
13014 internal functions.
13015 (vectorized_internal_fn_supported_p): New function.
13016 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
13017 (any_pred_load_store): Replace with...
13018 (need_to_predicate): ...this new variable.
13019 (redundant_ssa_names): New variable.
13020 (ifcvt_can_use_mask_load_store): Move initial checks to...
13021 (ifcvt_can_predicate): ...this new function. Handle tree codes
13022 for which a conditional internal function exists.
13023 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
13024 instead of ifcvt_can_use_mask_load_store. Update after variable
13026 (predicate_load_or_store): New function, split out from
13027 predicate_mem_writes.
13028 (check_redundant_cond_expr): New function.
13029 (value_available_p): Likewise.
13030 (predicate_rhs_code): Likewise.
13031 (predicate_mem_writes): Rename to...
13032 (predicate_statements): ...this. Use predicate_load_or_store
13033 and predicate_rhs_code.
13034 (combine_blocks, tree_if_conversion): Update after above name changes.
13035 (ifcvt_local_dce): Handle redundant_ssa_names.
13036 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
13037 general conditional functions.
13038 * tree-vect-stmts.c (vectorizable_call): Likewise.
13040 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13041 Alan Hayward <alan.hayward@arm.com>
13042 David Sherwood <david.sherwood@arm.com>
13044 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
13045 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
13046 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
13047 plus and minus and convert them into IFN_COND_FMA-based sequences.
13048 (convert_mult_to_fma): Handle conditional plus and minus.
13050 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13052 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
13053 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
13054 (cond_fnms_optab): New optabs.
13055 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
13056 internal functions.
13057 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
13058 * internal-fn.h (get_conditional_internal_fn): Declare.
13059 (get_unconditional_internal_fn): Likewise.
13060 * internal-fn.c (cond_ternary_direct): New macro.
13061 (expand_cond_ternary_optab_fn): Likewise.
13062 (direct_cond_ternary_optab_supported_p): Likewise.
13063 (FOR_EACH_COND_FN_PAIR): Likewise.
13064 (get_conditional_internal_fn): New function.
13065 (get_unconditional_internal_fn): Likewise.
13066 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
13067 (gimple_match_op::gimple_match_op): Add a new overload for 5
13069 (gimple_match_op::set_op): Likewise.
13070 (gimple_resimplify5): Declare.
13071 * genmatch.c (decision_tree::gen): Generate simplifications for
13073 * gimple-match-head.c (gimple_simplify): Define an overload for
13074 5 operands. Handle calls with 5 arguments in the top-level overload.
13075 (convert_conditional_op): Handle conversions from unconditional
13076 internal functions to conditional ones.
13077 (gimple_resimplify5): New function.
13078 (build_call_internal): Pass a fifth operand.
13079 (maybe_push_res_to_seq): Likewise.
13080 (try_conditional_simplification): Try converting conditional
13081 internal functions to unconditional internal functions.
13082 Handle 3-operand unconditional forms.
13083 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
13084 Define ternary equivalents of the current rules for binary conditional
13085 internal functions.
13086 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
13087 ternary operations.
13088 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
13089 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
13090 (optab): Handle them.
13091 (SVE_COND_FP_TERNARY): New int iterator.
13092 (sve_fmla_op, sve_fmad_op): New int attributes.
13093 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
13094 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
13095 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
13097 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13099 * target.def (preferred_else_value): New target hook.
13100 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
13101 * doc/tm.texi: Regenerate.
13102 * targhooks.h (default_preferred_else_value): Declare.
13103 * targhooks.c (default_preferred_else_value): New function.
13104 * internal-fn.h (conditional_internal_fn_code): Declare.
13105 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
13106 (get_conditional_internal_fn): Use it.
13107 (conditional_internal_fn_code): New function.
13108 * gimple-match.h (gimple_match_cond): New struct.
13109 (gimple_match_op): Add a cond member function.
13110 (gimple_match_op::gimple_match_op): Update all forms to take a
13112 * genmatch.c (expr::gen_transform): Use the same condition as res_op
13113 for the suboperation, but don't specify a particular else_value.
13114 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
13115 (visit_nary_op, visit_reference_op_load): Pass
13116 gimple_match_cond::UNCOND to the gimple_match_op constructor.
13117 * gimple-match-head.c: Include tree-eh.h
13118 (convert_conditional_op): New function.
13119 (maybe_resimplify_conditional_op): Likewise.
13120 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
13121 (gimple_resimplify2): Likewise.
13122 (gimple_resimplify3): Likewise.
13123 (gimple_resimplify4): Likewise.
13124 (maybe_push_res_to_seq): Return null for conditional operations.
13125 (try_conditional_simplification): New function.
13126 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
13128 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
13130 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
13132 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
13134 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13136 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13138 (hash_tree): Do not hash DECL_FCONTEXT
13139 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
13140 Do not stream DECL_FCONTEXT.
13141 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
13142 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
13144 2018-07-12 Richard Biener <rguenther@suse.de>
13147 * dwarf2out.c (gen_block_die): Only output blocks when they have
13148 at least one !DECL_IGNORED_P variable.
13150 2018-07-12 Richard Biener <rguenther@suse.de>
13153 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
13154 Remove -mieee-fp handling.
13156 2018-07-12 Richard Biener <rguenther@suse.de>
13158 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
13159 left-over from last patch.
13161 2018-07-12 Jakub Jelinek <jakub@redhat.com>
13163 PR tree-optimization/86492
13164 * gimple-ssa-store-merging.c
13165 (imm_store_chain_info::coalesce_immediate_stores): Call
13166 check_no_overlap even for the merge_overlapping case. Formatting fix.
13168 2018-07-12 Richard Biener <rguenther@suse.de>
13170 PR middle-end/86479
13171 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
13172 move possibly trapping operations into the conditional.
13174 2018-07-12 Richard Biener <rguenther@suse.de>
13176 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
13177 (vn_lookup_simplify_result): Remove recursion limit applied
13179 (vn_nary_build_or_lookup_1): Adjust.
13180 (try_to_simplify): Likewise.
13181 * gimple-match-head.c (gimple_resimplify1): Instead apply one
13183 (gimple_resimplify2): Likewise.
13184 (gimple_resimplify3): Likewise.
13185 (gimple_resimplify4): Likewise.
13187 2018-07-11 Jakub Jelinek <jakub@redhat.com>
13189 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
13190 Use __mmask64 type instead of __mmask8 for __M argument.
13191 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
13192 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
13194 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
13195 __mmask16 for __M argument.
13196 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
13197 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
13198 to __mmask16 instead of __mmask8.
13199 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
13200 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13201 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13202 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13203 instead of __mmask16 for __U argument.
13204 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13205 __mmask16 instead of __mmask8 for __U argument.
13206 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13208 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
13210 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
13212 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
13214 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
13216 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
13218 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
13220 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
13222 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
13224 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
13226 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
13227 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
13228 return type as well as __M argument type and all casts from __mmask8
13230 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
13231 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
13232 return type as well as __M argument type and all casts from __mmask8
13234 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
13235 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
13236 return type as well as __M argument type and all casts from __mmask8
13238 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
13239 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
13240 return type as well as __M argument type and all casts from __mmask8
13242 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13243 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13246 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
13248 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13249 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13252 2018-07-11 Paul Koning <ni1d@arrl.net>
13254 * doc/md.texi (define_subst): Document how multiple occurrences of
13255 the same argument in the replacement pattern are handled.
13257 2018-07-11 Paul Koning <ni1d@arrl.net>
13259 * doc/extend.texi (Common Variable Attributes): Move "mode" into
13260 alphabetical order.
13261 (Common Type Attributes): Add "mode" attribute.
13263 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
13265 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13266 stream DECL_ORIGINAL_TYPE.
13267 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13268 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13269 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13270 Do not walk original type.
13271 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13273 (write_ts_decl_non_common_tree_pointers): Do not stream
13275 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13276 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13278 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13280 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13281 thread twice from the same starting edge.
13283 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13285 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13286 * gimple.c (gimple_call_nonnull_result_p): ...here...
13287 (gimple_call_nonnull_arg): ...and here.
13288 * gimple.h (gimple_call_nonnull_result_p): New.
13289 (gimple_call_nonnull_arg): New.
13291 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
13293 * config/arm/arm-cpus.in: Move information from fpu field of each
13294 cpu definition to the isa field.
13295 * config/arm/parsecpu.awk (fpu): Delete match rule.
13296 (gen_comm_data): Don't add bits from the CPU's FPU entry.
13298 2018-07-11 Richard Biener <rguenther@suse.de>
13301 * dwarf2out.c (init_sections_and_labels): Use
13302 output_asm_line_debug_info consistently.
13303 (dwarf2out_early_finish): Likewise.
13304 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13307 2018-07-11 Richard Biener <rguenther@suse.de>
13309 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13310 Rework father_bb setting in a way to avoid propagating constants
13311 multiple times on a loop body.
13313 2018-07-10 Mark Wielaard <mark@klomp.org>
13316 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13318 2018-07-10 Richard Biener <rguenther@suse.de>
13320 * hash-map.h (hash_map::iterator::operator*): Return
13321 references to key and value.
13323 2018-07-10 Jakub Jelinek <jakub@redhat.com>
13326 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13327 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13328 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13329 (gimplify_omp_for): For composite loops, move outer
13330 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13331 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
13332 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
13333 TREE_LIST for both the original class iterator and the "last" helper
13334 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
13335 loop, remember has_decl_expr from outer composite loops for the
13336 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13338 2018-07-09 Martin Sebor <msebor@redhat.com>
13340 PR middle-end/77357
13341 PR middle-end/86428
13342 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13343 accessing implicitly initialized array elements.
13344 * expr.c (string_constant): Handle string initializers of
13345 character arrays within aggregates.
13346 * gimple-fold.c (fold_array_ctor_reference): Add argument.
13347 Store element offset. As a special case, handle zero size.
13348 (fold_nonarray_ctor_reference): Same.
13349 (fold_ctor_reference): Add argument. Store subobject offset.
13350 * gimple-fold.h (fold_ctor_reference): Add argument.
13352 2018-07-09 Paul Koning <ni1d@arrl.net>
13354 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13355 (pdp11_insn_cost): New function.
13356 (pdp11_md_asm_adjust): New function.
13357 (TARGET_INVALID_WITHIN_DOLOOP): Define.
13358 (pdp11_rtx_costs): Update to match machine better.
13359 (output_addr_const_pdp11): Correct format mismatch warnings.
13360 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13361 * config/pdp11/pdp11.md: General change to add base_cost and/or
13362 length attributes for use by new pdp11_insn_cost function.
13363 (MIN_BRANCH): Correct definition.
13365 (doloop_end): Use standard pattern name for looping pattern.
13366 (doloop_end_nocc): New.
13367 (movsf): Add another constraint alternative.
13368 (zero_extendqihi2): Add constraint alternatives for not in place
13370 (zero_extendhisi2): Remove.
13371 (shift patterns): Add CC handling variants.
13375 (define_peephole2): New peephole to recognize mov that sets CC for
13378 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13380 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13381 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13384 2018-07-09 Jakub Jelinek <jakub@redhat.com>
13387 * real.c (real_nextafter): Return true if result is denormal.
13389 2018-07-09 Martin Liska <mliska@suse.cz>
13391 * common.opt: Add back wrongly removed attribute.
13393 2018-07-09 Richard Biener <rguenther@suse.de>
13396 * dwarf2out.c (gen_block_die): For an early generated DIE
13397 always output high/low PC attributes.
13399 2018-07-09 Tom de Vries <tdevries@suse.de>
13401 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13402 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13403 onto VAR_DECL with abstract origin.
13405 2018-07-07 Jim Wilson <jimw@sifive.com>
13407 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13409 2018-07-07 Tom de Vries <tdevries@suse.de>
13411 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13413 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
13415 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13417 (combine_bound): Use wide-int overflow calculation instead of
13419 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13421 * fold-const.c (int_const_binop_2): Same.
13422 (extract_muldiv_1): Same.
13423 (fold_div_compare): Same.
13424 (fold_abs_const): Same.
13426 * poly-int.h (add): Same.
13430 * predict.c (predict_iv_comparison): Same.
13431 * profile-count.c (slow_safe_scale_64bit): Same.
13432 * simplify-rtx.c (simplify_const_binary_operation): Same.
13433 * tree-chrec.c (tree_fold_binomial): Same.
13434 * tree-data-ref.c (split_constant_offset_1): Same.
13435 * tree-if-conv.c (idx_within_array_bound): Same.
13436 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13437 * tree-ssa-phiopt.c (minmax_replacement): Same.
13438 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13439 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13440 * vr-values.c (vr_values::adjust_range_with_scev): Same.
13441 * wide-int.cc (wi::add_large): Same.
13442 (wi::mul_internal): Same.
13443 (wi::sub_large): Same.
13444 (wi::divmod_internal): Same.
13445 * wide-int.h: Change overflow type to overflow_type for neg, add,
13446 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13447 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13448 mul_internal, divmod_internal.
13449 (overflow_type): New enum.
13450 (accumulate_overflow): New.
13452 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
13454 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13455 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13457 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13459 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13460 argument is checked for zero before entering loop, avoid checking again.
13462 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13464 * gimplify.h (generic_expr_could_trap_p): Set as global function.
13465 * gimplify.h (generic_expr_could_trap_p): Likwise.
13466 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13468 2018-07-06 Jakub Jelinek <jakub@redhat.com>
13470 PR tree-optimization/86401
13471 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13472 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13473 (fold_bit_and_mask): ... here. New helper function for match.pd.
13474 * fold-const.h (fold_bit_and_mask): Declare.
13475 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13477 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
13480 * target.def (translate_mode_attribute): New hook.
13481 * targhooks.h (default_translate_mode_attribute): Declare.
13482 * targhooks.c (default_translate_mode_attribute): New function.
13483 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13484 * doc/tm.texi: Regenerate.
13485 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13486 (rs6000_translate_mode_attribute): New function.
13488 2018-07-06 Paul Koning <ni1d@arrl.net>
13490 * doc/md.texi (define_split): Document DONE and FAIL.
13491 (define_peephole2): Ditto.
13493 2018-07-05 Jeff Law <law@redhat.com>
13495 PR tree-optimization/86010
13496 * tree-ssa-dse.c (compute_trims): More aggressively trim at
13497 both the head and tail of mem* and str* calls.
13499 2018-07-05 Jim Wilson <jimw@sifive.com>
13501 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13503 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
13505 * config/aarch64/aarch64-simd.md: correct flags text for
13506 MIN_EXPR replacement.
13508 2018-07-05 James Clarke <jrtc27@jrtc27.com>
13510 * configure: Regenerated.
13512 2018-07-05 Carl Love <cel@us.ibm.com>
13514 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13515 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13516 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13517 VSX_BUILTIN_DOUBLEL_V4SF.
13519 2018-07-05 Martin Sebor <msebor@redhat.com>
13522 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13523 than its domain to compute its the upper bound of a char array.
13525 2018-07-05 Nathan Sidwell <nathan@acm.org>
13527 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13528 * doc/cpp.texi: Update comment.
13529 * doc/tm.texi: Rebuilt.
13530 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13531 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13532 * doc/extend.texi (Backwards Compatibility): Clarify it is system
13533 headers affected by extern "C".
13534 * system.h: Poison NO_IMPLICIT_EXTERN_C.
13535 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13536 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13537 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13538 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13539 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13540 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13541 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13542 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13543 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13544 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13545 config/sparc/sp64-elf.h, config/spu/spu.h,
13546 config/stormy16/stormy16.h, config/v850/v850.h,
13547 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13548 define NO_IMPLICIT_EXTERN_C.
13549 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13551 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13554 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13555 instead of GET_MODE_SIZE when comparing Units.
13557 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13560 * rtlanal.c (set_noop_p): Constrain on mode change,
13561 include hard-reg-set.h
13563 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13565 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13567 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13570 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13573 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13575 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13577 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13580 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13582 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13584 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13586 PR middle-end/86380
13587 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13589 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13591 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13592 neg_*_op* variables.
13594 2018-07-04 Martin Liska <mliska@suse.cz>
13596 * tree-switch-conversion.c: Define
13597 max_ratio_for_speed and max_ratio_for_size constants.
13599 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13600 Martin Liska <mliska@suse.cz>
13602 PR middle-end/66240
13605 * common.opt: Rename align options with 'str_' prefix.
13606 * common/config/i386/i386-common.c (set_malign_value): New
13608 (ix86_handle_option): Use it to set -falign-* options/
13609 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13610 type from int to string.
13611 * config/aarch64/aarch64.c: Update default values from int
13613 * config/alpha/alpha.c (alpha_override_options_after_change):
13615 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13616 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13617 max skip conditionally.
13618 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13619 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13620 max skip conditionally.
13621 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13622 max skip conditionally.
13623 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13624 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13625 max skip conditionally.
13626 * config/i386/i386.c (struct ptt): Change type from int to
13628 (ix86_default_align): Set default values.
13629 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13630 max skip conditionally.
13631 * config/i386/iamcu.h (SUBALIGN_LOG): New.
13632 (ASM_OUTPUT_MAX_SKIP_ALIGN):
13633 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13634 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13635 max skip conditionally.
13636 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13637 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13638 * config/i386/x86-64.h (SUBALIGN_LOG): New.
13639 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13640 max skip conditionally.
13641 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13642 * config/ia64/ia64.c (ia64_option_override): Set default values
13643 for alignment options.
13644 * config/m68k/m68k.c: Handle new str_align_* options.
13645 * config/mips/mips.c (mips_set_compression_mode): Change
13647 (mips_option_override): Set default values for options.
13648 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13650 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13652 * config/rx/rx.c (rx_option_override): Likewise.
13653 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13654 (LABEL_ALIGN): Use align_labels_log.
13655 (LOOP_ALIGN): Use align_loops_align.
13656 * config/s390/s390.c (s390_asm_output_function_label): Use new
13658 * config/sh/sh.c (sh_override_options_after_change):
13659 Change type of constants.
13660 * config/spu/spu.c (spu_sched_init): Likewise.
13661 * config/sparc/sparc.c (sparc_option_override): Set default
13662 values for options.
13663 * config/visium/visium.c (visium_option_override): Likewise.
13664 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13665 emit p2align format with last argument if it's not needed.
13666 * doc/invoke.texi: Document extended format of -falign-*.
13667 * final.c: Use align_labels alignment.
13668 * flags.h (struct target_flag_state): Change type to use
13670 (struct align_flags_tuple): New.
13671 (struct align_flags): Likewise.
13672 (align_loops_log): Redefine macro to use new types.
13673 (align_loops_max_skip): Redefine macro to use new types.
13674 (align_jumps_log): Redefine macro to use new types.
13675 (align_jumps_max_skip): Redefine macro to use new types.
13676 (align_labels_log): Redefine macro to use new types.
13677 (align_labels_max_skip): Redefine macro to use new types.
13678 (align_functions_log): Redefine macro to use new types.
13679 (align_loops): Redefine macro to use new types.
13680 (align_jumps): Redefine macro to use new types.
13681 (align_labels): Redefine macro to use new types.
13682 (align_functions): Redefine macro to use new types.
13683 (align_functions_max_skip): Redefine macro to use new types.
13684 (align_loops_value): New macro.
13685 (align_jumps_value): New macro.
13686 (align_labels_value): New macro.
13687 (align_functions_value): New macro.
13688 * function.c (invoke_set_current_function_hook): Propagate
13689 alignment values from flags to global variables default in
13691 * ipa-icf.c (sem_function::equals_wpa): Use
13692 cl_optimization_option_eq instead of memcmp.
13693 * lto-streamer.h (cl_optimization_stream_out): Support streaming
13695 (cl_optimization_stream_in): Likewise.
13696 * optc-save-gen.awk: Support strings in cl_optimization.
13697 * opth-gen.awk: Likewise.
13698 * opts.c (finish_options): Remove error checking of invalid
13700 (MAX_CODE_ALIGN): Remove.
13701 (MAX_CODE_ALIGN_VALUE): Likewise.
13702 (parse_and_check_align_values): New function.
13703 (check_alignment_argument): Likewise.
13704 (common_handle_option): Use check_alignment_argument.
13705 * opts.h (parse_and_check_align_values): Declare.
13706 * toplev.c (init_alignments): Remove.
13707 (read_log_maxskip): New.
13708 (parse_N_M): Likewise.
13709 (parse_alignment_opts): Likewise.
13710 (backend_init_target): Remove usage of init_alignments.
13711 * toplev.h (parse_alignment_opts): Declare.
13712 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13714 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13715 * tree.c (cl_option_hasher::equal): New.
13716 * varasm.c: Use new global macros.
13718 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13720 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13721 Use a simpler align directive also if MAXSKIP = ALIGN-1.
13722 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13723 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13724 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13725 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13726 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13727 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13728 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13729 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13730 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13731 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13732 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13734 2018-07-04 Martin Liska <mliska@suse.cz>
13735 Jonathan Wakely <jwakely@redhat.com>
13737 * coverage.c: Use correct type.
13738 * doc/invoke.texi: Language correction.
13740 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
13743 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13744 ENDBRANCH for non-tail call which may return via indirect branch.
13745 * doc/extend.texi: Document indirect_return attribute.
13747 2018-07-03 Martin Sebor <msebor@redhat.com>
13749 PR tree-optimization/86274
13750 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13752 (format_floating): Correct handling of infinities and NaNs.
13754 2018-07-03 Martin Sebor <msebor@redhat.com>
13756 * print-tree.c (print_real_cst): New function.
13757 (print_node_brief): Call it.
13758 (print_node): Ditto.
13760 2018-07-03 Jeff Law <law@redhat.com>
13762 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13763 into a single pattern.
13765 * config/h8300/h8300.md (ors code_iterator): New.
13766 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13767 a single pattern and single splitter.
13768 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13769 (iorqi3_1, xorqi3_1): Likewise.
13770 (iorqi3, xorqi3 expanders): Similarly.
13772 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13773 (movmd_internal) into a single pattern using the P mode iterator.
13774 (movmd splitters): Similarly.
13775 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13776 (movsd splitters): Similarly.
13778 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13779 ADDB, ADDW and ADDL into a single ADD attribute which selects the
13780 right table based on the size of the operand.
13781 * config/h8300/h8300.md (length_table): Corresponding changes. All
13782 references to "addb", "addw" and "addl" changed to "add".
13783 (btst patterns): Merge two variants into a single pattern.
13784 (tstqi, tsthi): Likewise.
13785 (addhi3_incdec, addsi3_incdec): Likewise.
13786 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13787 (mulhi3, mulsi3): Likewise.
13788 (udivhi3, udivsi3): Likewise.
13789 (divhi3, divsi3): Likewise.
13790 (andorqi3, andorhi3, andorsi3): Likewise.
13792 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
13795 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13796 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13798 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13800 PR tree-optimization/85694
13801 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13802 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13804 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13805 (<u>avg<mode>3_ceil): New patterns.
13807 2018-07-03 David Malcolm <dmalcolm@redhat.com>
13809 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13810 scan-tree-dump directive.
13811 * gcc.dg/vect/slp-perm-2.c: Likewise.
13812 * gcc.dg/vect/slp-perm-3.c: Likewise.
13813 * gcc.dg/vect/slp-perm-5.c: Likewise.
13814 * gcc.dg/vect/slp-perm-6.c: Likewise.
13815 * gcc.dg/vect/slp-perm-7.c: Likewise.
13816 * gcc.dg/vect/slp-perm-8.c: Likewise.
13818 2018-07-03 Marek Polacek <polacek@redhat.com>
13820 PR middle-end/86202
13821 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13823 2018-07-03 Richard Biener <rguenther@suse.de>
13826 * tree-ssa-structalias.c (find_func_clobbers): Properly
13827 handle indirect calls.
13829 2018-07-03 Jeff Law <law@redhat.com>
13831 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13832 (shifts): New code iterator.
13833 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13834 expander. Fix HImode handling on H8/SX.
13835 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13836 (subqi3, subhi3, subsi3 expanders): Likewise.
13837 (andqi3, andhi3, andsi3 expanders): Likewise.
13838 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13839 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13840 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13841 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13842 (zero_extendqihi2, zero_extendqisi2): Likewise.
13843 (extendqihi2, extendqisi2): Likewise.
13844 (rotlqi3, rotlhi3, rotlsi3): Likewise.
13845 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13846 (rotlqi3_1, rotlhi3_1): Likewise.
13847 (logicalhi3_sn, logicalsi3_sn): Likewise.
13848 (logicalhi3, logicalsi3): Likewise.
13850 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13852 * tree-vect-patterns.c (vect_recog_rotate_pattern)
13853 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13854 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13855 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13856 type to append_pattern_def_seq instead of creating a stmt_vec_info
13858 (build_mask_conversion): Likewise. Remove vinfo argument.
13859 (vect_add_conversion_to_patterm): Likewise, renaming to...
13860 (vect_add_conversion_to_pattern): ...this.
13861 (vect_recog_mask_conversion_pattern): Update call to
13862 build_mask_conversion. Pass the vector type to
13863 append_pattern_def_seq here too.
13864 (vect_recog_gather_scatter_pattern): Update call to
13865 vect_add_conversion_to_pattern.
13867 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13869 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13870 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13871 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13872 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13873 STMT_VINFO_PATTERN_DEF_SEQ to null here.
13874 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13875 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13876 append_pattern_def_seq instead of new_pattern_def_seq.
13877 (vect_recog_divmod_pattern): Do both of the above.
13878 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13881 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13883 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13884 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13885 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13886 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13887 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13888 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13889 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13890 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13891 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13892 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13893 parameter with a single stmt_vec_info.
13894 (vect_recog_func_ptr): Likewise.
13895 (vect_recog_gather_scatter_pattern): Likewise, folding in...
13896 (vect_try_gather_scatter_pattern): ...this.
13897 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13898 the stmt_vec_info of the statement to be matched. Don't clear
13899 STMT_VINFO_RELATED_STMT.
13900 (vect_pattern_recog): Update call accordingly.
13902 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13904 PR tree-optimization/85694
13905 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13906 (uavgM3_ceil): Document new optabs.
13907 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13908 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13910 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13911 (savg_ceil_optab): New optabs.
13912 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13913 (vect_vect_recog_func_ptrs): Add it.
13914 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13915 constant directly from the associated lhs.
13917 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13919 * tree-vect-patterns.c (vect_split_statement): New function.
13920 (vect_convert_input): Use it to try to split an existing cast.
13922 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13924 * poly-int.h (print_hex): New function.
13925 * dumpfile.h (dump_dec, dump_hex): Declare.
13926 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13927 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13928 min_input_precision, operation_precision and operation_sign.
13929 * tree-vect-patterns.c (vect_get_range_info): New function.
13930 (vect_same_loop_or_bb_p, vect_single_imm_use)
13931 (vect_operation_fits_smaller_type): Delete.
13932 (vect_look_through_possible_promotion): Add an optional
13933 single_use_p parameter.
13934 (vect_recog_over_widening_pattern): Rewrite to use new
13935 stmt_vec_info infomration. Handle one operation at a time.
13936 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13937 (vect_truncatable_operation_p, vect_set_operation_type)
13938 (vect_set_min_input_precision): New functions.
13939 (vect_determine_min_output_precision_1): Likewise.
13940 (vect_determine_min_output_precision): Likewise.
13941 (vect_determine_precisions_from_range): Likewise.
13942 (vect_determine_precisions_from_users): Likewise.
13943 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13944 (vect_vect_recog_func_ptrs): Put over_widening first.
13946 (vect_pattern_recog): Call vect_determine_precisions.
13948 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13950 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13951 statements that have been replaced by further pattern statements.
13952 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13954 2018-07-03 Richard Biener <rguenther@suse.de>
13956 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13957 always set *dt. Dump vectype in vectype overload.
13958 * dumpfile.h (dump_gimple_expr): New function.
13959 (dump_gimple_expr_loc): Likewise.
13960 * dumpfile.c (dump_gimple_expr): New function.
13961 (dump_gimple_expr_loc): Likewise.
13963 2018-07-02 Jeff Law <law@redhat.com>
13965 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13966 the H8/300, H8/300H and H8/S variants into a single pattern.
13967 (movhi_h8300, movqi_h8300hs): Similarly.
13968 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13969 (QHI mode iterator): New.
13971 * config/h8300/h8300.md: Remove trailing whitespace.
13973 2018-07-02 Jim Wilson <jimw@sifive.com>
13975 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13976 instead of emit_insn for interrupt returns.
13977 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13978 (riscv_sret, riscv_uret): Likewise.
13980 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13982 * pretty-print.c (selftest::test_pp_format): Move save and restore
13983 of quotes to class auto_fix_quotes, and add an instance.
13984 * selftest.c: Include "intl.h".
13985 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13986 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13987 * selftest.h (selftest::auto_fix_quotes): New class.
13989 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
13991 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13992 (aarch64_sve_prepare_conditional_op): Remove.
13993 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13994 Allow aarch64_simd_reg_or_zero as select operand; remove
13995 the aarch64_sve_prepare_conditional_op call.
13996 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13997 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13998 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13999 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
14000 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
14001 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
14002 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
14003 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
14004 and a splitters to match all of the *_any patterns.
14005 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
14007 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
14008 (SVE_COND_FP_BINARY_REV): Remove.
14009 (sve_int_op_rev, sve_fp_op_rev): New.
14010 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
14011 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
14012 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
14013 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
14014 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
14015 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
14016 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
14017 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
14018 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
14020 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
14021 Remove match_dup 1 from the inner unspec.
14022 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14024 * config/aarch64/aarch64.md (movprfx): New attr.
14025 (length): Default movprfx to 8.
14026 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
14027 (*madd<SVE_I>, *msub<SVE_I): Likewise.
14028 (*<su>mul<SVE_I>3_highpart): Likewise.
14029 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
14030 (*v<ASHIFT><SVE_I>3): Likewise.
14031 (*<su><MAXMIN><SVE_I>3): Likewise.
14032 (*<su><MAXMIN><SVE_F>3): Likewise.
14033 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
14034 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
14035 (*div<SVE_F>4): Likewise.
14037 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
14039 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
14042 2018-07-02 Richard Biener <rguenther@suse.de>
14044 PR tree-optimization/86363
14045 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
14046 memset argument refers to a non-variable address.
14048 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14050 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
14051 {PLUS,MINUS}_EXPR code to...
14052 (adjust_symbolic_bound): ...here,
14053 (combine_bound): ...here,
14054 (set_value_range_with_overflow): ...and here.
14056 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14058 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
14060 (extract_range_from_abs_expr): ...here.
14062 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
14064 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
14065 -fno-omit-frame-pointer when not optimizing.
14067 2018-07-02 Martin Liska <mliska@suse.cz>
14070 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
14071 (propagate_nothrow): Likewise.
14073 2018-07-02 Martin Liska <mliska@suse.cz>
14076 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
14078 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14080 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
14081 function in r262149, changing "loc" param from source_location to
14082 const dump_location_t &.
14083 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
14084 declaration, as above.
14086 2018-07-01 Paul Koning <ni1d@arrl.net>
14088 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14089 -munit-asm, -mgnu-asm, -mdec-asm.
14090 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
14091 (pdp11_output_labelref): New.
14092 (pdp11_output_def): New.
14093 (pdp11_output_addr_vec_elt): New.
14094 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
14095 %# and %@ format codes.
14096 (pdp11_option_override): New.
14097 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
14098 (pdp11_output_ident): New.
14099 (pdp11_asm_named_section): New.
14100 (pdp11_asm_init_sections): New.
14101 (pdp11_file_start): New.
14102 (pdp11_file_end): New.
14103 (output_ascii): Use .ascii/.asciz for -mdec-asm.
14104 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
14105 %o, like %c but octal.
14106 (pdp11_option_override): New.
14107 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
14109 (DATA_SECTION_ASM_OP): Ditto.
14110 (READONLY_DATA_SECTION_ASM_OP): New.
14111 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
14112 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
14113 (ASM_OUTPUT_LABELREF): Ditto.
14114 (ASM_OUTPUT_DEF): Ditto.
14115 (ASM_OUTPUT_EXTERNAL): New.
14116 (ASM_OUTPUT_SOURCE_FILENAME): New.
14117 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
14118 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
14119 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
14120 %# and %@ format codes.
14121 * config/pdp11/pdp11.opt (mgnu-asm): New.
14122 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
14123 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
14124 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
14126 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
14128 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
14129 dereferencing path[] beyond its length.
14131 (debug_all_paths): New.
14132 (rewire_first_differing_edge): New.
14133 (adjust_paths_after_duplication): New.
14134 (duplicate_thread_path): Call adjust_paths_after_duplication.
14136 (thread_through_all_blocks): Add new argument to
14137 duplicate_thread_path.
14139 2018-06-30 Jim Wilson <jimw@sifive.com>
14141 * config/riscv/predicates.md (p2m1_shift_operand): New.
14142 (high_mask_shift_operand): New.
14143 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
14144 pattern using p2m1_shift_operand.
14145 (lshsi3_zero_extend_3+2): New combiner pattern using
14146 high_mask_shift_operand.
14148 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14150 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
14152 (vect_recog_rotate_pattern): ...here.
14153 (vect_convert_input): Try to insert casts of invariants in the
14155 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
14156 preheader to be empty.
14158 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14160 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
14161 vector type. If given, install it in the new statement's
14162 STMT_VINFO_VECTYPE.
14163 (vect_element_precision): New function.
14164 (vect_unpromoted_value): New struct.
14165 (vect_unpromoted_value::vect_unpromoted_value): New function.
14166 (vect_unpromoted_value::set_op): Likewise.
14167 (vect_look_through_possible_promotion): Likewise.
14168 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
14169 (vect_widened_op_tree, vect_convert_input): Likewise.
14170 (vect_convert_inputs, vect_convert_output): Likewise.
14171 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
14172 to handle the optional cast of the multiplication result and
14173 vect_widened_op_tree to detect the widened multiplication itself.
14174 Do not require the input and output of promotion casts to have
14175 the same sign, but base the signedness of the operation on the
14176 input rather than the result. If the pattern includes two
14177 promotions, check that those promotions have the same sign.
14178 Do not restrict the MULT_EXPR handling to a double-width result;
14179 handle quadruple-width results and wider. Use vect_convert_inputs
14180 to convert the inputs to the common type.
14181 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
14182 to handle the optional cast of the ABS result. Also allow a sign
14183 change or a sign extension between the ABS and MINUS.
14184 Use vect_widened_op_tree to detect the widened subtraction and use
14185 vect_convert_inputs to convert the inputs to the common type.
14186 (vect_handle_widen_op_by_const): Delete.
14187 (vect_recog_widen_op_pattern): New function.
14188 (vect_recog_widen_mult_pattern): Use it.
14189 (vect_recog_widen_shift_pattern): Likewise.
14190 (vect_recog_widen_sum_pattern): Use
14191 vect_look_through_possible_promotion to handle the promoted
14194 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14196 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
14197 the containing gimple_seq *.
14198 * gimple-iterator.h (gsi_for_stmt): Declare it.
14199 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
14200 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14201 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14202 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14203 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14205 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14207 (vect_mark_pattern_stmts): ...here. Handle cases in which the
14208 statement being replaced is part of an existing pattern
14209 definition sequence, inserting the new pattern statements before
14211 (vect_pattern_recog_1): Don't return a bool. If the statement
14212 is already part of a pattern, instead apply pattern matching
14213 to the pattern definition statements. Don't clear the
14214 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
14215 (vect_pattern_recog): Don't break after the first match;
14216 continue processing the pattern definition statements instead.
14217 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
14219 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14221 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14222 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14223 (vect_recog_widen_sum_pattern): Use it.
14225 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14227 * tree-vect-loop.c (vectorizable_reduction): Assert that the
14228 phi is not a pattern statement and has not been replaced by
14229 a pattern statement.
14230 * tree-vect-patterns.c (type_conversion_p): Don't check
14231 STMT_VINFO_IN_PATTERN_P.
14232 (vect_recog_vector_vector_shift_pattern): Likewise.
14233 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
14234 the pattern statement rather than the original statement; check
14235 directly for a WIDEN_MULT_EXPR here.
14236 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
14237 vect_is_simple_use to return the pattern statement rather
14238 than the original statement; use is_pattern_stmt_p to check
14239 for such a pattern statement.
14240 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
14241 to return the pattern statement rather than the original statement;
14242 don't do the same transformation here.
14243 (vect_is_simple_use): If the defining statement has been replaced
14244 by a pattern statement, return the pattern statement instead.
14245 Remove the corresponding (local) transformation from the vectype
14248 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14250 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14251 end and default to null.
14252 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14253 (vectorizable_reduction): Update calls accordingly, dropping the
14254 gimple ** argument if the passed-back statement isn't needed.
14255 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14256 (vect_recog_rotate_pattern): Likewise.
14257 (vect_recog_mask_conversion_pattern): Likewise.
14258 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14259 (vect_mask_constant_operand_p): Likewise.
14260 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14261 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14262 (get_group_load_store_type, get_load_store_type): Likewise.
14263 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14264 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14265 (vectorizable_conversion, vectorizable_assignment): Likewise.
14266 (vectorizable_shift, vectorizable_operation): Likewise.
14267 (vectorizable_store, vect_is_simple_cond): Likewise.
14268 (vectorizable_condition, vectorizable_comparison): Likewise.
14269 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14270 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14271 and move it to the end. Cope with null def_stmt_outs.
14273 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
14275 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14277 2018-06-29 Jeff Law <law@redhat.com>
14279 * config/v850/v850.c (v850_legitimate_address_p): Handle large
14280 displacements for TARGET_V850E2V3 and newer.
14281 (TARGET_LRA_P): Remove. Defaults to LRA now.
14282 * config/v850/v850.md (sign23byte_load): Remove.
14283 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14284 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14286 2018-06-29 Martin Liska <mliska@suse.cz>
14289 * coverage.c (coverage_init): Mangle full path name.
14290 * doc/invoke.texi: Document the change.
14291 * gcov-io.c (mangle_path): New.
14292 * gcov-io.h (mangle_path): Likewise.
14293 * gcov.c (mangle_name): Use mangle_path for path mangling.
14295 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14297 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14298 if starting source register is not even.
14300 2018-06-29 Martin Liska <mliska@suse.cz>
14302 PR tree-optimization/86263
14303 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14304 Make edge redirection.
14306 2018-06-29 David Malcolm <dmalcolm@redhat.com>
14308 * dumpfile.c (dump_loc): Add indentation based on scope depth.
14309 (dump_scope_depth): New variable.
14310 (get_dump_scope_depth): New function.
14311 (dump_begin_scope): New function.
14312 (dump_end_scope): New function.
14313 * dumpfile.h (get_dump_scope_depth): New declaration.
14314 (dump_begin_scope): New declaration.
14315 (dump_end_scope): New declaration.
14316 (class auto_dump_scope): New class.
14317 (AUTO_DUMP_SCOPE): New macro.
14318 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14321 2018-06-29 Richard Biener <rguenther@suse.de>
14323 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14324 compute_all_dependences succeeds.
14325 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14326 exceed --param loop-max-datarefs-for-datadeps.
14328 2018-06-29 Jakub Jelinek <jakub@redhat.com>
14330 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14332 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
14335 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14336 alternative 0 in preferred_for_speed attribute.
14338 2018-06-28 Paul Koning <ni1d@arrl.net>
14340 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14341 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14342 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14343 * config/pdp11/pdp11.md: Correct "length" attribute calculation
14344 for shift insn patterns.
14346 2018-06-28 David Malcolm <dmalcolm@redhat.com>
14348 * cgraph.c (cgraph_node::get_body): Replace assignments to
14349 "dump_file" with calls to set_dump_file.
14350 * dumpfile.c (alt_dump_file): Make static, and group with...
14351 (alt_flags): ...this definition.
14352 (dumps_are_enabled): New variable.
14353 (refresh_dumps_are_enabled): New function.
14354 (set_dump_file): New function.
14355 (set_alt_dump_file): New function.
14356 (gcc::dump_manager::dump_start): Replace assignments to
14357 "dump_file" and "alt_dump_file" with calls to set_dump_file and
14359 (gcc::dump_manager::dump_finish): Likewise.
14360 * dumpfile.h (alt_dump_file): Delete decl.
14361 (dumps_are_enabled): New variable decl.
14362 (set_dump_file): New function decl.
14363 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14365 * tree-nested.c (lower_nested_functions): Replace assignments to
14366 "dump_file" with calls to set_dump_file.
14368 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14370 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14371 goto_locus of each outgoing edge of each basic block.
14373 2018-06-28 Richard Biener <rguenther@suse.de>
14375 * dwarf2out.c (decl_scope_table): Remove.
14376 (push_decl_scope): Likewise.
14377 (pop_decl_scope): Likewise.
14378 (gen_type_die_for_member): Do not call push/pop_decl_scope.
14379 (gen_struct_or_union_type_die): Likewise.
14380 (gen_tagged_type_die): Likewise.
14381 (dwarf2out_init): Do not initialize decl_scope_table.
14382 (dwarf2out_c_finalize): Do not free it.
14384 2018-06-28 Richard Biener <rguenther@suse.de>
14386 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14387 deciding whether to not re-use a DIE.
14389 2018-06-28 Richard Biener <rguenther@suse.de>
14391 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14392 DW_AT_abstract_origin attribute.
14394 2018-06-28 Martin Liska <mliska@suse.cz>
14396 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14397 Use newly introduced constants.
14398 * tree-switch-conversion.h (struct jump_table_cluster):
14399 Define max_ratio_for_size and max_ratio_for_speed.
14401 2018-06-28 Martin Liska <mliska@suse.cz>
14403 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14404 Add new checking assert to catch invalid state.
14405 (jump_table_cluster::can_be_handled): Handle single case
14407 (jump_table_cluster::is_beneficial): Bail out for such case.
14408 (bit_test_cluster::find_bit_tests):
14409 Add new checking assert to catch invalid state.
14410 (bit_test_cluster::can_be_handled): Handle single case
14412 (bit_test_cluster::is_beneficial): Bail out for such case.
14413 (switch_decision_tree::analyze_switch_statement):
14416 2018-06-28 Martin Liska <mliska@suse.cz>
14418 * common.opt: Introduce -completion option.
14419 * gcc.c (driver_handle_option): Handle it.
14420 (driver::main): Print completions if completion
14422 * opt-suggestions.c (option_proposer::get_completions):
14424 (option_proposer::suggest_completion): Likewise.
14425 (option_proposer::find_param_completions): Likewise.
14426 (verify_autocompletions): Likewise.
14427 (test_completion_valid_options): Likewise.
14428 (test_completion_valid_params): Likewise.
14429 (in_completion_p): Likewise.
14430 (empty_completion_p): Likewise.
14431 (test_completion_partial_match): Likewise.
14432 (test_completion_garbage): Likewise.
14433 (opt_proposer_c_tests): Likewise.
14434 * opt-suggestions.h: Declare new functions.
14435 * opts.c (common_handle_option): Handle OPT__completion_.
14436 * selftest-run-tests.c (selftest::run_tests): Add
14437 opt_proposer_c_tests.
14438 * selftest.c (assert_str_startswith): New.
14439 * selftest.h (assert_str_startswith): Likewise.
14440 (opt_proposer_c_tests): New.
14441 (ASSERT_STR_STARTSWITH): Likewise.
14443 2018-06-28 Martin Liska <mliska@suse.cz>
14445 * Makefile.in: Add opt-suggestions.o.
14446 * gcc-main.c: Include opt-suggestions.h.
14447 * gcc.c (driver::driver): Likewise.
14448 (driver::~driver): Remove m_option_suggestions.
14449 (driver::build_option_suggestions): Moved to option_proposer.
14450 (driver::suggest_option): Likewise.
14451 (driver::handle_unrecognized_options): Use option_proposer.
14452 * gcc.h (class driver): Add new memver m_option_proposer.
14453 * opt-suggestions.c: New file.
14454 * opt-suggestions.h: New file.
14456 2018-06-28 Martin Liska <mliska@suse.cz>
14458 * vec.h (class auto_string_vec): New (moved from auto_argvec).
14459 (auto_string_vec::~auto_string_vec): Likewise.
14461 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14463 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14464 prevent_decl_creation_for_types fields up and add reset_location field.
14465 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14466 statement if id->reset_location is true.
14467 (copy_edges_for_bb): Do not set goto_locus on the new edges if
14468 id->reset_location is true.
14469 (copy_phis_for_bb): Force input_location on the arguments if
14470 id->reset_location is true.
14471 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14472 is set on the function to be inlined.
14474 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
14476 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14478 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
14480 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14481 registers for Pmode.
14482 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14483 hard registers for the clobbered pseudo.
14485 2018-06-27 Paul Koning <ni1d@arrl.net>
14487 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14488 mutually exclusive options.
14489 * config/pdp11/constraints.md (h): New constraint.
14490 (O): Update definition to match shift code generation.
14491 (D): New constraint.
14492 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14494 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14496 (output_jump): Change arguments.
14497 (pdp11_fixed_cc_regs): New function.
14498 (pdp11_cc_mode): Ditto.
14499 (pdp11_expand_shift): Ditto.
14500 (pdp11_assemble_shift): Ditto.
14501 (pdp11_small_shift): Ditto.
14502 (pdp11_branch_cost): Remove.
14503 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14505 (pdp11_register_move_cost): Update for CC registers.
14506 (pdp11_rtx_costs): Add case for LSHIFTRT.
14507 (pdp11_output_jump): Add CCNZ mode conditional branches.
14508 (notice_update_cc_on_set): Remove.
14509 (pdp11_cc_mode): New function.
14510 (simple_memory_operand): Correct pre/post decrement case.
14511 (no_side_effect_operand): New function.
14512 (pdp11_regno_reg_class): Add CC_REGS class.
14513 (pdp11_fixed_cc_regs): New function.
14514 (pdp11_small_shift): New function.
14515 (pdp11_expand_shift): New function to expand shift insns.
14516 (pdp11_assemble_shift): New function to output shifts.
14517 (pdp11_branch_cost): Remove.
14518 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14519 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14520 (WCHAR_TYPE): Ditto.
14521 (PTRDIFF_TYPE): Ditto.
14522 (ADJUST_INSN_LENGTH): New macro.
14523 (FIXED_REGISTERS): Add CC registers.
14524 (CALL_USED_REGISTERS): Ditto.
14525 (reg_class): Ditto.
14526 (REG_CLASS_NAMES): Ditto.
14527 (REG_CLASS_CONTENTS): Ditto.
14528 (SELECT_CC_MODE): Use new function.
14529 (TARGET_FLAGS_REGNUM): New macro.
14530 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14531 (cc0_reg_rtx): Remove.
14532 (CC_STATUS_MDEP): Remove.
14533 (CC_STATUS_MDEFP_INIT): Remove.
14534 (CC_IN_FPU): Remove.
14535 (NOTICE_UPDATE_CC): Remove.
14536 (REGISTER_NAMES): Add CC registers.
14537 (BRANCH_COST): Change to constant 1.
14538 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14540 * config/pdp11/pdp11.opt (mbcopy): Remove.
14541 (mbcopy-builtin): Remove.
14542 (mbranch-cheap): Remove.
14543 (mbranch-expensive): Remove.
14544 * config/pdp11/predicates.md (expand_shift_operand): Update to
14545 match shift code generation.
14546 (ccnz_operator): New predicate.
14547 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14548 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14549 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14551 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14552 description of O constraint.
14554 2018-06-27 Jeff Law <law@redhat.com>
14555 Austin Law <austinklaw@gmail.com>
14557 * config/v850/v850.md (addsi3_set_flags): New pattern.
14558 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14559 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14560 (zero_extendhisi2_v850_set_flags): Likewise.
14561 (zero_extendqisi2_v850_set_flags): Likewise.
14562 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14563 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14564 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14566 * config/v850/v850-protos.h (notice_update_cc): Remove.
14567 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14568 (v850_print_operand): Handle 'D' and "d".
14569 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14570 Add handling of arithmetic/logical operations compared against zero.
14571 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14572 Do not look at v850_compare_op, instead get mode from last argument.
14573 (v850_gen_compare): Remove
14574 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14575 after reload for prologue insns.
14576 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14578 (construct_save_jarl): Likewise.
14579 (TARGET_FLAGS_REGNUM): Define.
14580 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14581 (NOTICE_UPDATE_CC): Remove.
14582 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14583 than cc0. Conditionalize on reload_completed.
14584 (cmpsi_insn, setfcc_insn): Likewise.
14585 (tst1 splitter): Turn into define_and_split which sets the flags
14587 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14588 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14589 (cstoresf4, cstoredf4): Clobber the flags.
14590 (cmpsi, cmpsf, cmpdf): Remove expanders.
14591 (setf_insn): Remove pattern.
14592 (addsi3): Turn into define_and_split which clobbers the flags after
14593 reload and a suitable pattern (addsi3_clobber_flags) for use after
14595 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14596 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14597 (ashrsi3, ashrsi3_v850e2): Likewise.
14598 (bins): Clobber the flags.
14599 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14600 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14601 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14602 (call_value_internal_short, call_value_internal_long): Likewise.
14603 (callt_save_interrupt, callt_return_interrupt): Likewise.
14604 (save_interrupt, return_interrupt): Likewise.
14605 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14606 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14607 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14608 (All FP comparisons): Only allow after reload has completed.
14610 (divh, divhu): Tweak output template.
14611 (branch_z_normal, branch_z_invert): Remove
14612 (branch_nz_normal, branch_nz_invert): Likewise.
14613 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14615 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14616 * config/v850/v850.c (notice_update_cc): Remove.
14617 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14618 (CC_NO_CARRY): Likewise.
14619 (NOTICE_UPDATE_CC): Define to nothing.
14620 * config/v850/v850.md: Remove block comment on cc0 handling
14621 Remove "cc" attribute from all patterns. Remove cc_status handling
14622 from all patterns. Minor formatting fixes.
14624 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14626 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14627 (cortex-a76.cortex-a55): Likewise.
14628 * config/aarch64/aarch64-tune.md: Regenerate.
14629 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14630 cortex-a76.cortex-a55.
14632 2018-06-27 Jeff Law <law@redhat.com>
14634 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14635 (MULTILIB_DIRNAMES): Similarly.
14637 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
14639 * gimple.h (gimple_return_retbnd): Delete.
14640 (gimple_return_set_retbnd): Likewise.
14641 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14642 gimple_return_set_retbnd.
14643 * gimple-pretty-print.c (dump_gimple_return): Remove call to
14644 gimple_return_retbnd and adjust.
14645 * tree-inline.h (struct copy_body_data): Remove retbnd field.
14646 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14647 Explicitly return NULL in a couple more cases. Move assertion
14648 on debug statements and remove unreachable code.
14649 (reset_debug_binding): Do not test id->retbnd.
14650 (expand_call_inline): Do not set it.
14652 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
14654 * configure.ac: Add --disable-gcov option.
14655 * configure: Regenerate.
14656 * Makefile.in: Honour @enable_gcov@.
14657 * doc/install.texi: Document --disable-gcov.
14659 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14661 * config/arm/arm-cpus.in (cortex-a76): New entry.
14662 (cortex-a76.cortex-a55): Likewise.
14663 * config/arm/arm-tables.opt: Regenerate.
14664 * config/arm/arm-tune.md: Likewise.
14665 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14666 * doc/invoke.texi (ARM Options): Document cortex-a76 and
14667 cortex-a76.cortex-a55.
14669 2018-06-27 Tamar Christina <tamar.christina@arm.com>
14672 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14674 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
14676 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14678 (EPILOGUE_USES): Likewise.
14680 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
14682 * tree-inline.c (remap_location): New function extracted from...
14683 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
14684 (copy_phis_for_bb): ...here. Call remap_location.
14685 (copy_cfg_body): Adjust call to copy_edges_for_bb.
14687 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
14689 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14690 unaligned vsx for 16B memset.
14692 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
14695 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14696 ieee128_float_type_node to long_double_type_node unless
14697 TARGET_LONG_DOUBLE_128 is set.
14699 2018-06-26 David Malcolm <dmalcolm@redhat.com>
14701 * cfgloop.c (get_loop_location): Convert return type from
14702 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14703 by implicit construction from rtx_insn *, and using
14704 dump_user_location_t::from_function_decl for the fallback case.
14705 * cfgloop.h (get_loop_location): Convert return type from
14706 location_t to dump_user_location_t.
14707 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14708 dump_printf_loc to pass in a dump_location_t rather than a
14709 location_t, via the gimple stmt.
14710 * coverage.c (get_coverage_counts): Update calls to
14711 dump_printf_loc to pass in dump_location_t rather than a
14713 * doc/optinfo.texi (Dump types): Convert example of
14714 dump_printf_loc from taking "locus" to taking "insn". Update
14715 description of the "_loc" calls to cover dump_location_t.
14716 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14718 (dump_user_location_t::dump_user_location_t): New constructors,
14719 from gimple *stmt and rtx_insn *.
14720 (dump_user_location_t::from_function_decl): New function.
14721 (dump_loc): Make static.
14722 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14723 const dump_location_t &.
14724 (dump_generic_expr_loc): Delete.
14725 (dump_printf_loc): Convert param "loc" from location_t to
14726 const dump_location_t &.
14727 (selftest::test_impl_location): New function.
14728 (selftest::dumpfile_c_tests): New function.
14729 * dumpfile.h: Include "profile-count.h".
14730 (class dump_user_location_t): New class.
14731 (struct dump_impl_location_t): New struct.
14732 (class dump_location_t): New class.
14733 (dump_printf_loc): Convert 2nd param from source_location to
14734 const dump_location_t &.
14735 (dump_generic_expr_loc): Delete.
14736 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14737 const dump_location_t &.
14738 * gimple-fold.c (fold_gimple_assign): Update call to
14739 dump_printf_loc to pass in a dump_location_t rather than a
14740 location_t, via the gimple stmt.
14741 (gimple_fold_call): Likewise.
14742 * gimple-loop-interchange.cc
14743 (loop_cand::analyze_iloop_reduction_var): Update for change to
14744 check_reduction_path.
14745 (tree_loop_interchange::interchange): Update for change to
14746 find_loop_location.
14747 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14748 change in return-type of find_loop_location.
14749 (graphite_regenerate_ast_isl): Likewise.
14750 * graphite-optimize-isl.c (optimize_isl): Likewise.
14751 * graphite.c (graphite_transform_loops): Likewise.
14752 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14753 pass in a dump_location_t rather than a location_t, via the
14755 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14756 * ipa.c (walk_polymorphic_call_targets): Likewise.
14757 * loop-unroll.c (report_unroll): Convert "locus" param from
14758 location_t to dump_location_t.
14759 (decide_unrolling): Update for change to get_loop_location's
14761 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14762 location_t to dump_user_location_t.
14763 (grid_find_single_omp_among_assignments_1): Updates calls to
14764 dump_printf_loc to pass in a dump_location_t rather than a
14765 location_t, via the gimple stmt.
14766 (grid_parallel_clauses_gridifiable): Convert "tloc" from
14767 location_t to dump_location_t. Updates calls to dump_printf_loc
14768 to pass in a dump_location_t rather than a location_t, via the
14770 (grid_inner_loop_gridifiable_p): Likewise.
14771 (grid_dist_follows_simple_pattern): Likewise.
14772 (grid_gfor_follows_tiling_pattern): Likewise.
14773 (grid_target_follows_gridifiable_pattern): Likewise.
14774 (grid_attempt_target_gridification): Convert initialization
14775 of local "grid" from memset to zero-initialization; FIXME: does
14776 this require C++11? Update call to dump_printf_loc to pass in a
14777 optinfo_location rather than a location_t, via the gimple stmt.
14778 * profile.c (read_profile_edge_counts): Updates call to
14779 dump_printf_loc to pass in a dump_location_t rather than a
14781 (compute_branch_probabilities): Likewise.
14782 * selftest-run-tests.c (selftest::run_tests): Call
14784 * selftest.h (dumpfile_c_tests): New decl.
14785 * tree-loop-distribution.c (pass_loop_distribution::execute):
14786 Update for change in return type of find_loop_location.
14787 * tree-parloops.c (parallelize_loops): Likewise.
14788 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14789 "locus" from location_t to dump_user_location_t.
14790 (canonicalize_loop_induction_variables): Likewise.
14791 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14792 for change in return type of find_loop_location.
14793 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14794 to dump_printf_loc to pass in a dump_location_t rather than a
14795 location_t, via the stmt.
14796 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14798 * tree-vect-loop-manip.c (find_loop_location): Convert return
14799 type from source_location to dump_user_location_t.
14800 (vect_do_peeling): Update for above change.
14801 (vect_loop_versioning): Update for change in type of
14803 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14804 from location_t to dump_user_location_t.
14805 (vect_estimate_min_profitable_iters): Update for change in type
14807 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14808 location_t to dump_location_t.
14809 (vect_slp_bb): Update for change in type of vect_location.
14810 * tree-vectorizer.c (vect_location): Convert from source_location
14811 to dump_user_location_t.
14812 (try_vectorize_loop_1): Update for change in vect_location's type.
14813 (vectorize_loops): Likewise.
14814 (increase_alignment): Likewise.
14815 * tree-vectorizer.h (vect_location): Convert from source_location
14816 to dump_user_location_t.
14817 (find_loop_location): Convert return type from source_location to
14818 dump_user_location_t.
14819 (check_reduction_path): Convert 1st param from location_t to
14820 dump_user_location_t.
14821 * value-prof.c (check_counter): Update call to dump_printf_loc to
14822 pass in a dump_user_location_t rather than a location_t; update
14823 call to error_at for change in type of "locus".
14824 (check_ic_target): Update call to dump_printf_loc to
14825 pass in a dump_user_location_t rather than a location_t, via the
14828 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
14830 * config/s390/s390.h (enum processor_flags): Do not use
14831 default tune parameter when -march was specified.
14833 2018-06-26 Jakub Jelinek <jakub@redhat.com>
14836 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14837 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14840 2018-06-26 Richard Biener <rguenther@suse.de>
14842 PR tree-optimization/86287
14844 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14845 (vect_analyze_loop): Initialize n_stmts.
14847 2018-06-26 Richard Biener <rguenther@suse.de>
14849 PR middle-end/86271
14850 * fold-const.c (fold_convertible_p): Pointer extension
14853 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
14856 * dwarf2out.c (loc_list_has_views): Adjust comments.
14857 (dw_loc_list): Split single cross-partition range with
14860 2018-06-25 Jeff Law <law@redhat.com>
14862 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14863 on -mbig-switch by default.
14865 * config/v850/predicates.md (const_float_1_operand): Fix match_code
14867 (const_float_0_operand): Remove unused predicate.
14868 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14869 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14870 (recipsf2): New expander. Original pattern now called
14872 (recipdf2, recipdf2_insn): Similarly.
14873 (rsqrtsf2, rsqrtsf2_insn): Similarly
14874 (rsqrtdf2, rsqrtdf2_insn): Similarly
14876 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
14878 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14879 Simplify logic for FreeBSD (twice).
14881 2018-06-25 Martin Sebor <msebor@redhat.com>
14883 PR tree-optimization/86204
14884 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14885 a strnlen result if it's less than the length of the string.
14887 2018-06-25 Martin Sebor <msebor@redhat.com>
14889 PR tree-optimization/85700
14890 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14891 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14892 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14894 2018-06-25 Martin Sebor <msebor@redhat.com>
14896 * doc/extend.texi (Zero-length arrays): Update and clarify.
14898 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
14900 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14901 added IEEE/IBM long double multilib support on PowerPC little
14902 endian Linux systems.
14903 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14904 (MULTILIB_DEFAULTS): Likewise.
14905 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14907 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14908 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14909 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14911 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
14913 PR middle-end/86311
14914 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14915 (REORDER_45): Likewise.
14917 2018-06-25 Jeff Law <law@redhat.com>
14919 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14920 dividend to 32 bits. Adjust length.
14921 (udivmodhi4): Cleanup output template. Fix length.
14923 2018-06-25 Carl Love <cel@us.ibm.com>
14925 * config/rs6000/vsx.md: Change word selector to prefered location.
14927 2018-06-25 Richard Biener <rguenther@suse.de>
14929 PR tree-optimization/86304
14930 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14931 epilogue-if-converted loops as well.
14933 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
14935 * lto-section-out.c (lto_begin_section): Do not print section
14936 name for noaddr and unnumbered dumps.
14938 2018-06-25 Richard Biener <rguenther@suse.de>
14940 * tree-vectorizer.h (struct vec_info_shared): New structure
14941 with parts split out from struct vec_info and loop_nest from
14942 struct _loop_vec_info.
14943 (struct vec_info): Adjust accordingly.
14944 (struct _loop_vec_info): Likewise.
14945 (LOOP_VINFO_LOOP_NEST): Adjust.
14946 (LOOP_VINFO_DATAREFS): Likewise.
14947 (LOOP_VINFO_DDRS): Likewise.
14948 (struct _bb_vec_info): Likewise.
14949 (BB_VINFO_DATAREFS): Likewise.
14950 (BB_VINFO_DDRS): Likewise.
14951 (struct _stmt_vec_info): Add dr_aux member.
14952 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14953 (DR_MISALIGNMENT_UNINITIALIZED): New.
14954 (set_dr_misalignment): Adjust.
14955 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14956 (vect_analyze_loop): Adjust prototype.
14957 (vect_analyze_loop_form): Likewise.
14958 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14959 Compute dependences lazily.
14960 (vect_record_base_alignments): Use shared datarefs/ddrs.
14961 (vect_verify_datarefs_alignment): Likewise.
14962 (vect_analyze_data_refs_alignment): Likewise.
14963 (vect_analyze_data_ref_accesses): Likewise.
14964 (vect_analyze_data_refs): Likewise.
14965 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14966 constructor parameter for shared part.
14967 (vect_analyze_loop_form): Pass in shared part and adjust.
14968 (vect_analyze_loop_2): Pass in storage for the number of
14969 stmts. Move loop nest finding to the caller. Compute
14971 (vect_analyze_loop): Pass in shared part.
14972 (vect_transform_loop): Verify shared datarefs are unchanged.
14973 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14974 constructor parameter for shared part.
14975 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14976 (vect_slp_bb): Verify shared datarefs are unchanged before
14978 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14980 (new_stmt_vec_info): Initialize DR_AUX misalignment to
14981 DR_MISALIGNMENT_UNINITIALIZED.
14982 * tree-vectorizer.c (vec_info::vec_info): Add constructor
14983 parameter for shared part.
14984 (vec_info::~vec_info): Adjust.
14985 (vec_info_shared::vec_info_shared): New.
14986 (vec_info_shared::~vec_info_shared): Likewise.
14987 (vec_info_shared::save_datarefs): Likewise.
14988 (vec_info_shared::check_datarefs): Likewise.
14989 (try_vectorize_loop_1): Construct shared part live for analyses
14990 of a single loop for multiple vector sizes.
14991 * tree-parloops.c (gather_scalar_reductions): Adjust.
14993 2018-06-25 Richard Biener <rguenther@suse.de>
14995 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14996 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14997 (vect_analyze_data_refs): Remove similar code from here and
14998 simplify accordingly.
15000 2018-06-25 Richard Biener <rguenther@suse.de>
15002 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
15003 for reverse storage order accesses rather than asserting
15004 they cannot happen here.
15006 2018-06-25 Tom de Vries <tdevries@suse.de>
15009 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
15010 Use data16 instead of .byte for insn prefix.
15012 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
15015 * parser.c (make_char_string_pack): Pass this literal chars
15016 through cpp_interpret_string.
15017 (cp_parser_userdef_numeric_literal): Check the result of
15018 make_char_string_pack.
15020 2018-06-24 Maya Rashish <coypu@sdf.org>
15022 * ginclude/stddef.h: Simplify conditions around avoiding
15023 re-definition of __size_t.
15025 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15027 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
15028 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
15030 2018-06-22 Maya Rashish <coypu@sdf.org>
15032 * doc/invoke.texi (mno-fancy-math-387): Update for changes
15033 made to OpenBSD and NetBSD through the years.
15035 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15037 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15038 behavior of vec_pack (vector double, vector double) to match
15039 behavior of vec_float2 (vector double, vector double).
15041 2018-06-22 Olivier Hainque <hainque@adacore.com>
15043 * gimplify.c (gimplify_function_tree): Prevent creation
15044 of a trampoline for the address of the current function
15045 passed to entry/exit instrumentation hooks.
15047 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
15050 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
15053 2018-06-22 Martin Liska <mliska@suse.cz>
15055 PR tree-optimization/86263
15056 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15057 Bail out if is_enabled is false.
15058 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
15060 (jump_table_cluster::is_enabled): New function.
15062 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15064 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15065 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
15066 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
15067 (lto_input_ts_binfo_tree_pointers): Likewise.
15068 * tree-streamer-out.c (streamer_write_tree_bitfields,
15069 write_ts_binfo_tree_pointers): Likewise.
15070 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
15072 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15074 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
15076 2018-06-22 Martin Liska <mliska@suse.cz>
15078 * symbol-summary.h (get): Make it pure and inline move
15079 functionality from ::get function.
15080 (get): Remove and inline into ::get and ::get_create.
15081 (get_create): Move code from ::get function.
15083 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15086 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
15087 -x assembler-with-cpp.
15089 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15091 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
15092 _FILE_OFFSET_BITS=64 for C++.
15094 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
15096 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
15097 conversion insn that shows up when pr85657-3.c is compiled using
15098 IEEE 128-bit long double.
15099 (neg<mode>2_internal): Use the correct mode to check whether the
15100 mode is IBM extended.
15101 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
15102 multiply and divide external functions from being created more
15105 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15107 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
15109 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
15110 the edge can be forwarded.
15111 (cfg_layout_merge_blocks): Likewise.
15113 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15115 * except.c (finish_eh_generation): Commit edge insertions only after
15116 the EH edges have been redirected from post-landing to landing pads.
15118 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15120 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
15121 create_tmp_var_for to create the FRAME decl.
15122 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
15124 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15126 * tree-inline.c (copy_edges_for_bb): Minor tweak.
15127 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
15128 debug statement when resetting its value.
15129 (expand_call_inline): Copy the locus of the call onto the assignment
15130 of the return value, if any. Use local variable in more cases.
15132 2018-06-21 Martin Liska <mliska@suse.cz>
15134 * ipa-pure-const.c (propagate_nothrow): Use
15135 funct_state_summaries->get.
15136 (dump_malloc_lattice): Likewise.
15137 (propagate_malloc): Likewise.
15139 2018-06-21 Richard Biener <rguenther@suse.de>
15141 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
15142 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
15143 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
15145 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
15146 BLOCK_ABSTRACT_ORIGIN unconditionally.
15148 2018-06-21 David Malcolm <dmalcolm@redhat.com>
15150 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
15152 * ipa-reference.c (ipa_reference_c_finalize): Delete
15153 ipa_ref_opt_sum_summaries and set it to NULL.
15155 2018-06-21 Tom de Vries <tdevries@suse.de>
15157 PR tree-optimization/85859
15158 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
15159 test with comment from bb_no_side_effects_p.
15161 2018-06-21 Richard Biener <rguenther@suse.de>
15163 PR tree-optimization/86232
15164 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
15165 max for constant niter.
15167 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15169 * config/aarch64/aarch64-simd.md
15170 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
15172 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15174 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
15175 Make opernads of the unspec commutative.
15177 2018-06-21 Richard Biener <rguenther@suse.de>
15179 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
15180 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15181 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
15182 (vect_analyze_data_ref_dependence): Re-order checks to deal with
15184 (vect_record_base_alignments): Do not record base alignment
15185 for gathers or scatters.
15186 (vect_compute_data_ref_alignment): Drop return value that is always
15187 true. Bail out early for gathers or scatters.
15188 (vect_enhance_data_refs_alignment): Bail out early for gathers
15190 (vect_find_same_alignment_drs): Likewise.
15191 (vect_analyze_data_refs_alignment): Remove dead code.
15192 (vect_slp_analyze_and_verify_node_alignment): Likewise.
15193 (vect_analyze_data_refs): For possible gathers or scatters do
15194 not create an alternate DR, just check their possible validity
15195 and mark them. Adjust DECL_NONALIASED handling to not rely
15196 on DR_BASE_ADDRESS.
15197 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
15198 update inits of gathers or scatters.
15199 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
15200 Also copy gather/scatter flag to pattern vinfo.
15202 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
15204 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15205 behavior of vec_packsu (vector unsigned long long, vector unsigned
15206 long long) to match behavior of vec_packs with same signature.
15208 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
15209 Thomas Schwinge <thomas@codesourcery.com>
15210 Cesar Philippidis <cesar@codesourcery.com>
15212 * gimplify.c (gimplify_scan_omp_clauses): Add support for
15213 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15214 (gimplify_adjust_omp_clauses): Likewise.
15215 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
15216 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
15217 (gimplify_omp_target_update): Update handling of acc update and
15219 * omp-low.c (install_var_field): Remove unused parameter
15220 base_pointers_restrict.
15221 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
15222 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
15224 (omp_target_base_pointers_restrict_p): Delete.
15225 (scan_omp_target): Update call to scan_sharing_clauses.
15226 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
15228 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
15229 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15230 (convert_local_omp_clauses): Likewise.
15231 * tree-pretty-print.c (dump_omp_clause): Likewise.
15232 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
15234 (omp_clause_code_name): Likewise.
15236 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15239 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
15242 PR tree-optimization/86231
15243 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
15244 anti-range don't overwrite *vr0min before using it to compute *vr0max.
15246 2018-06-20 Tom de Vries <tdevries@suse.de>
15248 PR tree-optimization/86097
15249 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15250 iv type if signedness of iv type is not the same as that of *nit.
15252 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15254 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
15255 EDGE_EH edges, verify they are all EDGE_EH.
15257 2018-06-20 Maya Rashish <coypu@sdf.org>
15259 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15261 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15263 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15264 * config/aarch64/aarch64.c (xgene1_tunings): Add
15265 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15266 (aarch64_mode_valid_for_sched_fusion_p):
15267 Allow 16-byte modes.
15268 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15269 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15271 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15273 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15274 * config/aarch64/iterators.md (VQ2): New mode iterator.
15276 2018-06-20 Martin Liska <mliska@suse.cz>
15278 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15279 Change default ratio from 10 to 8.
15281 2018-06-20 Martin Liska <mliska@suse.cz>
15283 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15285 (bit_test_cluster::find_bit_tests): Likewise.
15286 (switch_decision_tree::analyze_switch_statement): Find clusters.
15287 * tree-switch-conversion.h (struct jump_table_cluster): Document
15290 2018-06-20 Martin Liska <mliska@suse.cz>
15292 * tree-switch-conversion.c (switch_conversion::collect):
15293 Record m_uniq property.
15294 (switch_conversion::expand): Bail out for special conditions.
15295 (group_cluster::~group_cluster): New.
15296 (group_cluster::group_cluster): Likewise.
15297 (group_cluster::dump): Likewise.
15298 (jump_table_cluster::emit): New.
15299 (switch_decision_tree::fix_phi_operands_for_edges): New.
15300 (struct case_node): Remove struct.
15301 (jump_table_cluster::can_be_handled): New.
15302 (case_values_threshold): Moved to header.
15303 (reset_out_edges_aux): Likewise.
15304 (jump_table_cluster::is_beneficial): New.
15305 (bit_test_cluster::can_be_handled): Likewise.
15306 (add_case_node): Remove.
15307 (bit_test_cluster::is_beneficial): New.
15308 (case_bit_test::cmp): New.
15309 (bit_test_cluster::emit): New.
15310 (expand_switch_as_decision_tree_p): Remove.
15311 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15312 (fix_phi_operands_for_edge): Likewise.
15313 (switch_decision_tree::analyze_switch_statement): New.
15314 (compute_cases_per_edge): Move ...
15315 (switch_decision_tree::compute_cases_per_edge): ... here.
15316 (try_switch_expansion): Likewise.
15317 (switch_decision_tree::try_switch_expansion): Likewise.
15318 (record_phi_operand_mapping): Likewise.
15319 (switch_decision_tree::record_phi_operand_mapping): Likewise.
15320 (emit_case_decision_tree): Likewise.
15321 (switch_decision_tree::emit): Likewise.
15322 (balance_case_nodes): Likewise.
15323 (switch_decision_tree::balance_case_nodes): Likewise.
15324 (dump_case_nodes): Likewise.
15325 (switch_decision_tree::dump_case_nodes): Likewise.
15326 (emit_jump): Likewise.
15327 (switch_decision_tree::emit_jump): Likewise.
15328 (emit_cmp_and_jump_insns): Likewise.
15329 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15330 (emit_case_nodes): Likewise.
15331 (switch_decision_tree::emit_case_nodes): Likewise.
15332 (conditional_probability): Remove.
15333 * tree-switch-conversion.h (enum cluster_type): New.
15335 (struct cluster): Likewise.
15336 (cluster::cluster): Likewise.
15337 (struct simple_cluster): Likewise.
15338 (simple_cluster::simple_cluster): Likewise.
15339 (struct group_cluster): Likewise.
15340 (struct jump_table_cluster): Likewise.
15341 (struct bit_test_cluster): Likewise.
15342 (struct min_cluster_item): Likewise.
15343 (struct case_tree_node): Likewise.
15344 (case_tree_node::case_tree_node): Likewise.
15345 (jump_table_cluster::case_values_threshold): Likewise.
15346 (struct case_bit_test): Likewise.
15347 (struct switch_decision_tree): Likewise.
15348 (struct switch_conversion): Likewise.
15349 (switch_decision_tree::reset_out_edges_aux): Likewise.
15351 2018-06-20 Martin Liska <mliska@suse.cz>
15353 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15354 (hoist_edge_and_branch_if_true): Likewise.
15355 (expand_switch_using_bit_tests_p): Likewise.
15356 (struct case_bit_test): Likewise.
15357 (case_bit_test_cmp): Likewise.
15358 (emit_case_bit_tests): Likewise.
15359 (switch_conversion::switch_conversion): New class.
15360 (struct switch_conv_info): Remove old struct.
15361 (collect_switch_conv_info): More to ...
15362 (switch_conversion::collect): ... this.
15363 (check_range): Likewise.
15364 (switch_conversion::check_range): Likewise.
15365 (check_all_empty_except_final): Likewise.
15366 (switch_conversion::check_all_empty_except_final): Likewise.
15367 (check_final_bb): Likewise.
15368 (switch_conversion::check_final_bb): Likewise.
15369 (create_temp_arrays): Likewise.
15370 (switch_conversion::create_temp_arrays): Likewise.
15371 (free_temp_arrays): Likewise.
15372 (gather_default_values): Likewise.
15373 (switch_conversion::gather_default_values): Likewise.
15374 (build_constructors): Likewise.
15375 (switch_conversion::build_constructors): Likewise.
15376 (constructor_contains_same_values_p): Likewise.
15377 (switch_conversion::contains_same_values_p): Likewise.
15378 (array_value_type): Likewise.
15379 (switch_conversion::array_value_type): Likewise.
15380 (build_one_array): Likewise.
15381 (switch_conversion::build_one_array): Likewise.
15382 (build_arrays): Likewise.
15383 (switch_conversion::build_arrays): Likewise.
15384 (gen_def_assigns): Likewise.
15385 (switch_conversion::gen_def_assigns): Likewise.
15386 (prune_bbs): Likewise.
15387 (switch_conversion::prune_bbs): Likewise.
15388 (fix_phi_nodes): Likewise.
15389 (switch_conversion::fix_phi_nodes): Likewise.
15390 (gen_inbound_check): Likewise.
15391 (switch_conversion::gen_inbound_check): Likewise.
15392 (process_switch): Use the newly created class.
15393 (switch_conversion::expand): New.
15394 (switch_conversion::~switch_conversion): New.
15395 * tree-switch-conversion.h: New file.
15397 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15399 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15400 tree-vect-patterns.c.
15401 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15402 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
15403 (vect_recog_sad_pattern): Likewise.
15404 (vect_recog_widen_sum_pattern): Likewise.
15405 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
15406 (vect_recog_widen_shift_pattern): Remove the type_in argument.
15407 (vect_recog_rotate_pattern): Likewise.
15408 (vect_recog_mult_pattern): Likewise.
15409 (vect_recog_vector_vector_shift_pattern): Likewise.
15410 (vect_recog_divmod_pattern): Likewise.
15411 (vect_recog_mixed_size_cond_pattern): Likewise.
15412 (vect_recog_bool_pattern): Likewise.
15413 (vect_recog_mask_conversion_pattern): Likewise.
15414 (vect_try_gather_scatter_pattern): Likewise.
15415 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
15416 (vect_recog_over_widening_pattern): Likewise.
15417 (vect_recog_gather_scatter_pattern): Likewise.
15418 (vect_recog_func_ptr): Move from tree-vectorizer.h
15419 (vect_vect_recog_func_ptrs): Move further down the file.
15420 (vect_recog_func): Likewise. Remove the third argument.
15421 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15422 (vect_pattern_recog_1): Expect the pattern function to do any
15423 necessary target tests. Also expect it to provide a vector type.
15424 Remove the type_in handling.
15426 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15428 * tree-vect-patterns.c (vect_pattern_detected): New function.
15429 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15430 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15431 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15432 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15433 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15434 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15435 (vect_recog_mask_conversion_pattern)
15436 (vect_try_gather_scatter_pattern): Likewise.
15438 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15440 * tree-vect-patterns.c (vect_get_internal_def): New function.
15441 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15442 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15443 (search_type_for_mask_1): Use it.
15445 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15447 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15448 redundant WIDEN_SUM_EXPR handling.
15449 (vect_recog_sad_pattern): Likewise.
15451 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15453 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15454 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15455 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15456 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15457 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15459 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15461 * tree-vect-stmts.c (vectorizable_call): Make sure that we
15462 use the stmt_vec_info of the original bb statement for the
15463 new zero assignment, even if the call is part of a pattern.
15465 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15467 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15468 that the sequence is attached to the original statement rather
15469 than the pattern statement.
15470 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15471 PATTERN_DEF_SEQ from the original statement rather than
15472 the main pattern statement.
15473 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15474 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15475 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15477 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15479 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15480 definition statements before the early exit for statements that aren't
15482 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15484 (vect_transform_loop): ...here. Process pattern definition
15485 statements without first checking whether the main pattern
15486 statement is live or relevant.
15488 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15490 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15491 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15493 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
15495 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15496 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15497 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15498 (expand_block_compare): Change select_block_compare_mode call.
15499 (expand_strncmp_align_check): Use new functions, fix comment.
15500 (emit_final_str_compare_gpr): New function.
15501 (expand_strn_compare): Refactor and clean up code.
15502 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15504 2018-06-19 Tony Reix <tony.reix@atos.com>
15505 Damien Bergamini <damien.bergamini@atos.com>
15506 David Edelsohn <dje.gcc@gmail.com>
15508 * collect2.c (static_obj): New variable.
15509 (static_libs): New variable.
15510 (is_in_list): Uncomment declaration.
15511 (main): Track AIX libraries linked statically.
15512 (is_in_list): Uncomment definition.
15513 (scan_prog_file): Don't add AIX shared libraries initializer
15514 to constructor list if linking statically.
15516 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
15518 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15520 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15522 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
15524 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15527 2018-06-19 Martin Liska <mliska@suse.cz>
15529 * config/i386/i386.c (ix86_can_inline_p): Do not use
15530 ipa_fn_summaries::get_create.
15531 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15533 (devirtualization_time_bonus): Likewise.
15534 (ipcp_propagate_stage): Likewise.
15535 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15536 (edge_set_predicate): Likewise.
15537 (evaluate_conditions_for_known_args): Likewise.
15538 (evaluate_properties_for_edge): Likewise.
15539 (ipa_call_summary::reset): Tranform to ...
15540 (ipa_call_summary::~ipa_call_summary): ... this.
15541 (ipa_fn_summary::reset): Transform to ...
15542 (ipa_fn_summary::~ipa_fn_summary): ... this.
15543 (ipa_fn_summary_t::remove): Rename to ...
15544 (ipa_fn_summary_t::remove_callees): ... this.
15545 (ipa_fn_summary_t::duplicate): Use placement new
15546 instead of memory copy.
15547 (ipa_call_summary_t::duplicate): Likewise.
15548 (ipa_call_summary_t::remove): Remove.
15549 (dump_ipa_call_summary): Change get_create to get.
15550 (ipa_dump_fn_summary): Dump only when summary exists.
15551 (analyze_function_body): Use symbol_summary::get instead
15553 (compute_fn_summary): Likewise.
15554 (estimate_edge_devirt_benefit): Likewise.
15555 (estimate_edge_size_and_time): Likewise.
15556 (inline_update_callee_summaries): Likewise.
15557 (remap_edge_change_prob): Likewise.
15558 (remap_edge_summaries): Likewise.
15559 (ipa_merge_fn_summary_after_inlining): Likewise.
15560 (write_ipa_call_summary): Likewise.
15561 (ipa_fn_summary_write): Likewise.
15562 (ipa_free_fn_summary): Likewise.
15563 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15564 (struct ipa_call_summary): Likewise.
15565 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15567 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15568 (estimate_size_after_inlining): Likewise.
15569 (estimate_growth): Likewise.
15570 (growth_likely_positive): Likewise.
15571 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15572 (inline_call): Likewise.
15573 * ipa-inline.c (caller_growth_limits): Likewise.
15574 (can_inline_edge_p): Likewise.
15575 (can_inline_edge_by_limits_p): Likewise.
15576 (compute_uninlined_call_time): Likewise.
15577 (compute_inlined_call_time): Likewise.
15578 (want_inline_small_function_p): Likewise.
15579 (edge_badness): Likewise.
15580 (update_caller_keys): Likewise.
15581 (update_callee_keys): Likewise.
15582 (inline_small_functions): Likewise.
15583 (inline_to_all_callers_1): Likewise.
15584 (dump_overall_stats): Likewise.
15585 (early_inline_small_functions): Likewise.
15586 (early_inliner): Likewise.
15587 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15588 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15589 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15590 * ipa-split.c (execute_split_functions): Likewise.
15591 * symbol-summary.h: Likewise.
15592 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15594 2018-06-19 Richard Biener <rguenther@suse.de>
15596 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15597 (vectorize_loops): ... here. Fix dbgcnt handling.
15598 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15600 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15603 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15604 ieee128 argument takes up only one (vector) register, not two (floating
15607 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15609 * gimplify.c (gimplify_init_constructor): Really never clear for an
15610 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15612 2018-06-19 Richard Biener <rguenther@suse.de>
15614 PR tree-optimization/86179
15615 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15616 after failed recognition.
15618 2018-06-18 Martin Sebor <msebor@redhat.com>
15620 PR middle-end/85602
15621 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15622 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15623 Handle integer subtraction.
15624 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15625 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15627 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15629 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15630 param from rtx to rtx_insn *.
15631 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15633 (frv_ifcvt_modify_insn): Likwise.
15634 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15635 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
15636 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15637 as_a <rtx_insn *> cast to local "unprotected_region" once
15638 it's been established that it's not NULL or pc_rtx.
15639 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15640 param "sethi" from rtx to rtx_insn *.
15641 (nds32_group_float_insns): Likewise for param "insn".
15642 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15644 (vax_output_int_subtract): Likewise.
15645 * config/vax/vax.c (vax_output_int_add): Likewise for param
15647 (vax_output_int_subtract): Likewise.
15648 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15649 (emit_pattern_after): Likewise for param "after".
15650 (emit_insn_after): Likewise.
15651 (emit_jump_insn_after): Likewise.
15652 (emit_call_insn_after): Likewise.
15653 (emit_debug_insn_after): Likewise.
15654 (emit_pattern_before): Likewise for param "before".
15655 (emit_insn_before): Likewise.
15656 (emit_jump_insn_before): Likewise.
15657 * final.c (get_insn_template): Likewise for param "insn", removing
15659 * output.h (get_insn_template): Likewise for 2nd param.
15660 * rtl.h (emit_insn_before): Likewise.
15661 (emit_jump_insn_before): Likewise.
15662 (emit_debug_insn_before_noloc): Likewise.
15663 (emit_insn_after): Likewise.
15664 (emit_jump_insn_after): Likewise.
15665 (emit_call_insn_after): Likewise.
15666 (emit_debug_insn_after): Likewise.
15667 (set_insn_deleted): Likewise for param.
15669 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
15672 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15673 floating point modes, so that IFmode is numerically greater than
15674 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15675 to declare the ordering. This prevents IFmode from being
15676 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15677 machine. Include rs6000-modes.h to share the fractional values
15678 between genmodes* and the rest of the compiler.
15679 (IFmode): Likewise.
15680 (KFmode): Likewise.
15681 (TFmode): Likewise.
15682 * config/rs6000/rs6000-modes.h: New file.
15683 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15684 meaning of rs6000_long_double_size so that 126..128 selects an
15685 appropriate 128-bit floating point type.
15686 (rs6000_option_override_internal): Likewise.
15687 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15688 (TARGET_LONG_DOUBLE_128): Change the meaning of
15689 rs6000_long_double_size so that 126..128 selects an appropriate
15690 128-bit floating point type.
15691 (LONG_DOUBLE_TYPE_SIZE): Update comment.
15692 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15693 source and destination to match the standard usage.
15694 (truncifkf2): Likewise.
15695 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15696 ISA 2.07 to use an explicit clobber, instead of passing in a
15698 (copysign<mode>3_soft): Likewise.
15700 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15702 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15703 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15704 (vect_slp_analyze_instance_dependence): Likewise.
15705 (vect_enhance_data_refs_alignment): Likewise.
15706 (vect_analyze_data_refs_alignment): Likewise.
15707 (vect_slp_analyze_and_verify_instance_alignment
15708 (vect_analyze_data_ref_accesses): Likewise.
15709 (vect_prune_runtime_alias_test_list): Likewise.
15710 (vect_analyze_data_refs): Likewise.
15711 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15712 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15713 (vect_analyze_scalar_cycles_1): Likewise.
15714 (vect_get_loop_niters): Likewise.
15715 (vect_analyze_loop_form_1): Likewise.
15716 (vect_update_vf_for_slp): Likewise.
15717 (vect_analyze_loop_operations): Likewise.
15718 (vect_analyze_loop): Likewise.
15719 (vectorizable_induction): Likewise.
15720 (vect_transform_loop): Likewise.
15721 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15722 * tree-vect-slp.c (vect_analyze_slp): Likewise.
15723 (vect_make_slp_decision): Likewise.
15724 (vect_detect_hybrid_slp): Likewise.
15725 (vect_slp_analyze_operations): Likewise.
15726 (vect_slp_bb): Likewise.
15727 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15728 (vectorizable_bswap): Likewise.
15729 (vectorizable_call): Likewise.
15730 (vectorizable_simd_clone_call): Likewise.
15731 (vectorizable_conversion): Likewise.
15732 (vectorizable_assignment): Likewise.
15733 (vectorizable_shift): Likewise.
15734 (vectorizable_operation): Likewise.
15735 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15737 2018-06-18 Martin Sebor <msebor@redhat.com>
15739 PR tree-optimization/81384
15740 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15741 * builtins.c (expand_builtin_strnlen): New function.
15742 (expand_builtin): Call it.
15743 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15744 * builtins.def (BUILT_IN_STRNLEN): New.
15745 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15746 Warn for bounds in excess of maximum object size.
15747 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15748 single-value ranges. Handle strnlen.
15749 (handle_builtin_strlen): Handle strnlen.
15750 (strlen_check_and_optimize_stmt): Same.
15751 * doc/extend.texi (Other Builtins): Document strnlen.
15753 2018-06-18 Maya Rashish <coypu@sdf.org>
15755 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15756 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15757 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15759 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15761 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15763 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15765 * tree.c (escaped_string::escape): Replace cast to char * by
15766 const_cast<char *> (unescaped).
15768 2018-06-18 Nick Clifton <nickc@redhat.com>
15771 * tree.c (escaped_string): New class. Converts an unescaped
15772 string into its escaped equivalent.
15773 (warn_deprecated_use): Use the new class to convert the
15774 deprecation message, if present.
15775 (test_escaped_strings): New self test.
15776 (test_c_tests): Add test_escaped_strings.
15777 * doc/extend.texi (deprecated): Add a note that the
15778 deprecation message is affected by the -fmessage-length
15779 option, and that control characters will be escaped.
15780 (#pragma GCC error): Document this pragma.
15781 (#pragma GCC warning): Likewise.
15782 * doc/invoke.texi (-fmessage-length): Document this option's
15783 effect on the #warning and #error preprocessor directives and
15784 the deprecated attribute.
15786 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
15788 * tree.c (decl_value_expr_lookup): Revert latest change.
15789 (decl_value_expr_insert): Likewise.
15791 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
15793 * gimplify.c (nonlocal_vlas): Delete.
15794 (nonlocal_vla_vars): Likewise.
15795 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15797 (gimplify_body): Do not create and destroy nonlocal_vlas.
15798 * tree-nested.c: Include diagnostic.h.
15799 (use_pointer_in_frame): Tweak.
15800 (lookup_field_for_decl): Add assertion and declare the transformation.
15801 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15802 internal error when the reference is in a wrong context. Do not
15803 create a debug decl by default.
15804 (note_nonlocal_block_vlas): Delete.
15805 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15806 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
15807 create a debug decl by default.
15808 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15809 call is in a wrong context.
15810 (fixup_vla_decls): New function.
15811 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
15812 debug variables were created.
15813 * tree.c (decl_value_expr_lookup): Add checking assertion.
15814 (decl_value_expr_insert): Likewise.
15816 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15818 PR middle-end/82479
15819 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15820 * tree-scalar-evolution.c (interpret_expr): Likewise.
15821 (expression_expensive_p): Likewise.
15822 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15823 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15824 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15825 (ssa_defined_by_minus_one_stmt_p): New.
15827 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15829 PR middle-end/64946
15830 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15831 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15832 * dojump.c (do_jump): Likewise.
15833 * expr.c (expand_expr_real_2): Check operand type's sign.
15834 * fold-const.c (const_unop): Handle ABSU_EXPR.
15835 (fold_abs_const): Likewise.
15836 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15837 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15838 (strip_sign_op_1): Likesise.
15839 * match.pd: Add new pattern to generate ABSU_EXPR.
15840 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15841 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15842 * tree-eh.c (operation_could_trap_helper_p): Likewise.
15843 * tree-inline.c (estimate_operator_cost): Likewise.
15844 * tree-pretty-print.c (dump_generic_node): Likewise.
15845 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15846 * tree.def (ABSU_EXPR): New.
15848 2018-06-16 Jakub Jelinek <jakub@redhat.com>
15850 PR middle-end/86095
15851 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15852 documented as preserved for backward compatibility only.
15853 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15855 PR rtl-optimization/86108
15856 * bb-reorder.c (create_forwarder_block): Renamed to ...
15857 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
15858 jump from new landing pad to the second part.
15859 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15862 2018-06-15 Jakub Jelinek <jakub@redhat.com>
15864 PR middle-end/85878
15865 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15866 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15867 Only call store_expr for halves if the mode is the same.
15869 PR middle-end/86123
15870 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15871 Fix up comment formatting.
15873 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
15875 * typed-splay-tree.h (typed_splay_tree::remove): New function.
15876 (typed_splay_tree::closure,
15877 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15878 (typed_splay_tree::typed_splay_tree,
15879 typed_splay_tree::operator =): Declared private.
15880 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15881 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15882 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15883 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15884 typed_splay_tree::splay_tree_splay,
15885 typed_splay_tree::splay_tree_foreach_helper,
15886 typed_splay_tree::splay_tree_insert,
15887 typed_splay_tree::splay_tree_remove,
15888 typed_splay_tree::splay_tree_lookup,
15889 typed_splay_tree::splay_tree_predecessor,
15890 typed_splay_tree::splay_tree_successor,
15891 typed_splay_tree::splay_tree_min,
15892 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15893 (typed_splay_tree::root, typed_splay_tree::comp,
15894 typed_splay_tree::delete_key,
15895 typed_splay_tree::delete_value): New data members.
15896 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15897 typed_splay_tree::remove.
15899 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
15901 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15902 -mginv and -mno-ginv to the assembler.
15903 * config/mips/mips.opt (-mcrc): New option.
15904 (-mginv): Likewise.
15905 * doc/invoke.text (-mcrc): Document.
15906 (-mginv): Likewise.
15908 2018-06-15 Nick Clifton <nickc@redhat.com>
15911 * tree.c (escaped_string): New class. Converts an unescaped
15912 string into its escaped equivalent.
15913 (warn_deprecated_use): Use the new class to convert the
15914 deprecation message, if present.
15915 (test_escaped_strings): New self test.
15916 (test_c_tests): Add test_escaped_strings.
15917 * doc/extend.texi (deprecated): Add a note that the
15918 deprecation message is affected by the -fmessage-length
15919 option, and that control characters will be escaped.
15920 (#pragma GCC error): Document this pragma.
15921 (#pragma GCC warning): Likewise.
15922 * doc/invoke.texi (-fmessage-length): Document this option's
15923 effect on the #warning and #error preprocessor directives and
15924 the deprecated attribute.
15926 2018-06-15 Richard Biener <rguenther@suse.de>
15928 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15929 here, also noting vector size used.
15930 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
15931 size used in MSG_OPTIMIZED_LOCATIONS dump.
15932 (pass_slp_vectorize::execute): Adjust.
15934 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
15937 * config/arc/arc.c (arc_return_address_register): Fix
15940 2018-06-15 Richard Biener <rguenther@suse.de>
15942 PR middle-end/86159
15943 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15944 leave useless conversion stripping to force_gimple_operand_gsi.
15945 (gimplify_build2): Likewise.
15946 (gimplify_build1): Likewise.
15948 2018-06-15 Richard Biener <rguenther@suse.de>
15950 PR middle-end/86076
15951 * tree-cfg.c (move_stmt_op): unshare invariant addresses
15952 before adjusting their block.
15954 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
15956 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15957 multilibs for *-*-rtems*.
15958 * config/riscv/t-rtems: New file.
15960 2018-06-14 Jakub Jelinek <jakub@redhat.com>
15962 PR middle-end/86122
15963 * match.pd ((A +- CST1) +- CST2): Punt if last resort
15964 unsigned_type_for returns NULL.
15967 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15968 subregs of multi-word pseudos unless the float mode has word size.
15970 2018-06-14 Richard Biener <rguenther@suse.de>
15972 PR middle-end/86139
15973 * tree-vect-generic.c (build_word_mode_vector_type): Remove
15974 duplicate and harmful type_hash_canon.
15975 * tree.c (type_hash_canon): Assert we didn't find ourselves.
15977 2018-06-14 Richard Biener <rguenther@suse.de>
15980 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15983 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
15985 * config/rtems.h (STDINT_LONG32): Define.
15987 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
15988 Prachi Godbole <prachi.godbole@imgtec.com>
15990 * config/mips/mips-cpus.def: Define P6600.
15991 * config/mips/mips-tables.opt: Regenerate.
15992 * config/mips/mips.c (mips_ucbranch_type): New enum.
15993 (mips_rtx_cost_data): Add support for P6600.
15994 (mips_issue_rate): Likewise.
15995 (mips_multipass_dfa_lookahead): Likewise.
15996 (mips_avoid_hazard): Likewise.
15997 (mips_reorg_process_insns): Likewise.
15998 (mips_classify_branch_p6600): New function.
15999 * config/mips/mips.h (TUNE_P6600): New define.
16000 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
16001 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
16002 * config/mips/mips.md: Include p6600.md.
16003 (processor): Add p6600.
16004 * config/mips/p6600.md: New file.
16005 * doc/invoke.texi: Add p6600 to supported architectures.
16007 2018-06-13 Martin Sebor <msebor@redhat.com>
16009 PR tree-optimization/86114
16010 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
16012 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
16014 2018-06-13 Richard Biener <rguenther@suse.de>
16016 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
16017 Properly set vector type of the intermediate stmt.
16018 * tree-vect-stmts.c (vectorizable_operation): The destination
16019 var always has vectype_out type.
16021 2018-06-13 Jeff Law <law@redhat.com>
16023 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
16024 integer 0 for argument to print_rtl_with_bb.
16025 (rl78_reorg): Likewise.
16027 2018-06-13 David Malcolm <dmalcolm@redhat.com>
16029 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
16030 from rtx to rtx_insn *.
16031 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
16033 (add_sched_insns_for_speculation): Likewise for local "target",
16034 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16035 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
16036 from rtx_insn ** to rtx_code_label **.
16037 (reorg_emit_nops): Likewise.
16038 (c6x_reorg): Likewise for local "call_labels".
16039 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
16041 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
16042 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
16043 the loops over LABEL_REFS.
16044 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
16046 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16047 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
16048 (split_branches): Strengthen local "olabel" from rtx to
16049 rtx_insn *, adding a safe_as_a cast.
16050 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
16052 (add_insn_after): Likewise for first two params.
16053 (add_insn_before): Likewise.
16054 (remove_insn): Likewise for param.
16055 (emit_pattern_before_noloc): Likewise for second and third params.
16056 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
16057 (emit_call_insn_before_noloc): Likewise.
16058 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
16060 (emit_barrier_before): Likewise.
16061 (emit_label_before): Strengthen "label" param from "rtx" to
16062 "rtx_code_label *". Strengthen "before" param from "rtx" to
16064 (emit_insn_after_1): Strengthen "after" param from "rtx" to
16066 (emit_pattern_after_noloc): Likewise.
16067 (emit_insn_after_noloc): Likewise.
16068 (emit_jump_insn_after_noloc): Likewise.
16069 (emit_call_insn_after_noloc): Likewise.
16070 (emit_debug_insn_after_noloc): Likewise.
16071 (emit_barrier_after): Likewise.
16072 (emit_label_after): Likewise for both params.
16073 (emit_pattern_after_setloc): Likewise for "after" param. Convert
16074 "loc" param from "int" to "location_t".
16075 (emit_insn_after_setloc): Likewise.
16076 (emit_jump_insn_after_setloc): Likewise.
16077 (emit_call_insn_after_setloc): Likewise.
16078 (emit_debug_insn_after_setloc): Likewise.
16079 (emit_pattern_before_setloc): Likewise for "before" param. Convert
16080 "loc" param from "int" to "location_t".
16081 (emit_pattern_before): Convert NULL_RTX to NULL.
16082 (emit_insn_before_setloc): Convert "loc" param from "int" to
16084 (emit_jump_insn_before_setloc): Likewise.
16085 (emit_call_insn_before_setloc): Likewise.
16086 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
16087 rtx_insn *. Convert "loc" param from "int" to "location_t".
16088 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
16089 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
16090 Convert 3rd param from "int" to "location_t".
16091 (emit_barrier_before, emit_barrier_after, next_real_insn):
16092 Strengthen param from rtx to rtx_insn *.
16093 (emit_label_before): Strengthen 1st param from "rtx" to
16094 "rtx_code_label *". Strengthen 2nd param from "rtx" to
16096 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
16097 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
16098 Strengthen 2nd param from "rtx" to "rtx_insn *".
16099 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
16100 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
16101 Likewise. Convert 3rd param from "int" to "location_t".
16102 (emit_label_after): Strengthen 1st param from "rtx" to
16103 "rtx_code_label *".
16104 (next_real_insn, remove_insn): Strengthen param from "rtx" to
16106 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
16107 from "rtx" to "rtx_insn *".
16109 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
16111 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
16112 bodies streamed in with -Q.
16113 * dumpfile.c (dump_files): Add lto-stream-out dump file.
16114 * dumpfile.h (tree_dump_index): Add lto_stream_out.
16115 * gimple-streamer-out.c: Include gimple-pretty-print.h
16116 (output_bb): Dump stmts streamed.
16117 * lto-section-out.c: Include print-tree.h
16118 (lto_begin_section): Dump sections created.
16119 (lto_output_decl_index): Dump decl encoded.
16120 * lto-streamer-out.c: Include print-tree.h
16121 (create_output_block): Dump output block created.
16122 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
16123 (output_function): Dump function output.
16124 (output_constructor): Dump constructor streamed.
16125 (write_global_stream): Output indexes encoded.
16126 (produce_asm_for_decls): Dump streams encoded.
16127 * lto-streamer.c (streamer_dump_file): New global var.
16128 * lto-streamer.h (streamer_dump_file): Declare.
16129 * passes.c (ipa_write_summaries): Initialize streamer dump.
16130 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
16133 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
16136 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
16137 offsets for register save directives. Emit a second batch of save
16138 directives, if need be, when the function accesses prior frames.
16140 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16142 * config/arc/fpu.md (fmasf4): Force operand to register.
16143 (fnmasf4): Likewise.
16145 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16147 * config/arc/arc-protos.h (arc_pad_return): Remove.
16148 * config/arc/arc.c (machine_function): Remove force_short_suffix
16150 (arc_print_operand): Adjust printing of '&'.
16151 (arc_verify_short): Remove conditional printing of short suffix.
16152 (arc_final_prescan_insn): Remove reference to size_reason.
16153 (pad_return): New function.
16154 (arc_reorg): Call pad_return.
16155 (arc_pad_return): Remove.
16156 (arc_init_machine_status): Remove reference to force_short_suffix.
16157 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
16158 (attr length): When attribute iscompact is true force to 2
16159 regardless; in the case of maybe check if we want to force the
16160 instruction to have 4 bytes length.
16161 (nopv): Change it to generate 4 byte long nop as well.
16162 (blockage): New pattern.
16163 (simple_return): Remove call to arc_pad_return.
16164 (p_return_i): Likewise.
16166 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16168 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
16170 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16172 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
16175 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16177 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
16178 for ARC700 and ARCv2.
16180 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
16183 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
16184 operands[2] instead of operands[1].
16187 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16189 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
16190 case, check whether the outer register overlaps an unallocatable
16191 register, not just whether it fits the required class.
16193 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16195 * poly-int.h (can_div_trunc_p): Add new overload in which all values
16197 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
16198 (memrefs_conflict_p): Likewise.
16199 (init_alias_analysis): Likewise.
16200 * cfgexpand.c (expand_debug_expr): Likewise.
16201 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16202 * cse.c (fold_rtx): Likewise.
16203 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16204 * expr.c (emit_block_move_hints): Likewise.
16205 (clear_storage_hints, push_block, emit_push_insn): Likewise.
16206 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16207 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
16208 (emit_group_store): Likewise.
16209 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
16210 to read the PRE/POST_MODIFY increment.
16211 * calls.c (store_one_arg): Use strip_offset.
16212 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
16214 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
16216 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
16217 (simplify_binary_operation_1): Extend CONST_INT handling to
16219 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
16220 than a HOST_WIDE_INT.
16221 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
16223 (adjust_mems, add_stores): Update accodingly.
16224 (vt_canonicalize_addr): Track polynomial offsets.
16225 (emit_note_insn_var_location): Likewise.
16226 (vt_add_function_parameter): Likewise.
16227 (vt_initialize): Likewise.
16229 2018-06-12 Jeff Law <law@redhat.com>
16231 * config.gcc (alpha*-*-freebsd*): Remove.
16232 * config/alpha/freebsd.h: Remove.
16234 2018-06-12 David Malcolm <dmalcolm@redhat.com>
16237 * spellcheck-tree.c (levenshtein_distance): Rename to...
16238 (get_edit_distance): ...this, and update for underlying renaming.
16239 * spellcheck-tree.h (levenshtein_distance): Rename to...
16240 (get_edit_distance): ...this.
16241 * spellcheck.c (levenshtein_distance): Rename to...
16242 (get_edit_distance): ...this. Convert from Levenshtein distance
16243 to Damerau-Levenshtein distance by supporting transpositions of
16244 adjacent characters. Rename "v1" to "v_next" and "v0" to
16246 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16247 (selftest::test_edit_distance_unit_test_oneway): ...this, and
16248 update for underlying renaming.
16249 (selftest::levenshtein_distance_unit_test): Rename to...
16250 (selftest::test_get_edit_distance_unit): ...this, and update for
16251 underlying renaming.
16252 (selftest::test_find_closest_string): Add example from PR 69968
16253 where transposition helps
16254 (selftest::test_metric_conditions): Update for renaming.
16255 (selftest::test_metric_conditions): Likewise.
16256 (selftest::spellcheck_c_tests): Likewise.
16257 * spellcheck.h (levenshtein_distance): Rename both overloads to...
16258 (get_edit_distance): ...this.
16259 (best_match::consider): Update for renaming.
16261 2018-06-12 Martin Sebor <msebor@redhat.com>
16263 PR tree-optimization/85259
16264 * builtins.c (compute_objsize): Handle constant offsets.
16265 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16266 true iff a warning has been issued.
16267 * gimple.h (gimple_nonartificial_location): New function.
16268 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16269 gimple_nonartificial_location and handle -Wno-system-headers.
16270 (handle_builtin_stxncpy): Same.
16272 2018-06-12 Martin Sebor <msebor@redhat.com>
16275 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16277 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
16279 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16280 BUILTIN_VEC_XST entries for pointer to double and long long.
16282 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
16285 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16287 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16290 2018-06-12 Martin Liska <mliska@suse.cz>
16292 * doc/options.texi: Document IntegerRange.
16294 2018-06-12 Martin Liska <mliska@suse.cz>
16296 * config/i386/i386.opt: Make MPX-related options as Deprecated.
16297 * opt-functions.awk: Handle Deprecated flag.
16298 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16300 (read_cmdline_option): Report warning for a deprecated option.
16301 * opts.h (struct cl_option): Add new field cl_deprecated.
16302 (CL_ERR_DEPRECATED): New.
16304 2018-06-12 Martin Liska <mliska@suse.cz>
16306 * doc/options.texi: Document Deprecated option flag.
16308 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16310 * config/arc/arc-arch.h (arc_extras): New enum.
16311 (arc_cpu_t):Add field extra.
16312 (arc_cpu_types): Consider the extras.
16313 * config/arc/arc-cpus.def: Add extras info.
16314 * config/arc/arc-opts.h (processor_type): Consider extra field.
16315 * config/arc/arc.c (arc_override_options): Handle extra field.
16317 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16319 * config/arc/arc-arch.h: Update ARC_OPTX macro.
16320 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16322 * config/arc/arc.c (arc_init): Update pic warning.
16323 (irq_range): Update irq range parsing warnings.
16324 (arc_override_options): Update various warning messages.
16325 (arc_handle_aux_attribute): Likewise.
16327 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
16329 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16331 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16333 * doc/sourcebuild.texi: Document usage of line number 0 in verify
16334 compiler messages directives.
16336 2018-06-12 Matthew Fortune <mfortune@gmail.com>
16338 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16339 * config/mips/mips-tables.opt: Regenerate.
16340 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16342 * doc/invoke.texi: Document -march=i6500.
16344 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
16346 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16347 (i6400_gpmul): Add cpu_unit.
16348 (i6400_gpdiv): Likewise.
16349 (i6400_msa_add_d): Update reservations.
16350 (i6400_msa_int_add) Likewise.
16351 (i6400_msa_short_logic3) Likewise.
16352 (i6400_msa_short_logic2) Likewise.
16353 (i6400_msa_short_logic) Likewise.
16354 (i6400_msa_move) Likewise.
16355 (i6400_msa_cmp) Likewise.
16356 (i6400_msa_short_float2) Likewise.
16357 (i6400_msa_div_d) Likewise.
16358 (i6400_msa_long_logic1) Likewise.
16359 (i6400_msa_long_logic2) Likewise.
16360 (i6400_msa_mult) Likewise.
16361 (i6400_msa_long_float2) Likewise.
16362 (i6400_msa_long_float4) Likewise.
16363 (i6400_msa_long_float5) Likewise.
16364 (i6400_msa_long_float8) Likewise.
16365 (i6400_fpu_fadd): Include frint type.
16366 (i6400_fpu_store): New define_insn_reservation.
16367 (i6400_fpu_load): Likewise.
16368 (i6400_fpu_move): Likewise.
16369 (i6400_fpu_fcmp): Likewise.
16370 (i6400_fpu_fmadd): Likewise.
16371 (i6400_int_mult): Include imul3nc type and update reservation.
16372 (i6400_int_div): Include idiv3 type and update reservation.
16373 (i6400_int_load): Update to check type not move_type.
16374 (i6400_int_store): Likewise.
16375 (i6400_int_prefetch): Set zero latency.
16377 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
16379 * gcc.c: Document new %@{...} sequence.
16380 (LINK_COMMAND_SPEC): Use it for the -L switches.
16381 (cpp_unique_options): Use it for the -I switches.
16382 (at_file_argbuf): New global variable.
16383 (in_at_file): Likewise.
16384 (alloc_args): Create at_file_argbuf.
16385 (clear_args): Truncate at_file_argbuf.
16386 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16387 (open_at_file): New function.
16388 (close_at_file): Likewise.
16389 (create_at_file): Delete.
16390 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16393 (validate_switches_from_spec): Deal with %@{...} sequence.
16394 (validate_switches): Likewise.
16395 (driver::finalize): Call clear_args.
16397 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
16399 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16401 2018-06-11 Martin Sebor <msebor@redhat.com>
16403 * doc/invoke.texi (-Wall): List -Wc++17-compat.
16404 (Wno-class-memaccess): Add @opindex.
16405 (Wno-templates, Wno-multiple-inheritance): Same.
16406 (Wno-virtual-inheritance, Wno-namespaces): Same.
16407 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16408 (Wno-format-overflow, Wno-format-truncation): Same.
16409 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16410 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16411 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16412 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16413 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16414 (Wno-misspelled-isr): Same.
16416 2018-06-11 Martin Sebor <msebor@redhat.com>
16418 * PR tree-optimization/86083
16419 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16421 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
16423 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16425 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
16428 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16429 on the correct operand.
16430 (*movdi_internal64): Ditto.
16432 2018-06-11 Martin Liska <mliska@suse.cz>
16434 PR tree-optimization/86089
16435 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16437 2018-06-11 Julia Koval <julia.koval@intel.com>
16439 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16440 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16441 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16443 2018-06-11 Olivier Hainque <hainque@adacore.com>
16445 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16446 for Ada with strict dwarf2.
16448 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
16451 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16454 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
16456 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16458 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
16460 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16463 2018-06-08 Martin Liska <mliska@suse.cz>
16465 * tree-cfg.h (debug_function): Fix argument type to match
16468 2018-06-08 Martin Liska <mliska@suse.cz>
16470 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16471 Remove usage of MPX-related (and removed) fields.
16472 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16474 2018-06-08 David Malcolm <dmalcolm@redhat.com>
16476 * cfg.c (debug): Use TDF_NONE rather than 0.
16477 * cfghooks.c (debug): Likewise.
16478 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16479 (struct dump_option_value_info): Convert to...
16480 (struct kv_pair): ...this template type.
16481 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16483 (optinfo_verbosity_options): Likewise.
16484 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16486 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16487 than int for "optgroup_flags" param.
16488 (dump_generic_expr_loc): Use dump_flags_t rather than int for
16490 (dump_dec): Likewise.
16491 (dump_finish): Use TDF_NONE rather than 0.
16492 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16493 rather than int for "optgroup_flags" param. Use TDF_NONE rather
16494 than 0. Update for change to option_ptr.
16495 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16496 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
16497 0. Update for changes to optinfo_verbosity_options and
16499 (opt_info_switch_p): Convert optgroup_flags from int to
16501 (dump_basic_block): Use dump_flags_t rather than int
16502 for "dump_kind" param.
16503 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16504 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16505 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16506 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16507 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16508 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16509 TDF_NONE): Convert from macros to...
16510 (enum dump_flag): ...this new enum.
16511 (dump_flags_t): Update to use enum.
16512 (operator|, operator&, operator~, operator|=, operator&=):
16513 Implement for dump_flags_t.
16514 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16515 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16516 Convert from macros to...
16517 (enum optgroup_flag): ...this new enum.
16518 (optgroup_flags_t): New typedef.
16519 (operator|, operator|=): Implement for optgroup_flags_t.
16520 (struct dump_file_info): Convert field "alt_flags" to
16521 dump_flags_t. Convert field "optgroup_flags" to
16523 (dump_basic_block): Use dump_flags_t rather than int for param.
16524 (dump_generic_expr_loc): Likewise.
16525 (dump_dec): Likewise.
16526 (dump_register): Convert param "optgroup_flags" to
16528 (opt_info_enable_passes): Likewise.
16529 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16531 * gimple-pretty-print.c (debug): Likewise.
16532 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16533 (merged_store_group::apply_stores): Likewise.
16534 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16535 * gimple.c (verify_gimple_pp): Likewise.
16536 * graphite-poly.c (print_pbb_body): Likewise.
16537 * passes.c (pass_manager::register_one_dump_file): Convert
16538 local "optgroup_flags" to optgroup_flags_t.
16539 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16541 (debug_body): Likewise.
16542 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16543 to optgroup_flags_t.
16544 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16546 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16547 (convert_mult_to_fma): Likewise.
16548 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16549 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16550 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16551 "dump_kind" to dump_flags_t.
16553 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16555 * config/rs6000/rs6000.c (min, max): Delete.
16557 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16559 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16560 -mabi=spe and -mabi=no-spe.
16562 2018-06-08 Martin Liska <mliska@suse.cz>
16564 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16565 where we expect an existing summary.
16567 2018-06-08 Martin Liska <mliska@suse.cz>
16569 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16570 * ipa-inline.h (estimate_edge_growth): Likewise.
16572 2018-06-08 Martin Liska <mliska@suse.cz>
16574 * cgraph.c (function_version_hasher::hash): Use
16575 cgraph_node::get_uid ().
16576 (function_version_hasher::equal):
16577 * cgraph.h (cgraph_node::get_uid): New method.
16578 * ipa-inline.c (update_caller_keys): Use
16579 cgraph_node::get_uid ().
16580 (update_callee_keys): Likewise.
16581 * ipa-utils.c (searchc): Likewise.
16582 (ipa_reduced_postorder): Likewise.
16583 * lto-cgraph.c (input_node): Likewise.
16584 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16585 * symbol-summary.h (symtab_insertion): Likewise.
16586 (symtab_removal): Likewise.
16587 (symtab_duplication): Likewise.
16588 * tree-pretty-print.c (dump_function_header): Likewise.
16589 * tree-sra.c (convert_callers_for_node): Likewise.
16591 2018-06-08 Martin Liska <mliska@suse.cz>
16593 * cgraph.c (symbol_table::create_edge): Always assign a new
16595 (symbol_table::free_edge): Do not recycle numbers.
16596 * cgraph.h (cgraph_edge::get): New method.
16597 * symbol-summary.h (symtab_removal): Use it.
16598 (symtab_duplication): Likewise.
16599 (call_summary::hashable_uid): Remove.
16601 2018-06-08 Martin Liska <mliska@suse.cz>
16603 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16604 (initialize_growth_caches): Remove.
16605 (free_growth_caches): Likewise.
16606 (do_estimate_edge_time): Use edge_growth_cache.
16607 (do_estimate_edge_size): Likewise.
16608 (do_estimate_edge_hints): Likewise.
16609 * ipa-inline.c (reset_edge_caches): Likewise.
16610 (recursive_inlining): Likewise.
16611 (inline_small_functions): Likewise.
16612 * ipa-inline.h (initialize_growth_caches): Remove.
16613 (estimate_edge_size): Likewise.
16614 (estimate_edge_time): Likewise.
16615 (estimate_edge_hints): Likewise.
16616 (reset_edge_growth_cache): Likewise.
16617 * symbol-summary.h (call_summary::remove): New method.
16619 2018-06-08 Martin Liska <mliska@suse.cz>
16621 * ipa-cp.c (class edge_clone_summary): New summary.
16622 (grow_edge_clone_vectors): Remove.
16623 (ipcp_edge_duplication_hook): Remove.
16624 (class edge_clone_summary_t): New call_summary class.
16625 (ipcp_edge_removal_hook): Remove.
16626 (edge_clone_summary_t::duplicate): New function.
16627 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16628 (create_specialized_node): Likewise.
16629 (ipcp_driver): Initialize edge_clone_summaries and do not
16632 2018-06-08 Martin Liska <mliska@suse.cz>
16634 * symbol-summary.h (get): New function.
16635 (call_summary::m_initialize_when_cloning): New class member.
16637 2018-06-08 Martin Liska <mliska@suse.cz>
16639 * cgraph.c (cgraph_node::remove): Do not recycle uid.
16640 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16641 (symbol_table::allocate_cgraph_symbol): Do not set uid.
16642 * passes.c (uid_hash_t): Record removed_nodes by their uids.
16643 (remove_cgraph_node_from_order): Use the removed_nodes set.
16644 (do_per_function_toporder): Likwise.
16645 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16646 instead of summary_uid.
16647 (symtab_removal): Likewise.
16648 (symtab_duplication): Likewise.
16650 2018-06-08 Martin Liska <mliska@suse.cz>
16652 * ipa-cp.c (ipcp_store_bits_results): Use
16653 ipcp_transformation_sum.
16654 (ipcp_store_vr_results): Likewise.
16655 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16657 (ipcp_transformation_initialize): ... this.
16658 (ipa_set_node_agg_value_chain):
16659 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16660 (write_ipcp_transformation_info): Likewise.
16661 (read_ipcp_transformation_info): Likewise.
16662 (ipcp_update_bits): Likewise.
16663 (ipcp_update_vr): Likewise.
16664 (ipcp_transform_function): Likewise.
16665 * ipa-prop.h: Rename ipcp_transformation_summary to
16666 ipcp_transformation.
16667 (class ipcp_transformation_t): New function summary.
16668 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16669 (ipa_get_agg_replacements_for_node): Likewise.
16671 2018-06-08 Martin Liska <mliska@suse.cz>
16673 * ipa-pure-const.c (struct funct_state_d): Do it class instead
16675 (class funct_state_summary_t): New function_summary class.
16676 (has_function_state): Remove.
16677 (get_function_state): Likewise.
16678 (set_function_state): Likewise.
16679 (add_new_function): Likewise.
16680 (funct_state_summary_t::insert): New function.
16681 (duplicate_node_data): Remove.
16682 (remove_node_data): Remove.
16683 (funct_state_summary_t::duplicate): New function.
16684 (register_hooks): Create new funct_state_summaries.
16685 (pure_const_generate_summary): Use it.
16686 (pure_const_write_summary): Likewise.
16687 (pure_const_read_summary): Likewise.
16688 (propagate_pure_const): Likewise.
16689 (propagate_nothrow): Likewise.
16690 (dump_malloc_lattice): Likewise.
16691 (propagate_malloc): Likewise.
16692 (execute): Do not register hooks, just remove summary
16694 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16697 2018-06-08 Martin Liska <mliska@suse.cz>
16699 * ipa-reference.c (remove_node_data): Remove.
16700 (duplicate_node_data): Likewise.
16701 (class ipa_ref_var_info_summary_t): New class.
16702 (class ipa_ref_opt_summary_t): Likewise.
16703 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16704 (get_reference_optimization_summary): Use
16705 ipa_ref_opt_sum_summaries.
16706 (set_reference_vars_info): Remove.
16707 (set_reference_optimization_summary): Likewise.
16708 (ipa_init): Create summaries.
16709 (init_function_info): Use function summary.
16710 (ipa_ref_opt_summary_t::duplicate): New function.
16711 (ipa_ref_opt_summary_t::remove): New function.
16712 (get_read_write_all_from_node): Fix GNU coding style.
16713 (propagate): Use function summary.
16714 (write_node_summary_p): Fix GNU coding style.
16715 (stream_out_bitmap): Likewise.
16716 (ipa_reference_read_optimization_summary): Use function summary.
16717 (ipa_reference_c_finalize): Do not release hooks.
16719 2018-06-08 Martin Liska <mliska@suse.cz>
16721 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16722 (analyze_function_body): Extract multiple calls of get_create.
16723 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16724 * ipa-inline.c (recursive_inlining): Use ::get method.
16725 * ipa-inline.h (estimate_edge_growth): Likewise.
16727 2018-06-08 Martin Liska <mliska@suse.cz>
16729 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16731 (hsa_function_summary::hsa_function_summary): Use the new enum
16733 (hsa_gpu_implementation_p): Use hsa_summaries::get.
16734 * hsa-gen.c (hsa_get_host_function): Likewise.
16735 (get_brig_function_name): Likewise.
16736 * ipa-hsa.c (process_hsa_functions): Likewise.
16737 (ipa_hsa_write_summary): Likewise.
16738 * symbol-summary.h (symtab_duplication): Use ::get function/
16739 (get): New function.
16741 2018-06-08 Martin Liska <mliska@suse.cz>
16743 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16745 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16746 (hsa_register_kernel): Likewise.
16747 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16748 * hsa-gen.c (hsa_get_host_function): Likewise.
16749 (get_brig_function_name): Likewise.
16750 (generate_hsa): Likewise.
16751 (pass_gen_hsail::execute): Likewise.
16752 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16753 (devirtualization_time_bonus): Likewise.
16754 (ipcp_propagate_stage): Likewise.
16755 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16756 (edge_set_predicate): Likewise.
16757 (evaluate_conditions_for_known_args): Likewise.
16758 (evaluate_properties_for_edge): Likewise.
16759 (ipa_fn_summary::reset): Likewise.
16760 (ipa_fn_summary_t::duplicate): Likewise.
16761 (dump_ipa_call_summary): Likewise.
16762 (ipa_dump_fn_summary): Likewise.
16763 (analyze_function_body): Likewise.
16764 (compute_fn_summary): Likewise.
16765 (estimate_edge_devirt_benefit): Likewise.
16766 (estimate_edge_size_and_time): Likewise.
16767 (estimate_calls_size_and_time): Likewise.
16768 (estimate_node_size_and_time): Likewise.
16769 (inline_update_callee_summaries): Likewise.
16770 (remap_edge_change_prob): Likewise.
16771 (remap_edge_summaries): Likewise.
16772 (ipa_merge_fn_summary_after_inlining): Likewise.
16773 (ipa_update_overall_fn_summary): Likewise.
16774 (read_ipa_call_summary): Likewise.
16775 (inline_read_section): Likewise.
16776 (write_ipa_call_summary): Likewise.
16777 (ipa_fn_summary_write): Likewise.
16778 (ipa_free_fn_summary): Likewise.
16779 * ipa-hsa.c (process_hsa_functions): Likewise.
16780 (ipa_hsa_write_summary): Likewise.
16781 (ipa_hsa_read_section): Likewise.
16782 * ipa-icf.c (sem_function::merge): Likewise.
16783 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16784 (do_estimate_edge_time): Likewise.
16785 (estimate_size_after_inlining): Likewise.
16786 (estimate_growth): Likewise.
16787 (growth_likely_positive): Likewise.
16788 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16789 (inline_call): Likewise.
16790 * ipa-inline.c (caller_growth_limits): Likewise.
16791 (can_inline_edge_p): Likewise.
16792 (can_inline_edge_by_limits_p): Likewise.
16793 (compute_uninlined_call_time): Likewise.
16794 (compute_inlined_call_time): Likewise.
16795 (want_inline_small_function_p): Likewise.
16796 (edge_badness): Likewise.
16797 (update_caller_keys): Likewise.
16798 (update_callee_keys): Likewise.
16799 (recursive_inlining): Likewise.
16800 (inline_small_functions): Likewise.
16801 (inline_to_all_callers_1): Likewise.
16802 (dump_overall_stats): Likewise.
16803 (early_inline_small_functions): Likewise.
16804 (early_inliner): Likewise.
16805 * ipa-inline.h (estimate_edge_growth): Likewise.
16806 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16807 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16808 * ipa-prop.h (IPA_NODE_REF): Likewise.
16809 (IPA_EDGE_REF): Likewise.
16810 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16811 (propagate_malloc): Likewise.
16812 * ipa-split.c (execute_split_functions): Likewise.
16813 * symbol-summary.h: Rename get to get_create.
16815 (get_create): Likewise.
16816 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16818 2018-06-08 Martin Liska <mliska@suse.cz>
16820 * symbol-summary.h (release): Move definition out of class
16822 (symtab_removal): Likewise.
16823 (symtab_duplication): Likewise.
16825 2018-06-08 Martin Liska <mliska@suse.cz>
16827 * symbol-summary.h (function_summary): Move constructor
16828 implementation out of class declaration.
16829 (release): Likewise.
16830 (symtab_insertion): Likewise.
16831 (symtab_removal): Likewise.
16832 (symtab_duplication): Likewise.
16835 2018-06-08 Martin Liska <mliska@suse.cz>
16837 * Makefile.in: Remove support for MPX (macros, related functions,
16838 fields in cgraph_node, ...).
16839 * builtin-types.def (BT_BND): Likewise.
16840 (BT_FN_BND_CONST_PTR): Likewise.
16841 (BT_FN_CONST_PTR_BND): Likewise.
16842 (BT_FN_VOID_PTR_BND): Likewise.
16843 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16844 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16845 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16846 (expand_builtin_mempcpy_with_bounds): Likewise.
16847 (expand_builtin_memset_with_bounds): Likewise.
16848 (expand_builtin_memset_args): Likewise.
16849 (std_expand_builtin_va_start): Likewise.
16850 (expand_builtin): Likewise.
16851 (expand_builtin_with_bounds): Likewise.
16852 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16853 (DEF_LIB_BUILTIN_CHKP): Likewise.
16854 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16855 (DEF_CHKP_BUILTIN): Likewise.
16856 (BUILT_IN_MEMCPY): Likewise.
16857 (BUILT_IN_MEMMOVE): Likewise.
16858 (BUILT_IN_MEMPCPY): Likewise.
16859 (BUILT_IN_MEMSET): Likewise.
16860 (BUILT_IN_STPCPY): Likewise.
16861 (BUILT_IN_STRCAT): Likewise.
16862 (BUILT_IN_STRCHR): Likewise.
16863 (BUILT_IN_STRCPY): Likewise.
16864 (BUILT_IN_STRLEN): Likewise.
16865 (BUILT_IN_MEMCPY_CHK): Likewise.
16866 (BUILT_IN_MEMMOVE_CHK): Likewise.
16867 (BUILT_IN_MEMPCPY_CHK): Likewise.
16868 (BUILT_IN_MEMSET_CHK): Likewise.
16869 (BUILT_IN_STPCPY_CHK): Likewise.
16870 (BUILT_IN_STRCAT_CHK): Likewise.
16871 (BUILT_IN_STRCPY_CHK): Likewise.
16872 * calls.c (store_bounds): Likewise.
16873 (emit_call_1): Likewise.
16874 (special_function_p): Likewise.
16875 (maybe_warn_nonstring_arg): Likewise.
16876 (initialize_argument_information): Likewise.
16877 (finalize_must_preallocate): Likewise.
16878 (compute_argument_addresses): Likewise.
16879 (expand_call): Likewise.
16880 * cfgexpand.c (expand_call_stmt): Likewise.
16881 (expand_return): Likewise.
16882 (expand_gimple_stmt_1): Likewise.
16883 (pass_expand::execute): Likewise.
16884 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16885 (cgraph_node::remove): Likewise.
16886 (cgraph_node::dump): Likewise.
16887 (cgraph_node::verify_node): Likewise.
16888 * cgraph.h (chkp_function_instrumented_p): Likewise.
16889 (symtab_node::get_alias_target): Likewise.
16890 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16891 (cgraph_local_p): Likewise.
16892 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16893 (cgraph_edge::rebuild_references): Likewise.
16894 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16895 (walk_polymorphic_call_targets): Likewise.
16896 (cgraph_node::expand_thunk): Likewise.
16897 (symbol_table::output_weakrefs): Likewise.
16898 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16899 (ix86_handle_option): Likewise.
16900 * config/i386/constraints.md: Likewise.
16901 * config/i386/i386-builtin-types.def (BND): Likewise.
16905 * config/i386/i386-builtin.def (BDESC_END): Likewise.
16906 (BDESC_FIRST): Likewise.
16908 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16909 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16910 * config/i386/i386.c (enum reg_class): Likewise.
16911 (ix86_target_string): Likewise.
16912 (ix86_option_override_internal): Likewise.
16913 (ix86_conditional_register_usage): Likewise.
16914 (ix86_valid_target_attribute_inner_p): Likewise.
16915 (ix86_set_indirect_branch_type): Likewise.
16916 (ix86_set_current_function): Likewise.
16917 (ix86_function_arg_regno_p): Likewise.
16918 (init_cumulative_args): Likewise.
16919 (ix86_function_arg_advance): Likewise.
16920 (ix86_function_arg): Likewise.
16921 (ix86_pass_by_reference): Likewise.
16922 (ix86_function_value_regno_p): Likewise.
16923 (ix86_function_value_1): Likewise.
16924 (ix86_function_value_bounds): Likewise.
16925 (ix86_return_in_memory): Likewise.
16926 (ix86_setup_incoming_vararg_bounds): Likewise.
16927 (ix86_va_start): Likewise.
16928 (indirect_thunk_need_prefix): Likewise.
16929 (print_reg): Likewise.
16930 (ix86_print_operand): Likewise.
16931 (ix86_expand_call): Likewise.
16932 (ix86_output_function_return): Likewise.
16933 (reg_encoded_number): Likewise.
16934 (BDESC_VERIFYS): Likewise.
16935 (ix86_init_mpx_builtins): Likewise.
16936 (ix86_init_builtins): Likewise.
16937 (ix86_emit_cmove): Likewise.
16938 (ix86_emit_move_max): Likewise.
16939 (ix86_expand_builtin): Likewise.
16940 (ix86_builtin_mpx_function): Likewise.
16941 (ix86_get_arg_address_for_bt): Likewise.
16942 (ix86_load_bounds): Likewise.
16943 (ix86_store_bounds): Likewise.
16944 (ix86_load_returned_bounds): Likewise.
16945 (ix86_store_returned_bounds): Likewise.
16946 (ix86_class_likely_spilled_p): Likewise.
16947 (ix86_hard_regno_mode_ok): Likewise.
16948 (x86_order_regs_for_local_alloc): Likewise.
16949 (ix86_mitigate_rop): Likewise.
16950 (ix86_bnd_prefixed_insn_p): Likewise.
16951 (ix86_mpx_bound_mode): Likewise.
16952 (ix86_make_bounds_constant): Likewise.
16953 (ix86_initialize_bounds): Likewise.
16954 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16955 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16956 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16957 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16958 (TARGET_CHKP_BOUND_MODE): Likewise.
16959 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16960 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16961 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16962 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16963 * config/i386/i386.h (TARGET_MPX): Likewise.
16964 (TARGET_MPX_P): Likewise.
16965 (VALID_BND_REG_MODE): Likewise.
16966 (FIRST_BND_REG): Likewise.
16967 (LAST_BND_REG): Likewise.
16968 (enum reg_class): Likewise.
16969 (BND_REG_P): Likewise.
16970 (BND_REGNO_P): Likewise.
16971 (BNDmode): Likewise.
16972 (ADJUST_INSN_LENGTH): Likewise.
16973 * config/i386/i386.md: Likewise.
16974 * config/i386/i386.opt: Likewise.
16975 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16976 (defined): Likewise.
16977 (LINK_MPX): Likewise.
16978 (MPX_SPEC): Likewise.
16979 (LIBMPX_SPEC): Likewise.
16980 (LIBMPXWRAPPERS_SPEC): Likewise.
16981 (CHKP_SPEC): Likewise.
16982 * config/i386/predicates.md: Likewise.
16983 * dbxout.c (dbxout_type): Likewise.
16984 * doc/extend.texi: Likewise.
16985 * doc/invoke.texi: Likewise.
16986 * doc/md.texi: Likewise.
16987 * doc/tm.texi: Likewise.
16988 * doc/tm.texi.in: Likewise.
16989 * dwarf2out.c (is_base_type): Likewise.
16990 (gen_formal_types_die): Likewise.
16991 (gen_subprogram_die): Likewise.
16992 (gen_type_die_with_usage): Likewise.
16993 (gen_decl_die): Likewise.
16994 (dwarf2out_late_global_decl): Likewise.
16995 * expr.c (expand_assignment): Likewise.
16996 (emit_storent_insn): Likewise.
16997 (store_expr_with_bounds): Likewise.
16998 (store_expr): Likewise.
16999 (expand_expr_real_1): Likewise.
17000 * expr.h (store_expr_with_bounds): Likewise.
17001 * function.c (use_register_for_decl): Likewise.
17002 (struct bounds_parm_data): Likewise.
17003 (assign_parms_augmented_arg_list): Likewise.
17004 (assign_parm_find_entry_rtl): Likewise.
17005 (assign_parm_is_stack_parm): Likewise.
17006 (assign_parm_load_bounds): Likewise.
17007 (assign_bounds): Likewise.
17008 (assign_parms): Likewise.
17009 (expand_function_start): Likewise.
17010 * gcc.c (CHKP_SPEC): Likewise.
17011 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
17012 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
17013 (wrestrict_dom_walker::check_call): Likewise.
17014 * gimple.c (gimple_build_call_from_tree): Likewise.
17015 * gimple.h (enum gf_mask): Likewise.
17016 (gimple_call_with_bounds_p): Likewise.
17017 (gimple_call_set_with_bounds): Likewise.
17018 * gimplify.c (gimplify_init_constructor): Likewise.
17019 * ipa-cp.c (initialize_node_lattices): Likewise.
17020 (propagate_constants_across_call): Likewise.
17021 (find_more_scalar_values_for_callers_subset): Likewise.
17022 * ipa-hsa.c (process_hsa_functions): Likewise.
17023 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
17024 * ipa-icf.c (sem_function::merge): Likewise.
17025 * ipa-inline.c (early_inliner): Likewise.
17026 * ipa-pure-const.c (warn_function_noreturn): Likewise.
17027 (warn_function_cold): Likewise.
17028 (propagate_pure_const): Likewise.
17029 * ipa-ref.h (enum GTY): Likewise.
17030 * ipa-split.c (find_retbnd): Likewise.
17031 (consider_split): Likewise.
17032 (split_function): Likewise.
17033 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
17034 * ipa.c (walk_polymorphic_call_targets): Likewise.
17035 (symbol_table::remove_unreachable_nodes): Likewise.
17036 (process_references): Likewise.
17037 (cgraph_build_static_cdtor_1): Likewise.
17038 * lto-cgraph.c (lto_output_node): Likewise.
17039 (output_refs): Likewise.
17040 (compute_ltrans_boundary): Likewise.
17041 (input_overwrite_node): Likewise.
17042 (input_node): Likewise.
17043 (input_cgraph_1): Likewise.
17044 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
17045 * passes.c (pass_manager::execute_early_local_passes): Likewise.
17046 (class pass_chkp_instrumentation_passes): Likewise.
17047 (make_pass_chkp_instrumentation_passes): Likewise.
17048 * passes.def: Likewise.
17049 * rtl.h (struct GTY): Likewise.
17050 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
17051 * stor-layout.c (layout_type): Likewise.
17052 * symtab.c: Likewise.
17053 * target.def: Likewise.
17054 * targhooks.c (default_chkp_bound_type): Likewise.
17055 (default_chkp_bound_mode): Likewise.
17056 (default_builtin_chkp_function): Likewise.
17057 (default_chkp_function_value_bounds): Likewise.
17058 (default_chkp_make_bounds_constant): Likewise.
17059 (default_chkp_initialize_bounds): Likewise.
17060 * targhooks.h (default_chkp_bound_type): Likewise.
17061 (default_chkp_bound_mode): Likewise.
17062 (default_builtin_chkp_function): Likewise.
17063 (default_chkp_function_value_bounds): Likewise.
17064 (default_chkp_make_bounds_constant): Likewise.
17065 (default_chkp_initialize_bounds): Likewise.
17066 * toplev.c (compile_file): Likewise.
17067 (process_options): Likewise.
17068 * tree-core.h (DEF_BUILTIN): Likewise.
17069 (DEF_BUILTIN_CHKP): Likewise.
17070 * tree-inline.c (declare_return_variable): Likewise.
17071 (remap_gimple_stmt): Likewise.
17072 (copy_bb): Likewise.
17073 (initialize_inlined_parameters): Likewise.
17074 (expand_call_inline): Likewise.
17075 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
17076 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
17077 (make_pass_ipa_chkp_produce_thunks): Likewise.
17078 (make_pass_chkp): Likewise.
17079 (make_pass_chkp_opt): Likewise.
17080 (make_pass_chkp_instrumentation_passes): Likewise.
17081 * tree-pretty-print.c (dump_generic_node): Likewise.
17082 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
17083 * tree-ssa-dce.c (propagate_necessity): Likewise.
17084 (eliminate_unnecessary_stmts): Likewise.
17085 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
17086 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
17087 * tree-ssa-sccvn.h: Likewise.
17088 * tree-ssa-strlen.c (get_string_length): Likewise.
17089 (valid_builtin_call): Likewise.
17090 (adjust_last_stmt): Likewise.
17091 (handle_builtin_strchr): Likewise.
17092 (handle_builtin_strcpy): Likewise.
17093 (handle_builtin_stxncpy): Likewise.
17094 (handle_builtin_memcpy): Likewise.
17095 (handle_builtin_strcat): Likewise.
17096 (strlen_check_and_optimize_stmt): Likewise.
17097 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
17098 * tree-streamer-in.c: Likewise.
17099 * tree-streamer.c (record_common_node): Likewise.
17100 * tree.c (tree_code_size): Likewise.
17101 (wide_int_to_tree_1): Likewise.
17102 (type_contains_placeholder_1): Likewise.
17103 (build_common_tree_nodes): Likewise.
17104 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
17105 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
17106 (POINTER_BOUNDS_P): Likewise.
17107 (BOUNDED_TYPE_P): Likewise.
17108 (BOUNDED_P): Likewise.
17109 (CALL_WITH_BOUNDS_P): Likewise.
17110 (pointer_bounds_type_node): Likewise.
17111 * value-prof.c (gimple_ic): Likewise.
17112 * var-tracking.c (vt_add_function_parameters): Likewise.
17113 * varasm.c (make_decl_rtl): Likewise.
17114 (assemble_start_function): Likewise.
17115 (output_constant): Likewise.
17116 (maybe_assemble_visibility): Likewise.
17117 * varpool.c (ctor_for_folding): Likewise.
17118 * chkp-builtins.def: Remove.
17119 * ipa-chkp.c: Remove.
17120 * ipa-chkp.h: Remove.
17121 * rtl-chkp.c: Remove.
17122 * rtl-chkp.h: Remove.
17123 * tree-chkp-opt.c: Remove.
17124 * tree-chkp.c: Remove.
17125 * tree-chkp.h: Remove.
17127 2018-06-07 Carl Love <cel@us.ibm.com>
17129 * config/rs6000/vsx.md (vextract_fp_from_shorth,
17130 vextract_fp_from_shortl): Add BE support.
17132 2018-06-07 Paul Koning <ni1d@arrl.net>
17134 * compare-elim.c (try_merge_compare): Don't merge compare if
17135 address contains a side effect.
17136 (try_eliminate_compare): Likewise.
17138 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
17140 * config.gcc: Support "tremont".
17141 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
17142 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17144 * config/i386/i386.c (m_TREMONT): Define.
17145 (processor_target_table): Add "tremont".
17146 (PTA_TREMONT): Define.
17147 (ix86_lea_outperforms): Add TARGET_TREMONT.
17148 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
17149 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
17150 and M_INTEL_GOLDMONT_PLUS.
17151 (fold_builtin_cpu): Add "tremont".
17152 (ix86_add_stmt_cost): Add TARGET_TREMONT.
17153 (ix86_option_override_internal): Add "tremont".
17154 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
17155 (processor_type): Add PROCESSOR_TREMONT.
17156 * config/i386/x86-tune.def: Add m_TREMONT.
17157 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
17159 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17161 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
17162 symbol defined for msp430i* devices to be lower case.
17164 2018-06-07 Richard Biener <rguenther@suse.de>
17166 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
17167 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
17168 Properly wrap signed arithmetic if overflow wraps.
17170 2018-06-07 Jakub Jelinek <jakub@redhat.com>
17172 PR tree-optimization/69615
17173 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
17174 of a cast from a same precision integral SSA_NAME in a bb dominated
17175 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
17176 cast to utype if rhs2 has already a compatible type.
17178 2018-06-07 Richard Biener <rguenther@suse.de>
17180 PR tree-optimization/85935
17181 * graphite-scop-detection.c (find_params_in_bb): Analyze
17182 condition operands with respect to the correct loop. Assert
17183 the analysis doesn't fail.
17185 2018-06-04 Carl Love <cel@us.ibm.com>
17187 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
17188 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
17189 as it is slightly cheaper.
17190 (first_match_or_eos_index_<mode>):
17191 Calculate index using natural element order.
17192 (first_match_index_<mode>):
17193 Calculate index using natural element order.
17194 (first_match_or_eos_index_<mode>):
17195 Calculate index using natural order.
17196 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
17197 for BE and LE modes.
17198 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
17199 P9V_BUILTIN_VCLZLSBB_V16QI.
17200 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17203 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17205 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17206 indentation and line wrap for many prototypes. Add missing
17207 @smallexample directives around block of prototypes for vec_xl and
17210 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
17212 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
17213 track if we pass or return IEEE 128-bit floating point.
17214 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
17215 C++ mangling that is compatible with GCC 8.1.
17216 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
17217 (init_cumulative_args): Note if we pass or return IEEE 128-bit
17218 floating point types.
17219 (rs6000_function_arg_advance_1): Likewise.
17220 (rs6000_mangle_type): Optionally generate mangled names that match
17221 what GCC 8.1 generated for IEEE 128-bit floating point types.
17222 (rs6000_globalize_decl_name): If we have an external function that
17223 passes or returns IEEE 128-bit types, generate a weak reference
17224 from the mangled name used in GCC 8.1 to the current mangled
17226 (rs6000_init_builtins): Make __ibm128 use the long double type if
17227 long double is IBM extended double. Make __float128 use the long
17228 double type if long double is IEEE 128-bit.
17231 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
17232 macro for __ibm128 built-in functions.
17233 (PACK_IF): Add __ibm128 pack/unpack functions.
17234 (UNPACK_IF): Likewise.
17235 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
17236 enable long double built-in functions if long double is IEEE
17237 128-bit floating point.
17238 (rs6000_invalid_builtin): Update long double built-in function
17240 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
17241 functions, adjust the built-in function to use the long double
17242 built-in function if __ibm128 and long double are the same type.
17243 * doc/extend.texi (PowerPC builtins): Update documention for
17244 __builtin_{,un}pack_longdouble. Add documentation for
17245 __builtin_{,un}pack_ibm128.
17247 2018-06-06 Jim Wilson <jimw@sifive.com>
17249 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17250 (struct machine_function): New field interrupt_mode.
17251 (riscv_handle_type_attribute): New function. Add forward declaration.
17252 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17253 (riscv_expand_epilogue): Check interrupt_mode field.
17254 (riscv_set_current_function): Check interrupt attribute args and
17255 set interrupt_mode field.
17256 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17257 (riscv_sret, riscv_uret): New.
17258 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17259 new arguments to interrupt attribute.
17261 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
17264 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17265 Don't handle -mcpu=power8 if -mpower9-vector is also used.
17267 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17269 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17270 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17271 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17272 several redundant entries.
17274 2018-06-06 David Malcolm <dmalcolm@redhat.com>
17276 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17277 type from "rtx" to "rtx_insn *".
17278 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17279 for local "call_insn", removing cast.
17280 (ix86_expand_call): Likewise, introducing a "call_insn" local.
17282 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
17284 PR tree-optimization/86066
17285 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17286 for BIT_INSERT_EXPR stores.
17288 2018-06-06 Richard Biener <rguenther@suse.de>
17290 PR tree-optimization/86062
17291 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17292 component refs ontop
17293 of to be offsetted base.
17295 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17297 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17298 to be static and remove check on interrupt attribute name.
17300 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
17302 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17303 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17305 2018-06-05 Steve Ellcey <sellcey@cavium.com>
17308 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17310 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17311 Remove second argument, change how error is called.
17312 (aarch64_layout_arg): Remove second argument from
17313 aarch64_err_no_fpadvsimd call.
17314 (aarch64_init_cumulative_args): Ditto.
17315 (aarch64_gimplify_va_arg_expr): Ditto.
17316 * config/aarch64/aarch64.md (mov<mode>): Ditto.
17318 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
17320 * config/i386/i386.md (simple_return_indirect_internal): New expander.
17321 (*simple_return_indirect_internal<mode>): Rename from
17322 simple_return_indirect_internal. Use W mode iterator.
17323 (rstorssp): New expander.
17324 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
17325 (clrssbsy): New expander.
17326 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
17328 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
17330 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17332 (cmse_check_pointed_object): Likewise.
17334 2018-06-05 Martin Liska <mliska@suse.cz>
17336 PR gcov-profile/47618
17337 * doc/invoke.texi: Document how -fprofile-dir format
17340 2018-06-05 Richard Biener <rguenther@suse.de>
17342 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17343 removal pretend DOM info isn't available so we do not update
17344 it and only remove edges, not dominated blocks. Actually free
17345 DOM info in case we removed something. Remove unreachable blocks.
17346 (mfb_keep_latches): Work with either DOM info or marked backedges.
17347 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17348 first. Mark backedges if DOM info isn't available.
17349 (Re-)compute DOM info after cleanup_control_flow_pre.
17351 2018-06-05 Richard Biener <rguenther@suse.de>
17353 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17354 (locus_discrim_hasher::hash): Adjust.
17355 (locus_discrim_hasher::equal): Likewise.
17356 (next_discriminator_for_locus): Work on line directly.
17357 (same_line_p): Pass in expanded locus1 as well.
17358 (assign_discriminators): Avoid redundant location expansions.
17360 2018-06-05 Richard Biener <rguenther@suse.de>
17362 PR tree-optimization/86046
17363 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17364 if required after clearing TREE_ADDRESSABLE.
17366 2018-06-05 Richard Biener <rguenther@suse.de>
17368 PR tree-optimization/86047
17369 * tree-ssa-loop.c (for_each_index): Glob handling of all
17370 decls and constants and really handle all of them.
17372 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17375 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17376 qualifier_void_pointer and qualifier_const_void_pointer.
17377 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17378 (arm_init_builtins): Handle the above.
17379 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17380 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17381 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17384 2018-06-05 Martin Liska <mliska@suse.cz>
17386 * auto-profile.c (read_autofdo_file): Do not use
17387 gcov_ctr_summary struct.
17388 (afdo_callsite_hot_enough_for_early_inline): Likewise.
17389 * coverage.c (struct counts_entry): Likewise.
17390 (read_counts_file): Read just single summary entry.
17391 (get_coverage_counts): Use gcov_summary struct.
17392 * coverage.h (get_coverage_counts): Likewise.
17393 * gcov-dump.c (dump_working_sets): Likewise.
17394 (tag_summary): Dump just single summary.
17395 * gcov-io.c (gcov_write_summary): Write just histogram
17397 (gcov_read_summary): Read just single summary.
17398 (compute_working_sets): Use gcov_summary struct.
17399 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17400 of GCOV_COUNTERS_SUMMABLE.
17401 (GCOV_COUNTERS_SUMMABLE): Remove.
17402 (GCOV_FIRST_VALUE_COUNTER): Replace with
17403 GCOV_COUNTER_V_INTERVAL.
17404 (struct gcov_ctr_summary): Remove.
17405 (struct gcov_summary): Directly use fields of former
17407 (compute_working_sets): Use gcov_summary struct.
17408 * gcov.c (read_count_file): Do not use ctrs fields.
17409 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17411 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17413 * profile.c: Likewise.
17414 * profile.h: Likewise.
17416 2018-06-05 Martin Liska <mliska@suse.cz>
17418 PR gcov-profile/84846
17419 * gcov.c (output_lines): Print working directory only
17420 in intermediate format.
17422 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
17424 * config/s390/s390-builtin-types.def: Add void function type.
17425 * config/s390/s390-builtins.def: Use the function type for the
17428 2018-06-04 Jim Wilson <jimw@sifive.com>
17430 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17432 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17433 and maybe_eh_return. Change regno to unsigned int. Use new args to
17434 handle EH_RETURN_DATA_REGNO registers properly.
17435 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17436 (riscv_expand_epilogue): Update comment. Change argument name and
17437 type. Update code to use new name and type. Pass new args to
17438 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
17440 * config/riscv/riscv.md (NORMAL_RETURN): New.
17441 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17442 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17443 (eh_return): Call gen_eh_return_internal and emit barrier.
17444 (eh_return_internal): Call riscv_expand_epilogue.
17446 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
17448 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17449 bit_insertion field and declare can_be_merged_into method.
17450 (merged_store_group::can_be_merged_into): New method.
17451 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17452 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
17453 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17455 2018-06-04 Richard Biener <rguenther@suse.de>
17457 PR tree-optimization/85955
17458 * builtins.c (fold_builtin_sincos): Convert pointers to
17459 destination to appropriate type before dereferencing.
17461 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
17463 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17465 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
17467 * expr.c (expand_expr_real_1): Force the operand into memory if
17468 its TYPE_MODE is BLKmode and if there is no integer mode for
17469 the number of bits being extracted.
17471 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17475 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17476 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17478 2018-06-04 Richard Biener <rguenther@suse.de>
17480 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17481 (cleanup_tree_cfg_noloop): ... single caller. Do
17482 start_recording_case_labels later.
17484 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
17486 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17487 to _IMMINTRIN_H_INCLUDED.
17488 * config/i386/pconfigintrin.h: Ditto.
17489 * config/i386/waitpkgintrin.h: Ditto.
17490 * config/i386/immintrin.h: Add includes for sgxintrin.h,
17491 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17492 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17493 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17494 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17495 waitpkgintrin.h and cldemoteintrin.h.
17497 2018-06-04 Richard Biener <rguenther@suse.de>
17499 PR tree-optimization/86038
17500 * tracer.c (find_best_successor): Check probability for
17501 being initialized, bail out if not.
17503 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
17506 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17507 of bits to ignore when comparing architectures.
17509 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17511 PR tree-optimization/69615
17512 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17513 maximum or minimum of the type, try to merge it also as if
17514 range1 is + [-, x - 1] or + [x + 1, -].
17517 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17519 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
17521 PR tree-optimization/86034
17522 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17523 the unsigned bitfield type in a bit insertion sequence if it does not
17524 have a larger precision than the bitfield size.
17525 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17527 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
17529 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17531 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17533 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17534 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17535 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17536 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17538 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17540 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17541 Disable -fdelete-null-pointer-checks for ELF toolchain.
17543 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17544 Kito Cheng <kito.cheng@gmail.com>
17546 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17547 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17548 (nds32*-*-*): Add glibc and uclibc conditions.
17549 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17550 (TARGET_EXCEPT_UNWIND_INFO): Define.
17551 * config/nds32/elf.h: New file.
17552 * config/nds32/linux.h: New file.
17553 * config/nds32/nds32-elf.opt: New file.
17554 * config/nds32/nds32-linux.opt: New file.
17555 * config/nds32/nds32-fp-as-gp.c
17556 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17557 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17559 (nds32_asm_file_end): Ditto.
17560 (nds32_print_operand): Ditto.
17561 (nds32_insert_attributes): Ditto.
17562 (nds32_init_libfuncs): New function.
17563 (TARGET_HAVE_TLS): Define.
17564 (TARGET_INIT_LIBFUNCS): Define.
17565 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17567 (TARGET_ELF): Apply different mcmodel setting.
17568 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17569 been migrated into elf.h and linux.h files.
17570 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17571 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17572 (mcmodel): The content has been migrated into nds32-elf.opt and
17573 nds32-linux.opt files.
17574 * config/nds32/t-elf: New file.
17575 * config/nds32/t-linux: New file.
17577 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17578 Shiva Chen <shiva0217@gmail.com>
17580 * config/nds32/constants.md (unspec_volatile_element): Add
17581 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17582 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17584 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17585 (make_pass_nds32_fp_as_gp): Declare.
17586 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17588 (nds32_asm_function_end_prologue): Remove unused asm output.
17589 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17590 (nds32_asm_file_start): Output necessary fp_as_gp information.
17591 (nds32_option_override): Adjust register usage.
17592 (nds32_expand_prologue): Consider fp_as_gp situation.
17593 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17594 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17597 (simple_return): Ditto.
17598 (omit_fp_begin): Output special directive for fp_as_gp.
17599 (omit_fp_end): Output special directive for fp_as_gp.
17600 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17601 mforbid-fp-as-gp): New options.
17603 2018-06-01 Mark Wielaard <mark@klomp.org>
17605 * dwarf2out.c (dwarf2out_finish): Remove generation of
17606 DW_AT_loclists_base.
17608 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17610 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17611 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17612 (struct merged_store_group): Add bit_insertion field.
17613 (dump_char_array): Use standard hexadecimal format.
17614 (merged_store_group::merged_store_group): Set bit_insertion to false.
17615 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17616 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17617 also print the mask in the dump file.
17618 (pass_store_merging::gate): Minor tweak.
17619 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17620 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17621 stores with INTEGER_CST stores.
17622 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17623 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17624 and use it throughout. Generate bit insertion sequences if need be.
17625 (pass_store_merging::process_store): Remove redundant condition.
17626 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17628 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
17630 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17631 the 128-bit floating point types. Fix function comment.
17633 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17635 * config/aarch64/aarch64-simd.md
17636 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17638 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17641 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17643 PR tree-optimization/85989
17644 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17646 (backprop::intersect_uses): Check it when deciding whether this
17647 is a backedge reference.
17648 (backprop::process_block): Add each phi to m_visited_phis
17649 after visiting it, then clear it at the end.
17651 2018-06-01 Richard Biener <rguenther@suse.de>
17653 * tree-vectorizer.h (vect_dr_stmt): New function.
17654 (vect_get_load_cost): Adjust.
17655 (vect_get_store_cost): Likewise.
17656 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17657 Use vect_dr_stmt instead of DR_SMTT.
17658 (vect_record_base_alignments): Likewise.
17659 (vect_calculate_target_alignment): Likewise.
17660 (vect_compute_data_ref_alignment): Likewise and make static.
17661 (vect_update_misalignment_for_peel): Likewise.
17662 (vect_verify_datarefs_alignment): Likewise.
17663 (vector_alignment_reachable_p): Likewise.
17664 (vect_get_data_access_cost): Likewise. Pass down
17665 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17666 (vect_get_peeling_costs_all_drs): Likewise.
17667 (vect_peeling_hash_get_lowest_cost): Likewise.
17668 (vect_enhance_data_refs_alignment): Likewise.
17669 (vect_find_same_alignment_drs): Likewise.
17670 (vect_analyze_data_refs_alignment): Likewise.
17671 (vect_analyze_group_access_1): Likewise.
17672 (vect_analyze_group_access): Likewise.
17673 (vect_analyze_data_ref_access): Likewise.
17674 (vect_analyze_data_ref_accesses): Likewise.
17675 (vect_vfa_segment_size): Likewise.
17676 (vect_small_gap_p): Likewise.
17677 (vectorizable_with_step_bound_p): Likewise.
17678 (vect_prune_runtime_alias_test_list): Likewise.
17679 (vect_analyze_data_refs): Likewise.
17680 (vect_supportable_dr_alignment): Likewise.
17681 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17682 (vect_gen_prolog_loop_niters): Likewise.
17683 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17684 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17686 (vect_recog_mask_conversion_pattern): Likewise.
17687 (vect_try_gather_scatter_pattern): Likewise.
17688 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17689 to vect_get_store_cost.
17690 (vect_get_store_cost): Get stmt_info instead of DR.
17691 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17692 (vect_get_load_cost): Get stmt_info instead of DR.
17694 2018-06-01 Richard Biener <rguenther@suse.de>
17696 PR middle-end/86017
17697 * gimple-fold.c (var_decl_component_p): Also allow offsetted
17698 vars wrapped in MEM_REFs.
17700 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17702 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17703 Fix subreg tests so that we only return a choice between
17704 GENERAL_REGS and FP_REGS if the original classes included both.
17706 2018-06-01 Richard Biener <rguenther@suse.de>
17709 * tree-ssa-structalias.c (get_function_part_constraint):
17710 Handle NULL fi->decl.
17711 (find_func_aliases_for_call): Properly handle indirect
17712 fi from direct call.
17713 (find_func_clobbers): Likewise.
17714 (ipa_pta_execute): Likewise.
17715 (create_variable_info_for): For functions that are ifunc_resolver
17716 resolve to a varinfo that contains the result of the resolver call.
17717 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17720 2018-05-31 Michael Collison <michael.collison@arm.com>
17722 * config/aarch64/aarch64.md:
17723 (*fix_to_zero_extenddfdi2): New pattern.
17724 * gcc.target/aarch64/fix_extend1.c: New testcase.
17726 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
17728 PR middle-end/78809
17729 PR middle-end/83026
17730 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17731 and BUILT_IN_STRNCMP_EQ.
17732 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17733 BUILT_IN_STRNCMP_EQ.
17734 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17735 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17736 (gimple_fold_builtin): Likewise.
17737 * tree-ssa-strlen.c (compute_string_length): New function.
17738 (determine_min_obsize): New function.
17739 (handle_builtin_string_cmp): New function to handle calls to
17740 string compare functions.
17741 (strlen_optimize_stmt): Add handling to builtin string compare
17743 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17744 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17745 * tree.c (build_common_builtin_nodes): Add new defines of
17746 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17748 2018-05-31 Jakub Jelinek <jakub@redhat.com>
17751 * bb-reorder.c (pass_partition_blocks::gate): Return false for
17752 functions with naked attribute.
17754 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
17756 * config/i386/sse.md (avx_vec_concat<mode>):
17757 Substitute concat_tg_mode mode attribute with xtg_mode.
17758 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17759 (concat_tg_mode): Remove mode attribute.
17761 2018-05-31 Martin Sebor <msebor@redhat.com>
17764 * calls.c (alloc_max_size): Correct a logic error/typo.
17765 Treat excessive arguments as infinite. Warn for invalid arguments.
17766 * doc/invoke.texi (-Walloc-size-larger-than): Update.
17768 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
17771 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17772 and movx for Haswell.
17774 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
17775 Cesar Philippidis <cesar@codesourcery.com>
17777 PR middle-end/85879
17778 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17779 when emitting error on private/firstprivate reductions.
17780 * omp-low.c (lower_omp_target): Avoid reference-type processing
17781 on pointers for firstprivate clause.
17783 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17785 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17788 * config/aarch64/aarch64-simd.md
17789 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17790 (aarch64_ld1_x3_<mode>): Likewise
17791 (aarch64_st1x2<VALLDIF:mode>): Likewise
17792 (aarch64_st1_x2_<mode>): Likewise
17793 (aarch64_st1x3<VALLDIF:mode>): Likewise
17794 (aarch64_st1_x3_<mode>): Likewise
17795 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17796 (vld1_s8_x3): Likewise.
17797 (vld1_u16_x3): Likewise.
17798 (vld1_s16_x3): Likewise.
17799 (vld1_u32_x3): Likewise.
17800 (vld1_s32_x3): Likewise.
17801 (vld1_u64_x3): Likewise.
17802 (vld1_s64_x3): Likewise.
17803 (vld1_f16_x3): Likewise.
17804 (vld1_f32_x3): Likewise.
17805 (vld1_f64_x3): Likewise.
17806 (vld1_p8_x3): Likewise.
17807 (vld1_p16_x3): Likewise.
17808 (vld1_p64_x3): Likewise.
17809 (vld1q_u8_x3): Likewise.
17810 (vld1q_s8_x3): Likewise.
17811 (vld1q_u16_x3): Likewise.
17812 (vld1q_s16_x3): Likewise.
17813 (vld1q_u32_x3): Likewise.
17814 (vld1q_s32_x3): Likewise.
17815 (vld1q_u64_x3): Likewise.
17816 (vld1q_s64_x3): Likewise.
17817 (vld1q_f16_x3): Likewise.
17818 (vld1q_f32_x3): Likewise.
17819 (vld1q_f64_x3): Likewise.
17820 (vld1q_p8_x3): Likewise.
17821 (vld1q_p16_x3): Likewise.
17822 (vld1q_p64_x3): Likewise.
17823 (vst1_s64_x2): Likewise.
17824 (vst1_u64_x2): Likewise.
17825 (vst1_f64_x2): Likewise.
17826 (vst1_s8_x2): Likewise.
17827 (vst1_p8_x2): Likewise.
17828 (vst1_s16_x2): Likewise.
17829 (vst1_p16_x2): Likewise.
17830 (vst1_s32_x2): Likewise.
17831 (vst1_u8_x2): Likewise.
17832 (vst1_u16_x2): Likewise.
17833 (vst1_u32_x2): Likewise.
17834 (vst1_f16_x2): Likewise.
17835 (vst1_f32_x2): Likewise.
17836 (vst1_p64_x2): Likewise.
17837 (vst1q_s8_x2): Likewise.
17838 (vst1q_p8_x2): Likewise.
17839 (vst1q_s16_x2): Likewise.
17840 (vst1q_p16_x2): Likewise.
17841 (vst1q_s32_x2): Likewise.
17842 (vst1q_s64_x2): Likewise.
17843 (vst1q_u8_x2): Likewise.
17844 (vst1q_u16_x2): Likewise.
17845 (vst1q_u32_x2): Likewise.
17846 (vst1q_u64_x2): Likewise.
17847 (vst1q_f16_x2): Likewise.
17848 (vst1q_f32_x2): Likewise.
17849 (vst1q_f64_x2): Likewise.
17850 (vst1q_p64_x2): Likewise.
17851 (vst1_s64_x3): Likewise.
17852 (vst1_u64_x3): Likewise.
17853 (vst1_f64_x3): Likewise.
17854 (vst1_s8_x3): Likewise.
17855 (vst1_p8_x3): Likewise.
17856 (vst1_s16_x3): Likewise.
17857 (vst1_p16_x3): Likewise.
17858 (vst1_s32_x3): Likewise.
17859 (vst1_u8_x3): Likewise.
17860 (vst1_u16_x3): Likewise.
17861 (vst1_u32_x3): Likewise.
17862 (vst1_f16_x3): Likewise.
17863 (vst1_f32_x3): Likewise.
17864 (vst1_p64_x3): Likewise.
17865 (vst1q_s8_x3): Likewise.
17866 (vst1q_p8_x3): Likewise.
17867 (vst1q_s16_x3): Likewise.
17868 (vst1q_p16_x3): Likewise.
17869 (vst1q_s32_x3): Likewise.
17870 (vst1q_s64_x3): Likewise.
17871 (vst1q_u8_x3): Likewise.
17872 (vst1q_u16_x3): Likewise.
17873 (vst1q_u32_x3): Likewise.
17874 (vst1q_u64_x3): Likewise.
17875 (vst1q_f16_x3): Likewise.
17876 (vst1q_f32_x3): Likewise.
17877 (vst1q_f64_x3): Likewise.
17878 (vst1q_p64_x3): Likewise.
17880 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17882 * config/msp430/msp430.c (msp430_output_labelref): Prepend
17883 user_label_prefix to name.
17885 * tree-core.h: Update comment about the format of NAME string
17886 passed to handler in attribute_spec.
17888 * config/msp430/msp430.md: Remove erroneous subreg expression from
17889 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17890 zero_extend{q,h}isi2.
17892 2018-05-30 Borislav Petkov <bp@suse.de>
17894 * doc/extend.texi: Document some architecture specific
17895 constraints and sort entries.
17897 2018-05-30 Martin Sebor <msebor@redhat.com>
17899 PR middle-end/85369
17900 * builtins.c (expand_builtin_stpcpy_1): New function.
17901 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17902 only if the former succeeds.
17904 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17906 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17909 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17911 * doc/invoke.texi (-flinker-output): Document
17913 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17915 * passes.c (ipa_write_summaries): Only modify statements if body
17917 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17918 incrementally linking.
17919 (ipa_passes): Likewise.
17920 * lto-cgraph.c (lto_output_node): When incrementally linking do not
17921 pass down resolution info.
17922 * common.opt (flag_incremental_link): Update info.
17923 * gcc.c (plugin specs): Turn flinker-output=* to
17924 -plugin-opt=-linker-output-known
17925 * toplev.c (compile_file): Also cut compilation when doing incremental
17927 * flag-types. (enum lto_partition_model): Add
17928 LTO_LINKER_OUTPUT_NOLTOREL.
17929 (invoke.texi): Add -flinker-output docs.
17930 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17931 link same way as WPA; do not stream in dead initializers.
17933 * dwarf2out.c (dwarf2out_die_ref_for_decl,
17934 darf2out_register_external_decl): Support incremental link.
17936 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17938 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17940 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17942 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17943 it down to simple_object_copy_lto_debug_sections.
17944 (run_gcc): Determine incremental LTO link time and configure
17945 lto1 into non-wpa mode, disable renaming of debug sections.
17947 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
17949 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17950 descriptions of various incorrectly documented functions.
17952 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
17955 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17956 address check not strict.
17958 2018-05-30 Richard Biener <rguenther@suse.de>
17960 PR tree-optimization/85964
17961 * tracer.c (better_p): Drop initialized count check, we only
17962 call the function with initialized counts now.
17963 (find_best_successor): Do find a best edge if one
17964 has uninitialized count.
17965 (find_best_predecessor): Likewise. Do BB frequency check only
17966 if count is initialized.
17968 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
17970 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17971 (aarch64_ldrstr_offset_compare): New.
17972 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17973 load/store orderings.
17974 (aarch64_gen_adjusted_ldpstp): Likewise.
17976 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
17978 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17979 Check for subset of GENERAL_REGS and FP_REGS.
17980 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17983 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
17985 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17986 and wi::to_poly_offset. Add the current offset and then check
17987 whether the sum fits, rather than using an unchecked addition of
17988 a checked term. Check for a shwi rather than a uhwi.
17989 * expr.c (get_bit_range): Use tree_to_poly_uint64.
17990 (store_constructor): Use poly_int_tree_p.
17991 (expand_expr_real_1): Likewise.
17992 * function.c (assign_temp): Likewise.
17993 * fold-const.c (const_binop): Use poly_int_tree_p and
17994 wi::to_poly_offset.
17995 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
17997 * ipa-icf-gimple.c (func_checker::compare_operand): Use
17998 to_poly_offset for MEM offsets.
17999 * ipa-icf.c (sem_variable::equals): Likewise.
18000 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
18001 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
18002 wi::to_poly_offset for BIT_FIELD_REF offsets.
18003 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
18004 wi::to_poly_offset.
18005 * var-tracking.c (emit_note_insn_var_location): Use
18006 tree_to_poly_uint64.
18008 2018-05-29 Jim Wilson <jimw@sifive.com>
18010 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
18012 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
18015 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
18016 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
18018 (sse4_1_round<mode>2): Use nonimmediate_operand
18019 for operand 1 predicate.
18021 2018-05-29 Martin Sebor <msebor@redhat.com>
18022 Richard Biener <rguenther@suse.de>
18025 * calls.c (get_size_range): Call determine_value_range instead
18026 of get_value_range..
18027 * tree-vrp.h (determine_value_range): Declared new function.
18028 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
18030 2018-05-29 Richard Biener <rguenther@suse.de>
18032 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
18033 sure to use non-pattern stmts for get_earlier_stmt arguments.
18034 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
18035 called on pattern stmts.
18036 (get_later_stmt): Likewise.
18038 2018-05-29 Martin Liska <mliska@suse.cz>
18040 PR gcov-profile/85759
18041 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
18044 2018-05-29 Jakub Jelinek <jakub@redhat.com>
18046 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
18048 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
18052 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18053 VEC_PACK_FLOAT_EXPR): New tree codes.
18054 * tree-pretty-print.c (op_code_prio): Handle
18055 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18056 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18057 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18058 * tree-inline.c (estimate_operator_cost): Likewise.
18059 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
18060 * fold-const.c (const_binop): Likewise.
18061 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
18062 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18063 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18064 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
18065 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18066 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18067 * expr.c (expand_expr_real_2): Likewise.
18068 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
18069 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
18070 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
18072 * optabs.c (expand_widen_pattern_expr): For
18073 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
18074 sign from result type rather than operand's type.
18075 (expand_binop_directly): For vec_packu_float_optab and
18076 vec_packs_float_optab allow result type to be different from operand's
18078 * optabs-tree.c (optab_for_tree_code): Handle
18079 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18080 VEC_PACK_FLOAT_EXPR. Formatting fixes.
18081 * tree-vect-generic.c (expand_vector_operations_1): Handle
18082 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18083 VEC_PACK_FLOAT_EXPR.
18084 * tree-vect-stmts.c (supportable_widening_operation): Handle
18086 (supportable_narrowing_operation): Handle FLOAT_EXPR.
18087 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
18088 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
18089 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
18090 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
18092 (vec_pack<floatprefix>_float_<mode>): New expander.
18093 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
18095 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
18096 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
18097 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
18098 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
18099 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
18101 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
18102 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
18103 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18104 VEC_PACK_FLOAT_EXPR): Document.
18106 2018-05-29 Richard Biener <rguenther@suse.de>
18108 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
18110 (stmt_vec_info_vec): Make pointer.
18111 (init_stmt_vec_info_vec): Remove.
18112 (free_stmt_vec_info_vec): Likewise.
18113 (set_stmt_vec_info_vec): New function.
18114 (free_stmt_vec_infos): Likewise.
18115 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
18116 (set_vinfo_for_stmt): Likewise.
18117 (get_earlier_stmt): Likewise.
18118 (get_later_stmt): Likewise.
18119 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
18120 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
18121 (vec_info::~vec_info): Free stmt_vec_infos.
18122 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
18123 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
18124 (pass_slp_vectorize::execute): Likewise.
18125 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
18126 (free_stmt_vec_info_vec): Likewise.
18127 (set_stmt_vec_info_vec): New function.
18128 (free_stmt_vec_infos): Likewise.
18129 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
18130 the global stmt_vec_info_vec.
18131 * tree-parloops.c (gather_scalar_reductions): Use
18132 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
18135 2018-05-29 Richard Biener <rguenther@suse.de>
18137 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
18139 2018-05-29 Martin Liska <mliska@suse.cz>
18140 David Malcolm <dmalcolm@redhat.com>
18142 * vec.c (test_reverse): New.
18143 (vec_c_tests): Add new test.
18144 * vec.h (vl_ptr>::reverse): New function.
18146 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
18148 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
18150 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
18153 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
18155 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
18157 2018-05-28 Richard Biener <rguenther@suse.de>
18159 PR tree-optimization/85933
18160 * tree-vect-data-refs.c (vect_record_base_alignments): Only
18161 look at stmts marked as vectorizable.
18163 2018-05-28 Richard Biener <rguenther@suse.de>
18165 PR tree-optimization/85934
18166 * tree-vect-generic.c (expand_vector_operations_1): Hoist
18167 vector boolean check before scalar optimization.
18169 2018-05-28 Jakub Jelinek <jakub@redhat.com>
18171 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
18174 2018-05-28 Mark Wielaard <mark@klomp.org>
18176 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
18177 if it is an expression containing a minus sign.
18179 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
18181 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
18183 2018-05-27 Paul Koning <ni1d@arrl.net>
18185 * config/pdp11/pdp11.md (truncsihi2): Remove.
18187 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
18188 Chung-Ju Wu <jasonwucj@gmail.com>
18190 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
18192 (unaligned_store_dw): Ditto.
18193 * config/nds32/nds32-memory-manipulation.c
18194 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
18195 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
18196 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
18197 (emit_setmem_word_loop): Rename to ...
18198 (emit_setmem_doubleword_loop): ... this.
18199 (nds32_gen_dup_4_byte_to_word_value): New function.
18200 (nds32_gen_dup_8_byte_to_double_word_value): New function.
18201 (nds32_expand_setmem_loop): Refine implementation.
18202 (nds32_expand_setmem_loop_v3m): Ditto.
18203 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18206 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18208 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
18210 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18212 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
18213 (nds32_init_machine_status): Initialize machine->attr_naked_p and
18214 machine->attr_no_prologue_p.
18215 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
18216 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
18217 (nds32_expand_epilogue): Consider attr_naked_p.
18218 (nds32_expand_epilogue_v3pop): Likewise.
18219 (nds32_can_use_return_insn): Likewise.
18220 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
18221 attr_no_prologue_p fields.
18222 * config/nds32/nds32.opt (mret-in-naked-func): New option.
18224 2018-05-27 Jakub Jelinek <jakub@redhat.com>
18227 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
18229 * config/i386/sse.md
18230 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
18232 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
18234 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
18236 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
18238 (*<floatsuffix>floatv2div2sf2): Rename to ...
18239 (*float<floatunssuffix>v2div2sf2): ... this.
18240 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
18241 (float<floatunssuffix>v2div2sf2_mask): ... this.
18242 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18243 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18244 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18246 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18248 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18250 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18252 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18254 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18256 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18257 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18258 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18259 gen_ufix_truncv8dfv8si2.
18260 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18261 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18262 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18263 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18264 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18265 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18266 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18267 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18269 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18273 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18275 2018-05-25 Jim Wilson <jimw@sifive.com>
18277 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18278 * config/riscv/riscv.c (struct machine_function): Add
18279 interrupt_handler_p and attribute_checked_p fields.
18280 (riscv_attribute_table): Add interrupt.
18281 (riscv_interrupt_type_p): New.
18282 (riscv_save_reg_p): Save extra regs for interrupt handler.
18283 (riscv_use_save_libcall): Return false for interrupt handler.
18284 (riscv_first_stack_step): Add forward declaration.
18285 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
18286 for interrupt handler with large frame. Use it for saved reg list.
18287 (riscv_expand_prologue): Move flag_stack_usage_info support to
18288 eliminate duplication.
18289 (riscv_expand_epilogue): Generate mret for interrupt handler.
18290 (riscv_epilogue_uses): New.
18291 (riscv_can_use_return_insn): Return false for interrupt handler.
18292 (riscv_function_ok_for_sibcall): Likewise.
18293 (riscv_set_current_function): Add interrupt handler support.
18294 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18295 * config/riscv/riscv.md (UNSPECV_MRET): New.
18297 (riscv_frflags, riscv_fsflags): Use tab after opcode.
18299 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18301 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
18303 PR tree-optimization/85712
18304 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18305 this candidate has already been replaced in-situ by a copy.
18307 2018-05-25 Jason Merrill <jason@redhat.com>
18309 PR c++/80485 - inline function non-zero address.
18310 * symtab.c (nonzero_address): Check DECL_COMDAT.
18312 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
18315 * config/alpha/alpha.md (ashlsi3): New insn pattern.
18316 (*ashlsi_se): Rename from *ashldi_se. Define as sign
18317 extension of SImode operation. Use const123_operand predicate.
18318 (*saddsi_1): Remove.
18319 (*saddl_se_1): Ditto.
18320 (*ssubsi_1): Ditto.
18321 (*ssubl_se_1): Ditto.
18322 * config/alpha/predicates.md (const123_operand): New predicate.
18323 * config/alpha/constraints.md (P): Use IN_RANGE.
18325 2018-05-25 Richard Biener <rguenther@suse.de>
18327 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18329 (ref_maybe_used_by_stmt_p): Likewise.
18330 (stmt_may_clobber_ref_p): Likewise.
18331 (stmt_may_clobber_ref_p_1): Likewise.
18332 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18334 (ref_maybe_used_by_stmt_p): Likewise.
18335 (stmt_may_clobber_ref_p): Likewise.
18336 (stmt_may_clobber_ref_p_1): Likewise.
18337 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18338 the alias oracle to disambiguate DRs with stmts DR analysis
18340 (vect_analyze_data_refs): Do not give up on not analyzable
18341 DRs for BB vectorization. Remove code truncating the dataref
18344 2018-05-25 Jakub Jelinek <jakub@redhat.com>
18347 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18348 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
18349 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18351 2018-05-25 Richard Biener <rguenther@suse.de>
18353 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18354 function, combining stmt data ref gathering and fatal analysis
18356 (vect_analyze_data_refs): Remove now redudnant code and simplify.
18357 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18358 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18359 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18360 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18362 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18364 PR tree-optimization/85720
18365 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18366 SCC if all partitions are builtins.
18367 (version_loop_by_alias_check): New parameter. Generate cancelable
18368 runtime alias check if all partitions are builtins.
18369 (distribute_loop): Update call to above function.
18371 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18373 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18374 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18375 (parm_default_def_partition_arg): Ditto.
18376 (set_parm_default_def_partition): Ditto.
18377 (get_parm_default_def_partitions): Ditto and make it static.
18378 (get_undefined_value_partitions): Ditto and make it static.
18379 (remove_ssa_form): Refactor call to init_var_map here.
18380 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18381 computation for loop region.
18382 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18383 (register_default_def): Delete.
18384 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18385 (parm_default_def_partition_arg): Ditto.
18386 (set_parm_default_def_partition): Ditto.
18387 (get_parm_default_def_partitions): Ditto and make it static.
18388 (get_undefined_value_partitions): Ditto and make it static.
18389 (coalesce_with_default, coalesce_with_default): Update comment.
18390 (create_coalesce_list_for_region): New func factored out from
18391 create_outofssa_var_map.
18392 (populate_coalesce_list_for_outofssa): New func factored out from
18393 create_outofssa_var_map and coalesce_ssa_name.
18394 (create_outofssa_var_map): Delete.
18395 (coalesce_ssa_name): Refactor to support live range computation.
18396 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18397 (get_parm_default_def_partitions): Delete.
18398 (get_undefined_value_partitions): Ditto.
18399 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18400 computation for loop region.
18401 (new_tree_live_info, loe_visit_block): Ditto.
18402 (live_worklist, set_var_live_on_entry): Ditto.
18403 (calculate_live_on_exit, verify_live_on_entry): Ditto.
18404 * tree-ssa-live.h (struct _var_map): New fields.
18405 (init_var_map): Change decl.
18406 (region_contains_p): New.
18408 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18410 * tree-ssa-live.h (live_merge_and_clear): Delete.
18412 2018-05-25 Richard Biener <rguenther@suse.de>
18415 * tree-dump.c (dequeue_and_dump): Remove access to removed
18416 operand 2 of a SWITCH_EXPR.
18418 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18420 * doc/sourcebuild.texi (vect_double_cond_arith): Include
18421 multiplication and division.
18422 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18423 (cond_udiv@var{m}, cond_umod@var{m}): Document.
18424 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18425 (cond_udiv_optab, cond_umod_optab): New optabs.
18426 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18427 (IFN_COND_RDIV): New internal functions.
18428 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18429 TRUNC_MOD_EXPR and RDIV_EXPR.
18430 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18431 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18433 (SVE_INT_BINARY): Include mult.
18434 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18435 (optab, sve_int_op): Handle mult.
18436 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18438 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18439 for SVE_INT_BINARY_SD.
18441 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18443 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18444 (optab, sve_int_op): Handle div and udiv.
18445 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18446 for SVE_INT_BINARY_SD.
18447 (*<optab><mode>3): New insn for the same.
18449 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18451 * tree-vect-patterns.c: Include predict.h.
18452 (vect_recog_divmod_pattern): Restrict check for division support
18453 to when optimizing for size.
18455 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18457 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18458 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18459 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18460 (gimple_match_op::set_op): Likewise.
18461 (gimple_resimplify4): Declare.
18462 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18463 (expr::gen_transform): Likewise.
18464 (decision_tree::gen): Generate a simplification routine for 4 operands.
18465 * gimple-match-head.c (gimple_simplify): Add an overload for
18466 4 operands. In the top-level function, handle up to 4 call
18467 arguments and call gimple_resimplify4.
18468 (gimple_resimplify4): New function.
18469 (build_call_internal): Pass a fourth operand.
18470 (maybe_push_to_seq): Likewise.
18471 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18472 Fold VEC_COND_EXPRs of an operation and a default value into
18473 an IFN_COND_* function if possible.
18474 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18476 (SVE_COND_FP_BINARY): Include them.
18477 (optab, sve_fp_op): Handle them.
18478 (SVE_INT_BINARY_REV): New code iterator.
18479 (SVE_COND_FP_BINARY_REV): New int iterator.
18480 (commutative): New int attribute.
18481 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18483 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18485 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18486 (*cond_<optab><mode>): New patterns for reversed operands.
18488 2018-05-25 Richard Biener <rguenther@suse.de>
18490 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18491 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18492 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18493 (STMT_VINFO_GROUPED_ACCESS): Adjust.
18494 * tree-vect-data-refs.c (everywhere): Adjust users.
18495 * tree-vect-loop.c (everywhere): Likewise.
18496 * tree-vect-slp.c (everywhere): Likewise.
18497 * tree-vect-stmts.c (everywhere): Likewise.
18498 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18500 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18502 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18504 (gcc_cv_as_section_exclude): ... this.
18505 Try Solaris as #exclude syntax.
18506 * configure: Regenerate.
18507 * config.in: Regenerate.
18508 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18510 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18511 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18513 * varasm.c (default_elf_asm_named_section): Don't check if
18514 HAVE_GAS_SECTION_EXCLUDE is defined.
18516 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18518 * doc/md.texi: Update the documentation of the cond_* optabs
18519 to mention the new final operand. Fix GET_MODE_NUNITS call.
18520 Describe the scalar case too.
18521 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18522 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18524 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18525 (get_conditional_internal_fn): Update comment.
18526 * tree-vect-loop.c (vectorizable_reduction): Pass the original
18527 accumulator value as a final argument to conditional functions.
18528 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18529 a define_expand and add an "else" operand. Assert for now that
18530 the else operand is equal to operand 2. Use SVE_INT_BINARY and
18531 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18532 (*cond_<optab><mode>): New patterns.
18533 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18534 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18535 (UNSPEC_COND_EOR): Delete.
18536 (optab): Remove associated mappings.
18537 (SVE_INT_BINARY): New code iterator.
18538 (sve_int_op): Remove int attribute and add "minus" to the code
18540 (SVE_COND_INT_OP): Delete.
18541 (SVE_COND_FP_OP): Rename to...
18542 (SVE_COND_FP_BINARY): ...this.
18544 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18546 * optabs.c (can_reuse_operands_p): New function.
18547 (maybe_legitimize_operands): Try to reuse the results for
18550 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18552 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18553 Add {q} suffix to insn mnemonic.
18555 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18557 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18558 (msp430_warn_func_return): New.
18560 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18562 * fold-const.c (tree_nonzero_bits): New function.
18563 * fold-const.h (tree_nonzero_bits): Likewise.
18564 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18565 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18567 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18571 * varasm.c (assemble_alias): Check ifunc_resolver only on
18574 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18577 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18578 when memory input operand is handled.
18580 2018-05-24 Luis Machado <luis.machado@linaro.org>
18582 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18584 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18586 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18588 * match.pd: Delay FMA folds until after vectorization.
18590 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18593 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18594 address check not strict.
18596 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18598 * gimple-match.h (gimple_match_op): New class.
18599 (mprts_hook): Replace parameters with a gimple_match_op *.
18600 (maybe_build_generic_op): Likewise.
18601 (gimple_simplified_result_is_gimple_val): Replace parameters with
18602 a const gimple_match_op *.
18603 (gimple_simplify): Replace code_helper * and tree * parameters with
18604 a gimple_match_op * parameter.
18605 (gimple_resimplify1): Replace code_helper *, tree and tree *
18606 parameters with a gimple_match_op * parameter.
18607 (gimple_resimplify2): Likewise.
18608 (gimple_resimplify3): Likewise.
18609 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18610 parameters with a gimple_match_op * parameter.
18611 * gimple-match-head.c (gimple_simplify): Change prototypes of
18612 auto-generated functions to take a gimple_match_op * instead of
18613 separate code_helper * and tree * parameters. Make the same
18614 change in the top-level overload and update calls to the
18615 gimple_resimplify routines. Update calls to the auto-generated
18616 functions and to maybe_push_res_to_seq in the publicly-facing
18617 operation-specific gimple_simplify overloads.
18618 (gimple_match_op::MAX_NUM_OPS): Define.
18619 (gimple_resimplify1): Replace rcode and ops with a single res_op
18620 parameter. Update call to gimple_simplify.
18621 (gimple_resimplify2): Likewise.
18622 (gimple_resimplify3): Likewise.
18623 (mprts_hook): Replace parameters with a gimple_match_op *.
18624 (maybe_build_generic_op): Likewise.
18625 (build_call_internal): Replace type, nargs and ops with
18626 a gimple_match_op *.
18627 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18628 with a single gimple_match_op *. Update calls to mprts_hook,
18629 build_call_internal and gimple_simplified_result_is_gimple_val.
18630 Factor out code that is common to the tree_code and combined_fn cases.
18631 * genmatch.c (expr::gen_transform): Replace tem_code and
18632 tem_ops with a gimple_match_op called tem_op. Update calls
18633 to the gimple_resimplify functions and maybe_push_res_to_seq.
18634 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18635 res_ops. Update call to the gimple_resimplify functions.
18636 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18637 (decision_tree::gen): Make the functions take a gimple_match_op *
18638 called res_op instead of separate res_code and res_ops parameters.
18639 Update call accordingly.
18640 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18641 and ops with a single res_op parameter. Update calls to
18642 maybe_build_generic_op and maybe_push_res_to_seq.
18643 (fold_stmt_1): Update calls to gimple_simplify and
18644 replace_stmt_with_simplification.
18645 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18646 and gimple_simplified_result_is_gimple_val.
18647 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18649 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18650 with a gimple_match_op *.
18651 (vn_nary_build_or_lookup): Likewise. Update call to
18652 vn_nary_build_or_lookup_1.
18653 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18654 gimple_match_op *. Update calls to the gimple_resimplify routines
18655 and to gimple_simplified_result_is_gimple_val.
18656 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18657 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18658 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18659 (visit_nary_op): Likewise.
18660 (visit_reference_op_load): Likewise.
18662 2018-05-23 Luis Machado <luis.machado@linaro.org>
18664 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18665 modifier for printing the step amount.
18667 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
18670 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18673 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
18675 * doc/sourcebuild.texi (Endianness): New subsubsection.
18677 2018-05-23 Luis Machado <luis.machado@linaro.org>
18679 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18680 <prefetch_dynamic_strides>: New const bool field.
18681 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18682 prefetch_dynamic_strides.
18683 (exynosm1_prefetch_tune): Likewise.
18684 (thunderxt88_prefetch_tune): Likewise.
18685 (thunderx_prefetch_tune): Likewise.
18686 (thunderx2t99_prefetch_tune): Likewise.
18687 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18689 (aarch64_override_options_internal): Update to set
18690 PARAM_PREFETCH_DYNAMIC_STRIDES.
18691 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18692 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18693 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18694 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18695 prefetch-dynamic-strides setting.
18697 2018-05-23 Luis Machado <luis.machado@linaro.org>
18699 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18700 <minimum_stride>: New const int field.
18701 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18702 minimum_stride field defaulting to -1.
18703 (exynosm1_prefetch_tune): Likewise.
18704 (thunderxt88_prefetch_tune): Likewise.
18705 (thunderx_prefetch_tune): Likewise.
18706 (thunderx2t99_prefetch_tune): Likewise.
18707 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18708 <default_opt_level>: Set to 3.
18709 (aarch64_override_options_internal): Update to set
18710 PARAM_PREFETCH_MINIMUM_STRIDE.
18711 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18712 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18713 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18714 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18715 stride is constant and is below the minimum stride threshold.
18717 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18719 * config/arm/arm-cpus.in (mode26): Delete.
18720 (armv4): Delete mode26 reference.
18721 * config/arm/arm.c (arm_configure_build_target): Delete use of
18724 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18726 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18728 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18729 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
18731 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
18732 (floatunsdidf2): Ditto.
18734 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18736 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18737 (fixuns_trunc<mode>si2_avx512f): Ditto.
18738 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18739 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18740 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18742 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18744 PR rtl-optimization/79985
18745 * df-scan.c (df_insn_refs_collect): Remove special case for
18746 global registers and asm statements.
18748 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18750 * extend.texi (Global Register Variables): Rewrite the bullet list.
18751 Note that the register is available for allocation. Note that access
18752 via inline asm must use constraints. Add note about async-signal
18753 handlers. Remove paragraph about automagic register selection.
18755 2018-05-23 Richard Biener <rguenther@suse.de>
18757 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18758 of fixed offset from memset VN.
18760 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
18762 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18763 first_interp field.
18764 (alloc_cand_and_find_basis): Initialize first_interp field.
18765 (slsr_process_mul): Modify first_interp field.
18766 (slsr_process_add): Likewise.
18767 (slsr_process_cast): Modify first_interp field for each new
18769 (slsr_process_copy): Likewise.
18770 (dump_candidate): Dump first_interp field.
18771 (replace_mult_candidate): Process all interpretations, not just
18773 (replace_rhs_if_not_dup): Likewise.
18774 (replace_one_candidate): Likewise.
18776 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
18778 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18780 (aarch64_needs_frame_chain): New function.
18781 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18783 2018-05-23 Sudakshina Das <sudi.das@arm.com>
18786 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18787 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18788 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18789 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18790 as true for strict-align.
18791 (aarch64_can_inline_p): Perform checks even when callee has no
18792 attributes to check for strict alignment.
18793 * doc/extend.texi (AArch64 Function Attributes): Document
18795 * doc/invoke.texi: (AArch64 Options): Likewise.
18797 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
18799 PR tree-optimization/85853
18800 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18801 the handling of the root of the node to...
18802 (vect_slp_analyze_node_operations_1): ...this new function,
18803 and run the whole thing with the child nodes' def types
18804 set according to their SLP node's def type.
18806 2018-05-23 Richard Biener <rguenther@suse.de>
18808 PR middle-end/85874
18809 * tree-data-ref.c (create_runtime_alias_checks): Defer
18810 and ignore overflow warnings.
18812 2018-05-23 Yury Gribov <tetra2005@gmail.com>
18814 PR tree-optimization/85822
18815 * tree-vrp.c (is_masked_range_test): Fix handling of negative
18818 2018-05-23 Richard Biener <rguenther@suse.de>
18820 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18821 memset constants via native_interpret_expr.
18823 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
18826 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18828 (cgraph_node::create_alias): Likewise.
18829 (cgraph_node::get_availability): Check ifunc_resolver instead
18830 of looking up ifunc attribute.
18831 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18832 * varasm.c (do_assemble_alias): Likewise.
18833 (assemble_alias): Likewise.
18834 (default_binds_local_p_3): Likewise.
18835 * cgraph.h (cgraph_node): Add ifunc_resolver.
18836 (cgraph_node::only_called_directly_or_aliased_p): Return false
18837 for IFUNC resolver.
18838 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18840 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18841 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18842 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18843 instead of looking up ifunc attribute.
18845 2018-05-22 Luis Machado <luis.machado@linaro.org>
18847 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18849 2018-05-22 Martin Sebor <msebor@redhat.com>
18851 PR middle-end/85359
18852 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18853 only when expasion succeeds.
18854 (expand_builtin_strcmp): Same.
18855 (expand_builtin_strncmp): Same.
18857 2018-05-22 Martin Sebor <msebor@redhat.com>
18859 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18861 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18862 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18864 * config/aarch64/aarch64-ldpstp.md: Replace uses of
18865 aarch64_mem_pair_operand with memory_operand and delete operand swapping
18867 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18868 Add check for legitimate_address.
18869 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18870 (aarch64_swap_ldrstr_operands): New.
18871 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18874 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18875 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18877 * config/aarch64/aarch64.md: New patterns to generate stp
18879 (store_pair_sw, store_pair_dw): New patterns to generate stp for
18880 single words and double words.
18881 (load_pair_sw, load_pair_dw): Likewise.
18882 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18884 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18886 * config/aarch64/aarch64-ldpstp.md: Modify peephole
18887 for different mode ldpstp and add peephole for merged zero stores.
18888 Likewise for loads.
18889 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18891 (aarch64_gen_store_pair): Rename calls to match new patterns.
18892 (aarch64_gen_load_pair): Rename calls to match new patterns.
18893 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18894 (load_pair<DREG:mode><DREG2:mode>): ... This.
18895 (store_pair<mode>): Rename to...
18896 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18897 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18898 New mode iterators.
18899 (V_INT_EQUIV): Handle SImode.
18900 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18903 2018-05-22 Martin Sebor <msebor@redhat.com>
18906 * calls.c (maybe_warn_nonstring_arg): Use string length to set
18907 or ajust the presumed bound on an operation to avoid unnecessary
18910 2018-05-22 Martin Sebor <msebor@redhat.com>
18912 PR tree-optimization/85826
18913 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18914 assuming that a DECL necesarily has a constant size.
18916 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
18918 PR middle-end/85862
18919 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18921 2018-05-22 Richard Biener <rguenther@suse.de>
18923 PR tree-optimization/85834
18924 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18925 non-constant and non-zero memset arguments.
18927 2018-05-22 Martin Liska <mliska@suse.cz>
18930 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18932 2018-05-22 Richard Biener <rguenther@suse.de>
18934 PR tree-optimization/85863
18935 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18936 comparisons when vectype is specified.
18937 (vectorizable_condition): Do not specify vectype for
18938 vect_is_simple_cond when SLP vectorizing.
18940 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
18943 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18944 define __ibm128 as long double.
18945 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18946 as a distinct type when IEEE 128-bit support is enabled.
18947 (init_float128_ieee): Fix up conversions between IFmode and IEEE
18948 128-bit types to use the correct functions.
18949 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18950 convert between 128-bit floating point types that have different
18951 modes but the same representation, instead of using gen_lowpart to
18953 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18955 (IFKF_reg): New attributes to give the register constraints for
18957 (extend<mode>tf2_internal): New insns to mark an explicit
18958 conversion between 128-bit floating point types that have a
18959 different mode but share the same representation.
18961 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
18963 PR tree-optimization/85814
18964 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18965 a null return from get_strinfo when unsharing the next
18966 strinfo in the chain.
18968 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18971 * varasm.c (weak_finish): Clean up weak_decls.
18973 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18975 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18976 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18977 UNSPEC_UADALP values.
18978 * config/aarch64/iterators.md (ABAL): New int iterator.
18981 (sur): Add mappings for the above.
18982 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18984 (aarch64_<sur>abal<mode>_4): Likewise.
18985 (aarch64_<sur>adalp<mode>_3): Likewise.
18986 (<sur>sadv16qi): New define_expand.
18988 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
18990 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18991 (*movdf_internal): Ditto.
18992 (*rcpsf2_sse): Ditto.
18993 (*rsqrtsf2_sse): Ditto.
18994 (*sqrt<mode>2_sse): Ditto.
18996 2018-05-21 Tamar Christina <tamar.christina@arm.com>
18998 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
19000 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
19001 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
19002 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
19003 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
19005 * config/aarch64/arm_neon.h: Likewise.
19006 * config/aarch64/iterators.md (VQ_I): New.
19008 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
19010 * config.gcc: Add arc/t-multilib-linux to tmake_file for
19012 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
19015 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19017 * config/nds32/constraints.md (S): New constraint.
19018 * config/nds32/nds32.md (call_internal): Use constraint S.
19019 (call_value_internal): Likewise.
19020 (sibcall_internal): Likewise.
19021 (sibcall_value_internal): Likewise.
19023 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
19024 Chung-Ju Wu <jasonwucj@gmail.com>
19026 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
19027 into consideration.
19029 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
19030 Chung-Ju Wu <jasonwucj@gmail.com>
19032 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
19033 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
19034 (nds32_rtx_costs_impl): Simplify.
19035 (nds32_address_cost_impl): Simplify.
19036 (nds32_init_rtx_costs): New function.
19037 (nds32_rtx_costs_speed_prefer): Likewise.
19038 (nds32_rtx_costs_size_prefer): Likewise.
19039 (nds32_address_cost_speed_prefer): Likewise.
19040 (nds32_address_cost_speed_fwprop): Likewise.
19041 (nds32_address_cost_size_prefer): Likewise.
19042 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
19043 * config/nds32/nds32.c (nds32_option_override): Use
19044 nds32_init_rtx_costs function.
19046 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19048 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
19049 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
19050 (TARGET_PIPELINE_N8): Likewise.
19051 (TARGET_PIPELINE_N10): Likewise.
19052 (TARGET_PIPELINE_N13): Likewise.
19053 (TARGET_PIPELINE_GRAYWOLF): Likewise.
19055 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
19057 * config/nds32/nds32-fpu.md: Update copyright year.
19059 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19061 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
19063 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19065 * config/nds32/nds32.c
19066 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
19067 * config/nds32/nds32.opt (minline-asm-r15): New option.
19069 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19071 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
19073 * config/nds32/nds32.md (abssi2): New pattern.
19075 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
19077 * config/i386/i386.md (rex64namesuffix): New mode attribute.
19078 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
19079 Merge insn pattern from sse_cvtsi2ss<round_name> and
19080 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
19081 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
19082 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
19083 using SWI48 mode iterator.
19084 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
19085 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
19086 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
19087 pattern from sse_cvttss2si<round_saeonly_name>
19088 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
19089 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
19090 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
19091 using SWI48 mode iterator.
19092 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
19093 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
19094 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
19095 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
19096 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
19097 using SWI48 mode iterator.
19098 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
19099 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
19100 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
19101 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
19102 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
19103 SWI48 mode iterator.
19104 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
19105 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
19106 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
19107 pattern from sse_cvttsd2si<round_saeonly_name>
19108 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
19110 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19112 * config/nds32/nds32-md-auxiliary.c
19113 (nds32_valid_smw_lwm_base_p): Refine.
19114 (nds32_output_smw_single_word): Refine.
19115 (nds32_output_smw_double_word): New.
19116 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
19118 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19120 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
19121 (nds32_output_stack_pop): Refine.
19122 (nds32_expand_unaligned_load): Refine.
19123 (nds32_expand_unaligned_store): Refine.
19125 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19126 Chung-Ju Wu <jasonwucj@gmail.com>
19128 * config/nds32/constants.md: Add TP_REGNUM constant.
19129 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
19130 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
19132 * config/nds32/nds32-doubleword.md: Consider flag_pic.
19133 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
19134 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
19135 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
19136 and PIC code generation.
19137 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
19139 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
19141 * config/nds32/nds32.md: Support TLS and PIC.
19142 * config/nds32/nds32.c: Support TLS and PIC.
19143 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
19144 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
19147 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19149 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
19150 mode with E_ prefix.
19152 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19153 Chung-Ju Wu <jasonwucj@gmail.com>
19155 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
19156 * config/nds32/nds32-md-auxiliary.c
19157 (symbolic_reference_mentioned_p): New.
19158 (nds32_legitimize_ict_address): New.
19159 (nds32_expand_ict_move): New.
19160 (nds32_indirect_call_referenced_p): New.
19161 (nds32_symbol_binds_local_p): Delete.
19162 (nds32_long_call_p): Modify.
19163 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
19164 * config/nds32/nds32-protos.h
19165 (symbolic_reference_mentioned_p): Declare.
19166 (nds32_legitimize_ict_address): Declare.
19167 (nds32_expand_ict_move): Declare.
19168 (nds32_indirect_call_referenced_p): Declare.
19169 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
19170 (nds32_relax_group): Use nds32_ict_const_p as condition.
19171 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
19172 (nds32_asm_file_start): Output ict_model directive in asm code.
19173 (nds32_legitimate_address_p): Consider indirect call.
19174 (nds32_print_operand): Consider indirect call.
19175 (nds32_print_operand_address): Consider indirect call.
19176 (nds32_insert_attributes): Handle "indirect_call" attribute.
19177 (TARGET_LEGITIMATE_ADDRESS_P): Define.
19178 (TARGET_LEGITIMATE_CONSTANT_P): Define.
19179 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
19180 (TARGET_DELEGITIMIZE_ADDRESS): Define.
19181 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
19182 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
19183 (TARGET_ICT_MODEL_SMALL): Define.
19184 (TARGET_ICT_MODEL_LARGE): Define.
19185 * config/nds32/nds32.md (movsi): Consider ict model.
19186 (call, call_value): Consider ict model.
19187 (sibcall, sibcall_value): Consider ict model.
19188 * config/nds32/nds32.opt (mict-model): New option.
19189 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
19192 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
19193 Monk Chiang <sh.chiang04@gmail.com>
19194 Jim Wilson <jimw@sifive.com>
19196 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
19197 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
19198 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
19199 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
19200 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
19201 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19202 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19203 compute save_libcall_adjustment properly.
19204 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19205 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19206 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19207 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
19208 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
19209 (ABI_SPEC): Handle mabi=ilp32e.
19210 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
19211 (RVE): Add RVE mask.
19212 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
19213 <-march>: Add rv32e as an example.
19215 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
19218 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
19219 (intra_create_variable_infos): Handle C++ constructors.
19221 2018-05-18 Martin Liska <mliska@suse.cz>
19223 * passes.def: Remove a redundant pass.
19225 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
19228 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
19230 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19232 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
19234 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
19236 (armv2, armv2a, armv3, armv3m): Delete architectures.
19237 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
19238 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
19239 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
19241 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19242 (*mulsidi3adddi): Likewise.
19243 (mulsidi3): Likewise.
19244 (*mulsidi3_nov6): Likewise.
19245 (umulsidi3): Likewise.
19246 (umulsidi3_nov6): Likewise.
19247 (umaddsidi4): Likewise.
19248 (*umulsidi3adddi): Likewise.
19249 (smulsi3_highpart): Likewise.
19250 (*smulsi3_highpart_nov6): Likewise.
19251 (umulsi3_highpart): Likewise.
19252 (*umulsi3_highpart_nov6): Likewise.
19253 * config/arm/arm.h (arm_arch3m): Delete.
19254 * config/arm/arm.c (arm_arch3m): Delete.
19255 (arm_option_override_internal): Update armv3-related comment.
19256 (arm_configure_build_target): Delete use of isa_bit_mode32.
19257 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19258 (arm_rtx_costs_internal): Delete check of arm_arch3m.
19259 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19260 (mulsa3): Likewise.
19261 (mulusa3): Likewise.
19262 * config/arm/arm-protos.h (arm_arch3m): Delete.
19263 * config/arm/arm-tables.opt: Regenerate.
19264 * config/arm/arm-tune.md: Likewise.
19265 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19266 deleted architectures.
19268 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19270 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19271 (armv5t, armv5te): New features.
19272 (ARMv5, ARMv5e): Delete fgroups.
19273 (ARMv5t, ARMv5te): Adjust for above changes.
19274 (ARMv6m): Likewise.
19275 (armv5, armv5e): Delete arches.
19276 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19278 (*call_reg_arm): Likewise.
19279 (*call_value_reg_armv5): Likewise.
19280 (*call_value_reg_arm): Likewise.
19281 (*call_symbol): Likewise.
19282 (*call_value_symbol): Likewise.
19283 (*sibcall_insn): Likewise.
19284 (*sibcall_value_insn): Likewise.
19285 (clzsi2): Likewise.
19286 (prefetch): Likewise.
19287 (define_split and define_peephole2 dependent on arm_arch5):
19289 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19291 (TARGET_ARM_QBIT): Likewise.
19292 (TARGET_DSP_MULTIPLY): Likewise.
19293 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19294 (arm_arch5, arm_arch5e): Delete.
19295 (arm_arch5t, arm_arch5te): Declare.
19296 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19297 (arm_arch5t): Declare.
19298 (arm_option_reconfigure_globals): Update for the above.
19299 (arm_options_perform_arch_sanity_checks): Update comment, replace
19300 use of arm_arch5 with arm_arch5t.
19301 (use_return_insn): Likewise.
19302 (arm_emit_call_insn): Likewise.
19303 (output_return_instruction): Likewise.
19304 (arm_final_prescan_insn): Likewise.
19305 (arm_coproc_builtin_available): Likewise.
19306 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19307 arm_arch5e with arm_arch5t and arm_arch5te.
19308 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19309 (arm_arch5t, arm_arch5te): Declare.
19310 * config/arm/arm-tables.opt: Regenerate.
19311 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19312 * config/arm/t-multilib: Likewise.
19313 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19314 instead of arm_arch5.
19315 (*call_reg_thumb1): Likewise.
19316 (*call_value_reg_thumb1_v5): Likewise.
19317 (*call_value_reg_thumb1): Likewise.
19318 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19320 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19322 2018-05-18 Martin Liska <mliska@suse.cz>
19324 PR gcov-profile/84846
19325 * doc/gcov.texi: Document -t option of gcov tool.
19327 2018-05-18 Martin Liska <mliska@suse.cz>
19329 PR gcov-profile/84846
19330 * gcov.c (print_usage): Add new -t option.
19331 (process_args): Handle the option.
19332 (generate_results): Use stdout as output when requested by
19335 2018-05-18 Martin Liska <mliska@suse.cz>
19337 PR gcov-profile/84846
19338 * coverage.c (coverage_init): Write PWD to .gcno file.
19339 * doc/gcov.texi: Document how working directory is printed.
19340 * gcov-dump.c (dump_gcov_file): Print PWD.
19341 * gcov.c (output_intermediate_file): Likewise.
19342 (read_graph_file): Read PWD string.
19343 (output_lines): Print PWD.
19345 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19347 PR middle-end/85817
19348 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19349 for retval and return false if all args to phi are zero.
19351 2018-05-18 Richard Biener <rguenther@suse.de>
19353 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19355 (evrp_dom_walker::before_dom_children): Call it.
19357 2018-05-18 Richard Biener <rguenther@suse.de>
19359 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19360 results when processing array refs with variable index.
19362 2018-05-18 Toon Moene <toon@moene.org>
19364 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19365 directly after that of -floop-interchange. Indicate that both
19366 options are enabled by default when specifying -O3.
19368 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19370 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19371 iterator. Delete separate integer-mode vec_set<mode> expander.
19372 (aarch64_simd_vec_setv2di): Delete.
19373 (vec_setv2di): Delete.
19374 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19375 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
19376 the "w, r" alternative.
19378 2018-05-18 Martin Liska <mliska@suse.cz>
19380 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19381 * tree-pass.h (make_pass_lower_switch_O0): New function.
19382 * tree-switch-conversion.c (node_has_low_bound): Remove.
19383 (node_has_high_bound): Likewise.
19384 (node_is_bounded): Likewise.
19385 (class pass_lower_switch): Make it a template type and create
19387 (pass_lower_switch::execute): Add template argument.
19388 (make_pass_lower_switch): New function.
19389 (make_pass_lower_switch_O0): New function.
19390 (do_jump_if_equal): Remove.
19391 (emit_case_nodes): Simplify to just handle all 3 cases and leave
19392 all the hard work to tree optimization passes.
19394 2018-05-18 Martin Liska <mliska@suse.cz>
19396 * dbgcnt.c (limit_low): Renamed from limit.
19397 (limit_high): New variable.
19398 (dbg_cnt_is_enabled): Check for upper limit.
19399 (dbg_cnt): Adjust dumping.
19400 (dbg_cnt_set_limit_by_index): Add new argument for high
19402 (dbg_cnt_set_limit_by_name): Likewise.
19403 (dbg_cnt_process_single_pair): Parse new format.
19404 (dbg_cnt_process_opt): Use strtok.
19405 (dbg_cnt_list_all_counters): Remove 'value' and add
19407 * doc/invoke.texi: Document changes.
19409 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
19411 * doc/sourcebuild.texi (scalar_all_fma): Document.
19412 * tree.def (FMA_EXPR): Delete.
19413 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19414 * internal-fn.c (ternary_direct): New macro.
19415 (expand_ternary_optab_fn): Likewise.
19416 (direct_ternary_optab_supported_p): Likewise.
19417 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19418 * builtins.c (fold_builtin_fma): Delete.
19419 (fold_builtin_3): Don't call it.
19420 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19421 * expr.c (expand_expr_real_2): Likewise.
19422 * fold-const.c (operand_equal_p): Likewise.
19423 (fold_ternary_loc): Likewise.
19424 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19425 * gimple.c (DEFTREECODE): Likewise.
19426 * gimplify.c (gimplify_expr): Likewise.
19427 * optabs-tree.c (optab_for_tree_code): Likewise.
19428 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19429 * tree-eh.c (operation_could_trap_p): Likewise.
19430 (stmt_could_throw_1_p): Likewise.
19431 * tree-inline.c (estimate_operator_cost): Likewise.
19432 * tree-pretty-print.c (dump_generic_node): Likewise.
19433 (op_code_prio): Likewise.
19434 * tree-ssa-loop-im.c (stmt_cost): Likewise.
19435 * tree-ssa-operands.c (get_expr_operands): Likewise.
19436 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19437 * fold-const-call.h (fold_fma): Delete.
19438 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19439 CFN_FNMA and CFN_FNMS.
19440 (fold_fma): Delete.
19441 * genmatch.c (combined_fn): New enum.
19442 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19443 (commutative_op): New function.
19444 (commutate): Use it. Handle more than 2 operands.
19445 (dt_operand::gen_gimple_expr): Use commutative_op.
19446 (parser::parse_expr): Allow :c to be used with non-binary
19447 operators if the commutative operand is known.
19448 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19449 CFN_FMS, CFN_FNMA and CFN_FNMS.
19450 (backprop::process_assign_use): Remove FMA_EXPR handling.
19451 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19452 (gen_hsa_fma): New function.
19453 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19454 IFN_FNMA and IFN_FNMS.
19455 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19456 * gimple-fold.h (follow_all_ssa_edges): Declare.
19457 * gimple-fold.c (follow_all_ssa_edges): New function.
19458 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19459 gimple_build interface and use follow_all_ssa_edges to fold the result.
19460 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19461 instead of checking for optabs directly.
19462 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19463 rather than FMA_EXPRs.
19464 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19465 call to IFN_FMA instead of an FMA_EXPR.
19467 2018-05-17 Jim Wilson <jimw@sifive.com>
19469 * expr.c (do_tablejump): When converting index to Pmode, if we have a
19470 sign extended promoted subreg, and the range does not have the sign bit
19471 set, then do a sign extend.
19473 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19474 test, check for sign extended subreg and/or constant operands, and
19475 do a sign extend in that case.
19477 2018-05-17 Steve Ellcey <sellcey@cavium.com>
19479 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19480 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19482 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19483 Change logics_shift_reg to logics_shift_imm.
19484 (thunderx2t99_fp_loadpair_basic): Delete.
19485 (thunderx2t99_fp_storepair_basic): Delete.
19486 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19487 (thunderx2t99_asimd_polynomial): Delete.
19488 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19489 and neon_fp_mul_d_scalar_q.
19490 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19491 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19492 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19493 (thunderx2t99_asimd_lut): Add missing tbl types.
19494 (thunderx2t99_asimd_ext): Delete.
19495 (thunderx2t99_asimd_load1_1_mult): Delete.
19496 (thunderx2t99_asimd_load1_2_mult): Delete.
19497 (thunderx2t99_asimd_load1_ldp): New.
19498 (thunderx2t99_asimd_load1): New.
19499 (thunderx2t99_asimd_load2): Add missing *load2* types.
19500 (thunderx2t99_asimd_load3): New.
19501 (thunderx2t99_asimd_load4): New.
19502 (thunderx2t99_asimd_store1_1_mult): Delete.
19503 (thunderx2t99_asimd_store1_2_mult): Delete.
19504 (thunderx2t99_asimd_store2_mult): Delete.
19505 (thunderx2t99_asimd_store2_onelane): Delete.
19506 (thunderx2t99_asimd_store_stp): New.
19507 (thunderx2t99_asimd_store1): New.
19508 (thunderx2t99_asimd_store2): New.
19509 (thunderx2t99_asimd_store3): New.
19510 (thunderx2t99_asimd_store4): New.
19512 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
19514 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19515 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
19517 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
19518 Segher Boessenkool <segher@kernel.crashing.org>
19521 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19524 2018-05-17 Richard Biener <rguenther@suse.de>
19526 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19527 for pruning loop and prune defs feeding only already visited PHIs.
19529 2018-05-17 Richard Biener <rguenther@suse.de>
19531 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19533 2018-05-17 Bin Cheng <bin.cheng@arm.com>
19534 Richard Biener <rguenther@suse.de>
19536 PR tree-optimization/85793
19537 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19538 for VMAT_ELEMENTWISE.
19540 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19542 * internal-fn.h (lookup_internal_fn): Declare
19543 * internal-fn.c (lookup_internal_fn): New function.
19544 * gimple.c (gimple_build_call_from_tree): Handle calls to
19545 internal functions.
19546 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19547 internal function names.
19548 * tree-pretty-print.c (dump_generic_node): Likewise.
19549 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19551 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19553 * gimple-fold.h (gimple_build): Make the function forms take
19554 combined_fn rather than built_in_function.
19555 (gimple_simplify): Likewise.
19556 * gimple-match-head.c (gimple_simplify): Likewise.
19557 * gimple-fold.c (gimple_build): Likewise.
19558 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19559 rather than gimple_build_call_internal.
19560 (get_initial_defs_for_reduction): Likewise.
19561 (vect_create_epilog_for_reduction): Likewise.
19562 (vectorizable_live_operation): Likewise.
19564 2018-05-17 Martin Liska <mliska@suse.cz>
19566 * gimple-ssa-sprintf.c (format_directive): Do not use
19567 space in between 'G_' and '('.
19569 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19572 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19573 even if the mask is not all ones.
19576 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19578 (ix86_gimple_fold_builtin): Likewise.
19581 * config/i386/i386.c: Include tree-vector-builder.h.
19582 (ix86_vector_shift_count): New function.
19583 (ix86_fold_builtin): Fold shift builtins by scalar count.
19584 (ix86_gimple_fold_builtin): Likewise.
19586 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19587 _mm512_setzero): New intrinsics.
19589 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19590 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19592 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19593 code generation for cases where splatting a value is not useful.
19594 * simplify-rtx.c (simplify_ternary_operation): Simplify
19595 vec_merge across a vec_duplicate and a paradoxical subreg forming
19596 a vector mode to a vec_concat.
19598 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19600 * config.gcc: Support "goldmont-plus".
19601 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19603 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19604 PROCESSOR_GOLDMONT_PLUS.
19605 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19606 (processor_target_table): Add "goldmont-plus".
19607 (PTA_GOLDMONT_PLUS): Define.
19608 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19609 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19610 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19611 (fold_builtin_cpu): Add "goldmont-plus".
19612 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19613 (ix86_option_override_internal): Add "goldmont-plus".
19614 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19615 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19616 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19617 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19619 2018-05-17 Richard Biener <rguenther@suse.de>
19621 PR tree-optimization/85757
19622 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19623 remove defs that only feed that PHI from further processing.
19625 2018-05-16 Jim Wilson <jimw@sifive.com>
19627 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19629 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19631 2018-05-16 Mark Wielaard <mark@klomp.org>
19633 * dwarf2out.c (count_index_strings): New function.
19634 (output_indirect_strings): Call count_index_strings and generate
19635 header for dwarf_version >= 5.
19637 2018-05-16 Mark Wielaard <mark@klomp.org>
19639 * dwarf2out.c (dwarf_FORM): New function.
19640 (set_indirect_string): Use dwarf_FORM.
19641 (reset_indirect_string): Likewise.
19642 (size_of_die): Likewise.
19643 (value_format): Likewise.
19644 (output_die): Likewise.
19645 (add_skeleton_AT_string): Likewise.
19646 (output_macinfo_op): Likewise.
19647 (index_string): Likewise.
19648 (output_index_string_offset): Likewise.
19649 (output_index_string): Likewise.
19650 (count_index_strings): Likewise.
19652 2018-05-16 Carl Love <cel@us.ibm.com>
19654 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19655 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19657 2018-05-16 Martin Jambor <mjambor@suse.cz>
19659 * ipa-prop.c (ipa_free_all_edge_args): Remove.
19660 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19662 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
19664 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19665 (fnma<mode>4): Likewise.
19666 (fms<mode>4): Likewise.
19667 (fnms<mode>4): Likewise.
19668 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19669 (aarch64_fnma<mode>4): Likewise.
19670 (aarch64_fms<mode>4): Likewise.
19671 (aarch64_fnms<mode>4): Likewise.
19672 (aarch64_fnmadd<mode>4): Likewise.
19674 2018-05-16 Jason Merrill <jason@redhat.com>
19676 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
19678 2018-05-16 Richard Biener <rguenther@suse.de>
19680 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19681 (dump_stmt_cost): Declare.
19682 (add_stmt_cost): Dump cost we add.
19683 (add_stmt_costs): New function.
19684 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19685 No longer exported.
19686 (vect_analyze_stmt): Adjust prototype.
19687 (vectorizable_condition): Likewise.
19688 (vectorizable_live_operation): Likewise.
19689 (vectorizable_reduction): Likewise.
19690 (vectorizable_induction): Likewise.
19691 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19692 cost vector to pass to vectorizable_ and record afterwards.
19693 (vect_model_reduction_cost): Take cost vector argument and adjust.
19694 (vect_model_induction_cost): Likewise.
19695 (vectorizable_reduction): Likewise.
19696 (vectorizable_induction): Likewise.
19697 (vectorizable_live_operation): Likewise.
19698 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19699 SLP_TREE_NUMBER_OF_VEC_STMTS.
19700 (vect_analyze_slp_cost_1): Remove.
19701 (vect_analyze_slp_cost): Likewise.
19702 (vect_slp_analyze_node_operations): Take visited args and
19703 a target cost vector. Avoid processing already visited stmt sets.
19704 (vect_slp_analyze_operations): Use a local cost vector to gather
19705 costs and register those of non-discarded instances.
19706 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19707 (vect_schedule_slp_instance): Remove copying of
19708 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
19710 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19711 adding cost. Record cost entry location.
19712 (vect_prologue_cost_for_slp_op): Function to compute cost of
19713 a constant or invariant generated for SLP vect in the prologue,
19714 split out from vect_analyze_slp_cost_1.
19715 (vect_model_simple_cost): Make static. Adjust for SLP costing.
19716 (vect_model_promotion_demotion_cost): Likewise.
19717 (vect_model_store_cost): Likewise, make static.
19718 (vect_model_load_cost): Likewise.
19719 (vectorizable_bswap): Add cost vector arg and adjust.
19720 (vectorizable_call): Likewise.
19721 (vectorizable_simd_clone_call): Likewise.
19722 (vectorizable_conversion): Likewise.
19723 (vectorizable_assignment): Likewise.
19724 (vectorizable_shift): Likewise.
19725 (vectorizable_operation): Likewise.
19726 (vectorizable_store): Likewise.
19727 (vectorizable_load): Likewise.
19728 (vectorizable_condition): Likewise.
19729 (vectorizable_comparison): Likewise.
19730 (can_vectorize_live_stmts): Likewise.
19731 (vect_analyze_stmt): Likewise.
19732 (vect_transform_stmt): Adjust calls to vectorizable_*.
19733 * tree-vectorizer.c: Include gimple-pretty-print.h.
19734 (dump_stmt_cost): New function.
19736 2018-05-16 Richard Biener <rguenther@suse.de>
19738 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19739 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19740 * tree-ssa-dse.c: Include tree-ssa-loop.h.
19741 (check_name): New callback.
19742 (dse_classify_store): Track cycles via a visited bitmap of PHI
19743 defs and simplify handling of in-loop and across loop dead stores
19744 and properly fail for loop-variant refs. Handle byte-tracking with
19745 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19748 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
19750 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19751 (vect_get_mask_type_for_stmt): Likewise.
19752 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19754 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
19755 to determine the statement's vector type and the vector type that
19756 should be used for calculating nunits. Deal with cases in which
19757 the type has to be deferred.
19758 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19759 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19760 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19761 (vect_determine_vf_for_stmt): New functions, split out from...
19762 (vect_determine_vectorization_factor): ...here.
19763 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19764 (vect_get_mask_type_for_stmt): New functions, split out from
19765 vect_determine_vectorization_factor.
19767 2018-05-16 Richard Biener <rguenther@suse.de>
19769 * tree-cfg.c (verify_gimple_assign_ternary): Properly
19770 verify the [VEC_]COND_EXPR embedded comparison.
19772 2018-05-15 Martin Sebor <msebor@redhat.com>
19774 PR tree-optimization/85753
19775 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19776 RECORD_TYPE in addition to ARRAY_TYPE.
19778 2018-05-15 Martin Sebor <msebor@redhat.com>
19780 PR middle-end/85643
19781 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19783 2018-05-15 Richard Biener <rguenther@suse.de>
19785 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19786 add by_clobber_p one. Change algorithm to collect all defs
19787 representing uses we need to walk and try reducing them to
19788 a single one before failing.
19789 (dse_dom_walker::dse_optimize_stmt): Adjust.
19791 2018-05-13 Mark Wielaard <mark@klomp.org>
19793 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19794 (size_of_loc_descr): Likewise.
19795 (output_loc_operands): Likewise.
19796 (output_loc_operands_raw): Likewise.
19797 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19798 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19799 (hash_loc_operands): Likewise.
19800 (compare_loc_operands): Likewise.
19802 2018-05-14 Mark Wielaard <mark@klomp.org>
19804 * dwarf2out.c (count_index_addrs): New function.
19805 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19807 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19809 PR tree-optimization/83648
19810 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19811 return value as malloc candidate.
19813 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19816 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19817 param as true in call to suggest_attribute.
19819 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
19821 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19822 -mreadonly-in-sdata.
19824 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19826 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19828 (aarch64_crypto_aesd_fused): Likewise.
19830 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
19832 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19833 (movsi_aarch64): Likewise.
19834 (load_pairsi): Likewise.
19835 (load_pairdi): Likewise.
19836 (store_pairsi): Likewise.
19837 (store_pairdi): Likewise.
19838 (load_pairsf): Likewise.
19839 (load_pairdf): Likewise.
19840 (store_pairsf): Likewise.
19841 (store_pairdf): Likewise.
19842 (zero_extend): Likewise.
19843 (trunc): Swap alternatives.
19844 (fcvt_target): Add '?' to prefer w over r.
19846 2018-05-14 Jakub Jelinek <jakub@redhat.com>
19849 * config/i386/i386.md: Disallow non-commutative arithmetics in
19850 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19851 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
19852 in the peephole2 before it.
19854 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
19856 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19857 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19858 (ix86_handle_option): Handle -mcldemote.
19859 * config.gcc: New header.
19860 * config/i386/cldemoteintrin.h: New file.
19861 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19862 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19864 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19865 OPTION_MASK_ISA_CLDEMOTE.
19866 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19867 (ix86_valid_target_attribute_inner_p): Ditto.
19868 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19869 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19870 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19871 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19872 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19874 * config/i386/i386.opt: Add -mcldemote.
19875 * config/i386/x86intrin.h: New header.
19876 * doc/invoke.texi: Add -mcldemote.
19878 2018-05-14 Richard Biener <rguenther@suse.de>
19880 * doc/match-and-simplify.texi: Adjust :s documentation.
19882 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
19884 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19885 intended memcpy size.
19886 (REORDER_45): Likewise.
19888 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
19890 * sort.cc: New file.
19891 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19892 * vec.c (qsort_chk): Use gcc_qsort.
19893 * Makefile.in (OBJS-libcommon): Add sort.o.
19894 (build/sort.o): New target. Use it...
19895 (BUILD_RTL): ... here, and...
19896 (build/gencfn-macros): ... here, and...
19897 (build/genmatch): ... here.
19899 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19900 Chung-Ju Wu <jasonwucj@gmail.com>
19902 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19903 * config/nds32/nds32-graywolf.md: New file.
19904 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19905 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19907 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19908 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19909 * config/nds32/nds32.md (pipeline_model): Add graywolf.
19910 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19911 * config/nds32/pipelines.md: Include n15 settings.
19913 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19914 Chung-Ju Wu <jasonwucj@gmail.com>
19916 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19917 * config/nds32/nds32-n13.md: New file.
19918 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19919 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19921 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19922 * config/nds32/nds32.md (pipeline_model): Add n13.
19923 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19924 * config/nds32/pipelines.md: Include n13 settings.
19926 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19927 Chung-Ju Wu <jasonwucj@gmail.com>
19929 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19930 * config/nds32/nds32-n10.md: New file.
19931 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19932 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19934 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19935 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19936 * config/nds32/nds32.md (pipeline_model): Add n10.
19937 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19938 * config/nds32/pipelines.md: Include n10 settings.
19940 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
19941 Kito Cheng <kito.cheng@gmail.com>
19942 Chung-Ju Wu <jasonwucj@gmail.com>
19944 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19945 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19946 Add enum values for DSP extension instructions.
19947 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19949 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19950 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19951 New code iterators.
19952 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19953 * config/nds32/nds32-dspext.md: New file for DSP implementation.
19954 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19955 * config/nds32/nds32-intrinsic.md: Likewise.
19956 * config/nds32/nds32_intrinsic.h: Likewise.
19957 * config/nds32/nds32-md-auxiliary.c: Likewise.
19958 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19959 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19960 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19961 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19962 * config/nds32/nds32-protos.h: New declarations for DSP extension.
19963 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19964 TYPE_DMAC in switch statement.
19965 * config/nds32/nds32.c: New checking and implementation for DSP
19966 extension instructions.
19967 * config/nds32/nds32.h: Likewise.
19968 * config/nds32/nds32.md: Likewise.
19969 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19970 * config/nds32/predicates.md: Implement new predicates for DSP
19973 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19975 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19976 Reformat alternatives and attributes so it is easier to identify
19977 which constraints/attributes go with which instruction.
19978 (mov<mode>_hardfloat32, FMOVE64): Likewise.
19979 (mov<mode>_softfloat32, FMOVE64): Likewise.
19980 (mov<mode>_hardfloat64, FMOVE64): Likewise.
19981 (mov<mode>_softfloat64, FMOVE64): Likewise.
19983 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
19985 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19987 (Basic PowerPC Built-in Functions): The new name of the
19988 subsection previously known as "PowerPC Built-in Functions".
19989 (Basic PowerPC Built-in Functions Available on all Configurations):
19991 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19992 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19993 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19994 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19996 2018-05-11 Martin Jambor <mjambor@suse.cz>
19999 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
20002 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20005 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
20007 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
20009 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
20010 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
20011 (ix86_handle_option): Handle -mwaitpkg.
20012 * config.gcc: New header.
20013 * config/i386/cpuid.h (bit_WAITPKG): New bit.
20014 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
20015 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
20017 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20018 OPTION_MASK_ISA_WAITPKG.
20019 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
20020 (ix86_option_override_internal): Add PTA_WAITPKG.
20021 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
20022 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
20023 IX86_BUILTIN_TPAUSE.
20024 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
20025 __builtin_ia32_umwait and __builtin_ia32_tpause.
20026 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
20027 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
20028 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
20029 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
20030 UNSPECV_TPAUSE): New.
20031 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
20032 * config/i386/i386.opt: Add -mwaitpkg.
20033 * config/i386/waitpkgintrin.h: New file.
20034 * config/i386/x86intrin.h: New header.
20035 * doc/invoke.texi: Add -mwaitpkg.
20037 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20040 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
20042 (cortex-m0): Use armv6s-m isa.
20043 (cortex-m0plus): Likewise.
20044 (cortex-m1): Likewise.
20045 (cortex-m0.small-multiply): Likewise.
20046 (cortex-m0plus.small-multiply): Likewise.
20047 (cortex-m1.small-multiply): Likewise.
20049 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
20050 Jakub Jelinek <jakub@redhat.com>
20052 PR tree-optimization/85692
20053 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
20054 source permute as well.
20056 2018-05-11 Martin Liska <mliska@suse.cz>
20059 * doc/extend.texi: Document LLVM style format for no_sanitize
20062 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20064 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
20065 mode_supports_vsx_dform_quad to mode_supports_dq_form.
20066 (mode_supports_vsx_dform_quad): Likewise.
20067 (mode_supports_vmx_dform): Move these functions to be next to the
20068 other mode_supports functions.
20069 (mode_supports_dq_form): Likewise.
20070 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
20071 mode_supports_dq_form.
20072 (reg_offset_addressing_ok_p): Likewise.
20073 (offsettable_ok_by_alignment): Likewise.
20074 (rs6000_legitimate_offset_address_p): Likewise.
20075 (legitimate_lo_sum_address_p): Likewise.
20076 (rs6000_legitimize_address): Likewise.
20077 (rs6000_legitimize_reload_address): Likewise.
20078 (rs6000_secondary_reload_inner): Likewise.
20079 (rs6000_preferred_reload_class): Likewise.
20080 (rs6000_output_move_128bit): Likewise.
20082 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20084 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
20085 Generate SImode target register for null target.
20086 <case IX86_BUILTIN_XGETBV>: Ditto.
20087 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
20088 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
20090 2018-05-10 Carl Love <cel@us.ibm.com>
20092 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20093 dcbtt and dcbtstt if operands[2] is 0.
20095 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20098 * config/i386/sse.md (usadv64qi): New expander.
20100 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
20102 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
20103 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
20104 -maltivec=be support.
20105 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
20106 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
20107 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20108 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
20109 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
20110 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
20111 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
20112 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
20113 altivec_vsumsws): Adjust.
20114 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
20115 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
20116 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
20118 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
20119 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
20120 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
20121 (altivec_lve<VI_char>x): Delete expand.
20122 (*altivec_lve<VI_char>x_internal): Rename to...
20123 (altivec_lve<VI_char>x): ... this.
20124 (altivec_lvxl_<mode>): Delete expand.
20125 (*altivec_lvxl_<mode>_internal): Rename to ...
20126 (altivec_lvxl_<mode>): ... this.
20127 (altivec_stvxl_<mode>): Delete expand.
20128 (*altivec_stvxl_<mode>_internal): Rename to ...
20129 (altivec_stvxl_<mode>): ... this.
20130 (altivec_stve<VI_char>x): Delete expand.
20131 (*altivec_stve<VI_char>x_internal): Rename to ...
20132 (altivec_stve<VI_char>x): ... this.
20133 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
20134 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
20135 reduc_plus_scal_<mode>): Adjust.
20136 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
20138 (rs6000_cpu_cpp_builtins): Adjust.
20139 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
20140 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
20141 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
20142 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
20143 -maltivec=be support.
20144 (rs6000_split_vec_extract_var): Adjust.
20145 (rs6000_split_v4si_init): Adjust.
20146 (swap_selector_for_mode): Delete.
20147 (altivec_expand_lvx_be, altivec_expand_stvx_be,
20148 altivec_expand_stvex_be): Delete.
20149 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
20150 -maltivec=be support.
20151 (rs6000_gimple_fold_builtin): Ditto.
20152 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
20154 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
20155 (TARGET_DIRECT_MOVE_64BIT): Adjust.
20156 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
20157 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
20158 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
20159 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
20160 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
20161 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
20162 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
20163 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
20164 anonymous split): Adjust.
20165 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
20166 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
20168 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
20170 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
20171 when --with-gxx-include-dir is also specified.
20172 * configure: Regenerate.
20174 2018-05-09 Jim Wilson <jimw@sifive.com>
20177 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
20178 * config/riscv/t-withmultilib: New.
20179 * config/riscv/withmultilib.h: New.
20180 * doc/install.texi: Document RISC-V --with-multilib-list support.
20182 2018-05-09 Richard Biener <rguenther@suse.de>
20184 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
20186 (vect_bb_vectorization_profitable_p): Adjust. Compute
20187 actual scalar cost using the cost vector and the add_stmt_cost
20190 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20192 PR rtl-optimization/85645
20193 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
20194 in the REG_CFA_REGISTER note for LR, don't leave it empty.
20196 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20198 PR rtl-optimization/85645
20199 * shrink-wrap.c (spread_components): Return a boolean saying if
20200 anything was changed.
20201 (try_shrink_wrapping_separate): Iterate spread_components until
20202 nothing changes anymore.
20204 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20206 PR rtl-optimization/85645
20207 * regrename.c (build_def_use): Also kill the chains that include the
20208 destination of a REG_CFA_REGISTER note.
20210 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20212 PR rtl-optimization/85645
20213 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
20214 insn that has a REG_CFA_REGISTER note.
20216 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
20218 * cfgexpand.c (expand_clobber): New function.
20219 (expand_gimple_stmt_1): Use it.
20220 * tree-vect-stmts.c (vect_clobber_variable): New function,
20222 (vectorizable_simd_clone_call): ...here.
20223 (vectorizable_store): Emit a clobber either side of an
20224 IFN_STORE_LANES sequence.
20225 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
20227 2018-05-09 Tom de Vries <tom@codesourcery.com>
20230 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
20231 (define_insn "trap_if_false"): Add exit after trap.
20233 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
20235 PR rtl-optimization/85638
20236 * bb-reorder.c: Include common/common-target.h.
20237 (create_forwarder_block): New function extracted from...
20238 (fix_up_crossing_landing_pad): ...here. Rename into...
20239 (dw2_fix_up_crossing_landing_pad): ...this.
20240 (sjlj_fix_up_crossing_landing_pad): New function.
20241 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20242 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20243 from both partitions and exit the loop after one iteration.
20245 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20248 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20250 (Basic PowerPC Built-in Functions): The new name of the
20251 subsection previously known as "PowerPC Built-in Functions".
20252 (Basic PowerPC Built-in Functions Available on all Configurations):
20254 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20256 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20258 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20260 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20263 2018-05-08 Jim Wilson <jimw@sifive.com>
20265 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20266 (LD_EMUL_SUFFIX): New.
20267 (LINK_SPEC): Use it.
20269 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20271 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20273 (Basic PowerPC Built-in Functions): The new name of the
20274 subsection previously known as "PowerPC Built-in Functions".
20275 (Basic PowerPC Built-in Functions Available on all Configurations):
20277 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20279 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20281 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20283 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20286 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20289 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20290 after cmpelim optimization.
20292 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
20294 * config.gcc: Support "goldmont".
20295 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20296 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20297 PROCESSOR_GOLDMONT.
20298 * config/i386/i386.c (m_GOLDMONT): Define.
20299 (processor_target_table): Add "goldmont".
20300 (PTA_GOLDMONT): Define.
20301 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20302 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20303 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20304 (fold_builtin_cpu): Add "goldmont".
20305 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20306 (ix86_option_override_internal): Add "goldmont".
20307 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20308 (processor_type): Add PROCESSOR_GOLDMONT.
20309 * config/i386/i386.md: Add CPU "glm".
20310 * config/i386/glm.md: New file.
20311 * config/i386/x86-tune.def: Add m_GOLDMONT.
20312 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20314 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20317 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20319 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20320 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
20321 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
20324 * config/i386/i386.c (ix86_fold_builtin): Handle
20325 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20328 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20329 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20331 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
20334 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20335 (check_arch): Likewise.
20336 (check_fpu): Return the result rather than printing it.
20337 (end arch): Fix operator precedence.
20338 (end cpu): Likewise.
20339 (END): Print the result from check_fpu.
20341 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20342 Alan Hayward <alan.hayward@arm.com>
20343 David Sherwood <david.sherwood@arm.com>
20345 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20346 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20347 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20348 (*fcmuo<mode>_and): New patterns.
20350 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20352 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20353 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20354 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20355 (cmp_op, sve_imm_con): New code attributes.
20356 (SVE_COND_INT_CMP, imm_con): Delete.
20357 (cmp_op): Remove above unspecs from int attribute.
20358 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20360 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
20361 comparison-specific unspecs.
20362 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20363 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20364 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20365 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20366 (*vec_fcm<cmp_op><mode>): Rename to...
20367 (*fcm<cmp_op><mode>): ...this and adjust likewise.
20368 (*vec_fcmuo<mode>): Rename to...
20369 (*fcmuo<mode>): ...this and adjust likewise.
20370 (*pred_fcm<cmp_op><mode>): New pattern.
20371 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20372 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20374 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20376 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20377 (aarch64_emit_sve_predicated_cond): New function.
20378 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20379 (aarch64_emit_unspec_cond_or): Replace with...
20380 (aarch64_emit_sve_or_conds): ...this new function. Use
20381 aarch64_emit_sve_ptrue_op for the individual comparisons and
20382 aarch64_emit_binop to OR them together.
20383 (aarch64_emit_inverted_unspec_cond): Replace with...
20384 (aarch64_emit_sve_inverted_cond): ...this new function. Use
20385 aarch64_emit_sve_ptrue_op for the comparison and
20386 aarch64_emit_unop to invert the result.
20387 (aarch64_expand_sve_vec_cmp_float): Update after the above
20388 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
20390 2018-05-07 Nathan Sidwell <nathan@acm.org>
20392 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20393 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20394 (Backwards Compatibility): Likewise.
20396 2018-05-07 Luis Machado <luis.machado@linaro.org>
20400 2018-05-07 Luis Machado <luis.machado@linaro.org>
20402 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20403 <prefetch_dynamic_strides>: New const bool field.
20404 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20405 prefetch_dynamic_strides.
20406 (exynosm1_prefetch_tune): Likewise.
20407 (thunderxt88_prefetch_tune): Likewise.
20408 (thunderx_prefetch_tune): Likewise.
20409 (thunderx2t99_prefetch_tune): Likewise.
20410 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20412 (aarch64_override_options_internal): Update to set
20413 PARAM_PREFETCH_DYNAMIC_STRIDES.
20414 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20415 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20416 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20417 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20418 prefetch-dynamic-strides setting.
20420 2018-05-07 Luis Machado <luis.machado@linaro.org>
20422 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20423 <minimum_stride>: New const int field.
20424 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20425 minimum_stride field.
20426 (exynosm1_prefetch_tune): Likewise.
20427 (thunderxt88_prefetch_tune): Likewise.
20428 (thunderx_prefetch_tune): Likewise.
20429 (thunderx2t99_prefetch_tune): Likewise.
20430 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20431 (aarch64_override_options_internal): Update to set
20432 PARAM_PREFETCH_MINIMUM_STRIDE.
20433 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20434 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20435 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20436 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20437 stride is constant and is below the minimum stride threshold.
20439 2018-05-07 Luis Machado <luis.machado@linaro.org>
20441 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20444 2018-05-07 Luis Machado <luis.machado@linaro.org>
20446 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20447 <prefetch_dynamic_strides>: New const bool field.
20448 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20449 prefetch_dynamic_strides.
20450 (exynosm1_prefetch_tune): Likewise.
20451 (thunderxt88_prefetch_tune): Likewise.
20452 (thunderx_prefetch_tune): Likewise.
20453 (thunderx2t99_prefetch_tune): Likewise.
20454 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20456 (aarch64_override_options_internal): Update to set
20457 PARAM_PREFETCH_DYNAMIC_STRIDES.
20458 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20459 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20460 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20461 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20462 prefetch-dynamic-strides setting.
20464 2018-05-07 Luis Machado <luis.machado@linaro.org>
20466 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20467 <minimum_stride>: New const int field.
20468 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20469 minimum_stride field.
20470 (exynosm1_prefetch_tune): Likewise.
20471 (thunderxt88_prefetch_tune): Likewise.
20472 (thunderx_prefetch_tune): Likewise.
20473 (thunderx2t99_prefetch_tune): Likewise.
20474 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20475 (aarch64_override_options_internal): Update to set
20476 PARAM_PREFETCH_MINIMUM_STRIDE.
20477 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20478 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20479 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20480 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20481 stride is constant and is below the minimum stride threshold.
20483 2018-05-06 Jakub Jelinek <jakub@redhat.com>
20486 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20487 the type is addressable. Don't force op into register if it has
20490 2018-05-05 Roland McGrath <mcgrathr@google.com>
20493 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20494 any section for which we don't know a specific type it should have,
20495 regardless of name. Previously this was done only for the exact
20496 names ".init_array", ".fini_array", and ".preinit_array".
20497 (default_elf_asm_named_section): Add comment about
20498 relationship with default_section_type_flags and SECTION_NOTYPE.
20499 (get_section): Don't consider it a type conflict if one side has
20500 SECTION_NOTYPE and the other doesn't, as long as neither has the
20501 SECTION_BSS et al used in the default_section_type_flags logic.
20503 2018-05-05 Tom de Vries <tom@codesourcery.com>
20506 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20507 (workaround_barsyncs): New function.
20508 (nvptx_reorg): Use workaround_barsyncs.
20509 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20510 (define_expand "nvptx_membar_cta"): New define_expand.
20511 (define_insn "*nvptx_membar_cta"): New insn.
20513 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
20515 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20516 To improve optimization opportunities.
20517 * builtin-types.def: The new needed builtin types for the above.
20519 2018-05-04 Richard Biener <rguenther@suse.de>
20521 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20522 * gimple-ssa-store-merging.c
20523 (imm_store_chain_info::output_merged_store): Remove redundant create,
20524 release split_store vector contents on failure.
20525 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20526 scalar stmt vector on cache hit.
20528 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
20530 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20532 * config.gcc (powerpc-xilinx-eabi*): Remove.
20533 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20535 (fusion_addis_mem_combo_load): Ditto.
20536 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20538 (rs6000_cpu_cpp_builtins): Ditto.
20539 * config/rs6000/rs6000-linux.c
20540 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20541 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20542 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20544 (rs6000_setup_reg_addr_masks): Ditto.
20545 (rs6000_init_hard_regno_mode_ok): Ditto.
20546 (rs6000_option_override_internal): Ditto.
20547 (legitimate_lo_sum_address_p): Ditto.
20548 (rs6000_legitimize_address): Ditto.
20549 (rs6000_legitimize_reload_address): Ditto.
20550 (rs6000_legitimate_address_p): Ditto.
20551 (abi_v4_pass_in_fpr): Ditto.
20552 (setup_incoming_varargs): Ditto.
20553 (rs6000_gimplify_va_arg): Ditto.
20554 (rs6000_split_multireg_move): Ditto.
20555 (rs6000_savres_strategy): Ditto.
20556 (rs6000_emit_prologue_components): Ditto.
20557 (rs6000_emit_epilogue_components): Ditto.
20558 (rs6000_emit_prologue): Ditto.
20559 (rs6000_emit_epilogue): Ditto.
20560 (rs6000_elf_file_end): Ditto.
20561 (rs6000_function_value): Ditto.
20562 (rs6000_libcall_value): Ditto.
20563 * config/rs6000/rs6000.h: Ditto.
20564 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20565 (TARGET_MINMAX): ... this. New.
20566 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20567 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20568 (*movsi_internal1_single): Delete.
20569 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20570 mfpu=, mxilinx-fpu): Delete.
20571 * config/rs6000/singlefp.h: Delete.
20572 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20573 * config/rs6000/t-rs6000: Ditto.
20574 * config/rs6000/t-xilinx: Delete.
20575 * config/rs6000/titan.md: Adjust for fp_type removal.
20576 * config/rs6000/vsx.md: Remove Xilinx FP support.
20577 (VStype_simple): Delete.
20578 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20579 * config/rs6000/xfpu.h: Delete.
20580 * config/rs6000/xfpu.md: Delete.
20581 * config/rs6000/xilinx.h: Delete.
20582 * config/rs6000/xilinx.opt: Delete.
20583 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20584 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20586 2018-05-04 Tom de Vries <tom@codesourcery.com>
20589 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20592 2018-05-04 Richard Biener <rguenther@suse.de>
20594 PR middle-end/85627
20595 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20596 (expand_complex_div_wide): Likewise.
20597 (expand_complex_operations_1): Likewise.
20598 (expand_complex_libcall): Preserve EH info of the original stmt.
20599 (tree_lower_complex): Handle removed blocks.
20600 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20601 on complex multiplication and division libcall builtins.
20603 2018-05-04 Richard Biener <rguenther@suse.de>
20605 PR middle-end/85574
20606 * fold-const.c (negate_expr_p): Restrict negation of operand
20607 zero of a division to when we know that can happen without
20609 (fold_negate_expr_1): Likewise.
20611 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20614 * real.h (real_nextafter): Declare.
20615 * real.c (real_nextafter): New function.
20616 * fold-const-call.c (fold_const_nextafter): New function.
20617 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20618 CASE_CFN_NEXTTOWARD.
20619 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20620 even when arg1_mode is different from arg0_mode.
20622 2018-05-03 Nathan Sidwell <nathan@acm.org>
20624 * doc/extend.texi (Deprecated Features): Remove
20625 -ffriend-injection.
20626 (Backwards Compatibility): Likewise.
20627 * doc/invoke.texi (C++ Language Options): Likewise.
20628 (C++ Dialect Options): Likewise.
20630 2018-05-03 Jakub Jelinek <jakub@redhat.com>
20633 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20634 _mm512_mask_mullox_epi64): New intrinsics.
20636 2018-05-03 Tom de Vries <tom@codesourcery.com>
20639 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20640 dump files): Add offload-tree.
20642 2018-05-03 Richard Biener <rguenther@suse.de>
20644 PR tree-optimization/85615
20645 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20646 to loops not nested in BBs loop father to avoid creating multi-entry
20649 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20651 PR tree-optimization/70291
20652 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20653 arguments. Change return type to tree. Emit libcall as a new
20654 statement rather than replacing existing one when inplace_p is true.
20655 (expand_complex_multiplication_components): New function.
20656 (expand_complex_multiplication): Expand floating-point complex
20657 multiplication using the above.
20658 (expand_complex_division): Rename inner_type parameter to type.
20659 Update expand_complex_libcall call-site.
20660 (expand_complex_operations_1): Update expand_complex_multiplication
20661 and expand_complex_division call-sites.
20663 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20666 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20667 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20668 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20669 the highest significant bit of the shift count mask is clear. In
20670 check whether and[sq]i3 is needed verify that all significant bits
20671 of the shift count other than the highest are set.
20673 2018-05-02 Tom de Vries <tom@codesourcery.com>
20676 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20677 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20678 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20679 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20680 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20681 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20682 __builtin_goacc_parlevel_size.
20684 2018-05-02 Richard Biener <rguenther@suse.de>
20686 PR tree-optimization/85597
20687 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20688 do not use split vect_get_vec_defs call but call vect_get_slp_defs
20691 2018-05-02 Tom de Vries <tom@codesourcery.com>
20694 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20695 dump files): Add ltrans-tree.
20697 2018-05-02 Tom de Vries <tom@codesourcery.com>
20700 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20701 dump files): Add wpa-ipa.
20703 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
20705 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
20706 powerpc*-*-linux*paired* target.
20707 * config/rs6000/750cl.h: Delete.
20708 * config/rs6000/paired.h: Delete.
20709 * config/rs6000/paired.md: Delete.
20710 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20712 * config/rs6000/rs6000-builtin.def: Remove paired float support.
20713 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20714 comment. Remove paired float support.
20715 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20716 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20718 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20719 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20721 * config/rs6000/rs6000.c: Remove paired float support.
20722 (paired_expand_vector_init, paired_expand_vector_move,
20723 paired_emit_vector_compare, paired_emit_vector_cond_expr,
20724 (paired_expand_lv_builtin, paired_expand_stv_builtin,
20725 paired_expand_builtin, paired_expand_predicate_builtin,
20726 paired_init_builtins): Delete.
20727 * config/rs6000/rs6000.h: Remove paired float support.
20728 * config/rs6000/rs6000.md: Remove paired float support.
20729 (move_from_CR_ov_bit): Delete.
20730 * config/rs6000/rs6000.opt (mpaired): Delete.
20731 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20732 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20734 2018-05-02 Richard Biener <rguenther@suse.de>
20736 PR middle-end/85567
20737 * gimplify.c (gimplify_save_expr): When in SSA form allow
20738 SAVE_EXPRs to compute to SSA vars.
20740 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20743 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20744 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20745 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20746 clobber operands[2], instead use a new pseudo. Formatting fixes.
20748 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
20750 PR tree-optimization/85586
20751 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20752 exit early for statements in the same group if the accesses are
20755 2018-05-02 Tom de Vries <tom@codesourcery.com>
20758 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20761 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
20763 PR tree-optimization/85143
20764 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20766 2018-05-01 Tom de Vries <tom@codesourcery.com>
20769 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20770 not found" error message.
20772 2018-05-01 Tom de Vries <tom@codesourcery.com>
20775 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20776 * vec.c (test_ordered_remove_if): New function.
20777 (vec_c_tests): Call test_ordered_remove_if.
20778 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20779 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20780 * tree-vect-patterns.c (vect_pattern_recog_1): Use
20781 VEC_ORDERED_REMOVE_IF.
20783 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20785 PR tree-optimization/82665
20786 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20787 pointer subtraction where arguments come from a memchr call.
20789 2018-05-01 Jakub Jelinek <jakub@redhat.com>
20791 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20792 --push-state --as-needed and --pop-state instead of --as-needed and
20793 --no-as-needed if ld supports it.
20794 * configure: Regenerated.
20797 * doc/install.texi2html: Replace _002d with - and _002a with * in
20798 generated html files using sed.
20800 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20803 * gcc-rich-location.c (blank_line_before_p): New function.
20804 (use_new_line): New function.
20805 (gcc_rich_location::add_fixit_insert_formatted): New function.
20806 * gcc-rich-location.h
20807 (gcc_rich_location::add_fixit_insert_formatted): New function.
20809 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20811 * selftest.c (assert_streq): Rename "expected" and "actual" to
20812 "val1" and "val2". Extend NULL-handling to cover both inputs
20813 symmetrically, while still requiring both to be non-NULL for a pass.
20814 * selftest.h (assert_streq): Rename "expected" and "actual" to
20816 (ASSERT_EQ): Likewise.
20817 (ASSERT_EQ_AT): Likewise.
20818 (ASSERT_KNOWN_EQ): Likewise.
20819 (ASSERT_KNOWN_EQ_AT): Likewise.
20820 (ASSERT_NE): Likewise.
20821 (ASSERT_MAYBE_NE): Likewise.
20822 (ASSERT_MAYBE_NE_AT): Likewise.
20823 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
20824 the assertion to pass.
20825 (ASSERT_STREQ_AT): Likewise.
20827 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20829 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20830 interaction with -pie.
20832 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20834 * selftest.h: Fix alphabetization of per-source-file selftest
20837 2018-04-30 Jason Merrill <jason@redhat.com>
20839 PR c++/61982 - dead stores to destroyed objects.
20840 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20843 2018-04-30 Jason Merrill <jason@redhat.com>
20845 * tree.c (build_clobber): New.
20846 * tree.h: Declare it.
20847 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20849 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20851 * diagnostic-show-locus.c (layout::layout): Update for
20852 location_get_source_line returning a char_span.
20853 (struct char_span): Move to input.h.
20854 (struct correction): Update for fields in char_span becoming
20856 (struct source_line): Update for location_get_source_line
20857 returning a char_span.
20858 (layout::print_line): Likewise.
20859 * edit-context.c (edited_file::print_content): Likewise.
20860 (edited_file::print_diff_hunk): Likewise.
20861 (edited_file::print_run_of_changed_lines): Likewise.
20862 (edited_file::get_num_lines): Likewise.
20863 (edited_line::edited_line): Likewise.
20864 * final.c (asm_show_source): Likewise.
20865 * input.c (location_get_source_line): Convert return type
20866 from const char * to char_span, losing the final "line_len"
20868 (dump_location_info): Update for the above.
20869 (get_substring_ranges_for_loc): Likewise. Use a char_span
20870 when handling the literal within the line.
20871 (test_reading_source_line): Update for location_get_source_line
20872 returning a char_span.
20873 * input.h (class char_span): Move here from
20874 diagnostic-show-locus.c, converting from a struct to a class.
20875 Make data members private.
20876 (char_span::operator bool): New.
20877 (char_span::length): New.
20878 (char_span::get_buffer): New.
20879 (char_span::operator[]): New.
20880 (char_span::subspan): Make const.
20881 (char_span::xstrdup): New.
20882 (location_get_source_line): Convert return type from const char *
20883 to char_span, losing the final "line_size" param.
20885 2018-04-30 Jan Hubicka <jh@suse.cz>
20887 * lto-wrapper.c (ltrans_priorities): New static var.
20888 (cmp_priority): New.
20889 (run_gcc): Read priorities and if doing parallel build order
20890 the Makefile by them.
20892 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20894 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20896 2018-04-30 Richard Biener <rguenther@suse.de>
20898 * tree-cfg.c (verify_address): Remove base argument, add
20899 flag whether to check TREE_ADDRESSABLE and do that.
20900 (verify_expr): Remove.
20901 (verify_types_in_gimple_reference): Add pieces from verify_expr.
20902 (verify_gimple_assign_single): Likewise.
20903 (verify_gimple_switch): Likewise.
20904 (verify_expr_location_1): Dereference tp once. Add (disabled)
20905 piece from verify_expr.
20906 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20908 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20910 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20912 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20914 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20915 (small_data_pattern): Likewise.
20916 (arc_rewrite_small_data): Likewise.
20917 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20918 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20919 (get_symbol_alignment): New function.
20920 (legitimate_small_data_address_p): Likewise.
20921 (legitimate_scaled_address): Update, call
20922 legitimate_small_data_address_p.
20923 (output_sdata): New static variable.
20924 (arc_print_operand): Update how we handle small data operands.
20925 (arc_print_operand_address): Likewise.
20926 (arc_legitimate_address_p): Update, use
20927 legitimate_small_data_address_p.
20928 (arc_rewrite_small_data_p): Remove.
20929 (arc_rewrite_small_data_1): Likewise.
20930 (arc_rewrite_small_data): Likewise.
20931 (small_data_pattern): Likewise.
20932 (compact_sda_memory_operand): Update to use
20933 legitimate_small_data_address_p and get_symbol_alignment.
20934 (prepare_move_operands): Don't rewite sdata pattern.
20935 (prepare_extend_operands): Remove.
20936 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20938 (zero_extendqisi2): Likewise.
20939 (zero_extendhisi2): Likewise.
20940 (extendqihi2): Likewise.
20941 (extendqisi2): Likewise.
20942 (extendhisi2): Likewise.
20943 (addsi3): Likewise.
20944 (subsi3): Likewise.
20945 (andsi3): Likewise.
20946 * config/arc/constraints.md (Usd): Change it to memory constraint.
20948 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20950 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20951 as source of std instructions.
20952 * config/arc/arc.md (movsi_insn): Update pattern predicate to
20953 allow 6-bit constants as source for store instructions.
20954 (movdi_insn): Update instruction pattern to allow 6-bit constants
20955 as source for store instructions.
20957 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20959 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20961 2018-04-30 Nathan Sidwell <nathan@acm.org>
20962 Sandra Loosemore <sandra@codesourcery.com>
20964 * dumpfile.c (dump_open): Allow '-' for stdout.
20965 * doc/invoke.texi (Developer Options): Document dump filename
20966 determination early. Document stdin/stdout selection.
20968 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
20970 Microblaze Target: PIC data text relative
20972 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20973 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20975 * config/microblaze/microblaze.h (microblaze_constant_address_p):
20976 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20977 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20978 New addressing mode for data-text relative position indepenedent code.
20979 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20980 'ADDRESS_SYMBOLIC_TXT_REL'.
20981 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20982 (microblaze_legitimate_pic_operand): Exclude function calls from
20983 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20984 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20986 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20987 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20988 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20989 for 'address + offset'.
20990 (microblaze_expand_prologue): Add new function prologue call for
20992 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20993 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20994 table in case of TARGET_PIC_DATA_TEXT_REL.
20995 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20996 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20997 Add new macros 'UNSPEC_TEXT',
20998 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20999 + exclude function calls from 'UNSPEC_PLT' in case of data text
21001 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21002 new target hook for generating address diff vector tables in case of
21004 * doc/tm.texi : Regenerate.
21005 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
21006 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
21007 of addr diff vector generation.
21008 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21009 target hook definition.
21010 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
21011 Add default function for generate_pic_addr_diff_vec -> flag_pic.
21012 * doc/invoke.texi (Add new pic option): Add new microblaze pic
21013 option for data text relative.
21015 2018-04-30 Richard Biener <rguenther@suse.de>
21017 * tree-chrec.h (evolution_function_is_constant_p): Remove
21019 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
21021 2018-04-30 Richard Biener <rguenther@suse.de>
21024 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
21026 2018-04-30 Richard Biener <rguenther@suse.de>
21028 PR tree-optimization/28364
21029 PR tree-optimization/85275
21030 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
21031 copying first exit test.
21033 2018-04-28 Mark Wielaard <mark@klomp.org>
21035 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
21036 dwarf_version >= 5.
21037 (dwarf_AT): Handle DW_AT_addr_base.
21038 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
21040 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
21043 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
21044 (*ashl<dwi>3_doubleword_mask_1): Ditto.
21045 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
21046 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
21048 2018-04-28 Richard Biener <rguenther@suse.de>
21050 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
21051 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
21052 to reflect use. Only add interesting stmts.
21054 2018-04-27 Martin Jambor <mjambor@suse.cz>
21057 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
21058 the jump function allows for passing through aggregate values.
21060 2018-04-27 David Malcolm <dmalcolm@redhat.com>
21062 * input.h (in_system_header_at): Convert from macro to inline
21064 (from_macro_expansion_at): Likewise.
21065 (from_macro_definition_at): Likewise.
21067 2018-04-27 Jeff Law <law@redhat.com>
21069 * config.gcc: Mark tile* targets as deprecated/obsolete.
21071 2018-04-27 Richard Biener <rguenther@suse.de>
21073 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
21076 2018-04-27 Richard Biener <rguenther@suse.de>
21078 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
21080 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
21082 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
21083 with Yd constraint. Set "preferred_for_speed" attribute from
21084 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
21085 with Yd constraint.
21086 (*movdi_internal): Ditto.
21087 (movti_interunit splitters): Remove
21088 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
21089 (movdi_interunit splitters): Ditto.
21090 * config/i386/constraints.md (Ye): Remove.
21091 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
21093 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21096 * config/aarch64/constraints.md (Usg): Limit to 31.
21097 (Usj): Limit to 63.
21099 2018-04-27 Jakub Jelinek <jakub@redhat.com>
21101 PR tree-optimization/85529
21102 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
21103 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
21104 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
21105 zero extension or masking of the MSB bit.
21106 (optimize_range_tests): Add FIRST_BB argument, pass it through
21107 to optimize_range_tests_var_bound.
21108 (maybe_optimize_range_tests, reassociate_bb): Adjust
21109 optimize_range_tests callers.
21111 2018-04-26 Richard Biener <rguenther@suse.de>
21112 Jakub Jelinek <jakub@redhat.com>
21114 * cgraph.h (symbol_table): Just declare debug method here.
21115 * symtab.c (symbol_table::debug): Define.
21117 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
21119 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
21121 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
21123 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
21124 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
21125 (*movdi_internal): Substitute Yi and Yj constraint with x
21126 and Ym and Yn constraint with y constraint. Update "isa"
21127 attribute and set "preferred_for_speed" attribute from
21128 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
21129 (*movsi_internal): Ditto.
21130 (*movdf_internal): Ditto.
21131 (*movsf_internal): Ditto.
21132 (*zero_extendsidi2): Ditto.
21133 * config/i386/sse.md (vec_set<mode>_0): Ditto.
21134 (sse2_loadld): Ditto.
21135 (*vec_extract<ssevecmodelower>_0): Ditto.
21136 (*vec_extractv4si_0_zext_sse4): Ditto.
21137 (vec_concatv2di): Ditto.
21138 (*vec_dup<mode>): Ditto.
21139 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
21140 * config/i386/constraints.md (Yi): Remove.
21145 2018-04-26 Nathan Sidwell <nathan@acm.org>
21147 * dumpfile.c (dump_open): New.
21148 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
21149 (dump_finish): Detect stdio/stderr by value not name.
21151 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
21153 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
21155 2018-04-26 Tom de Vries <tom@codesourcery.com>
21158 * config/nvptx/nvptx.c (verify_neutering_jumps)
21159 (verify_neutering_labels): New function
21160 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
21162 2018-04-26 Tom de Vries <tom@codesourcery.com>
21165 * config/nvptx/nvptx.c (needs_neutering_p): New function.
21166 (nvptx_single): Use needs_neutering_p to skip over insns that do not
21169 2018-04-26 Richard Biener <rguenther@suse.de>
21170 Tom de Vries <tom@codesourcery.com>
21173 * lto-streamer-out.c (output_function): Fixup loops if required to match
21174 discovery done in the reader.
21176 2018-04-26 Richard Biener <rguenther@suse.de>
21178 PR tree-optimization/85116
21179 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
21180 have a loop exit from the single latch predecessor. Remove
21181 case of header with just condition.
21182 (ch_base::copy_headers): Exclude infinite loops from any
21184 (pass_ch::execute): Record exits.
21186 2018-04-26 Richard Biener <rguenther@suse.de>
21188 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
21189 prologue cost vector and pass it to vect_get_load_cost.
21190 (vect_get_peeling_costs_all_drs): Likewise.
21191 (vect_peeling_hash_get_lowest_cost): Likewise.
21192 (vect_enhance_data_refs_alignment): Likewise.
21194 2018-04-26 Richard Biener <rguenther@suse.de>
21196 PR middle-end/85450
21197 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
21198 checking of integer<->pointer conversions.
21199 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
21200 sign-/zero-extending pointer types.
21201 (expand_omp_for_static_chunk): Likewise.
21203 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
21204 Jean Lee <xiaoyur347@gmail.com>
21206 * config/mips/mips.c (mips_asan_shadow_offset): New function.
21207 (TARGET_ASAN_SHADOW_OFFSET): Define.
21208 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
21209 true for -fsanitize=address.
21211 2018-04-25 Mark Wielaard <mark@klomp.org>
21213 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
21216 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21218 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
21219 than "alu", remove explicit "memory" and "imm_disp" attributes.
21220 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
21222 PR middle-end/85414
21223 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
21224 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
21225 gen_lowpart_no_emit.
21227 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
21230 * config/i386/i386.c (ix86_expand_builtin): Change memory
21231 operand to XI, extend p0 to Pmode.
21232 * config/i386/i386.md: Change unspec volatile and operand
21233 1 mode to XI, change operand 0 mode to P.
21235 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21237 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
21238 GET_MODE_MASK before any checking.
21239 (nds32_can_use_bset_p): Likewise.
21240 (nds32_can_use_btgl_p): Likewise.
21242 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21244 * config/nds32/nds32-doubleword.md: New define_split pattern for
21245 illegal register number.
21247 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21249 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21251 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21253 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21255 2018-04-25 Richard Biener <rguenther@suse.de>
21257 * lto-streamer.h (LTO_major_version): Bump to 8.
21259 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21261 * BASE-VER: Set to 9.0.0.
21263 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
21265 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21266 in __abskf2 and __powikf2.
21268 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21271 * config/aarch64/constraints.md (Usg, Usj): New constraints.
21272 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21273 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21274 Use the above on operand 2. Reindent.
21275 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21277 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21280 * common/config/i386/i386-common.c (ix86_handle_option): Don't
21282 * config/i386/i386.opt (mcet): Removed.
21283 * doc/install.texi: Remove -mcet documentation.
21284 * doc/invoke.texi: Likewise.
21286 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21289 * doc/install.texi: Remove -mcet from bootstrap-cet.
21291 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21294 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21295 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21299 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21300 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21301 containing a CONST_VECTOR.
21303 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
21305 * doc/install.texi: Update newlib dependency for nvptx.
21307 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21310 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21311 instead of INTVAL when shifting x left.
21313 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
21315 PR tree-optimization/85478
21316 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21317 vect_grouped_store_supported for single element vectors.
21319 2018-04-24 Richard Biener <rguenther@suse.de>
21322 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21323 load cost increase to the case of non-constant step.
21325 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21328 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21329 destination if any_malformed_asm.
21331 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
21333 PR middle-end/85496
21334 * expr.c (store_field): In the bitfield case, if the value comes from
21335 a function call and is returned in registers by means of a PARALLEL,
21336 do not change the mode of the temporary unless BLKmode and VOIDmode.
21338 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
21340 PR rtl-optimization/85423
21341 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21342 dependencies to debug insns when the previous insn is non-debug.
21344 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21346 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21347 enums into a single definition.
21348 (fls): Fix predicates and printing.
21351 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21353 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21354 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21355 and short u6 immediate.
21356 (check_if_valid_sleep_operand): Remove.
21357 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21359 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21361 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21362 flag_always_save_lp condition.
21363 * config/nds32/nds32.opt (malways-save-lp): New option.
21365 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21367 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21368 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21369 * config/nds32/nds32.h
21370 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21371 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21373 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21375 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21376 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21378 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21379 Chung-Ju Wu <jasonwucj@gmail.com>
21381 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21383 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21384 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21386 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21388 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21390 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21392 * config/nds32/nds32-protos.h (nds32_data_alignment,
21393 nds32_local_alignment): Declare.
21394 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21395 nds32_local_alignment): New functions.
21396 (TARGET_CONSTANT_ALIGNMENT): Define.
21397 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21399 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21401 * config/nds32/nds32.c
21402 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21403 (TARGET_MODES_TIEABLE_P): Likewise.
21405 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21407 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21408 level Ofast and Og.
21410 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
21411 Chung-Ju Wu <jasonwucj@gmail.com>
21413 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21414 for unaligned access.
21415 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21417 * config/nds32/nds32-intrinsic.md: Likewise.
21418 * config/nds32/nds32_intrinsic.h: Likewise.
21419 * config/nds32/nds32.h (nds32_builtins): Likewise.
21420 * config/nds32/nds32.opt (munaligned-access): New option.
21421 * config/nds32/nds32.c (nds32_asm_file_start): Display
21422 flag_unaligned_access status.
21424 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21426 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21427 -mno-relax is present.
21428 * config/riscv/linux.h (LINK_SPEC): Ditto.
21430 2018-04-20 Martin Sebor <msebor@redhat.com>
21433 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21435 (gimple_fold_builtin_stxcpy_chk): Same.
21436 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21438 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
21441 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21442 __powikf2 when long double is IEEE 128-bit.
21444 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21446 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21447 step to make sure stack always aligned.
21449 2018-04-20 Carl Love <cel@us.ibm.com>
21452 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21453 size check for arg0.
21455 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
21456 Tom de Vries <tom@codesourcery.com>
21459 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21460 Emit insns for calls too.
21461 (nvptx_find_par): Always look for worker-level predecessor insn.
21462 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
21464 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21465 (nvptx_process_pars): Propagate frames for calls.
21467 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
21470 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21472 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21473 (ix86_handle_option): Don't handle OPT_mibt.
21474 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21476 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21478 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21479 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21480 (ix86_target_macros): Define __CET__ with flag_cf_protection
21481 for -fcf-protection.
21482 * config/i386/i386.c (isa2_opts): Remove -mibt.
21483 * config/i386/i386.h (TARGET_IBT): Removed.
21484 (TARGET_IBT_P): Likewise.
21485 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21486 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21487 * config/i386/i386.opt (mcet): Update help message.
21488 (mshstk): Likewise.
21490 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
21491 -mcet as an alias for -mshstk.
21493 2018-04-20 Richard Biener <rguenther@suse.de>
21495 PR middle-end/85475
21496 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21497 complexity by forcing a single use of the multiply operand.
21499 2018-04-20 Martin Jambor <mjambor@suse.cz>
21502 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21503 recursion dependency to only apply to non-clones.
21505 2018-04-20 Martin Jambor <mjambor@suse.cz>
21508 * ipa-cp.c (create_specialized_node): Check that clones of
21509 self-recursive edges exist during IPA-CP.
21511 2018-04-19 Toon Moene <toon@moene.org>
21513 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21516 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21518 PR tree-optimization/85467
21519 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21520 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
21521 VECTOR_CST element to type.
21523 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21526 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21527 * config/i386/i386.md (builtin_setjmp_setup): Removed.
21528 (builtin_longjmp): Likewise.
21529 (save_stack_nonlocal): New pattern.
21530 (restore_stack_nonlocal): Likewise.
21532 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21535 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21536 Replace ASM_OUTPUT_LABEL with fprintf.
21538 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21541 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21542 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21543 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21544 define __IBT__ and __SHSTK__ for -fcf-protection.
21545 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21547 (ix86_trampoline_init): Likewise.
21548 (x86_output_mi_thunk): Likewise.
21549 (ix86_notrack_prefixed_insn_p): Likewise.
21550 (ix86_option_override_internal): Don't disallow -fcf-protection.
21551 * config/i386/i386.md (rdssp<mode>): Also enable for
21553 (incssp<mode>): Likewise.
21554 (nop_endbr): Likewise.
21555 * config/i386/i386.opt (mcet): Change help message to built-in
21558 (mshstk): Likewise.
21559 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21560 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21561 enable CET built-in functions.
21563 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21565 * common/config/i386/i386-common.c
21566 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21567 OPTION_MASK_ISA_MOVDIRI_UNSET,
21568 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21569 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21570 * config.gcc (movdirintrin.h): New header.
21571 * config/i386/cpuid.h (bit_MOVDIRI,
21572 bit_MOVDIR64B): New bits.
21573 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21575 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21576 (VOID, PVOID, PCVOID)): New function types.
21577 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21578 __builtin_ia32_directstoreu_u64,
21579 __builtin_ia32_movdir64b): New builtins.
21580 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21581 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21583 (ix86_valid_target_attribute_inner_p): Ditto.
21584 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21585 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21586 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21587 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21588 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21589 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21590 (movdiri<mode>, movdir64b_<mode>): New.
21591 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21592 * config/i386/immintrin.h: Include movdirintrin.h.
21593 * config/i386/movdirintrin.h: New file.
21594 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21596 2018-04-19 Richard Biener <rguenther@suse.de>
21598 PR middle-end/85455
21599 * cfg.c (clear_bb_flags): When loop state says we have
21600 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21602 2018-04-19 Richard Biener <rguenther@suse.de>
21604 PR tree-optimization/84737
21605 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21606 copying restrict info.
21607 (vect_setup_realignment): Use it.
21608 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21609 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21610 the first DR to all generated stores.
21611 (vectorizable_load): Likewise for loads.
21613 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21615 PR tree-optimization/85446
21616 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21617 the integral and pointer types to have the same precision.
21619 * doc/install.texi: Document --disable-cet being the default and
21622 2018-04-18 Martin Liska <mliska@suse.cz>
21624 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21627 2018-04-18 Martin Liska <mliska@suse.cz>
21630 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21633 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21634 arguments if they are comparable.
21636 2018-04-18 Martin Liska <mliska@suse.cz>
21639 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21642 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21645 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
21648 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21649 ENDBR after calling __morestack.
21651 2018-04-18 David Malcolm <dmalcolm@redhat.com>
21654 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21655 by using gcc_base_ver to generate a gcc_driver_version, and use
21656 it when generating GCC_DRIVER_NAME.
21657 * configure: Regenerate.
21659 2018-04-18 Jakub Jelinek <jakub@redhat.com>
21662 * config.gcc: Obsolete powerpc*-*-*spe*.
21664 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21667 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21668 (stabstr_D): Change type of unum from unsigned int to
21669 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
21672 2018-04-17 Jim Wilson <jimw@sifive.com>
21675 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21676 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21677 Set arg_pointer_offset after using pretend_args_size.
21679 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21681 PR rtl-optimization/85431
21682 * dse.c (record_store): Ignore zero width stores.
21685 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
21686 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21687 __builtin_stack_restore rather than after it.
21688 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21689 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21690 argument instead of virtual_dynamic_stack_rtx.
21692 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
21694 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21696 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21697 Add note to error message to explain internal mapping of overloaded
21698 built-in function name to non-overloaded built-in function name.
21699 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21702 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21705 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21706 where the inputs overlap with the output.
21708 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21710 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21711 (=v, v) alternative and explicit "memory" attribute.
21712 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
21713 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21715 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21716 "sselog1" type instead of "sselog".
21717 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21718 "sselog". Remove explicit "memory" attribute.
21719 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21720 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21722 (vec_extract_hi_v32hi): Merge all alternatives into one, use
21723 "sselog1" type instead of "sselog". Remove explicit "memory"
21725 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21726 use "sselog1" type instead of "sselog". Remove explicit "memory"
21728 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21729 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21731 (vec_extract_hi_v64qi): Merge all alternatives into one, use
21732 "sselog1" type instead of "sselog". Remove explicit "memory"
21734 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21735 use "sselog1" type instead of "sselog". Remove explicit "memory"
21739 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21741 PR middle-end/85414
21742 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21745 2018-04-17 Martin Jambor <mjambor@suse.cz>
21748 * ipa-cp.c (create_specialized_node): Call
21749 expand_all_artificial_thunks if necessary.
21751 2018-04-17 Martin Liska <mliska@suse.cz>
21754 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21755 in message, remote space in between '_G' and '('.
21757 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21760 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21761 avx512f_vmcmp<mode>3<round_saeonly_name>,
21762 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21763 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21764 avx512f_rndscale<mode><round_saeonly_name>,
21765 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21766 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21767 Use %<iptr>2 instead of %2 for -masm=intel.
21768 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21769 avx512f_vcvttss2usi<round_saeonly_name>,
21770 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21772 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21773 avx512f_vcvttsd2usi<round_saeonly_name>,
21774 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21775 Use %q1 instead of %1 for -masm=intel.
21776 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21777 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21778 of %3 for -masm=intel.
21779 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21781 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21783 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21785 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21786 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21788 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21790 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21791 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21792 %g1 and one with %0 and %1.
21793 (avx512er_vmrcp28<mode><round_saeonly_name>,
21794 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21795 %1 for -masm=intel.
21796 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21797 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21798 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21799 of %0 and %{%4%} for -masm=intel.
21800 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21801 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21802 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21803 order of %0 and %{%5%}%{z%} for -masm=intel.
21805 2018-04-17 Jan Hubicka <jh@suse.cz>
21808 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21810 2018-04-17 Martin Liska <mliska@suse.cz>
21813 * multiple_target.c (create_dispatcher_calls): Set apostrophes
21814 for target_clone error message. Make default implementation
21815 clone to be a local declaration.
21816 (separate_attrs): Add new argument and check for an empty
21818 (expand_target_clones): Handle it.
21819 (ipa_target_clone): Make redirection just for target_clones
21822 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
21823 Tom de Vries <tom@codesourcery.com>
21825 PR middle-end/84955
21826 * omp-expand.c (expand_oacc_for): Add dummy false branch for
21827 tiled basic blocks without omp continue statements.
21829 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
21832 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21833 vec_extract expression as having side effects to make sure it gets
21836 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
21839 * config/i386/i386.c (get_builtin_code_for_version): Check
21842 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
21845 * config.gcc: Support "skylake".
21846 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21848 * config/i386/i386.c (m_SKYLAKE): Define.
21849 (processor_target_table): Add "skylake".
21850 (ix86_option_override_internal): Add "skylake".
21851 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21852 PROCESSOR_CANNONLAKE.
21853 (get_builtin_code_for_version): Fix priority for
21854 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21855 PROCESSOR_SKYLAKE-AVX512.
21856 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21857 (processor_type): Add PROCESSOR_SKYLAKE.
21859 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
21860 Jason Merrill <jason@redhat.com>
21863 * convert.c (convert_to_integer_1): Use direct recursion for
21864 enumeral types and types with a precision less than the number
21865 of bits in their mode.
21867 2018-04-16 Julia Koval <julia.koval@intel.com>
21870 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21871 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21873 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
21876 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21877 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21878 and -mno-direct-move.
21880 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
21883 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21884 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21885 Ensure negative shifts result in {0}.
21887 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
21889 PR rtl-optimization/79916
21890 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21891 regs (if any) to define how to gnerate SD moves when LRA is in
21894 2018-04-13 Jakub Jelinek <jakub@redhat.com>
21896 PR rtl-optimization/85393
21897 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21898 * except.c (expand_dw2_landing_pad_for_region): Make static.
21899 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21900 a label and unconditional jump to old_bb, rather than
21901 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21904 PR rtl-optimization/85376
21905 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21906 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21907 instead of a specific value.
21909 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21910 Bin Cheng <bin.cheng@arm.com>
21912 PR tree-optimization/82965
21913 PR tree-optimization/83991
21914 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21915 by_profile_only parameter.
21916 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21917 information if the loop was predicted to iterate too many times.
21918 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21920 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21923 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21926 2018-04-13 Martin Liska <mliska@suse.cz>
21927 Jakub Jelinek <jakub@redhat.com>
21929 PR middle-end/81657
21930 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21931 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21932 * builtins.c (expand_builtin_memory_copy_args): Use
21933 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21934 handle dest_addr == pc_rtx.
21936 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
21939 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21940 asked to not generate direct moves.
21941 (fix_trunc<mode>si2_stfiwx): Similar.
21942 (fix_trunc<mode>si2_internal): Similar.
21944 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21947 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21948 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21949 lookup if dest in some wider mode is known to be const0_rtx and
21950 if so, record permanent equivalence for it to be ZERO_EXTEND of
21951 the narrower mode destination.
21953 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21955 * lto-streamer-out.c (output_function): Revert 259346.
21956 * omp-expand.c (expand_oacc_for): Likewise.
21958 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
21960 PR rtl-optimization/85354
21961 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21962 * sel-sched.c (sel_global_init): ... here.
21964 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
21967 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21968 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21969 mode for PE-COFF targets.
21970 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21971 (i386_pe_asm_lto_end): Likewise.
21972 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21973 (TARGET_ASM_LTO_END): Likewise.
21974 * config/i386/winnt.c (saved_debug_info_level): New static variable.
21975 (i386_pe_asm_lto_start): New function.
21976 (i386_pe_asm_lto_end): Likewise.
21978 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21979 Richard Biener <rguenther@suse.de>
21981 PR middle-end/84955
21982 * lto-streamer-out.c (output_function): Fix CFG loop state before
21984 * omp-expand.c (expand_oacc_for): Handle calls to internal
21985 functions like regular functions.
21987 2018-04-12 Richard Biener <rguenther@suse.de>
21990 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21991 for the early LTO debug to properly generate references to it
21992 during DIE emission. Do not re-use that for the skeleton for
21994 (dwarf2out_early_finish): Likewise.
21996 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21999 * config/i386/sse.md
22000 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
22001 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
22002 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
22003 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
22004 and output is a reg, avoid creating invalid lowpart subreg, but
22005 instead split into a 512-bit move. Don't split if not AVX512VL,
22006 input is xmm16+ reg and output is a mem.
22007 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
22008 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
22009 xmm16+ reg and output is a mem.
22011 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22013 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
22014 also for flag_dwarf2_cfi_asm.
22016 2018-04-12 Jakub Jelinek <jakub@redhat.com>
22018 PR rtl-optimization/85342
22019 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
22020 a bool scalar var inside of the loop instead. Don't try to update
22021 recog_data.operand after failed apply_change_group.
22023 2018-04-12 Tom de Vries <tom@codesourcery.com>
22026 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
22027 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
22028 array with flexible array member as array without given dimension.
22029 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
22030 argument for undefined param to true.
22032 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
22035 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22036 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
22037 from PowerPC section.
22038 * config/rs6000/sysv4.opt (mcall-): Improve help text.
22039 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
22040 help text that is too long.
22041 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
22042 help text that is too long.
22043 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
22044 help text that is too long.
22046 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
22048 * config/alpha/alpha.md (stack_probe_internal): Rename
22049 from "probe_stack". Update all callers.
22051 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22053 PR rtl-optimization/84566
22054 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
22055 sched_macro_fuse_insns.
22057 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22060 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
22061 (compute_block_dependences): ... from here.
22063 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22065 PR tree-optimization/85331
22066 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
22067 from int to HOST_WIDE_INT.
22069 2018-04-11 Martin Jambor <mjambor@suse.cz>
22072 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
22073 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
22074 not the same as the source val.
22075 (cgraph_edge_brings_value_p): New parameter.
22076 (gather_edges_for_value): Pass destination value to
22077 cgraph_edge_brings_value_p.
22078 (perhaps_add_new_callers): Likewise.
22079 (get_info_about_necessary_edges): Likewise and exclude values brought
22080 only by self-recursive edges.
22081 (create_specialized_node): Redirect only clones of self-calling edges.
22082 (+self_recursive_pass_through_p): New function.
22083 (find_more_scalar_values_for_callers_subset): Use it.
22084 (find_aggregate_values_for_callers_subset): Likewise.
22085 (known_aggs_to_agg_replacement_list): Removed.
22086 (decide_whether_version_node): Re-calculate known constants for all
22087 remaining context clones.
22089 2018-04-11 Richard Biener <rguenther@suse.de>
22092 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
22093 from early DWARF output.
22094 (dwarf2out_early_finish): Output line info unconditionally into
22095 early DWARF and add reference to it.
22097 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22100 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
22101 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
22102 other than V2DFmode using iptr mode attribute.
22103 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
22105 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22107 PR rtl-optimization/84659
22108 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
22110 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22113 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
22115 (output_loc_list): Pass address of a dummy size variable even in the
22116 locview handling loop.
22117 (index_location_lists): Add comment on why skip_loc_list_entry can't
22120 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
22123 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
22126 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
22129 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22130 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
22131 and -mstring-compare-inline-limit.
22133 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22136 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
22137 for stack clash protection in a register whenever we need it to be in
22140 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22142 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
22143 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
22145 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22148 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
22150 (mlong-double-): Ditto.
22151 * config/rs6000/sysv4.opt (msdata=): Ditto.
22152 (mtls-size=): Ditto.
22154 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22156 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
22157 erroneous entries for
22158 "vector int vec_ldl (int, long int *)", and
22159 "vector unsigned int vec_ldl (int, unsigned long int *)".
22160 Add comments and entries for
22161 "vector bool char vec_ldl (int, bool char *)",
22162 "vector bool short vec_ldl (int, bool short *)",
22163 "vector bool int vec_ldl (int, bool int *)",
22164 "vector bool long long vec_ldl (int, bool long long *)",
22165 "vector pixel vec_ldl (int, pixel *)",
22166 "vector long long vec_ldl (int, long long *)",
22167 "vector unsigned long long vec_ldl (int, unsigned long long *)".
22168 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
22169 type tree bool_long_long_type_node and correct definition of
22170 bool_V2DI_type_node to make reference to this new type tree.
22171 (rs6000_mangle_type): Replace erroneous reference to
22172 bool_long_type_node with bool_long_long_type_node.
22173 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
22174 comments to emphasize sign distinctions for char and int types and
22175 replace RS6000_BTI_bool_long constant with
22176 RS6000_BTI_bool_long_long constant. Also add comment to restrict
22177 use of RS6000_BTI_pixel.
22178 (bool_long_type_node): Remove this macro definition.
22179 (bool_long_long_type_node): New macro definition
22181 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22183 PR rtl-optimization/85300
22184 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
22185 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
22186 simplify_unary_operation fails.
22188 2018-04-10 Martin Liska <mliska@suse.cz>
22190 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
22191 cgraph_edge and ipa_ref.
22193 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22197 * config/i386/sse.md
22198 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
22199 computation of the VEC_MERGE selector from mask.
22200 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22201 Fix decoding of the VEC_MERGE selector into mask.
22203 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22205 PR tree-optimization/85286
22206 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
22208 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22210 * final.c (final_1): Set insn_last_address as well as
22211 insn_current_address.
22213 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22216 * explow.c (emit_stack_probe): Call validize_mem on memory location
22217 before passing it to gen_probe_stack. Create address operand and
22218 legitimize it for the probe_stack_address case.
22220 2018-04-09 Jan Hubicka <jh@suse.cz>
22223 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
22224 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
22225 * tree.c (free_lang_data_in_type): Fix handling of binfos;
22227 (free_lang_data): Rebuild type inheritance graph.
22229 2018-04-09 Martin Sebor <msebor@redhat.com>
22231 * invoke.texi (-finline-small-functions): Mention other optimization
22233 (-findirect-inlining, -fpartial-inlining): Same.
22234 (-finline-functions-called-once): Same.
22235 (-freorder-blocks-and-partition): Same.
22237 2018-04-09 Jan Hubicka <jh@suse.cz>
22240 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
22241 jumps; choose last target that matches the criteria (i.e.
22242 no partition changes for non-crossing jumps).
22243 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22244 support for redirecting crossing jumps to non-crossing.
22246 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
22248 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22249 also for naked functions.
22251 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
22253 * config/arc/arc.md (add_shift): New pattern.
22254 (add_shift2): Likewise.
22255 (sub_shift): Likewise.
22256 (sub_shift_cmp0_noout): Likewise.
22257 (compare_si_ashiftsi): Likewise.
22258 (xbfu_cmp0_noout): New combine pattern.
22259 (xbfu_cmp0"): Likewise.
22260 (movsi_set_cc_insn): Place the predicable variant first.
22261 (commutative_binary_cmp0_noout): Remove clobber.
22262 (commutative_binary_cmp0): New pattern.
22263 (noncommutative_binary_cmp0): Likewise.
22264 (noncommutative_binary_cmp0_noout): Likewise.
22265 (noncommutative_binary_comparison_result_used): Removed.
22266 (rsub_cmp0): New pattern.
22267 (rsub_cmp0_noout): Likewise.
22268 (extzvsi): Changed, keep only meaningful variants.
22269 (SQH, SEZ): New iterators.
22270 (SQH_postfix): New mode attribute.
22271 (SEZ_prefix): New code attribute.
22272 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22273 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22274 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22275 of numerical value.
22276 (noncommutative_operator): Check the availability of barrel
22279 2018-04-09 Richard Biener <rguenther@suse.de>
22281 PR tree-optimization/85284
22282 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22283 Only use the niter constraining form of simple_iv when the exit
22284 is always executed.
22286 2018-04-09 Tom de Vries <tom@codesourcery.com>
22289 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22290 (define_expand "*memory_barrier"): New define_expand.
22291 (define_insn "memory_barrier"): New insn.
22293 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22295 PR rtl-optimization/80463
22296 PR rtl-optimization/83972
22297 PR rtl-optimization/83480
22299 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22300 correct producer for the insn.
22301 (tidy_control_flow): Fixup seqnos in case of debug insns.
22303 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22305 PR rtl-optimization/83913
22307 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22308 different sched-times when merging exprs.
22310 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22312 PR rtl-optimization/83962
22314 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22315 tidy_fallthru_edge and tidy_control_flow.
22317 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22319 PR rtl-optimization/83530
22321 * sel-sched.c (force_next_insn): New global variable.
22322 (remove_insn_for_debug): When force_next_insn is true, also leave only
22323 next insn in the ready list.
22324 (sel_sched_region): When the region wasn't scheduled, make another pass
22325 over it with force_next_insn set to 1.
22327 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22329 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22331 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22332 for interrupt control.
22333 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22334 functions for interrupt control.
22335 * config/nds32/nds32-intrinsic.md: Likewise.
22336 * config/nds32/nds32_intrinsic.h: Likewise.
22337 * config/nds32/nds32.h (nds32_builtins): Likewise.
22339 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22341 * config/nds32/nds32.c (nds32_init_machine_status,
22342 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22343 strict_aligned_p field.
22344 (nds32_expand_to_rtl_hook): New function.
22345 (TARGET_EXPAND_TO_RTL_HOOK): Define.
22346 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22348 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22349 Chung-Ju Wu <jasonwucj@gmail.com>
22351 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22352 * config/nds32/nds32-n7.md: New file.
22353 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22354 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22356 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22357 * config/nds32/nds32.md (pipeline_model): Add n7.
22358 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22359 * config/nds32/pipelines.md: Include n7 settings.
22361 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22362 Chung-Ju Wu <jasonwucj@gmail.com>
22364 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22365 * config/nds32/nds32-e8.md: New file.
22366 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22367 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22369 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22370 * config/nds32/nds32.md (pipeline_model): Add e8.
22371 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22372 * config/nds32/pipelines.md: Include e8 settings.
22374 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22375 Chung-Ju Wu <jasonwucj@gmail.com>
22377 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22378 * config/nds32/nds32-n8.md: New file.
22379 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22380 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22382 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22383 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22384 * config/nds32/nds32.md (pipeline_model): Add n8.
22385 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22386 * config/nds32/pipelines.md: Include n8 settings.
22388 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22389 Chung-Ju Wu <jasonwucj@gmail.com>
22391 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22392 * config/nds32/nds32-n9-2r1w.md: New file.
22393 * config/nds32/nds32-n9-3r2w.md: New file.
22394 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22395 nds32_register_ports): New or modify for cpu n9.
22396 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22398 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22399 * config/nds32/nds32-utils.c: New file.
22400 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22401 TARGET_MUL_SLOW): Define.
22402 * config/nds32/nds32.md (pipeline_model): New attribute.
22403 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22404 New options that support cpu n9.
22405 * config/nds32/pipelines.md: Include n9 settings.
22406 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22408 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22410 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22411 information if necessary.
22412 (output_cond_branch_compare_zero): Likewise.
22413 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22414 (nds32_target_alignment): Refine for alignment.
22415 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22416 (FUNCTION_BOUNDARY): Modify.
22417 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22419 * config/nds32/nds32.opt (malways-align, malign-functions): New.
22421 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22423 * config/nds32/constants.md (unspec_volatile_element): Add values for
22424 TLB operation and data prefetch.
22425 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22426 functions for TLB operation and data prefetch.
22427 * config/nds32/nds32-intrinsic.md: Likewise.
22428 * config/nds32/nds32_intrinsic.h: Likewise.
22429 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22430 (nds32_print_operand): Likewise.
22431 * config/nds32/nds32.h (nds32_builtins): Likewise.
22433 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
22434 Andrew Pinski <pinsika@gcc.gnu.org>
22436 PR middle-end/82976
22437 * match.pd: Use constant_boolean_node of correct type instead of
22438 boolean_true_node or boolean_false_node for simplifying
22439 pointer comparisons to zero.
22441 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22443 PR tree-optimization/80021
22444 * tree.c (verify_type_variant): Make error call in verify_variant_match
22445 translatable and remove final full stop.
22447 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22449 * config/nds32/constants.md (unspec_volatile_element): Add
22450 UNSPEC_VOLATILE_EH_RETURN.
22451 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22452 nds32_output_stack_pop): Support dwarf exception handling process.
22453 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22454 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22455 exception handling process.
22456 (nds32_compute_stack_frame): Likewise.
22457 (nds32_return_addr_rtx): Likewise.
22458 (nds32_initial_elimination_offset): Likewise.
22459 (nds32_expand_prologue): Likewise.
22460 (nds32_expand_epilogue): Likewise.
22461 (nds32_dynamic_chain_address): New function.
22462 * config/nds32/nds32.h (machine_function): Add fields for dwarf
22463 exception handling.
22464 (DYNAMIC_CHAIN_ADDRESS): Define.
22465 (EH_RETURN_DATA_REGNO): Define.
22466 (EH_RETURN_STACKADJ_RTX): Define.
22467 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22468 patterns for dwarf exception handling.
22470 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22472 * config/nds32/nds32.h: Clean up obsolete macros.
22474 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22476 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22477 Add enum values for particular instructions.
22478 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22479 particular intrinsic functions.
22480 * config/nds32/nds32-intrinsic.md: Likewise.
22481 * config/nds32/nds32_intrinsic.h: Likewise.
22482 * config/nds32/nds32.h (nds32_builtins): Likewise.
22483 * config/nds32/nds32.md (type): Add pbsad and pbsada.
22484 (btst, ave): New patterns for particular instructions.
22486 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22488 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22489 Add enum values for atomic load/store and memory sync.
22490 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22492 * config/nds32/nds32-intrinsic.md: Likewise.
22493 * config/nds32/nds32_intrinsic.h: Likewise.
22494 * config/nds32/nds32.h (nds32_builtins): Likewise.
22496 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22498 PR tree-optimization/85257
22499 * fold-const.c (native_encode_vector): If not all elts could fit
22500 and off is -1, return 0 rather than offset.
22501 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22502 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22503 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
22504 adjust buffer in native_interpret_expr call.
22506 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22508 * config/nds32/constants.md (unspec_volatile_element): Add cache
22509 control enum values.
22510 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22511 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22512 * config/nds32/nds32.c (nds32_cctl_names): New.
22513 (nds32_print_operand): Handle cache control register names.
22514 * config/nds32/nds32.h (nds32_builtins): New enum values.
22515 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22517 * config/nds32/nds32.md (type): Add mmu.
22518 * config/nds32/pipelines.md (simple_insn): Add mmu.
22520 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22522 * config/nds32/nds32.md (type): Remove call.
22523 * config/nds32/pipelines.md (simple_insn): Likewise.
22525 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22527 * config/nds32/constants.md (unspec_volatile_element): Add
22528 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22529 UNSPEC_VOLATILE_FMFCFG.
22530 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22531 description for fmfcfg and fmfcsr.
22532 (bdesc_1arg): Add fmtcsr.
22533 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22534 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22535 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22536 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22537 unspec_fmfcfg): New patterns.
22538 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22539 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22540 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22541 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22542 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22543 __nds32__fmfcfg): Define.
22545 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22547 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22548 intrinsic register names.
22549 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22550 intrinsic register enum values and macros.
22552 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22554 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22555 for load/store addressing form.
22556 (nds32_print_operand_address): Likewise.
22558 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22561 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22562 based on LABEL_REF. Remove useless assertion.
22563 (pic_address_needs_scratch): Fix formatting.
22564 (sparc_legitimize_pic_address): Minor tweaks.
22565 (sparc_delegitimize_address): Adjust assertion accordingly.
22566 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22567 into symbolic_operand.
22568 (movsi_high_pic_label_ref): Likewise.
22569 (movsi_lo_sum_pic_label_ref): Likewise.
22570 (movdi_pic_label_ref): Likewise.
22571 (movdi_high_pic_label_ref): Likewise.
22572 (movdi_lo_sum_pic_label_ref): Likewise.
22574 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22576 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22577 custom LIB_SPEC setup.
22579 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22580 Kito Cheng <kito.cheng@gmail.com>
22582 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22583 * config/riscv/freebsd.h: New.
22585 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22587 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22588 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22591 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22592 Kito Cheng <kito.cheng@gmail.com>
22594 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22595 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22596 * config/nds32/nds32-protos.h (nds32_output_call,
22597 nds32_output_return): Declare.
22598 * config/nds32/nds32.md: Refine all the call and return patterns.
22600 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22603 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22604 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22606 PR rtl-optimization/84872
22607 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22608 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22609 EDGE_CROSSING edge.
22611 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22613 * expr.c (copy_blkmode_to_reg): Revert 254862.
22614 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22616 2018-04-06 Richard Biener <rguenther@suse.de>
22618 PR middle-end/85244
22619 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22620 after seeing a component reference with an adjacent field. Treat
22621 refs to arrays at struct end of external decls similar to
22622 refs to unconstrained commons.
22624 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22627 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22628 look through SAVE_EXPRs with non-side-effects argument. Adjust
22630 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22633 2018-04-06 Richard Biener <rguenther@suse.de>
22635 PR middle-end/85180
22636 * alias.c (find_base_term): New wrapper around find_base_term
22637 unwinding CSELIB_VAL_PTR changes.
22638 (find_base_term): Do not restore CSELIB_VAL_PTR during the
22641 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22643 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22645 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22646 constant definitions.
22647 ("nop"): lr 0,0 -> nopr r0
22648 ("nop_lr0", "nop_lr1"): New insn definitions.
22650 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22652 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22653 NDS32_V3PUSH_AVAILABLE_P macro.
22655 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
22656 Chung-Ju Wu <jasonwucj@gmail.com>
22658 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22659 (nds32*-*-*): Add float and fpu_config into supported_defaults.
22660 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22661 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22662 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22663 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22664 * config/nds32/constraints.md: New constraints and checking for hard
22665 float configuration.
22666 * config/nds32/iterators.md: New mode iterator and attribute for hard
22667 float configuration.
22668 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22670 * config/nds32/nds32-fpu.md: New file.
22671 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22672 deal with hard float code generation.
22673 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22675 (abi_type, float_reg_number): New enum type.
22676 * config/nds32/nds32-predicates.c: New predicates for hard float.
22677 * config/nds32/nds32-protos.h: Declare functions for hard float.
22678 * config/nds32/nds32.c: Implementation for hard float configuration.
22679 * config/nds32/nds32.h: Definitions for hard float configuration.
22680 * config/nds32/nds32.md: Include hard float machine description and
22681 modify patterns for hard float configuration.
22682 * config/nds32/nds32.opt: New options for hard float configuration.
22683 * config/nds32/predicates.md: New predicates for hard float
22686 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22688 * common/config/nds32/nds32-common.c
22689 (nds32_option_optimization_table): Enable -mreleax-hint by default.
22691 2018-04-05 Jakub Jelinek <jakub@redhat.com>
22693 PR middle-end/85195
22694 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22695 CONSTRUCTOR_ELT (ctor, ...)->value.
22697 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
22700 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22702 2018-04-05 Tom de Vries <tom@codesourcery.com>
22705 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22708 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22709 Kito Cheng <kito.cheng@gmail.com>
22711 * config/nds32/constraints.md (U33): Fine-tune checking condition.
22712 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22713 * config/nds32/nds32.h (nds32_16bit_address_type): Add
22714 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22716 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22717 Kito Cheng <kito.cheng@gmail.com>
22719 * config/nds32/constraints.md (Ufe): New memory constraint.
22720 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22721 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22722 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22724 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22725 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22727 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22729 * config/nds32/nds32.md: Use optimize_size in the condition for
22730 alu-shift instructions.
22732 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22734 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22736 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22738 * config/nds32/nds32.md (negsi2): Refine pattern.
22740 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22741 Chung-Ju Wu <jasonwucj@gmail.com>
22743 * config/nds32/iterators.md (shift_rotate): New code iterator.
22744 (shift): New code attribute.
22745 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22746 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22747 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22748 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22749 bit-wise operations.
22750 (andsi3, *andsi3): Ditto.
22751 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22752 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22753 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22754 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22755 nds32_ior_operand, nds32_xor_operand): New predicates.
22757 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22759 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22760 (addsi3, subsi3): ... this.
22762 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22764 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22766 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22768 * config/nds32/nds32.md: Adjust indention.
22770 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22772 * config/nds32/nds32.md (feature): New attribute.
22774 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22776 * config/nds32/nds32.md (subtype): New attribute.
22778 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
22781 * config/arm/arm-builtins.c (arm_expand_builtin): Change
22782 expansion to perform a bitwise AND of the argument followed by a
22783 boolean negation of the result.
22785 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
22787 PR rtl-optimization/84878
22788 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22789 the basic block. Assert the use reference is not artificial and that
22790 it has an associated insn.
22792 2018-04-04 Michael Matz <matz@suse.de>
22794 * builtins.c (compute_objsize): Pass correct operand
22795 to array_at_struct_end_p.
22797 2018-04-04 Richard Biener <rguenther@suse.de>
22800 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22801 from contexts for DINFO_LEVEL_TERSE and below.
22803 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22805 * config/nds32/nds32-doubleword.md (move_<mode>): Require
22806 resiter_operand condition.
22807 * config/nds32/nds32.md (*move<mode>): Ditto.
22809 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22810 Monk Chiang <sh.chiang04@gmail.com>
22812 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22814 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22816 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22818 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22819 Kito Cheng <kito.cheng@gmail.com>
22821 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22822 nds32_cond_code_str, output_cond_branch,
22823 output_cond_branch_compare_zero, nds32_expand_cbranch,
22824 nds32_expand_cstore, nds32_expand_movcc,
22825 nds32_output_cbranchsi4_equality_zero,
22826 nds32_output_cbranchsi4_equality_reg,
22827 nds32_output_cbranchsi4_equality_reg_or_const_int,
22828 nds32_output_cbranchsi4_greater_less_zero: New functions.
22829 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22830 nds32_expand_cstore, nds32_expand_movcc,
22831 nds32_output_cbranchsi4_equality_zero,
22832 nds32_output_cbranchsi4_equality_reg,
22833 nds32_output_cbranchsi4_equality_reg_or_const_int,
22834 nds32_output_cbranchsi4_greater_less_zero): Declare.
22835 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22836 nds32_rimm11s_operand): New predicates.
22837 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22838 * config/nds32/nds32.md: Rewrite all the branch and conditional move
22841 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22843 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22844 * config/nds32/nds32.md: Ditto.
22845 * config/nds32/pipelines.md: Ditto.
22847 2018-04-04 Richard Biener <rguenther@suse.de>
22849 PR tree-optimization/85168
22850 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22851 propagating abnormals.
22853 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22855 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22857 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22858 Kito Cheng <kito.cheng@gmail.com>
22860 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22861 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22862 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22863 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22864 * config/nds32/nds32.md (sibcall_internal): New.
22865 (sibcall_register): Remove.
22866 (sibcall_immediate): Remove.
22867 (sibcall_value_internal): New.
22868 (sibcall_value_register): Remove.
22869 (sibcall_value_immediate): Remove.
22870 * config/nds32/predicates.md (nds32_general_register_operand): New.
22871 (nds32_call_address_operand): New.
22873 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22875 PR rtl-optimization/85167
22876 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22877 bb_defs if *split_p, instead preinitialize it to NULL.
22879 PR tree-optimization/85156
22880 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22881 evaluating the argument multiple times.
22883 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
22885 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22887 (_mm_cvtpd_ps): Likewise.
22888 (_mm_cvttpd_epi32): Likewise.
22889 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22890 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22891 vector, pixel, and bool following altivec.h include.
22893 2018-04-03 Martin Sebor <msebor@redhat.com>
22895 * doc/extend.texi (Common Function Attributes): Clarify.
22896 (const attribute): Likewise.
22897 (pure attribute): Likewise.
22899 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22902 * config/i386/i386.c (ix86_expand_vector_set): Use
22903 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
22905 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
22907 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22908 instructions when changing rounding bits to preserve precision bits
22909 in the x87 control word.
22911 2018-04-03 Martin Liska <mliska@suse.cz>
22913 PR tree-optimization/82491
22914 * rtl.h (strip_offset_and_add): Replace += suboffset with
22915 poly_uint64 () + suboffset.
22917 2018-03-29 Martin Liska <mliska@suse.cz>
22918 Martin Jambor <mjambor@suse.cz>
22921 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22922 param_type is not an integral or pointer type.
22924 2018-04-03 Richard Biener <rguenther@suse.de>
22926 * sese.h (recompute_all_dominators): Remove.
22928 2018-04-02 Martin Sebor <msebor@redhat.com>
22930 * doc/invoke.texi (-Wrestrict): Fix typos.
22932 2018-04-02 Jim Wilson <jimw@sifive.com>
22934 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22935 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22936 (<optab>di3, <optab>si3_extend): Likewise.
22937 (<optab>si3_mask, <optab>si3_mask_1): New.
22938 (<optab>di3_mask, <optab>di3_mask_1): New.
22939 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22940 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22941 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22943 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
22945 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22948 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
22950 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22951 (nds32_canonicalize_comparison): New function.
22953 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22954 Kito Cheng <kito.cheng@gmail.com>
22955 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22957 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22958 * config/nds32/constants.md (unspec_volatile_element): Add
22959 UNSPEC_VOLATILE_RELAX_GROUP.
22960 * config/nds32/nds32-relax-opt.c: New file.
22961 * config/nds32/nds32-predicates.c
22962 (nds32_symbol_load_store_p): New function.
22963 * config/nds32/nds32-protos.h
22964 (nds32_symbol_load_store_p): Declare function.
22965 (make_pass_nds32_relax_opt): Declare new rtl pass function.
22966 * config/nds32/nds32.c
22967 (nds32_register_pass): New function to register pass.
22968 (nds32_register_passes): New function to register passes.
22969 * config/nds32/nds32.md (relax_group): New pattern.
22970 * config/nds32/nds32.opt (mrelax-hint): New option.
22971 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22973 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
22975 * config/nds32/t-nds32: Modify files dependency.
22977 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22979 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22980 (PROFILE_HOOK): Define its implementation.
22982 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22984 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22985 type and 32-bit size.
22987 2018-04-01 Jakub Jelinek <jakub@redhat.com>
22989 PR middle-end/85090
22990 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22991 (V_128_256): New mode iterator.
22992 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22993 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22994 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22996 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22997 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22999 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
23002 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
23003 NaN inputs correctly.
23005 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
23008 * config/rs6000/vsx.md (??r): New mode attribute.
23009 (*vsx_mov<mode>_64bit): Use it.
23010 (*vsx_mov<mode>_32bit): Likewise.
23012 2018-03-30 Martin Sebor <msebor@redhat.com>
23014 PR tree-optimization/84818
23015 * builtins.c (check_access): Use warning_n.
23017 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23020 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
23022 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
23025 2018-03-30 Julia Koval <julia.koval@intel.com>
23028 * x86-tune.def (movx, partial_reg_dependency): Enable for
23031 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
23033 PR inline-asm/84985
23034 * lra-constraints.c (process_alt_operands): Move setting
23035 this_alternative_matches below.
23037 2018-03-29 Martin Liska <mliska@suse.cz>
23040 * doc/invoke.texi: Document how LTO works with debug info.
23041 Describe auto-load support of binutils. Mention 'x86-64'
23042 as valid option value of -march option.
23044 2018-03-29 Jakub Jelinek <jakub@redhat.com>
23046 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
23049 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
23050 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
23051 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
23054 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23057 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
23058 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
23059 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
23060 for RS6000_BTM_POWERPC64.
23061 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
23062 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
23063 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
23066 (DIVDEU): Likewise.
23068 2018-03-28 Carl Love <cel@us.ibm.com>
23071 2017-09-27 Carl Love <cel@us.ibm.com>
23073 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
23074 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
23075 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
23078 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23080 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
23081 instead of __vector bool.
23082 (_mm_max_pu8): Likewise.
23083 (_mm_min_pi16): Likewise.
23085 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23088 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
23089 (DIVWEUO): Likewise.
23090 (DIVDEO): Likewise.
23091 (DIVDEUO): Likewise.
23092 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
23093 DIVWEUO and DIVDEUO.
23094 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
23095 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
23096 (div_extend): Likewise.
23097 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
23099 (__builtin_divweuo): Likewise.
23100 (__builtin_divdeo): Likewise.
23101 (__builtin_divdeuo): Likewise.
23103 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23106 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
23107 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
23109 PR tree-optimization/82004
23110 * gimple-match-head.c (optimize_pow_to_exp): New function.
23111 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
23112 Don't fold to exp if optimize_pow_to_exp is false.
23114 2018-03-28 Martin Liska <mliska@suse.cz>
23117 * calls.c (initialize_argument_information): Fix trailing space.
23118 * common.opt: Fix typo and provide better explanation for
23119 -fsanitize-coverage option.
23120 * config/i386/i386.opt: Fix typo.
23122 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23123 Martin Liska <mliska@suse.cz>
23126 * gimplify.c (asan_poison_variable): Don't do the check for
23127 gimplify_omp_ctxp here.
23128 (gimplify_decl_expr): Do it here.
23129 (gimplify_target_expr): Likewise.
23131 2018-03-28 Martin Liska <mliska@suse.cz>
23134 * config/i386/i386.c (ix86_function_arg_advance): Do not call
23135 chkp_type_bounds_count if MPX is not enabled.
23137 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
23139 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
23141 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
23144 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
23145 function to create the function decl for complex long double
23146 multiply and divide for -mabi=ieeelongdouble.
23147 (init_float128_ieee): Call it.
23149 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
23152 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
23153 -fcf-protection=branch -mibt.
23154 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
23156 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23159 * config/arm/arm.c (arm_valid_symbolic_address): Handle
23160 arm_word_relocations.
23162 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
23165 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
23166 extern array declarations.
23168 2018-03-27 Richard Biener <rguenther@suse.de>
23170 PR middle-end/84067
23171 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
23172 explicit single_use checks.
23174 2018-03-27 Richard Biener <rguenther@suse.de>
23176 PR tree-optimization/85082
23177 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
23180 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23182 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
23183 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
23184 Turn on fasynchronous-unwind-tables and funwind-tables.
23186 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
23189 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
23190 (*bmi_blsr_<mode>_ccz): Ditto.
23192 2018-03-26 Tom de Vries <tom@codesourcery.com>
23194 PR tree-optimization/85063
23195 * omp-general.c (offloading_function_p): New function. Factor out
23197 * omp-offload.c (pass_omp_target_link::gate): ... here.
23198 * omp-general.h (offloading_function_p): Declare.
23199 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
23200 with attribute omp declare target for offloading functions.
23202 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
23204 PR tree-optimization/84005
23205 * tree-data-ref.h (get_base_for_alignment): Declare.
23206 * tree-data-ref.c (get_base_for_alignment_1): New function.
23207 (get_base_for_alignment): Likewise.
23208 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23209 get_base_for_alignment to find a suitable base object, instead
23210 of always using drb->base_address.
23212 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23214 PR inline-asm/85022
23215 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
23216 known size by default.
23218 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
23220 PR inline-asm/85030
23221 * lra-constraints.c (process_alt_operands): Don't match BLKmode
23222 and non BLKmode operands.
23224 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23227 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
23228 Clean up attributes.
23230 2018-03-23 Richard Biener <rguenther@suse.de>
23233 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
23234 we are going to emit early debug for LTO.
23236 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23238 PR inline-asm/85034
23239 * function.c (match_asm_constraints_1): Don't optimize if input
23240 doesn't satisfy general_operand predicate for output's mode.
23242 PR inline-asm/85022
23243 * alias.c (write_dependence_p): Don't require for x_canonicalized
23244 non-VOIDmode if x has VOIDmode.
23247 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23248 just don't try to optimize it rather than assert it never happens.
23250 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23252 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23253 macro expansions for definition of ST_INTERNAL_<mode> and
23254 LD_INTERNAL_<mode> builtins.
23255 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23257 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23259 (altivec_expand_st_builtin): Likewise.
23260 (altivec_expand_builtin): Remove calls to deleted functions.
23261 (rs6000_address_for_altivec): Delete this function.
23262 * config/rs6000/vector.md: Remove expands for
23263 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23265 2018-03-22 Sudakshina Das <sudi.das@arm.com>
23268 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23269 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23270 re-computing once computed.
23271 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23272 (arm_init_machine_status): Initialize
23273 machine->static_chain_stack_bytes.
23275 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23278 * doc/extend.texi: Add four new prototypes for vec_ld.
23279 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23280 definitions for more logical presentation.
23281 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23282 entries for V1TI variants of __builtin_altivec_ld builtin.
23283 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23284 handling of V1TI variant of LVX icode pattern.
23285 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23286 (rs6000_gimple_fold_builtin): Likewise.
23287 (altivec_init_builtins): Add code to define
23288 __builtin_altivec_lvx_v1ti function.
23290 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23292 PR inline-asm/84941
23293 * function.c (match_asm_constraints_1): Don't do the optimization
23294 if input isn't a REG, SUBREG, MEM or constant.
23296 2018-03-22 Tom de Vries <tom@codesourcery.com>
23298 PR tree-optimization/84956
23299 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23300 bb_has_abnormal_pred.
23302 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23305 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23306 DECL_INITIAL (decl) to decl at the end.
23307 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23308 adjust the comment.
23310 2018-03-21 Joseph Myers <joseph@codesourcery.com>
23312 * doc/extend.texi (__builtin_tgmath): Document when complex
23313 integer types are treated as _Complex _Float64.
23315 2018-03-21 Tom de Vries <tom@codesourcery.com>
23317 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23319 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23321 PR tree-optimization/84960
23322 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23323 if it is ENTRY block, move them into single succ of ENTRY in that case.
23325 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
23327 PR tree-optimization/84811
23328 * poly-int.h (poly_span_traits): Remove the T3 parameter and
23329 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23330 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23331 (known_subrange_p): Update accordingly. Cast each value involved
23332 in the size comparison, rather than casting the result of the
23335 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23337 PR tree-optimization/84982
23338 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23339 by flipping the least significant bit rather than all bits from
23340 bitpos to bitpos + bitsize - 1.
23342 2018-03-21 Nathan Sidwell <nathan@acm.org>
23344 * doc/extend.texi (Deprecated Features): Remove mention of
23345 long-deleted deprecations.
23347 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23350 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23351 * configure: Regenerate.
23353 2018-03-21 Tom de Vries <tom@codesourcery.com>
23355 PR tree-optimization/83126
23356 * tree-parloops.c (num_phis): New function.
23357 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23359 2018-03-21 Nathan Sidwell <nathan@acm.org>
23361 * doc/extend.texi (Deprecated Features): Update deprecated flags,
23362 mention anon-struct/union members and trailing attributes.
23364 2018-03-21 Bin Cheng <bin.cheng@arm.com>
23366 PR tree-optimization/84969
23367 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23368 builtin memset partitions if they set different rhs values.
23370 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23372 PR rtl-optimization/84989
23373 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23374 VEC_DUPLICATE with scalar result mode.
23376 2018-03-21 Martin Liska <mliska@suse.cz>
23379 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23380 not intended return statement.
23382 2018-03-21 Martin Liska <mliska@suse.cz>
23385 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23386 (chkp_find_bound_slots_1): Limit number of iterations.
23388 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
23391 * Minor grammar fixes for x86 options.
23393 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23396 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23397 holding REG_CFA_RESTORE notes, instead turn them into a USE.
23399 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
23402 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23403 (altivec_lvx_<mode>_1op): Likewise.
23404 (altivec_stvx_<mode>_2op): Likewise.
23405 (altivec_stvx_<mode>_1op): Likewise.
23406 (altivec_lvx_<VM2:mode>): New define_expand.
23407 (altivec_stvx_<VM2:mode>): Likewise.
23408 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23409 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23410 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23411 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23412 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23413 (rs6000_gen_lvx): Likewise.
23414 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23415 (altivec_expand_stv_builtin): Likewise.
23416 (altivec_expand_builtin): Likewise.
23417 * config/rs6000/vector.md: Likewise.
23419 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23422 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23425 2018-03-20 Richard Biener <rguenther@suse.de>
23428 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23429 sign-conversions as zero, fall back to standard scalar_stmt
23432 2018-03-20 Martin Liska <mliska@suse.cz>
23435 * predict.c (rebuild_frequencies): Handle case when we have
23436 PROFILE_ABSENT, but flag_guess_branch_prob is false.
23438 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23441 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23442 flag_section_anchors.
23443 * varasm.c (use_blocks_for_decl_p): Remove hack for
23444 dw2_force_const_mem.
23447 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23449 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
23450 be created, use lowpart_subreg of operands[0] rather than operands[0]
23452 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23453 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23454 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23455 and n constraint instead of aarch64_shift_imm_di and Usd.
23456 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23457 (*aarch64_<optab>_reg_minus<mode>3): ... this.
23459 2018-03-20 Sudakshina Das <sudi.das@arm.com>
23462 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23463 to favor GPR over NEON registers.
23464 (<shift>di3_neon): Likewise.
23466 2018-03-20 Tom de Vries <tom@codesourcery.com>
23469 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23470 (nvptx_process_pars): Emit bar.sync asap and alap.
23472 2018-03-20 Tom de Vries <tom@codesourcery.com>
23475 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23476 seen_label if seen_label is already set.
23478 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23481 * config/i386/i386.c (fold_builtin_cpu): For features above 31
23482 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23483 Use 1U instead of 1. Formatting fixes.
23486 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23487 instead of TREE_TYPE (s1) for the return value.
23489 2018-03-19 Jakub Jelinek <jakub@redhat.com>
23491 PR tree-optimization/84946
23492 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23493 bitsize + bitsize in poly_uint64 rather than poly_int64.
23496 * dwarf2asm.c: Include fold-const.c.
23497 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23498 of decl rather than decl itself.
23500 PR rtl-optimization/84643
23501 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23503 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
23506 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23507 calling assemble_variable.
23509 2018-03-19 Sudakshina Das <sudi.das@arm.com>
23512 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23513 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23515 2018-03-19 Jim Wilson <jimw@sifive.com>
23518 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23519 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23520 (riscv_first_stack_step): Likewise.
23521 (riscv_option_override): Use STACK_BOUNDARY instead of
23522 MIN_STACK_BOUNDARY.
23523 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23524 MIN_STACK_BOUNDARY.
23525 (BIGGEST_ALIGNMENT): Set to 128.
23526 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23527 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23530 2018-03-19 Richard Biener <rguenther@suse.de>
23532 PR tree-optimization/84933
23533 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23534 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23536 2018-03-19 Richard Biener <rguenther@suse.de>
23538 PR tree-optimization/84859
23539 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23540 (cond_if_else_store_replacement): Perform sinking operation on
23541 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23542 Generalize what a BB with a single eligible store is.
23544 2018-03-19 Richard Biener <rguenther@suse.de>
23546 PR tree-optimization/84929
23547 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23548 chrec_is_positive against non-chrec arg.
23550 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23553 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23555 2018-03-18 Martin Liska <mliska@suse.cz>
23557 PR rtl-optimization/84635
23558 * regrename.c (build_def_use): Use matches_mode only when
23561 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23563 PR tree-optimization/84913
23564 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23565 vectorize chains of COND_EXPRs.
23567 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23569 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23571 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23573 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23575 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23577 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23579 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23580 Kito Cheng <kito.cheng@gmail.com>
23582 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23583 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23584 (nds32_adjust_reg_alloc_order): New function.
23585 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23587 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23589 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23590 nds32_print_operand, nds32_print_operand_address): Use
23591 HOST_WIDE_INT_PRINT_DEC instead.
23593 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23595 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23597 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23600 * config/i386/i386.c (initial_ix86_tune_features,
23601 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23602 unsigned long long.
23603 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23604 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23605 rather than 1u << ix86_tune. Formatting fix.
23606 (ix86_option_override_internal): Change ix86_arch_mask from
23607 unsigned int to unsigned HOST_WIDE_INT, initialize to
23608 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23609 (ix86_function_specific_restore): Likewise.
23611 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23614 * postreload.c (reload_combine_recognize_pattern): Perform
23615 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23616 truncate_int_for_mode the result for the destination's mode.
23619 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23620 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23622 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23625 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23628 * lra-assigns.c (lra_split_hard_reg_for): Don't use
23629 regno_allocno_class_array and sorted_pseudos.
23630 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23631 insns where regno is used.
23633 2018-03-16 Martin Liska <mliska@suse.cz>
23636 * multiple_target.c (create_dispatcher_calls): Redirect
23637 reference in the symbol table.
23639 2018-03-16 Martin Liska <mliska@suse.cz>
23642 * multiple_target.c (create_dispatcher_calls): Redirect also
23645 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23649 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23650 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23651 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23653 2018-03-16 Julia Koval <julia.koval@intel.com>
23655 * doc/invoke.texi (Skylake Server): Add CLWB.
23656 Cannonlake): Remove CLWB.
23658 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23660 PR tree-optimization/84841
23661 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23663 (FLOAT_ONE_CONST_TYPE): Define.
23664 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23665 (sort_by_operand_rank): Put entries with higher constant_type last
23666 rather than first to match comments.
23668 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
23670 * config/nios2/nios2.md (movsi_internal): Fix thinko in
23673 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23676 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23677 check and use address of target always.
23679 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
23682 * config/i386/i386.c (indirect_thunk_needed): Update comments.
23683 (indirect_thunk_bnd_needed): Likewise.
23684 (indirect_thunks_used): Likewise.
23685 (indirect_thunks_bnd_used): Likewise.
23686 (indirect_return_needed): New.
23687 (indirect_return_bnd_needed): Likewise.
23688 (output_indirect_thunk_function): Add a bool argument for
23690 (output_indirect_thunk_function): Don't generate alias for
23691 function return thunk.
23692 (ix86_code_end): Call output_indirect_thunk_function to generate
23693 function return thunks.
23694 (ix86_output_function_return): Set indirect_return_bnd_needed
23695 and indirect_return_needed instead of indirect_thunk_bnd_needed
23696 and indirect_thunk_needed.
23698 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
23700 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23701 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23702 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23704 2018-03-15 David Malcolm <dmalcolm@redhat.com>
23705 Paul Hua <paul.hua.gm@gmail.com>
23708 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23710 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
23712 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23713 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23714 resp. SFmode cases.
23716 2018-03-15 Tamar Christina <tamar.christina@arm.com>
23719 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23720 instead of GET_MODE_SIZE when comparing Units.
23722 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
23725 * varasm.c (hash_section): Return an unchangeble hash value
23726 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23727 Return !aarch64_can_use_per_function_literal_pools_p ().
23729 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23732 * optabs.c (emit_conditional_move): Pass address of cmode's copy
23733 rather than address of cmode as last argument to prepare_cmp_insn.
23735 2018-03-15 Julia Koval <julia.koval@intel.com>
23737 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23738 F_AVX512VNNI, F_AVX512BITALG): New.
23740 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
23743 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
23744 insn for floating-point loads and stores.
23746 2018-03-14 Carl Love <cel@us.ibm.com>
23748 * config/rs6000/rs6000-c.c: Add macro definitions for
23749 ALTIVEC_BUILTIN_VEC_PERMXOR.
23750 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23751 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23752 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23753 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23755 * config/doc/extend.texi: Add prototypes for vec_permxor.
23757 2018-03-14 David Malcolm <dmalcolm@redhat.com>
23760 * diagnostic-show-locus.c (class layout_point): Convert m_line
23761 from int to linenum_type.
23762 (line_span::comparator): Use linenum "compare" function when
23763 comparing line numbers.
23764 (test_line_span): New function.
23765 (layout_range::contains_point): Convert param "row" from int to
23767 (layout_range::intersects_line_p): Likewise.
23768 (layout::will_show_line_p): Likewise.
23769 (layout::print_source_line): Likewise.
23770 (layout::should_print_annotation_line_p): Likewise.
23771 (layout::print_annotation_line): Likewise.
23772 (layout::print_leading_fixits): Likewise.
23773 (layout::annotation_line_showed_range_p): Likewise.
23774 (struct line_corrections): Likewise for field m_row.
23775 (line_corrections::line_corrections): Likewise for param "row".
23776 (layout::print_trailing_fixits): Likewise.
23777 (layout::get_state_at_point): Likewise.
23778 (layout::get_x_bound_for_row): Likewise.
23779 (layout::print_line): Likewise.
23780 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23781 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23782 * input.c (selftest::test_linenum_comparisons): New function.
23783 (selftest::input_c_tests): Call it.
23784 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23785 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23786 * selftest.h (ASSERT_GT): New macro.
23787 (ASSERT_GT_AT): New macro.
23788 (ASSERT_LT): New macro.
23789 (ASSERT_LT_AT): New macro.
23791 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
23793 PR rtl-optimization/84780
23794 * combine.c (distribute_links): Don't make a link based on pc_rtx.
23796 2018-03-14 Martin Liska <mliska@suse.cz>
23798 * tree.c (record_node_allocation_statistics): Use
23799 get_stats_node_kind.
23800 (get_stats_node_kind): New function extracted from
23801 record_node_allocation_statistics.
23802 (free_node): Use get_stats_node_kind.
23804 2018-03-14 Richard Biener <rguenther@suse.de>
23806 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23807 that the value-set of ANTIC_IN doesn't grow.
23810 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23812 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23813 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23815 2018-03-14 Julia Koval <julia.koval@intel.com>
23817 * config.gcc (icelake-client, icelake-server): New.
23819 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23820 (initial_ix86_arch_features): Ditto.
23821 (PTA_SKYLAKE): Add SGX.
23822 (PTA_ICELAKE): Remove.
23823 (PTA_ICELAKE_CLIENT): New.
23824 (PTA_ICELAKE_SERVER): New.
23825 (ix86_option_override_internal): Split up icelake on icelake client and
23827 (get_builtin_code_for_version): Ditto.
23828 (fold_builtin_cpu): Ditto.
23829 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23830 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23831 * config/i386/i386.h (processor_type): Ditto.
23832 * doc/invoke.texi: Ditto.
23834 2018-03-14 Jakub Jelinek <jakub@redhat.com>
23837 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23838 INTEGER_CST offset, add it together with bitpos / 8 and
23839 sign extend based on POINTER_SIZE.
23843 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
23846 * config/i386/constraints.md (Yc): New register constraint.
23847 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23848 Use Yc constraint for alternative 2 of operand 0. Remove
23849 preferred_for_speed attribute.
23851 2018-03-14 Richard Biener <rguenther@suse.de>
23853 PR tree-optimization/84830
23854 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23855 with the old one to avoid oscillations.
23857 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
23860 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23862 (assign_by_spills): Return a flag of reload assignment failure.
23863 Do not process the reload assignment failures. Do not spill other
23864 reload pseudos if they has the same reg class. Update n if
23866 (lra_assign): Add a return arg. Set up from the result of
23867 assign_by_spills call.
23868 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23869 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23870 usage_insns if it is not NULL.
23871 (spill_hard_reg_in_range): New function.
23872 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23873 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23874 function prototypes.
23875 (lra_assign): Change prototype.
23876 * lra.c (lra): Add code to deal with fails by splitting hard reg
23879 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
23881 * config/riscv/riscv.opt (mrelax): New option.
23882 * config/riscv/riscv.c (riscv_file_start): Emit ".option
23883 "norelax" when riscv_mrelax is disabled.
23884 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23886 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23889 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23890 reassociation for int modes.
23892 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23894 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23895 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23897 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23898 * config/aarch64/aarch64-sve.md
23899 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23900 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23901 (*extend<mode><Vwide>2): Rename to...
23902 (aarch64_sve_extend<mode><Vwide>2): ...this.
23903 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23904 renaming the old pattern to...
23905 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
23907 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23908 define_expand, renaming the old pattern to...
23909 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23910 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23911 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23912 account when deciding which SVE instruction the optab should use.
23913 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23915 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23917 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23918 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23919 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23920 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23921 (tlsdesc_small_<mode>): Turn a define_expand and use
23922 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
23923 (tlsdesc_small_advsimd_<mode>): ...this.
23924 (tlsdesc_small_sve_<mode>): New pattern.
23926 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23928 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23929 (UNSPEC_UMUL_HIGHPART): New constants.
23930 (MUL_HIGHPART): New int iteraor.
23931 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23932 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23934 (*<su>mul<mode>3_highpart): New define_insn.
23936 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23939 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23942 2018-03-13 Martin Liska <mliska@suse.cz>
23945 * (sem_item_optimizer::sem_item_optimizer): Initialize new
23947 (sem_item_optimizer::~sem_item_optimizer): Release it.
23948 (sem_item_optimizer::merge_classes): Register variable aliases.
23949 (sem_item_optimizer::fixup_pt_set): New function.
23950 (sem_item_optimizer::fixup_points_to_sets): Likewise.
23951 * ipa-icf.h: Declare new variables and functions.
23953 2018-03-13 Jakub Jelinek <jakub@redhat.com>
23955 PR middle-end/84834
23956 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23957 integer_pow2p@2 and test integer_pow2p in condition.
23958 (A < 0 ? C : 0): Similarly for @1.
23960 PR middle-end/84831
23961 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23962 characters starting at p contain '\0' character, don't look beyond
23966 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23967 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23970 * reg-stack.c (change_stack): Change update_end var from int to
23971 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23972 also call set_block_for_insn on the newly added insns and rescan.
23975 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23976 on the last operand.
23979 * tree.c (stabilize_reference_1): Return save_expr (e) for
23980 STATEMENT_LIST even if it doesn't have side-effects.
23982 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
23984 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23986 2018-03-12 Renlin Li <renlin.li@arm.com>
23988 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23989 aarch64_output_scalar_simd_mov_immediate.
23991 2018-03-12 Martin Sebor <msebor@redhat.com>
23993 PR tree-optimization/83456
23994 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23995 for perfectly overlapping calls to memcpy.
23996 (gimple_fold_builtin_memory_chk): Same.
23997 (gimple_fold_builtin_strcpy): Handle no-warning.
23998 (gimple_fold_builtin_stxcpy_chk): Same.
23999 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
24001 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
24003 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
24004 parameter. Use it for SFmode.
24005 (rs6000_function_arg_advance_1): Adjust.
24006 (rs6000_function_arg): Adjust.
24007 (rs6000_gimplify_va_arg): Pass false for that new parameter.
24009 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
24011 PR rtl-optimization/84169
24012 PR rtl-optimization/84780
24013 * combine.c (can_combine_p): Check for a 2-insn combination whether
24014 the destination register is used between the two insns, too.
24016 2018-03-12 Richard Biener <rguenther@suse.de>
24018 PR tree-optimization/84803
24019 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
24020 for refs DR analysis didn't process.
24022 2018-03-12 Richard Biener <rguenther@suse.de>
24024 PR tree-optimization/84777
24025 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
24026 force-vectorize loops ignore whether we are optimizing for size.
24028 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
24030 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
24031 (TARGET_MD_ASM_ADJUST): Define.
24033 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
24034 Kito Cheng <kito.cheng@gmail.com>
24035 Chung-Ju Wu <jasonwucj@gmail.com>
24037 * config/nds32/nds32.c (nds32_compute_stack_frame,
24038 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
24039 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
24040 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
24041 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
24042 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
24043 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
24044 * config/nds32/nds32.md (prologue, epilogue): Use macro
24045 NDS32_V3PUSH_AVAILABLE_P to do checking.
24047 2018-03-11 Jakub Jelinek <jakub@redhat.com>
24050 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
24051 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
24052 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
24053 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
24054 addition of most attributes on !orig_type_die or the attribute not
24055 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
24057 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24058 Chung-Ju Wu <jasonwucj@gmail.com>
24060 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
24061 __NDS32_VH__ macro.
24062 * config/nds32/nds32.opt (mvh): New option.
24064 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24065 Chung-Ju Wu <jasonwucj@gmail.com>
24067 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
24069 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
24070 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
24073 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24074 Chung-Ju Wu <jasonwucj@gmail.com>
24076 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
24078 * config/nds32/nds32-multiple.md (strlensi): New pattern.
24079 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
24081 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
24082 Kito Cheng <kito.cheng@gmail.com>
24083 Chung-Ju Wu <jasonwucj@gmail.com>
24085 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
24086 UNSPEC_FFMISM and UNSPEC_FLMISM.
24087 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
24088 for ffb, ffmism and flmism.
24089 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
24090 (unspec_ffmism): Ditto.
24091 (unspec_flmism): Ditto.
24092 (nds32_expand_builtin_impl): Check if string extension is available.
24093 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
24094 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
24096 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
24099 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24102 * lra-assigns.c (assign_by_spills): Return a flag of reload
24103 assignment failure. Do not process the reload assignment
24104 failures. Do not spill other reload pseudos if they has the same
24106 (lra_assign): Add a return arg. Set up from the result of
24107 assign_by_spills call.
24108 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24109 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24110 usage_insns if it is not NULL.
24111 (spill_hard_reg_in_range): New function.
24112 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24113 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24114 function prototypes.
24115 (lra_assign): Change prototype.
24116 * lra.c (lra): Add code to deal with fails by splitting hard reg
24119 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
24122 * config/i386/i386.opt: Replace Enforcment with Enforcement.
24124 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
24127 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
24128 (dw_val_node): Add val_symbolic_view.
24129 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
24130 (symview_upper_bound): New.
24131 (new_line_info_table): Initialize symviews_since_reset.
24132 (dwarf2out_source_line): Count symviews_since_reset and set
24133 symview_upper_bound.
24134 (dw_val_equal_p): Handle symview.
24135 (add_AT_symview): New.
24136 (print_dw_val): Handle symview.
24137 (attr_checksum, attr_checksum_ordered): Likewise.
24138 (same_dw_val_p, size_of_die): Likewise.
24139 (value_format, output_die): Likewise.
24140 (add_high_low_attributes): Use add_AT_symview for entry_view.
24141 (dwarf2out_finish): Reset symview_upper_bound, clear
24144 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
24147 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
24148 Add strict argument and use it.
24149 (rs6000_split_multireg_move): Update for new strict argument.
24150 (mem_operand_gpr): Disallow all non-offsettable addresses.
24151 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
24153 2018-03-09 Jakub Jelinek <jakub@redhat.com>
24156 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
24157 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
24158 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
24161 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
24162 decl, use remap_type if we want to use the type.
24164 2018-03-09 Martin Sebor <msebor@redhat.com>
24166 PR tree-optimization/84526
24167 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24169 (builtin_access::generic_overlap): Be prepared to handle non-array
24172 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
24174 PR rtl-optimization/84682
24175 * lra-constraints.c (process_address_1): Check is_address flag
24176 for address constraints.
24177 (process_alt_operands): Likewise.
24178 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
24179 preprocess_constraints.
24180 * recog.h (preprocess_constraints): Add oploc parameter.
24182 * recog.c (preprocess_constraints): Test address_operand for
24183 CT_ADDRESS constraints.
24185 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24188 * lra-assigns.c (assign_by_spills): Return a flag of reload
24189 assignment failure. Do not process the reload assignment
24190 failures. Do not spill other reload pseudos if they has the same
24192 (lra_assign): Add a return arg. Set up from the result of
24193 assign_by_spills call.
24194 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24195 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24196 usage_insns if it is not NULL.
24197 (spill_hard_reg_in_range): New function.
24198 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24199 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24200 function prototypes.
24201 (lra_assign): Change prototype.
24202 * lra.c (lra): Add code to deal with fails by splitting hard reg
24205 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24208 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
24209 Accept complain bool parameter. Only emit errors if it is true.
24210 (arm_parse_cpu_option_name): Likewise.
24211 (arm_target_thumb_only): Adjust callers of the above.
24212 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
24213 prototype to take a default true bool parameter.
24214 (arm_parse_arch_option_name): Likewise.
24216 2018-03-09 David Malcolm <dmalcolm@redhat.com>
24217 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
24221 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
24222 * configure: Regenerate.
24223 * configure.ac ("linker --version-script option"): New.
24224 ("linker soname option"): New.
24226 2018-03-09 Richard Biener <rguenther@suse.de>
24228 PR tree-optimization/84775
24229 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
24230 immediate uses of predicate stmts and mark them modified.
24233 PR tree-optimization/84178
24234 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24236 (version_loop_for_if_conversion): Delay update_ssa call.
24237 (tree_if_conversion): Delay update_ssa until after predicate
24240 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
24243 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24244 when the function accesses prior frames.
24246 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24249 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24250 gen_llsym, otherwise call maybe_gen_llsym.
24252 PR inline-asm/84742
24253 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24254 has ',' character inside of it.
24256 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24259 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24260 as clobbering CC_REGNUM.
24262 2018-03-08 Richard Biener <rguenther@suse.de>
24264 PR middle-end/84552
24265 * tree-scalar-evolution.c: Include tree-into-ssa.h.
24266 (follow_copies_to_constant): Do not follow SSA names registered
24269 2018-03-08 Richard Biener <rguenther@suse.de>
24271 PR tree-optimization/84178
24272 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24274 (version_loop_for_if_conversion): Delay update_ssa call.
24275 (tree_if_conversion): Delay update_ssa until after predicate
24278 2018-03-08 David Malcolm <dmalcolm@redhat.com>
24280 PR tree-optimization/84178
24281 * tree-if-conv.c (release_bb_predicate): Remove the
24282 the assertion that the stmts have NULL use_ops.
24283 Discard the statements, asserting that they haven't
24284 yet been added to a BB.
24286 2018-03-08 Richard Biener <rguenther@suse.de>
24288 PR tree-optimization/84746
24289 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24290 (phi_translate): Pass in destination ANTIC_OUT set.
24291 (phi_translate_1): Likewise. For a simplified result lookup
24292 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24293 (phi_translate_set): Adjust.
24294 (do_pre_regular_insertion): Likewise.
24295 (do_pre_partial_partial_insertion): Likewise.
24297 2018-03-08 Martin Liska <mliska@suse.cz>
24299 PR gcov-profile/84735
24300 * doc/gcov.texi: Document usage of profile files.
24301 * gcov-io.h: Document changes in the format.
24303 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
24307 * dwarf2out.c (struct dw_line_info_table): Update comments for
24309 (FORCE_RESET_NEXT_VIEW): New.
24310 (FORCE_RESETTING_VIEW_P): New.
24311 (RESETTING_VIEW_P): Check for -1 too.
24312 (ZERO_VIEW_P): Likewise.
24313 (new_line_info_table): Force-reset next view.
24314 (dwarf2out_begin_function): Likewise.
24315 (dwarf2out_source_line): Simplify zero_view_p initialization.
24316 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24317 view directly. Omit view when omitting .loc at line 0.
24319 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24321 PR tree-optimization/84740
24322 * tree-switch-conversion.c (process_switch): Call build_constructors
24323 only if info.phi_count is non-zero.
24325 PR tree-optimization/84739
24326 * tree-tailcall.c (find_tail_calls): Check call arguments against
24327 DECL_ARGUMENTS (current_function_decl) rather than
24328 DECL_ARGUMENTS (func) when checking for tail recursion.
24330 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24332 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24333 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24334 Volker Reichelt's entry and add entries for people that perform
24335 GCC fuzzy testing and report numerous bugs.
24337 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
24340 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24341 readonly data in sdata, if that is disabled.
24342 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24343 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24344 -mreadonly-in-sdata option.
24346 2018-03-07 Martin Sebor <msebor@redhat.com>
24348 PR tree-optimization/84468
24349 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24350 basic block when looking for nul assignment.
24352 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
24355 * except.h (output_function_exception_table): Adjust prototype.
24356 * except.c (output_function_exception_table): Remove FNNAME parameter
24357 and add SECTION parameter. Ouput one part of the table at a time.
24358 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24359 the first part of the exception table and emit unwind directives.
24360 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24361 (i386_pe_seh_cold_init): Likewise.
24362 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24363 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24364 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24365 (ix86_output_call_insn): Emit a nop in one more case for SEH.
24366 * config/i386/winnt.c: Include except.h.
24367 (struct seh_frame_state): Add reg_offset, after_prologue and
24368 in_cold_section fields.
24369 (i386_pe_seh_end_prologue): Set seh->after_prologue.
24370 (i386_pe_seh_cold_init): New function.
24371 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24372 to seh->in_cold_section.
24373 (seh_emit_push): Record the offset of the push.
24374 (seh_emit_save): Record the offet of the save.
24375 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24376 Test seh->after_prologue to disregard the epilogue.
24377 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24378 (i386_pe_end_cold_function): New function.
24380 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24383 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24384 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24387 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24389 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24390 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24392 PR middle-end/84723
24393 * multiple_target.c: Include tree-inline.h and intl.h.
24394 (expand_target_clones): Diagnose and fail if node->definition and
24395 !tree_versionable_function_p (node->decl).
24397 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
24399 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24401 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24402 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24403 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24405 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24408 * combine.c (try_combine): Use reg_or_subregno instead of handling
24409 just paradoxical SUBREGs and REGs.
24411 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
24413 * config/arc/arc.c (arc_finalize_pic): Remove function.
24414 (arc_must_save_register): We use single base PIC register, remove
24415 checks to save/restore the PIC register.
24416 (arc_expand_prologue): Likewise.
24417 * config/arc/arc-protos.h (arc_set_default_type_attributes):
24419 (arc_verify_short): Likewise.
24420 (arc_attr_type): Likewise.
24421 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24422 (walk_stores): Likewise.
24423 (arc_address_cost): Make it static.
24424 (arc_verify_short): Likewise.
24425 (branch_dest): Likewise.
24426 (arc_attr_type): Likewise.
24427 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24428 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24429 (arc_final_prescan_insn): Remove inserting the nops due to
24430 hardware hazards. It is done in reorg step.
24431 (insn_length_variant_t): Remove.
24432 (insn_length_parameters_t): Likewise.
24433 (arc_insn_length_parameters): Likewise.
24434 (arc_get_insn_variants): Likewise.
24435 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24437 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24439 PR inline-asm/84683
24440 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24443 PR tree-optimization/84687
24444 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24446 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24448 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24450 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24451 Rename to ppc_speculation_barrier.
24452 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24453 __builtin_ppc_speculation_barrier.
24455 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24458 * combine.c (combine_simplify_rtx): Don't try to simplify if
24459 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24462 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
24464 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24465 to 32 bytes when compiling for POWER9.
24467 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24470 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24471 regparm >= 3 with no arg reg available also for calls with
24472 flag_force_indirect_call. Pass decl to ix86_function_regparm.
24475 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24477 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
24479 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
24482 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24484 2018-03-05 Richard Biener <rguenther@suse.de>
24486 PR tree-optimization/84486
24487 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24488 When inserting a __builtin_assume_aligned call set the LHS
24489 SSA name alignment info accordingly.
24491 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
24493 PR tree-optimization/84114
24494 * config/aarch64/aarch64.c (aarch64_reassociation_width)
24495 Avoid reassociation of FLOAT_MODE addition.
24497 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
24499 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24500 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24501 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24502 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24503 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24504 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24505 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24507 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24508 __builtin_ia32_wbinvd): New builtins.
24509 (SPECIAL_ARGS2): New.
24510 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24511 (SPECIAL_ARGS2): New.
24512 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24513 (ix86_valid_target_attribute_inner_p): Ditto.
24514 (ix86_init_mmx_sse_builtins): Add special_args2.
24515 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24516 TARGET_WBNOINVD_P): New.
24517 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24518 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24519 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24520 * config/i386/immintrin.h (_wbinvd): New intrinsic.
24521 * config/i386/pconfigintrin.h: New file.
24522 * config/i386/wbnoinvdintrin.h: Ditto.
24523 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24525 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24527 2018-03-05 Richard Biener <rguenther@suse.de>
24529 PR tree-optimization/84670
24530 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24532 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24533 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24534 (compute_antic_aux): Only assert the number of values in ANTIC_IN
24535 doesn't grow if all successors (recursively) were visited at least
24538 2018-03-05 Richard Biener <rguenther@suse.de>
24540 PR tree-optimization/84650
24541 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24542 if executed in the loop pipeline.
24544 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24546 * doc/configfiles.texi (Configuration Files): Move info about
24547 conditionalizing $target-protos.h to...
24548 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24549 differs from $target-protos.h.
24551 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24552 Chung-Ju Wu <jasonwucj@gmail.com>
24554 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24555 * config/nds32/nds32-multiple.md (setmemsi): Define.
24556 * config/nds32/nds32-memory-manipulation.c
24557 (nds32_gen_dup_4_byte_to_word_value): New.
24558 (emit_setmem_word_loop): New.
24559 (emit_setmem_byte_loop): New.
24560 (nds32_expand_setmem_loop): New.
24561 (nds32_expand_setmem_loop_v3m): New.
24562 (nds32_expand_setmem_unroll): New.
24563 (nds32_expand_setmem): New.
24565 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24566 Chung-Ju Wu <jasonwucj@gmail.com>
24568 * config/nds32/nds32-memory-manipulation.c
24569 (nds32_emit_load_store): New.
24570 (nds32_emit_post_inc_load_store): New.
24571 (nds32_emit_mem_move): New.
24572 (nds32_emit_mem_move_block): New.
24573 (nds32_expand_movmemsi_loop_unknown_size): New.
24574 (nds32_expand_movmemsi_loop_known_size): New.
24575 (nds32_expand_movmemsi_loop): New.
24576 (nds32_expand_movmemsi_unroll): New.
24577 (nds32_expand_movmemqi): Rename ...
24578 (nds32_expand_movmemsi): ... to this.
24579 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24580 (movmemsi): ... to this.
24581 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24582 (nds32_expand_movmemsi): ... to this.
24584 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24585 Monk Chiang <sh.chiang04@gmail.com>
24586 Chung-Ju Wu <jasonwucj@gmail.com>
24588 * config/nds32/nds32-protos.h
24589 (nds32_expand_load_multiple): New arguments.
24590 (nds32_expand_store_multiple): Ditto.
24591 (nds32_valid_multiple_load_store): Rename ...
24592 (nds32_valid_multiple_load_store_p): ... to this.
24593 * config/nds32/nds32-memory-manipulation.c
24594 (nds32_expand_load_multiple): Refine implementation.
24595 (nds32_expand_store_multiple): Ditto.
24596 * config/nds32/nds32-multiple.md
24597 (load_multiple): Update nds32_expand_load_multiple interface.
24598 (store_multiple): Update nds32_expand_store_multiple interface.
24599 * config/nds32/nds32-predicates.c
24600 (nds32_valid_multiple_load_store): Rename ...
24601 (nds32_valid_multiple_load_store_p): ... to this and refine
24603 * config/nds32/predicates.md
24604 (nds32_load_multiple_and_update_address_operation): New predicate.
24605 (nds32_store_multiple_and_update_address_operation): New predicate.
24607 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24608 Chung-Ju Wu <jasonwucj@gmail.com>
24610 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24611 (combo): New attribute.
24612 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24614 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24616 * config/nds32/nds32.opt: Change -mcmodel= default value.
24618 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24619 Monk Chiang <sh.chiang04@gmail.com>
24620 Chung-Ju Wu <jasonwucj@gmail.com>
24622 * config/nds32/constants.md (unspec_element): New enum.
24623 * config/nds32/constraints.md (Umw): New constraint.
24624 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24625 * config/nds32/nds32-intrinsic.md: Likewise.
24626 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24627 (nds32_valid_smw_lwm_base_p): New.
24628 (nds32_output_smw_single_word): New.
24629 (nds32_output_lmw_single_word): New.
24630 (nds32_expand_unaligned_load): New.
24631 (nds32_expand_unaligned_store): New.
24632 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24633 (nds32_output_smw_single_word): Declare.
24634 (nds32_output_lmw_single_word): Declare.
24635 (nds32_expand_unaligned_load): Declare.
24636 (nds32_expand_unaligned_store): Declare.
24637 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24638 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24639 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24640 NDS32_BUILTIN_UASTORE_DW.
24641 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24644 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
24645 Kito Cheng <kito.cheng@gmail.com>
24646 Chung-Ju Wu <jasonwucj@gmail.com>
24648 * config/nds32/nds32-intrinsic.c
24649 (nds32_expand_builtin_null_ftype_reg): Delete.
24650 (nds32_expand_builtin_reg_ftype_imm): Ditto.
24651 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24652 (nds32_read_argument): New.
24653 (nds32_legitimize_target): Ditto.
24654 (nds32_legitimize_argument): Ditto.
24655 (nds32_check_constant_argument): Ditto.
24656 (nds32_expand_unop_builtin): Ditto.
24657 (nds32_expand_unopimm_builtin): Ditto.
24658 (nds32_expand_binop_builtin): Ditto.
24659 (nds32_builtin_decl_impl): Ditto.
24660 (builtin_description): Ditto.
24661 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24662 (nds32_init_builtins_impl): Ditto.
24663 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24664 (nds32_builtin_decl): New.
24665 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24666 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24668 2018-03-02 Jeff Law <law@redhat.com>
24670 * reorg.c (stop_search_p): Handle DEBUG_INSN.
24671 (redundant_insn, fill_simple_delay_slots): Likewise.
24672 (fill_slots_from_thread): Likewise.
24673 * resource.c (mark_referenced_resources): Likewise.
24674 (mark_set_resources, find_dead_or_set_registers): Likewise.
24676 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24678 * substring-locations.h (format_warning_va): Formatting fix for
24679 ATTRIBUTE_GCC_DIAG.
24680 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24682 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24683 * substring-locations.c: Include intl.h.
24684 (format_warning_va): Turned into small wrapper around
24685 format_warning_n_va, renamed to ...
24686 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24687 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24689 (format_warning_at_substring_n): New function.
24690 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24691 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
24692 format_warning_at_substring with just a shorter name instead of
24693 const function pointer.
24694 (fmtwarn_n): New function.
24695 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24696 appropriate, get rid of all the fmtstr temporaries, move conditionals
24697 with G_() wrapped string literals directly into fmtwarn arguments,
24698 cast dir.len to (int), formatting fixes.
24700 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
24702 * doc/invoke.texi: Remove "Cilk Plus" references.
24704 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24705 Richard Biener <rguenther@suse.de>
24708 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24709 for error or warning attributes if CALL_FROM_THUNK_P is set.
24712 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24715 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24716 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24719 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24720 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24722 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24723 instead of -1U in last predictors element's probability member.
24725 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
24728 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24729 arguments if they are comparable.
24731 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24733 PR tree-optimization/84634
24734 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24735 masks and masked_loop_p with a single loop_masks, making sure it's
24736 null for bb vectorization.
24738 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24740 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24741 (vect_analyze_data_ref_access): Use loop->safe_len rather than
24742 loop->force_vectorize to check whether there is no alias.
24744 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24747 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24749 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24751 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24752 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24753 instead of a loop around prev_real_insn.
24754 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24757 PR inline-asm/84625
24758 * config/i386/i386.c (ix86_print_operand): Use conditional
24759 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24762 2018-03-02 Richard Biener <rguenther@suse.de>
24764 PR tree-optimization/84427
24765 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24766 (bitmap_set_subtract_values): Rewrite to handle multiple
24769 (prune_clobbered_mems): Likewise.
24770 (phi_translate): Take edge instead of pred/phiblock.
24771 (phi_translate_1): Likewise.
24772 (phi_translate_set): Likewise. Insert all translated
24773 exprs for a value into the set, keeping possibly multiple
24774 expressions per value.
24775 (compute_antic_aux): Adjust for phi_translate changes.
24776 When intersecting union the expressions and prune those
24777 not in the final value set, keeping possibly multiple
24778 expressions per value. Do not use value-insertion
24779 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24780 all expressions. Add verification that the value-sets
24781 only shrink during iteration.
24782 (compute_partial_antic_aux): Adjust for the phi_translate changes.
24783 (do_pre_regular_insertion): Likewise.
24784 (do_pre_partial_partial_insertion): Likewise.
24786 2018-03-02 Richard Biener <rguenther@suse.de>
24789 * config/darwin.c (saved_debug_info_level): New static global.
24790 (darwin_asm_lto_start): Disable debug info generation for LTO out.
24791 (darwin_asm_lto_end): Restore debug info generation settings.
24793 2018-03-01 Martin Liska <mliska@suse.cz>
24796 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24797 volatile arguments.
24799 2018-03-01 Richard Biener <rguenther@suse.de>
24802 * dwarf2out.c (gen_variable_die): Properly handle late VLA
24803 type annotation with LTO when debug was disabled at compile-time.
24805 2018-03-01 Matthew Fortune <mfortune@gmail.com>
24807 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24809 (mips_final_postscan_insn): Likewise.
24811 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
24813 PR rtl-optimization/84528
24814 * alias.c (init_alias_target): Add commentary.
24815 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24816 a unique base value if the frame pointer is not eliminated
24817 to the stack pointer.
24819 2018-03-01 Tom de Vries <tom@codesourcery.com>
24821 PR rtl-optimization/83327
24822 * lra-int.h (hard_regs_spilled_into): Declare.
24823 * lra.c (hard_regs_spilled_into): Define.
24824 (init_reg_info): Init hard_regs_spilled_into.
24825 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24826 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24827 (process_bb_lives): Handle hard_regs_spilled_into.
24828 (lra_create_live_ranges_1): Before doing liveness propagation, clear
24829 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24831 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
24833 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24834 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24835 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24836 * config/rs6000/aix72.h: New file.
24838 2018-02-28 Jakub Jelinek <jakub@redhat.com>
24840 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24841 instead of warning_at with conditional singular and plural messages
24845 * stor-layout.c (update_alignment_for_field): For
24846 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24847 && !DECL_PACKED (field), do the alignment update, just use
24848 only desired_align instead of MAX (type_align, desired_align)
24850 (place_field): Don't do known_align < desired_align handling
24851 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24852 is non-NULL, instead do it after rli->prev_field handling and
24853 only if not within a bitfield word. For DECL_PACKED (field)
24854 use type_align of BITS_PER_UNIT.
24856 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
24858 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24859 superfluous parentheses and trailing spaces.
24861 2018-02-28 Richard Biener <rguenther@suse.de>
24863 PR tree-optimization/84584
24864 * graphite-scop-detection.c (scop_detection::add_scop): Discard
24865 SCoPs with fake exit edge.
24867 2018-02-28 Martin Liska <mliska@suse.cz>
24870 * timevar.c (timer::print): Fix format to properly print 100%
24873 2018-02-28 Richard Biener <rguenther@suse.de>
24875 PR middle-end/84607
24876 * genmatch.c (capture_info::walk_match): Do not mark
24877 captured expressions without operands as expr_p given
24878 they act more like predicates and should be subject to
24879 "lost tail" side-effect preserving.
24881 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
24883 PR rtl-optimization/81611
24884 * auto-inc-dec.c (attempt_change): Move dead note from
24885 mem_insn if it's the next use of regno
24886 (find_address): Take address use of reg holding
24887 non-incremented value. Add parm to limit search to the named
24889 (merge_in_block): Attempt to use a mem insn that is the next
24890 use of the original regno.
24892 2018-02-27 Martin Sebor <msebor@redhat.com>
24895 * doc/invoke.texi (-Wmissing-attributes): New option.
24896 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24898 2018-02-27 Martin Sebor <msebor@redhat.com>
24900 PR translation/84207
24901 * diagnostic-core.h (warning_n, error_n, inform_n): Change
24902 n argument to unsigned HOST_WIDE_INT.
24903 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24904 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
24905 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24906 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24908 2018-02-27 Richard Biener <rguenther@suse.de>
24910 PR tree-optimization/84512
24911 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24912 Do not use the estimate returned from record_stmt_cost for
24913 the scalar iteration cost but sum properly using add_stmt_cost.
24915 2018-02-27 Richard Biener <rguenther@suse.de>
24917 PR tree-optimization/84466
24918 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24919 Adjust last change to less strictly validate use operands.
24921 2018-02-27 Martin Liska <mliska@suse.cz>
24923 PR gcov-profile/84548
24924 * gcov.c (process_file): Allow partial overlap and consider it
24925 also as group functions.
24926 (output_lines): Properly calculate range of lines for a group.
24928 2018-02-27 Martin Liska <mliska@suse.cz>
24930 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24931 'ggc' suffixes. Change first column width.
24932 (timer::print): Fix formatting of the column.
24934 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
24936 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24937 preserve inline entry blocks for the sake of debug inline
24938 entry point markers alone.
24939 (remove_unused_locals): Suggest in comments a better place to
24940 force the preservation of inline entry blocks that are
24941 otherwise unused, but do not preserve them.
24943 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24945 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24947 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24950 * config/i386/constraints.md (Bs): Replace
24951 ix86_indirect_branch_register with
24952 TARGET_INDIRECT_BRANCH_REGISTER.
24954 * config/i386/i386.md (indirect_jump): Likewise.
24955 (tablejump): Likewise.
24956 (*sibcall_memory): Likewise.
24957 (*sibcall_value_memory): Likewise.
24958 Peepholes of indirect call and jump via memory: Likewise.
24959 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24960 (*sibcall_value_GOT_32): Likewise.
24961 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24962 (GOT_memory_operand): Likewise.
24963 (call_insn_operand): Likewise.
24964 (sibcall_insn_operand): Likewise.
24965 (GOT32_symbol_operand): Likewise.
24966 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24968 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24970 PR rtl-optimization/83496
24971 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24972 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
24973 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24974 redundant insn, if any.
24975 (relax_delay_slots): Likewise.
24976 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24978 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
24980 PR tree-optimization/83965
24981 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24982 that grouped statements are part of a reduction chain. Return
24983 true if the statement is not marked as a reduction itself but
24984 is part of a group.
24985 (vect_recog_dot_prod_pattern): Don't check whether the statement
24986 is part of a group here.
24987 (vect_recog_sad_pattern): Likewise.
24988 (vect_recog_widen_sum_pattern): Likewise.
24990 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24993 * final.c (rest_of_clean_state): Also look for calls inside sequences.
24995 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24998 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
25000 (ix86_output_indirect_function_return): New prototype.
25001 (ix86_split_simple_return_pop_internal): Likewise.
25002 * config/i386/i386.c (indirect_return_via_cx): New.
25003 (indirect_return_via_cx_bnd): Likewise.
25004 (indirect_thunk_name): Handle return va CX_REG.
25005 (output_indirect_thunk_function): Create alias for
25006 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
25007 (ix86_output_indirect_jmp): Remove the bool argument.
25008 (ix86_output_indirect_function_return): New function.
25009 (ix86_split_simple_return_pop_internal): Likewise.
25010 * config/i386/i386.md (*indirect_jump): Don't pass false
25011 to ix86_output_indirect_jmp.
25012 (*tablejump_1): Likewise.
25013 (simple_return_pop_internal): Change it to define_insn_and_split.
25014 Call ix86_split_simple_return_pop_internal to split it for
25015 -mfunction-return=.
25016 (simple_return_indirect_internal): Call
25017 ix86_output_indirect_function_return instead of
25018 ix86_output_indirect_jmp.
25020 2018-02-26 Jakub Jelinek <jakub@redhat.com>
25023 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
25024 memset and value initialization afterwards.
25026 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
25028 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
25030 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
25033 * common/config/aarch64/aarch64-common.c
25034 (aarch_option_optimization_table[]): Switch
25035 off fomit-frame-pointer
25037 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25038 Chung-Ju Wu <jasonwucj@gmail.com>
25040 * config/nds32/nds32-multiple.md (load_multiple): Disallow
25042 (store_multiple): Ditto.
25044 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25046 * config.gcc: Add --with-cpu support for nds32 target.
25047 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
25048 * config/nds32/nds32.opt: Add -mcpu= option.
25050 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
25052 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
25053 isel=yes): Warn for these deprecated options.
25055 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
25057 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
25058 ISA_2_5_MASKS_EMBEDDED.
25060 2018-02-23 Jakub Jelinek <jakub@redhat.com>
25062 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
25063 p->max as pointers rather than using iterative_hash_expr.
25065 2018-02-23 Carl Love <cel@us.ibm.com>
25067 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
25068 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
25070 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
25071 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
25072 P8V_BUILTIN_VEC_VUNSIGNED2.
25074 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
25077 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
25078 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
25080 * lra-constraints.c (curr_insn_transform): Set up
25081 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
25083 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
25084 * lra-eliminations.c (spill_pseudos): Ditto.
25085 (process_insn_for_elimination): Ditto.
25086 * lra-lives.c (reg_early_clobber_p): Use the new macros.
25087 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
25088 LRA_NON_CLOBBERED_ALT.
25090 2018-02-22 Martin Sebor <msebor@redhat.com>
25092 PR tree-optimization/84480
25093 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
25094 to maybe_diag_stxncpy_trunc. Call it.
25095 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
25096 from gimple_fold_builtin_strcpy. Print inlining stack.
25097 (handle_builtin_stxncpy): Print inlining stack.
25098 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
25100 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
25103 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
25104 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
25105 and -fcheck-pointer-bounds are used together.
25106 (indirect_thunk_prefix): New enum.
25107 (indirect_thunk_need_prefix): New function.
25108 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
25109 "_nt" instead of "_bnd" for NOTRACK prefix.
25110 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
25111 (output_indirect_thunk_function): Likewise.
25113 (ix86_code_end): Update output_indirect_thunk_function calls.
25114 (ix86_output_indirect_branch_via_reg): Replace
25115 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
25116 (ix86_output_indirect_branch_via_push): Likewise.
25117 (ix86_output_function_return): Likewise.
25118 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
25119 incompatible with -fcf-protection=branch and
25120 -fcheck-pointer-bounds.
25122 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25125 * config/aarch64/aarch64.c (aarch64_print_address_internal):
25126 Change gcc_assert call to output_operand_lossage.
25128 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25130 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
25132 2018-02-22 DJ Delorie <dj@redhat.com>
25133 Sebastian Perta <sebastian.perta@renesas.com>
25134 Oleg Endo <olegendo@gcc.gnu.org>
25136 * config/rx/rx.c (rx_rtx_costs): New function.
25137 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
25139 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
25141 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
25143 2018-02-22 Martin Liska <mliska@suse.cz>
25146 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
25147 Add "native" as a possible value.
25149 2018-02-22 Martin Liska <mliska@suse.cz>
25152 * config/i386/i386.c (ix86_option_override_internal):
25153 Add "native" as a possible value for -march and -mtune.
25155 2018-02-22 Jakub Jelinek <jakub@redhat.com>
25158 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
25159 to all type variants.
25161 PR tree-optimization/84503
25162 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
25163 width as info->bitpos + info->bitsize - start.
25164 (merged_store_group::merge_overlapping): Simplify width computation.
25165 (check_no_overlap): New function.
25166 (imm_store_chain_info::try_coalesce_bswap): Compute expected
25167 start + width and last_order of the group, fail if check_no_overlap
25169 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
25170 to group if check_no_overlap fails.
25172 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25174 * config/rs6000/altivec.md: Delete contraint arguments to
25175 define_expand, define_split, and define_peephole2, and in
25176 define_insn_and_split if always unused.
25177 * config/rs6000/darwin.md: Ditto.
25178 * config/rs6000/dfp.md: Ditto.
25179 * config/rs6000/rs6000.md: Ditto.
25180 * config/rs6000/sync.md: Ditto.
25181 * config/rs6000/vector.md: Ditto.
25182 * config/rs6000/vsx.md: Ditto.
25184 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25186 * config/rs6000/altivec.md: Write output control strings as braced
25187 blocks instead of double-quoted strings.
25188 * config/rs6000/darwin.md: Ditto.
25189 * config/rs6000/rs6000.md: Ditto.
25190 * config/rs6000/vector.md: Ditto.
25191 * config/rs6000/vsx.md: Ditto.
25193 2018-02-21 Jason Merrill <jason@redhat.com>
25195 PR c++/84314 - ICE with templates and fastcall attribute.
25196 * attribs.c (build_type_attribute_qual_variant): Remove assert.
25198 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25200 * ipa-cp.c (determine_versionability): Fix comment typos.
25202 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25205 * ipa-cp.c (determine_versionability): Do not version functions caling
25208 2018-02-21 Martin Liska <mliska@suse.cz>
25211 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
25212 Add "native" as a possible value.
25213 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
25214 the macro when native cpu detection is available.
25216 2018-02-21 Martin Liska <mliska@suse.cz>
25219 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
25220 Add "native" as a possible value.
25221 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
25222 when native cpu detection is available.
25224 2018-02-21 Jakub Jelinek <jakub@redhat.com>
25225 Martin Sebor <msebor@redhat.com>
25227 PR tree-optimization/84478
25228 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
25230 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
25231 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
25232 support which is conservatively correct, for 2 only stay conservative
25233 for maxlen. Formatting and comment capitalization fixes. Add STRICT
25234 argument to the 2 argument get_range_strlen, adjust 6 arg
25235 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
25237 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
25238 (gimple_fold_builtin_strlen): Pass true as last argument to
25241 2018-02-20 Martin Sebor <msebor@redhat.com>
25243 PR middle-end/84095
25244 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25245 (builtin_memref::set_base_and_offset): Same. Handle inner references.
25246 (builtin_memref::builtin_memref): Factor out parts into
25247 set_base_and_offset and call it.
25249 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25251 PR middle-end/84406
25252 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25253 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25254 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
25255 search at the associated MODE_INT.
25257 2018-02-20 Jeff Law <law@redhat.com>
25259 PR middle-end/82123
25260 PR tree-optimization/81592
25261 PR middle-end/79257
25262 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25263 for range data rather than using global data.
25264 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25265 range data rather than using global data.
25266 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25267 pass it to children as needed.
25268 (struct directive::fmtresult): Similarly.
25269 (struct directive::set_width): Similarly.
25270 (struct directive::set_precision): Similarly.
25271 (format_integer, format_directive, parse_directive): Similarly.
25272 (format_none): Accept unnamed vr_values parameter.
25273 (format_percent, format_floating, format_character): Similarly.
25274 (format_string, format_plain): Similarly.
25275 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25276 the EVRP range analyzer for range data rather than using global data.
25277 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25278 gimple-ssa-evrp-analyze.h
25279 (class sprintf_dom_walker): Add after_dom_children member function.
25280 Add evrp_range_analyzer member.
25281 (sprintf_dom_walker::before_dom_children): Call into the EVRP
25282 range analyzer as needed.
25283 (sprintf_dom_walker::after_dom_children): New member function.
25284 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25286 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25287 (evrp_range_analyzer::pop_to_marker): Likewise.
25289 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25291 PR tree-optimization/84419
25292 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25293 with the required type if its current type is compatible but
25296 2018-02-20 Jakub Jelinek <jakub@redhat.com>
25298 PR middle-end/82004
25299 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25300 after vectorization.
25302 2018-02-20 Martin Liska <mliska@suse.cz>
25305 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25306 possible values if we don't have a hint.
25308 2018-02-20 Martin Liska <mliska@suse.cz>
25312 * final.c (shorten_branches): Build align_tab array with one
25314 * opts.c (finish_options): Add alignment option limit check.
25315 (MAX_CODE_ALIGN): Likewise.
25316 (MAX_CODE_ALIGN_VALUE): Likewise.
25317 * doc/invoke.texi: Document maximum allowed option value for
25318 all -falign-* options.
25320 2018-02-19 Jakub Jelinek <jakub@redhat.com>
25323 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25324 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25325 * var-tracking.c (emit_note_insn_var_location): Remove all references
25326 to NOTE_INSN_CALL_ARG_LOCATION.
25327 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25328 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25329 Use copy_rtx_if_shared.
25330 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25331 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25332 (dwarf2out_var_location): Remove handling of
25333 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25335 * final.c (final_scan_insn): Remove all references to
25336 NOTE_INSN_CALL_ARG_LOCATION.
25337 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
25338 before dumping final insns.
25339 * except.c (emit_note_eh_region_end): Remove all references to
25340 NOTE_INSN_CALL_ARG_LOCATION.
25341 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25342 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25343 * config/arc/arc.c (hwloop_optimize): Likewise.
25344 * config/arm/arm.c (create_fix_barrier): Likewise.
25345 * config/s390/s390.c (s390_chunkify_start): Likewise.
25346 * config/sh/sh.c (find_barrier): Likewise.
25347 * config/i386/i386.c (rest_of_insert_endbranch,
25348 ix86_seh_fixup_eh_fallthru): Likewise.
25349 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25350 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25351 * config/frv/frv.c (frv_function_prologue): Likewise.
25352 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
25354 (note_outside_basic_block_p): Remove all references to
25355 NOTE_INSN_CALL_ARG_LOCATION.
25356 * gengtype.c (adjust_field_rtx_def): Likewise.
25357 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25359 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25360 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25363 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25366 PR tree-optimization/84452
25367 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25368 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25371 2018-02-19 Martin Liska <mliska@suse.cz>
25374 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25376 2018-02-19 Martin Liska <mliska@suse.cz>
25377 Richard Sandiford <richard.sandiford@linaro.org>
25379 PR tree-optimization/82491
25380 * gimple-fold.c (get_base_constructor): Make earlier bail out
25383 2018-02-19 Carl Love <cel@us.ibm.com>
25385 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25386 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25388 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25389 P8V_BUILTIN_VEC_NEG.
25391 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
25393 * config/rl78/rl78.md (movdf): New define expand.
25395 2018-02-19 Martin Liska <mliska@suse.cz>
25398 * doc/invoke.texi: Fix typo.
25399 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25401 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
25403 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25404 handle rs6000_single_float and rs6000_double_float specially for
25407 2018-02-16 Jeff Law <law@redhat.com>
25409 * config/rx/rx.c (add_pop_cfi_notes): New function.;
25410 (pop_regs): Use it.
25412 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25415 * ipa-inline.c (inline_small_functions): Fix a typo.
25417 2018-02-16 Nathan Sidwell <nathan@acm.org>
25419 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25421 2018-02-16 Carl Love <cel@us.ibm.com>
25423 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25424 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25425 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25426 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25427 expansion to P8V_BUILTIN_VEC_FLOAT2.
25429 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
25431 PR rtl-optimization/70023
25432 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25433 src_regno into account.
25435 2018-02-16 Carl Love <cel@us.ibm.com>
25437 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25438 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25439 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25440 * config/rs6000/rs6000.c: Remove case statements for
25441 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25442 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25443 and P9V_BUILTIN_VEC_VINSERT4B.
25444 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25445 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25446 * config/rs6000/vsx.md:
25447 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25450 2018-02-16 Carl Love <cel@us.ibm.com>
25452 * config/rs6000/altivec.h: Add builtin names vec_extract4b
25454 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25456 * config/rs6000/rs6000-c.c: Add the definitions for
25457 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25458 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25459 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25460 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
25461 definition for insert4b and define insn *insert3b_internal.
25462 * doc/extend.texi: Add documentation for vec_extract4b.
25464 2018-02-16 Nathan Sidwell <nathan@acm.org>
25466 * doc/extend.texi (Backwards Compatibility): Mention friend
25467 injection. Note for-scope is deprecated.
25468 * doc/invoke.texi (-ffriend-injection): Deprecate.
25470 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
25472 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25473 that moved to I2, also allow destinations that are a paradoxical
25474 subreg (instead of a normal reg).
25476 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
25479 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25482 2018-02-16 Richard Biener <rguenther@suse.de>
25484 PR tree-optimization/84037
25485 PR tree-optimization/84016
25487 * config/i386/i386.c (ix86_builtin_vectorization_cost):
25488 Adjust vec_construct for the fact we need additional higher latency
25489 128bit inserts for AVX256 and AVX512 vector builds.
25490 (ix86_add_stmt_cost): Scale vector construction cost for
25493 2018-02-16 Richard Biener <rguenther@suse.de>
25495 PR tree-optimization/84417
25496 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25497 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25498 (non_rewritable_lvalue_p): Likewise, use poly-ints.
25500 2018-02-16 Martin Liska <mliska@suse.cz>
25503 * internal-fn.def (ASAN_CHECK): Set proper flags.
25504 (ASAN_MARK): Likewise.
25506 2018-02-16 Julia Koval <julia.koval@intel.com>
25508 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25509 from PTA_CANNONLAKE.
25511 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25514 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25515 Use ++iter rather than iter++ for std::list iterators.
25516 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
25517 defer deleting them until all nodes in the forest are processed. Do
25518 free even leaf nodes. Change to_process into auto_vec.
25521 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25522 * vec.h (vec_default_construct): Use memset instead of placement new
25523 if BROKEN_VALUE_INITIALIZATION is defined.
25524 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25525 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25528 PR rtl-optimization/83723
25529 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25530 * lra.c (lra_substitute_pseudo): Likewise. If true, use
25531 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
25533 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25535 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25537 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
25539 PR rtl-optimization/81443
25540 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25541 from inner REGs to paradoxical SUBREGs.
25543 2018-02-16 Richard Biener <rguenther@suse.de>
25545 PR tree-optimization/84399
25546 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25547 For operands we can analyze at their definition make sure we can
25548 analyze them at each use as well.
25550 2018-02-16 Richard Biener <rguenther@suse.de>
25552 PR tree-optimization/84190
25553 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25554 volatile accesses if the decl isn't volatile.
25556 2018-02-15 Jason Merrill <jason@redhat.com>
25558 PR c++/84314 - ICE with templates and fastcall attribute.
25559 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25560 TYPE_CANONICAL on an existing type.
25562 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25564 PR tree-optimization/84383
25565 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25566 dstoff nor call operand_equal_p if dstbase is NULL.
25568 PR tree-optimization/84334
25569 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25570 also a CONSTANT_CLASS_P, punt.
25572 2018-02-14 Jim Wilson <jimw@sifive.com>
25574 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25575 first SMALL_OPERAND check. New local min_second_step. Move assert
25576 to where locals are set. Add TARGET_RVC support.
25577 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25579 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25581 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25583 2018-02-14 Martin Sebor <msebor@redhat.com>
25585 PR tree-optimization/83698
25586 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25587 arrays constrain the offset range to their bounds.
25588 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25589 (builtin_access::overlap): Avoid setting the size of overlap if it's
25591 (maybe_diag_overlap): Also consider arrays when deciding what values
25592 of offsets to include in diagnostics.
25594 2018-02-14 Martin Sebor <msebor@redhat.com>
25597 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25598 that correspond to the kind of a declaration.
25600 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25603 * config/pa/pa.md: Load address of PIC label using the linkage table
25604 if the label is nonlocal.
25606 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25608 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25609 warning message if user requests -maltivec=be.
25610 * doc/invoke.texi: Document deprecation of -maltivec=be.
25612 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25615 * config/rs6000/rs6000-c.c: Update definitions for
25616 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25617 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25619 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25622 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25623 add _get_ssp intrinsics. Remove argument from
25624 __builtin_ia32_rdssp[d|q].
25625 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25626 * config/i386/i386-builtin.def: Remove argument from
25627 __builtin_ia32_rdssp[d|q].
25628 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25629 ix86_expand_special_args_builtin for _rdssp[d|q].
25630 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25631 Clear register before usage.
25632 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25633 Add documentation for new _get_ssp and _inc_ssp intrinsics.
25635 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
25637 PR tree-optimization/84357
25638 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25639 operand 1 of an ARRAY_REF too.
25641 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
25644 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25645 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25647 (set_of_reg): New struct.
25648 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25649 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25650 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25652 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25653 Split into bitclr, bitset, bitinvert patterns if appropriate.
25654 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25655 use rx_fuse_in_memory_bitop.
25656 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25657 to named insn, correct maximum insn length.
25659 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
25662 * machmode.def: Define a complex mode for PARTIAL_INT.
25663 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25665 * doc/rtl.texi: Document CSPImode.
25666 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25668 (msp430_hard_regno_nregs_with_padding): Likewise.
25670 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
25673 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25675 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
25677 PR rtl-optimization/84169
25678 * combine.c (try_combine): New variable split_i2i3. Set it to true if
25679 we generated a parallel as new i3 and we split that to new i2 and i3
25680 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
25681 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
25682 those to i2, not i1. Partially rewrite this scan code.
25684 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25687 * stor-layout.c (place_field): For variable length fields, adjust
25688 offset_align afterwards not just based on the field's alignment,
25689 but also on the size.
25691 PR middle-end/84309
25692 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25693 of exps and logs in the use_exp2 case.
25695 2018-02-13 Jeff Law <law@redhat.com>
25697 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25698 entry for "vector".
25700 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25703 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
25707 * common.opt (gas-loc-support, gas-locview-support): New.
25708 (ginline-points, ginternal-reset-location-views): New.
25709 * doc/invoke.texi: Document them. Use @itemx where intended.
25710 (gvariable-location-views): Adjust.
25711 * target.def (reset_location_view): New.
25712 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25713 (TARGET_RESET_LOCATION_VIEW): New.
25714 * doc/tm.texi: Rebuilt.
25715 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25716 (dwarf2out_default_as_locview_support): New.
25717 (output_asm_line_debug_info): Use option variables.
25718 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25719 (output_loc_list): Likewise.
25720 (add_high_low_attributes): Check option variables.
25721 Don't output entry view attribute in strict mode.
25722 (gen_inlined_subroutine_die): Check option variables.
25723 (dwarf2out_inline_entry): Likewise.
25724 (init_sections_and_labels): Likewise.
25725 (dwarf2out_early_finish): Likewise.
25726 (maybe_reset_location_view): New, from...
25727 (dwarf2out_var_location): ... here. Call it.
25728 * debug.h (dwarf2out_default_as_loc_support): Declare.
25729 (dwarf2out_default_as_locview_support): Declare.
25730 * hooks.c (hook_int_rtx_insn_0): New.
25731 * hooks.h (hook_int_rtx_insn_0): Declare.
25732 * toplev.c (process_options): Take -gas-loc-support and
25733 -gas-locview-support from dwarf2out. Enable
25734 -gvariable-location-views by default only with locview
25735 assembler support. Enable -ginternal-reset-location-views by
25736 default only if the target defines the corresponding hook.
25737 Enable -ginline-points by default if location views are
25738 enabled; force it disabled if statement frontiers are
25740 * tree-inline.c (expand_call_inline): Check option variables.
25741 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25743 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
25745 PR tree-optimization/84321
25746 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25747 handling. Also check whether the anti-range contains any values
25748 that satisfy the mask; switch to a VR_RANGE if not.
25750 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
25753 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25755 2018-02-13 Martin Jambor <mjambor@suse.cz>
25758 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25759 of call statements, also set location of a load to a temporary.
25761 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
25763 * config/rl78/rl78.c (add_vector_labels): New function.
25764 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25765 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25766 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25767 which checks that no arguments are passed.
25768 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25769 * doc/extend.texi: Documentation for the new attribute.
25771 2018-02-13 Andreas Schwab <schwab@suse.de>
25773 * config/riscv/linux.h (CPP_SPEC): Define.
25775 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25778 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25779 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25780 OPTION_MASK_ISA_AES as first argument to def_builtin_const
25781 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25782 instead of OPTION_MASK_ISA_PCLMUL as first argument to
25783 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25784 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25785 temporarily for AES and PCLMUL builtins.
25787 PR tree-optimization/84339
25788 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25789 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25792 PR middle-end/84309
25793 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25794 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25795 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25797 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25799 * omp-simd-clone.h: New file.
25800 * omp-simd-clone.c: Include omp-simd-clone.h.
25801 (expand_simd_clones): No longer static.
25802 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25803 cgraph.h and omp-simd-clone.h.
25804 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25805 (vect_recog_widen_shift_pattern): Formatting fix.
25806 (vect_pattern_recog_1): Don't check optab for calls.
25809 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25810 operands[2] into a REG before using gen_lowpart on it.
25812 2018-02-12 Jeff Law <law@redhat.com>
25815 * config/sh/sh.c (find_barrier): Consider a sibling call
25818 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25819 successfully back substituting a reg.
25821 2018-02-12 Richard Biener <rguenther@suse.de>
25823 PR tree-optimization/84037
25824 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25825 parameter, move visited init to caller.
25826 (vect_slp_analyze_operations): Separate cost from validity
25827 check, initialize visited once for all instances.
25828 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25830 * tree-vect-stmts.c (vect_model_simple_cost): Make early
25832 (vect_model_promotion_demotion_cost): Likewise.
25833 (vectorizable_bswap): Guard cost modeling with !slp_node
25834 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25836 (vectorizable_call): Likewise.
25837 (vectorizable_conversion): Likewise.
25838 (vectorizable_assignment): Likewise.
25839 (vectorizable_shift): Likewise.
25840 (vectorizable_operation): Likewise.
25841 (vectorizable_store): Likewise.
25842 (vectorizable_load): Likewise.
25843 (vectorizable_condition): Likewise.
25844 (vectorizable_comparison): Likewise.
25846 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
25849 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25850 (ASAN_MARK): Fix fnspec to account for return value, change pointer
25851 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25853 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25855 PR middle-end/83665
25856 * params.def (inline-min-speedup): Increase from 8 to 15.
25857 (max-inline-insns-auto): Decrease from 40 to 30.
25858 * ipa-split.c (consider_split): Add some buffer for function to
25859 be considered inlining candidate.
25860 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25863 2018-02-12 Richard Biener <rguenther@suse.de>
25865 PR tree-optimization/84037
25866 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25867 matched stmts if we cannot swap the non-matched ones.
25869 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25871 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25872 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25873 _mm_maskz_scalef_round_ss): New intrinsics.
25874 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25875 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25876 __builtin_ia32_scalefss_round): Remove.
25877 (__builtin_ia32_scalefsd_mask_round,
25878 __builtin_ia32_scalefss_mask_round): New intrinsics.
25879 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25880 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25881 ((match_operand:VF_128 2 "<round_nimm_predicate>"
25882 "<round_constraint>")): Changed to ...
25883 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25884 "<round_scalar_constraint>")): ... this.
25885 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25886 %0, %1, %2<round_op3>}"): Changed to ...
25887 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25888 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25889 %2<round_scalar_mask_op3>}"): ... this.
25890 * config/i386/subst.md (round_scalar_nimm_predicate): New.
25892 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25894 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25895 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25896 (_mm_maskz_sqrt_round_ss): New intrinsics.
25897 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25898 (__builtin_ia32_sqrtsd_mask_round)
25899 (__builtin_ia32_sqrtss_mask_round): New builtins.
25900 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25901 (__builtin_ia32_sqrtss_round): Remove.
25902 (__builtin_ia32_sqrtsd_mask_round)
25903 (__builtin_ia32_sqrtss_mask_round): New builtins.
25904 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25905 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25906 ((match_operand:VF_128 1 "vector_operand"
25907 "xBm,<round_constraint>")): Changed to ...
25908 ((match_operand:VF_128 1 "vector_operand"
25909 "xBm,<round_scalar_constraint>")): ... this.
25910 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25911 %0, %2, %<iptr>1<round_op3>}): Changed to ...
25912 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25913 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25914 %<iptr>1<round_scalar_mask_op3>}): ... this.
25915 ((set_attr "prefix" "<round_prefix>")): Changed to ...
25916 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25918 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
25921 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25922 Cast vec_cmpeq result to correct type.
25923 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25924 Cast vec_cmpgt result to correct type.
25926 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
25928 * final.c (final_scan_insn_1): Renamed from...
25929 (final_scan_insn): ... this. New wrapper, to recover
25930 seen from the outermost call in recursive ones.
25931 * config/sparc/sparc.c (output_return): Drop seen from call.
25932 (output_sibcall): Likewise.
25933 * config/visium/visium.c (output_branch): Likewise.
25935 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
25937 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25940 2018-02-10 Alan Modra <amodra@gmail.com>
25943 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25944 Specify LR as an input.
25946 2018-02-10 Jakub Jelinek <jakub@redhat.com>
25949 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25950 remove_member_access_dummy_vars): New functions.
25951 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25952 lower_omp_1, execute_lower_omp): Use them.
25954 PR rtl-optimization/84308
25955 * shrink-wrap.c (spread_components): Release todo vector.
25957 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
25959 PR rtl-optimization/57193
25960 * ira-color.c (struct allocno_color_data): Add member
25961 conflict_allocno_hard_prefs.
25962 (update_conflict_allocno_hard_prefs): New.
25963 (bucket_allocno_compare_func): Add a preference based on
25964 conflict_allocno_hard_prefs.
25965 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25966 (color_allocnos): Remove a dead code. Initiate
25967 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
25969 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25972 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25973 constraint from =wa to wa. Avoid a subreg on the output operand,
25974 instead use a pseudo and subreg it in a move.
25975 (p9_xxbrd_<mode>): Changed to ...
25976 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25977 (p9_xxbrd_v2df): New expander.
25978 (p9_xxbrw_<mode>): Changed to ...
25979 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25980 (p9_xxbrw_v4sf): New expander.
25982 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25984 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25986 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
25989 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25990 multiply in 32-bit mode.
25991 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25992 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25995 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25997 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25998 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25999 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
26000 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
26002 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
26005 * dwarf2out.c (is_trivial_indirect_ref): New function.
26006 (dwarf2out_late_global_decl): Do not generate a location
26007 attribute for variables that have a non-trivial DECL_VALUE_EXPR
26008 and that are not defined in the current unit.
26010 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
26012 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
26013 instead of a libcall for UNORDERED.
26015 2018-02-09 Tamar Christina <tamar.christina@arm.com>
26018 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
26019 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
26021 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26024 * config/s390/s390.c (s390_set_current_function): Invoke
26025 s390_indirect_branch_settings also if fndecl didn't change.
26027 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26029 * config/rs6000/rs6000.md (blockage): Set length to zero.
26031 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
26033 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
26035 2018-02-09 Jakub Jelinek <jakub@redhat.com>
26038 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
26039 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
26043 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
26044 PARALLEL incoming that failed vt_get_decl_and_offset check.
26046 PR middle-end/84237
26047 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
26048 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
26050 (get_variable_section): For decls in named .bss* sections pass true as
26051 second argument to bss_initializer_p.
26053 2018-02-09 Marek Polacek <polacek@redhat.com>
26054 Jakub Jelinek <jakub@redhat.com>
26057 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
26058 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
26059 Sync some changes from cxx_fold_indirect_ref.
26061 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26063 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
26065 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
26066 (BLOCK_INLINE_ENTRY_LABEL): New.
26067 (dwarf2out_var_location): Disregard inline entry markers.
26068 (inline_entry_data): New struct.
26069 (inline_entry_data_hasher): New hashtable type.
26070 (inline_entry_data_hasher::hash): New.
26071 (inline_entry_data_hasher::equal): New.
26072 (inline_entry_data_table): New variable.
26073 (add_high_low_attributes): Add DW_AT_entry_pc and
26074 DW_AT_GNU_entry_view attributes if a pending entry is found
26075 in inline_entry_data_table. Add old entry_pc attribute only
26076 if debug nonbinding markers are disabled.
26077 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
26078 markers are enabled.
26079 (block_within_block_p, dwarf2out_inline_entry): New.
26080 (dwarf2out_finish): Check that no entries remained in
26081 inline_entry_data_table.
26082 * final.c (reemit_insn_block_notes): Handle inline entry notes.
26083 (final_scan_insn, notice_source_line): Likewise.
26084 (rest_of_clean_state): Skip inline entry markers.
26085 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
26087 * gimple.c (gimple_build_debug_inline_entry): New.
26088 * gimple.h (enum gimple_debug_subcode): Add
26089 GIMPLE_DEBUG_INLINE_ENTRY.
26090 (gimple_build_debug_inline_entry): Declare.
26091 (gimple_debug_inline_entry_p): New.
26092 (gimple_debug_nonbind_marker_p): Adjust.
26093 * insn-notes.def (INLINE_ENTRY): New.
26094 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
26095 inline entry marker notes.
26096 (print_insn): Likewise.
26097 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
26098 (INSN_DEBUG_MARKER_KIND): Likewise.
26099 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
26100 * tree-inline.c (expand_call_inline): Build and insert
26101 debug_inline_entry stmt.
26102 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
26103 inline entry blocks early, if nonbind markers are enabled.
26104 (dump_scope_block): Dump fragment info.
26105 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
26106 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
26107 (gimple_build_debug_inline_entry): New.
26108 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
26109 Enable/disable inline entry points too.
26110 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
26111 (DEBUG_INSN): Describe inline entry markers.
26113 * common.opt (gvariable-location-views): New.
26114 (gvariable-location-views=incompat5): New.
26115 * config.in: Rebuilt.
26116 * configure: Rebuilt.
26117 * configure.ac: Test assembler for view support.
26118 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
26119 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
26120 * dwarf2out.c (var_loc_view): New typedef.
26121 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
26122 (dwarf2out_locviews_in_attribute): New.
26123 (dwarf2out_locviews_in_loclist): New.
26124 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
26125 (enum dw_line_info_opcode): Add LI_adv_address.
26126 (struct dw_line_info_table): Add view.
26127 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
26128 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
26129 (zero_view_p): New variable.
26130 (ZERO_VIEW_P): New macro.
26131 (output_asm_line_debug_info): New.
26132 (struct var_loc_node): Add view.
26133 (add_AT_view_list, AT_loc_list): New.
26134 (add_var_loc_to_decl): Add view param. Test it against last.
26135 (new_loc_list): Add view params. Record them.
26136 (AT_loc_list_ptr): Handle loc and view lists.
26137 (view_list_to_loc_list_val_node): New.
26138 (print_dw_val): Handle dw_val_class_view_list.
26139 (size_of_die): Likewise.
26140 (value_format): Likewise.
26141 (loc_list_has_views): New.
26142 (gen_llsym): Set vl_symbol too.
26143 (maybe_gen_llsym, skip_loc_list_entry): New.
26144 (dwarf2out_maybe_output_loclist_view_pair): New.
26145 (output_loc_list): Output view list or entries too.
26146 (output_view_list_offset): New.
26147 (output_die): Handle dw_val_class_view_list.
26148 (output_dwarf_version): New.
26149 (output_compilation_unit_header): Use it.
26150 (output_skeleton_debug_sections): Likewise.
26151 (output_rnglists, output_line_info): Likewise.
26152 (output_pubnames, output_aranges): Update version comments.
26153 (output_one_line_info_table): Output view numbers in asm comments.
26154 (dw_loc_list): Determine current endview, pass it to new_loc_list.
26155 Call maybe_gen_llsym.
26156 (loc_list_from_tree_1): Adjust.
26157 (add_AT_location_description): Create view list attribute if
26158 needed, check it's absent otherwise.
26159 (convert_cfa_to_fb_loc_list): Adjust.
26160 (maybe_emit_file): Call output_asm_line_debug_info for test.
26161 (dwarf2out_var_location): Reset views as needed. Precompute
26162 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
26163 attribute. Set view.
26164 (new_line_info_table): Reset next view.
26165 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
26166 (dwarf2out_source_line): Likewise. Output view resets and labels to
26167 the assembler, or select appropriate line info opcodes.
26168 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
26169 (optimize_string_length): Catch it. Adjust.
26170 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
26171 dw_val_class_view_list, and remove it if no longer needed.
26172 (hash_loc_list): Hash view numbers.
26173 (loc_list_hasher::equal): Compare them.
26174 (optimize_location_lists): Check whether a view list symbol is
26175 needed, and whether the locview attribute is present, and
26176 whether they match. Remove the locview attribute if no longer
26178 (index_location_lists): Call skip_loc_list_entry for test.
26179 (dwarf2out_finish): Call output_asm_line_debug_info for test.
26180 Use output_dwarf_version.
26181 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
26182 (struct dw_val_node): Add val_view_list.
26183 * final.c (SEEN_NEXT_VIEW): New.
26184 (set_next_view_needed): New.
26185 (clear_next_view_needed): New.
26186 (maybe_output_next_view): New.
26187 (final_start_function): Rename to...
26188 (final_start_function_1): ... this. Take pointer to FIRST,
26189 add SEEN parameter. Emit param bindings in the initial view.
26190 (final_start_function): Reintroduce SEEN-less interface.
26191 (final): Rename to...
26192 (final_1): ... this. Take SEEN parameter. Output final pending
26193 next view at the end.
26194 (final): Reintroduce seen-less interface.
26195 (final_scan_insn): Output pending next view before switching
26196 sections or ending a block. Mark the next view as needed when
26197 outputting variable locations. Notify debug backend of section
26198 changes, and of location view changes.
26199 (rest_of_handle_final): Adjust.
26200 * toplev.c (process_options): Autodetect value for debug variable
26201 location views option. Warn on incompat5 without -gdwarf-5.
26202 * doc/invoke.texi (gvariable-location-views): New.
26203 (gvariable-location-views=incompat5): New.
26204 (gno-variable-location-views): New.
26206 2018-02-08 David Malcolm <dmalcolm@redhat.com>
26208 PR tree-optimization/84136
26209 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
26210 that the result of find_edge is non-NULL.
26212 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26215 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
26216 storing integer register in SImode. Fix cost of 256 and 512
26217 byte aligned SSE register store.
26219 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26221 * config/i386/i386.c (ix86_multiplication_cost): Fix
26222 multiplication cost for TARGET_AVX512DQ.
26224 2018-02-08 Marek Polacek <polacek@redhat.com>
26226 PR tree-optimization/84238
26227 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
26230 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26232 PR tree-optimization/84265
26233 * tree-vect-stmts.c (vectorizable_store): Don't treat
26234 VMAT_CONTIGUOUS accesses as grouped.
26235 (vectorizable_load): Likewise.
26237 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26239 PR tree-optimization/81635
26240 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
26241 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26242 (test_round_for_mask): New functions.
26243 (wide_int_cc_tests): Call test_round_for_mask.
26244 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26245 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26246 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26247 range returned by get_range_info.
26249 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26252 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26253 * symtab.c: Include builtins.h
26254 (symtab_node::output_to_lto_symbol_table_p): Move here
26255 from lto-streamer-out.c:output_symbol_p.
26256 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26257 (output_symbol_p): Move all logic to symtab.c
26258 (produce_symtab): Update.
26260 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26262 * config/s390/s390-opts.h (enum indirect_branch): Define.
26263 * config/s390/s390-protos.h (s390_return_addr_from_memory)
26264 (s390_indirect_branch_via_thunk)
26265 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26266 (enum s390_indirect_branch_type): Define.
26267 * config/s390/s390.c (struct s390_frame_layout, struct
26268 machine_function): Remove.
26269 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26270 (indirect_branch_table_label_no, indirect_branch_table_name):
26272 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26273 (enum s390_indirect_branch_option): Define.
26274 (s390_return_addr_from_memory): New function.
26275 (s390_handle_string_attribute): New function.
26276 (s390_attribute_table): Add new attribute handler.
26277 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26278 (s390_indirect_branch_via_thunk): New function.
26279 (s390_indirect_branch_via_inline_thunk): New function.
26280 (s390_function_ok_for_sibcall): When jumping via thunk disallow
26281 sibling call optimization for non z10 compiles.
26282 (s390_emit_call): Force indirect branch target to be a single
26283 register. Add r1 clobber for non-z10 compiles.
26284 (s390_emit_epilogue): Emit return jump via return_use expander.
26285 (s390_reorg): Handle JUMP_INSNs as execute targets.
26286 (s390_option_override_internal): Perform validity checks for the
26287 new command line options.
26288 (s390_indirect_branch_attrvalue): New function.
26289 (s390_indirect_branch_settings): New function.
26290 (s390_set_current_function): Invoke s390_indirect_branch_settings.
26291 (s390_output_indirect_thunk_function): New function.
26292 (s390_code_end): Implement target hook.
26293 (s390_case_values_threshold): Implement target hook.
26294 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26296 * config/s390/s390.h (struct s390_frame_layout)
26297 (struct machine_function): Move here from s390.c.
26298 (TARGET_INDIRECT_BRANCH_NOBP_RET)
26299 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26300 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26301 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26302 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26303 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26304 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26305 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26306 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26307 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26308 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26309 (mnemonic attribute): Add values which aren't recognized
26311 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26312 pattern for branch conversion. Fix mnemonic attribute.
26313 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26314 indirect branch via thunk if requested.
26315 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26316 ("*indirect_jump"): Disable for branch conversion using out of
26318 ("indirect_jump_via_thunk<mode>_z10")
26319 ("indirect_jump_via_thunk<mode>")
26320 ("indirect_jump_via_inlinethunk<mode>_z10")
26321 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26322 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26323 ("casesi_jump_via_inlinethunk<mode>_z10")
26324 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26325 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26326 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26327 ("*indirect2_jump"): Disable for branch conversion.
26328 ("casesi_jump"): Turn into expander and expand patterns for branch
26330 ("return_use"): New expander.
26331 ("*return"): Emit return via thunk and rename it to ...
26332 ("*return<mode>"): ... this one.
26333 * config/s390/s390.opt: Add new options and and enum for the
26336 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26338 * lra-constraints.c (match_reload): Unconditionally use
26339 gen_lowpart_SUBREG, rather than selecting between that
26340 and equivalent gen_rtx_SUBREG code.
26342 2018-02-08 Richard Biener <rguenther@suse.de>
26344 PR tree-optimization/84233
26345 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26346 changed flag instead of boguously re-using phi_inserted.
26348 2018-02-08 Martin Jambor <mjambor@suse.cz>
26350 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26351 static local variables.
26353 2018-02-08 Richard Biener <rguenther@suse.de>
26355 PR tree-optimization/84278
26356 * tree-vect-stmts.c (vectorizable_store): When looking for
26357 smaller vector types to perform grouped strided loads/stores
26358 make sure the mode is supported by the target.
26359 (vectorizable_load): Likewise.
26361 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26363 * config/aarch64/aarch64.c (aarch64_components_for_bb):
26364 Increase LDP/STP opportunities by adding adjacent callee-saves.
26366 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26368 PR rtl-optimization/84068
26369 PR rtl-optimization/83459
26370 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26372 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
26374 PR tree-optimization/84224
26375 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26376 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26377 non-zero arguments.
26379 2018-02-07 Iain Sandoe <iain@codesourcery.com>
26382 * config/rs6000/altivec.md (*restore_world): Remove LR use.
26383 * config/rs6000/predicates.md (restore_world_operation): Adjust op
26384 count, remove one USE.
26386 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
26388 * doc/install.texi (Configuration): Document the
26389 --with-long-double-format={ibm,ieee} PowerPC configuration
26393 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26394 Convert from define_expand to be define_insn_and_split. Rework
26395 float/double/_Float128 conversions to QI/HI/SImode to work with
26396 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
26397 conversions to QI/HImode types did a store and then a load to
26398 truncate the value. For conversions to VSX registers, don't split
26399 the insn, instead emit the code directly. Use the code iterator
26400 any_fix to combine signed and unsigned conversions.
26401 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26402 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26403 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26404 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26405 (fix_<mode>di2_hw): Likewise.
26406 (fixuns_<mode>di2_hw): Likewise.
26407 (fix_<mode>si2_hw): Likewise.
26408 (fixuns_<mode>si2_hw): Likewise.
26409 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26410 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26411 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26412 fix<uns>_trunc<SFDF:mode>si2_p8.
26413 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26414 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26415 (fix<uns>_<mode>_mem): Likewise.
26416 (fctiw<u>z_<mode>_mem): Likewise.
26417 (fix<uns>_<mode>_mem): Likewise.
26418 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26419 the register allocator from doing a direct move to the GPRs to do
26420 a store, and instead use the ISA 3.0 store byte/half-word from
26421 vector register instruction. For IEEE 128-bit floating point,
26422 also optimize stores of 32-bit ints.
26423 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26425 2018-02-07 Alan Hayward <alan.hayward@arm.com>
26427 * genextract.c (push_pathstr_operand): New function to support
26429 (walk_rtx): Call push_pathstr_operand.
26430 (print_path): Support [a-zA-Z].
26432 2018-02-07 Richard Biener <rguenther@suse.de>
26434 PR tree-optimization/84037
26435 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26436 (cse_and_gimplify_to_preheader): Declare.
26437 (vect_get_place_in_interleaving_chain): Likewise.
26438 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26440 (_loop_vec_info::~_loop_vec_info): Delete it.
26441 (cse_and_gimplify_to_preheader): New function.
26442 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26443 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26444 (vectorizable_load): Likewise. For grouped stores always base
26445 the IV on the first element.
26446 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26447 condition before gimplifying.
26449 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26451 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26452 *DIV_EXPR and *MOD_EXPR.
26454 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
26457 * config/i386/i386.c (ix86_option_override_internal): Mask out
26458 the CF_SET bit when checking -fcf-protection.
26460 2018-02-07 Tom de Vries <tom@codesourcery.com>
26463 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26466 2018-02-07 Richard Biener <rguenther@suse.de>
26468 PR tree-optimization/84204
26469 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26472 PR tree-optimization/84205
26473 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26474 special-case isl_ast_op_zdiv_r.
26476 PR tree-optimization/84223
26477 * graphite-scop-detection.c (gather_bbs::before_dom_children):
26478 Only add conditions from within the region.
26479 (gather_bbs::after_dom_children): Adjust.
26481 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
26484 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26485 * config/avr/avr.md: Only post-reload split REG-REG moves if
26486 either register is GENERAL_REG_P.
26488 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26490 PR tree-optimization/84235
26491 * tree-ssa-scopedtables.c
26492 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26493 if the subtraction is performed in floating point type where NaNs are
26494 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26495 build 1. Formatting fix.
26497 2018-02-06 Jakub Jelinek <jakub@redhat.com>
26500 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26501 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26502 and skip it regardless of bb boundaries. Use CALL_P macro,
26503 don't test INSN_P (insn) together with CALL_P or JUMP_P check
26504 unnecessarily, formatting fix.
26506 2018-02-06 Michael Collison <michael.collison@arm.com>
26508 * config/arm/thumb2.md:
26509 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26510 (*thumb_mov_notscc): Ditto.
26512 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
26515 * config/rs6000/rs6000.md (su code attribute): Use "u" for
26516 unsigned_fix, not "s".
26518 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26520 * configure.ac (gcc_fn_eh_frame_ro): New function.
26521 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26522 correct .eh_frame permissions.
26523 * configure: Regenerate.
26525 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
26527 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26528 irrelevant options.
26530 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26532 * config/rs6000/rs6000.c (rs6000_option_override_internal):
26533 Display warning message for -mno-speculate-indirect-jumps.
26535 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
26537 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26539 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26541 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26543 PR tree-optimization/84225
26544 * tree-eh.c (find_trapping_overflow): Only call
26545 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26547 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26550 * config/i386/i386.c: Reimplement the check of possible options
26551 -mibt/-mshstk conbination. Change error messages.
26552 * doc/invoke.texi: Fix a typo: remove extra '='.
26554 2018-02-06 Marek Polacek <polacek@redhat.com>
26556 PR tree-optimization/84228
26557 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26559 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26562 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26563 emitted arch directives.
26564 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26565 __ARM_FEATURE_COPROC before changing architectures.
26567 2018-02-06 Richard Biener <rguenther@suse.de>
26569 * config/i386/i386.c (print_reg): Fix typo.
26570 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26572 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26574 * configure: Regenerate.
26576 2018-02-05 Martin Sebor <msebor@redhat.com>
26578 PR tree-optimization/83369
26579 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26582 2018-02-05 Martin Liska <mliska@suse.cz>
26584 * doc/invoke.texi: Cherry-pick upstream r323995.
26586 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26588 * ira.c (ira_init_register_move_cost): Adjust comment.
26590 2018-02-05 Martin Liska <mliska@suse.cz>
26592 PR gcov-profile/84137
26593 * doc/gcov.texi: Fix typo in documentation.
26595 2018-02-05 Martin Liska <mliska@suse.cz>
26597 PR gcov-profile/83879
26598 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26599 using dlopen functionality.
26601 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26603 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26604 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26605 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26606 _mm_maskz_range_round_ss): New intrinsics.
26607 (__builtin_ia32_rangesd128_round)
26608 (__builtin_ia32_rangess128_round): Remove.
26609 (__builtin_ia32_rangesd128_mask_round,
26610 __builtin_ia32_rangess128_mask_round): New builtins.
26611 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26612 __builtin_ia32_rangess128_round): Remove.
26613 (__builtin_ia32_rangesd128_mask_round,
26614 __builtin_ia32_rangess128_mask_round): New builtins.
26615 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26616 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26617 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26618 "<round_saeonly_constraint>")): Changed to ...
26619 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26620 "<round_saeonly_scalar_constraint>")): ... this.
26621 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26622 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26623 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26624 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26625 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26627 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
26629 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26631 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26632 Remove all values except native, 8540 and 8548.
26634 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
26636 * config/i386/i386.c (ix86_output_function_return): Pass
26637 INVALID_REGNUM, instead of -1, as invalid register number to
26638 indirect_thunk_name and output_indirect_thunk.
26640 2018-02-02 Julia Koval <julia.koval@intel.com>
26642 * config.gcc: Add -march=icelake.
26643 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26644 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26645 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26646 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26647 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26648 (processor_target_table): Add icelake.
26649 (ix86_option_override_internal): Handle new PTAs.
26650 (get_builtin_code_for_version): Handle icelake.
26651 (M_INTEL_COREI7_ICELAKE): New.
26652 (fold_builtin_cpu): Handle icelake.
26653 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26654 * doc/invoke.texi: Add -march=icelake.
26656 2018-02-02 Julia Koval <julia.koval@intel.com>
26658 * config/i386/i386.c (ix86_option_override_internal): Change flags type
26659 to wide_int_bitmask.
26660 * wide-int-bitmask.h: New.
26662 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26665 * config/i386/i386.md: Replace Pmode with word_mode in
26666 builtin_setjmp_setup and builtin_longjmp to support x32.
26668 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
26672 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26674 (rs6000_supported_cpu_names): New static variable.
26675 (linux_cpu_translation_table): Likewise.
26676 (elf_platform) <cpu>: Define new static variable and use it.
26677 Translate kernel AT_PLATFORM name to canonical name if needed.
26678 Error if platform name is unknown.
26680 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
26683 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26685 2018-02-01 Jeff Law <law@redhat.com>
26688 * config/i386/i386.c (release_scratch_register_on_entry): Add new
26689 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
26690 the scratch if RELEASE_VIA_POP is false.
26691 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26692 If we have to save a temporary register, decrement SIZE appropriately.
26693 Pass new arguments to release_scratch_register_on_entry.
26694 (ix86_adjust_stack_and_probe): Likewise.
26695 (ix86_emit_probe_stack_range): Pass new arguments to
26696 release_scratch_register_on_entry.
26698 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
26700 PR rtl-optimization/84157
26701 * combine.c (change_zero_ext): Use REG_P predicate in
26702 front of HARD_REGISTER_P predicate.
26704 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
26706 * config/avr/avr.c (avr_option_override): Move disabling of
26707 -fdelete-null-pointer-checks to...
26708 * common/config/avr/avr-common.c (avr_option_optimization_table):
26711 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26713 PR tree-optimization/81635
26714 * tree-data-ref.c (split_constant_offset_1): For types that
26715 wrap on overflow, try to use range info to prove that wrapping
26718 2018-02-01 Renlin Li <renlin.li@arm.com>
26721 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26722 TAILCALL_ADDR_REGS.
26723 (aarch64_register_move_cost): Likewise.
26724 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26725 TAILCALL_ADDR_REGS.
26726 (REG_CLASS_NAMES): Likewise.
26727 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26728 TAILCALL_ADDR_REGS. Remove IP registers.
26729 * config/aarch64/aarch64.md (Ucs): Update register constraint.
26731 2018-02-01 Richard Biener <rguenther@suse.de>
26733 * domwalk.h (dom_walker::dom_walker): Add additional constructor
26734 for specifying RPO order and allow NULL for that.
26735 * domwalk.c (dom_walker::dom_walker): Likewise.
26736 (dom_walker::walk): Handle NULL RPO order.
26737 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26739 (rewrite_update_dom_walker): Likewise.
26740 (mark_def_dom_walker): Likewise.
26742 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26744 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26745 (aarch64_maybe_expand_sve_subreg_move): Declare.
26746 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26747 * config/aarch64/predicates.md (aarch64_any_register_operand): New
26749 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26750 that are semantically a reverse operation.
26751 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26752 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26753 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26755 (aarch64_can_change_mode_class): For big-endian, forbid changes
26756 between two SVE modes if they have different element sizes.
26758 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26760 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26761 the TImode handling for big-endian targets.
26763 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26765 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26766 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
26768 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26769 Remove BSWAP handing for big-endian targets and use the form of
26770 LD1RQ appropariate for the mode.
26772 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26774 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26775 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26776 duplicated element.
26778 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26781 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26782 check for operands that need to go through aarch64_sve_reload_be.
26784 2018-02-01 Jakub Jelinek <jakub@redhat.com>
26786 PR tree-optimization/81661
26787 PR tree-optimization/84117
26788 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26789 * tree-eh.c: Include gimplify.h.
26790 (find_trapping_overflow, replace_trapping_overflow,
26791 rewrite_to_non_trapping_overflow): New functions.
26792 * tree-vect-loop.c: Include tree-eh.h.
26793 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26794 * tree-data-ref.c: Include tree-eh.h.
26795 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26797 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
26799 PR rtl-optimization/84123
26800 * combine.c (change_zero_ext): Check if hard register satisfies
26801 can_change_dest_mode before calling gen_lowpart_SUBREG.
26803 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
26806 * ira.c (ira_init_register_move_cost): Remove assert.
26808 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26810 PR rtl-optimization/84071
26811 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26812 * doc/tm.texi: Regenerate.
26814 2018-01-31 Richard Biener <rguenther@suse.de>
26816 PR tree-optimization/84132
26817 * tree-data-ref.c (analyze_miv_subscript): Properly
26818 check whether evolution_function_is_affine_multivariate_p
26819 before calling gcd_of_steps_may_divide_p.
26821 2018-01-31 Julia Koval <julia.koval@intel.com>
26824 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26825 * config/i386/i386.md (rdpid_rex64) New.
26826 (rdpid): Make 32bit only.
26828 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
26831 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26832 an IDENTIFIER_NODE for FUNCTION_TYPE's.
26834 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26837 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26839 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26841 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26843 PR rtl-optimization/84071
26844 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26845 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26847 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26849 * config/arc/arc.c (arc_handle_aux_attribute): New function.
26850 (arc_attribute_table): Add 'aux' attribute.
26851 (arc_in_small_data_p): Consider aux like variables.
26852 (arc_is_aux_reg_p): New function.
26853 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26854 (arc_get_aux_arg): New function.
26855 (prepare_move_operands): Handle aux-register access.
26856 (arc_handle_aux_attribute): New function.
26857 * doc/extend.texi (ARC Variable attributes): Add subsection.
26859 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26861 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26862 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26863 (arc_attribute_table): Add 'uncached' attribute.
26864 (arc_print_operand): Print '.di' flag for uncached memory
26866 (arc_in_small_data_p): Do not consider for small data the uncached
26868 (arc_is_uncached_mem_p): New function.
26869 * config/arc/predicates.md (compact_store_memory_operand): Check
26870 for uncached memory accesses.
26871 (nonvol_nonimm_operand): Likewise.
26872 * doc/extend.texi (ARC Type Attribute): New subsection.
26874 2018-01-31 Jakub Jelinek <jakub@redhat.com>
26877 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26878 falign-loops=): Add Optimization flag.
26880 2018-01-30 Jeff Law <law@redhat.com>
26883 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26884 INT_REGISTERS_SAVED. Check it prior to calling
26885 get_scratch_register_on_entry.
26886 (ix86_adjust_stack_and_probe): Similarly.
26887 (ix86_emit_probe_stack_range): Similarly.
26888 (ix86_expand_prologue): Corresponding changes.
26890 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26893 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26894 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26896 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
26899 * lra-constraints.c (curr_insn_transform): Process AND in the
26902 2018-01-30 Jakub Jelinek <jakub@redhat.com>
26904 PR rtl-optimization/83986
26905 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26906 dependence against last_pending_memory_flush in addition to
26907 pending_jump_insns.
26909 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
26911 PR tree-optimization/81611
26912 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26915 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26918 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26921 2018-01-30 Richard Biener <rguenther@suse.de>
26922 Jakub Jelinek <jakub@redhat.com>
26924 PR tree-optimization/84111
26925 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26926 inner loops added during recursion, as they don't have up-to-date
26929 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26932 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26933 (can_inline_edge_by_limits_p): ... here.
26934 (can_early_inline_edge_p, check_callers,
26935 update_caller_keys, update_callee_keys, recursive_inlining,
26936 add_new_edges_to_heap, speculation_useful_p,
26937 inline_small_functions,
26938 inline_small_functions, flatten_function,
26939 inline_to_all_callers_1): Update.
26941 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26943 * profile-count.c (profile_count::combine_with_ipa_count): Handle
26946 2018-01-30 Richard Biener <rguenther@suse.de>
26948 PR tree-optimization/83008
26949 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26950 invariant and constant vector uses in stmts when they need
26951 more than one stmt.
26953 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26956 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26957 * configure: Regenerate.
26959 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26961 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26963 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26964 Use gen_rtx_REG rather than gen_lowpart.
26966 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26968 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26969 rather than 0 when creating partial subregs.
26971 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26973 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26976 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
26979 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26980 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26981 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26982 flags. This restores the settings used before the 2017-07-24.
26983 Turning off pre increment/decrement/modify allows IVOPTS to
26984 optimize DF/SF loops where the index is an int.
26986 2018-01-29 Richard Biener <rguenther@suse.de>
26987 Kelvin Nilsen <kelvin@gcc.gnu.org>
26990 * tree-vect-stmts.c (vectorizable_call): Don't call
26991 targetm.vectorize_builtin_md_vectorized_function if callee is
26994 2018-01-22 Carl Love <cel@us.ibm.com>
26996 * doc/extend.tex: Fix typo in second arg in
26997 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26999 2018-01-29 Richard Biener <rguenther@suse.de>
27001 PR tree-optimization/84086
27002 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
27003 (flush_ssaname_freelist): When SSA names were released reset
27004 the SCEV hash table.
27006 2018-01-29 Richard Biener <rguenther@suse.de>
27008 PR tree-optimization/84057
27009 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
27010 removed paths when removing edges.
27012 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
27014 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
27015 -mfunction-return=@var{choice}.
27017 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
27019 PR diagnostic/84034
27020 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
27021 Handle CR like TAB.
27022 (layout::print_source_line): Likewise.
27023 (test_get_line_width_without_trailing_whitespace): Add test cases.
27025 2018-01-27 Jakub Jelinek <jakub@redhat.com>
27027 PR middle-end/84040
27028 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
27031 2018-01-26 Jim Wilson <jimw@sifive.com>
27033 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
27035 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
27038 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27040 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
27041 and CMP + SUB-immediate -> SUBS.
27043 2018-01-26 Martin Sebor <msebor@redhat.com>
27045 PR tree-optimization/83896
27046 * tree-ssa-strlen.c (get_string_len): Rename...
27047 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
27048 Avoid assuming length is constant.
27049 (handle_char_store): Use HOST_WIDE_INT for string length.
27051 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
27054 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
27055 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
27057 2018-01-26 Richard Biener <rguenther@suse.de>
27059 PR rtl-optimization/84003
27060 * dse.c (record_store): Only record redundant stores when
27061 the earlier store aliases at least all accesses the later one does.
27063 2018-01-26 Jakub Jelinek <jakub@redhat.com>
27065 PR rtl-optimization/83985
27066 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
27067 REG_CFA_RESTORE insns.
27068 (delete_unmarked_insns): Don't ignore separate shrink wrapping
27069 REG_CFA_RESTORE insns here.
27072 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
27073 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
27075 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27077 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
27078 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
27079 (arc_init): Likewise.
27080 (arc_override_options): Likewise.
27081 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
27083 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
27085 * config/arc/arc.h (TARGET_DBNZ): Define.
27086 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
27087 properly set the tune attribute.
27088 (dbnz): Use TARGET_DBNZ guard.
27089 * config/arc/arc.opt (mtune): Add core3 option.
27091 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27093 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
27094 recognize new pic like addresses.
27095 (arc_delegitimize_address): Clean up.
27097 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27099 * config/arc/arc-arches.def: Option mrf16 valid for all
27101 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
27102 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
27103 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
27104 * config/arc/arc-tables.opt: Regenerate.
27105 * config/arc/arc.c (arc_conditional_register_usage): Handle
27106 reduced register file case.
27107 (arc_file_start): Set must have build attributes.
27108 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
27109 mrf16 option value.
27110 * config/arc/arc.opt (mrf16): Add new option.
27111 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
27112 * config/arc/genmultilib.awk: Handle new mrf16 option.
27113 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
27114 * config/arc/t-multilib: Regenerate.
27115 * doc/invoke.texi (ARC Options): Document mrf16 option.
27117 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27119 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
27120 * config/arc/arc.c (arc_handle_secure_attribute): New function.
27121 (arc_attribute_table): Add 'secure_call' attribute.
27122 (arc_print_operand): Print secure call operand.
27123 (arc_function_ok_for_sibcall): Don't optimize tail calls when
27125 (arc_is_secure_call_p): New function. * config/arc/arc.md
27126 (call_i): Add support for sjli instruction.
27127 (call_value_i): Likewise.
27128 * config/arc/constraints.md (Csc): New constraint.
27130 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27131 John Eric Martin <John.Martin@emmicro-us.com>
27133 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
27134 * config/arc/arc.c (_arc_jli_section): New struct.
27135 (arc_jli_section): New type.
27136 (rc_jli_sections): New static variable.
27137 (arc_handle_jli_attribute): New function.
27138 (arc_attribute_table): Add jli_always and jli_fixed attribute.
27139 (arc_file_end): New function.
27140 (TARGET_ASM_FILE_END): Define.
27141 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
27142 (arc_add_jli_section): New function.
27143 (jli_call_scan): Likewise.
27144 (arc_reorg): Call jli_call_scan.
27145 (arc_output_addsi): Remove 'S' from printing asm operand.
27146 (arc_is_jli_call_p): New function.
27147 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
27149 (movhi_insn): Likewise.
27150 (movsi_insn): Likewise.
27151 (movsi_set_cc_insn): Likewise.
27152 (loadqi_update): Likewise.
27153 (load_zeroextendqisi_update): Likewise.
27154 (load_signextendqisi_update): Likewise.
27155 (loadhi_update): Likewise.
27156 (load_zeroextendhisi_update): Likewise.
27157 (load_signextendhisi_update): Likewise.
27158 (loadsi_update): Likewise.
27159 (loadsf_update): Likewise.
27160 (movsicc_insn): Likewise.
27161 (bset_insn): Likewise.
27162 (bxor_insn): Likewise.
27163 (bclr_insn): Likewise.
27164 (bmsk_insn): Likewise.
27165 (bicsi3_insn): Likewise.
27166 (cmpsi_cc_c_insn): Likewise.
27167 (movsi_ne): Likewise.
27168 (movsi_cond_exec): Likewise.
27169 (clrsbsi2): Likewise.
27170 (norm_f): Likewise.
27180 (call_i): Remove 'S' asm letter, add jli instruction.
27181 (call_value_i): Likewise.
27182 * config/arc/arc.op (mjli-always): New option.
27183 * config/arc/constraints.md (Cji): New constraint.
27184 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
27186 (subsf3_fpx): Likewise.
27187 (mulsf3_fpx): Likewise.
27188 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
27190 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
27191 function attrbutes.
27192 * doc/invoke.texi (ARC): Document mjli-always option.
27194 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
27196 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
27197 avoid addition with 0 and use incw and decw where possible.
27199 2018-01-26 Richard Biener <rguenther@suse.de>
27201 PR tree-optimization/81082
27202 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27203 association if it requires casting to unsigned.
27204 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27205 from fold_plusminus_mult_expr to catch important cases late when
27206 range info is available.
27208 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27210 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
27211 * configure.ac (hidden_linkonce): New test.
27212 * configure: Regenerate.
27213 * config.in: Regenerate.
27215 2018-01-26 Julia Koval <julia.koval@intel.com>
27217 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
27218 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
27219 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
27220 _mm_mask_bitshuffle_epi64_mask): Fix type.
27221 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
27222 USI_FTYPE_V4DI_V4DI_USI): Remove.
27223 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
27224 __builtin_ia32_vpshufbitqmb256_mask,
27225 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
27226 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
27227 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
27229 2018-01-26 Alan Modra <amodra@gmail.com>
27232 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
27233 UNSPEC_VBPERMQ. Sort other unspecs.
27235 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
27237 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
27239 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
27241 PR middle-end/83055
27242 * predict.c (drop_profile): Do not push/pop cfun; update also
27244 (handle_missing_profiles): Fix logic looking for zero profiles.
27246 2018-01-25 Jakub Jelinek <jakub@redhat.com>
27248 PR middle-end/83977
27249 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27250 on functions with #pragma omp declare simd or functions with simd
27252 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27253 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27254 Remove trailing \n from warning_at calls.
27256 2018-01-25 Tom de Vries <tom@codesourcery.com>
27259 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27260 for neutered workers.
27262 2018-01-24 Joseph Myers <joseph@codesourcery.com>
27265 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27266 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27268 2018-01-24 Jeff Law <law@redhat.com>
27271 * i386.c (get_probe_interval): Move to earlier point.
27272 (ix86_compute_frame_layout): If -fstack-clash-protection and
27273 the frame is larger than the probe interval, then use pushes
27274 to save registers rather than reg->mem moves.
27275 (ix86_expand_prologue): Remove conditional for int_registers_saved
27278 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
27281 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27282 min/max for never referenced object.
27284 2018-01-24 Jakub Jelinek <jakub@redhat.com>
27286 PR middle-end/83977
27287 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27289 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27290 attributes from DECL_ATTRIBUTES (decl) without affecting
27291 DECL_ATTRIBUTES (current_function_decl).
27292 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27293 functions with non-NULL DECL_ABSTRACT_ORIGIN.
27295 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
27297 PR tree-optimization/83979
27298 * fold-const.c (fold_comparison): Use constant_boolean_node
27299 instead of boolean_{true,false}_node.
27301 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
27303 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27306 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27308 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27309 Simplify the clause that sets the length attribute.
27310 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27311 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27312 clause that sets the length attribute.
27313 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27315 2018-01-24 Tom de Vries <tom@codesourcery.com>
27318 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27319 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27320 Add strict parameter.
27321 (prevent_branch_around_nothing): Insert dummy insn between branch to
27322 label and label with no ptx insn inbetween.
27323 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27325 2018-01-24 Tom de Vries <tom@codesourcery.com>
27328 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27329 for neutered threads in warp.
27330 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27332 2018-01-24 Richard Biener <rguenther@suse.de>
27334 PR tree-optimization/83176
27335 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27338 2018-01-24 Richard Biener <rguenther@suse.de>
27340 PR tree-optimization/82819
27341 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27342 code generating pluses that are no-ops in the target precision.
27344 2018-01-24 Richard Biener <rguenther@suse.de>
27346 PR middle-end/84000
27347 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27349 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27351 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27352 to merge probabilities.
27353 * predict.c (probably_never_executed): Also mark as cold functions
27354 with global 0 profile and guessed local profile.
27355 * profile-count.c (profile_probability::combine_with_count): New
27357 * profile-count.h (profile_probability::operator*,
27358 profile_probability::operator*=, profile_probability::operator/,
27359 profile_probability::operator/=): Reduce precision to adjusted
27360 and set value to guessed on contradictory divisions.
27361 (profile_probability::combine_with_freq): Remove.
27362 (profile_probability::combine_wiht_count): Declare.
27363 (profile_count::force_nonzero):: Set to adjusted.
27364 (profile_count::probability_in):: Set quality to adjusted.
27365 * tree-ssa-tail-merge.c (replace_block_by): Use
27366 combine_with_count.
27368 2018-01-23 Andrew Waterman <andrew@sifive.com>
27369 Jim Wilson <jimw@sifive.com>
27371 * config/riscv/riscv.c (riscv_stack_boundary): New.
27372 (riscv_option_override): Set riscv_stack_boundary. Handle
27373 riscv_preferred_stack_boundary_arg.
27374 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27375 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27376 (STACK_BOUNDARY): Set to riscv_stack_boundary.
27377 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27378 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27379 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27381 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
27384 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27385 of struct ix86_frame.
27386 (ix86_expand_epilogue): Likewise. Add a local variable for
27387 the reg_save_offset field in struct ix86_frame.
27389 2018-01-23 Bin Cheng <bin.cheng@arm.com>
27391 PR tree-optimization/82604
27392 * tree-loop-distribution.c (enum partition_kind): New enum item
27393 PKIND_PARTIAL_MEMSET.
27394 (partition_builtin_p): Support above new enum item.
27395 (generate_code_for_partition): Ditto.
27396 (compute_access_range): Differentiate cases that equality can be
27397 proven at all loops, the innermost loops or no loops.
27398 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27399 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
27400 (finalize_partitions, distribute_loop): Don't fuse partition of
27401 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27402 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27403 parloop is enabled.
27405 2018-01-23 Martin Liska <mliska@suse.cz>
27407 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27408 order to ignore the predictor.
27409 (PRED_POLYMORPHIC_CALL): Likewise.
27410 (PRED_RECURSIVE_CALL): Likewise.
27412 2018-01-23 Martin Liska <mliska@suse.cz>
27414 * tree-profile.c (tree_profiling): Print function header to
27415 aware reader which function we are working on.
27416 * value-prof.c (gimple_find_values_to_profile): Do not print
27417 not interesting value histograms.
27419 2018-01-23 Martin Liska <mliska@suse.cz>
27421 * profile-count.h (enum profile_quality): Add
27422 profile_uninitialized as the first value. Do not number values
27423 as they are zero based.
27424 (profile_count::verify): Update sanity check.
27425 (profile_probability::verify): Likewise.
27427 2018-01-23 Nathan Sidwell <nathan@acm.org>
27429 * doc/invoke.texi (ffor-scope): Deprecate.
27431 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27433 PR tree-optimization/83510
27434 * domwalk.c (set_all_edges_as_executable): New function.
27435 (dom_walker::dom_walker): Convert bool param
27436 "skip_unreachable_blocks" to enum reachability. Move setup of
27437 edge flags to set_all_edges_as_executable and only do it when
27438 reachability is REACHABLE_BLOCKS.
27439 * domwalk.h (enum dom_walker::reachability): New enum.
27440 (dom_walker::dom_walker): Convert bool param
27441 "skip_unreachable_blocks" to enum reachability.
27442 (set_all_edges_as_executable): New decl.
27443 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
27444 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27446 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27447 but converting true to REACHABLE_BLOCKS.
27448 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27450 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27451 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27452 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27454 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27455 if check_all_array_refs will be called.
27457 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27459 * tree.c (selftest::test_location_wrappers): Add more test
27462 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27464 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27465 (selftest::test_bit_in_range): Likewise.
27467 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27470 * doc/sourcebuild.texi (vect_float): Say that the selector
27471 only describes the situation when -funsafe-math-optimizations is on.
27472 (vect_float_strict): Document.
27474 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27476 PR tree-optimization/83965
27477 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27478 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27479 instead of checking only for a reduction.
27480 (vect_recog_widen_sum_pattern): Likewise.
27482 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27484 * predict.c (probably_never_executed): Only use precise profile info.
27485 (compute_function_frequency): Skip after inlining hack since we now
27486 have quality checking.
27488 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27490 * profile-count.h (profile_probability::very_unlikely,
27491 profile_probability::unlikely, profile_probability::even): Set
27492 precision to guessed.
27494 2018-01-23 Richard Biener <rguenther@suse.de>
27496 PR tree-optimization/83963
27497 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27498 Properly terminate dominator walk when crossing the exit edge not
27499 when visiting its source block.
27501 2018-01-23 Jakub Jelinek <jakub@redhat.com>
27504 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27505 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27507 2018-01-22 Jakub Jelinek <jakub@redhat.com>
27509 PR tree-optimization/83957
27510 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
27511 semicolon after for body surrounded by braces.
27513 PR tree-optimization/83081
27514 * profile-count.h (profile_probability::split): New method.
27515 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27516 Use profile_probability::split.
27517 (do_compare_rtx_and_jump): Fix adjustment of probabilities
27518 when splitting a single conditional jump into 2.
27520 2018-01-22 David Malcolm <dmalcolm@redhat.com>
27522 PR tree-optimization/69452
27523 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27526 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27528 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27529 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27530 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27532 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27534 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27536 * config/rl78/rl78.md (movdi): New define_expand.
27537 * config/rl78/rl78.c (rl78_split_movdi): New function.
27539 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27542 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27544 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27545 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27546 128-bit to produce an UNSPEC move to get the double word with the
27547 signbit and then a shift directly to do signbit.
27548 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27549 implementation with a new version that just does either a direct
27550 move or a regular move. Move memory interface to separate insns.
27551 Move insns so they are next to the expander.
27552 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27553 with signbit move. Split big and little endian case.
27554 (signbit<mode>2_dm_mem_le): Likewise.
27555 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27556 (signbit<mode>2_dm2): Likewise.
27558 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27560 * config/rl78/rl78.md (anddi3): New define_expand.
27562 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27564 * config/rl78/rl78.md (umindi3): New define_expand.
27566 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27568 * config/rl78/rl78.md (smindi3): New define_expand.
27570 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27572 * config/rl78/rl78.md (smaxdi3): New define_expand.
27574 2018-01-22 Carl Love <cel@us.ibm.com>
27576 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27577 LVX_V1TI): Add macro expansion.
27578 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27579 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27580 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27581 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27582 Change check to determine if the instruction is a byte reversing
27583 entry. Fix typo in comment.
27584 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27585 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27586 Add def_builtin calls for new builtins.
27587 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27588 Add define_insn expansion.
27590 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27592 * config/rl78/rl78.md (umaxdi3): New define_expand.
27594 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27596 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27597 for non-QImode registers.
27599 2018-01-22 Richard Biener <rguenther@suse.de>
27601 PR tree-optimization/83963
27602 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27603 including the loop exit block.
27604 (scop_detection::merge_sese): Likewise.
27605 (scop_detection::add_scop): Do it here instead.
27607 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27609 * doc/sourcebuild.texi (arm_softfloat): Document.
27611 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27614 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27615 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27616 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27618 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27619 David Edelsohn <dje.gcc@gmail.com>
27622 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27623 Change "crset eq" to "crset 2".
27624 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27625 (*call_indirect_aix<mode>_nospec): Likewise.
27626 (*call_value_indirect_aix<mode>_nospec): Likewise.
27627 (*call_indirect_elfv2<mode>_nospec): Likewise.
27628 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27629 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27630 change assembly output from . to $.
27631 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27632 (indirect_jump<mode>_nospec): Change assembly output from . to $.
27633 (*tablejump<mode>_internal1_nospec): Likewise.
27635 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
27638 * config/sh/sh_optimize_sett_clrt.cc:
27639 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27641 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
27643 PR tree-optimization/83940
27644 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27645 offset_dt to vect_constant_def rather than vect_unknown_def_type.
27646 (vect_check_load_store_mask): Add a mask_dt_out parameter and
27647 use it to pass back the definition type.
27648 (vect_check_store_rhs): Likewise rhs_dt_out.
27649 (vect_build_gather_load_calls): Add a mask_dt argument and use
27650 it instead of a call to vect_is_simple_use.
27651 (vectorizable_store): Update calls to vect_check_load_store_mask
27652 and vect_check_store_rhs. Use the dt returned by the latter instead
27653 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
27654 instead of calls to vect_is_simple_use. Pass the scalar rather
27655 than the vector operand to vect_is_simple_use when handling
27656 second and subsequent copies of an rhs value.
27657 (vectorizable_load): Update calls to vect_check_load_store_mask
27658 and vect_build_gather_load_calls. Use the cached mask_dt and
27659 gs_info.offset_dt instead of calls to vect_is_simple_use.
27661 2018-01-20 Jakub Jelinek <jakub@redhat.com>
27663 PR middle-end/83945
27664 * tree-emutls.c: Include gimplify.h.
27665 (lower_emutls_2): New function.
27666 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27667 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27668 it before further processing.
27671 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27672 UINTVAL (trueop1) instead of INTVAL (op1).
27674 2018-01-19 Jakub Jelinek <jakub@redhat.com>
27678 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27679 INCOMING_FRAME_SP_OFFSET if not defined.
27680 (scan_trace): Add ENTRY argument. If true and
27681 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27682 emit a note to adjust the CFA offset.
27683 (create_cfi_notes): Adjust scan_trace callers.
27684 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27685 INCOMING_FRAME_SP_OFFSET in the CIE.
27686 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27687 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27689 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27690 * doc/tm.texi: Regenerated.
27692 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27694 PR rtl-optimization/83147
27695 * lra-constraints.c (remove_inheritance_pseudos): Use
27696 lra_substitute_pseudo_within_insn.
27698 2018-01-19 Tom de Vries <tom@codesourcery.com>
27699 Cesar Philippidis <cesar@codesourcery.com>
27702 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27704 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
27707 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27708 spaces for function labels.
27710 2018-01-19 Martin Liska <mliska@suse.cz>
27712 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27713 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27714 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27715 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27716 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27717 (PRED_CONST_RETURN): Change from 69 to 65.
27718 (PRED_NULL_RETURN): Change from 91 to 71.
27719 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27720 (PRED_LOOP_GUARD): Change from 66 to 73.
27722 2018-01-19 Martin Liska <mliska@suse.cz>
27724 * predict.c (predict_insn_def): Add new assert.
27725 (struct branch_predictor): Change type to signed integer.
27726 (test_prediction_value_range): Amend test to cover
27727 PROB_UNINITIALIZED.
27728 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27729 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27730 (PRED_LOOP_ITERATIONS_MAX): Likewise.
27731 (PRED_LOOP_IV_COMPARE): Likewise.
27732 * predict.h (PROB_UNINITIALIZED): Define new constant.
27734 2018-01-19 Martin Liska <mliska@suse.cz>
27736 * predict.c (dump_prediction): Add new format for
27737 analyze_brprob.py script which is enabled with -details
27739 * profile-count.h (precise_p): New function.
27741 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27743 PR tree-optimization/83922
27744 * tree-vect-loop.c (vect_verify_full_masking): Return false if
27745 there are no statements that need masking.
27746 (vect_active_double_reduction_p): New function.
27747 (vect_analyze_loop_operations): Use it when handling phis that
27748 are not in the loop header.
27750 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27752 PR tree-optimization/83914
27753 * tree-vect-loop.c (vectorizable_induction): Don't convert
27754 init_expr or apply the peeling adjustment for inductions
27755 that are nested within the vectorized loop.
27757 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27759 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27762 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27766 * function.h (gimplify_parameters): Add gimple_seq * argument.
27767 * function.c: Include gimple.h and options.h.
27768 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27769 for the added local temporaries if needed.
27770 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27771 if there are any parameter cleanups, wrap whole body into a
27772 try/finally with the cleanups.
27774 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
27777 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27778 Use GET_MODE_CLASS for scalar floating point.
27780 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27784 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27785 Fix call of call_cgraph_insertion_hooks.
27787 2018-01-18 Martin Sebor <msebor@redhat.com>
27789 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27791 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27794 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27797 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
27800 * common.opt: (-ffile-prefix-map): New option.
27801 * opts.c (common_handle_option): Defer it.
27802 * opts-global.c (handle_common_deferred_options): Handle it.
27803 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27804 * file-prefix-map.h: New file.
27805 (remap_debug_filename, add_debug_prefix_map): ...here.
27806 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27807 * final.c (debug_prefix_map, add_debug_prefix_map
27808 remap_debug_filename): Move to...
27809 * file-prefix-map.c: New file.
27810 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27811 generalize, get rid of alloca(), use strrchr() instead of strchr().
27812 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27813 Implement in terms of add_prefix_map().
27814 (remap_macro_filename, remap_debug_filename): Implement in term of
27816 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27817 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27818 * dbxout.c: Include file-prefix-map.h.
27819 * varasm.c: Likewise.
27820 * vmsdbgout.c: Likewise.
27821 * xcoffout.c: Likewise.
27822 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27823 * doc/cppopts.texi (-fmacro-prefix-map): Document.
27824 * doc/invoke.texi (-ffile-prefix-map): Document.
27825 (-fdebug-prefix-map): Update description.
27827 2018-01-18 Martin Liska <mliska@suse.cz>
27829 * config/i386/i386.c (indirect_thunk_name): Document that also
27831 (output_indirect_thunk): Document why both instructions
27832 (pause and lfence) are generated.
27834 2018-01-18 Richard Biener <rguenther@suse.de>
27836 PR tree-optimization/83887
27837 * graphite-scop-detection.c
27838 (scop_detection::get_nearest_dom_with_single_entry): Remove.
27839 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27840 (scop_detection::merge_sese): Re-implement with a flood-fill
27841 algorithm that properly finds a SESE region if it exists.
27843 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27846 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27847 pointer_diff optimizations use view_convert instead of convert.
27849 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27851 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27852 Generate different code for -mno-speculate-indirect-jumps.
27853 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27854 (*call_indirect_aix<mode>): Disable for
27855 -mno-speculate-indirect-jumps.
27856 (*call_indirect_aix<mode>_nospec): New define_insn.
27857 (*call_value_indirect_aix<mode>): Disable for
27858 -mno-speculate-indirect-jumps.
27859 (*call_value_indirect_aix<mode>_nospec): New define_insn.
27860 (*sibcall_nonlocal_sysv<mode>): Generate different code for
27861 -mno-speculate-indirect-jumps.
27862 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27864 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
27866 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27867 long double type, set the flags for noting the default long double
27868 type, even if we don't pass or return a long double type.
27870 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
27873 * ipa-inline.c (flatten_function): Do not overwrite final inlining
27876 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
27878 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27879 support for merge[hl].
27880 (fold_mergehl_helper): New helper function.
27881 (tree-vector-builder.h): New #include for tree_vector_builder usage.
27882 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27883 (altivec_vmrglw_direct): Add xxmrglw insn.
27885 2018-01-17 Andrew Waterman <andrew@sifive.com>
27887 * config/riscv/riscv.c (riscv_conditional_register_usage): If
27888 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27890 2018-01-17 David Malcolm <dmalcolm@redhat.com>
27893 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27894 call the lto_location_cache before reading the
27895 DECL_SOURCE_LOCATION of the types.
27897 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
27898 Richard Sandiford <richard.sandiford@linaro.org>
27900 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27901 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27902 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27903 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27904 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27906 * config/aarch64/constraints.md (aarch64_movti_operand):
27908 * config/aarch64/predicates.md (Uti): Add new constraint.
27910 2018-01-17 Carl Love <cel@us.ibm.com>
27912 * config/rs6000/vsx.md (define_expand xl_len_r,
27913 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27914 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27916 (define_expand, define_insn): Move the shift left from the
27917 define_insn to the define_expand for lxvl and stxvl instructions.
27918 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27919 and XL_LEN_R definitions to PURE.
27921 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
27923 * config/i386/i386.c (indirect_thunk_name): Declare regno
27924 as unsigned int. Compare regno with INVALID_REGNUM.
27925 (output_indirect_thunk): Ditto.
27926 (output_indirect_thunk_function): Ditto.
27927 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
27928 in the call to output_indirect_thunk_function.
27930 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
27932 PR middle-end/83884
27933 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27934 rather than the size of inner_type to determine the stack slot size
27935 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27937 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
27940 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27943 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
27945 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27946 endian Linux systems to optionally enable multilibs for selecting
27947 the long double type if the user configured an explicit type.
27948 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27949 have no long double multilibs if not defined.
27950 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27951 warn if the user used -mabi={ieee,ibm}longdouble and we built
27952 multilibs for long double.
27953 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27954 appropriate multilib option.
27955 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27957 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27958 for building long double multilibs.
27959 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27961 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
27963 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27966 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27968 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27971 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27974 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27977 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27979 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27980 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27982 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
27984 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27985 different rtl trees depending on TARGET_64BIT.
27986 (rs6000_gen_lvx): Likewise.
27988 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27990 * config/visium/visium.md (nop): Tweak comment.
27991 (hazard_nop): Likewise.
27993 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27995 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27996 -mspeculate-indirect-jumps.
27997 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27998 for -mno-speculate-indirect-jumps.
27999 (*call_indirect_elfv2<mode>_nospec): New define_insn.
28000 (*call_value_indirect_elfv2<mode>): Disable for
28001 -mno-speculate-indirect-jumps.
28002 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
28003 (indirect_jump): Emit different RTL for
28004 -mno-speculate-indirect-jumps.
28005 (*indirect_jump<mode>): Disable for
28006 -mno-speculate-indirect-jumps.
28007 (*indirect_jump<mode>_nospec): New define_insn.
28008 (tablejump): Emit different RTL for
28009 -mno-speculate-indirect-jumps.
28010 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
28011 (tablejumpsi_nospec): New define_expand.
28012 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
28013 (tablejumpdi_nospec): New define_expand.
28014 (*tablejump<mode>_internal1): Disable for
28015 -mno-speculate-indirect-jumps.
28016 (*tablejump<mode>_internal1_nospec): New define_insn.
28017 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
28020 2018-01-16 Artyom Skrobov tyomitch@gmail.com
28022 * caller-save.c (insert_save): Drop unnecessary parameter. All
28025 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28026 Richard Biener <rguenth@suse.de>
28029 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
28030 return early, inline manually is_gimple_sizepos. Make sure if we
28031 call gimplify_expr we don't end up with a gimple constant.
28032 * tree.c (variably_modified_type_p): Don't return true for
28033 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
28034 * gimplify.h (is_gimple_sizepos): Remove.
28036 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28038 PR tree-optimization/83857
28039 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
28040 vectorizable_live_operation for pure SLP statements.
28041 (vectorizable_live_operation): Handle PHIs.
28043 2018-01-16 Richard Biener <rguenther@suse.de>
28045 PR tree-optimization/83867
28046 * tree-vect-stmts.c (vect_transform_stmt): Precompute
28047 nested_in_vect_loop_p since the scalar stmt may get invalidated.
28049 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28052 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
28053 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
28054 If off is not INTEGER_CST, issue a may not be aligned warning
28055 rather than isn't aligned. Use isn%'t rather than isn't.
28056 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
28058 <case MULT_EXPR>: Improve the case when bottom and one of the
28059 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
28060 operand, in that case check if the other operand is multiple of
28061 bottom divided by the INTEGER_CST operand.
28063 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28066 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
28067 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
28068 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
28069 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
28070 * config/pa/pa.c (pa_function_arg_advance): Likewise.
28071 (pa_function_arg, pa_arg_partial_bytes): Likewise.
28072 (pa_function_arg_size): New function.
28074 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28076 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
28077 in a separate statement.
28079 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28081 PR tree-optimization/83847
28082 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
28083 group gathers and scatters.
28085 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28087 PR rtl-optimization/86620
28088 * params.def (max-sched-ready-insns): Bump minimum value to 1.
28090 PR rtl-optimization/83213
28091 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
28092 to last if both are JUMP_INSNs.
28094 PR tree-optimization/83843
28095 * gimple-ssa-store-merging.c
28096 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
28097 store_immediate_info for bswap/nop orig_stores.
28099 2018-01-15 Andrew Waterman <andrew@sifive.com>
28101 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
28103 <UDIV>: Increase cost if !TARGET_DIV.
28105 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
28107 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
28108 (define_attr "cr_logical_3op"): New.
28109 (cceq_ior_compare): Adjust.
28110 (cceq_ior_compare_complement): Adjust.
28111 (*cceq_rev_compare): Adjust.
28112 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
28113 (is_cracked_insn): Adjust.
28114 (insn_must_be_first_in_group): Adjust.
28115 * config/rs6000/40x.md: Adjust.
28116 * config/rs6000/440.md: Adjust.
28117 * config/rs6000/476.md: Adjust.
28118 * config/rs6000/601.md: Adjust.
28119 * config/rs6000/603.md: Adjust.
28120 * config/rs6000/6xx.md: Adjust.
28121 * config/rs6000/7450.md: Adjust.
28122 * config/rs6000/7xx.md: Adjust.
28123 * config/rs6000/8540.md: Adjust.
28124 * config/rs6000/cell.md: Adjust.
28125 * config/rs6000/e300c2c3.md: Adjust.
28126 * config/rs6000/e500mc.md: Adjust.
28127 * config/rs6000/e500mc64.md: Adjust.
28128 * config/rs6000/e5500.md: Adjust.
28129 * config/rs6000/e6500.md: Adjust.
28130 * config/rs6000/mpc.md: Adjust.
28131 * config/rs6000/power4.md: Adjust.
28132 * config/rs6000/power5.md: Adjust.
28133 * config/rs6000/power6.md: Adjust.
28134 * config/rs6000/power7.md: Adjust.
28135 * config/rs6000/power8.md: Adjust.
28136 * config/rs6000/power9.md: Adjust.
28137 * config/rs6000/rs64.md: Adjust.
28138 * config/rs6000/titan.md: Adjust.
28140 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28142 * config/i386/predicates.md (indirect_branch_operand): Rewrite
28143 ix86_indirect_branch_register logic.
28145 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28147 * config/i386/constraints.md (Bs): Update
28148 ix86_indirect_branch_register check. Don't check
28149 ix86_indirect_branch_register with GOT_memory_operand.
28151 * config/i386/predicates.md (GOT_memory_operand): Don't check
28152 ix86_indirect_branch_register here.
28153 (GOT32_symbol_operand): Likewise.
28155 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28157 * config/i386/predicates.md (constant_call_address_operand):
28158 Rewrite ix86_indirect_branch_register logic.
28159 (sibcall_insn_operand): Likewise.
28161 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28163 * config/i386/constraints.md (Bs): Replace
28164 ix86_indirect_branch_thunk_register with
28165 ix86_indirect_branch_register.
28167 * config/i386/i386.md (indirect_jump): Likewise.
28168 (tablejump): Likewise.
28169 (*sibcall_memory): Likewise.
28170 (*sibcall_value_memory): Likewise.
28171 Peepholes of indirect call and jump via memory: Likewise.
28172 * config/i386/i386.opt: Likewise.
28173 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28174 (GOT_memory_operand): Likewise.
28175 (call_insn_operand): Likewise.
28176 (sibcall_insn_operand): Likewise.
28177 (GOT32_symbol_operand): Likewise.
28179 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28181 PR middle-end/83837
28182 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
28183 type rather than type addr's type points to.
28184 (expand_omp_atomic_mutex): Likewise.
28185 (expand_omp_atomic): Likewise.
28187 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28190 * config/i386/i386.c (output_indirect_thunk_function): Use
28191 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
28192 for __x86_return_thunk.
28194 2018-01-15 Richard Biener <rguenther@suse.de>
28196 PR middle-end/83850
28197 * expmed.c (extract_bit_field_1): Fix typo.
28199 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28202 * config/arm/iterators.md (VF): New mode iterator.
28203 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28204 Remove integer-related logic from pattern.
28205 (neon_vabd<mode>_3): Likewise.
28207 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28209 PR middle-end/82694
28210 * common.opt (fstrict-overflow): No longer an alias.
28211 (fwrapv-pointer): New option.
28212 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
28213 also for pointer types based on flag_wrapv_pointer.
28214 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
28215 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
28216 opts->x_flag_wrapv got set.
28217 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
28218 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
28219 POINTER_TYPE_OVERFLOW_UNDEFINED.
28220 * match.pd: Likewise in address comparison pattern.
28221 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
28223 2018-01-15 Richard Biener <rguenther@suse.de>
28226 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
28227 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
28228 Reset type names to their identifier if their TYPE_DECL doesn't
28229 have linkage (and thus is used for ODR and devirt).
28230 (save_debug_info_for_decl): Remove.
28231 (save_debug_info_for_type): Likewise.
28232 (add_tree_to_fld_list): Adjust.
28233 * tree-pretty-print.c (dump_generic_node): Make dumping of
28234 type names more robust.
28236 2018-01-15 Richard Biener <rguenther@suse.de>
28238 * BASE-VER: Bump to 8.0.1.
28240 2018-01-14 Martin Sebor <msebor@redhat.com>
28243 * builtins.c (check_access): Avoid warning when the no-warning bit
28246 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
28248 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28249 * ira-color (allocno_hard_regs_compare): Likewise.
28251 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
28254 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28255 Use .pushsection/.popsection.
28257 2018-01-14 Martin Sebor <msebor@redhat.com>
28260 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28262 2018-01-14 Jakub Jelinek <jakub@redhat.com>
28264 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28265 entry from extra_headers.
28266 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28267 extra_headers, make the list bitwise identical to the i?86-*-* one.
28269 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28271 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28272 -mcmodel=large with -mindirect-branch=thunk,
28273 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28274 -mfunction-return=thunk-extern.
28275 * doc/invoke.texi: Document -mcmodel=large is incompatible with
28276 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28277 -mfunction-return=thunk and -mfunction-return=thunk-extern.
28279 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28281 * config/i386/i386.c (print_reg): Print the name of the full
28282 integer register without '%'.
28283 (ix86_print_operand): Handle 'V'.
28284 * doc/extend.texi: Document 'V' modifier.
28286 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28288 * config/i386/constraints.md (Bs): Disallow memory operand for
28289 -mindirect-branch-register.
28291 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28292 (GOT_memory_operand): Likewise.
28293 (call_insn_operand): Likewise.
28294 (sibcall_insn_operand): Likewise.
28295 (GOT32_symbol_operand): Likewise.
28296 * config/i386/i386.md (indirect_jump): Call convert_memory_address
28297 for -mindirect-branch-register.
28298 (tablejump): Likewise.
28299 (*sibcall_memory): Likewise.
28300 (*sibcall_value_memory): Likewise.
28301 Disallow peepholes of indirect call and jump via memory for
28302 -mindirect-branch-register.
28303 (*call_pop): Replace m with Bw.
28304 (*call_value_pop): Likewise.
28305 (*sibcall_pop_memory): Replace m with Bs.
28306 * config/i386/i386.opt (mindirect-branch-register): New option.
28307 * doc/invoke.texi: Document -mindirect-branch-register option.
28309 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28311 * config/i386/i386-protos.h (ix86_output_function_return): New.
28312 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28313 set function_return_type.
28314 (indirect_thunk_name): Add ret_p to indicate thunk for function
28316 (output_indirect_thunk_function): Pass false to
28317 indirect_thunk_name.
28318 (ix86_output_indirect_branch_via_reg): Likewise.
28319 (ix86_output_indirect_branch_via_push): Likewise.
28320 (output_indirect_thunk_function): Create alias for function
28321 return thunk if regno < 0.
28322 (ix86_output_function_return): New function.
28323 (ix86_handle_fndecl_attribute): Handle function_return.
28324 (ix86_attribute_table): Add function_return.
28325 * config/i386/i386.h (machine_function): Add
28326 function_return_type.
28327 * config/i386/i386.md (simple_return_internal): Use
28328 ix86_output_function_return.
28329 (simple_return_internal_long): Likewise.
28330 * config/i386/i386.opt (mfunction-return=): New option.
28331 (indirect_branch): Mention -mfunction-return=.
28332 * doc/extend.texi: Document function_return function attribute.
28333 * doc/invoke.texi: Document -mfunction-return= option.
28335 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28337 * config/i386/i386-opts.h (indirect_branch): New.
28338 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28339 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28340 with local indirect jump when converting indirect call and jump.
28341 (ix86_set_indirect_branch_type): New.
28342 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28343 (indirectlabelno): New.
28344 (indirect_thunk_needed): Likewise.
28345 (indirect_thunk_bnd_needed): Likewise.
28346 (indirect_thunks_used): Likewise.
28347 (indirect_thunks_bnd_used): Likewise.
28348 (INDIRECT_LABEL): Likewise.
28349 (indirect_thunk_name): Likewise.
28350 (output_indirect_thunk): Likewise.
28351 (output_indirect_thunk_function): Likewise.
28352 (ix86_output_indirect_branch_via_reg): Likewise.
28353 (ix86_output_indirect_branch_via_push): Likewise.
28354 (ix86_output_indirect_branch): Likewise.
28355 (ix86_output_indirect_jmp): Likewise.
28356 (ix86_code_end): Call output_indirect_thunk_function if needed.
28357 (ix86_output_call_insn): Call ix86_output_indirect_branch if
28359 (ix86_handle_fndecl_attribute): Handle indirect_branch.
28360 (ix86_attribute_table): Add indirect_branch.
28361 * config/i386/i386.h (machine_function): Add indirect_branch_type
28362 and has_local_indirect_jump.
28363 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28365 (tablejump): Likewise.
28366 (*indirect_jump): Use ix86_output_indirect_jmp.
28367 (*tablejump_1): Likewise.
28368 (simple_return_indirect_internal): Likewise.
28369 * config/i386/i386.opt (mindirect-branch=): New option.
28370 (indirect_branch): New.
28373 (thunk-inline): Likewise.
28374 (thunk-extern): Likewise.
28375 * doc/extend.texi: Document indirect_branch function attribute.
28376 * doc/invoke.texi: Document -mindirect-branch= option.
28378 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
28381 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28383 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
28385 * ipa-inline.c (want_inline_small_function_p): Return false if
28386 inlining has already failed with CIF_FINAL_ERROR.
28387 (update_caller_keys): Call want_inline_small_function_p before
28389 (update_callee_keys): Likewise.
28391 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
28393 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28395 (rs6000_quadword_masked_address_p): Likewise.
28396 (quad_aligned_load_p): Likewise.
28397 (quad_aligned_store_p): Likewise.
28398 (const_load_sequence_p): Add comment to describe the outer-most loop.
28399 (mimic_memory_attributes_and_flags): New function.
28400 (rs6000_gen_stvx): Likewise.
28401 (replace_swapped_aligned_store): Likewise.
28402 (rs6000_gen_lvx): Likewise.
28403 (replace_swapped_aligned_load): Likewise.
28404 (replace_swapped_load_constant): Capitalize argument name in
28405 comment describing this function.
28406 (rs6000_analyze_swaps): Add a third pass to search for vector loads
28407 and stores that access quad-word aligned addresses and replace
28408 with stvx or lvx instructions when appropriate.
28409 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28410 New function prototype.
28411 (rs6000_quadword_masked_address_p): Likewise.
28412 (rs6000_gen_lvx): Likewise.
28413 (rs6000_gen_stvx): Likewise.
28414 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28415 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28416 when memory address is aligned.
28417 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28418 this split to select lvx instruction when memory address is aligned.
28419 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28420 instruction when memory address is aligned.
28421 (*vsx_le_perm_load_v16qi): Likewise.
28422 (four unnamed splitters): Modify to select the stvx instruction
28423 when memory is aligned.
28425 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
28427 * predict.c (determine_unlikely_bbs): Handle correctly BBs
28428 which appears in the queue multiple times.
28430 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28431 Alan Hayward <alan.hayward@arm.com>
28432 David Sherwood <david.sherwood@arm.com>
28434 * tree-vectorizer.h (vec_lower_bound): New structure.
28435 (_loop_vec_info): Add check_nonzero and lower_bounds.
28436 (LOOP_VINFO_CHECK_NONZERO): New macro.
28437 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28438 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28439 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28440 fields. Make seg_len the distance travelled, not including the
28442 (dr_direction_indicator): Declare.
28443 (dr_zero_step_indicator): Likewise.
28444 (dr_known_forward_stride_p): Likewise.
28445 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28447 (runtime_alias_check_p): Allow runtime alias checks with
28449 (operator ==): Compare access_size and align.
28450 (prune_runtime_alias_test_list): Rework for new distinction between
28451 the access_size and seg_len.
28452 (create_intersect_range_checks_index): Likewise. Cope with polynomial
28454 (get_segment_min_max): New function.
28455 (create_intersect_range_checks): Use it.
28456 (dr_step_indicator): New function.
28457 (dr_direction_indicator): Likewise.
28458 (dr_zero_step_indicator): Likewise.
28459 (dr_known_forward_stride_p): Likewise.
28460 * tree-loop-distribution.c (data_ref_segment_size): Return
28461 DR_STEP * (niters - 1).
28462 (compute_alias_check_pairs): Update call to the dr_with_seg_len
28464 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28465 (vect_preserves_scalar_order_p): New function, split out from...
28466 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
28467 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28468 (vect_vfa_access_size): New function.
28469 (vect_vfa_align): Likewise.
28470 (vect_compile_time_alias): Take access_size_a and access_b arguments.
28471 (dump_lower_bound): New function.
28472 (vect_check_lower_bound): Likewise.
28473 (vect_small_gap_p): Likewise.
28474 (vectorizable_with_step_bound_p): Likewise.
28475 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28476 depencies if the vectorization factor is 1. Convert the checks
28477 for nonzero steps into checks on the bounds of DR_STEP. Try using
28478 a bunds check for variable steps if the minimum required step is
28479 relatively small. Update calls to the dr_with_seg_len
28480 constructor and to vect_compile_time_alias.
28481 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28483 (vect_loop_versioning): Call it.
28484 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28486 (vect_estimate_min_profitable_iters): Account for any bounds checks.
28488 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28489 Alan Hayward <alan.hayward@arm.com>
28490 David Sherwood <david.sherwood@arm.com>
28492 * doc/sourcebuild.texi (vect_scatter_store): Document.
28493 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28495 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28497 * genopinit.c (main): Add supports_vec_scatter_store and
28498 supports_vec_scatter_store_cached to target_optabs.
28499 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28500 IFN_MASK_SCATTER_STORE.
28501 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28503 * internal-fn.h (internal_store_fn_p): Declare.
28504 (internal_fn_stored_value_index): Likewise.
28505 * internal-fn.c (scatter_store_direct): New macro.
28506 (expand_scatter_store_optab_fn): New function.
28507 (direct_scatter_store_optab_supported_p): New macro.
28508 (internal_store_fn_p): New function.
28509 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28510 IFN_MASK_SCATTER_STORE.
28511 (internal_fn_mask_index): Likewise.
28512 (internal_fn_stored_value_index): New function.
28513 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28514 for scatter stores.
28515 * optabs-query.h (supports_vec_scatter_store_p): Declare.
28516 * optabs-query.c (supports_vec_scatter_store_p): New function.
28517 * tree-vectorizer.h (vect_get_store_rhs): Declare.
28518 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28519 true for scatter stores.
28520 (vect_gather_scatter_fn_p): Handle scatter stores too.
28521 (vect_check_gather_scatter): Consider using scatter stores if
28522 supports_vec_scatter_store_p.
28523 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28524 scatter stores too.
28525 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28526 internal_fn_stored_value_index.
28527 (check_load_store_masking): Handle scatter stores too.
28528 (vect_get_store_rhs): Make public.
28529 (vectorizable_call): Use internal_store_fn_p.
28530 (vectorizable_store): Handle scatter store internal functions.
28531 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28532 when deciding whether the end of the group has been reached.
28533 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28534 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28535 (mask_scatter_store<mode>): New insns.
28537 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28538 Alan Hayward <alan.hayward@arm.com>
28539 David Sherwood <david.sherwood@arm.com>
28541 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28542 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28543 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28545 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28546 Use vect_truncate_gather_scatter_offset if we can't treat the
28547 operation as a normal gather load or scatter store.
28548 (get_group_load_store_type): Take the gather_scatter_info
28549 as argument. Try using a gather load or scatter store for
28550 single-element groups.
28551 (get_load_store_type): Update calls to get_group_load_store_type
28552 and vect_use_strided_gather_scatters_p.
28554 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28555 Alan Hayward <alan.hayward@arm.com>
28556 David Sherwood <david.sherwood@arm.com>
28558 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28559 optional tree argument.
28560 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28562 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28563 but continue to use the current value as a fallback.
28564 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28565 to compare the updates.
28566 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28567 (get_load_store_type): Use it when handling a strided access.
28568 (vect_get_strided_load_store_ops): New function.
28569 (vect_get_data_ptr_increment): Likewise.
28570 (vectorizable_load): Handle strided gather loads. Always pass
28571 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28573 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28574 Alan Hayward <alan.hayward@arm.com>
28575 David Sherwood <david.sherwood@arm.com>
28577 * doc/md.texi (gather_load@var{m}): Document.
28578 (mask_gather_load@var{m}): Likewise.
28579 * genopinit.c (main): Add supports_vec_gather_load and
28580 supports_vec_gather_load_cached to target_optabs.
28581 * optabs-tree.c (init_tree_optimization_optabs): Use
28582 ggc_cleared_alloc to allocate target_optabs.
28583 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28584 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28586 * internal-fn.h (internal_load_fn_p): Declare.
28587 (internal_gather_scatter_fn_p): Likewise.
28588 (internal_fn_mask_index): Likewise.
28589 (internal_gather_scatter_fn_supported_p): Likewise.
28590 * internal-fn.c (gather_load_direct): New macro.
28591 (expand_gather_load_optab_fn): New function.
28592 (direct_gather_load_optab_supported_p): New macro.
28593 (direct_internal_fn_optab): New function.
28594 (internal_load_fn_p): Likewise.
28595 (internal_gather_scatter_fn_p): Likewise.
28596 (internal_fn_mask_index): Likewise.
28597 (internal_gather_scatter_fn_supported_p): Likewise.
28598 * optabs-query.c (supports_at_least_one_mode_p): New function.
28599 (supports_vec_gather_load_p): Likewise.
28600 * optabs-query.h (supports_vec_gather_load_p): Declare.
28601 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28602 and memory_type field.
28603 (NUM_PATTERNS): Bump to 15.
28604 * tree-vect-data-refs.c: Include internal-fn.h.
28605 (vect_gather_scatter_fn_p): New function.
28606 (vect_describe_gather_scatter_call): Likewise.
28607 (vect_check_gather_scatter): Try using internal functions for
28608 gather loads. Recognize existing calls to a gather load function.
28609 (vect_analyze_data_refs): Consider using gather loads if
28610 supports_vec_gather_load_p.
28611 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28612 (vect_get_gather_scatter_offset_type): Likewise.
28613 (vect_convert_mask_for_vectype): Likewise.
28614 (vect_add_conversion_to_patterm): Likewise.
28615 (vect_try_gather_scatter_pattern): Likewise.
28616 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28617 (vect_vect_recog_func_ptrs): Add it.
28618 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28619 internal_fn_mask_index and internal_gather_scatter_fn_p.
28620 (check_load_store_masking): Take the gather_scatter_info as an
28621 argument and handle gather loads.
28622 (vect_get_gather_scatter_ops): New function.
28623 (vectorizable_call): Check internal_load_fn_p.
28624 (vectorizable_load): Likewise. Handle gather load internal
28626 (vectorizable_store): Update call to check_load_store_masking.
28627 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28628 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28629 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28630 (aarch64_gather_scale_operand_d): New predicates.
28631 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28632 (mask_gather_load<mode>): New insns.
28634 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28635 Alan Hayward <alan.hayward@arm.com>
28636 David Sherwood <david.sherwood@arm.com>
28638 * optabs.def (fold_left_plus_optab): New optab.
28639 * doc/md.texi (fold_left_plus_@var{m}): Document.
28640 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28641 * internal-fn.c (fold_left_direct): Define.
28642 (expand_fold_left_optab_fn): Likewise.
28643 (direct_fold_left_optab_supported_p): Likewise.
28644 * fold-const-call.c (fold_const_fold_left): New function.
28645 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28646 * tree-parloops.c (valid_reduction_p): New function.
28647 (gather_scalar_reductions): Use it.
28648 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28649 (vect_finish_replace_stmt): Declare.
28650 * tree-vect-loop.c (fold_left_reduction_fn): New function.
28651 (needs_fold_left_reduction_p): New function, split out from...
28652 (vect_is_simple_reduction): ...here. Accept reductions that
28653 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28654 (vect_force_simple_reduction): Also store the reduction type in
28655 the assignment's STMT_VINFO_REDUC_TYPE.
28656 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28657 (merge_with_identity): New function.
28658 (vect_expand_fold_left): Likewise.
28659 (vectorize_fold_left_reduction): Likewise.
28660 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
28661 scalar phi in place for it. Check for target support and reject
28662 cases that would reassociate the operation. Defer the transform
28663 phase to vectorize_fold_left_reduction.
28664 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28665 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28666 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28668 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28670 * tree-if-conv.c (predicate_mem_writes): Remove redundant
28671 call to ifc_temp_var.
28673 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28674 Alan Hayward <alan.hayward@arm.com>
28675 David Sherwood <david.sherwood@arm.com>
28677 * target.def (legitimize_address_displacement): Take the original
28678 offset as a poly_int.
28679 * targhooks.h (default_legitimize_address_displacement): Update
28681 * targhooks.c (default_legitimize_address_displacement): Likewise.
28682 * doc/tm.texi: Regenerate.
28683 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28684 as an argument, moving assert of ad->disp == ad->disp_term to...
28685 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
28686 Try calling targetm.legitimize_address_displacement before expanding
28687 the address rather than afterwards, and adjust for the new interface.
28688 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28689 Match the new hook interface. Handle SVE addresses.
28690 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28691 new hook interface.
28693 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28695 * Makefile.in (OBJS): Add early-remat.o.
28696 * target.def (select_early_remat_modes): New hook.
28697 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28698 * doc/tm.texi: Regenerate.
28699 * targhooks.h (default_select_early_remat_modes): Declare.
28700 * targhooks.c (default_select_early_remat_modes): New function.
28701 * timevar.def (TV_EARLY_REMAT): New timevar.
28702 * passes.def (pass_early_remat): New pass.
28703 * tree-pass.h (make_pass_early_remat): Declare.
28704 * early-remat.c: New file.
28705 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28707 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28709 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28710 Alan Hayward <alan.hayward@arm.com>
28711 David Sherwood <david.sherwood@arm.com>
28713 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28714 vfm1 with a bound_epilog parameter.
28715 (vect_do_peeling): Update calls accordingly, and move the prologue
28716 call earlier in the function. Treat the base bound_epilog as 0 for
28717 fully-masked loops and retain vf - 1 for other loops. Add 1 to
28718 this base when peeling for gaps.
28719 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28720 with fully-masked loops.
28721 (vect_estimate_min_profitable_iters): Handle the single peeled
28722 iteration in that case.
28724 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28725 Alan Hayward <alan.hayward@arm.com>
28726 David Sherwood <david.sherwood@arm.com>
28728 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28729 single-element interleaving even if the size is not a power of 2.
28730 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28731 accesses for single-element interleaving if the group size is
28734 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28735 Alan Hayward <alan.hayward@arm.com>
28736 David Sherwood <david.sherwood@arm.com>
28738 * doc/md.texi (fold_extract_last_@var{m}): Document.
28739 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28740 * optabs.def (fold_extract_last_optab): New optab.
28741 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28742 * internal-fn.c (fold_extract_direct): New macro.
28743 (expand_fold_extract_optab_fn): Likewise.
28744 (direct_fold_extract_optab_supported_p): Likewise.
28745 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28746 * tree-vect-loop.c (vect_model_reduction_cost): Handle
28747 EXTRACT_LAST_REDUCTION.
28748 (get_initial_def_for_reduction): Do not create an initial vector
28749 for EXTRACT_LAST_REDUCTION reductions.
28750 (vectorizable_reduction): Leave the scalar phi in place for
28751 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
28752 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
28753 epilogue code for EXTRACT_LAST_REDUCTION and defer the
28754 transform phase to vectorizable_condition.
28755 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28757 (vect_finish_stmt_generation): ...here.
28758 (vect_finish_replace_stmt): New function.
28759 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28760 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28762 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28764 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28765 Alan Hayward <alan.hayward@arm.com>
28766 David Sherwood <david.sherwood@arm.com>
28768 * doc/md.texi (extract_last_@var{m}): Document.
28769 * optabs.def (extract_last_optab): New optab.
28770 * internal-fn.def (EXTRACT_LAST): New internal function.
28771 * internal-fn.c (cond_unary_direct): New macro.
28772 (expand_cond_unary_optab_fn): Likewise.
28773 (direct_cond_unary_optab_supported_p): Likewise.
28774 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28775 loops using EXTRACT_LAST.
28776 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28777 (extract_last_<mode>): ...this optab.
28778 (vec_extract<mode><Vel>): Update accordingly.
28780 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28781 Alan Hayward <alan.hayward@arm.com>
28782 David Sherwood <david.sherwood@arm.com>
28784 * target.def (empty_mask_is_expensive): New hook.
28785 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28786 * doc/tm.texi: Regenerate.
28787 * targhooks.h (default_empty_mask_is_expensive): Declare.
28788 * targhooks.c (default_empty_mask_is_expensive): New function.
28789 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28790 if the target says that empty masks are expensive.
28791 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28793 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28795 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28796 Alan Hayward <alan.hayward@arm.com>
28797 David Sherwood <david.sherwood@arm.com>
28799 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28800 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28801 (vect_use_loop_mask_for_alignment_p): New function.
28802 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28803 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28804 niters_skip argument. Make sure that the first niters_skip elements
28805 of the first iteration are inactive.
28806 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28807 Update call to vect_set_loop_masks_directly.
28808 (get_misalign_in_elems): New function, split out from...
28809 (vect_gen_prolog_loop_niters): ...here.
28810 (vect_update_init_of_dr): Take a code argument that specifies whether
28811 the adjustment should be added or subtracted.
28812 (vect_update_init_of_drs): Likewise.
28813 (vect_prepare_for_masked_peels): New function.
28814 (vect_do_peeling): Skip prologue peeling if we're using a mask
28815 instead. Update call to vect_update_inits_of_drs.
28816 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28818 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28819 alignment. Do not include the number of peeled iterations in
28820 the minimum threshold in that case.
28821 (vectorizable_induction): Adjust the start value down by
28822 LOOP_VINFO_MASK_SKIP_NITERS iterations.
28823 (vect_transform_loop): Call vect_prepare_for_masked_peels.
28824 Take the number of skipped iterations into account when calculating
28826 * tree-vect-stmts.c (vect_gen_while_not): New function.
28828 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28829 Alan Hayward <alan.hayward@arm.com>
28830 David Sherwood <david.sherwood@arm.com>
28832 * doc/sourcebuild.texi (vect_fully_masked): Document.
28833 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28834 default value to 0.
28835 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28837 (vect_analyze_loop_2): ...here. Don't check the vectorization
28838 factor against the number of loop iterations if the loop is
28841 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28842 Alan Hayward <alan.hayward@arm.com>
28843 David Sherwood <david.sherwood@arm.com>
28845 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28846 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28847 (dump_groups): Update accordingly.
28848 (iv_use::mem_type): New member variable.
28849 (address_p): New function.
28850 (record_use): Add a mem_type argument and initialize the new
28852 (record_group_use): Add a mem_type argument. Use address_p.
28853 Remove obsolete null checks of base_object. Update call to record_use.
28854 (find_interesting_uses_op): Update call to record_group_use.
28855 (find_interesting_uses_cond): Likewise.
28856 (find_interesting_uses_address): Likewise.
28857 (get_mem_type_for_internal_fn): New function.
28858 (find_address_like_use): Likewise.
28859 (find_interesting_uses_stmt): Try find_address_like_use before
28860 calling find_interesting_uses_op.
28861 (addr_offset_valid_p): Use the iv mem_type field as the type
28862 of the addressed memory.
28863 (add_autoinc_candidates): Likewise.
28864 (get_address_cost): Likewise.
28865 (split_small_address_groups_p): Use address_p.
28866 (split_address_groups): Likewise.
28867 (add_iv_candidate_for_use): Likewise.
28868 (autoinc_possible_for_pair): Likewise.
28869 (rewrite_groups): Likewise.
28870 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28871 (determine_group_iv_cost): Update after split of USE_ADDRESS.
28872 (get_alias_ptr_type_for_ptr_address): New function.
28873 (rewrite_use_address): Rewrite address uses in calls that were
28874 identified by find_address_like_use.
28876 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28877 Alan Hayward <alan.hayward@arm.com>
28878 David Sherwood <david.sherwood@arm.com>
28880 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28882 * gimple-expr.h (is_gimple_addressable: Likewise.
28883 * gimple-expr.c (is_gimple_address): Likewise.
28884 * internal-fn.c (expand_call_mem_ref): New function.
28885 (expand_mask_load_optab_fn): Use it.
28886 (expand_mask_store_optab_fn): Likewise.
28888 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28889 Alan Hayward <alan.hayward@arm.com>
28890 David Sherwood <david.sherwood@arm.com>
28892 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28893 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28894 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28895 (cond_umax@var{mode}): Document.
28896 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28897 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28898 (cond_umin_optab, cond_umax_optab): New optabs.
28899 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28900 (COND_IOR, COND_XOR): New internal functions.
28901 * internal-fn.h (get_conditional_internal_fn): Declare.
28902 * internal-fn.c (cond_binary_direct): New macro.
28903 (expand_cond_binary_optab_fn): Likewise.
28904 (direct_cond_binary_optab_supported_p): Likewise.
28905 (get_conditional_internal_fn): New function.
28906 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28907 Cope with reduction statements that are vectorized as calls rather
28909 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28910 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28911 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28912 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28913 (UNSPEC_COND_EOR): New unspecs.
28914 (optab): Add mappings for them.
28915 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28916 (sve_int_op, sve_fp_op): New int attributes.
28918 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28919 Alan Hayward <alan.hayward@arm.com>
28920 David Sherwood <david.sherwood@arm.com>
28922 * optabs.def (while_ult_optab): New optab.
28923 * doc/md.texi (while_ult@var{m}@var{n}): Document.
28924 * internal-fn.def (WHILE_ULT): New internal function.
28925 * internal-fn.h (direct_internal_fn_supported_p): New override
28926 that takes two types as argument.
28927 * internal-fn.c (while_direct): New macro.
28928 (expand_while_optab_fn): New function.
28929 (convert_optab_supported_p): Likewise.
28930 (direct_while_optab_supported_p): New macro.
28931 * wide-int.h (wi::udiv_ceil): New function.
28932 * tree-vectorizer.h (rgroup_masks): New structure.
28933 (vec_loop_masks): New typedef.
28934 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28935 and fully_masked_p.
28936 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28937 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28938 (vect_max_vf): New function.
28939 (slpeel_make_loop_iterate_ntimes): Delete.
28940 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28941 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28942 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28943 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28944 internal-fn.h, stor-layout.h and optabs-query.h.
28945 (vect_set_loop_mask): New function.
28946 (add_preheader_seq): Likewise.
28947 (add_header_seq): Likewise.
28948 (interleave_supported_p): Likewise.
28949 (vect_maybe_permute_loop_masks): Likewise.
28950 (vect_set_loop_masks_directly): Likewise.
28951 (vect_set_loop_condition_masked): Likewise.
28952 (vect_set_loop_condition_unmasked): New function, split out from
28953 slpeel_make_loop_iterate_ntimes.
28954 (slpeel_make_loop_iterate_ntimes): Rename to..
28955 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
28956 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28957 (vect_do_peeling): Update call accordingly.
28958 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28960 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28961 mask_compare_type, can_fully_mask_p and fully_masked_p.
28962 (release_vec_loop_masks): New function.
28963 (_loop_vec_info): Use it to free the loop masks.
28964 (can_produce_all_loop_masks_p): New function.
28965 (vect_get_max_nscalars_per_iter): Likewise.
28966 (vect_verify_full_masking): Likewise.
28967 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28968 retries, and free the mask rgroups before retrying. Check loop-wide
28969 reasons for disallowing fully-masked loops. Make the final decision
28970 about whether use a fully-masked loop or not.
28971 (vect_estimate_min_profitable_iters): Do not assume that peeling
28972 for the number of iterations will be needed for fully-masked loops.
28973 (vectorizable_reduction): Disable fully-masked loops.
28974 (vectorizable_live_operation): Likewise.
28975 (vect_halve_mask_nunits): New function.
28976 (vect_double_mask_nunits): Likewise.
28977 (vect_record_loop_mask): Likewise.
28978 (vect_get_loop_mask): Likewise.
28979 (vect_transform_loop): Handle the case in which the final loop
28980 iteration might handle a partial vector. Call vect_set_loop_condition
28981 instead of slpeel_make_loop_iterate_ntimes.
28982 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28983 (check_load_store_masking): New function.
28984 (prepare_load_store_mask): Likewise.
28985 (vectorizable_store): Handle fully-masked loops.
28986 (vectorizable_load): Likewise.
28987 (supportable_widening_operation): Use vect_halve_mask_nunits for
28989 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28990 (vect_gen_while): New function.
28991 * config/aarch64/aarch64.md (umax<mode>3): New expander.
28992 (aarch64_uqdec<mode>): New insn.
28994 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28995 Alan Hayward <alan.hayward@arm.com>
28996 David Sherwood <david.sherwood@arm.com>
28998 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28999 (reduc_xor_scal_optab): New optabs.
29000 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
29001 (reduc_xor_scal_@var{m}): Document.
29002 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
29003 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
29004 internal functions.
29005 * fold-const-call.c (fold_const_call): Handle them.
29006 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
29007 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
29008 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
29009 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
29010 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
29011 (UNSPEC_XORV): New unspecs.
29012 (optab): Add entries for them.
29013 (BITWISEV): New int iterator.
29014 (bit_reduc_op): New int attributes.
29016 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29017 Alan Hayward <alan.hayward@arm.com>
29018 David Sherwood <david.sherwood@arm.com>
29020 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
29021 * internal-fn.def (VEC_SHL_INSERT): New internal function.
29022 * optabs.def (vec_shl_insert_optab): New optab.
29023 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
29024 (duplicate_and_interleave): Likewise.
29025 * tree-vect-loop.c: Include internal-fn.h.
29026 (neutral_op_for_slp_reduction): New function, split out from
29027 get_initial_defs_for_reduction.
29028 (get_initial_def_for_reduction): Handle option 2 for variable-length
29029 vectors by loading the neutral value into a vector and then shifting
29030 the initial value into element 0.
29031 (get_initial_defs_for_reduction): Replace the code argument with
29032 the neutral value calculated by neutral_op_for_slp_reduction.
29033 Use gimple_build_vector for constant-length vectors.
29034 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
29035 but the first group_size elements have a neutral value.
29036 Use duplicate_and_interleave otherwise.
29037 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
29038 Update call to get_initial_defs_for_reduction. Handle SLP
29039 reductions for variable-length vectors by creating one vector
29040 result for each scalar result, with the elements associated
29041 with other scalar results stubbed out with the neutral value.
29042 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
29043 Require IFN_VEC_SHL_INSERT for double reductions on
29044 variable-length vectors, or SLP reductions that have
29045 a neutral value. Require can_duplicate_and_interleave_p
29046 support for variable-length unchained SLP reductions if there
29047 is no neutral value, such as for MIN/MAX reductions. Also require
29048 the number of vector elements to be a multiple of the number of
29049 SLP statements when doing variable-length unchained SLP reductions.
29050 Update call to vect_create_epilog_for_reduction.
29051 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
29052 and remove initial values.
29053 (duplicate_and_interleave): Make public.
29054 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
29055 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
29057 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29058 Alan Hayward <alan.hayward@arm.com>
29059 David Sherwood <david.sherwood@arm.com>
29061 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
29062 (can_duplicate_and_interleave_p): New function.
29063 (vect_get_and_check_slp_defs): Take the vector of statements
29064 rather than just the current one. Remove excess parentheses.
29065 Restriction rejectinon of vect_constant_def and vect_external_def
29066 for variable-length vectors to boolean types, or types for which
29067 can_duplicate_and_interleave_p is false.
29068 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
29069 (duplicate_and_interleave): New function.
29070 (vect_get_constant_vectors): Use gimple_build_vector for
29071 constant-length vectors and suitable variable-length constant
29072 vectors. Use duplicate_and_interleave for other variable-length
29073 vectors. Don't defer the update when inserting new statements.
29075 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29076 Alan Hayward <alan.hayward@arm.com>
29077 David Sherwood <david.sherwood@arm.com>
29079 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
29080 min_profitable_iters doesn't go negative.
29082 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29083 Alan Hayward <alan.hayward@arm.com>
29084 David Sherwood <david.sherwood@arm.com>
29086 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
29087 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
29088 * optabs.def (vec_mask_load_lanes_optab): New optab.
29089 (vec_mask_store_lanes_optab): Likewise.
29090 * internal-fn.def (MASK_LOAD_LANES): New internal function.
29091 (MASK_STORE_LANES): Likewise.
29092 * internal-fn.c (mask_load_lanes_direct): New macro.
29093 (mask_store_lanes_direct): Likewise.
29094 (expand_mask_load_optab_fn): Handle masked operations.
29095 (expand_mask_load_lanes_optab_fn): New macro.
29096 (expand_mask_store_optab_fn): Handle masked operations.
29097 (expand_mask_store_lanes_optab_fn): New macro.
29098 (direct_mask_load_lanes_optab_supported_p): Likewise.
29099 (direct_mask_store_lanes_optab_supported_p): Likewise.
29100 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
29102 (vect_load_lanes_supported): Likewise.
29103 * tree-vect-data-refs.c (strip_conversion): New function.
29104 (can_group_stmts_p): Likewise.
29105 (vect_analyze_data_ref_accesses): Use it instead of checking
29106 for a pair of assignments.
29107 (vect_store_lanes_supported): Take a masked_p parameter.
29108 (vect_load_lanes_supported): Likewise.
29109 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
29110 vect_store_lanes_supported and vect_load_lanes_supported.
29111 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
29112 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
29113 parameter. Don't allow gaps for masked accesses.
29114 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
29115 and vect_load_lanes_supported.
29116 (get_load_store_type): Take a masked_p parameter and update
29117 call to get_group_load_store_type.
29118 (vectorizable_store): Update call to get_load_store_type.
29119 Handle IFN_MASK_STORE_LANES.
29120 (vectorizable_load): Update call to get_load_store_type.
29121 Handle IFN_MASK_LOAD_LANES.
29123 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29124 Alan Hayward <alan.hayward@arm.com>
29125 David Sherwood <david.sherwood@arm.com>
29127 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
29129 * config/aarch64/aarch64-protos.h
29130 (aarch64_sve_struct_memory_operand_p): Declare.
29131 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
29132 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
29133 (VPRED, vpred): Handle SVE structure modes.
29134 * config/aarch64/constraints.md (Utx): New constraint.
29135 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
29136 (aarch64_sve_struct_nonimmediate_operand): New predicates.
29137 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
29138 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
29139 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
29140 structure modes. Split into pieces after RA.
29141 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
29142 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
29144 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
29145 SVE structure modes.
29146 (aarch64_classify_address): Likewise.
29147 (sizetochar): Move earlier in file.
29148 (aarch64_print_operand): Handle SVE register lists.
29149 (aarch64_array_mode): New function.
29150 (aarch64_sve_struct_memory_operand_p): Likewise.
29151 (TARGET_ARRAY_MODE): Redefine.
29153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29154 Alan Hayward <alan.hayward@arm.com>
29155 David Sherwood <david.sherwood@arm.com>
29157 * target.def (array_mode): New target hook.
29158 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
29159 * doc/tm.texi: Regenerate.
29160 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
29161 * hooks.c (hook_optmode_mode_uhwi_none): New function.
29162 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
29163 targetm.array_mode.
29164 * stor-layout.c (mode_for_array): Likewise. Support polynomial
29167 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29168 Alan Hayward <alan.hayward@arm.com>
29169 David Sherwood <david.sherwood@arm.com>
29171 * fold-const.c (fold_binary_loc): Check the argument types
29172 rather than the result type when testing for a vector operation.
29174 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29176 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
29177 * doc/tm.texi: Regenerate.
29179 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29180 Alan Hayward <alan.hayward@arm.com>
29181 David Sherwood <david.sherwood@arm.com>
29183 * doc/invoke.texi (-msve-vector-bits=): Document new option.
29184 (sve): Document new AArch64 extension.
29185 * doc/md.texi (w): Extend the description of the AArch64
29186 constraint to include SVE vectors.
29187 (Upl, Upa): Document new AArch64 predicate constraints.
29188 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
29190 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
29191 (msve-vector-bits=): New option.
29192 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
29193 SVE when these are disabled.
29194 (sve): New extension.
29195 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
29196 modes. Adjust their number of units based on aarch64_sve_vg.
29197 (MAX_BITSIZE_MODE_ANY_MODE): Define.
29198 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
29199 aarch64_addr_query_type.
29200 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29201 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29202 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29203 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29204 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29205 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29206 (aarch64_simd_imm_zero_p): Delete.
29207 (aarch64_check_zero_based_sve_index_immediate): Declare.
29208 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29209 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29210 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29211 (aarch64_sve_float_mul_immediate_p): Likewise.
29212 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29213 rather than an rtx.
29214 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
29215 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
29216 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
29217 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
29218 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
29219 (aarch64_regmode_natural_size): Likewise.
29220 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
29221 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
29223 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
29224 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
29225 for VG and the SVE predicate registers.
29226 (V_ALIASES): Add a "z"-prefixed alias.
29227 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
29228 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
29229 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
29230 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
29231 (REG_CLASS_NAMES): Add entries for them.
29232 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
29233 and the predicate registers.
29234 (aarch64_sve_vg): Declare.
29235 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
29236 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
29237 (REGMODE_NATURAL_SIZE): Define.
29238 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
29240 * config/aarch64/aarch64.c: Include cfgrtl.h.
29241 (simd_immediate_info): Add a constructor for series vectors,
29242 and an associated step field.
29243 (aarch64_sve_vg): New variable.
29244 (aarch64_dbx_register_number): Handle VG and the predicate registers.
29245 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29246 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29247 (VEC_ANY_DATA, VEC_STRUCT): New constants.
29248 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29249 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29250 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29251 (aarch64_get_mask_mode): New functions.
29252 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29253 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29254 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
29255 predicate modes and predicate registers. Explicitly restrict
29256 GPRs to modes of 16 bytes or smaller. Only allow FP registers
29257 to store a vector mode if it is recognized by
29258 aarch64_classify_vector_mode.
29259 (aarch64_regmode_natural_size): New function.
29260 (aarch64_hard_regno_caller_save_mode): Return the original mode
29262 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29263 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29264 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29265 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29267 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
29268 does not overlap dest if the function is frame-related. Handle
29270 (aarch64_split_add_offset): New function.
29271 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29272 them aarch64_add_offset.
29273 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29274 and update call to aarch64_sub_sp.
29275 (aarch64_add_cfa_expression): New function.
29276 (aarch64_expand_prologue): Pass extra temporary registers to the
29277 functions above. Handle the case in which we need to emit new
29278 DW_CFA_expressions for registers that were originally saved
29279 relative to the stack pointer, but now have to be expressed
29280 relative to the frame pointer.
29281 (aarch64_output_mi_thunk): Pass extra temporary registers to the
29283 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
29284 IP0 and IP1 values for SVE frames.
29285 (aarch64_expand_vec_series): New function.
29286 (aarch64_expand_sve_widened_duplicate): Likewise.
29287 (aarch64_expand_sve_const_vector): Likewise.
29288 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29289 Handle SVE constants. Use emit_move_insn to move a force_const_mem
29290 into the register, rather than emitting a SET directly.
29291 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29292 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29293 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29294 (offset_9bit_signed_scaled_p): New functions.
29295 (aarch64_replicate_bitmask_imm): New function.
29296 (aarch64_bitmask_imm): Use it.
29297 (aarch64_cannot_force_const_mem): Reject expressions involving
29298 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
29299 (aarch64_classify_index): Handle SVE indices, by requiring
29300 a plain register index with a scale that matches the element size.
29301 (aarch64_classify_address): Handle SVE addresses. Assert that
29302 the mode of the address is VOIDmode or an integer mode.
29303 Update call to aarch64_classify_symbol.
29304 (aarch64_classify_symbolic_expression): Update call to
29305 aarch64_classify_symbol.
29306 (aarch64_const_vec_all_in_range_p): New function.
29307 (aarch64_print_vector_float_operand): Likewise.
29308 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
29309 "vN" for FP registers with SVE modes. Handle (const ...) vectors
29310 and the FP immediates 1.0 and 0.5.
29311 (aarch64_print_address_internal): Handle SVE addresses.
29312 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29313 (aarch64_regno_regclass): Handle predicate registers.
29314 (aarch64_secondary_reload): Handle big-endian reloads of SVE
29316 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29317 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29318 (aarch64_convert_sve_vector_bits): New function.
29319 (aarch64_override_options): Use it to handle -msve-vector-bits=.
29320 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29321 rather than an rtx.
29322 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29323 Handle SVE vector and predicate modes. Accept VL-based constants
29324 that need only one temporary register, and VL offsets that require
29325 no temporary registers.
29326 (aarch64_conditional_register_usage): Mark the predicate registers
29327 as fixed if SVE isn't available.
29328 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29329 Return true for SVE vector and predicate modes.
29330 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29331 rather than an unsigned int. Handle SVE modes.
29332 (aarch64_preferred_simd_mode): Update call accordingly. Handle
29334 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29336 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29337 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29338 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29339 (aarch64_sve_float_mul_immediate_p): New functions.
29340 (aarch64_sve_valid_immediate): New function.
29341 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29342 Explicitly reject structure modes. Check for INDEX constants.
29343 Handle PTRUE and PFALSE constants.
29344 (aarch64_check_zero_based_sve_index_immediate): New function.
29345 (aarch64_simd_imm_zero_p): Delete.
29346 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29347 vector modes. Accept constants in the range of CNT[BHWD].
29348 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29349 ask for an Advanced SIMD mode.
29350 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29351 (aarch64_simd_vector_alignment): Handle SVE predicates.
29352 (aarch64_vectorize_preferred_vector_alignment): New function.
29353 (aarch64_simd_vector_alignment_reachable): Use it instead of
29355 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29356 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29358 (MAX_VECT_LEN): Delete.
29359 (expand_vec_perm_d): Add a vec_flags field.
29360 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29361 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29362 (aarch64_evpc_ext): Don't apply a big-endian lane correction
29364 (aarch64_evpc_rev): Rename to...
29365 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
29366 (aarch64_evpc_rev_global): New function.
29367 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29368 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29370 (aarch64_evpc_sve_tbl): New function.
29371 (aarch64_expand_vec_perm_const_1): Update after rename of
29372 aarch64_evpc_rev. Handle SVE permutes too, trying
29373 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29374 than aarch64_evpc_tbl.
29375 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29376 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29377 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29378 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29379 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29380 (aarch64_expand_sve_vcond): New functions.
29381 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29382 of aarch64_vector_mode_p.
29383 (aarch64_dwarf_poly_indeterminate_value): New function.
29384 (aarch64_compute_pressure_classes): Likewise.
29385 (aarch64_can_change_mode_class): Likewise.
29386 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29387 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29388 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29389 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29390 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29391 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29392 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29393 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29395 (Dn, Dl, Dr): Accept const as well as const_vector.
29396 (Dz): Likewise. Compare against CONST0_RTX.
29397 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29398 of "vector" where appropriate.
29399 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29400 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29401 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29402 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29403 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29404 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29405 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29406 (v_int_equiv): Extend to SVE modes.
29407 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29409 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29410 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29411 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29412 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29413 (SVE_COND_FP_CMP): New int iterators.
29414 (perm_hilo): Handle the new unpack unspecs.
29415 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29417 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29418 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29419 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29420 (aarch64_equality_operator, aarch64_constant_vector_operand)
29421 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29422 (aarch64_sve_nonimmediate_operand): Likewise.
29423 (aarch64_sve_general_operand): Likewise.
29424 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29425 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29426 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29427 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29428 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29429 (aarch64_sve_float_arith_immediate): Likewise.
29430 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29431 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29432 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29433 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29434 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29435 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29436 (aarch64_sve_float_arith_operand): Likewise.
29437 (aarch64_sve_float_arith_with_sub_operand): Likewise.
29438 (aarch64_sve_float_mul_operand): Likewise.
29439 (aarch64_sve_vec_perm_operand): Likewise.
29440 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29441 (aarch64_mov_operand): Accept const_poly_int and const_vector.
29442 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29443 as well as const_vector.
29444 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29445 in file. Use CONST0_RTX and CONSTM1_RTX.
29446 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
29447 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29448 Use aarch64_simd_imm_zero.
29449 * config/aarch64/aarch64-sve.md: New file.
29450 * config/aarch64/aarch64.md: Include it.
29451 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29452 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29453 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29454 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29455 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29456 (sve): New attribute.
29457 (enabled): Disable instructions with the sve attribute unless
29459 (movqi, movhi): Pass CONST_POLY_INT operaneds through
29460 aarch64_expand_mov_immediate.
29461 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29462 CNT[BHSD] immediates.
29463 (movti): Split CONST_POLY_INT moves into two halves.
29464 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29465 Split additions that need a temporary here if the destination
29466 is the stack pointer.
29467 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29468 (*add<mode>3_poly_1): New instruction.
29469 (set_clobber_cc): New expander.
29471 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29473 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29474 parameter and use it instead of GET_MODE_SIZE (innermode). Use
29475 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29476 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29477 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
29478 Change innermode from fixed_mode_size to machine_mode.
29479 (simplify_subreg): Update call accordingly. Handle a constant-sized
29480 subreg of a variable-length CONST_VECTOR.
29482 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29483 Alan Hayward <alan.hayward@arm.com>
29484 David Sherwood <david.sherwood@arm.com>
29486 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29487 (add_offset_to_base): New function, split out from...
29488 (create_mem_ref): ...here. When handling a scale other than 1,
29489 check first whether the address is valid without the offset.
29490 Add it into the base if so, leaving the index and scale as-is.
29492 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29495 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29496 fold_for_warn before checking if arg2 is INTEGER_CST.
29498 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
29500 * config/rs6000/predicates.md (load_multiple_operation): Delete.
29501 (store_multiple_operation): Delete.
29502 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29503 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29504 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29505 guarded by TARGET_STRING.
29506 (rs6000_output_load_multiple): Delete.
29507 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29508 OPTION_MASK_STRING / TARGET_STRING handling.
29509 (print_operand) <'N', 'O'>: Add comment that these are unused now.
29510 (const rs6000_opt_masks) <"string">: Change mask to 0.
29511 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29512 (MASK_STRING): Delete.
29513 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29515 (load_multiple): Delete.
29522 (store_multiple): Delete.
29529 (movmemsi_8reg): Delete.
29530 (corresponding unnamed define_insn): Delete.
29531 (movmemsi_6reg): Delete.
29532 (corresponding unnamed define_insn): Delete.
29533 (movmemsi_4reg): Delete.
29534 (corresponding unnamed define_insn): Delete.
29535 (movmemsi_2reg): Delete.
29536 (corresponding unnamed define_insn): Delete.
29537 (movmemsi_1reg): Delete.
29538 (corresponding unnamed define_insn): Delete.
29539 * config/rs6000/rs6000.opt (mno-string): New.
29540 (mstring): Replace by deprecation warning stub.
29541 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29543 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29545 * regrename.c (regrename_do_replace): If replacing the same
29546 reg multiple times, try to reuse last created gen_raw_REG.
29549 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29550 main to workaround a bug in GDB.
29552 2018-01-12 Tom de Vries <tom@codesourcery.com>
29555 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29557 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29559 PR rtl-optimization/80481
29560 * ira-color.c (get_cap_member): New function.
29561 (allocnos_conflict_by_live_ranges_p): Use it.
29562 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29563 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29565 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29568 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29569 (*saddl_se_1): Ditto.
29570 (*ssubsi_1): Ditto.
29571 (*ssubl_se_1): Ditto.
29573 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29575 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29576 rather than wi::to_widest for DR_INITs.
29577 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29578 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29579 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29581 (vect_analyze_group_access_1): Note that here.
29583 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29585 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29586 polynomial type sizes.
29588 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29590 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29591 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29592 (gimple_add_tmp_var): Likewise.
29594 2018-01-12 Martin Liska <mliska@suse.cz>
29596 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29597 (gimple_alloc_sizes): Likewise.
29598 (dump_gimple_statistics): Use PRIu64 in printf format.
29599 * gimple.h: Change uint64_t to int.
29601 2018-01-12 Martin Liska <mliska@suse.cz>
29603 * tree-core.h: Use uint64_t instead of int.
29604 * tree.c (tree_node_counts): Likewise.
29605 (tree_node_sizes): Likewise.
29606 (dump_tree_statistics): Use PRIu64 in printf format.
29608 2018-01-12 Martin Liska <mliska@suse.cz>
29610 * Makefile.in: As qsort_chk is implemented in vec.c, add
29611 vec.o to linkage of gencfn-macros.
29612 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29613 passing the info to record_node_allocation_statistics.
29614 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29616 * ggc-common.c (struct ggc_usage): Add operator== and use
29617 it in operator< and compare function.
29618 * mem-stats.h (struct mem_usage): Likewise.
29619 * vec.c (struct vec_usage): Remove operator< and compare
29620 function. Can be simply inherited.
29622 2018-01-12 Martin Jambor <mjambor@suse.cz>
29625 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29626 * tree-ssa-math-opts.c: Include domwalk.h.
29627 (convert_mult_to_fma_1): New function.
29628 (fma_transformation_info): New type.
29629 (fma_deferring_state): Likewise.
29630 (cancel_fma_deferring): New function.
29631 (result_of_phi): Likewise.
29632 (last_fma_candidate_feeds_initial_phi): Likewise.
29633 (convert_mult_to_fma): Added deferring logic, split actual
29634 transformation to convert_mult_to_fma_1.
29635 (math_opts_dom_walker): New type.
29636 (math_opts_dom_walker::after_dom_children): New method, body moved
29637 here from pass_optimize_widening_mul::execute, added deferring logic
29639 (pass_optimize_widening_mul::execute): Moved most of code to
29640 math_opts_dom_walker::after_dom_children.
29641 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29642 * config/i386/i386.c (ix86_option_override_internal): Added
29643 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29645 2018-01-12 Richard Biener <rguenther@suse.de>
29648 * dwarf2out.c (gen_variable_die): Do not reset old_die for
29649 inline instance vars.
29651 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
29654 * config/rx/rx.c (rx_is_restricted_memory_address):
29655 Handle SUBREG case.
29657 2018-01-12 Richard Biener <rguenther@suse.de>
29659 PR tree-optimization/80846
29660 * target.def (split_reduction): New target hook.
29661 * targhooks.c (default_split_reduction): New function.
29662 * targhooks.h (default_split_reduction): Declare.
29663 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29664 target requests first reduce vectors by combining low and high
29666 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29667 (get_vectype_for_scalar_type_and_size): Export.
29668 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29669 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29670 * doc/tm.texi: Regenerate.
29671 * config/i386/i386.c (ix86_split_reduction): Implement
29672 TARGET_VECTORIZE_SPLIT_REDUCTION.
29674 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29677 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29678 in PIC mode except for TARGET_VXWORKS_RTP.
29679 * config/sparc/sparc.c: Include cfgrtl.h.
29680 (TARGET_INIT_PIC_REG): Define.
29681 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29682 (sparc_pic_register_p): New predicate.
29683 (sparc_legitimate_address_p): Use it.
29684 (sparc_legitimize_pic_address): Likewise.
29685 (sparc_delegitimize_address): Likewise.
29686 (sparc_mode_dependent_address_p): Likewise.
29687 (gen_load_pcrel_sym): Remove 4th parameter.
29688 (load_got_register): Adjust call to above. Remove obsolete stuff.
29689 (sparc_expand_prologue): Do not call load_got_register here.
29690 (sparc_flat_expand_prologue): Likewise.
29691 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29692 (sparc_use_pseudo_pic_reg): New function.
29693 (sparc_init_pic_reg): Likewise.
29694 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29695 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29697 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
29699 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29700 Add item for branch_cost.
29702 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29704 PR rtl-optimization/83565
29705 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29706 not extend the result to a larger mode for rotate operations.
29707 (num_sign_bit_copies1): Likewise.
29709 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29712 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29714 Use values-Xc.o for -pedantic.
29715 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29717 2018-01-12 Martin Liska <mliska@suse.cz>
29720 * ipa-devirt.c (final_warning_record::grow_type_warnings):
29722 (possible_polymorphic_call_targets): Use it.
29723 (ipa_devirt): Likewise.
29725 2018-01-12 Martin Liska <mliska@suse.cz>
29727 * profile-count.h (enum profile_quality): Use 0 as invalid
29728 enum value of profile_quality.
29730 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
29732 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29733 -mext-string options.
29735 2018-01-12 Richard Biener <rguenther@suse.de>
29737 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29738 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29739 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29741 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29743 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
29745 * configure.ac (--with-long-double-format): Add support for the
29746 configuration option to change the default long double format on
29748 * config.gcc (powerpc*-linux*-*): Likewise.
29749 * configure: Regenerate.
29750 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29751 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29752 used without modification.
29754 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29756 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29757 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29758 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29759 MISC_BUILTIN_SPEC_BARRIER.
29760 (rs6000_init_builtins): Likewise.
29761 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29763 (speculation_barrier): New define_insn.
29764 * doc/extend.texi: Document __builtin_speculation_barrier.
29766 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29769 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29770 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29771 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29773 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
29774 integral modes instead of "ss" and "sd".
29775 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29776 vectors with 32-bit and 64-bit elements.
29777 (vecdupssescalarmodesuffix): New mode attribute.
29778 (vec_dup<mode>): Use it.
29780 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
29783 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29784 frame if argument is passed on stack.
29786 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29789 * ree.c (combine_reaching_defs): Optimize also
29790 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29791 reg2=any_extend(exp); reg1=reg2;, formatting fix.
29793 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29795 PR middle-end/83189
29796 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29798 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29800 PR middle-end/83718
29801 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29802 after they are computed.
29804 2018-01-11 Bin Cheng <bin.cheng@arm.com>
29806 PR tree-optimization/83695
29807 * gimple-loop-linterchange.cc
29808 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29809 reset cached scev information after interchange.
29810 (pass_linterchange::execute): Remove call to scev_reset_htab.
29812 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29814 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29815 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29816 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29817 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29818 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29819 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29820 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29821 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29822 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29823 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29824 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29825 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29826 (V_lane_reg): Likewise.
29827 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29829 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29830 (vfmal_lane_low<mode>_intrinsic,
29831 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29832 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29833 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29834 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29835 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29836 vfmsl_lane_high<mode>_intrinsic): New define_insns.
29838 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29840 * config/arm/arm-cpus.in (fp16fml): New feature.
29841 (ALL_SIMD): Add fp16fml.
29842 (armv8.2-a): Add fp16fml as an option.
29843 (armv8.3-a): Likewise.
29844 (armv8.4-a): Add fp16fml as part of fp16.
29845 * config/arm/arm.h (TARGET_FP16FML): Define.
29846 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29848 * config/arm/arm-modes.def (V2HF): Define.
29849 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29850 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29851 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29852 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29853 vfmsl_low, vfmsl_high): New set of builtins.
29854 * config/arm/iterators.md (PLUSMINUS): New code iterator.
29855 (vfml_op): New code attribute.
29856 (VFMLHALVES): New int iterator.
29857 (VFML, VFMLSEL): New mode attributes.
29858 (V_reg): Define mapping for V2HF.
29859 (V_hi, V_lo): New mode attributes.
29860 (VF_constraint): Likewise.
29861 (vfml_half, vfml_half_selector): New int attributes.
29862 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29864 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29865 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29867 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29868 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29869 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29870 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
29872 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29873 Document new effective target and option set.
29875 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29877 * config/arm/arm-cpus.in (armv8_4): New feature.
29878 (ARMv8_4a): New fgroup.
29879 (armv8.4-a): New arch.
29880 * config/arm/arm-tables.opt: Regenerate.
29881 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29882 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29883 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29884 Add matching rules for -march=armv8.4-a and extensions.
29885 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29887 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
29890 * config/rx/rx.md (BW): New mode attribute.
29891 (sync_lock_test_and_setsi): Add mode suffix to insn output.
29893 2018-01-11 Richard Biener <rguenther@suse.de>
29895 PR tree-optimization/83435
29896 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29897 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29898 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29900 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29901 Alan Hayward <alan.hayward@arm.com>
29902 David Sherwood <david.sherwood@arm.com>
29904 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29906 (aarch64_classify_address): Initialize it. Track polynomial offsets.
29907 (aarch64_print_address_internal): Use it to check for a zero offset.
29909 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29910 Alan Hayward <alan.hayward@arm.com>
29911 David Sherwood <david.sherwood@arm.com>
29913 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29914 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29915 Return a poly_int64 rather than a HOST_WIDE_INT.
29916 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29917 rather than a HOST_WIDE_INT.
29918 * config/aarch64/aarch64.h (aarch64_frame): Protect with
29919 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
29920 hard_fp_offset, frame_size, initial_adjust, callee_offset and
29921 final_offset from HOST_WIDE_INT to poly_int64.
29922 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29923 to_constant when getting the number of units in an Advanced SIMD
29925 (aarch64_builtin_vectorized_function): Check for a constant number
29927 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29929 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29930 attribute instead of GET_MODE_NUNITS.
29931 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29932 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29933 GET_MODE_SIZE for fixed-size registers.
29934 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29935 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29936 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29937 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29938 (aarch64_print_operand, aarch64_print_address_internal)
29939 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29940 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29941 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29942 Handle polynomial GET_MODE_SIZE.
29943 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
29944 wider than SImode without modification.
29945 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29946 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29947 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29948 passing and returning SVE modes.
29949 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29950 rather than GEN_INT.
29951 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29952 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29953 (aarch64_allocate_and_probe_stack_space): Likewise.
29954 (aarch64_layout_frame): Cope with polynomial offsets.
29955 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29956 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
29957 polynomial offsets.
29958 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29959 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29960 poly_int64 rather than a HOST_WIDE_INT.
29961 (aarch64_get_separate_components, aarch64_process_components)
29962 (aarch64_expand_prologue, aarch64_expand_epilogue)
29963 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29964 (aarch64_anchor_offset): New function, split out from...
29965 (aarch64_legitimize_address): ...here.
29966 (aarch64_builtin_vectorization_cost): Handle polynomial
29967 TYPE_VECTOR_SUBPARTS.
29968 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29970 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29971 number of elements from the PARALLEL rather than the mode.
29972 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29973 rather than GET_MODE_BITSIZE.
29974 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29975 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29976 (aarch64_expand_vec_perm_const_1): Handle polynomial
29977 d->perm.length () and d->perm elements.
29978 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
29979 Apply to_constant to d->perm elements.
29980 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29981 polynomial CONST_VECTOR_NUNITS.
29982 (aarch64_move_pointer): Take amount as a poly_int64 rather
29984 (aarch64_progress_pointer): Avoid temporary variable.
29985 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29986 the mode attribute instead of GET_MODE.
29988 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29989 Alan Hayward <alan.hayward@arm.com>
29990 David Sherwood <david.sherwood@arm.com>
29992 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29993 x exists before using it.
29994 (aarch64_add_constant_internal): Rename to...
29995 (aarch64_add_offset_1): ...this. Replace regnum with separate
29996 src and dest rtxes. Handle the case in which they're different,
29997 including when the offset is zero. Replace scratchreg with an rtx.
29998 Use 2 additions if there is no spare register into which we can
29999 move a 16-bit constant.
30000 (aarch64_add_constant): Delete.
30001 (aarch64_add_offset): Replace reg with separate src and dest
30002 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
30003 Use aarch64_add_offset_1.
30004 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
30005 an rtx rather than an int. Take the delta as a poly_int64
30006 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
30007 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
30008 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
30009 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
30010 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
30011 and aarch64_add_sp.
30012 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
30013 aarch64_add_constant.
30015 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30017 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
30018 Use scalar_float_mode.
30020 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30022 * config/aarch64/aarch64-simd.md
30023 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
30024 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
30025 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
30026 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
30027 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
30028 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
30029 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
30030 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
30031 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
30032 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
30034 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30037 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
30038 targ_options->x_arm_arch_string is non NULL.
30040 2018-01-11 Tamar Christina <tamar.christina@arm.com>
30042 * config/aarch64/aarch64.h
30043 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
30045 2018-01-11 Sudakshina Das <sudi.das@arm.com>
30048 * expmed.c (emit_store_flag_force): Swap if const op0
30049 and change VOIDmode to mode of op0.
30051 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30053 PR rtl-optimization/83761
30054 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
30055 than bytes to mode_for_size.
30057 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30059 PR middle-end/83189
30060 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
30061 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
30064 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30066 PR middle-end/83575
30067 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
30068 when in layout mode.
30069 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
30070 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
30073 2018-01-10 Michael Collison <michael.collison@arm.com>
30075 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
30076 * config/aarch64/aarch64-option-extension.def: Add
30077 AARCH64_OPT_EXTENSION of 'fp16fml'.
30078 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30079 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
30080 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
30081 * config/aarch64/constraints.md (Ui7): New constraint.
30082 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
30083 (VFMLA_SEL_W): Ditto.
30086 (VFMLA16_LOW): New int iterator.
30087 (VFMLA16_HIGH): Ditto.
30088 (UNSPEC_FMLAL): New unspec.
30089 (UNSPEC_FMLSL): Ditto.
30090 (UNSPEC_FMLAL2): Ditto.
30091 (UNSPEC_FMLSL2): Ditto.
30092 (f16mac): New code attribute.
30093 * config/aarch64/aarch64-simd-builtins.def
30094 (aarch64_fmlal_lowv2sf): Ditto.
30095 (aarch64_fmlsl_lowv2sf): Ditto.
30096 (aarch64_fmlalq_lowv4sf): Ditto.
30097 (aarch64_fmlslq_lowv4sf): Ditto.
30098 (aarch64_fmlal_highv2sf): Ditto.
30099 (aarch64_fmlsl_highv2sf): Ditto.
30100 (aarch64_fmlalq_highv4sf): Ditto.
30101 (aarch64_fmlslq_highv4sf): Ditto.
30102 (aarch64_fmlal_lane_lowv2sf): Ditto.
30103 (aarch64_fmlsl_lane_lowv2sf): Ditto.
30104 (aarch64_fmlal_laneq_lowv2sf): Ditto.
30105 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
30106 (aarch64_fmlalq_lane_lowv4sf): Ditto.
30107 (aarch64_fmlsl_lane_lowv4sf): Ditto.
30108 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
30109 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
30110 (aarch64_fmlal_lane_highv2sf): Ditto.
30111 (aarch64_fmlsl_lane_highv2sf): Ditto.
30112 (aarch64_fmlal_laneq_highv2sf): Ditto.
30113 (aarch64_fmlsl_laneq_highv2sf): Ditto.
30114 (aarch64_fmlalq_lane_highv4sf): Ditto.
30115 (aarch64_fmlsl_lane_highv4sf): Ditto.
30116 (aarch64_fmlalq_laneq_highv4sf): Ditto.
30117 (aarch64_fmlsl_laneq_highv4sf): Ditto.
30118 * config/aarch64/aarch64-simd.md:
30119 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
30120 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30121 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
30122 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30123 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
30124 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
30125 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
30126 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
30127 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
30128 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
30129 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
30130 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
30131 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
30132 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
30133 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
30134 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
30135 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
30136 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
30137 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
30138 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
30139 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
30140 (vfmlsl_low_u32): Ditto.
30141 (vfmlalq_low_u32): Ditto.
30142 (vfmlslq_low_u32): Ditto.
30143 (vfmlal_high_u32): Ditto.
30144 (vfmlsl_high_u32): Ditto.
30145 (vfmlalq_high_u32): Ditto.
30146 (vfmlslq_high_u32): Ditto.
30147 (vfmlal_lane_low_u32): Ditto.
30148 (vfmlsl_lane_low_u32): Ditto.
30149 (vfmlal_laneq_low_u32): Ditto.
30150 (vfmlsl_laneq_low_u32): Ditto.
30151 (vfmlalq_lane_low_u32): Ditto.
30152 (vfmlslq_lane_low_u32): Ditto.
30153 (vfmlalq_laneq_low_u32): Ditto.
30154 (vfmlslq_laneq_low_u32): Ditto.
30155 (vfmlal_lane_high_u32): Ditto.
30156 (vfmlsl_lane_high_u32): Ditto.
30157 (vfmlal_laneq_high_u32): Ditto.
30158 (vfmlsl_laneq_high_u32): Ditto.
30159 (vfmlalq_lane_high_u32): Ditto.
30160 (vfmlslq_lane_high_u32): Ditto.
30161 (vfmlalq_laneq_high_u32): Ditto.
30162 (vfmlslq_laneq_high_u32): Ditto.
30163 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
30164 (AARCH64_FL_FOR_ARCH8_4): New.
30165 (AARCH64_ISA_F16FML): New ISA flag.
30166 (TARGET_F16FML): New feature flag for fp16fml.
30167 (doc/invoke.texi): Document new fp16fml option.
30169 2018-01-10 Michael Collison <michael.collison@arm.com>
30171 * config/aarch64/aarch64-builtins.c:
30172 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
30173 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30174 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
30175 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
30176 (AARCH64_ISA_SHA3): New ISA flag.
30177 (TARGET_SHA3): New feature flag for sha3.
30178 * config/aarch64/iterators.md (sha512_op): New int attribute.
30179 (CRYPTO_SHA512): New int iterator.
30180 (UNSPEC_SHA512H): New unspec.
30181 (UNSPEC_SHA512H2): Ditto.
30182 (UNSPEC_SHA512SU0): Ditto.
30183 (UNSPEC_SHA512SU1): Ditto.
30184 * config/aarch64/aarch64-simd-builtins.def
30185 (aarch64_crypto_sha512hqv2di): New builtin.
30186 (aarch64_crypto_sha512h2qv2di): Ditto.
30187 (aarch64_crypto_sha512su0qv2di): Ditto.
30188 (aarch64_crypto_sha512su1qv2di): Ditto.
30189 (aarch64_eor3qv8hi): Ditto.
30190 (aarch64_rax1qv2di): Ditto.
30191 (aarch64_xarqv2di): Ditto.
30192 (aarch64_bcaxqv8hi): Ditto.
30193 * config/aarch64/aarch64-simd.md:
30194 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
30195 (aarch64_crypto_sha512su0qv2di): Ditto.
30196 (aarch64_crypto_sha512su1qv2di): Ditto.
30197 (aarch64_eor3qv8hi): Ditto.
30198 (aarch64_rax1qv2di): Ditto.
30199 (aarch64_xarqv2di): Ditto.
30200 (aarch64_bcaxqv8hi): Ditto.
30201 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
30202 (vsha512h2q_u64): Ditto.
30203 (vsha512su0q_u64): Ditto.
30204 (vsha512su1q_u64): Ditto.
30205 (veor3q_u16): Ditto.
30206 (vrax1q_u64): Ditto.
30207 (vxarq_u64): Ditto.
30208 (vbcaxq_u16): Ditto.
30209 * config/arm/types.md (crypto_sha512): New type attribute.
30210 (crypto_sha3): Ditto.
30211 (doc/invoke.texi): Document new sha3 option.
30213 2018-01-10 Michael Collison <michael.collison@arm.com>
30215 * config/aarch64/aarch64-builtins.c:
30216 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
30217 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30218 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
30219 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
30220 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
30221 (AARCH64_ISA_SM4): New ISA flag.
30222 (TARGET_SM4): New feature flag for sm4.
30223 * config/aarch64/aarch64-simd-builtins.def
30224 (aarch64_sm3ss1qv4si): Ditto.
30225 (aarch64_sm3tt1aq4si): Ditto.
30226 (aarch64_sm3tt1bq4si): Ditto.
30227 (aarch64_sm3tt2aq4si): Ditto.
30228 (aarch64_sm3tt2bq4si): Ditto.
30229 (aarch64_sm3partw1qv4si): Ditto.
30230 (aarch64_sm3partw2qv4si): Ditto.
30231 (aarch64_sm4eqv4si): Ditto.
30232 (aarch64_sm4ekeyqv4si): Ditto.
30233 * config/aarch64/aarch64-simd.md:
30234 (aarch64_sm3ss1qv4si): Ditto.
30235 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
30236 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
30237 (aarch64_sm4eqv4si): Ditto.
30238 (aarch64_sm4ekeyqv4si): Ditto.
30239 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
30240 (sm3part_op): Ditto.
30241 (CRYPTO_SM3TT): Ditto.
30242 (CRYPTO_SM3PART): Ditto.
30243 (UNSPEC_SM3SS1): New unspec.
30244 (UNSPEC_SM3TT1A): Ditto.
30245 (UNSPEC_SM3TT1B): Ditto.
30246 (UNSPEC_SM3TT2A): Ditto.
30247 (UNSPEC_SM3TT2B): Ditto.
30248 (UNSPEC_SM3PARTW1): Ditto.
30249 (UNSPEC_SM3PARTW2): Ditto.
30250 (UNSPEC_SM4E): Ditto.
30251 (UNSPEC_SM4EKEY): Ditto.
30252 * config/aarch64/constraints.md (Ui2): New constraint.
30253 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30254 * config/arm/types.md (crypto_sm3): New type attribute.
30255 (crypto_sm4): Ditto.
30256 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30257 (vsm3tt1aq_u32): Ditto.
30258 (vsm3tt1bq_u32): Ditto.
30259 (vsm3tt2aq_u32): Ditto.
30260 (vsm3tt2bq_u32): Ditto.
30261 (vsm3partw1q_u32): Ditto.
30262 (vsm3partw2q_u32): Ditto.
30263 (vsm4eq_u32): Ditto.
30264 (vsm4ekeyq_u32): Ditto.
30265 (doc/invoke.texi): Document new sm4 option.
30267 2018-01-10 Michael Collison <michael.collison@arm.com>
30269 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30270 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30271 (AARCH64_FL_FOR_ARCH8_4): New.
30272 (AARCH64_FL_V8_4): New flag.
30273 (doc/invoke.texi): Document new armv8.4-a option.
30275 2018-01-10 Michael Collison <michael.collison@arm.com>
30277 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30278 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30279 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30280 * config/aarch64/aarch64-option-extension.def: Add
30281 AARCH64_OPT_EXTENSION of 'sha2'.
30282 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30283 (crypto): Disable sha2 and aes if crypto disabled.
30284 (crypto): Enable aes and sha2 if enabled.
30285 (simd): Disable sha2 and aes if simd disabled.
30286 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30288 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30289 (TARGET_SHA2): New feature flag for sha2.
30290 (TARGET_AES): New feature flag for aes.
30291 * config/aarch64/aarch64-simd.md:
30292 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30293 conditional on TARGET_AES.
30294 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30295 (aarch64_crypto_sha1hsi): Make pattern conditional
30297 (aarch64_crypto_sha1hv4si): Ditto.
30298 (aarch64_be_crypto_sha1hv4si): Ditto.
30299 (aarch64_crypto_sha1su1v4si): Ditto.
30300 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30301 (aarch64_crypto_sha1su0v4si): Ditto.
30302 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30303 (aarch64_crypto_sha256su0v4si): Ditto.
30304 (aarch64_crypto_sha256su1v4si): Ditto.
30305 (doc/invoke.texi): Document new aes and sha2 options.
30307 2018-01-10 Martin Sebor <msebor@redhat.com>
30309 PR tree-optimization/83781
30310 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30313 2018-01-11 Martin Sebor <msebor@gmail.com>
30314 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30316 PR tree-optimization/83501
30317 PR tree-optimization/81703
30319 * tree-ssa-strlen.c (get_string_cst): Rename...
30320 (get_string_len): ...to this. Handle global constants.
30321 (handle_char_store): Adjust.
30323 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
30324 Jim Wilson <jimw@sifive.com>
30326 * config/riscv/riscv-protos.h (riscv_output_return): New.
30327 * config/riscv/riscv.c (struct machine_function): New naked_p field.
30328 (riscv_attribute_table, riscv_output_return),
30329 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30330 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30331 (riscv_compute_frame_info): Only compute frame->mask if not a naked
30333 (riscv_expand_prologue): Add early return for naked function.
30334 (riscv_expand_epilogue): Likewise.
30335 (riscv_function_ok_for_sibcall): Return false for naked function.
30336 (riscv_set_current_function): New.
30337 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30338 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30339 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30340 * doc/extend.texi (RISC-V Function Attributes): New.
30342 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
30344 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30345 check for 128-bit long double before checking TCmode.
30346 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30347 128-bit long doubles before checking TFmode or TCmode.
30348 (FLOAT128_IBM_P): Likewise.
30350 2018-01-10 Martin Sebor <msebor@redhat.com>
30352 PR tree-optimization/83671
30353 * builtins.c (c_strlen): Unconditionally return zero for the empty
30355 Use -Warray-bounds for warnings.
30356 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30357 for non-constant array indices with COMPONENT_REF, arrays of
30358 arrays, and pointers to arrays.
30359 (gimple_fold_builtin_strlen): Determine and set length range for
30360 non-constant character arrays.
30362 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
30364 PR middle-end/81897
30365 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30368 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
30370 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30372 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30375 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30376 VECTOR_MEM_ALTIVEC_OR_VSX_P.
30377 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30378 indexed_or_indirect_operand predicate.
30379 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30380 (*vsx_le_perm_load_v8hi): Likewise.
30381 (*vsx_le_perm_load_v16qi): Likewise.
30382 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30383 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30384 (*vsx_le_perm_store_v8hi): Likewise.
30385 (*vsx_le_perm_store_v16qi): Likewise.
30386 (eight unnamed splitters): Likewise.
30388 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30390 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30391 * config/rs6000/emmintrin.h: Likewise.
30392 * config/rs6000/mmintrin.h: Likewise.
30393 * config/rs6000/xmmintrin.h: Likewise.
30395 2018-01-10 David Malcolm <dmalcolm@redhat.com>
30398 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30400 * tree.c (tree_nop_conversion): Return true for location wrapper
30402 (maybe_wrap_with_location): New function.
30403 (selftest::check_strip_nops): New function.
30404 (selftest::test_location_wrappers): New function.
30405 (selftest::tree_c_tests): Call it.
30406 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30407 (maybe_wrap_with_location): New decl.
30408 (EXPR_LOCATION_WRAPPER_P): New macro.
30409 (location_wrapper_p): New inline function.
30410 (tree_strip_any_location_wrapper): New inline function.
30412 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
30415 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30416 stack_realign_offset for the largest alignment of stack slot
30418 (ix86_find_max_used_stack_alignment): New function.
30419 (ix86_finalize_stack_frame_flags): Use it. Set
30420 max_used_stack_alignment if we don't realign stack.
30421 * config/i386/i386.h (machine_function): Add
30422 max_used_stack_alignment.
30424 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
30426 * config/arm/arm.opt (-mbranch-cost): New option.
30427 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30430 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
30433 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30434 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30436 2018-01-10 Richard Biener <rguenther@suse.de>
30439 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30440 early out so it also covers the case where we have a non-NULL
30443 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30445 PR tree-optimization/83753
30446 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30447 for non-strided grouped accesses if the number of elements is 1.
30449 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30452 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30453 * i386.h (TARGET_USE_GATHER): Define.
30454 * x86-tune.def (X86_TUNE_USE_GATHER): New.
30456 2018-01-10 Martin Liska <mliska@suse.cz>
30459 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30460 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30462 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30463 CLEANUP_NO_PARTITIONING is not set.
30465 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30467 * doc/rtl.texi: Remove documentation of (const ...) wrappers
30468 for vectors, as a partial revert of r254296.
30469 * rtl.h (const_vec_p): Delete.
30470 (const_vec_duplicate_p): Don't test for vector CONSTs.
30471 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30472 * expmed.c (make_tree): Likewise.
30475 * common.md (E, F): Use CONSTANT_P instead of checking for
30477 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30478 checking for CONST_VECTOR.
30480 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30482 PR middle-end/83575
30483 * predict.c (force_edge_cold): Handle in more sane way edges
30484 with no prediction.
30486 2018-01-09 Carl Love <cel@us.ibm.com>
30488 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30490 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30491 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30492 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30493 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
30494 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30495 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
30496 * config/rs6000/rs6000-protos.h: Add extern defition for
30497 rs6000_generate_float2_double_code.
30498 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30500 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30501 (float2_v2df): Add define_expand.
30503 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
30506 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30507 op_mode in the force_to_mode call.
30509 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30511 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30512 instead of checking each element individually.
30513 (aarch64_evpc_uzp): Likewise.
30514 (aarch64_evpc_zip): Likewise.
30515 (aarch64_evpc_ext): Likewise.
30516 (aarch64_evpc_rev): Likewise.
30517 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30518 instead of checking each element individually. Return true without
30520 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30521 whether all selected elements come from the same input, instead of
30522 checking each element individually. Remove calls to gen_rtx_REG,
30523 start_sequence and end_sequence and instead assert that no rtl is
30526 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30528 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30529 order of HIGH and CONST checks.
30531 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30533 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30534 if the destination isn't an SSA_NAME.
30536 2018-01-09 Richard Biener <rguenther@suse.de>
30538 PR tree-optimization/83668
30539 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30541 (canonicalize_loop_form): ... here, renamed from ...
30542 (canonicalize_loop_closed_ssa_form): ... this and amended to
30543 swap successor edges for loop exit blocks to make us use
30544 the RPO order we need for initial schedule generation.
30546 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30548 PR tree-optimization/64811
30549 * match.pd: When optimizing comparisons with Inf, avoid
30550 introducing or losing exceptions from comparisons with NaN.
30552 2018-01-09 Martin Liska <mliska@suse.cz>
30555 * asan.c (shadow_mem_size): Add gcc_assert.
30557 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30559 Don't save registers in main().
30562 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30563 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30564 * config/avr/avr.c (avr_set_current_function): Don't error if
30565 naked, OS_task or OS_main are specified at the same time.
30566 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30568 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30570 * common/config/avr/avr-common.c (avr_option_optimization_table):
30571 Switch on -mmain-is-OS_task for optimizing compilations.
30573 2018-01-09 Richard Biener <rguenther@suse.de>
30575 PR tree-optimization/83572
30576 * graphite.c: Include cfganal.h.
30577 (graphite_transform_loops): Connect infinite loops to exit
30578 and remove fake edges at the end.
30580 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30582 * ipa-inline.c (edge_badness): Revert accidental checkin.
30584 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30587 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30588 symbols; not inline clones.
30590 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30593 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30594 hard registers. Formatting fixes.
30596 PR preprocessor/83722
30597 * gcc.c (try_generate_repro): Pass
30598 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30599 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30602 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30603 Kito Cheng <kito.cheng@gmail.com>
30605 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30606 (riscv_leaf_function_p): Delete.
30607 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30609 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30611 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30613 (do_ifelse): New function.
30614 (do_isel): New function.
30615 (do_sub3): New function.
30616 (do_add3): New function.
30617 (do_load_mask_compare): New function.
30618 (do_overlap_load_compare): New function.
30619 (expand_compare_loop): New function.
30620 (expand_block_compare): Call expand_compare_loop() when appropriate.
30621 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30622 option description.
30623 (-mblock-compare-inline-loop-limit): New option.
30625 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30628 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30629 Reverse order of second and third operands in first alternative.
30630 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30631 of first and second elements in UNSPEC_VPERMR vector.
30632 (altivec_expand_vec_perm_le): Likewise.
30634 2018-01-08 Jeff Law <law@redhat.com>
30636 PR rtl-optimizatin/81308
30637 * tree-switch-conversion.c (cfg_altered): New file scoped static.
30638 (process_switch): If group_case_labels makes a change, then set
30640 (pass_convert_switch::execute): If a switch is converted, then
30641 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
30643 PR rtl-optimization/81308
30644 * recog.c (split_all_insns): Conditionally cleanup the CFG after
30647 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
30649 PR target/83663 - Revert r255946
30650 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30651 generation for cases where splatting a value is not useful.
30652 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30653 across a vec_duplicate and a paradoxical subreg forming a vector
30654 mode to a vec_concat.
30656 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30658 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30659 -march=armv8.3-a variants.
30660 * config/arm/t-multilib: Likewise.
30661 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
30663 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30665 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30667 (cceq_ior_compare_complement): Give it a name so I can use it, and
30668 change boolean_or_operator predicate to boolean_operator so it can
30669 be used to generate a crand.
30670 (eqne): New code iterator.
30671 (bd/bd_neg): New code_attrs.
30672 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30673 a single define_insn.
30674 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30675 decrement (bdnzt/bdnzf/bdzt/bdzf).
30676 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30677 with the new names of the branch decrement patterns, and added the
30678 names of the branch decrement conditional patterns.
30680 2018-01-08 Richard Biener <rguenther@suse.de>
30682 PR tree-optimization/83563
30683 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30686 2018-01-08 Richard Biener <rguenther@suse.de>
30688 PR middle-end/83713
30689 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30691 2018-01-08 Richard Biener <rguenther@suse.de>
30693 PR tree-optimization/83685
30694 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30695 references to abnormals.
30697 2018-01-08 Richard Biener <rguenther@suse.de>
30700 * dwarf2out.c (output_indirect_strings): Handle empty
30701 skeleton_debug_str_hash.
30702 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30704 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30706 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30707 (emit_store_direct): Likewise.
30708 (arc_trampoline_adjust_address): Likewise.
30709 (arc_asm_trampoline_template): New function.
30710 (arc_initialize_trampoline): Use asm_trampoline_template.
30711 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30712 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30713 * config/arc/arc.md (flush_icache): Delete pattern.
30715 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30717 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30718 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30721 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30724 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30725 by not USED_FOR_TARGET.
30726 (make_pass_resolve_sw_modes): Likewise.
30728 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30730 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30733 2018-01-08 Richard Biener <rguenther@suse.de>
30735 PR middle-end/83580
30736 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30738 2018-01-08 Richard Biener <rguenther@suse.de>
30740 PR middle-end/83517
30741 * match.pd ((t * 2) / 2) -> t): Add missing :c.
30743 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
30745 PR middle-end/81897
30746 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30747 basic blocks with a small number of successors.
30748 (convert_control_dep_chain_into_preds): Improve handling of
30750 (dump_predicates): Split apart into...
30751 (dump_pred_chain): ...here...
30752 (dump_pred_info): ...and here.
30753 (can_one_predicate_be_invalidated_p): Add debugging printfs.
30754 (can_chain_union_be_invalidated_p): Improve check for invalidation
30756 (uninit_uses_cannot_happen): Avoid unnecessary if
30757 convert_control_dep_chain_into_preds yielded nothing.
30759 2018-01-06 Martin Sebor <msebor@redhat.com>
30761 PR tree-optimization/83640
30762 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30763 subtracting negative offset from size.
30764 (builtin_access::overlap): Adjust offset bounds of the access to fall
30765 within the size of the object if possible.
30767 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
30769 PR rtl-optimization/83699
30770 * expmed.c (extract_bit_field_1): Restrict the vector usage of
30771 extract_bit_field_as_subreg to cases in which the extracted
30772 value is also a vector.
30774 * lra-constraints.c (process_alt_operands): Test for the equivalence
30775 substitutions when detecting a possible reload cycle.
30777 2018-01-06 Jakub Jelinek <jakub@redhat.com>
30780 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30781 by default if flag_selective_schedling{,2}. Formatting fixes.
30783 PR rtl-optimization/83682
30784 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30785 if it has non-VECTOR_MODE element mode.
30786 (vec_duplicate_p): Likewise.
30788 PR middle-end/83694
30789 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30790 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30792 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30795 * config/i386/i386-builtin.def
30796 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30797 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30798 Require also OPTION_MASK_ISA_AVX512F in addition to
30799 OPTION_MASK_ISA_GFNI.
30800 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30801 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30802 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30803 to OPTION_MASK_ISA_GFNI.
30804 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30805 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30806 OPTION_MASK_ISA_AVX512BW.
30807 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30808 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30809 addition to OPTION_MASK_ISA_GFNI.
30810 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30811 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30812 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30813 to OPTION_MASK_ISA_GFNI.
30814 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30815 a requirement for all ISAs rather than any of them with a few
30817 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30819 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30820 bitmasks to be enabled with 3 exceptions, instead of requiring any
30821 enabled ISA with lots of exceptions.
30822 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30823 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30824 Change avx512bw in isa attribute to avx512f.
30825 * config/i386/sgxintrin.h: Add license boilerplate.
30826 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
30827 to __AVX512F__ and __AVX512VL to __AVX512VL__.
30828 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30829 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30831 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30832 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30833 temporarily sse2 rather than sse if not enabled already.
30836 * config/i386/sse.md (VI248_VLBW): Rename to ...
30837 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
30838 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30839 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30840 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30841 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30842 mode iterator instead of VI248_VLBW.
30844 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
30846 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30847 (record_modified): Skip clobbers; add debug output.
30848 (param_change_prob): Use sreal frequencies.
30850 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30852 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30853 punt for user-aligned variables.
30855 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30857 * tree-chrec.c (chrec_contains_symbols): Return true for
30860 2018-01-05 Sudakshina Das <sudi.das@arm.com>
30863 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30864 of (x|y) == x for BICS pattern.
30866 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30868 PR tree-optimization/83605
30869 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30870 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30873 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
30875 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30876 * config/epiphany/rtems.h: New file.
30878 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30879 Uros Bizjak <ubizjak@gmail.com>
30882 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30883 QIreg_operand instead of register_operand predicate.
30884 * config/i386/i386.c (ix86_rop_should_change_byte_p,
30885 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30886 comments instead of -fmitigate[-_]rop.
30888 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30891 * cgraphunit.c (symbol_table::compile): Switch to text_section
30892 before calling assembly_start debug hook.
30893 * run-rtl-passes.c (run_rtl_passes): Likewise.
30896 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30898 * tree-vrp.c (extract_range_from_binary_expr_1): Check
30899 range_int_cst_p rather than !symbolic_range_p before calling
30900 extract_range_from_multiplicative_op_1.
30902 2018-01-04 Jeff Law <law@redhat.com>
30904 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30905 redundant test in assertion.
30907 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30909 * doc/rtl.texi: Document machine_mode wrapper classes.
30911 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30913 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30914 using tree_to_uhwi.
30916 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30918 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30919 the VEC_PERM_EXPR fold to fail.
30921 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30924 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30925 to switched_sections.
30927 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30930 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30931 test for d.testing.
30933 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
30936 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30937 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30939 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30942 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30943 is BLKmode and bitpos not zero or mode change is needed.
30945 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30948 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30951 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
30954 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30955 instead of MULT rtx. Update all corresponding splitters.
30956 (*saddl_se): Ditto.
30957 (*ssub<modesuffix>): Ditto.
30958 (*ssubl_se): Ditto.
30959 (*cmp_sadd_di): Update split patterns.
30960 (*cmp_sadd_si): Ditto.
30961 (*cmp_sadd_sidi): Ditto.
30962 (*cmp_ssub_di): Ditto.
30963 (*cmp_ssub_si): Ditto.
30964 (*cmp_ssub_sidi): Ditto.
30965 * config/alpha/predicates.md (const23_operand): New predicate.
30966 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30967 Look for ASHIFT, not MULT inner operand.
30968 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30970 2018-01-04 Martin Liska <mliska@suse.cz>
30972 PR gcov-profile/83669
30973 * gcov.c (output_intermediate_file): Add version to intermediate
30975 * doc/gcov.texi: Document new field 'version' in intermediate
30976 file format. Fix location of '-k' option of gcov command.
30978 2018-01-04 Martin Liska <mliska@suse.cz>
30981 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30983 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30985 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30987 2018-01-03 Martin Sebor <msebor@redhat.com>
30989 PR tree-optimization/83655
30990 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30991 checking calls with invalid arguments.
30993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30995 * tree-vect-stmts.c (vect_get_store_rhs): New function.
30996 (vectorizable_mask_load_store): Delete.
30997 (vectorizable_call): Return false for masked loads and stores.
30998 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
30999 instead of gimple_assign_rhs1.
31000 (vectorizable_load): Handle IFN_MASK_LOAD.
31001 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
31003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31005 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
31007 (vectorizable_mask_load_store): ...here.
31008 (vectorizable_load): ...and here.
31010 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31012 * tree-vect-stmts.c (vect_build_all_ones_mask)
31013 (vect_build_zero_merge_argument): New functions, split out from...
31014 (vectorizable_load): ...here.
31016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31018 * tree-vect-stmts.c (vect_check_store_rhs): New function,
31020 (vectorizable_mask_load_store): ...here.
31021 (vectorizable_store): ...and here.
31023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31025 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
31027 (vectorizable_mask_load_store): ...here.
31029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31031 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
31032 (vect_model_store_cost): Take a vec_load_store_type instead of a
31034 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
31035 (vect_model_store_cost): Take a vec_load_store_type instead of a
31037 (vectorizable_mask_load_store): Update accordingly.
31038 (vectorizable_store): Likewise.
31039 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
31041 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31043 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
31044 IFN_MASK_LOAD calls here rather than...
31045 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
31047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31048 Alan Hayward <alan.hayward@arm.com>
31049 David Sherwood <david.sherwood@arm.com>
31051 * expmed.c (extract_bit_field_1): For vector extracts,
31052 fall back to extract_bit_field_as_subreg if vec_extract
31055 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31056 Alan Hayward <alan.hayward@arm.com>
31057 David Sherwood <david.sherwood@arm.com>
31059 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
31060 they are variable or constant sized.
31061 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
31062 slots for constant-sized data.
31064 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31065 Alan Hayward <alan.hayward@arm.com>
31066 David Sherwood <david.sherwood@arm.com>
31068 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
31069 handling COND_EXPRs with boolean comparisons, try to find a better
31070 basis for the mask type than the boolean itself.
31072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31074 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
31075 is calculated and how it can be overridden.
31076 * genmodes.c (max_bitsize_mode_any_mode): New variable.
31077 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
31079 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
31082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31083 Alan Hayward <alan.hayward@arm.com>
31084 David Sherwood <david.sherwood@arm.com>
31086 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
31087 Remove the mode argument.
31088 (aarch64_simd_valid_immediate): Remove the mode and inverse
31090 * config/aarch64/iterators.md (bitsize): New iterator.
31091 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
31092 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
31093 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
31094 aarch64_simd_valid_immediate.
31095 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
31096 (aarch64_reg_or_bic_imm): Likewise.
31097 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
31098 with an insn_type enum and msl with a modifier_type enum.
31099 Replace element_width with a scalar_mode. Change the shift
31100 to unsigned int. Add constructors for scalar_float_mode and
31101 scalar_int_mode elements.
31102 (aarch64_vect_float_const_representable_p): Delete.
31103 (aarch64_can_const_movi_rtx_p)
31104 (aarch64_simd_scalar_immediate_valid_for_move)
31105 (aarch64_simd_make_constant): Update call to
31106 aarch64_simd_valid_immediate.
31107 (aarch64_advsimd_valid_immediate_hs): New function.
31108 (aarch64_advsimd_valid_immediate): Likewise.
31109 (aarch64_simd_valid_immediate): Remove mode and inverse
31110 arguments. Rewrite to use the above. Use const_vec_duplicate_p
31111 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
31112 and aarch64_float_const_representable_p on the result.
31113 (aarch64_output_simd_mov_immediate): Remove mode argument.
31114 Update call to aarch64_simd_valid_immediate and use of
31115 simd_immediate_info.
31116 (aarch64_output_scalar_simd_mov_immediate): Update call
31119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31120 Alan Hayward <alan.hayward@arm.com>
31121 David Sherwood <david.sherwood@arm.com>
31123 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
31124 (mode_nunits): Likewise CONST_MODE_NUNITS.
31125 * machmode.def (ADJUST_NUNITS): Document.
31126 * genmodes.c (mode_data::need_nunits_adj): New field.
31127 (blank_mode): Update accordingly.
31128 (adj_nunits): New variable.
31129 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
31131 (emit_mode_size_inline): Set need_bytesize_adj for all modes
31132 listed in adj_nunits.
31133 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
31134 listed in adj_nunits. Don't emit case statements for such modes.
31135 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
31136 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
31137 nothing if adj_nunits is nonnull.
31138 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
31139 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
31140 (emit_mode_fbit): Update use of print_maybe_const_decl.
31141 (emit_move_size): Likewise. Treat the array as non-const
31143 (emit_mode_adjustments): Handle adj_nunits.
31145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31147 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
31148 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
31149 (VECTOR_MODES): Use it.
31150 (make_vector_modes): Take the prefix as an argument.
31152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31153 Alan Hayward <alan.hayward@arm.com>
31154 David Sherwood <david.sherwood@arm.com>
31156 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
31157 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
31158 for MODE_VECTOR_BOOL.
31159 * machmode.def (VECTOR_BOOL_MODE): Document.
31160 * genmodes.c (VECTOR_BOOL_MODE): New macro.
31161 (make_vector_bool_mode): New function.
31162 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
31164 * lto-streamer-in.c (lto_input_mode_table): Likewise.
31165 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
31167 * stor-layout.c (int_mode_for_mode): Likewise.
31168 * tree.c (build_vector_type_for_mode): Likewise.
31169 * varasm.c (output_constant_pool_2): Likewise.
31170 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
31171 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
31172 for MODE_VECTOR_BOOL.
31173 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
31174 of mode class checks.
31175 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
31176 instead of a list of mode class checks.
31177 (expand_vector_scalar_condition): Likewise.
31178 (type_for_widest_vector_mode): Handle BImode as an inner mode.
31180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31181 Alan Hayward <alan.hayward@arm.com>
31182 David Sherwood <david.sherwood@arm.com>
31184 * machmode.h (mode_size): Change from unsigned short to
31186 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
31187 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31188 or if measurement_type is not polynomial.
31189 (fixed_size_mode::includes_p): Check for constant-sized modes.
31190 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
31191 return a poly_uint16 rather than an unsigned short.
31192 (emit_mode_size): Change the type of mode_size from unsigned short
31193 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
31194 (emit_mode_adjustments): Cope with polynomial vector sizes.
31195 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31197 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31199 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
31200 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31201 * caller-save.c (setup_save_areas): Likewise.
31202 (replace_reg_with_saved_mem): Likewise.
31203 * calls.c (emit_library_call_value_1): Likewise.
31204 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31205 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31206 (gen_lowpart_for_combine): Likewise.
31207 * convert.c (convert_to_integer_1): Likewise.
31208 * cse.c (equiv_constant, cse_insn): Likewise.
31209 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
31210 (cselib_subst_to_values): Likewise.
31211 * dce.c (word_dce_process_block): Likewise.
31212 * df-problems.c (df_word_lr_mark_ref): Likewise.
31213 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
31214 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
31215 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
31216 (rtl_for_decl_location): Likewise.
31217 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
31218 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
31219 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
31220 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
31221 (expand_expr_real_1): Likewise.
31222 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
31223 (pad_below): Likewise.
31224 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31225 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
31226 * ira.c (get_subreg_tracking_sizes): Likewise.
31227 * ira-build.c (ira_create_allocno_objects): Likewise.
31228 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
31229 (ira_sort_regnos_for_alter_reg): Likewise.
31230 * ira-costs.c (record_operand_costs): Likewise.
31231 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
31232 (resolve_simple_move): Likewise.
31233 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
31234 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
31235 (lra_constraints): Likewise.
31236 (CONST_POOL_OK_P): Reject variable-sized modes.
31237 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
31238 (add_pseudo_to_slot, lra_spill): Likewise.
31239 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31240 * optabs-query.c (get_best_extraction_insn): Likewise.
31241 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31242 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31243 (expand_mult_highpart, valid_multiword_target_p): Likewise.
31244 * recog.c (offsettable_address_addr_space_p): Likewise.
31245 * regcprop.c (maybe_mode_change): Likewise.
31246 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31247 * regrename.c (build_def_use): Likewise.
31248 * regstat.c (dump_reg_info): Likewise.
31249 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31250 (find_reloads, find_reloads_subreg_address): Likewise.
31251 * reload1.c (eliminate_regs_1): Likewise.
31252 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31253 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31254 (simplify_binary_operation_1, simplify_subreg): Likewise.
31255 * targhooks.c (default_function_arg_padding): Likewise.
31256 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31257 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31258 (verify_gimple_assign_ternary): Likewise.
31259 * tree-inline.c (estimate_move_cost): Likewise.
31260 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31261 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31262 (get_address_cost_ainc): Likewise.
31263 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31264 (vect_supportable_dr_alignment): Likewise.
31265 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31266 (vectorizable_reduction): Likewise.
31267 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31268 (vectorizable_operation, vectorizable_load): Likewise.
31269 * tree.c (build_same_sized_truth_vector_type): Likewise.
31270 * valtrack.c (cleanup_auto_inc_dec): Likewise.
31271 * var-tracking.c (emit_note_insn_var_location): Likewise.
31272 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31273 (ADDR_VEC_ALIGN): Likewise.
31275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31276 Alan Hayward <alan.hayward@arm.com>
31277 David Sherwood <david.sherwood@arm.com>
31279 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31281 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31282 or if measurement_type is polynomial.
31283 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31284 * combine.c (make_extraction): Likewise.
31285 * dse.c (find_shift_sequence): Likewise.
31286 * dwarf2out.c (mem_loc_descriptor): Likewise.
31287 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31288 (extract_bit_field, extract_low_bits): Likewise.
31289 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31290 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31291 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31292 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31293 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31294 * reload.c (find_reloads): Likewise.
31295 * reload1.c (alter_reg): Likewise.
31296 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31297 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31298 * tree-if-conv.c (predicate_mem_writes): Likewise.
31299 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31300 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31301 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31302 * valtrack.c (dead_debug_insert_temp): Likewise.
31303 * varasm.c (mergeable_constant_section): Likewise.
31304 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31307 Alan Hayward <alan.hayward@arm.com>
31308 David Sherwood <david.sherwood@arm.com>
31310 * expr.c (expand_assignment): Cope with polynomial mode sizes
31311 when assigning to a CONCAT.
31313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31314 Alan Hayward <alan.hayward@arm.com>
31315 David Sherwood <david.sherwood@arm.com>
31317 * machmode.h (mode_precision): Change from unsigned short to
31319 (mode_to_precision): Return a poly_uint16 rather than an unsigned
31321 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31322 or if measurement_type is not polynomial.
31323 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
31324 in which the mode is already known to be a scalar_int_mode.
31325 * genmodes.c (emit_mode_precision): Change the type of mode_precision
31326 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
31328 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31329 for GET_MODE_PRECISION.
31330 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31331 for GET_MODE_PRECISION.
31332 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31334 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31335 (expand_field_assignment, make_extraction): Likewise.
31336 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31337 (get_last_value): Likewise.
31338 * convert.c (convert_to_integer_1): Likewise.
31339 * cse.c (cse_insn): Likewise.
31340 * expr.c (expand_expr_real_1): Likewise.
31341 * lra-constraints.c (simplify_operand_subreg): Likewise.
31342 * optabs-query.c (can_atomic_load_p): Likewise.
31343 * optabs.c (expand_atomic_load): Likewise.
31344 (expand_atomic_store): Likewise.
31345 * ree.c (combine_reaching_defs): Likewise.
31346 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31347 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31348 * tree.h (type_has_mode_precision_p): Likewise.
31349 * ubsan.c (instrument_si_overflow): Likewise.
31351 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31352 Alan Hayward <alan.hayward@arm.com>
31353 David Sherwood <david.sherwood@arm.com>
31355 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31356 polynomial numbers of units.
31357 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31358 (valid_vector_subparts_p): New function.
31359 (build_vector_type): Remove temporary shim and take the number
31360 of units as a poly_uint64 rather than an int.
31361 (build_opaque_vector_type): Take the number of units as a
31362 poly_uint64 rather than an int.
31363 * tree.c (build_vector_from_ctor): Handle polynomial
31364 TYPE_VECTOR_SUBPARTS.
31365 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31366 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31367 (build_vector_from_val): If the number of units is variable,
31368 use build_vec_duplicate_cst for constant operands and
31369 VEC_DUPLICATE_EXPR otherwise.
31370 (make_vector_type): Remove temporary is_constant ().
31371 (build_vector_type, build_opaque_vector_type): Take the number of
31372 units as a poly_uint64 rather than an int.
31373 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31375 * cfgexpand.c (expand_debug_expr): Likewise.
31376 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31377 (store_constructor, expand_expr_real_1): Likewise.
31378 (const_scalar_mask_from_tree): Likewise.
31379 * fold-const-call.c (fold_const_reduction): Likewise.
31380 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31381 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31382 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31383 (fold_relational_const): Likewise.
31384 (native_interpret_vector): Likewise. Change the size from an
31385 int to an unsigned int.
31386 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31387 TYPE_VECTOR_SUBPARTS.
31388 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31389 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31390 duplicating a non-constant operand into a variable-length vector.
31391 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31392 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31393 * ipa-icf.c (sem_variable::equals): Likewise.
31394 * match.pd: Likewise.
31395 * omp-simd-clone.c (simd_clone_subparts): Likewise.
31396 * print-tree.c (print_node): Likewise.
31397 * stor-layout.c (layout_type): Likewise.
31398 * targhooks.c (default_builtin_vectorization_cost): Likewise.
31399 * tree-cfg.c (verify_gimple_comparison): Likewise.
31400 (verify_gimple_assign_binary): Likewise.
31401 (verify_gimple_assign_ternary): Likewise.
31402 (verify_gimple_assign_single): Likewise.
31403 * tree-pretty-print.c (dump_generic_node): Likewise.
31404 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31405 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31406 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31407 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31408 (vect_shift_permute_load_chain): Likewise.
31409 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31410 (expand_vector_condition, optimize_vector_constructor): Likewise.
31411 (lower_vec_perm, get_compute_type): Likewise.
31412 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31413 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31414 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31415 (vect_recog_mask_conversion_pattern): Likewise.
31416 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31417 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31418 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31419 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31420 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31421 (vectorizable_shift, vectorizable_operation, vectorizable_store)
31422 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31423 (supportable_widening_operation): Likewise.
31424 (supportable_narrowing_operation): Likewise.
31425 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31427 * varasm.c (output_constant): Likewise.
31429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31430 Alan Hayward <alan.hayward@arm.com>
31431 David Sherwood <david.sherwood@arm.com>
31433 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31434 so that both the length == 3 and length != 3 cases set up their
31435 own permute vectors. Add comments explaining why we know the
31436 number of elements is constant.
31437 (vect_permute_load_chain): Likewise.
31439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31440 Alan Hayward <alan.hayward@arm.com>
31441 David Sherwood <david.sherwood@arm.com>
31443 * machmode.h (mode_nunits): Change from unsigned char to
31445 (ONLY_FIXED_SIZE_MODES): New macro.
31446 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31447 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31448 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31450 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31451 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31452 or if measurement_type is not polynomial.
31453 * genmodes.c (ZERO_COEFFS): New macro.
31454 (emit_mode_nunits_inline): Make mode_nunits_inline return a
31456 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31457 Use ZERO_COEFFS when emitting initializers.
31458 * data-streamer.h (bp_pack_poly_value): New function.
31459 (bp_unpack_poly_value): Likewise.
31460 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31461 for GET_MODE_NUNITS.
31462 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31463 for GET_MODE_NUNITS.
31464 * tree.c (make_vector_type): Remove temporary shim and make
31465 the real function take the number of units as a poly_uint64
31466 rather than an int.
31467 (build_vector_type_for_mode): Handle polynomial nunits.
31468 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31469 * emit-rtl.c (const_vec_series_p_1): Likewise.
31470 (gen_rtx_CONST_VECTOR): Likewise.
31471 * fold-const.c (test_vec_duplicate_folding): Likewise.
31472 * genrecog.c (validate_pattern): Likewise.
31473 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31474 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31475 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31476 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31477 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31478 * rtlanal.c (subreg_get_info): Likewise.
31479 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31480 (vect_grouped_load_supported): Likewise.
31481 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31482 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31483 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31484 (simplify_const_unary_operation, simplify_binary_operation_1)
31485 (simplify_const_binary_operation, simplify_ternary_operation)
31486 (test_vector_ops_duplicate, test_vector_ops): Likewise.
31487 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31488 instead of CONST_VECTOR_NUNITS.
31489 * varasm.c (output_constant_pool_2): Likewise.
31490 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31491 explicit-encoded elements in the XVEC for variable-length vectors.
31493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31495 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31498 Alan Hayward <alan.hayward@arm.com>
31499 David Sherwood <david.sherwood@arm.com>
31501 * coretypes.h (fixed_size_mode): Declare.
31502 (fixed_size_mode_pod): New typedef.
31503 * builtins.h (target_builtins::x_apply_args_mode)
31504 (target_builtins::x_apply_result_mode): Change type to
31505 fixed_size_mode_pod.
31506 * builtins.c (apply_args_size, apply_result_size, result_vector)
31507 (expand_builtin_apply_args_1, expand_builtin_apply)
31508 (expand_builtin_return): Update accordingly.
31510 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31512 * cse.c (hash_rtx_cb): Hash only the encoded elements.
31513 * cselib.c (cselib_hash_rtx): Likewise.
31514 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31515 CONST_VECTOR encoding.
31517 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31518 Jeff Law <law@redhat.com>
31521 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31522 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31523 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31524 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31527 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31528 explicitly probe *sp in a noreturn function if there were any callee
31529 register saves or frame pointer is needed.
31531 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31534 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31535 BLKmode for ternary, binary or unary expressions.
31538 * var-tracking.c (delete_vta_debug_insn): New inline function.
31539 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31540 insns from get_insns () to NULL instead of each bb separately.
31541 Use delete_vta_debug_insn. No longer static.
31542 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31543 delete_vta_debug_insns callers.
31544 * rtl.h (delete_vta_debug_insns): Declare.
31545 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31546 instead of variable_tracking_main.
31548 2018-01-03 Martin Sebor <msebor@redhat.com>
31550 PR tree-optimization/83603
31551 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31552 arguments past the endof the argument list in functions declared
31553 without a prototype.
31554 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31555 Avoid checking when arguments are null.
31557 2018-01-03 Martin Sebor <msebor@redhat.com>
31560 * doc/extend.texi (attribute const): Fix a typo.
31561 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31562 issuing -Wsuggest-attribute for void functions.
31564 2018-01-03 Martin Sebor <msebor@redhat.com>
31566 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31567 offset_int::from instead of wide_int::to_shwi.
31568 (maybe_diag_overlap): Remove assertion.
31569 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31570 * gimple-ssa-sprintf.c (format_directive): Same.
31571 (parse_directive): Same.
31572 (sprintf_dom_walker::compute_format_length): Same.
31573 (try_substitute_return_value): Same.
31575 2018-01-03 Jeff Law <law@redhat.com>
31577 PR middle-end/83654
31578 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31579 non-constant residual for zero at runtime and avoid probing in
31580 that case. Reorganize code for trailing problem to mirror handling
31583 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31585 PR tree-optimization/83501
31586 * tree-ssa-strlen.c (get_string_cst): New.
31587 (handle_char_store): Call get_string_cst.
31589 2018-01-03 Martin Liska <mliska@suse.cz>
31591 PR tree-optimization/83593
31592 * tree-ssa-strlen.c: Include tree-cfg.h.
31593 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31594 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31595 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31597 (strlen_dom_walker::before_dom_children): Call
31598 gimple_purge_dead_eh_edges. Dump tranformation with details
31600 (strlen_dom_walker::before_dom_children): Update call by adding
31601 new argument cleanup_eh.
31602 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31604 2018-01-03 Martin Liska <mliska@suse.cz>
31607 * cif-code.def (VARIADIC_THUNK): New enum value.
31608 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31611 2018-01-03 Jan Beulich <jbeulich@suse.com>
31613 * sse.md (mov<mode>_internal): Tighten condition for when to use
31614 vmovdqu<ssescalarsize> for TI and OI modes.
31616 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31618 Update copyright years.
31620 2018-01-03 Martin Liska <mliska@suse.cz>
31623 * ipa-visibility.c (function_and_variable_visibility): Skip
31624 functions with noipa attribure.
31626 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31628 * gcc.c (process_command): Update copyright notice dates.
31629 * gcov-dump.c (print_version): Ditto.
31630 * gcov.c (print_version): Ditto.
31631 * gcov-tool.c (print_version): Ditto.
31632 * gengtype.c (create_file): Ditto.
31633 * doc/cpp.texi: Bump @copying's copyright year.
31634 * doc/cppinternals.texi: Ditto.
31635 * doc/gcc.texi: Ditto.
31636 * doc/gccint.texi: Ditto.
31637 * doc/gcov.texi: Ditto.
31638 * doc/install.texi: Ditto.
31639 * doc/invoke.texi: Ditto.
31641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31643 * vector-builder.h (vector_builder::m_full_nelts): Change from
31644 unsigned int to poly_uint64.
31645 (vector_builder::full_nelts): Update prototype accordingly.
31646 (vector_builder::new_vector): Likewise.
31647 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31648 (vector_builder::operator ==): Likewise.
31649 (vector_builder::finalize): Likewise.
31650 * int-vector-builder.h (int_vector_builder::int_vector_builder):
31651 Take the number of elements as a poly_uint64 rather than an
31653 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31654 from unsigned int to poly_uint64.
31655 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31656 (vec_perm_indices::new_vector): Likewise.
31657 (vec_perm_indices::length): Likewise.
31658 (vec_perm_indices::nelts_per_input): Likewise.
31659 (vec_perm_indices::input_nelts): Likewise.
31660 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31661 number of elements per input as a poly_uint64 rather than an
31662 unsigned int. Use the original encoding for variable-length
31663 vectors, rather than clamping each individual element.
31664 For the second and subsequent elements in each pattern,
31665 clamp the step and base before clamping their sum.
31666 (vec_perm_indices::series_p): Handle polynomial element counts.
31667 (vec_perm_indices::all_in_range_p): Likewise.
31668 (vec_perm_indices_to_tree): Likewise.
31669 (vec_perm_indices_to_rtx): Likewise.
31670 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31671 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31672 (tree_vector_builder::new_binary_operation): Handle polynomial
31673 element counts. Return false if we need to know the number
31674 of elements at compile time.
31675 * fold-const.c (fold_vec_perm): Punt if the number of elements
31676 isn't known at compile time.
31678 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31680 * vec-perm-indices.h (vec_perm_builder): Change element type
31681 from HOST_WIDE_INT to poly_int64.
31682 (vec_perm_indices::element_type): Update accordingly.
31683 (vec_perm_indices::clamp): Handle polynomial element_types.
31684 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31685 (vec_perm_indices::all_in_range_p): Likewise.
31686 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31688 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31689 polynomial vec_perm_indices element types.
31690 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31691 * fold-const.c (fold_vec_perm): Likewise.
31692 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31693 * tree-vect-generic.c (lower_vec_perm): Likewise.
31694 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31695 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31696 element type to HOST_WIDE_INT.
31698 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31699 Alan Hayward <alan.hayward@arm.com>
31700 David Sherwood <david.sherwood@arm.com>
31702 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31703 rather than an int. Use plus_constant.
31704 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31705 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31707 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31708 Alan Hayward <alan.hayward@arm.com>
31709 David Sherwood <david.sherwood@arm.com>
31711 * calls.c (emit_call_1, expand_call): Change struct_value_size from
31712 a HOST_WIDE_INT to a poly_int64.
31714 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31715 Alan Hayward <alan.hayward@arm.com>
31716 David Sherwood <david.sherwood@arm.com>
31718 * calls.c (load_register_parameters): Cope with polynomial
31719 mode sizes. Require a constant size for BLKmode parameters
31720 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
31721 forces a parameter to be padded at the lsb end in order to
31722 fill a complete number of words, require the parameter size
31723 to be ordered wrt UNITS_PER_WORD.
31725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31726 Alan Hayward <alan.hayward@arm.com>
31727 David Sherwood <david.sherwood@arm.com>
31729 * reload1.c (spill_stack_slot_width): Change element type
31730 from unsigned int to poly_uint64_pod.
31731 (alter_reg): Treat mode sizes as polynomial.
31733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31734 Alan Hayward <alan.hayward@arm.com>
31735 David Sherwood <david.sherwood@arm.com>
31737 * reload.c (complex_word_subreg_p): New function.
31738 (reload_inner_reg_of_subreg, push_reload): Use it.
31740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31741 Alan Hayward <alan.hayward@arm.com>
31742 David Sherwood <david.sherwood@arm.com>
31744 * lra-constraints.c (process_alt_operands): Reject matched
31745 operands whose sizes aren't ordered.
31746 (match_reload): Refer to this check here.
31748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31749 Alan Hayward <alan.hayward@arm.com>
31750 David Sherwood <david.sherwood@arm.com>
31752 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31753 that the mode size is in the set {1, 2, 4, 8, 16}.
31755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31756 Alan Hayward <alan.hayward@arm.com>
31757 David Sherwood <david.sherwood@arm.com>
31759 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31760 Use plus_constant instead of gen_rtx_PLUS.
31762 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31763 Alan Hayward <alan.hayward@arm.com>
31764 David Sherwood <david.sherwood@arm.com>
31766 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31767 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31768 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31769 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31770 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31771 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31772 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31773 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31774 * config/i386/i386.c (ix86_push_rounding): ...this new function.
31775 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31777 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31778 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31779 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31780 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31781 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31782 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31783 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31784 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31785 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31786 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31788 * expr.c (emit_move_resolve_push): Treat the input and result
31789 of PUSH_ROUNDING as a poly_int64.
31790 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31791 (emit_push_insn): Likewise.
31792 * lra-eliminations.c (mark_not_eliminable): Likewise.
31793 * recog.c (push_operand): Likewise.
31794 * reload1.c (elimination_effects): Likewise.
31795 * rtlanal.c (nonzero_bits1): Likewise.
31796 * calls.c (store_one_arg): Likewise. Require the padding to be
31797 known at compile time.
31799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31800 Alan Hayward <alan.hayward@arm.com>
31801 David Sherwood <david.sherwood@arm.com>
31803 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31804 Use plus_constant instead of gen_rtx_PLUS.
31806 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31807 Alan Hayward <alan.hayward@arm.com>
31808 David Sherwood <david.sherwood@arm.com>
31810 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31811 rather than an int.
31813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31814 Alan Hayward <alan.hayward@arm.com>
31815 David Sherwood <david.sherwood@arm.com>
31817 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31818 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31819 via stack temporaries. Treat the mode size as polynomial too.
31821 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31822 Alan Hayward <alan.hayward@arm.com>
31823 David Sherwood <david.sherwood@arm.com>
31825 * expr.c (expand_expr_real_2): When handling conversions involving
31826 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31827 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
31828 as a poly_uint64 too.
31830 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31831 Alan Hayward <alan.hayward@arm.com>
31832 David Sherwood <david.sherwood@arm.com>
31834 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31837 Alan Hayward <alan.hayward@arm.com>
31838 David Sherwood <david.sherwood@arm.com>
31840 * combine.c (can_change_dest_mode): Handle polynomial
31841 REGMODE_NATURAL_SIZE.
31842 * expmed.c (store_bit_field_1): Likewise.
31843 * expr.c (store_constructor): Likewise.
31844 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31845 and polynomial REGMODE_NATURAL_SIZE.
31846 (gen_lowpart_common): Likewise.
31847 * reginfo.c (record_subregs_of_mode): Likewise.
31848 * rtlanal.c (read_modify_subreg_p): Likewise.
31850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31851 Alan Hayward <alan.hayward@arm.com>
31852 David Sherwood <david.sherwood@arm.com>
31854 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31855 numbers of elements.
31857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31858 Alan Hayward <alan.hayward@arm.com>
31859 David Sherwood <david.sherwood@arm.com>
31861 * match.pd: Cope with polynomial numbers of vector elements.
31863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31864 Alan Hayward <alan.hayward@arm.com>
31865 David Sherwood <david.sherwood@arm.com>
31867 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31868 in a POINTER_PLUS_EXPR.
31870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31871 Alan Hayward <alan.hayward@arm.com>
31872 David Sherwood <david.sherwood@arm.com>
31874 * omp-simd-clone.c (simd_clone_subparts): New function.
31875 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31876 (ipa_simd_modify_function_body): Likewise.
31878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31879 Alan Hayward <alan.hayward@arm.com>
31880 David Sherwood <david.sherwood@arm.com>
31882 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31883 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31884 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31885 (expand_vector_condition, vector_element): Likewise.
31886 (subparts_gt): New function.
31887 (get_compute_type): Use subparts_gt.
31888 (count_type_subparts): Delete.
31889 (expand_vector_operations_1): Use subparts_gt instead of
31890 count_type_subparts.
31892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31893 Alan Hayward <alan.hayward@arm.com>
31894 David Sherwood <david.sherwood@arm.com>
31896 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31897 (vect_compile_time_alias): ...this new function. Do the calculation
31898 on poly_ints rather than trees.
31899 (vect_prune_runtime_alias_test_list): Update call accordingly.
31901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31902 Alan Hayward <alan.hayward@arm.com>
31903 David Sherwood <david.sherwood@arm.com>
31905 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31907 (vect_schedule_slp_instance): Likewise.
31909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31910 Alan Hayward <alan.hayward@arm.com>
31911 David Sherwood <david.sherwood@arm.com>
31913 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31914 constant and extern definitions for variable-length vectors.
31915 (vect_get_constant_vectors): Note that the number of units
31916 is known to be constant.
31918 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31919 Alan Hayward <alan.hayward@arm.com>
31920 David Sherwood <david.sherwood@arm.com>
31922 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31923 of units as polynomial. Choose between WIDE and NARROW based
31926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31927 Alan Hayward <alan.hayward@arm.com>
31928 David Sherwood <david.sherwood@arm.com>
31930 * tree-vect-stmts.c (simd_clone_subparts): New function.
31931 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31933 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31934 Alan Hayward <alan.hayward@arm.com>
31935 David Sherwood <david.sherwood@arm.com>
31937 * tree-vect-stmts.c (vectorizable_call): Treat the number of
31938 vectors as polynomial. Use build_index_vector for
31939 IFN_GOMP_SIMD_LANE.
31941 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31942 Alan Hayward <alan.hayward@arm.com>
31943 David Sherwood <david.sherwood@arm.com>
31945 * tree-vect-stmts.c (get_load_store_type): Treat the number of
31946 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31947 for variable-length vectors.
31948 (vectorizable_mask_load_store): Treat the number of units as
31949 polynomial, asserting that it is constant if the condition has
31950 already been enforced.
31951 (vectorizable_store, vectorizable_load): Likewise.
31953 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31954 Alan Hayward <alan.hayward@arm.com>
31955 David Sherwood <david.sherwood@arm.com>
31957 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31958 of units as polynomial. Punt if we can't tell at compile time
31959 which vector contains the final result.
31961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31962 Alan Hayward <alan.hayward@arm.com>
31963 David Sherwood <david.sherwood@arm.com>
31965 * tree-vect-loop.c (vectorizable_induction): Treat the number
31966 of units as polynomial. Punt on SLP inductions. Use an integer
31967 VEC_SERIES_EXPR for variable-length integer reductions. Use a
31968 cast of such a series for variable-length floating-point
31971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31972 Alan Hayward <alan.hayward@arm.com>
31973 David Sherwood <david.sherwood@arm.com>
31975 * tree.h (build_index_vector): Declare.
31976 * tree.c (build_index_vector): New function.
31977 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31978 of units as polynomial, forcibly converting it to a constant if
31979 vectorizable_reduction has already enforced the condition.
31980 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
31981 to create a {1,2,3,...} vector.
31982 (vectorizable_reduction): Treat the number of units as polynomial.
31983 Choose vectype_in based on the largest scalar element size rather
31984 than the smallest number of units. Enforce the restrictions
31987 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31988 Alan Hayward <alan.hayward@arm.com>
31989 David Sherwood <david.sherwood@arm.com>
31991 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31992 number of units as polynomial.
31994 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31995 Alan Hayward <alan.hayward@arm.com>
31996 David Sherwood <david.sherwood@arm.com>
31998 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31999 * target.def (autovectorize_vector_sizes): Return the vector sizes
32000 by pointer, using vector_sizes rather than a bitmask.
32001 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
32002 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
32003 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
32005 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
32006 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
32007 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
32008 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
32009 * omp-general.c (omp_max_vf): Likewise.
32010 * omp-low.c (omp_clause_aligned_alignment): Likewise.
32011 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
32012 * tree-vect-loop.c (vect_analyze_loop): Likewise.
32013 * tree-vect-slp.c (vect_slp_bb): Likewise.
32014 * doc/tm.texi: Regenerate.
32015 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
32017 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
32018 the vector size as a poly_uint64 rather than an unsigned int.
32019 (current_vector_size): Change from an unsigned int to a poly_uint64.
32020 (get_vectype_for_scalar_type): Update accordingly.
32021 * tree.h (build_truth_vector_type): Take the size and number of
32022 units as a poly_uint64 rather than an unsigned int.
32023 (build_vector_type): Add a temporary overload that takes
32024 the number of units as a poly_uint64 rather than an unsigned int.
32025 * tree.c (make_vector_type): Likewise.
32026 (build_truth_vector_type): Take the number of units as a poly_uint64
32027 rather than an unsigned int.
32029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32030 Alan Hayward <alan.hayward@arm.com>
32031 David Sherwood <david.sherwood@arm.com>
32033 * target.def (get_mask_mode): Take the number of units and length
32034 as poly_uint64s rather than unsigned ints.
32035 * targhooks.h (default_get_mask_mode): Update accordingly.
32036 * targhooks.c (default_get_mask_mode): Likewise.
32037 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
32038 * doc/tm.texi: Regenerate.
32040 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32041 Alan Hayward <alan.hayward@arm.com>
32042 David Sherwood <david.sherwood@arm.com>
32044 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
32045 * omp-general.c (omp_max_vf): Likewise.
32046 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
32047 (expand_omp_simd): Handle polynomial safelen.
32048 * omp-low.c (omplow_simd_context): Add a default constructor.
32049 (omplow_simd_context::max_vf): Change from int to poly_uint64.
32050 (lower_rec_simd_input_clauses): Update accordingly.
32051 (lower_rec_input_clauses): Likewise.
32053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32054 Alan Hayward <alan.hayward@arm.com>
32055 David Sherwood <david.sherwood@arm.com>
32057 * tree-vectorizer.h (vect_nunits_for_cost): New function.
32058 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
32059 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
32060 (vect_analyze_slp_cost): Likewise.
32061 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
32062 (vect_model_load_cost): Likewise.
32064 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32065 Alan Hayward <alan.hayward@arm.com>
32066 David Sherwood <david.sherwood@arm.com>
32068 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
32069 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
32070 from an unsigned int * to a poly_uint64_pod *.
32071 (calculate_unrolling_factor): New function.
32072 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
32074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32075 Alan Hayward <alan.hayward@arm.com>
32076 David Sherwood <david.sherwood@arm.com>
32078 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
32079 from an unsigned int to a poly_uint64.
32080 (_loop_vec_info::slp_unrolling_factor): Likewise.
32081 (_loop_vec_info::vectorization_factor): Change from an int
32083 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
32084 (vect_get_num_vectors): New function.
32085 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
32086 (vect_get_num_copies): Use vect_get_num_vectors.
32087 (vect_analyze_data_ref_dependences): Change max_vf from an int *
32088 to an unsigned int *.
32089 (vect_analyze_data_refs): Change min_vf from an int * to a
32091 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32092 than an unsigned HOST_WIDE_INT.
32093 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
32094 (vect_analyze_data_ref_dependence): Change max_vf from an int *
32095 to an unsigned int *.
32096 (vect_analyze_data_ref_dependences): Likewise.
32097 (vect_compute_data_ref_alignment): Handle polynomial vf.
32098 (vect_enhance_data_refs_alignment): Likewise.
32099 (vect_prune_runtime_alias_test_list): Likewise.
32100 (vect_shift_permute_load_chain): Likewise.
32101 (vect_supportable_dr_alignment): Likewise.
32102 (dependence_distance_ge_vf): Take the vectorization factor as a
32103 poly_uint64 rather than an unsigned HOST_WIDE_INT.
32104 (vect_analyze_data_refs): Change min_vf from an int * to a
32106 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
32107 vfm1 as a poly_uint64 rather than an int. Make the same change
32108 for the returned bound_scalar.
32109 (vect_gen_vector_loop_niters): Handle polynomial vf.
32110 (vect_do_peeling): Likewise. Update call to
32111 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
32112 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
32114 * tree-vect-loop.c (vect_determine_vectorization_factor)
32115 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
32116 (vect_get_known_peeling_cost): Likewise.
32117 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
32118 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
32119 (vect_transform_loop): Likewise. Use the lowest possible VF when
32120 updating the upper bounds of the loop.
32121 (vect_min_worthwhile_factor): Make static. Return an unsigned int
32122 rather than an int.
32123 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
32124 polynomial unroll factors.
32125 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
32126 (vect_make_slp_decision): Likewise.
32127 (vect_supported_load_permutation_p): Likewise, and polynomial
32129 (vect_analyze_slp_cost): Handle polynomial vf.
32130 (vect_slp_analyze_node_operations): Likewise.
32131 (vect_slp_analyze_bb_1): Likewise.
32132 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32133 than an unsigned HOST_WIDE_INT.
32134 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
32135 (vectorizable_load): Handle polynomial vf.
32136 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
32138 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
32140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32141 Alan Hayward <alan.hayward@arm.com>
32142 David Sherwood <david.sherwood@arm.com>
32144 * match.pd: Handle bit operations involving three constants
32145 and try to fold one pair.
32147 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32149 * tree-vect-loop-manip.c: Include gimple-fold.h.
32150 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
32151 niters_maybe_zero parameters. Handle other cases besides a step of 1.
32152 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
32153 Add a path that uses a step of VF instead of 1, but disable it
32155 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
32156 and niters_no_overflow parameters. Update calls to
32157 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
32158 Create a new SSA name if the latter choses to use a ste other
32159 than zero, and return it via niters_vector_mult_vf_var.
32160 * tree-vect-loop.c (vect_transform_loop): Update calls to
32161 vect_do_peeling, vect_gen_vector_loop_niters and
32162 slpeel_make_loop_iterate_ntimes.
32163 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
32164 (vect_gen_vector_loop_niters): Update declarations after above changes.
32166 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
32168 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
32169 128-bit round to integer instructions.
32170 (ceil<mode>2): Likewise.
32171 (btrunc<mode>2): Likewise.
32172 (round<mode>2): Likewise.
32174 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32176 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
32177 unaligned VSX load/store on P8/P9.
32178 (expand_block_clear): Allow the use of unaligned VSX
32179 load/store on P8/P9.
32181 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32183 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
32185 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
32186 swap associated with both a load and a store.
32188 2018-01-02 Andrew Waterman <andrew@sifive.com>
32190 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
32191 * config/riscv/riscv.md (clear_cache): Use it.
32193 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
32195 * web.c: Remove out-of-date comment.
32197 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32199 * expr.c (fixup_args_size_notes): Check that any existing
32200 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32201 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32202 (emit_single_push_insn): ...here.
32204 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32206 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32207 (const_vector_encoded_nelts): New function.
32208 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
32209 (const_vector_int_elt, const_vector_elt): Declare.
32210 * emit-rtl.c (const_vector_int_elt_1): New function.
32211 (const_vector_elt): Likewise.
32212 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
32213 of CONST_VECTOR_ELT.
32215 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32217 * expr.c: Include rtx-vector-builder.h.
32218 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
32219 directly on the tree encoding.
32220 (const_vector_from_tree): Likewise.
32221 * optabs.c: Include rtx-vector-builder.h.
32222 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
32223 sequence of "u" values.
32224 * vec-perm-indices.c: Include rtx-vector-builder.h.
32225 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
32226 directly on the vec_perm_indices encoding.
32228 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32230 * doc/rtl.texi (const_vector): Describe new encoding scheme.
32231 * Makefile.in (OBJS): Add rtx-vector-builder.o.
32232 * rtx-vector-builder.h: New file.
32233 * rtx-vector-builder.c: Likewise.
32234 * rtl.h (rtx_def::u2): Add a const_vector field.
32235 (CONST_VECTOR_NPATTERNS): New macro.
32236 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
32237 (CONST_VECTOR_DUPLICATE_P): Likewise.
32238 (CONST_VECTOR_STEPPED_P): Likewise.
32239 (CONST_VECTOR_ENCODED_ELT): Likewise.
32240 (const_vec_duplicate_p): Check for a duplicated vector encoding.
32241 (unwrap_const_vec_duplicate): Likewise.
32242 (const_vec_series_p): Check for a non-duplicated vector encoding.
32243 Say that the function only returns true for integer vectors.
32244 * emit-rtl.c: Include rtx-vector-builder.h.
32245 (gen_const_vec_duplicate_1): Delete.
32246 (gen_const_vector): Call gen_const_vec_duplicate instead of
32247 gen_const_vec_duplicate_1.
32248 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32249 (gen_const_vec_duplicate): Use rtx_vector_builder.
32250 (gen_const_vec_series): Likewise.
32251 (gen_rtx_CONST_VECTOR): Likewise.
32252 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32253 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32254 Build a new vector rather than modifying a CONST_VECTOR in-place.
32255 (handle_special_swappables): Update call accordingly.
32256 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32257 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32258 Build a new vector rather than modifying a CONST_VECTOR in-place.
32259 (handle_special_swappables): Update call accordingly.
32261 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32263 * simplify-rtx.c (simplify_const_binary_operation): Use
32264 CONST_VECTOR_ELT instead of XVECEXP.
32266 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32268 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32269 the selector elements to be different from the data elements
32270 if the selector is a VECTOR_CST.
32271 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32272 ssizetype for the selector.
32274 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32276 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32277 before testing each element individually.
32278 * tree-vect-generic.c (lower_vec_perm): Likewise.
32280 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32282 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32283 * selftest-run-tests.c (selftest::run_tests): Call it.
32284 * vector-builder.h (vector_builder::operator ==): New function.
32285 (vector_builder::operator !=): Likewise.
32286 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32287 (vec_perm_indices::all_from_input_p): New function.
32288 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32289 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32290 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32291 instead of reading the VECTOR_CST directly. Detect whether both
32292 vector inputs are the same before constructing the vec_perm_indices,
32293 and update the number of inputs argument accordingly. Use the
32294 utility functions added above. Only construct sel2 if we need to.
32296 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32298 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32299 the broadcast of the low byte.
32300 (expand_mult_highpart): Use an explicit encoding for the permutes.
32301 * optabs-query.c (can_mult_highpart_p): Likewise.
32302 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32303 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32304 (vectorizable_bswap): Likewise.
32305 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32306 explicit encoding for the power-of-2 permutes.
32307 (vect_permute_store_chain): Likewise.
32308 (vect_grouped_load_supported): Likewise.
32309 (vect_permute_load_chain): Likewise.
32311 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32313 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32314 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32315 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32316 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32317 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32318 (vect_gen_perm_mask_any): Likewise.
32320 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32322 * int-vector-builder.h: New file.
32323 * vec-perm-indices.h: Include int-vector-builder.h.
32324 (vec_perm_indices): Redefine as an int_vector_builder.
32325 (auto_vec_perm_indices): Delete.
32326 (vec_perm_builder): Redefine as a stand-alone class.
32327 (vec_perm_indices::vec_perm_indices): New function.
32328 (vec_perm_indices::clamp): Likewise.
32329 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32330 (vec_perm_indices::new_vector): New function.
32331 (vec_perm_indices::new_expanded_vector): Update for new
32332 vec_perm_indices class.
32333 (vec_perm_indices::rotate_inputs): New function.
32334 (vec_perm_indices::all_in_range_p): Operate directly on the
32335 encoded form, without computing elided elements.
32336 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32337 encoding. Update for new vec_perm_indices class.
32338 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32339 the given vec_perm_builder.
32340 (expand_vec_perm_var): Update vec_perm_builder constructor.
32341 (expand_mult_highpart): Use vec_perm_builder instead of
32342 auto_vec_perm_indices.
32343 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32344 vec_perm_indices instead of auto_vec_perm_indices. Use a single
32345 or double series encoding as appropriate.
32346 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32347 vec_perm_indices instead of auto_vec_perm_indices.
32348 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32349 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32350 (vect_permute_store_chain): Likewise.
32351 (vect_grouped_load_supported): Likewise.
32352 (vect_permute_load_chain): Likewise.
32353 (vect_shift_permute_load_chain): Likewise.
32354 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32355 (vect_transform_slp_perm_load): Likewise.
32356 (vect_schedule_slp_instance): Likewise.
32357 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32358 (vectorizable_mask_load_store): Likewise.
32359 (vectorizable_bswap): Likewise.
32360 (vectorizable_store): Likewise.
32361 (vectorizable_load): Likewise.
32362 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32363 vec_perm_indices instead of auto_vec_perm_indices. Use
32364 tree_to_vec_perm_builder to read the vector from a tree.
32365 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32366 vec_perm_builder instead of a vec_perm_indices.
32367 (have_whole_vector_shift): Use vec_perm_builder and
32368 vec_perm_indices instead of auto_vec_perm_indices. Leave the
32369 truncation to calc_vec_perm_mask_for_shift.
32370 (vect_create_epilog_for_reduction): Likewise.
32371 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32372 from auto_vec_perm_indices to vec_perm_indices.
32373 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32374 instead of changing individual elements.
32375 (aarch64_vectorize_vec_perm_const): Use new_vector to install
32376 the vector in d.perm.
32377 * config/arm/arm.c (expand_vec_perm_d::perm): Change
32378 from auto_vec_perm_indices to vec_perm_indices.
32379 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32380 instead of changing individual elements.
32381 (arm_vectorize_vec_perm_const): Use new_vector to install
32382 the vector in d.perm.
32383 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32384 Update vec_perm_builder constructor.
32385 (rs6000_expand_interleave): Likewise.
32386 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32387 (rs6000_expand_interleave): Likewise.
32389 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32391 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32392 to qimode could truncate the indices.
32393 * optabs.c (expand_vec_perm_var): Likewise.
32395 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32397 * Makefile.in (OBJS): Add vec-perm-indices.o.
32398 * vec-perm-indices.h: New file.
32399 * vec-perm-indices.c: Likewise.
32400 * target.h (vec_perm_indices): Replace with a forward class
32402 (auto_vec_perm_indices): Move to vec-perm-indices.h.
32403 * optabs.h: Include vec-perm-indices.h.
32404 (expand_vec_perm): Delete.
32405 (selector_fits_mode_p, expand_vec_perm_var): Declare.
32406 (expand_vec_perm_const): Declare.
32407 * target.def (vec_perm_const_ok): Replace with...
32408 (vec_perm_const): ...this new hook.
32409 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32410 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32411 * doc/tm.texi: Regenerate.
32412 * optabs.def (vec_perm_const): Delete.
32413 * doc/md.texi (vec_perm_const): Likewise.
32414 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32415 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32416 expand_vec_perm for constant permutation vectors. Assert that
32417 the mode of variable permutation vectors is the integer equivalent
32418 of the mode that is being permuted.
32419 * optabs-query.h (selector_fits_mode_p): Declare.
32420 * optabs-query.c: Include vec-perm-indices.h.
32421 (selector_fits_mode_p): New function.
32422 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32423 is defined, instead of checking whether the vec_perm_const_optab
32424 exists. Use targetm.vectorize.vec_perm_const instead of
32425 targetm.vectorize.vec_perm_const_ok. Check whether the indices
32426 fit in the vector mode before using a variable permute.
32427 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32428 vec_perm_indices instead of an rtx.
32429 (expand_vec_perm): Replace with...
32430 (expand_vec_perm_const): ...this new function. Take the selector
32431 as a vec_perm_indices rather than an rtx. Also take the mode of
32432 the selector. Update call to shift_amt_for_vec_perm_mask.
32433 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32434 Use vec_perm_indices::new_expanded_vector to expand the original
32435 selector into bytes. Check whether the indices fit in the vector
32436 mode before using a variable permute.
32437 (expand_vec_perm_var): Make global.
32438 (expand_mult_highpart): Use expand_vec_perm_const.
32439 * fold-const.c: Includes vec-perm-indices.h.
32440 * tree-ssa-forwprop.c: Likewise.
32441 * tree-vect-data-refs.c: Likewise.
32442 * tree-vect-generic.c: Likewise.
32443 * tree-vect-loop.c: Likewise.
32444 * tree-vect-slp.c: Likewise.
32445 * tree-vect-stmts.c: Likewise.
32446 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32448 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32449 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32450 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32451 (aarch64_vectorize_vec_perm_const): ...this new function.
32452 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32453 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32454 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32455 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32456 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32457 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32458 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32460 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
32461 check for NEON modes.
32462 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32463 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32464 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32465 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32467 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
32468 the old VEC_PERM_CONST conditions.
32469 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32470 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32471 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32472 (ia64_vectorize_vec_perm_const_ok): Merge into...
32473 (ia64_vectorize_vec_perm_const): ...this new function.
32474 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32475 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32476 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32477 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32478 * config/mips/mips.c (mips_expand_vec_perm_const)
32479 (mips_vectorize_vec_perm_const_ok): Merge into...
32480 (mips_vectorize_vec_perm_const): ...this new function.
32481 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32482 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32483 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32484 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32485 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32486 (rs6000_expand_vec_perm_const): Delete.
32487 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32489 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32490 (altivec_expand_vec_perm_const_le): Take each operand individually.
32491 Operate on constant selectors rather than rtxes.
32492 (altivec_expand_vec_perm_const): Likewise. Update call to
32493 altivec_expand_vec_perm_const_le.
32494 (rs6000_expand_vec_perm_const): Delete.
32495 (rs6000_vectorize_vec_perm_const_ok): Delete.
32496 (rs6000_vectorize_vec_perm_const): New function.
32497 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32498 an element count and rtx array.
32499 (rs6000_expand_extract_even): Update call accordingly.
32500 (rs6000_expand_interleave): Likewise.
32501 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32502 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32503 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32504 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32505 (rs6000_expand_vec_perm_const): Delete.
32506 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32507 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32508 (altivec_expand_vec_perm_const_le): Take each operand individually.
32509 Operate on constant selectors rather than rtxes.
32510 (altivec_expand_vec_perm_const): Likewise. Update call to
32511 altivec_expand_vec_perm_const_le.
32512 (rs6000_expand_vec_perm_const): Delete.
32513 (rs6000_vectorize_vec_perm_const_ok): Delete.
32514 (rs6000_vectorize_vec_perm_const): New function. Remove stray
32515 reference to the SPE evmerge intructions.
32516 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32517 an element count and rtx array.
32518 (rs6000_expand_extract_even): Update call accordingly.
32519 (rs6000_expand_interleave): Likewise.
32520 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32521 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32523 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32525 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32527 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32528 vector mode and that that mode matches the mode of the data
32530 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32531 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
32532 directly using expand_vec_perm_1 when forcing selectors into
32534 (expand_vec_perm_var): New function, split out from expand_vec_perm.
32536 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32538 * optabs-query.h (can_vec_perm_p): Delete.
32539 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32540 * optabs-query.c (can_vec_perm_p): Split into...
32541 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32542 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32543 particular selector is valid.
32544 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32545 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32546 (vect_grouped_load_supported): Likewise.
32547 (vect_shift_permute_load_chain): Likewise.
32548 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32549 (vect_transform_slp_perm_load): Likewise.
32550 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32551 (vectorizable_bswap): Likewise.
32552 (vect_gen_perm_mask_checked): Likewise.
32553 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32554 implementations of variable permutation vectors into account
32555 when deciding which selector to use.
32556 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32557 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32558 with a false third argument.
32559 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32560 to test whether the constant selector is valid and can_vec_perm_var_p
32561 to test whether a variable selector is valid.
32563 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32565 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32566 * optabs-query.c (can_vec_perm_p): Likewise.
32567 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32568 instead of vec_perm_indices.
32569 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32570 (vect_gen_perm_mask_checked): Likewise,
32571 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32572 (vect_gen_perm_mask_checked): Likewise,
32574 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32576 * optabs-query.h (qimode_for_vec_perm): Declare.
32577 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32578 (qimode_for_vec_perm): ...this new function.
32579 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32581 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32583 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32584 does not have a conditional at the top.
32586 2018-01-02 Richard Biener <rguenther@suse.de>
32588 * ipa-inline.c (big_speedup_p): Fix expression.
32590 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32593 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32596 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32600 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32601 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32602 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32603 cond_taken_branch_cost 3->4.
32605 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32607 PR tree-optimization/83581
32608 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32609 TODO_cleanup_cfg if any changes have been made.
32611 PR middle-end/83608
32612 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32613 convert_modes if target mode has the right side, but different mode
32616 PR middle-end/83609
32617 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32618 last argument when extracting from CONCAT. If either from_real or
32619 from_imag is NULL, use expansion through memory. If result is not
32620 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32621 the parts directly to inner mode, if even that fails, use expansion
32624 PR middle-end/83623
32625 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32626 check for bswap in mode rather than HImode and use that in expand_unop
32629 Copyright (C) 2018 Free Software Foundation, Inc.
32631 Copying and distribution of this file, with or without modification,
32632 are permitted in any medium without royalty provided the copyright
32633 notice and this notice are preserved.