1 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
5 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
6 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
8 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
9 * targhooks.c (default_print_patchable_function_entry): Assert
10 asm_int_op does not return a NULL string.
11 * varasm.c (integer_asm_op): Return the op for a partial int type
12 when the requested size does not correspond to an integer type.
13 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
14 * doc/tm.texi: Regenerate.
16 2018-11-12 Jason Merrill <jason@redhat.com>
18 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
20 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
22 * config/rs6000/constraints.md (wF constraint): Remove power9
23 fusion documentation. Just document wF's use for power8 fusion.
24 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
25 (fusion_gpr_addis): Delete power9 fusion support. Change power8
26 fusion support to require the upper 12 bits to be all 0's or all
28 (fusion_gpr_mem_load): Add comment.
29 (fusion_addis_mem_combo_load): Remove power9 fusion support.
30 (fusion_addis_mem_combo_store): Delete.
31 (fusion_offsettable_mem_operand): Delete.
32 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
34 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
35 (POWERPC_MASKS): Delete power9 fusion.
36 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
37 (fusion_p9_p): Delete.
38 (expand_fusion_p9_load): Delete.
39 (expand_fusion_p9_store): Delete.
40 (emit_fusion_p9_load): Delete.
41 (emit_fusion_p9_store): Delete.
42 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
44 (rs6000_option_override_internal): Set power8 fusion based on
45 whether we are tuning for power8. Delete power9 fusion support.
46 (rs6000_opt_masks): Delete -mpower9-fusion switch.
47 (emit_fusion_load): Rename emit_fusion_load_store to
48 emit_fusion_load, and drop fusion store support. Update callers.
49 (emit_fusion_load_store): Likewise.
50 (emit_fusion_gpr_load): Likewise.
51 (fusion_p9_p): Delete.
52 (expand_fusion_p9_load): Delete.
53 (expand_fusion_p9_store): Delete.
54 (emit_fusion_p9_load): Delete.
55 (emit_fusion_p9_store): Delete.
56 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
59 (power9 fusion peephole2s): Delete.
60 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
61 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
62 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
63 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
64 (fusion_p9_<mode>_constant): Delete.
65 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
67 * doc/md.texi (PowerPC constraints): Update wF constraint
68 documentation for power8 fusion only.
70 2018-11-16 Jakub Jelinek <jakub@redhat.com>
72 PR rtl-optimization/87475
73 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
74 CROSSING_JUMP_P insns.
75 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
77 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
80 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
81 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
82 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
84 2018-11-16 Jakub Jelinek <jakub@redhat.com>
87 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
88 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
90 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
92 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
94 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
95 (switch_decision_tree::do_jump_if_equal): Likewise.
96 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
97 of switch statement to emit_case_nodes.
98 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
99 set it on the newly built GIMPLE comparison statement.
100 (switch_decision_tree::do_jump_if_equal): Likewise.
101 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
102 in calls to do_jump_if_equal as well as recursive calls.
104 2018-11-16 Andi Kleen <ak@linux.intel.com>
106 * config/i386/i386.md: Allow memory operands to ptwrite.
108 2018-11-16 Michael Matz <matz@suse.de>
110 * system.h (PRsa): New macro.
111 (SIZE_AMOUNT): Cast number to uint64_t.
112 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
113 (pool_usage::dump_footer): Likewise and also use PRIu64.
114 * bitmap.h (bitmap_usage::dump): Likewise.
115 * ggc-common.c (ggc_usage::dump): Likewise.
116 * ggc-page.c (ggc_print_statistics): Likewise.
117 * input.c (dump_line_table_statistics): Likewise.
118 * mem-stats.h (mem_usage::dump): Likewise.
119 (mem_usage::dump_footer): Likewise.
120 * rtl.c (dump_rtx_statistics): Likewise.
121 * tree-cfg.c (dump_cfg_stats): Likewise.
122 * tree-dfa.c (dump_dfa_stats): Likewise.
123 * tree-phinodes.c (phinodes_print_statistics): Likewise.
124 * tree-ssanames (ssanames_print_statistics): Likewise.
125 * vec.c (vec_usage::dump): Likewise.
126 (vec_usage::dump_footer): Likewise.
128 2018-11-16 Richard Biener <rguenther@suse.de>
130 PR tree-optimization/88011
131 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
132 replacing set_value_range_to_undefined and
133 set_value_range_to_varying with method calls.
135 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
137 * config/s390/s390.md
138 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
140 (*r<noxa>sbg_<mode>_sll): Likewise.
141 (*r<noxa>sbg_<mode>_srl): Likewise.
142 (*r<noxa>sbg_sidi_srl): New pattern.
144 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
146 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
147 Default to TARGET_VXWORKS_RTP.
148 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
149 of TARGET_VXWORKS_RTP.
150 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
151 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
152 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
154 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
157 * doc/extend.texi (Common Type Attributes): Make it explicit
158 that attribute "packed" can apply to C++ classes.
160 2018-11-15 Martin Sebor <msebor@redhat.com>
164 * tree.c (type_argument_type): New function.
165 * tree.h (type_argument_type): Declare it.
166 * gcc/doc/extend.texi (alloc_align): Update and clarify.
167 (alloc_size, nonnull, sentinel): Same.
169 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
170 Kwok Cheung Yeung <kcy@codesourcery.com>
172 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
173 int_mode_for_size fails.
174 (vectorizable_load): Likewise.
176 2018-11-15 David Malcolm <dmalcolm@redhat.com>
178 * doc/ux.texi (Group logically-related diagnostics): Move
179 discussion of auto_diagnostic_group into this new subsection.
180 Give an example of where this grouping is used.
182 2018-11-15 David Malcolm <dmalcolm@redhat.com>
185 * Makefile.in (OBJS): Move json.o to...
186 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
187 * common.opt (fdiagnostics-format=): New option.
188 (diagnostics_output_format): New enum.
189 * diagnostic-format-json.cc: New file.
190 * diagnostic.c (default_diagnostic_final_cb): New function, taken
191 from start of diagnostic_finish.
192 (diagnostic_initialize): Initialize final_cb to
193 default_diagnostic_final_cb.
194 (diagnostic_finish): Move "being treated as errors" messages to
195 default_diagnostic_final_cb. Call any final_cb.
196 (default_diagnostic_finalizer): Add diagnostic_t param.
197 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
198 diagnostic_finalizer callback.
199 * diagnostic.h (enum diagnostics_output_format): New enum.
200 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
201 (struct diagnostic_context): Add "final_cb".
202 (default_diagnostic_finalizer): Add diagnostic_t param.
203 (diagnostic_output_format_init): New decl.
204 * doc/invoke.texi (-fdiagnostics-format): New option.
205 * dwarf2out.c (gen_producer_string): Ignore
206 OPT_fdiagnostics_format_.
207 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
208 * lto-wrapper.c (append_diag_options): Ignore it.
209 * opts.c (common_handle_option): Handle it.
211 2018-11-15 David Malcolm <dmalcolm@redhat.com>
213 PR tree-optimization/88015
214 * graphite-isl-ast-to-gimple.c
215 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
217 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
219 2018-11-15 Richard Biener <rguenther@suse.de>
222 * gimple.c (gimple_call_flags): Union flags from decl, type
224 * trans-mem.c (is_tm_pure_call): Simplify.
226 2018-11-15 Richard Biener <rguenther@suse.de>
228 PR tree-optimization/88031
229 * tree-vect-loop.c (vectorizable_reduction): Move check
230 for multiple types earlier so we get the expected dump.
231 Simplify calls to vectorizable_condition.
232 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
233 * tree-vect-stmts.c (vectorizable_condition): Instead of
234 reduc_def and reduc_index take just a flag. Simplify
235 code-generation now that we can rely on the defs being set up.
236 (vectorizable_comparison): Remove unused argument.
238 2018-11-15 Richard Biener <rguenther@suse.de>
240 PR tree-optimization/88030
241 * tree-complex.c (need_eh_cleanup): New global.
242 (update_complex_assignment): Mark blocks that need EH update.
243 (expand_complex_comparison): Likewise.
244 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
245 perform EH cleanup and schedule CFG cleanup if that did anything.
247 2018-11-15 Jakub Jelinek <jakub@redhat.com>
249 PR rtl-optimization/88018
250 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
251 on the presence of fallthru edge, rather than if it is a USE or not.
253 2018-11-15 Richard Biener <rguenther@suse.de>
256 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
257 analyze_subscript_affine_affine properly.
259 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
261 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
262 (GLIBC_DYNAMIC_LINKER): Define.
263 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
265 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
267 PR tree-optimization/84648
268 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
269 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
270 by calling adjust_cond_for_loop_until_wrap.
272 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
275 * doc/extend.texi (Common Function Attributes): Clarify linker
276 restrictions on "aligned" attribute.
277 (Common Variable Attributes): Likewise. Mention that linker
278 restrictions don't apply to stack-allocated variables.
280 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
282 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
285 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
289 * doc/invoke.texi (Optimize Options): Remove bad example about
290 interaction between -flto and -O. Replace it with a note that
291 you need to compile with -O and not just link. Copy-edit -flto
292 discussion to reduce verbiage and improve flow.
294 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
297 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
298 also suppress many optimizations. Alphabetize option lists for
299 -O1, -O2, and -Os. Add list of options disabled with -Og, and
300 correct documentation for those options to say that.
301 * opts.c (default_options_table): Sort table by level and option
302 name, to make it easier to correlate to the manual.
304 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
306 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
307 printing of the names of segment registers.
309 2018-11-14 Nathan Sidwell <nathan@acm.org>
313 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
316 2018-11-14 David Malcolm <dmalcolm@redhat.com>
318 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
320 2018-11-14 Jakub Jelinek <jakub@redhat.com>
322 P1236R1 - Signed integers are two's complement
323 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
326 * hash-map.h (hash_map::iterator::reference_pair): New class.
327 (hash_map::iterator::operator*): Return it rather than std::pair.
329 2018-11-14 Jeff Law <law@redhat.com>
331 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
332 iff the operand is a constant.
334 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
336 * gimple-ssa-evrp-analyze.c
337 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
338 ignore_equivs_equal_p to equal_p.
339 * ipa-cp.c (meet_with_1): Use equal_p instead of
340 ignore_equivs_equal_p.
341 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
342 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
343 (value_range::operator==): Remove.
344 (value_range::operator!=): Remove.
345 (vrp_prop::visit_stmt): Use equal_p.
346 * tree-vrp.h (value_range): Remove operator==, operator!=,
347 ignore_equivs_equal_p.
348 * vr-values.c (update_value_range): Use equal_p.
350 2018-11-14 Michael Matz <matz@suse.de>
353 * gimplify.c (collect_fallthrough_labels): Add new argument,
354 return location via that, don't modify statements.
355 (warn_implicit_fallthrough_r): Adjust call, don't use
356 statement location directly.
358 2018-11-14 Richard Biener <rguenther@suse.de>
361 * tree-data-ref.c (split_constant_offset): Add wrapper
362 allocating a cache hash-map.
363 (split_constant_offset_1): Cache results of expanding
364 expressions from SSA def stmts.
366 2018-11-14 Richard Biener <rguenther@suse.de>
369 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
371 (lambda_vector_mult_const): Likewise.
372 (lambda_matrix_right_hermite): Use lambda_int temporaries.
374 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
375 Jackson Woodruff <jackson.woodruff@arm.com>
377 PR 71026/tree-optimization
378 * match.pd: Simplify floating point comparisons.
380 2018-11-14 Jakub Jelinek <jakub@redhat.com>
382 PR rtl-optimization/87817
383 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
384 last argument has low 8 bits clear, fold to 0.
386 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
388 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
389 MAX_OFILE_ALIGNMENT as needed.
391 2018-11-14 Richard Biener <rguenther@suse.de>
393 PR tree-optimization/88019
394 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
395 COND_EXPR arguments to non-trapping overflow.
397 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
399 * config/arc/arc.h (reg_class): Reorder registers classes, remove
400 unused register classes.
401 (REG_CLASS_NAMES): Likewise.
402 (REG_CLASS_CONTENTS): Likewise.
403 (FIXED_REGISTERS): Make lp_count fixed.
404 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
405 (PROGRAM_COUNTER_REGNO): Remove.
406 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
407 register classes, use constants for register numbers, remove
408 reg_class_contents references.
409 (arc_process_double_reg_moves): Add asserts.
410 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
411 lra_in_progress predicate.
412 (arc_init_reg_tables): Remove unused register classes.
413 (arc_register_move_cost): Likewise.
414 (arc_preferred_reload_class): Likewise.
415 (hwloop_optimize): Update rtx patterns involving lp_count register.
416 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
417 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
418 CHEAP_CORE_REGS. Former one will be used for LRA.
419 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
420 one will be used for LRA.
421 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
422 one will be used for LRA.
423 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
424 Former one will be used for LRA.
425 ("f"): Delete constraint.
428 ("l"): Change it from register constraint to constraint.
429 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
430 (movhi_insn): Likewise.
431 (movsi_insn): Update pattern.
434 (stack_tie): Remove 'b' constraint letter.
436 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
437 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
438 (R57_REG, R59_REG, PCL_REG): Likewise.
439 (ILINK1_REGNUM): Renamed to ILINK1_REG.
440 (ILINK2_REGNUM): Renamed to ILINK2_REG.
443 (Rcw): Remove unused reg classes.
444 * config/arc/predicates.md (dest_reg_operand): Just default on
445 register_operand predicate.
446 (mpy_dest_reg_operand): Likewise.
447 (move_dest_operand): Use macros instead of constants.
448 * config/arc/arc.opt (mlra): Switch to lra as default.
450 2018-11-14 Richard Biener <rguenther@suse.de>
452 PR tree-optimization/87974
453 * tree-vect-loop.c (vectorizable_reduction): When computing
454 the vectorized reduction PHI vector type ignore constant
457 2018-11-14 Jakub Jelinek <jakub@redhat.com>
459 PR tree-optimization/87977
460 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
461 stmt, build a new one and replace the old one with it. Formatting fix.
462 Call release_ssa_name (x) if !has_other_use and !delete_div.
463 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
464 verify lhs of stmt is still def.
466 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
468 PR rtl-optimization/87507
469 * lower-subreg.c (operand_for_swap_move_operator): New function.
470 (simple_move): Strip simple operators.
471 (find_pseudo_copy): Likewise.
472 (resolve_operand_for_swap_move_operator): New function.
473 (resolve_simple_move): Strip simple operators and swap operands.
475 2018-11-13 Jakub Jelinek <jakub@redhat.com>
477 PR tree-optimization/87898
478 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
479 (ipa_simd_modify_function_body): Remove debug stmts where the first
480 argument was changed into a non-decl.
482 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
484 PR rtl-optimization/87899
485 * lra-lives.c (start_living): Update white space in comment.
486 (enum point_type): New.
487 (sparseset_contains_pseudos_p): New function.
488 (update_pseudo_point): Likewise.
489 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
490 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
491 handling. Move early exit after adding conflicts.
492 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
493 if regno is already live. Remove all handling of program points.
494 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
495 after adding conflicts. Remove all handling of program points and
496 ignore_reg_for_conflicts.
497 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
498 and do not guard call to mark_pseudo_live.
499 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
500 and do not guard call to mark_pseudo_dead.
501 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
502 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
503 Use new function update_pseudo_point. Handle register copies by
504 removing the source register from the live set. Handle INOUT operands.
505 Update to the next program point using the unused_set, dead_set and
507 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
509 2018-11-13 David Malcolm <dmalcolm@redhat.com>
511 * builtins.c: Replace "source_location" with "location_t".
512 * diagnostic-show-locus.c: Likewise.
513 * diagnostic.c: Likewise.
514 * dumpfile.c: Likewise.
515 * gcc-rich-location.h: Likewise.
516 * genmatch.c: Likewise.
517 * gimple.h: Likewise.
518 * gimplify.c: Likewise.
520 * input.h: Likewise. Eliminate the typedef.
521 * omp-expand.c: Likewise.
522 * selftest.h: Likewise.
523 * substring-locations.h (get_source_location_for_substring):
525 (get_location_within_string): ...this.
526 * tree-cfg.c: Replace "source_location" with "location_t".
527 * tree-cfgcleanup.c: Likewise.
528 * tree-diagnostic.c: Likewise.
529 * tree-into-ssa.c: Likewise.
530 * tree-outof-ssa.c: Likewise.
531 * tree-parloops.c: Likewise.
532 * tree-phinodes.c: Likewise.
533 * tree-phinodes.h: Likewise.
534 * tree-ssa-loop-ivopts.c: Likewise.
535 * tree-ssa-loop-manip.c: Likewise.
536 * tree-ssa-phiopt.c: Likewise.
537 * tree-ssa-phiprop.c: Likewise.
538 * tree-ssa-threadupdate.c: Likewise.
539 * tree-ssa.c: Likewise.
540 * tree-ssa.h: Likewise.
541 * tree-vect-loop-manip.c: Likewise.
543 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
545 * doc/extend.texi: Fix typo in the weakref description.
547 2018-11-13 Richard Biener <rguenther@suse.de>
549 PR tree-optimization/86991
550 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
551 group building until we have successfully detected the SLP
553 (vect_is_simple_reduction): Remove fixup code here.
555 2018-11-13 David Malcolm <dmalcolm@redhat.com>
557 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
558 (dump_gimple_stmt): Use it.
559 (dump_gimple_stmt_loc): Likewise.
560 (dump_gimple_expr): Likewise.
561 (dump_gimple_expr_loc): Likewise.
562 (dump_generic_expr): Likewise.
563 (dump_generic_expr_loc): Likewise.
564 (dump_printf): Likewise.
565 (dump_printf_loc): Likewise.
566 (dump_dec): Likewise.
567 (dump_dec): Likewise.
568 (dump_hex): Likewise.
569 (dump_symtab_node): Likewise.
570 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
571 Guard dump call with dump_enabled_p.
572 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
573 * graphite-optimize-isl.c (optimize_isl): Likewise.
574 * graphite.c (graphite_transform_loops): Likewise.
575 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
576 * tree-parloops.c (parallelize_loops): Likewise.
577 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
578 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
579 (vect_prune_runtime_alias_test_list): Likewise.
580 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
581 (vect_estimate_min_profitable_iters): Likewise.
582 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
583 (vect_build_slp_tree_2): Likewise.
584 (vect_supported_load_permutation_p): Likewise.
585 (vect_slp_analyze_operations): Likewise.
586 (vect_slp_analyze_bb_1): Likewise.
587 (vect_slp_bb): Likewise.
588 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
589 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
590 (pass_slp_vectorize::execute): Likewise.
591 (increase_alignment): Likewise.
593 2018-11-13 David Malcolm <dmalcolm@redhat.com>
596 * ipa-inline.c (report_inline_failed_reason): Guard calls to
597 cl_target_option_print_diff and cl_optimization_print_diff with
600 2018-11-13 David Malcolm <dmalcolm@redhat.com>
602 * doc/invoke.texi (-fsave-optimization-record): Note that the
603 output is compressed.
604 * optinfo-emit-json.cc: Include <zlib.h>.
605 (optrecord_json_writer::write): Compress the output.
607 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
609 * tree-vrp.c (value_range_base::dump): Dump type.
610 Do not use INF nomenclature for 1-bit types.
611 (dump_value_range): Group all variants to common dumping code.
612 (debug): New overloaded functions for value_ranges.
613 (value_range_base::dump): Remove no argument version.
614 (value_range::dump): Same.
616 2018-11-13 Richard Biener <rguenther@suse.de>
618 PR tree-optimization/87931
619 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
620 nested cycles we support to latch computations vectorizable_reduction
623 2018-11-13 Martin Liska <mliska@suse.cz>
625 PR tree-optimization/87885
626 * cfghooks.c (account_profile_record): Rename
628 (profile_record_check_consistency): ... this.
629 Calculate missing num_mismatched_freq_in.
630 (profile_record_account_profile): New function
631 that calculates time and size of a function.
632 * cfghooks.h (struct profile_record): Remove
634 (struct cfg_hooks): Remove after_pass flag.
635 (account_profile_record): Rename to ...
636 (profile_record_check_consistency): ... this.
637 (profile_record_account_profile): New.
638 * cfgrtl.c (rtl_account_profile_record): Remove
640 * passes.c (check_profile_consistency): Do only
642 (account_profile): Calculate size and time of
644 (pass_manager::dump_profile_report): Reformat
646 (execute_one_ipa_transform_pass): Call
647 consistency check before clean upand call account_profile
648 after a clean up is done.
649 (execute_one_pass): Call check_profile_consistency and
650 account_profile instead of using after_pass flag..
651 * tree-cfg.c (gimple_account_profile_record): Likewise.
653 2018-11-13 Martin Liska <mliska@suse.cz>
656 * config/i386/i386.c (ix86_option_override_internal): Error
657 about usage -mabi=ms and -fsanitize={,kernel-}address.
659 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
661 * config/aarch64/aarch64.c
662 (aarch64_vectorize_preferred_vector_alignment): Change return type to
664 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
665 alignment being a poly int.
666 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
667 return type to poly_uint64.
668 * target.def (default_preferred_vector_alignment): Likewise.
669 * targhooks.c (default_preferred_vector_alignment): Likewise.
670 * targhooks.h (default_preferred_vector_alignment): Likewise.
671 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
672 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
674 (vect_update_misalignment_for_peel): Likewise.
675 (vect_enhance_data_refs_alignment): Likewise.
676 (vect_find_same_alignment_drs): Likewise.
677 (vect_duplicate_ssa_name_ptr_info): Likewise.
678 (vect_setup_realignment): Likewise.
679 (vect_can_force_dr_alignment_p): Change alignment parameter type to
681 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
682 mask with a compile time variable vector alignment.
683 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
685 (vect_do_peeling): Exit early if vector alignment is not constant.
686 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
688 (vectorizable_store): Likewise.
689 (vectorizable_load): Likweise.
690 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
692 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
694 (vect_can_force_dr_alignment_p): Change alignment parameter type to
697 2018-11-13 Richard Biener <rguenther@suse.de>
699 PR tree-optimization/87962
700 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
701 detect outer reduction for disqualifying in-loop uses.
703 2018-11-13 Richard Biener <rguenther@suse.de>
705 PR tree-optimization/87967
706 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
707 for constants for the scalar loop.
709 2018-11-13 Alan Modra <amodra@gmail.com>
711 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
712 integer constants when -mcmodel=medium.
714 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
716 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
717 * config/arc/elf.h (PROFILE_HOOK): Define.
718 * config/arc/linux.h (PROFILE_HOOK): Likewise.
720 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
722 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
723 jump table data in the text section.
725 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
727 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
728 to fit the eh_return pattern.
729 * config/arc/arc.md (eh_return): Define.
730 (VUNSPEC_ARC_EH_RETURN): Likewise.
731 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
733 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
736 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
738 * common/config/arc/arc-common.c (arc_option_optimization_table):
739 Millicode optimization is default on for size optimizations.
740 * config/arc/arc-protos.h (arc_check_multi): New function.
741 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
742 (ENTER_LEAVE_START_REG): Define.
743 (ENTER_LEAVE_END_REG): Likewise.
744 (arc_override_options): Disable millicode when long calls option
746 (arc_frame_info): Change it from int to bool.
747 (arc_compute_frame_size): Clean up.
748 (arc_save_restore): Remove.
749 (frame_save_reg): New function.
750 (frame_restore_reg): Likewise.
751 (arc_enter_leave_p): Likewise.
752 (arc_save_callee_saves): Likewise.
753 (arc_restore_callee_saves): Likewise.
754 (arc_save_callee_enter): Likewise.
755 (arc_restore_callee_leave): Likewise.
756 (arc_save_callee_milli): Likewise.
757 (arc_restore_callee_milli): Likewise.
758 (arc_expand_prologue): Reimplement to emit enter/leave
760 (arc_expand_epilogue): Likewise.
761 (arc_check_multi): New function.
762 * config/arc/arc.md (push_multi_fp): New pattern.
763 (push_multi_fp_blink): Likewise.
764 (pop_multi_fp): Likewise.
765 (pop_multi_fp_blink): Likewise.
766 (pop_multi_fp_ret): Likewise.
767 (pop_multi_fp_blink_ret): Likewise.
768 * config/arc/arc.opt (mmillicode): Update option.
769 (mcode-density-frame): New option.
770 * config/arc/predicates.md (push_multi_operand): New predicate.
771 (pop_multi_operand): Likewise.
772 * doc/invoke.texi (ARC): Update ARC options information.
775 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
777 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
778 * config/arc/arc.c (operands_ok_ldd_std): New function.
779 (mem_ok_for_ldd_std): Likewise.
780 (gen_operands_ldd_std): Likewise.
781 * config/arc/arc.md: Add peephole2 rules for std/ldd.
783 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
785 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
786 test on stack_usage_file.
787 (lang_dependent_init): Do not open the .su file if generating LTO.
789 2018-11-13 Jakub Jelinek <jakub@redhat.com>
791 PR rtl-optimization/87918
792 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
793 simplify_gen_relational rather than simplify_gen_binary.
795 2018-11-13 Richard Biener <rguenther@suse.de>
797 * tree-ssanames.h (set_range_info): Use value_range_base.
798 (get_range_info): Likewise.
799 * tree-ssanames.c (set_range_info): Likewise.
800 (get_range_info): Likewise.
801 * tree-vrp.c (value_range_base::union_helper): Split
802 out common parts of value_range[_base]::union_.
803 (value_range_base::union_): Update.
804 (value_range::union_): Likewise.
805 (determine_value_range_1): Use value_range_base.
806 (determine_value_range): Likewise.
807 * tree-vrp.h (value_range_base::union_helper): Move ...
808 (value_range::union_helper): ... from here.
810 2018-11-13 Alan Modra <amodra@gmail.com>
812 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
814 (rs6000_secondary_reload_gpr): Don't call find_replacement.
816 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
819 * doc/invoke.texi (Optimize Options): Clarify that the
820 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
821 apply to data cache size.
823 2018-11-13 Alan Modra <amodra@gmail.com>
825 * config/rs6000/predicates.md (logical_const_operand),
826 (logical_operand): Correct comment.
827 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
829 2018-11-13 Alan Modra <amodra@gmail.com>
831 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
833 2018-11-13 Alan Modra <amodra@gmail.com>
835 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
837 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
838 covered by alternative.
839 (movcc_internal1): Ignore h for register preference.
840 (mov<mode>_hardfloat64): Likewise.
841 (mov<mode>_softfloat): Ignore c, l, h for register preference.
843 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
845 PR preprocessor/47823
846 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
849 * doc/extend.texi (Pragmas): Note additional pragmas documented
852 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
856 * tree-scalar-evolution.c (expression_expensive_p): Make
857 BUILTIN POPCOUNT as expensive when backend does not define it.
859 2018-11-12 Fredrik Noring <noring@nocrew.org>
861 * config.gcc: Update with-llsc defaults for MIPS r5900.
863 2018-11-12 Martin Liska <mliska@suse.cz>
865 PR gcov-profile/87442
866 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
868 * doc/invoke.texi: Document them.
869 * tree-profile.c (parse_profile_filter): New.
870 (parse_profile_file_filtering): Likewise.
871 (release_profile_file_filtering): Likewise.
872 (include_source_file_for_profile): Likewise.
873 (tree_profiling): Filter source files based on the
876 2018-11-12 Martin Liska <mliska@suse.cz>
879 * doc/extend.texi: Add missing values for __builtin_cpu_is and
880 __builtin_cpu_supports for x86 target.
882 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
885 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
887 (Arithmetic): Likewise for "lo_sum".
889 2018-11-12 Renlin Li <renlin.li@arm.com>
892 * dse.c (get_stored_val): Add check for compile-time constantness
895 2018-11-12 Sudakshina Das <sudi.das@arm.com>
897 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
898 (ARMv8_5a): New fgroup.
899 (armv8.5-a): New arch.
900 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
902 * config/arm/arm-tables.opt: Regenerate.
903 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
904 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
905 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
906 Add matching rules for -march=armv8.5-a and extensions.
907 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
908 Add sb and predres to all armv8-a except armv8.5-a.
910 2018-11-12 Richard Biener <rguenther@suse.de>
912 * tree-vrp.h (value_range[_base]::set): Make public. Provide
913 overload for single value.
914 (value_range[_base]::set_nonnull): New.
915 (value_range[_base]::set_null): Likewise.
916 (value_range): Document bitmap copying behavior, mark
917 copy constructor and assignment operator deleted.
918 (value_range::move): New.
919 (value_range::set_and_canonicalize): Default bitmap to zero.
920 (set_value_range_to_nonnull): Remove.
921 (set_value_range_to_null): Likewise.
922 (set_value_range): Likewise.
923 (set_value_range_to_value): Likewise.
924 (extract_range_from_unary_expr): Work on value_range_base.
925 (extract_range_from_binary_expr_1): Likewise. Rename to...
926 (extract_range_from_binary_expr): ... this.
927 * tree-vrp.c (value_range::update): Clear equiv bitmap
929 (value_range::move): New, move equiv bitmap.
930 (value_range_base::set_undefined): Avoid assignment.
931 (value_range::set_undefined): Likewise.
932 (value_range_base::set_varying): Likewise.
933 (value_range::set_varying): Likewise.
934 (set_value_range): Remove.
935 (value_range_base::set): New overload for value.
936 (value_range::set): Likewise.
937 (set_value_range_to_nonnull): Remove.
938 (value_range_base::set_nonnull): New.
939 (value_range::set_nonnull): Likewise.
940 (set_value_range_to_null): Remove.
941 (value_range_base::set_null): New.
942 (value_range::set_null): Likewise.
943 (range_is_null): Work on value_range_base.
944 (range_is_nonnull): Likewise.
945 (ranges_from_anti_range): Likewise.
946 (extract_range_into_wide_ints): Likewise.
947 (extract_range_from_multiplicative_op): Likewise.
948 (extract_range_from_binary_expr): Likewise. Update for API changes.
949 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
951 (value_range::intersect_helper): Avoid copy and assignment.
952 (value_range::union_helper): Likewise.
953 (determine_value_range_1): Adjust.
954 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
955 Avoid assignment by using move.
956 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
957 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
959 * tree-ssanames.c (get_range_info): Likewise.
960 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
961 * vr-values.c (vr_values::get_value_range): Adjust.
962 (vr_values::update_value_range): Likewise.
963 (symbolic_range_based_on_p): Work on value_range_base.
964 (vr_values::extract_range_from_binary_expr): Use value_range_base.
965 (vr_values::extract_range_from_unary_expr): Likewise.
966 (vr_values::extract_range_from_cond_expr): Avoid assignment.
967 (vr_values::extract_range_from_comparison): Adjust.
968 (vr_values::check_for_binary_op_overflow): Use value_range_base.
969 (vr_values::extract_range_basic): Adjust.
970 (vr_values::adjust_range_with_scev): Likewise.
971 (vr_values::vrp_visit_assignment_or_call): Likewise.
972 (vr_values::get_vr_for_comparison): Change API to avoid
973 assignment and copy construction.
974 (vr_values::compare_name_with_value): Adjust accordingly.
975 (vr_values::compare_names): Likewise.
976 (vr_values::extract_range_from_phi_node): Avoid assignment and
977 bogus in-place modify of equiv bitmap.
978 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
979 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
980 for extract_range_from_unary_expr API change.
981 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
983 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
985 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
987 2018-11-12 Richard Biener <rguenther@suse.de>
989 * tree-vrp.h (value_range_base::symbolic_p,
990 value_range_base::constant_p, value_range_base::zero_p,
991 value_range_base::singleton_p): Move from value_range.
992 (value_range::dump): Add.
993 * gimple-ssa-evrp-analyze.c
994 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
995 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
996 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
998 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
999 (value_range::constant_p): Likewise.
1000 (value_range::singleton_p): Likewise.
1001 (value_range_base::dump): Add.
1002 (set_value_range_to_undefined): Remove.
1003 (set_value_range_to_varying): Likewise.
1004 (range_int_cst_p): Take value_range_base argument.
1005 (range_int_cst_singleton_p): Likewise.
1006 (value_range_constant_singleton): Likewise.
1007 (vrp_set_zero_nonzero_bits): Likewise.
1008 (extract_range_from_multiplicative_op): Use set_varying.
1009 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
1010 (extract_range_from_unary_expr): Likewise.
1011 (dump_value_range_base): Change to overload of dump_value_range.
1012 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
1013 (vrp_prop::visit_stmt): Likewise.
1014 (value_range::intersect_helper): Likewise.
1015 (value_range::union_helper): Likewise.
1016 (determine_value_range_1): Likewise.
1018 2018-11-12 Richard Biener <rguenther@suse.de>
1020 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
1021 (set_value_range_to_null): Likewise.
1022 * vr-values.c (vr_values::extract_range_from_comparison):
1023 Clear equiv for constant singleton ranges.
1025 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
1027 * config/i386/sse.md: Combine VFIXUPIMM* patterns
1028 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1029 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1030 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
1031 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1032 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1033 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
1035 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1038 * doc/extend.texi (Common Type Attributes): For the align type
1039 attribute, copy language about decreasing alignment from the
1040 corresponding variable attribute.
1042 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1044 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
1047 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1050 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
1051 -frtti and -fno-rtti code.
1053 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1056 * doc/extend.texi (Other Builtins): Document probability associated
1057 with __builtin_expect.
1059 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
1062 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
1063 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
1064 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
1065 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
1067 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1069 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
1071 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1073 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
1075 2018-11-11 Richard Biener <rguenther@suse.de>
1077 * tree-vrp.h (class value_range_base): New base class for
1078 value_range containing all but the m_equiv member.
1079 (dump_value_range_base): Add.
1080 (range_includes_zero_p): Work on value_range_base.
1081 * tree-vrp.c (value_range_base::set): Split out base handling
1083 (value_range::set): this.
1084 (value_range::set_equiv): New.
1085 (value_range_base::value_range_base): New constructors.
1086 (value_range_base::check): Split out base handling from...
1087 (value_range::check): this.
1088 (value_range::equal_p): Refactor in terms of
1089 ignore_equivs_equal_p which is now member of the base.
1090 (value_range_base::set_undefined): New.
1091 (value_range_base::set_varying): Likewise.
1092 (value_range_base::dump):Split out base handling from...
1093 (value_range::dump): this.
1094 (value_range_base::set_and_canonicalize): Split out base handling
1096 (value_range::set_and_canonicalize): this.
1097 (value_range_base::union_): New.
1098 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
1100 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
1101 instead of value_range everywhere.
1102 (ipcp_vr_lattice::print): Use dump_value_range_base.
1103 (ipcp_vr_lattice::meet_with): Adjust.
1104 (ipcp_vr_lattice::meet_with_1): Likewise.
1105 (ipa_vr_operation_and_type_effects): Likewise.
1106 (propagate_vr_across_jump_function): Likewise.
1107 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
1108 (ipa_get_value_range): Likewise.
1109 (ipa_set_jfunc_vr): Likewise.
1110 (ipa_compute_jump_functions_for_edge): Likewise.
1112 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
1115 * doc/invoke.texi (Optimize Options): Add @opindex entries
1116 for the positive forms of -fno-xxx and -mno-xxx options
1117 that were lacking them.
1119 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
1121 * combine.c (make_more_copies): Only make an intermediate copy if the
1122 dest of a move is a pseudo.
1124 2018-11-09 Maya Rashish <coypu@sdf.org>
1127 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1128 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1130 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
1134 * doc/invoke.texi (Optimize Options): Clarify default behavior
1135 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
1137 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
1139 PR tree-optimization/87940
1140 * expr.c (string_constant): Don't strip NOPS in subexpressions.
1141 Fold PLUS_EXPR correctly.
1143 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
1146 * config/s390/s390.c (s390_safe_relative_long_p): New function.
1147 (annotate_constant_pool_refs): Skip insns which support
1148 relative addressing.
1149 (annotate_constant_pool_refs_1): New helper function.
1150 (find_constant_pool_ref): Skip insns which support relative
1152 (find_constant_pool_ref_1): New helper function.
1153 (replace_constant_pool_ref): Skip insns which support
1154 relative addressing.
1155 (replace_constant_pool_ref_1): New helper function.
1156 (s390_mainpool_start): Adapt to the new signature.
1157 (s390_mainpool_finish): Likewise.
1158 (s390_chunkify_start): Likewise.
1159 (s390_chunkify_finish): Likewise.
1160 (pass_s390_early_mach::execute): Likewise.
1161 (s390_prologue_plus_offset): Likewise.
1162 (s390_emit_prologue): Likewise.
1163 (s390_emit_epilogue): Likewise.
1165 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1167 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1168 but unsupported lastprivate with conditional modifier.
1170 2018-11-09 Jeff Law <law@redhat.com>
1172 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1173 unused argument better. Add gcc_unreachable to silence warning.
1175 2018-11-09 Martin Sebor <msebor@redhat.com>
1178 * attribs.c (has_attribute): New helper function.
1179 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1180 * attribs.h (decls_mismatched_attributes): Declare.
1181 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1182 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1183 * common.opt (-Wattribute-alias): Take an argument.
1184 (-Wno-attribute-alias): New option.
1185 * doc/extend.texi (Common Function Attributes): Document copy.
1186 (Common Variable Attributes): Same.
1187 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1188 (-Wattribute-alias): Document new option argument.
1190 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1192 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1193 matching criteria. Remove unused array initializer.
1195 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
1196 Jinsong Ji <jji@us.ibm.com>
1198 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1199 constraints by introducing a new temporary.
1200 (_mm_cvtss_si64): Likewise.
1202 2018-11-09 Martin Liska <mliska@suse.cz>
1204 * common.opt: Add -fipa-stack-alignment flag.
1205 * doc/invoke.texi: Document it.
1206 * final.c (rest_of_clean_state): Guard stack
1207 shrinking with flag.
1209 2018-11-09 Martin Liska <mliska@suse.cz>
1211 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1213 (ipa_discover_variable_flags): ... this.
1214 * common.opt: Come up with new flag -fipa-reference-addressable.
1215 * doc/invoke.texi: Document it.
1216 * ipa-reference.c (propagate): Call the renamed fn.
1217 * ipa-visibility.c (whole_program_function_and_variable_visibility):
1219 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1221 (ipa_discover_variable_flags): ... this. Discover
1222 non-addressable variables only with the newly added flag.
1223 * opts.c: Enable the newly added flag with -O1 and higher
1226 2018-11-09 David Malcolm <dmalcolm@redhat.com>
1228 * json.cc (selftest::test_writing_literals): Fix comment.
1230 2018-11-09 Martin Liska <mliska@suse.cz>
1232 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1233 string to a stack buffer.
1234 (aarch64_parse_cpu): Likewise.
1235 (aarch64_parse_tune): Likewise.
1237 2018-11-09 Richard Biener <rguenther@suse.de>
1239 PR tree-optimization/87953
1240 * tree-vect-loop.c (vectorizable_reduction): For analysis
1241 always pass ops[0] to vectorizable_condition.
1243 2018-11-09 Stafford Horne <shorne@gmail.com>
1244 Richard Henderson <rth@twiddle.net>
1245 Joel Sherrill <joel@rtems.org>
1247 * common/config/or1k/or1k-common.c: New file.
1248 * config/or1k/*: New.
1249 * config.gcc (or1k*-*-*): New.
1250 * configure.ac (or1k*-*-*): New test for openrisc tls.
1251 * configure: Regenerated.
1252 * doc/install.texi: Document OpenRISC triplets.
1253 * doc/invoke.texi: Document OpenRISC arguments.
1254 * doc/md.texi: Document OpenRISC.
1256 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1258 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1259 (arm7tdmi-s): Delete CPU.
1260 (arm710t): Add aliases for arm720t and arm740t.
1261 (arm720t, arm740t): Delete CPUs.
1262 (arm920t): Add aliases for arm920, arm922t and arm940t.
1263 (arm920, arm922t, arm940t): Delete CPUs.
1264 (arm10tdmi): Add alias for arm1020t.
1265 (arm1020t): Delete CPU.
1266 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1267 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1268 (arm10e): Add aliases for arm1020e and arm1022e.
1269 (arm1020e, arm1022e): Delete CPU.
1270 * config/arm/arm.md (generic_sched): Remove entries that are now
1272 (generic_vfp): Likewise.
1273 * config/arm/arm1020e.md: Simplify tuning selection based on alias
1275 * config/arm/arm-tune.md: Regenerated.
1276 * config/arm/arm-tables.opt: Regenerated.
1278 2018-11-09 Richard Biener <rguenther@suse.de>
1280 PR tree-optimization/87621
1281 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1282 op with only phi inputs.
1283 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1284 (ch_base::copy_headers): Run CSE on copied loop headers.
1285 (pass_ch_vect::process_loop_p): Simplify.
1287 2018-11-09 Alexandre Oliva <oliva@adacore.com>
1289 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1290 for non-w64 x86_64 biarch.
1292 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
1294 PR rtl-optimization/86438
1295 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1296 of in_b for the compare if in_b is SET_DEST.
1299 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1300 non-toplevel UNSPEC.
1302 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1304 * tree-vrp.c (value_range::check): Do not access internals
1306 (value_range::singleton_p): Same.
1307 (value_range::type): Same.
1308 (vrp_finalize): Use value_range API.
1310 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1312 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1314 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1316 * vr-values.c (vr_values::get_value_range): Use value_range API
1317 instead of piecing together ranges.
1318 (vr_values::update_value_range): Same.
1320 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1322 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1323 of performing ad-hoc calculations.
1324 * tree-ssanames.c (set_range_info): New overloaded function
1325 accepting value_range &.
1326 (get_range_info): Same.
1327 * tree-ssanames.h (set_range_info_raw): Remove.
1328 (set_range_info): New prototype.
1329 (get_range_info): Same.
1330 * tree-vrp.h (value_range::null_p): Rename to zero_p.
1331 * tree-vrp.c (value_range::null_p): Same.
1333 2018-11-09 Jan Hubicka <jh@suse.cz>
1335 * tree.c (fld_type_variant_equal_p): Test user align flag.
1336 (flt_type_variant): Copy user align flag.
1337 (fld_incomplete_type_of): Clear it.
1339 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1341 * config/arm/neon.md (div<mode>3): New pattern.
1343 2018-11-08 Andi Kleen <ak@linux.intel.com>
1345 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1346 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1347 (ix86_handle_option): Handle OPT_mptwrite.
1348 * config/i386/cpuid.h (bit_PTWRITE): Add.
1349 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1350 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1351 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1352 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1353 (ix86_option_override_internal): Handle PTA_PTWRITE.
1354 (ix86_valid_target_attribute_inner_p): Define ptwrite.
1355 (def_builtin2): Force UINT64 to be 64bit only.
1356 * config/i386/i386.h (TARGET_PTWRITE): Add.
1357 (TARGET_PTWRITE_P): Add.
1359 * config/i386/i386.md: Define ptwrite.
1360 * config/i386/i386.opt: Add -mptwrite.
1361 * config/i386/immintrin.h (_ptwrite64): Add.
1363 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1364 * doc/invoke.texi: Document -mptwrite.
1366 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
1368 PR rtl-optimization/87600
1369 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1370 * lra-constraints.c (process_alt_operands): Skip illegal hard
1371 register usage. Prefer reloading non hard register operands.
1373 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
1376 * doc/invoke.texi (Optimize Options): Clarify default behavior
1377 for -fno-sched-interblock and -fno-sched-spec.
1379 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
1381 * collect2.c (linker_select): Add USE_LLD_LD.
1382 (ld_suffixes): Add ld.lld.
1383 (main): Handle -fuse-ld=lld.
1384 * common.opt (-fuse-ld=lld): New option.
1385 * doc/invoke.texi (-fuse-ld=lld): Document.
1386 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1388 2018-11-08 Paul Koning <ni1d@arrl.net>
1390 * config/pdp11/constraints.md: Add "Z" series constraints for use
1391 with pre-dec and post-inc addressing.
1392 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1393 (pdp11_expand_operands): Add int argument (word count).
1394 (pdp11_sp_frame_offset): Delete.
1395 (pdp11_cmp_length): New function.
1396 (pushpop_regeq): New function.
1397 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1399 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1401 (pdp11_initial_elimination_offset): Ditto.
1402 (pdp11_expand_operands): Add word count argument. Bugfixes.
1403 (output_move_multiple): Change how pointer adjustment is done.
1404 (pdp11_gen_int_label): Correct format.
1405 (output_ascii): Ditto.
1406 (pdp11_asm_output_var): Add code for DEC assembler case.
1407 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1409 (legitimate_const_double_p): Ditto.
1410 (pdp11_register_move_cost): Adjust for new register classes.
1411 (pdp11_regno_reg_class): Ditto.
1412 (expand_block_move): Delete.
1413 (pushpop_regeq): New function.
1414 (pdp11_legitimate_address_p): Bugfix in check for constant
1416 (pdp11_sp_frame_offset): Delete.
1417 (pdp11_reg_save_size): New helper function for new frame layout.
1418 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1419 (pdp11_expand_shift): Bugfix in check for constant shift count.
1420 (pdp11_shift_length): Ditto.
1421 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1422 (pdp11_cmp_length): New function.
1423 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1424 some compile options.
1425 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1426 (CALL_USED_REGISTERS): Ditto.
1427 (ELIMINABLE_REGS): Ditto.
1428 (REGISTER_NAMES): Ditto.
1429 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1431 (REG_CLASS_NAMES): Ditto.
1432 (REG_CLASS_CONTENTS): Ditto. Also remove
1433 HARD_FRAME_POINTER_REGNUM.
1434 (CPU_REG_CLASS): New macro.
1435 (CLASS_MAX_NREGS): Adjust for new register classes.
1436 (FUNCTION_PROFILER): Make no-op.
1437 (may_call_alloca): Remove unused declaration.
1438 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1439 (ASM_OUTPUT_SKIP): Fix format.
1440 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1441 (HARD_FRAME_POINTER_REGNUM): Remove.
1443 (*rts): Rename. Remove epilogue related checks.
1444 (cmpsi, cmpdi): New insn.
1445 (cbranch<mode>4): Change to apply to SI and DI modes as well.
1446 (mov<mode>): Change constraints to enforce that push/pop
1447 destination cannot use the same register as source.
1448 (*mov<mode><cc_cc>): Ditto.
1449 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1450 at assembly output rather than as RTL expander.
1451 (zero_extendqihi2): Bugfix in check for same registers.
1452 (adddi3_nocc): Bugfix in check for constant operand.
1453 (addsi3_nocc): Ditto.
1454 (subdi3_nocc): Ditto.
1455 (subsi3_nocc): Ditto.
1456 (negdi2_nocc): Copy input to pdp11_expand_operands.
1457 (negsi2_nocc): Ditto.
1458 (bswap2_nocc): Ditto.
1459 * config/pdp11/pdp11.opt (mlra): Fix documentation.
1460 * config/pdp11/t-pdp11: Use -Os.
1462 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
1464 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1465 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1466 (gen_comm_data): Print out CPU alias tables.
1467 (check_cpu): Match aliases when checking the CPU name.
1468 * config/arm/arm-protos.h (cpu_alias): New structure.
1469 (cpu_option): Add entry for aliases.
1470 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1471 strongarm1100 and strongarm1110.
1472 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1473 (config/arm/arm-generic.md): Remove redundant references to
1474 strongarm110, strongarm1100 and strongarm1110.
1475 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1476 Scan aliases for additional hints.
1477 (arm_parse_cpu_option_name): Also match a cpu name against the list
1479 * config/arm/arm-tables.opt: Regenerated.
1480 * config/arm/arm-tune.md: Regenerated.
1482 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1484 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1485 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1486 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1487 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1488 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1489 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1490 * gengtype.c (open_base_files): Add omp-general.h.
1491 * gimple.c (gimple_build_omp_critical):
1492 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1493 gimple_omp_taskgroup_set_clauses.
1494 (gimple_build_omp_atomic_load): Add mo argument, call
1495 gimple_omp_atomic_set_memory_order.
1496 (gimple_build_omp_atomic_store): Likewise.
1497 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1498 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1500 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1501 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1502 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1503 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1504 different value for GF_OMP_ATOMIC_NEED_VALUE.
1505 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1507 (struct gimple_statement_omp_single_layout): And remove here.
1508 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1509 than gimple_statement_omp_single_layout.
1510 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1512 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1513 (gimple_omp_subcode): Formatting fix.
1514 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1515 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1516 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1517 gimple_omp_teams_host, gimple_omp_teams_set_host,
1518 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1519 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1520 gimple_omp_taskgroup_set_clauses): New inline functions.
1521 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1522 (gimple_build_omp_atomic_store): Likewise.
1523 (gimple_omp_atomic_seq_cst_p): Remove.
1524 (gimple_omp_atomic_memory_order): New function.
1525 (gimple_omp_atomic_set_seq_cst): Remove.
1526 (gimple_omp_atomic_set_memory_order): New function.
1527 (gimple_build_omp_taskgroup): Add clauses argument.
1528 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1529 (dump_gimple_omp_task): Print taskwait with depend clauses.
1530 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1531 dump_omp_atomic_memory_order.
1532 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1533 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1534 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1535 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1536 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1537 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1538 ORT_UNTIED_TASKLOOP enumerators.
1539 (enum gimplify_defaultmap_kind): New.
1540 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1541 target_map_pointers_as_0len_arrays members, add defaultmap.
1542 (new_omp_context): Initialize defaultmap member.
1543 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1544 (maybe_fold_stmt): Don't fold even in host teams regions.
1545 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1546 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1547 ctx->omp_firstprivatize_variable.
1548 (omp_add_variable): Don't add private/firstprivate for VLAs in
1550 (omp_default_clause): Print "taskloop" rather than "task" if
1552 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1553 Handle new defaultmap clause kinds.
1554 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
1555 iterator to be lastprivate or private. Fix up diagnostics if linear
1556 is used on collapse>1 simd iterator.
1557 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1558 (gimplify_omp_depend): New function.
1559 (gimplify_scan_omp_clauses): Add shared clause on parallel for
1560 combined parallel master taskloop{, simd} if taskloop has
1561 firstprivate, lastprivate or reduction clause. Handle
1562 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
1563 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
1564 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
1565 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
1566 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
1568 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
1569 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
1570 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
1571 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1572 (gimplify_omp_task): Handle taskwait with depend clauses.
1573 (gimplify_omp_for): Add shared clause on parallel for combined
1574 parallel master taskloop{, simd} if taskloop has firstprivate,
1575 lastprivate or reduction clause. Use ORT_TASKLOOP or
1576 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
1577 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
1578 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
1579 __for_end and __for_range temporaries on OMP_PARALLEL for
1580 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
1581 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1582 sandwiched in between two taskloops.
1583 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1584 instead of ctx->omp_firstprivatize_variable.
1585 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1586 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
1587 host teams, use gimplify_and_return_first etc. for body like
1588 for target or target data constructs, and at the end call
1589 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1590 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1591 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1592 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1593 gimple_omp_atomic_set_seq_cst calls.
1594 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1595 case, handle taskgroup clauses.
1596 * lto-streamer-out.c (hash_tree): Handle
1597 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1598 * Makefile.in (GTFILES): Add omp-general.h.
1599 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1600 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1601 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1602 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1603 BUILT_IN_GOMP_LOOP_DOACROSS_START,
1604 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1605 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1606 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1607 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1608 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1609 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1610 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1611 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1612 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1613 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1614 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1615 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1616 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1617 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1618 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1619 * omp-expand.c (workshare_safe_to_combine_p): Return false for
1620 non-worksharing loops.
1621 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1622 (determine_parallel_type): Don't combine parallel with worksharing
1623 which has _reductemp_ clause.
1624 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1625 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1626 if there is nonmonotonic modifier or if there is no modifier and no
1627 ordered clause. For dynamic and guided schedule without monotonic
1628 and nonmonotonic modifier, default to nonmonotonic.
1629 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
1630 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1632 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1633 there are any reduction clauses.
1634 (expand_taskwait_call): New function.
1635 (expand_teams_call): New function.
1636 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1637 expand_teams_call for it. Formatting fix. Handle taskwait with
1639 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
1640 of worksharing loops with task reductions.
1641 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1642 expansion of worksharing loops with task reductions.
1643 (expand_omp_sections): Handle expansion of sections with task
1645 (expand_omp_synch): For host teams call expand_omp_taskreg.
1646 (omp_memory_order_to_memmodel): New function.
1647 (expand_omp_atomic_load, expand_omp_atomic_store,
1648 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1649 instead of gimple_omp_atomic_seq_cst_p.
1650 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1651 depend clauses as a standalone directive.
1652 * omp-general.c (enum omp_requires): New variable.
1653 (omp_extract_for_data): Initialize have_reductemp member. Allow
1654 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1655 GT_EXPR loops depending on incr sign. Formatting fixes.
1656 * omp-general.h (struct omp_for_data): Add have_reductemp member.
1657 (enum omp_requires): New enum.
1658 (omp_requires_mask): Declare.
1659 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1661 * omp-low.c (struct omp_context): Add task_reductions and
1662 task_reduction_map fields.
1663 (is_host_teams_ctx): New function.
1664 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1665 (use_pointer_for_field): Use is_global_var instead of
1666 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1668 (build_outer_var_ref): Ignore taskgroup outer contexts.
1669 (delete_omp_context): Release task_reductions and task_reduction_map.
1670 (scan_sharing_clauses): Don't add any fields for reduction clause on
1671 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
1672 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1673 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
1674 Handle OMP_CLAUSE_NONTEMPORAL.
1675 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1677 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1678 clauses with task modifier.
1679 (scan_omp_task): Handle taskwait with depend clauses.
1680 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1681 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1682 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1683 (scan_omp_for): Fix comment formatting.
1684 (scan_omp_teams): Handle host teams constructs.
1685 (check_omp_nesting_restrictions): Allow teams with no outer
1686 OpenMP context. Adjust diagnostics for teams strictly nested into
1687 some explicit OpenMP construct other than target. Allow OpenMP atomics
1688 inside of simd regions.
1689 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1690 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1691 taskreg_nesting_level while scanning host teams construct.
1692 (task_reduction_read): New function.
1693 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1694 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1695 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
1696 second argument create_tmp_var if it is NULL. Don't ignore shared
1697 clauses in is_host_teams_ctx contexts. Handle
1698 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1700 (lower_reduction_clauses): Ignore reduction clauses with task
1701 modifier. Remove second argument create_tmp_var if it is NULL.
1702 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1703 (lower_send_clauses): Ignore reduction clauses with task modifier.
1704 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
1705 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
1706 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1707 rely that it is the last stmt in body so far. Ignore outer taskgroup
1709 (omp_task_reductions_find_first, omp_task_reduction_iterate,
1710 lower_omp_task_reductions): New functions.
1711 (lower_omp_sections): Handle reduction clauses with taskgroup
1712 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
1713 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1714 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
1716 (lower_omp_taskgroup): Handle taskgroup reductions.
1717 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1718 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1719 (lower_depend_clauses): If there are any
1720 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1721 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
1722 seen, assume lowering is done already and return early. Set kind
1723 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1724 (lower_omp_taskreg): Handle reduction clauses with task modifier on
1725 parallel construct. Handle reduction clause on taskloop construct.
1726 Handle taskwait with depend clauses.
1727 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1728 for host teams constructs.
1729 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1730 nontemporal and _reductemp_ clause entries.
1731 (omp_clause_code_name): Likewise.
1732 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1733 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1734 * tree-core.h (enum omp_clause_code): Add
1735 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1736 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1737 (struct tree_base): Add omp_atomic_memory_order field into union.
1738 Remove OMP_ATOMIC_SEQ_CST comment.
1739 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1740 and OMP_CLAUSE_DEPEND_DEPOBJ.
1741 (struct tree_omp_clause): Add subcode.defaultmap_kind.
1742 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1743 OpenMP constructs with body and clauses operands.
1744 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1745 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1746 (OMP_TASKGROUP_CLAUSES): Define.
1747 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1748 OMP_CLAUSE__LOOPTEMP_.
1749 (OMP_ATOMIC_SEQ_CST): Remove.
1750 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1751 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1752 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1753 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1754 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1755 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1756 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1757 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1758 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1759 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1761 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1762 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1763 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1764 (convert_local_omp_clauses): Likewise. Remove useless test.
1765 * tree-parloops.c (create_call_for_reduction_1): Pass
1766 OMP_MEMORY_ORDER_RELAXED as new argument to
1767 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1768 * tree-pretty-print.c (dump_omp_iterators): New function.
1769 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1770 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
1771 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1772 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
1773 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
1774 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
1775 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1776 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1777 (dump_omp_atomic_memory_order): New function.
1778 (dump_generic_node): Use it. Print taskgroup clauses. Print
1779 taskwait with depend clauses.
1780 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1781 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1782 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1783 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1784 write_ts_omp_clause_tree_pointers): Likewise.
1786 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1789 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1790 "-missed", "-note", and "-all" sub-options.
1791 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1793 (can_early_inline_edge_p): Likewise.
1794 (want_early_inline_function_p): Likewise.
1795 (want_inline_self_recursive_call_p): Likewise.
1796 (recursive_inlining): Likewise.
1797 (inline_small_functions): Likewise.
1798 (flatten_function): Likewise.
1799 (ipa_inline): Likewise.
1800 (inline_always_inline_functions): Likewise.
1801 (early_inline_small_functions): Likewise.
1802 (early_inliner): Likewise.
1803 * tree-inline.c (expand_call_inline): Likewise.
1805 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1807 * pretty-print.c (pp_format): Handle %f.
1808 (selftest::test_pp_format): Add test of %f.
1809 * pretty-print.h (pp_double): New macro.
1811 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1813 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1814 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1815 (dump_pretty_printer::decode_format): Implement "%C" for
1817 (selftest::test_capture_of_dump_calls): Rename "where" to
1818 "stmt_loc". Convert test_decl to a function decl and set its
1819 location. Add a symbol_table_test RAII instance and a
1820 cgraph_node, using it to test "%C" and dump_symtab_node.
1822 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
1825 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1827 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1829 * cgraph.c: Include "selftest.h".
1830 (saved_symtab): New variable.
1831 (selftest::symbol_table_test::symbol_table_test): New ctor.
1832 (selftest::symbol_table_test::~symbol_table_test): New dtor.
1833 (selftest::test_symbol_table_test): New test.
1834 (selftest::cgraph_c_tests): New.
1835 * cgraph.h (saved_symtab): New decl.
1836 (selftest::symbol_table_test): New class.
1837 * selftest-run-tests.c (selftest::run_tests): Call
1838 selftest::cgraph_c_tests.
1839 * selftest.h (selftest::cgraph_c_tests): New decl.
1841 2018-11-08 Richard Biener <rguenther@suse.de>
1843 * tree-data-ref.h (lambda_int): New typedef.
1844 (lambda_vector_gcd): Adjust.
1845 (lambda_vector_new): Likewise.
1846 (lambda_matrix_new): Likewise.
1847 * tree-data-ref.c (print_lambda_vector): Adjust.
1849 2018-11-08 Richard Biener <rguenther@suse.de>
1851 PR tree-optimization/87929
1852 * tree-complex.c (expand_complex_comparison): Clean EH.
1854 2018-11-08 Martin Liska <mliska@suse.cz>
1856 * doc/extend.texi: Reword.
1857 * predict.c (expr_expected_value_1): Likewise.
1859 2018-11-08 Richard Biener <rguenther@suse.de>
1861 PR tree-optimization/87913
1862 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1863 of extreme values to ordered comparisons.
1865 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1868 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1870 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1872 * doc/invoke.texi: Remove leading dash from @opindex entries
1873 throughout the file.
1875 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1878 * doc/invoke.texi (Option Summary): Add -e and --entry.
1879 (Link Options): Likewise.
1881 2018-11-07 Nathan Sidwell <nathan@acm.org>
1884 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1885 --disable-checking bootstrap.
1887 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
1889 * configure: Regenerated.
1891 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1894 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1895 to the mode of the widest field iff the widest field has mode class
1896 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1899 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
1901 * common.opt: Add -Wattribute-warning.
1902 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1903 * expr.c (expand_expr_real_1): Add new attribute to warning_at
1904 call to allow user configure behavior of "warning" attribute.
1906 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
1908 * target.def: Put @: after every vs., e.g., and i.e. where it is
1909 followed by whitespace.
1910 * doc/extend.texi: Ditto.
1911 * doc/fragments.texi: Ditto.
1912 * doc/gimple.texi: Ditto.
1913 * doc/implement-c.texi: Ditto.
1914 * doc/install.texi: Ditto.
1915 * doc/invoke.texi: Ditto.
1916 * doc/md.texi: Ditto.
1917 * doc/plugins.texi: Ditto.
1918 * doc/rtl.texi: Ditto.
1919 * doc/sourcebuild.texi: Ditto.
1920 * doc/tm.texi.in: Ditto.
1921 * doc/ux.texi: Ditto.
1922 * doc/tm.texi: Regenerate.
1924 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1926 * config/arm/arm-cpus.in (ares): New entry.
1927 * config/arm/arm-tables.opt: Regenerate.
1928 * config/arm/arm-tune.md: Likewise.
1929 * doc/invoke.texi (ARM Options): Document ares.
1931 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1933 * config/aarch64/aarch64-cores.def (ares): Define.
1934 * config/aarch64/aarch64-tune.md: Regenerate.
1935 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1937 2018-11-07 Jan Hubicka <jh@suse.cz>
1939 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1940 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1941 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1944 2018-11-07 Richard Biener <rguenther@suse.de>
1946 PR tree-optimization/87914
1947 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1949 (vectorizable_reduction): Handle shifts and rotates by dispatching
1950 to vectorizable_shift.
1951 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1952 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
1954 (vectorizable_shift): Export and handle being called as
1956 (vect_analyze_stmt): Call vectorizable_shift after
1957 vectorizable_reduction.
1958 * tree-vectorizer.h (vectorizable_shift): Declare.
1960 2018-11-07 Jan Hubicka <jh@suse.cz>
1962 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1963 than const decls in TREE_VALUE of enum.
1964 (dump_type_inheritance_graph): Improve duplicate dumping.
1965 (free_enum_values): New.
1966 (build_type_inheritance_graph): Use it.
1967 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1968 which are not main variants or not ODR types.
1969 (verify_type_variant): Expect variants to have no TYPE_VALUES.
1971 2018-11-07 Richard Biener <rguenther@suse.de>
1973 * ipa-inline.c (want_inline_small_function_p): Compute
1974 big_speedup_p lazily and last.
1976 2018-11-07 Jan Hubicka <jh@suse.cz>
1978 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1979 building incomplete variant of complete type.
1980 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1981 variant of complete type.
1983 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1985 * config/mips/mips.c: Fix typo in documentation of
1986 mips_loongson_ext2_prefetch_cookie.
1987 (mips_option_override): fix brain twister logical.
1988 * config/mips/mips.h: Fix typo in documentation of
1989 ISA_HAS_CTZ_CTO and define pattern.
1990 * config/mips/mips.md (prefetch): Hoist EXT2 above
1992 (prefetch_indexed): Hoist EXT2 above the EXT block.
1994 2018-11-07 Jan Hubicka <jh@suse.cz>
1996 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1997 return and parameter types of function and method types.
1998 (free_lang_data_in_cgraph): Update.
2000 2018-11-07 Martin Liska <mliska@suse.cz>
2002 PR rtl-optimization/87868
2003 * postreload-gcse.c (eliminate_partially_redundant_load): Set
2004 threshold to max_count if we would overflow.
2005 * profile-count.h: Make max_count a public constant.
2007 2018-11-07 Martin Liska <mliska@suse.cz>
2009 * mem-stats.h: Fix GNU coding style.
2011 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2013 * config/mips/gs264e.md: New.
2014 * config/mips/mips-cpus.def: Define gs264e.
2015 * config/mips/mips-tables.opt: Regenerate.
2016 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2018 (mips_issue_rate): Add support for gs264e.
2019 (mips_multipass_dfa_lookahead): Likewise.
2020 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
2021 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
2022 (MIPS_ASE_MSA_SPEC): New.
2023 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
2024 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
2025 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
2026 * config/mips/mips.md: Include gs264e.md.
2027 (processor): Add gs264e.
2028 * config/mips/mips.opt (MSA): Use Mask instead of Var.
2029 * doc/invoke.texi: Add gs264e to supported architectures.
2031 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2033 * config/mips/gs464e.md: New.
2034 * config/mips/mips-cpus.def: Define gs464e.
2035 * config/mips/mips-tables.opt: Regenerate.
2036 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2038 (mips_issue_rate): Add support for gs464e.
2039 (mips_multipass_dfa_lookahead): Likewise.
2040 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
2041 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
2042 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
2043 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
2044 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
2045 * config/mips/mips.md: Include gs464e.md.
2046 (processor): Add gs464e.
2047 * doc/invoke.texi: Add gs464e to supported architectures.
2049 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2051 * config/mips/loongson3a.md: Rename to ...
2052 * config/mips/gs464.md: ... here.
2053 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
2054 as an alias of gs464 processor.
2055 * config/mips/mips-tables.opt: Regenerate.
2056 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
2057 instead of PROCESSOR_LOONGSON_3A.
2058 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
2060 (mips_option_override): Enable MMI and EXT for gs464.
2061 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
2062 Rename TUNE_LOONGSON_3A to TUNE_GS464.
2063 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
2064 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
2065 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
2067 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
2068 (processor): Add gs464;
2069 * doc/invoke.texi: Add gs464 to supported architectures.
2071 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2073 * config/mips/mips-protos.h
2074 (mips_loongson_ext2_prefetch_cookie): New prototype.
2075 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
2076 (mips_option_override): Enable TARGET_LOONGSON_EXT when
2077 TARGET_LOONGSON_EXT2 is true.
2078 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
2079 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
2080 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
2081 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
2082 TARGET_LOONGSON_EXT2.
2083 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
2084 (define_insn "ctz<mode>2"): New insn pattern.
2085 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
2086 (define_insn "prefetch_indexed_<mode>"): Include
2087 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
2088 * config/mips/mips.opt (-mloongson-ext2): Add option.
2089 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
2091 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2093 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
2094 __mips_loongson_ext.
2095 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
2096 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
2098 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
2099 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
2100 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
2101 instead of TARGET_LOONGSON_3A.
2102 * config/mips/mips.opt (-mloongson-ext): Add option.
2103 * gcc/doc/invoke.texi (-mloongson-ext): Document.
2105 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2107 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
2108 * config/mips/loongson.md: Move to ...
2109 * config/mips/loongson-mmi.md: here; Adjustment.
2110 * config/mips/loongson.h: Move to ...
2111 State as deprecated. Include loongson-mmiintrin.h for back
2112 compatibility and warning.
2113 * config/mips/loongson-mmiintrin.h: ... here.
2114 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
2115 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
2116 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2117 (mips_option_override): Make sure MMI use hard float;
2118 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
2119 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
2120 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
2121 TARGET_LOONGSON_VECTORS.
2122 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
2123 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
2124 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
2125 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2127 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2128 TARGET_LOONGSON_VECTORS.
2129 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2130 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2131 (Loongson MMI patterns): Include loongson-mmi.md instead of
2133 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
2134 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
2136 2018-11-07 Richard Biener <rguenther@suse.de>
2139 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
2140 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2142 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
2144 PR rtl-optimization/87874
2145 * lra.c (lra_substitute_pseudo): Do not create a subreg for
2148 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
2150 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
2151 if not in indexed or indirect form.
2152 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
2153 (bswap<mode>2_store): Ditto.
2155 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
2157 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
2160 2018-11-06 Richard Biener <rguenther@suse.de>
2162 PR tree-optimization/86850
2163 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
2164 instead of src.m_vec.
2166 2018-11-06 Jan Hubicka <jh@suse.cz>
2168 * tree.c (fld_simplified_type_name): Break out form ...
2169 (free_lang_data_in_type): ... here.
2170 (fld_type_variant_equal_p): Use it.
2172 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2174 * config/default-d.c: Include memmodel.h.
2176 * config/sol2-d.c: New file.
2177 * config/t-sol2 (sol2-d.o): New rule.
2178 * config.gcc <*-*-solaris2*>: Set d_target_objs,
2179 target_has_targetdm.
2181 2018-11-06 Jan Hubicka <jh@suse.cz>
2183 * tree.c (fld_type_variant): Also copy alignment; be sure that
2184 new variant is equal.
2186 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
2189 * config/s390/s390.md: Add relative_long attribute.
2191 2018-11-06 Jan Hubicka <jh@suse.cz>
2193 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2194 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2195 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2196 stream TYPE_NEEDS_CONSTRUCTING.
2197 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2198 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2200 2018-11-06 Richard Biener <rguenther@suse.de>
2202 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2204 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2206 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2208 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2209 REG_CLASS_CONTENTS[GEN_REGS].
2210 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2212 2018-11-06 Jan Hubicka <jh@suse.cz>
2214 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2216 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2219 * config/sol2.h (ASAN_CC1_SPEC): Define.
2220 (LD_WHOLE_ARCHIVE_OPTION): Define.
2221 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2222 (ASAN_REJECT_SPEC): Provide default.
2223 (LIBASAN_EARLY_SPEC): Define.
2224 (LIBTSAN_EARLY_SPEC): Define.
2225 (LIBLSAN_EARLY_SPEC): Define.
2226 * config/i386/sol2.h (CC1_SPEC): Redefine.
2227 (ASAN_REJECT_SPEC): Define.
2229 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2230 (TARGET_ASAN_SHADOW_OFFSET): Define.
2231 (sparc_asan_shadow_offset): New function.
2232 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2233 (ASAN_REJECT_SPEC): Define.
2235 2018-11-06 Jan Hubicka <jh@suse.cz>
2237 * tree.c (fld_type_variant): Copy canonical type.
2238 (fld_incomplete_type_of): Check that canonical types looks sane;
2239 copy canonical type.
2240 (verify_type): Accept when incomplete type has complete canonical type.
2242 2018-11-06 Jan Hubicka <jh@suse.cz>
2244 * tree.c (free_lang_data): Reset overwite_assembler_name,
2245 print_xnode, print_decl, print_type and print_identifier of
2248 2018-11-06 Richard Biener <rguenther@suse.de>
2250 PR tree-optimization/87889
2251 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2252 Do nothing if old and new arg are the same
2254 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
2257 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2258 attributes for operands 3 and 4.
2260 2018-11-06 Richard Biener <rguenther@suse.de>
2263 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2264 matching bitfield insertion.
2266 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2268 * auto-inc-dec.c: Include valtrack.h. Improve comments.
2269 (reg_next_debug_use): New.
2270 (attempt_change): Propagate adjusted expression into affected
2272 (merge_in_block): Track uses in debug insns.
2273 (pass_inc_dec::execute): Allocate and release
2276 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2278 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2279 (_mm512_fixupimm_round_pd): Update parameters and builtin.
2280 (_mm512_maskz_fixupimm_round_pd): Ditto.
2281 (_mm512_fixupimm_round_ps): Ditto.
2282 (_mm512_maskz_fixupimm_round_ps): Ditto.
2283 (_mm_fixupimm_round_sd): Ditto.
2284 (_mm_maskz_fixupimm_round_sd): Ditto.
2285 (_mm_fixupimm_round_ss): Ditto.
2286 (_mm_maskz_fixupimm_round_ss): Ditto.
2287 (_mm512_fixupimm_pd): Ditto.
2288 (_mm512_maskz_fixupimm_pd): Ditto.
2289 (_mm512_fixupimm_ps): Ditto.
2290 (_mm512_maskz_fixupimm_ps): Ditto.
2291 (_mm_fixupimm_sd): Ditto.
2292 (_mm_maskz_fixupimm_sd): Ditto.
2293 (_mm_fixupimm_ss): Ditto.
2294 (_mm_maskz_fixupimm_ss): Ditto.
2295 (_mm512_mask_fixupimm_round_pd): Update builtin.
2296 (_mm512_mask_fixupimm_round_ps): Ditto.
2297 (_mm_mask_fixupimm_round_sd): Ditto.
2298 (_mm_mask_fixupimm_round_ss): Ditto.
2299 (_mm512_mask_fixupimm_pd): Ditto.
2300 (_mm512_mask_fixupimm_ps): Ditto.
2301 (_mm_mask_fixupimm_sd): Ditto.
2302 (_mm_mask_fixupimm_ss): Ditto.
2303 * config/i386/avx512vlintrin.h:
2304 (_mm256_fixupimm_pd): Update parameters and builtin.
2305 (_mm256_maskz_fixupimm_pd): Ditto.
2306 (_mm256_fixupimm_ps): Ditto.
2307 (_mm256_maskz_fixupimm_ps): Ditto.
2308 (_mm_fixupimm_pd): Ditto.
2309 (_mm_maskz_fixupimm_pd): Ditto.
2310 (_mm_fixupimm_ps): Ditto.
2311 (_mm_maskz_fixupimm_ps): Ditto.
2312 (_mm256_mask_fixupimm_pd): Update builtin.
2313 (_mm256_mask_fixupimm_ps): Ditto.
2314 (_mm_mask_fixupimm_pd): Ditto.
2315 (_mm_mask_fixupimm_ps): Ditto.
2316 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2317 * config/i386/i386-builtin.def: Update builtin definitions.
2318 * config/i386/i386.c: Handle new builtin types and remove useless ones.
2319 * config/i386/sse.md: Update VFIXUPIMM* patterns.
2320 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2321 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2322 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2323 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2324 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2325 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2326 * config/i386/subst.md:
2327 (round_saeonly_sd_mask_operand4): Add new subst_attr.
2328 (round_saeonly_sd_mask_op4): Ditto.
2329 (round_saeonly_expand_operand5): Ditto.
2330 (round_saeonly_expand): Update.
2332 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2334 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2336 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
2338 PR rtl-optimization/87871
2339 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2341 2018-11-05 Paul Koning <ni1d@arrl.net>
2343 * doc/sourcebuild.texi (target attributes): Document new "inf"
2344 effective target keyword.
2346 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2348 * config/s390/s390.c (s390_register_move_cost): Increase costs for
2349 moves involving the CC reg.
2351 2018-11-05 Richard Biener <rguenther@suse.de>
2353 PR tree-optimization/87873
2354 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2356 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2357 * tree-vect-loop.c (vect_transform_loop): When splitting the
2358 loop exit also create forwarder PHIs for constants.
2359 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2360 Handle constant to_arg, add extra checking we match up the correct
2363 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2365 * config/s390/s390.md: QImode and HImode for load on condition.
2367 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2369 * config/s390/predicates.md: Fix typo.
2370 * config/s390/s390.md: Allow immediates for load on condition.
2372 2018-11-05 Martin Liska <mliska@suse.cz>
2374 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2375 * bitmap.h (struct bitmap_usage): Likewise.
2376 * ggc-common.c (SCALE): Remove.
2378 (struct ggc_usage): Use SIZE_AMOUNT. And update
2380 * ggc-page.c (SCALE): Remove.
2381 (STAT_LABEL): Remove.
2382 (ggc_print_statistics): Use SIZE_AMOUNT.
2383 * gimple.h (SCALE): Remove.
2385 * input.c (ONE_K): Remove.
2388 (STAT_LABEL): Likewise.
2389 (FORMAT_AMOUNT): Likewise.
2390 (dump_line_table_statistics): Use SIZE_AMOUNT.
2391 * mem-stats.h (struct mem_usage): Likewise.
2392 * rtl.c (dump_rtx_statistics): Likewise.
2393 (rtx_alloc_counts): Change type to size_t.
2394 (rtx_alloc_sizes): Likewise.
2395 (rtx_count_cmp): New.
2396 (dump_rtx_statistics): Sort first based on counts.
2397 * tree.c (tree_nodes_cmp): New.
2398 (tree_codes_cmp): New.
2399 (dump_tree_statistics): Sort first based on counts.
2400 * system.h (ONE_K): New.
2402 (SIZE_SCALE): Likewise.
2403 (SIZE_LABEL): Likewise.
2404 (SIZE_AMOUNT): Likewise.
2405 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2406 * tree-dfa.c (dump_dfa_stats): Likewise.
2407 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2408 * tree-ssanames.c (ssanames_print_statistics): Likewise.
2409 * tree.c (dump_tree_statistics): Likewise.
2410 * vec.c (struct vec_usage): Likewise.
2411 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2412 trigger a -Werror=format-overflow with
2413 --enable-gather-detailed-stats.
2415 2018-11-05 Martin Liska <mliska@suse.cz>
2417 * mem-stats.h (mem_alloc_description::release_instance_overhead):
2419 * vec.c (struct vec_usage): Register m_element_size.
2420 (vec_prefix::register_overhead): New arguments: elements and
2422 (vec_prefix::release_overhead): Subtract elements.
2423 * vec.h (struct vec_prefix): Change signature.
2424 (va_heap::reserve): Pass proper arguments.
2425 (va_heap::release): Likewise.
2427 2018-11-05 Martin Liska <mliska@suse.cz>
2429 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2433 2018-11-05 Richard Biener <rguenther@suse.de>
2435 * tree-scalar-evolution.h (final_value_replacement_loop): Update
2437 * tree-scalar-evolution.c (final_value_replacement_loop): Return
2438 whether anything was done.
2439 (scev_const_prop): Remove constant propagation part, fold
2441 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2442 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2445 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2447 PR tree-optimization/87859
2448 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2449 only_constants and first_nonmergeable_order members.
2450 (merged_store_group::merged_store_group): Initialize them.
2451 (merged_store_group::do_merge): Clear only_constants member if
2452 adding something other than INTEGER_CST store.
2453 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2454 stores with order >= first_nonmergeable_order. Use
2455 merged_store->only_constants instead of always recomputing it.
2456 Set merged_store->first_nonmergeable_order if we've skipped any
2457 stores. Attempt to merge overlapping INTEGER_CST stores that
2458 we would otherwise skip.
2461 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2463 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2466 * config/i386/emmintrin.h (__v16qs): New to cope with option
2468 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2469 (_mm_cmplt_epi8): Likewise.
2470 (_mm_cmpgt_epi8): Likewise.
2472 2018-11-05 Richard Biener <rguenther@suse.de>
2474 PR rtl-optimization/87852
2475 * fwprop.c (use_killed_between): Only consider single-defs of the
2476 use whose definition statement dominates the use.
2478 2018-11-05 Martin Liska <mliska@suse.cz>
2481 * doc/invoke.texi: Remove options that are
2482 not disabled with -Os.
2484 2018-11-05 Martin Liska <mliska@suse.cz>
2487 * doc/extend.texi: Update constrain about the last argument
2488 of __builtin_expect_with_probability.
2490 2018-11-05 Martin Liska <mliska@suse.cz>
2493 * predict.c (expr_expected_value_1): Verify
2494 that last argument is a real constants and emit
2497 2018-11-05 Martin Liska <mliska@suse.cz>
2499 PR gcov-profile/77698
2500 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2503 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2505 PR tree-optimization/86572
2506 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2508 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2510 PR tree-optimization/87672
2511 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2512 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2514 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2517 * cfgexpand.c (pass_expand::execute): Move the call to
2518 finish_eh_generation in front of the call to expand_stack_alignment.
2520 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2522 * common/config/i386/i386-common.c (processor_alias_table): Add
2524 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2525 (case ${target}): Add znver2.
2526 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2527 -march=native recognize znver2 processors.
2528 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2529 * config/i386/i386.c (m_znver2): New definition.
2530 (m_ZNVER): New definition.
2531 (m_AMD_MULTIPLE): Includes m_znver2.
2532 (processor_cost_table): Add znver2 entry.
2533 (processor_target_table): Add znver2 entry.
2534 (get_builtin_code_for_version): Set priority for
2536 (processor_model): Add M_AMDFAM17H_ZNVER2.
2537 (arch_names_table): Ditto.
2538 (ix86_reassociation_width): Include znver2.
2539 * config/i386/i386.h (TARGET_znver2): New definition.
2540 (struct ix86_size_cost): Add TARGET_ZNVER2.
2541 (enum processor_type): Add PROCESSOR_ZNVER2.
2542 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2543 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2544 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2545 (ix86_adjust_cost): Add znver2.
2546 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2547 * gcc/doc/extend.texi: Add details about znver2.
2548 * gcc/doc/invoke.texi: Add details about znver2.
2550 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2554 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2557 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2559 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2560 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2562 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
2564 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2565 shrink-wrapping when -mtrack-speculation.
2567 2018-11-02 Richard Biener <rguenther@suse.de>
2569 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2570 (pop_cost_one_pair): Do not free pair.
2571 (pop_best_coalesce): Likewise.
2572 (create_coalesce_list): Initialize obstack.
2573 (delete_coalesce_list): Free obstack.
2574 (find_coalesce_pair): Obstack-allocate coalesce pairs.
2575 (add_cost_one_coalesce): Likewise.
2576 (struct live_track): Remove bitmap pointer indirections.
2577 (new_live_track): Adjust.
2578 (delete_live_track): Likewise.
2579 (live_track_remove_partition): Likewise.
2580 (live_track_add_partition): Likewise.
2581 (live_track_live_p): Likewise.
2582 (live_track_process_def): Likewise.
2583 (live_track_clear_base_vars): Likewise.
2585 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2587 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2588 * configure: Regenerate.
2589 * config.in: Regenerate.
2590 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2591 HAVE_AS_REGISTER_PSEUDO_OP guard.
2592 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2593 !HAVE_AS_REGISTER_PSEUDO_OP support.
2594 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2597 2018-11-02 Richard Biener <rguenther@suse.de>
2599 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2602 2018-11-02 Richard Biener <rguenther@suse.de>
2604 PR tree-optimization/87776
2605 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2606 executable when iterating but running into rpo-vn-max-loop-depth
2607 and not eliding the iteration.
2609 2018-11-30 Jan Hubicka <jh@suse.cz>
2611 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2614 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
2616 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2618 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2619 Combine with rs6000_address_for_fpconvert.
2620 (rs6000_address_for_fpconvert): Combine with
2621 rs6000_force_indexed_or_indirect_mem.
2622 (rs6000_expand_vector_init): Change function call from
2623 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2624 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2625 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2626 (floatsi<mode>2_lfiwax_mem): Ditto.
2627 (floatunssi<mode>2_lfiwzx): Ditto.
2628 (floatunssi<mode>2_lfiwzx_mem): Ditto.
2629 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2630 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2631 (fix_trunc<mode>si2_stfiwx): Ditto.
2632 (fixuns_trunc<mode>si2_stfiwx): Ditto.
2633 (float_<mode>si2_hw): Ditto.
2634 (floatuns_<mode>si2_hw): Ditto.
2635 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2636 (vsx_splat_<mode>): Ditto.
2638 2018-11-01 Joseph Myers <joseph@codesourcery.com>
2640 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2641 at end of assembler input text.
2642 * configure: Regenerate.
2644 2018-11-01 Jakub Jelinek <jakub@redhat.com>
2646 PR tree-optimization/87826
2647 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2648 negative or larger or equal to type's precision.
2650 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
2652 * opts.c (default_options_table): Do not enable
2653 OPT_fdelayed_branch at -Og.
2654 * doc/invoke.texi (-fdelayed-branch): Document it.
2656 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2658 * optabs-libfuncs.c (build_libfunc_function_visibility):
2659 New, split out from...
2660 (build_libfunc_function): ... here.
2661 (init_one_libfunc_visibility): New, split out from ...
2662 (init_one_libfunc): ... here.
2664 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2665 scratch register need not be early-clobber. Document the reason
2666 why we cannot use ST<OP>.
2668 2018-10-31 Joseph Myers <joseph@codesourcery.com>
2671 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
2672 line for second argument of AC_DEFINE_UNQUOTED.
2673 * doc/install.texi (Tools/packages necessary for modifying GCC):
2674 Update to autoconf 2.69 and automake 1.15.1.
2675 * aclocal.m4, config.in, configure: Regenerate.
2677 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
2679 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2682 2018-10-31 Martin Liska <mliska@suse.cz>
2685 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2686 Add new argument invalid_extension.
2687 (aarch64_get_all_extension_candidates): New function.
2688 (aarch64_rewrite_selected_cpu): Add NULL to function call.
2689 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2691 (aarch64_get_all_extension_candidates): New function.
2692 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2693 argument invalid_extension.
2694 (aarch64_parse_cpu): Likewise.
2695 (aarch64_print_hint_for_extensions): New function.
2696 (aarch64_validate_mcpu): Provide hint about invalid extension.
2697 (aarch64_validate_march): Likewise.
2698 (aarch64_handle_attr_arch): Pass new argument.
2699 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2700 (aarch64_handle_attr_isa_flags): Likewise.
2702 2018-10-31 Richard Biener <rguenther@suse.de>
2706 * tree-outof-ssa.c (insert_backedge_copies): Restrict
2707 copy generation to useful cases. Place the copy before
2708 the definition of the backedge value when possible.
2710 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2712 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2713 * config/arc/arc.c (arc_active_insn): New function.
2714 (check_store_cacheline_hazard): Likewise.
2715 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2716 (arc_override_options): Disable delay slot scheduler for older
2718 (arc_store_addr_hazard_p): New implementation, old one renamed to
2720 (arc_store_addr_hazard_internal_p): Renamed.
2721 (arc_reorg): Don't combine into brcc instructions which are part
2722 of hardware hazard solution.
2723 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2724 (tune_arc700): Likewise.
2725 * config/arc/arc.opt (arc7xx): New tune value.
2726 * config/arc/arc700.md: Improve A7 scheduler.
2728 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2730 * config/arc/arc.c (arc_override_options): Remove
2731 TARGET_COMPACT_CASESI.
2732 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2733 (CASE_VECTOR_MODE): Likewise.
2734 (CASE_VECTOR_PC_RELATIVE): Likewise.
2735 (CASE_VECTOR_SHORTEN_MODE): Likewise.
2736 (CASE_VECTOR_SHORTEN_MODE1): Delete.
2737 (ADDR_VEC_ALIGN): Update.
2738 (ASM_OUTPUT_CASE_LABEL): Undefine.
2739 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2740 (TARGET_BI_BIH): Define.
2741 (DEFAULT_BRANCH_INDEX): Likewise.
2742 * config/arc/arc.md (casesi): Rework to accept BI/BIH
2743 instructions, remove compact_casesi use case.
2744 (casesi_compact_jump): Remove.
2745 (casesi_dispatch): New pattern.
2746 * config/arc/arc.opt: Add mbranch-index option. Deprecate
2747 compact_casesi option.
2748 * doc/invoke.texi: Document mbranch-index option.
2750 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2752 * config/arc/arc.c (arc_get_tp): Remove function.
2753 (arc_emit_call_tls_get_addr): Likewise.
2754 (arc_call_tls_get_addr): New function.
2755 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2756 * config/arc/arc.md (tls_load_tp_soft): Remove.
2757 (tls_gd_get_addr): Likewise.
2759 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2761 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2762 (mulsi3_600_lib): Remove pattern.
2763 (umulsi3_highpart_600_lib_le): Likewise.
2764 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2765 (umulsidi3): Remove call to umulsidi3_600_lib.
2766 (umulsidi3_600_lib): Remove pattern.
2767 (peephole2): Remove peephole using the above deprecated patterns.
2769 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2772 * config/arm/arm.c (arm_option_check_internal): Disable the combined
2773 use of -mslow-flash-data and -mword-relocations.
2774 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2775 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2777 * doc/invoke.texi (-mword-relocations): Mention conflict with
2779 (-mslow-flash-data): Reciprocally.
2781 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2783 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2784 16-byte modes held in GP registers to use an even regno.
2786 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2787 (aarch64_atomic_ldop_supported_p): Remove.
2788 (aarch64_gen_atomic_ldop): Remove.
2789 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2790 Fully expand LSE operations here.
2791 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2792 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2793 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2794 and use ATOMIC_LDOP instead; use register_operand for the input;
2795 drop the split and emit insns directly.
2796 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2797 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2798 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2800 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2801 (aarch64_gen_atomic_ldop): Don't call it.
2802 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2803 Use aarch64_reg_or_zero.
2804 (aarch64_atomic_exchange<ALLI>): Likewise.
2805 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2806 operand 0; use aarch64_reg_or_zero for input; merge ...
2807 (@aarch64_atomic_swp<ALLI>): ... this and remove.
2809 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2810 (aarch64_split_compare_and_swap): Use it.
2811 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
2812 test oldval against the proper predicate.
2813 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2814 Use nonmemory_operand for expected.
2815 (cas_short_expected_pred): New.
2816 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2817 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2818 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2819 (aarch64_plushi_operand): New.
2821 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2822 Force oldval into the rval register for TARGET_LSE; emit the compare
2823 during initial expansion so that it may be deleted if unused.
2824 (aarch64_gen_atomic_cas): Remove.
2825 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2826 Change =&r to +r for operand 0; use match_dup for operand 2;
2827 remove is_weak and mod_f operands as unused. Drop the split
2829 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2830 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2831 (@aarch64_atomic_cas<GPI>): Similarly.
2833 2018-10-31 Richard Biener <rguenther@suse.de>
2835 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2838 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2840 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2841 * config/aarch64/aarch64.md: Include saphira.md
2842 * config/aarch64/saphira.md: New file for pipeline description.
2844 2018-10-30 Martin Sebor <msebor@redhat.com>
2847 * gimple-ssa-sprintf.c (format_directive): Use %G to include
2849 (sprintf_dom_walker::compute_format_length):
2850 Avoid setting POSUNDER4K here.
2851 (get_destination_size): Handle null argument values.
2852 (get_user_idx_format): New function.
2853 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2854 functions, including user-defined with attribute format printf.
2855 Use %G to include inlining context.
2856 Set POSUNDER4K here.
2858 2018-10-30 Jan Hubicka <jh@suse.cz>
2860 * params.def (lto-partitions): Bump from 32 to 128.
2862 2018-10-30 Jan Hubicka <jh@suse.cz>
2865 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2867 (free_lang_data_in_type): Forward declare.
2868 (fld_type_variant_equal_p): New function.
2869 (fld_type_variant): New function
2870 (fld_incomplete_types): New hash.
2871 (fld_incomplete_type_of): New function
2872 (fld_simplfied-type): New function.
2873 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2874 (free_lang_data): Allocate and free fld_incomplete_type; update call
2875 of free_lang_data_in_decl.
2877 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
2879 * gcov.c (output_lines): Remove duplicate line.
2881 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2883 * config/rs6000/rs6000.md (bswapdi2): Force address into register
2884 if not in indexed or indirect form.
2885 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2886 (bswapdi2_store): Ditto.
2887 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2889 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2890 Prototype for helper function.
2892 2018-10-30 Martin Sebor <msebor@redhat.com>
2894 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2895 (target, pragma GCC optimize, pragma GCC target): Ditto.
2897 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
2899 * doc/extend.texi: Fix prototype and description of
2900 __builtin_expect_with_probability.
2902 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2904 * cgraph.h (clone_function_name_1): Replaced by new
2905 clone_function_name_numbered that takes name as string; for
2906 privatize_symbol_name_1 use only.
2907 (clone_function_name): Renamed to
2908 clone_function_name_numbered to be explicit about numbering.
2909 (clone_function_name): New two-argument function that does
2910 not number its output.
2911 (clone_function_name): New three-argument function that
2912 takes a number to append to its output.
2913 * cgraphclones.c (duplicate_thunk_for_node):
2914 (clone_function_name_1): Renamed.
2915 (clone_function_name_numbered): Two new functions.
2916 (clone_function_name): Improved documentation.
2917 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2918 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2919 * final.c (final_scan_insn_1): Use the new clone_function_name
2921 * multiple_target.c (create_dispatcher_calls): Ditto.
2922 (create_target_clone): Ditto.
2923 * omp-expand.c (grid_expand_target_grid_body): Ditto.
2924 * omp-low.c (create_omp_child_function_name): Ditto.
2925 * omp-simd-clone.c (simd_clone_create): Ditto.
2926 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2927 new clone_function_name without numbering.
2929 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
2931 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2932 Assert that the allocation size is not zero.
2934 2018-10-30 Richard Biener <rguenther@suse.de>
2936 PR tree-optimization/87800
2937 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2938 non-induction or reduction PHIs.
2940 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2942 * config/aarch64/falkor-tag-collision-avoidance.c
2943 (execute_tag_collision_avoidance): Call df_note_add_problem.
2945 2018-10-30 Martin Liska <mliska@suse.cz>
2947 * doc/extend.texi: Fix typo in documentation
2948 of __builtin_expect_with_probability.
2950 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2953 * input.c (get_substring_ranges_for_loc): Detect if
2954 linemap_resolve_location gives us a NULL map, and reject
2957 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
2959 * config.gcc (xstormy16-*-elf): Set tm_d_file.
2961 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2962 Martin Sebor <msebor@redhat.com>
2963 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2965 * doc/ux.texi (Quoting): New subsection, adapted from material at
2966 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2967 MartinSebor and ManuelLopezIbanez.
2968 (Fix-it hints): Note that fix-it hints shouldn't be marked for
2971 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
2974 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2977 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2979 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2981 2018-10-29 Paul Koning <ni1d@arrl.net>
2983 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2985 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2987 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2988 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2989 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2990 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2991 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2992 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2993 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2994 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2995 Change 'vector' to '__vector'.
2996 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2997 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2998 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2999 _mm_avg_pu16): Likewise. And, whitespace corrections.
3001 2018-10-29 Richard Biener <rguenther@suse.de>
3003 PR tree-optimization/87785
3004 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
3007 2018-10-29 Olivier Hainque <hainque@adacore.com>
3009 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
3011 2018-10-29 Olivier Hainque <hainque@adacore.com>
3013 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
3014 ports configuration macro, defaults to "gnu".
3015 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
3016 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
3018 2018-10-29 Olivier Hainque <hainque@adacore.com>
3020 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
3022 2018-10-29 Richard Biener <rguenther@suse.de>
3024 PR tree-optimization/87790
3025 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
3026 (vect_make_slp_decision): Adjust.
3027 (vect_slp_analyze_bb_1): Likewise.
3028 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
3031 2018-10-29 Richard Biener <rguenther@suse.de>
3033 PR tree-optimization/87785
3034 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
3036 (vect_build_slp_tree): Likewise.
3037 (vect_gather_slp_loads): New function.
3038 (vect_analyze_slp_instance): Gather loads separately from the
3041 2018-10-29 Martin Liska <mliska@suse.cz>
3043 * Makefile.in: Make dependency to json.o.
3044 * doc/gcov.texi: Document new JSON format, remove
3045 old intermediate format documentation.
3046 * gcov.c (struct function_info): Come up with m_name and
3048 (function_info::function_info): Initialize it.
3049 (function_info::~function_info): Release it.
3050 (main): Rename flag_intermediate_format to flag_json_format.
3051 (print_usage): Describe --json-format.
3052 (process_args): Set flag_json_format.
3053 (output_intermediate_line): Remove.
3054 (output_intermediate_json_line): Likewise.
3055 (get_gcov_intermediate_filename): Return new extension
3057 (output_intermediate_file): Implement JSON emission.
3058 (output_json_intermediate_file): Implement JSON emission.
3059 (generate_results): Use ::get_name for function name.
3060 Handle JSON output file.
3061 (read_graph_file): Use ::get_name instead of cplus_demangle.
3062 (read_count_file): Likewise.
3063 (solve_flow_graph): Likewise.
3064 (add_line_counts): Likewise.
3065 (accumulate_line_counts): Use new flag_json_format.
3066 (output_function_details): Use ::get_name instead of cplus_demangle.
3067 (output_lines): Likewise.
3068 * json.cc (test_writing_literals): Add new tests.
3069 * json.h (class literal): Add new boolean constructor.
3071 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
3073 PR rtl-optimization/87701
3074 PR rtl-optimization/87780
3075 * combine.c (make_more_copies): Rewrite.
3077 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
3079 * doc/generic.texi (ABSU_EXPR): Document.
3080 * match.pd (absu(x)*absu(x) -> x*x): Handle.
3081 (absu(absu(X)) -> absu(X)): Likewise.
3082 (absu(-X) -> absu(X)): Likewise.
3083 (absu(X) where X is nonnegative -> X): Likewise.
3085 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
3087 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
3088 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
3089 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
3090 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
3091 (s-tm-texi): Also check timestamp on d-target.def.
3092 (generated_files): Add TM_D_H and d-target-hooks-def.h.
3093 (build/genhooks.o): Also depend on D_TARGET_DEF.
3094 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
3096 * config/aarch64/aarch64-d.c: New file.
3097 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
3099 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
3101 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
3102 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
3103 * config/arm/arm-d.c: New file.
3104 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
3105 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
3106 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3107 * config/arm/t-arm (arm-d.o): New rule.
3108 * config/default-d.c: New file.
3109 * config/glibc-d.c: New file.
3110 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3111 * config/i386/i386-d.c: New file.
3112 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
3113 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
3114 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3115 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
3116 * config/i386/t-i386 (i386-d.o): New rule.
3117 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3118 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3119 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
3120 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3121 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3122 * config/mips/mips-d.c: New file.
3123 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
3124 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
3125 * config/mips/t-mips (mips-d.o): New rule.
3126 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3127 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3128 * config/powerpcspe/powerpcspe-d.c: New file.
3129 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3131 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3132 Support GNU D by using 0 as the language type.
3133 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
3134 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
3135 * config/riscv/riscv-d.c: New file.
3136 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
3138 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
3139 * config/riscv/t-riscv (riscv-d.o): New rule.
3140 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3141 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3142 * config/rs6000/rs6000-d.c: New file.
3143 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
3145 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3146 Support GNU D by using 0 as the language type.
3147 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
3148 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
3149 * config/s390/s390-d.c: New file.
3150 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
3151 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
3152 * config/s390/t-s390 (s390-d.o): New rule.
3153 * config/sparc/sparc-d.c: New file.
3154 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
3156 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
3157 * config/sparc/t-sparc (sparc-d.o): New rule.
3158 * config/t-glibc (glibc-d.o): New rule.
3159 * configure: Regenerated.
3160 * configure.ac (tm_d_file): New variable.
3161 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
3162 * doc/contrib.texi (Contributors): Add self for the D frontend.
3163 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
3164 * doc/install.texi (Configuration): Mention libphobos as an option for
3165 --enable-shared. Mention d as an option for --enable-languages.
3166 (Testing): Mention check-d as a target.
3167 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3168 name suffixes. Mention d as a -x option.
3169 * doc/sourcebuild.texi (Top Level): Mention libphobos.
3170 * doc/standards.texi (Standards): Add section on D language.
3171 * doc/tm.texi: Regenerated.
3172 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3173 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3174 * dwarf2out.c (is_dlang): New function.
3175 (gen_compile_unit_die): Use DW_LANG_D for D.
3176 (declare_in_namespace): Return module die for D, instead of adding
3177 extra declarations into the namespace.
3178 (gen_namespace_die): Generate DW_TAG_module for D.
3179 (gen_decl_die): Handle CONST_DECLSs for D.
3180 (dwarf2out_decl): Likewise.
3181 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3182 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3183 kinds of aggregates.
3184 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3185 * genhooks.c: Include d/d-target.def.
3187 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
3190 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3191 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3192 (STACK_DYNAMIC_OFFSET): Likewise.
3194 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
3197 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3200 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3202 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3203 return type and other typos.
3205 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3207 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3208 a shorter sequence with fewer branches.
3209 (emit_final_str_compare_gpr): Ditto.
3211 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3213 * config/rs6000/tmmintrin.h: New file.
3214 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3216 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3218 * config/rs6000/mmintrin.h: Enable 32bit compilation.
3219 * config/rs6000/xmmintrin.h: Likewise.
3221 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3223 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3225 2018-10-26 Richard Biener <rguenther@suse.de>
3227 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3229 (vect_mark_slp_stmts_relevant): Likewise.
3230 (vect_detect_hybrid_slp_stmts): Likewise.
3231 (vect_bb_slp_scalar_cost): Likewise.
3232 (vect_remove_slp_scalar_calls): Likewise.
3234 2018-10-26 Jan Hubicka <jh@suse.cz>
3236 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3237 (warn_types_mismatch): Fix walk of DECL_NAME.
3238 (odr_types_equivalent_p): Fix overactive assert.
3240 2018-10-26 Richard Biener <rguenther@suse.de>
3242 PR tree-optimization/87105
3243 * tree-vectorizer.h (_slp_tree::refcnt): New member.
3244 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3246 (vect_create_new_slp_node): Initialize refcnt to one.
3248 (scalar_stmts_set_t, bst_fail): Remove.
3249 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3250 (vect_build_slp_tree): Add bst_map argument and lookup
3251 already created SLP nodes.
3252 (vect_print_slp_tree): Handle a SLP graph, print SLP node
3254 (vect_slp_rearrange_stmts): Handle a SLP graph.
3255 (vect_analyze_slp_instance): Adjust and free SLP nodes from
3256 the CSE map. Fix indenting.
3257 (vect_schedule_slp_instance): Add short-cut.
3259 2018-10-26 Martin Liska <mliska@suse.cz>
3262 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3263 addr_expr and not with pointers.
3265 2018-10-26 Jan Hubicka <jh@suse.cz>
3267 * tree.c (free_lang_data_in_type): Only check main variants.
3268 * ipa-devirt.c (warn_odr): Make static.
3269 (types_same_for_odr): Drop strict variant.
3270 (types_odr_comparable): Likewise.
3271 (odr_or_derived_type_p): Look for main variants.
3272 (odr_name_hasher::equal): Cleanup comment.
3273 (odr_subtypes_equivalent): Add warn and warned arguments; check main
3275 (type_variants_equivalent_p): break out from ...
3276 (odr_types_equivalent): ... here; go for main variants where needed.
3277 (warn_odr): ... here; turn static.
3278 (warn_types_mismatch): Compare mangled names of main variants.
3279 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3280 (type_with_linkage_p): Sanity check that we look at main variant.
3281 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3282 * tree.h (types_same_for_odr): Drop strict argument.
3284 2018-10-26 Richard Biener <rguenther@suse.de>
3286 PR tree-optimization/87746
3287 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3288 Simplify and fix WRT strided store groups with size not
3289 equal to step in element count.
3290 (vect_analyze_group_access_1): Dump the whole group.
3292 2018-10-25 Carl Love <cel@us.ibm.com>
3294 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3295 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3296 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
3297 precicion entry for each overloaded builtin.
3298 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3299 VSCEDPUO): Rename overloaded name.
3300 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3301 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3302 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3303 define_expand for xscmpexqp instruction.
3304 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3306 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3307 Jinsong Ji <jji@us.ibm.com>
3309 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3310 function with vec_sl.
3311 (_mm_slli_epi32): Likewise.
3312 (_mm_slli_epi64): Likewise.
3313 (_mm_srai_epi16): Replace deprecated function with vec_sra.
3314 (_mm_srai_epi32): Likewise.
3315 (_mm_srli_epi16): Replace deprecated function with vec_sr.
3316 (_mm_srli_epi32): Likewise.
3317 (_mm_srli_epi64): Likewise.
3318 (_mm_sll_epi16): Replace deprecated function with vec_sl.
3319 (_mm_sll_epi32): Likewise.
3320 (_mm_sll_epi64): Likewise.
3321 (_mm_sra_epi16): Replace deprecated function with vec_sra.
3322 (_mm_sra_epi32): Likewise.
3323 (_mm_srl_epi16): Replace deprecated function with vec_sr.
3324 (_mm_srl_epi32): Likewise.
3325 (_mm_srl_epi64): Likewise.
3327 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3328 Jinsong Ji <jji@us.ibm.com>
3330 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3331 comparison operators with vec_cmp* for compatibility due to
3332 unfortunate history; clean up formatting and use types more
3334 (_mm_sll_epi32): Likewise.
3335 (_mm_sll_epi64): Likewise.
3336 (_mm_srl_epi16): Likewise.
3337 (_mm_srl_epi32): Likewise.
3338 (_mm_srl_epi64): Likewise.
3340 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3341 Jinsong Ji <jji@us.ibm.com>
3343 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3344 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3345 __vector __bool int. Use vec_cmpgt in preference to deprecated
3346 function vec_vcmpgtfp.
3347 (_mm_max_ps): Likewise.
3349 2018-10-25 Jeff Law <law@redhat.com>
3351 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3354 2018-10-25 Martin Sebor <msebor@redhat.com>
3356 * doc/extend.texi (aligned): Expand attribute description.
3357 (Alignment): Rename section. Discuss function arguments.
3359 2018-10-25 Jan Hubicka <jh@suse.cz>
3361 * ipa-devirt.c (main_odr_variant): Remove.
3362 (hash_odr_name, types_same_for_odr, types_odr_comparable,
3363 odr_name_hasher::equal, odr_subtypes_equivalent_p):
3364 Drop use of main_odr_variant.
3365 (add_type_duplicate): Silence confused warnings on integer types.
3366 (get_odr_type): Always look for main variant.
3367 (register_odr_type): Simplify.
3369 2018-10-25 Richard Biener <rguenther@suse.de>
3371 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3372 Initialize ng to silence error with release checking bootstrap.
3374 2018-10-25 Richard Biener <rguenther@suse.de>
3376 * tree-if-conv.c: Include tree-ssa-sccvn.h.
3377 (tree_if_conversion): Run CSE on the if-converted loop body.
3379 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3381 * config/s390/constraints.md (ZL): New constraint.
3382 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3384 * config/s390/s390.md (movdi_larl): Remove.
3385 (movdi_64): Add the LARL alternative.
3387 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3390 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3391 (RTX_CODE_HWINT_P): New macro.
3392 (rtx_code_size): Use RTX_CODE_HWINT_P ().
3394 2018-10-25 Jan Hubicka <jh@suse.cz>
3396 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3399 2018-10-25 Richard Biener <rguenther@suse.de>
3401 PR tree-optimization/87665
3402 PR tree-optimization/87745
3403 * tree-vectorizer.h (get_earlier_stmt): Remove.
3404 (get_later_stmt): Pick up UID from the original non-pattern stmt.
3406 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
3408 * options.texi (Deprecated): Move list to Var section.
3410 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
3411 Jinsong Ji <jji@us.ibm.com>
3413 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3414 __vector long to __vector long long.
3415 (_mm_cvtpd_ps): Likewise.
3416 (_mm_cvttpd_epi32): Likewise.
3417 (_mm_cvtpi32_pd): Likewise.
3418 (_mm_unpackhi_epi64): Likewise.
3419 (_mm_unpacklo_epi64): Likewise.
3421 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
3423 PR rtl-optimization/87720
3424 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3426 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
3428 * gimple-ssa-isolate-paths.c
3429 (find_implicit_erroneous_behavior): Do not change code if the
3430 pass is running for warnings only.
3431 (find_explicit_erroneous_behavior): Likewise.
3433 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
3435 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3436 Define as rs6000_mangle_decl_assembler_name.
3437 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3438 long double to IEEE long double, switch the names of the long
3439 double built-in functions to be <func>f128 instead of <func>l.
3441 2018-10-24 Martin Sebor <msebor@redhat.com>
3443 * doc/extend.texi (nonnull): List no-argument form. Reference
3444 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3446 2018-10-24 Richard Biener <rguenther@suse.de>
3448 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3450 2018-10-24 Martin Liska <mliska@suse.cz>
3452 PR tree-optimization/84436
3453 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3455 (switch_conversion::contains_linear_function_p): New.
3456 (switch_conversion::build_one_array): Support linear
3457 transformation on input.
3458 * tree-switch-conversion.h (struct switch_conversion): Add
3459 contains_linear_function_p declaration.
3461 2018-10-24 Richard Biener <rguenther@suse.de>
3463 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3464 if its argument is CONSTANT_CLASS_P.
3466 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3468 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3469 it is wrong for forward declarations.
3471 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3473 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3474 SYMBOL_REF_P () check.
3476 2018-10-24 Richard Biener <rguenther@suse.de>
3478 PR tree-optimization/87105
3479 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3480 dump classification.
3481 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3482 stores by splitting the affected group after the fact.
3483 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3484 fail the SLP build because of size constraints.
3486 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3488 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3489 * configure: Regenerate.
3490 * config.in: Regenerate.
3491 * varasm.c (mergeable_string_section): Use readonly_data_section
3492 if linker doesn't support SHF_MERGE with alignment > 8.
3493 (mergeable_constant_section): Likewise.
3495 2018-10-24 Richard Biener <rguenther@suse.de>
3497 PR tree-optimization/84013
3498 * tree-ssa-structalias.c (struct msdi_data): New struct for
3499 marshalling data to walk_stmt_load_store_ops.
3500 (maybe_set_dependence_info): Refactor as callback for
3501 walk_stmt_load_store_ops.
3502 (compute_dependence_clique): Set restrict info on all stmt kinds.
3504 2018-10-24 Martin Liska <mliska@suse.cz>
3506 * cgraph.c (cgraph_node::dump):
3507 Remove reduntant dumps and make tp_first_run dump more compact.
3509 2018-10-24 Richard Biener <rguenther@suse.de>
3511 PR tree-optimization/87665
3512 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3515 2018-10-12 Jeff Law <law@redhat.com>
3517 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3520 2018-10-23 Richard Biener <rguenther@suse.de>
3522 * tree-vrp.c (add_assert_info): Guard dump_printf with
3524 * gimple-ssa-evrp-analyze.c
3525 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3526 Use value_range::ignore_equivs_equal_p.
3528 2018-10-23 Richard Biener <rguenther@suse.de>
3530 PR tree-optimization/87105
3531 PR tree-optimization/87608
3532 * passes.def (pass_all_early_optimizations): Add early phi-opt
3534 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3535 addition to debug stmts.
3536 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3537 and abs replacement early.
3538 * tree-cfg.c (gimple_empty_block_p): Likewise.
3540 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3543 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3544 specified to configure.
3545 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3547 2018-10-23 Richard Biener <rguenther@suse.de>
3549 PR tree-optimization/87700
3550 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3552 2018-10-23 Jakub Jelinek <jakub@redhat.com>
3555 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3556 second argument from __mmask16 to __mmask8.
3557 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3558 _mm_mask_packs_epi32): Likewise.
3559 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3561 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
3563 2018-10-23 Richard Biener <rguenther@suse.de>
3565 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3567 2018-10-23 Richard Biener <rguenther@suse.de>
3569 PR tree-optimization/86144
3570 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3571 over simd attribute.
3573 2018-10-23 Richard Biener <rguenther@suse.de>
3575 PR tree-optimization/87693
3576 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3577 the case we do not find the taken edge.
3579 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
3580 Jinsong Ji <jji@us.ibm.com>
3582 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3583 (_mm_store_pd): Use unaligned vector type for pointer cast.
3584 (_mm_maskmoveu_si128): Likewise.
3585 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3586 (_mm_store_ps): Use unaligned vector type for pointer cast.
3588 2018-10-22 Paul Koning <ni1d@arrl.net>
3590 * symtab.c (symtab_node::increase_alignment): Correct max
3593 2018-10-22 Yury Gribov <tetra2005@gmail.com>
3595 PR tree-optimization/87633
3596 * match.pd: Do not generate unordered integer comparisons.
3598 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3600 PR rtl-optimization/87600
3601 * combine.c: Add include of expr.h.
3602 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3603 register to a pseudo.
3604 (make_more_copies): New function, add a copy to a new pseudo after
3605 the moves from hard registers into pseudos.
3606 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3607 later. Call make_more_copies.
3609 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
3611 * lra-constraints.c (process_alt_operands): New local array,
3612 matching_early_clobber. Check matching_early_clobber before
3613 decrementing reject, and set matching_early_clobber after.
3615 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3618 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3619 call output_addr_const and hope for the best.
3621 2018-10-22 Richard Biener <rguenther@suse.de>
3623 * gimple-ssa-evrp-analyze.c
3624 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3625 smarter about what ranges to use.
3626 * tree-vrp.c (add_assert_info): Dump here.
3627 (register_edge_assert_for_2): Instead of here at multiple but
3630 * gcc.dg/tree-ssa/evrp12.c: New testcase.
3631 * gcc.dg/predict-6.c: Adjust.
3632 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3633 * gcc.dg/tree-ssa/vrp02.c: Likewise.
3634 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3636 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
3637 Richard Biener <rguenther@suse.de>
3639 * bitmap.h: Update data structure documentation, including a
3640 description of bitmap views as either linked-lists or splay trees.
3641 (struct bitmap_element_def): Update comments for splay tree bitmaps.
3642 (struct bitmap_head_def): Likewise.
3643 (bitmap_list_view, bitmap_tree_view): New prototypes.
3644 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3646 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3647 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3648 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3649 released bitmap element here.
3650 (bitmap_element_free): Remove.
3651 (bitmap_elt_clear_from): Work on splay tree bitmaps.
3652 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
3653 this function similar ones such that linked-list bitmap implementation
3654 functions are grouped.
3655 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3656 and moved for grouping.
3657 (bitmap_list_insert_element_after): Renamed from
3658 bitmap_elt_insert_after, and moved for grouping.
3659 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3660 (bitmap_tree_link_left, bitmap_tree_link_right,
3661 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3662 bitmap_tree_link_element, bitmap_tree_unlink_element,
3663 bitmap_tree_find_element): New functions for splay-tree bitmap
3665 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3666 Renamed and moved, see above entries.
3667 (bitmap_tree_listify_from): New function to convert part of a splay
3668 tree bitmap to a linked-list bitmap.
3669 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3670 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3671 (bitmap_find_bit): Remove.
3672 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3673 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3674 Handle splay tree bitmaps.
3675 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3676 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3677 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3678 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3679 bitmap_intersect_compl_p, bitmap_ior_and_compl,
3680 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3681 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
3682 corresponding changes to use linked-list specific bitmap_element
3683 manipulation functions as applicable for efficiency.
3684 (bitmap_tree_to_vec): New function.
3685 (debug_bitmap_elt_file): New function split out from ...
3686 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
3687 (bitmap_print): Likewise.
3689 PR tree-optimization/63155
3690 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3692 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3695 2018-10-22 Martin Liska <mliska@suse.cz>
3697 PR tree-optimization/87686
3699 2018-08-29 Martin Liska <mliska@suse.cz>
3701 * tree-switch-conversion.c (switch_conversion::expand):
3702 Strenghten assumption about gswitch statements.
3704 2018-10-22 Martin Liska <mliska@suse.cz>
3706 * ipa-icf.c (sem_item::compare_attributes): Remove.
3707 (sem_item::compare_referenced_symbol_properties): Use
3708 attribute_list_equal instead.
3709 (sem_function::equals_wpa): Likewise.
3710 * ipa-icf.h: Remove compare_attributes.
3712 2018-10-22 Richard Biener <rguenther@suse.de>
3715 * mem-stats.h (mem_usage::operator==): Fix pasto.
3717 2018-10-22 Richard Biener <rguenther@suse.de>
3719 PR tree-optimization/87640
3720 * tree-vrp.c (set_value_range_with_overflow): Decompose
3722 (extract_range_from_binary_expr_1): Adjust.
3724 2018-10-22 Martin Jambor <mjambor@suse.cz>
3726 * tree-eh.h (stmt_could_throw_p): Add function parameter.
3727 (stmt_can_throw_external): Likewise.
3728 (stmt_can_throw_internal): Likewise.
3729 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3730 (lower_eh_constructs_2): Likewise.
3731 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3732 (stmt_can_throw_external): Likewise.
3733 (stmt_can_throw_internal): Likewise.
3734 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3735 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3736 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3737 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3738 (pass_lower_eh_dispatch::execute): Pass cfun to
3739 stmt_can_throw_external.
3740 (cleanup_empty_eh): Likewise.
3741 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3742 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3743 stmt_can_throw_external instead of pushing it to cfun.
3744 (symbol_table::create_edge): Likewise.
3745 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3746 stmt_can_throw_internal.
3747 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3748 to stmt_could_throw_p.
3749 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3750 stmt_can_throw_internal.
3751 (pass_store_merging::execute): Likewise.
3752 * gimple-ssa-strength-reduction.c
3753 (find_candidates_dom_walker::before_dom_children): Pass cfun to
3755 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3756 stmt_can_throw_internal.
3757 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3758 to stmt_can_throw_external.
3759 (check_stmt): Pass cfun to stmt_could_throw_p.
3760 (check_stmt): Pass cfun to stmt_can_throw_external.
3761 (pass_nothrow::execute): Likewise.
3762 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3763 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3764 stmt_can_throw_internal.
3765 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3766 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3767 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3768 * tree-complex.c (expand_complex_libcall): Pass cfun to
3769 stmt_could_throw_p and to stmt_can_throw_internal.
3770 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3771 * tree-inline.c (copy_edges_for_bb): Likewise.
3772 (maybe_move_debug_stmts_to_successors): Likewise.
3773 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3775 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3776 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3777 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3778 stmt_can_throw_internal.
3779 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3780 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3782 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3783 stmt_can_throw_internal.
3784 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3785 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3787 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3788 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3789 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3790 (convert_mult_to_fma_1): Likewise.
3791 (convert_to_divmod): Likewise.
3792 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3793 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3794 * tree-ssa-propagate.c
3795 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3796 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3797 (maybe_optimize_range_tests): Likewise.
3798 (linearize_expr_tree): Likewise.
3799 (reassociate_bb): Likewise.
3800 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3801 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3802 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3803 (handle_char_store): Likewise.
3804 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3805 stmt_can_throw_internal.
3806 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3808 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3809 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3810 (vectorizable_simd_clone_call): Likewise.
3811 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3812 (gimple_stringop_fixed_value): Likewise.
3814 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
3816 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3817 literal pool references.
3818 (s390_check_qrst_address): Adapt to the new behavior of
3819 s390_loadrelative_operand_p ().
3821 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3824 * config/i386/sse.md (*andnot<mode>3_bcst): New.
3826 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3829 * config/i386/sse.md (*<code><mode>3_bcst): New.
3831 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3834 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3835 V4DI, V16SI and V8DI.
3836 (*sub<mode>3<mask_name>_bcst): New.
3837 (*add<mode>3<mask_name>_bcst): Likewise.
3839 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
3840 Jinsong Ji <jji@us.ibm.com>
3842 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3843 __m64 with __vector unsigned long long for compatibility.
3844 (_mm_movemask_epi8): Likewise.
3845 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3846 (_mm_cvttps_pi32): Likewise.
3847 (_mm_cvtpi32_ps): Likewise.
3848 (_mm_cvtps_pi16): Likewise.
3849 (_mm_loadh_pi): Likewise.
3850 (_mm_storeh_pi): Likewise.
3851 (_mm_movehl_ps): Likewise.
3852 (_mm_movelh_ps): Likewise.
3853 (_mm_loadl_pi): Likewise.
3854 (_mm_storel_pi): Likewise.
3855 (_mm_movemask_ps): Likewise.
3856 (_mm_shuffle_pi16): Likewise.
3858 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3861 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3862 __builtin_ia32_vfnmsubpd512_mask.
3863 (_mm512_mask_fnmsub_round_pd): Likewise.
3864 (_mm512_fnmsub_pd): Likewise.
3865 (_mm512_mask_fnmsub_pd): Likewise.
3866 (_mm512_maskz_fnmsub_round_pd): Use
3867 __builtin_ia32_vfnmsubpd512_maskz.
3868 (_mm512_maskz_fnmsub_pd): Likewise.
3869 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3870 (_mm512_mask_fnmsub_round_ps): Likewise.
3871 (_mm512_fnmsub_ps): Likewise.
3872 (_mm512_mask_fnmsub_ps): Likewise.
3873 (_mm512_maskz_fnmsub_round_ps): Use
3874 __builtin_ia32_vfnmsubps512_maskz.
3875 (_mm512_maskz_fnmsub_ps): Likewise.
3876 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3877 __builtin_ia32_vfnmsubpd256_mask.
3878 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3879 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3880 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3881 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3882 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3883 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3884 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3885 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3886 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3887 __builtin_ia32_vfnmsubpd.
3888 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3889 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3890 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3891 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3892 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3893 * config/i386/i386-builtin.def: Add
3894 __builtin_ia32_vfnmsubpd256_mask,
3895 __builtin_ia32_vfnmsubpd256_maskz,
3896 __builtin_ia32_vfnmsubpd128_mask,
3897 __builtin_ia32_vfnmsubpd128_maskz,
3898 __builtin_ia32_vfnmsubps256_mask,
3899 __builtin_ia32_vfnmsubps256_maskz,
3900 __builtin_ia32_vfnmsubps128_mask,
3901 __builtin_ia32_vfnmsubps128_maskz,
3902 __builtin_ia32_vfnmsubpd512_mask,
3903 __builtin_ia32_vfnmsubpd512_maskz,
3904 __builtin_ia32_vfnmsubps512_mask,
3905 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3906 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3907 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3908 __builtin_ia32_vfnmsubpd256.
3909 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3910 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3911 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3913 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3915 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3917 (fmai_vmfnmsub_<mode><round_name>): Likewise.
3919 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3922 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3923 __builtin_ia32_vfnmaddpd512_mask.
3924 (_mm512_mask_fnmadd_round_pd): Likewise.
3925 (_mm512_fnmadd_pd): Likewise.
3926 (_mm512_mask_fnmadd_pd): Likewise.
3927 (_mm512_maskz_fnmadd_round_pd): Use
3928 __builtin_ia32_vfnmaddpd512_maskz.
3929 (_mm512_maskz_fnmadd_pd): Likewise.
3930 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3931 (_mm512_mask_fnmadd_round_ps): Likewise.
3932 (_mm512_fnmadd_ps): Likewise.
3933 (_mm512_mask_fnmadd_ps): Likewise.
3934 (_mm512_maskz_fnmadd_round_ps): Use
3935 __builtin_ia32_vfnmaddps512_maskz.
3936 (_mm512_maskz_fnmadd_ps): Likewise.
3937 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3938 __builtin_ia32_vfnmaddpd256_mask.
3939 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3940 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3941 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3942 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3943 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3944 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3945 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3946 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3947 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3948 __builtin_ia32_vfnmaddpd.
3949 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3950 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3951 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3952 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3953 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3954 * config/i386/i386-builtin.def: Add
3955 __builtin_ia32_vfnmaddpd256_mask,
3956 __builtin_ia32_vfnmaddpd256_maskz,
3957 __builtin_ia32_vfnmaddpd128_mask,
3958 __builtin_ia32_vfnmaddpd128_maskz,
3959 __builtin_ia32_vfnmaddps256_mask,
3960 __builtin_ia32_vfnmaddps256_maskz,
3961 __builtin_ia32_vfnmaddps128_mask,
3962 __builtin_ia32_vfnmaddps128_maskz,
3963 __builtin_ia32_vfnmaddpd512_mask,
3964 __builtin_ia32_vfnmaddpd512_maskz,
3965 __builtin_ia32_vfnmaddps512_mask,
3966 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3967 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3968 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3969 __builtin_ia32_vfnmaddpd256.
3970 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3971 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3972 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3974 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3976 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3978 (fmai_vmfnmadd_<mode><round_name>): Likewise.
3980 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3983 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3984 __builtin_ia32_vfmsubpd512_mask.
3985 (_mm512_mask_fmsub_round_pd): Likewise.
3986 (_mm512_fmsub_pd): Likewise.
3987 (_mm512_mask_fmsub_pd): Likewise.
3988 (_mm512_maskz_fmsub_round_pd): Use
3989 __builtin_ia32_vfmsubpd512_maskz.
3990 (_mm512_maskz_fmsub_pd): Likewise.
3991 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3992 (_mm512_mask_fmsub_round_ps): Likewise.
3993 (_mm512_fmsub_ps): Likewise.
3994 (_mm512_mask_fmsub_ps): Likewise.
3995 (_mm512_maskz_fmsub_round_ps): Use
3996 __builtin_ia32_vfmsubps512_maskz.
3997 (_mm512_maskz_fmsub_ps): Likewise.
3998 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3999 __builtin_ia32_vfmsubpd256_mask.
4000 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
4001 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4002 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
4003 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4004 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4005 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
4006 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
4007 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
4008 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
4009 __builtin_ia32_vfmsubpd.
4010 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
4011 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
4012 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
4013 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
4014 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
4015 * config/i386/i386-builtin.def: Add
4016 __builtin_ia32_vfmsubpd256_mask,
4017 __builtin_ia32_vfmsubpd256_maskz,
4018 __builtin_ia32_vfmsubpd128_mask,
4019 __builtin_ia32_vfmsubpd128_maskz,
4020 __builtin_ia32_vfmsubps256_mask,
4021 __builtin_ia32_vfmsubps256_maskz,
4022 __builtin_ia32_vfmsubps128_mask,
4023 __builtin_ia32_vfmsubps128_maskz,
4024 __builtin_ia32_vfmsubpd512_mask,
4025 __builtin_ia32_vfmsubpd512_maskz,
4026 __builtin_ia32_vfmsubps512_mask,
4027 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
4028 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
4029 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
4030 __builtin_ia32_vfmsubpd256.
4031 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
4032 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
4033 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
4035 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
4037 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
4039 (fmai_vmfmsub_<mode><round_name>): Likewise.
4041 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4043 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
4044 Remove plus. Renamed to ...
4045 (*sub<mode>3<mask_name>_bcst): This.
4046 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
4047 (*add<mode>3<mask_name>_bcst): This.
4049 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4052 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
4054 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4057 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
4058 (_mm_or_epi32): Likewise.
4059 (_mm256_xor_epi32): Likewise.
4060 (_mm_xor_epi32): Likewise.
4061 (_mm256_or_epi64): Likewise.
4062 (_mm_or_epi64): Likewise.
4063 (_mm256_xor_epi64): Likewise.
4064 (_mm_xor_epi64): Likewise.
4066 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
4069 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
4071 2018-10-20 Jakub Jelinek <jakub@redhat.com>
4074 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
4076 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
4078 * doc/ux.texi: Move @section directly after @node.
4080 2018-10-19 Jakub Jelinek <jakub@redhat.com>
4084 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
4085 depend closely nested inside of loop with ordered clause with
4088 2018-10-19 David Malcolm <dmalcolm@redhat.com>
4090 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
4091 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
4092 * doc/ux.texi: New file.
4094 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
4096 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
4097 be the first CR field allocated.
4099 2018-10-19 Richard Biener <rguenther@suse.de>
4102 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
4103 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
4105 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4108 * config/i386/sse.md
4109 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
4110 (*add<mode>3<mask_name>_bcst_2): Likewise.
4112 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4114 * config/i386/sse.md
4115 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4116 Replace nonimmediate_operand with register_operand.
4117 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4119 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4122 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
4124 PR rtl-optimization/87596
4125 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
4126 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4127 for instructions in FROM..TO range.
4129 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
4131 * cfgexpand.c (expand_one_var): Use specific wording in error message
4132 for non-local frame variables.
4133 * stor-layout.c (layout_decl): Do not issue a warning for them.
4135 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
4137 * haifa-sched.c (priority): Add force_recompute parameter.
4138 (apply_replacement): Call priority () with force_recompute = true.
4139 (restore_pattern): Likewise.
4141 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4143 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
4144 HOST_BITS_PER_WIDE_INT.
4145 (test_vector_ops_duplicate): Likewise.
4147 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4150 * config/i386/sse.md (VF_AVX512): New.
4151 (avx512bcst): Likewise.
4152 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4154 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4156 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4159 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
4161 * doc/invoke.texi (-dumpversion): Improve grammar.
4162 (-dumpfullversion): Make more consistent with -dumpversion.
4164 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
4166 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4167 Set JUMP_LABEL to the jump insn.
4168 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4169 Predict emitted jump and add label to jump insn.
4171 2018-10-18 David Malcolm <dmalcolm@redhat.com>
4173 PR tree-optimization/87562
4174 * input.c (get_substring_ranges_for_loc): Use
4175 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4176 getting the linemap for the endpoint. Verify that it's either
4177 in the same linemap as the start point's spelling location, or
4178 at least in the same file.
4180 2018-10-18 Richard Biener <rguenther@suse.de>
4182 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4183 feed width-specific load/store costs through ix86_vec_cost.
4184 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4185 (k8_cost): Likewise.
4186 (bdver_cost): Likewise.
4187 (znver1_cost): Likewise.
4188 (btver1_cost): Likewise.
4189 (btver2_cost): Likewise.
4191 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4193 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4194 to simplify subreg of vec_merge.
4196 2018-10-18 Richard Biener <rguenther@suse.de>
4198 * config/i386/i386.c: Fix costing of vector FMA.
4200 2018-10-18 Richard Biener <rguenther@suse.de>
4202 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4204 (ix86_builtin_vectorization_cost): For vec_construct properly
4205 cost insertion into SSE regs.
4206 (...): Adjust calls to ix86_vec_cost.
4208 2018-10-18 Richard Biener <rguenther@suse.de>
4212 2018-02-07 Richard Biener <rguenther@suse.de>
4214 PR tree-optimization/84204
4215 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4218 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4221 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4223 (test_vector_ops_duplicate): Add test for a scalar subreg of a
4224 VEC_MERGE of a VEC_DUPLICATE.
4226 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4228 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4229 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4230 * doc/standards.texi (C Language): Document C2X.
4231 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4232 (rl78_option_override): Handle "GNU C2X" language name.
4234 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4236 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4237 Document C17 as published in 2018.
4239 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
4242 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4243 bail out if both sides do not have the same storage order.
4245 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4247 * bitmap.c (bitmap_head::dump): New.
4248 * bitmap.h (bitmap_head): Add dump().
4249 * gimple-ssa-evrp-analyze.c
4250 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4251 (evrp_range_analyzer::set_ssa_range_info): Same.
4252 (evrp_range_analyzer::record_ranges_from_phis): Same.
4253 (evrp_range_analyzer::record_ranges_from_stmt): Same.
4254 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4255 * gimple-ssa-sprintf.c (get_int_range): Same.
4256 (format_integer): Same.
4257 (sprintf_dom_walker::handle_gimple_call): Same.
4258 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4259 (ipcp_vr_lattice::top_p): Same.
4260 (ipcp_vr_lattice::bottom_p): Same.
4261 (ipcp_vr_lattice::set_to_bottom): Same.
4262 (ipa_vr_operation_and_type_effects): Same.
4263 (propagate_vr_across_jump_function): Same.
4264 (ipcp_store_vr_results): Same.
4265 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4266 (ipa_print_node_jump_functions_for_edge): Same.
4267 (ipa_get_value_range): Same.
4268 (ipa_compute_jump_functions_for_edge): Same.
4269 (ipa_write_jump_function): Same.
4270 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4271 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4273 * vr-values.c (set_value_range_to_nonnegative): Same.
4274 (set_value_range_to_truthvalue): Same.
4275 (vr_values::get_value_range): Same.
4276 (vr_values::set_defs_to_varying): Same.
4277 (vr_values::update_value_range): Same.
4278 (symbolic_range_based_on_p): Same.
4279 (vr_values::op_with_boolean_value_range_p): Same.
4280 (vr_values::extract_range_for_var_from_comparison_expr): Same.
4281 (vr_values::extract_range_from_ssa_name): Same.
4282 (vr_values::extract_range_from_binary_expr): Same.
4283 (vr_values::extract_range_from_unary_expr): Same.
4284 (vr_values::extract_range_from_cond_expr): Same.
4285 (vr_values::extract_range_from_comparison): Same.
4286 (vr_values::check_for_binary_op_overflow): Same.
4287 (vr_values::extract_range_basic): Same.
4288 (vr_values::extract_range_from_assignment): Same.
4289 (compare_ranges): Same.
4290 (compare_range_with_value): Same.
4291 (vr_values::adjust_range_with_scev): Same.
4292 (vrp_valueize): Same.
4293 (vrp_valueize_1): Same.
4294 (vr_values::get_vr_for_comparison): Same.
4295 (vr_values::compare_name_with_value): Same.
4296 (vr_values::compare_names): Same.
4297 (vr_values::vrp_evaluate_conditional): Same.
4298 (find_case_label_ranges): Same.
4299 (vr_values::vrp_visit_switch_stmt): Same.
4300 (vr_values::extract_range_from_phi_node): Same.
4301 (vr_values::simplify_div_or_mod_using_ranges): Same.
4302 (vr_values::simplify_bit_ops_using_ranges): Same.
4303 (test_for_singularity): Same.
4304 (range_fits_type_p): Same.
4305 (vr_values::simplify_cond_using_ranges_1): Same.
4306 (vr_values::simplify_switch_using_ranges): Same.
4307 (vr_values::simplify_float_conversion_using_ranges): Same.
4308 (vr_values::two_valued_val_range_p): Same.
4309 (vr_values::add_equivalence): Move to value_range::equiv_add.
4310 * vr-values.h (vr_values::add_equivalence): Remove.
4311 (VR_INITIALIZER): Remove.
4312 * tree-vrp.c (value_range::set): New.
4313 (value_range::equiv_add): New.
4314 (value_range::value_range): New.
4315 (value_range::deep_copy): New.
4316 (value_range::check): New.
4317 (value_range::equal_p): New.
4318 (value_range::ignore_equivs_equal_p): New.
4319 (value_range::operator==): New.
4320 (value_range::operator!=): New.
4321 (value_range::symbolic_p): New.
4322 (value_range::numeric_p): New.
4323 (value_range::set_undefined): New.
4324 (value_range::set_varying): New.
4325 (value_range::may_contain_p): New.
4326 (value_range::equiv_clear): New.
4327 (value_range::singleton_p): New.
4328 (value_range::intersect): New.
4329 (value_range::dump): New.
4330 (value_range::set_and_canonicalize): New.
4331 (set_value_range): Adjust for value_range API.
4332 (set_value_range_to_undefined): Same.
4333 (set_value_range_to_varying): Same.
4334 (set_and_canonicalize_value_range): Same.
4335 (set_value_range_to_nonnull): Same.
4336 (set_value_range_to_null): Same.
4337 (range_is_null): Same.
4338 (range_is_nonnull): Same.
4339 (range_int_cst_p): Same.
4340 (range_int_cst_singleton_p): Same.
4341 (symbolic_range_p): Same.
4342 (range_includes_zero_p): Same.
4343 (value_range_constant_singleton): Same.
4344 (vrp_set_zero_nonzero_bits): Same.
4345 (ranges_from_anti_range): Same.
4346 (extract_range_into_wide_ints): Same.
4347 (extract_range_from_multiplicative_op): Same.
4348 (set_value_range_with_overflow): Same.
4349 (extract_range_from_binary_expr_1): Same.
4350 (extract_range_from_unary_expr): Same.
4351 (dump_value_range): Same.
4352 (debug_value_range): Same.
4353 (vrp_prop::check_array_ref): Same.
4354 (vrp_prop::check_mem_ref): Same.
4355 (vrp_prop::vrp_initialize): Same.
4356 (vrp_prop::visit_stmt): Same.
4357 (intersect_ranges): Same.
4358 (vrp_prop::visit_phi): Same.
4359 (vrp_prop::vrp_finalize): Same.
4360 (determine_value_range_1): Same.
4361 (determine_value_range): Same.
4362 (vrp_intersect_ranges_1): Rename to...
4363 (vrp_intersect_1): this.
4364 (vrp_intersect_ranges): Rename to...
4365 (value_range::intersect_helper): ...this.
4366 (vrp_meet_1): Rename to...
4367 (value_range::union_helper): ...this.
4368 (vrp_meet): Rename to...
4369 (value_range::union_): ...this.
4370 (copy_value_range): Remove.
4371 * tree-vrp.h (struct value_range): Rewrite into a proper class.
4372 (value_range::vrtype): New.
4373 (value_range::type): New.
4374 (value_range::equiv): New.
4375 (value_range::min): New.
4376 (value_range::max): New.
4377 (value_range::varying_p): New.
4378 (value_range::undefined_p): New.
4379 (value_range::null_p): New.
4380 (value_range::equiv_add): New.
4381 (copy_value_range): Remove.
4383 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4385 * Makefile.in (SELFTEST_TARGETS): New.
4386 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4387 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4388 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4390 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4391 (selftest-c++-gdb, selftest-c++-valgrind): Move to
4393 * configure: Regenerate.
4394 * configure.ac (selftest_languages): New.
4396 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4398 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4399 overflow wraps argument.
4400 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4401 wide_int_range_multiplicative_op.
4402 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4403 overflow wraps argument.
4404 (wide_int_range_multiplicative_op): Same.
4405 (wide_int_range_lshift): Same.
4406 (wide_int_range_div): Same.
4407 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4408 (wide_int_range_lshift): Same.
4409 (wide_int_range_div): Same.
4411 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4413 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4414 use sign as argument.
4415 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4416 wide_int_range_shift_undefined_p.
4418 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4420 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4422 (@despeculate_copy<ALLI_TI:mode>): ... This.
4423 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4426 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4428 * config.gcc: Obsolete *-*-solaris2.10*.
4429 * doc/install.texi (Specific, *-*-solaris2*): Document it.
4431 2018-10-12 Jeff Law <law@redhat.com>
4433 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4434 reg + sym +- const_int addressing modes.
4436 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4438 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4439 * diagnostic-show-locus.c (layout::layout): Apply the minimum
4441 (layout::start_annotation_line): Only print up to 3 of the
4442 margin character, to avoid touching the left-hand side.
4443 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4444 minimum margin width, as set by test_diagnostic_context's ctor.
4445 (selftest::test_fixit_insert_containing_newline): Likewise.
4446 (selftest::test_fixit_insert_containing_newline_2): Likewise.
4447 (selftest::test_line_numbers_multiline_range): Clear
4448 dc.min_margin_width.
4449 * diagnostic.c (diagnostic_initialize): Initialize
4451 * diagnostic.h (struct diagnostic_context): Add field
4453 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4454 * opts.c (common_handle_option): Handle
4455 OPT_fdiagnostics_minimum_margin_width_.
4456 * selftest-diagnostic.c
4457 (selftest::test_diagnostic_context::test_diagnostic_context):
4458 Initialize min_margin_width to 6.
4459 * toplev.c (general_init): Initialize global_dc->min_margin_width.
4461 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4463 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4464 Fix usage of "error_at_rich_loc" in the comment.
4466 2018-10-15 Renlin Li <renlin.li@arm.com>
4469 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4470 if-conversioned loop when it contains ifn with types not
4471 supported by backend.
4472 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4473 (direct_internal_fn_supported_p): New helper function.
4474 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4476 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4479 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4480 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4481 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4483 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4485 PR tree-optimization/87022
4486 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4487 bits in dist vector rather than the first one.
4489 2018-10-15 Richard Biener <rguenther@suse.de>
4492 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4493 (visit_loadstore): When a used restrict tag escaped verify that
4494 the points-to solution of "other" pointers do not include
4496 (compute_dependence_clique): If a used restrict tag escaped
4497 communicated that down to visit_loadstore.
4499 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4501 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4502 into reg if it isn't a general operand.
4504 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4507 * config/i386/sse.md (*vec_dupv2di): Add register source to
4510 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4513 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4514 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4515 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4516 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4518 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4520 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4521 (notice_args_size): Set it in the current trace if no insn that can
4522 throw internally has been seen yet.
4523 (connect_traces): When connecting args_size between traces, allow the
4524 incoming values not to match if there is an insn setting it before the
4525 first insn that can throw internally; in that case, force the creation
4526 of a CFI note on this latter insn.
4528 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4530 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4531 the base class, because using the injected-class-name was not clearly
4532 specified until DR 176.
4534 2018-10-12 Paul Koning <ni1d@arrl.net>
4536 * config/pdp11/pdp11.md (doloop_end): New expander.
4537 (doloop_end_insn): renamed from "doloop_end".
4538 (addqi3): New pattern.
4539 (subqi3): New pattern.
4540 * config/pdp11/predicates.md (incdec_operand): New predicate.
4542 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4545 * real.c (format_helper::can_represent_integral_type_p): New function
4546 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4547 * match.pd: New pattern.
4549 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4551 * configure.ac: Introduce --enable-large-address-aware
4552 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4553 * doc/install.texi: Document it.
4554 * configure, config.in: Rebuilt.
4555 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4556 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4557 (LINK_SPEC): Insert it.
4558 * config/i386/mingw-w64.h: Likewise.
4560 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4562 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
4564 PR rtl-optimization/87600
4565 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4567 2018-10-12 Paul Koning <ni1d@arrl.net>
4569 * doc/md.texi (doloop_end): Document that the pattern code may
4570 need to check operand mode.
4572 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
4574 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4575 to zero-extend between int and floating-point registers.
4576 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4577 ldp into floating-point registers. Add type and arch attributes.
4578 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4579 Use f_loads for type attribute.
4581 2018-10-11 Martin Sebor <msebor@redhat.com>
4583 * doc/extend.texi (attribute packed): Correct typos.
4585 2018-10-11 Martin Sebor <msebor@redhat.com>
4587 * doc/extend.texi (attribute flatten): Mention interaction with
4590 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4593 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4594 Set new_decl virtual flag to zero.
4596 2018-10-11 Martin Sebor <msebor@redhat.com>
4599 * doc/extend.texi (attribute format_arg): Discuss using multiple
4600 attributes on a single function.
4602 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
4604 PR tree-optimization/86829
4605 * match.pd (sin (atan (x))): New simplification rules.
4606 (cos (atan (x))): Likewise.
4607 * real.c (build_sinatan_real): New function.
4608 * real.h (build_sinatan_real): Prototype.
4610 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
4612 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4614 (fold_mergeeo_helper): New helper function.
4615 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4616 intrinsics. Correct some whitespace indentation issues.
4618 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
4621 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4622 Use HOST_WIDE_INT_1U for shift.
4624 2018-10-11 Doug Rupp <rupp@adacore.com>
4625 Olivier Hainque <hainque@adacore.com>
4627 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4628 Pass --relax to the linker for RTPs.
4629 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4631 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
4632 Jan Hubicka <jh@suse.cz>
4633 Martin Jambor <mjambor@suse.cz>
4635 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4636 the same elements are repeated rather than printing all of them.
4637 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4638 "repeated" elements.
4639 * read-rtl-function.c (test_loading_repeat): New function.
4640 (read_rtl_function_c_tests): Call test_loading_repeat.
4641 * rtl-tests.c (test_dumping_repeat): New function.
4642 (rtl_tests_c_tests): Call test_dumping_repeat.
4644 2018-10-11 Richard Biener <rguenther@suse.de>
4646 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4647 bdver?_cost): Unify to ...
4648 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4649 * config/i386/i386.c (processor_cost_table): Adjust.
4651 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
4654 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4655 the thunk when expanding to GIMPLE.
4657 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
4659 * varasm.c (mergeable_string_section): Don't try to move zero-length
4660 strings to the merge section.
4662 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
4665 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4667 2018-10-10 Jakub Jelinek <jakub@redhat.com>
4670 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4671 to special_args set.
4673 2018-10-10 Richard Biener <rguenther@suse.de>
4675 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4676 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4677 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4678 and recursing and pattern terminating the recursion on SSE
4679 vector width using ix86_expand_reduc.
4680 (reduc_sminmax_scal_<mode>): Split into part reducing to half
4681 width and recursing and SSE2 vector variant doing the final
4682 reduction with ix86_expand_reduc.
4683 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4684 with terminating the recursion at AVX level, splitting that
4687 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4689 * genmatch.c (error_cb): Rename to...
4690 (diagnostic_cb): ...this, converting int params to enums.
4691 (fatal_at): Update for renaming.
4692 (warning_at): Likewise.
4694 * input.c (selftest::ebcdic_execution_charset::apply):
4695 Update for renaming of...
4696 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4698 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4699 converting level and reason to enums.
4700 (class selftest::lexer_error_sink): Rename to...
4701 (class selftest::lexer_test_options): ...this, renaming field
4702 "m_errors" to "m_diagnostics".
4703 (selftest::lexer_test_options::apply): Update for renaming of...
4704 (selftest::lexer_test_options::on_error): ...this, renaming to...
4705 (selftest::lexer_test_options::on_diagnostic): ...this
4706 converting level and reason to enums.
4707 (selftest::test_lexer_string_locations_raw_string_unterminated):
4708 Update for renamings.
4709 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4712 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
4714 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4715 * config/rs6000/pmmintrin.h: New file.
4717 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
4719 PR tree-optimization/86659
4720 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4722 2018-10-09 Richard Biener <rguenther@suse.de>
4724 PR tree-optimization/63155
4725 * tree-ssa-structalias.c: Include tree-ssa.h.
4726 (get_constraint_for_ssa_var): For undefs return nothing_id.
4727 (find_func_aliases): Cleanup PHI handling.
4729 2018-10-09 Richard Biener <rguenther@suse.de>
4731 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4734 2018-10-09 Martin Liska <mliska@suse.cz>
4736 * asan.c (asan_emit_stack_protection): If a stack variable
4737 is located in a same file as current function, then emit
4738 line info into variable definition string.
4740 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4742 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4745 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4747 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4750 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4752 PR tree-optimization/86659
4753 * gimple-match.h (struct gimple_match_op): Add reverse field.
4754 (gimple_match_op::set_op): New overloaded method.
4755 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4756 the REF_REVERSE_STORAGE_ORDER flag on the value.
4757 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4758 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4760 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4763 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4764 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4766 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
4769 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4770 Defined with __builtin_ia32_vfmaddsubpd512_mask.
4772 2018-10-08 Richard Biener <rguenther@suse.de>
4774 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4775 cost the same as AVX128 ones.
4777 2018-10-08 Paul Koning <ni1d@arrl.net>
4779 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4780 (expand_block_move): New function.
4781 * config/pdp11/pdp11.c (output_block_move): Remove.
4782 (expand_block_move): New function.
4783 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4784 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4785 (*movmemhi1): Remove.
4787 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
4789 * config/s390/2827.md: Increase latencies for some FP instructions.
4791 2018-10-08 Richard Biener <rguenther@suse.de>
4793 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4795 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4796 * tree-vectorizer.h (dump_stmt_cost): Adjust.
4797 (add_stmt_cost): Dump return value of the hook.
4799 2018-10-08 Richard Biener <rguenther@suse.de>
4801 PR tree-optimization/63155
4802 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4803 (ssa_propagation_engine::ssa_propagate): Remove redundant
4804 bitmap bit clearing.
4806 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
4808 PR rtl-optimization/86939
4809 PR rtl-optimization/87479
4810 * ira.h (non_conflicting_reg_copy_p): New prototype.
4811 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4812 (make_hard_regno_dead): Don't add conflicts for register
4813 ignore_reg_for_conflicts.
4814 (make_object_dead): Likewise.
4815 (non_conflicting_reg_copy_p): New function.
4816 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4817 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4818 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4819 (make_hard_regno_dead): Don't add conflicts for register
4820 ignore_reg_for_conflicts. Remove special conflict handling of
4821 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
4822 check_pic_pseudo_p and update callers.
4823 (mark_pseudo_dead): Don't add conflicts for register
4824 ignore_reg_for_conflicts.
4825 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4827 2018-10-05 Andrew Waterman <andrew@sifive.com>
4828 Jim Wilson <jimw@sifive.com>
4830 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4831 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
4832 new pattern using HONOR_SNANS that emits one extra instruction.
4834 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4836 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4837 patterns): Merge SI and DI patterns to a GPR pattern.
4838 (unnamed define_insn and define_split for record form of that): Merge
4839 to a single define_insn_and_split pattern.
4841 2018-10-05 David Malcolm <dmalcolm@redhat.com>
4844 * input.c (expand_location_to_spelling_point): Add param "aspect"
4845 and use rather than hardcoding LOCATION_ASPECT_CARET.
4846 (get_substring_ranges_for_loc): Handle the case of a single token
4847 within a macro expansion.
4848 * input.h (expand_location_to_spelling_point): Add "aspect" param,
4849 defaulting to LOCATION_ASPECT_CARET.
4851 2018-10-05 Paul Koning <ni1d@arrl.net>
4853 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4854 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4855 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4856 (pdp11_guard_type): New function.
4858 2018-10-05 Paul Koning <ni1d@arrl.net>
4860 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4861 * config/pdp11/pdp11.opt (mfloat32): Remove.
4863 * doc/invoke.texi (pdp11 -mfloat32): Remove:
4864 (pdp11 -mfloat64): Remove.
4866 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4868 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4869 (*cmp<mode>_cc_i387): Ditto.
4870 (*cmpu<mode>_cc_i387): Ditto.
4871 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4872 * config/i386/i386.c (ix86_expand_fp_compare): Remove
4874 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4875 Emit x86_sahf_1 pattern.
4876 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4877 (ix86_expand_carry_flag_compare): Ditto.
4879 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4881 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4882 to reg_or_0_operand. Add "C" constraint.
4883 (*cmpxf_cc_i387): Ditto.
4884 (*cmp<mode>_i387): Change operand 2 predicate
4885 to nonimm_or_0_operand. Add "C" constraint.
4886 (*cmp<mode>_cc_i387): Ditto.
4887 (*cmp<mode>_0_i387): Remove insn pattern.
4888 (*cmp<mode>_0_cc_i387): Ditto.
4890 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4892 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4893 * config/i386/predicates.md (nonimm_or_0_operand): Rename
4894 from vector_move_operand. Update all uses.
4896 2018-10-05 Martin Sebor <msebor@redhat.com>
4898 PR tree-optimization/87490
4899 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4902 2018-10-05 Richard Biener <rguenther@suse.de>
4904 PR tree-optimization/63155
4905 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4906 vertical space in dumpfiles.
4907 * tree-ssa-propagate.h
4908 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4909 * tree-ssa-propagate.c (cfg_blocks_back): New global.
4910 (ssa_edge_worklist_back): Likewise.
4911 (curr_order): Likewise.
4912 (cfg_blocks_get): Remove abstraction.
4913 (cfg_blocks_add): Likewise.
4914 (cfg_blocks_empty_p): Likewise.
4915 (add_ssa_edge): Add to current or next worklist based on
4917 (add_control_edge): Likewise.
4918 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4920 (ssa_propagation_engine::ssa_propagate): ... here. Unify
4921 iteration from CFG and SSA edge worklist so we process
4922 everything in RPO order, prioritizing forward progress
4924 (ssa_prop_init): Allocate new worklists, do not dump
4926 (ssa_prop_fini): Free new worklists.
4928 2018-10-05 Richard Biener <rguenther@suse.de>
4930 * tree-core.h (tree_block::abstract_flag): Remove.
4931 (tree_block::block_num): Make full 32bits.
4932 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4933 * tree.h (BLOCK_ABSTRACT): Remove.
4934 * dwarf2out.c (gen_lexical_block_die): Remove dead code
4935 resulting from BLOCK_ABSTRACT being always false.
4936 (gen_inlined_subroutine_die): Likewise.
4937 (gen_block_die): Likewise.
4938 * tree.c (block_ultimate_origin): Likewise.
4939 * tree-pretty-print.c (dump_block_node): Remove code dealing
4940 with BLOCK_ABSTRACT.
4941 * tree-ssa-live.c (dump_scope_block): Likewise.
4942 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4943 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4945 2018-10-05 Richard Biener <rguenther@suse.de>
4947 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4948 is asked for initialize mode to the component mode of the
4951 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
4954 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4955 assembler for -mavx.
4956 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4958 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4961 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4963 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4964 to be DImode. When using mffscrn, force the operand to a register.
4966 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
4968 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4969 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4970 X87MODEF mode iterator.
4971 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4972 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4973 X87MODEF mode iterator.
4975 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4977 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4978 -Wno-prio-ctor-dtor.
4980 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4982 * Makefile.in (OBJS): Add opt-problem.o.
4983 * dump-context.h: Include "selftest.h.
4984 (selftest::temp_dump_context): New forward decl.
4985 (class dump_context): Make friend of class
4986 selftest::temp_dump_context.
4987 (dump_context::dump_loc_immediate): New decl.
4988 (class dump_pretty_printer): Move here from dumpfile.c.
4989 (class temp_dump_context): Move to namespace selftest.
4990 (temp_dump_context::temp_dump_context): Add param
4991 "forcibly_enable_dumping".
4992 (selftest::verify_dumped_text):
4993 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4994 (selftest::verify_item):
4995 (ASSERT_IS_TEXT): Move here from dumpfile.c.
4996 (ASSERT_IS_TREE): Likewise.
4997 (ASSERT_IS_GIMPLE): Likewise.
4998 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
5000 (dump_context::dump_loc_immediate): ...this new function.
5001 (class dump_pretty_printer): Move to dump-context.h.
5002 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
5003 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
5004 (temp_dump_context::temp_dump_context): Move to "selftest"
5005 namespace. Add param "forcibly_enable_dumping", and use it to
5006 conditionalize the use of m_pp;
5007 (selftest::verify_dumped_text): Make non-static.
5008 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
5009 (selftest::verify_item): Make non-static.
5010 (ASSERT_IS_TEXT): Move to dump-context.h.
5011 (ASSERT_IS_TREE): Likewise.
5012 (ASSERT_IS_GIMPLE): Likewise.
5013 (selftest::test_capture_of_dump_calls): Pass "true" for new
5014 param of temp_dump_context.
5015 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
5016 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
5018 * opt-problem.cc: New file.
5019 * opt-problem.h: New file.
5020 * optinfo-emit-json.cc
5021 (selftest::test_building_json_from_dump_calls): Pass "true" for
5022 new param of temp_dump_context.
5023 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
5024 (optinfo::emit_for_opt_problem): New function.
5025 (optinfo::emit): Clarity which emit_item is used.
5026 * optinfo.h (optinfo::get_dump_location): New accessor.
5027 (optinfo::emit_for_opt_problem): New decl.
5028 (optinfo::emit): Make const.
5029 * selftest-run-tests.c (selftest::run_tests): Call
5030 selftest::opt_problem_cc_tests.
5031 * selftest.h (selftest::opt_problem_cc_tests): New decl.
5032 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
5033 bool to opt_result, converting fprintf messages to
5034 opt_result::failure_at calls. Add "stmt" param for use by the
5036 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
5037 (runtime_alias_check_p): Convert return type from bool to
5038 opt_result, converting dump_printf calls to
5039 opt_result::failure_at, using the statement DDR_A for their
5041 (find_data_references_in_stmt): Convert return type from bool to
5042 opt_result, converting "return false" to opt_result::failure_at
5044 * tree-data-ref.h: Include "opt-problem.h".
5045 (dr_analyze_innermost): Convert return type from bool to opt_result,
5046 and add a const gimple * param.
5047 (find_data_references_in_stmt): Convert return type from bool to
5049 (runtime_alias_check_p): Likewise.
5050 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
5051 dr_analyze_innermost.
5052 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
5053 Convert return type from bool to opt_result, adding a message for
5054 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
5055 (vect_analyze_data_ref_dependence): Convert return type from bool
5056 to opt_result. Change sense of return type from "false"
5057 effectively meaning "no problems" to "false" meaning a problem,
5058 so that "return false" becomes "return opt_result::success".
5059 Convert "return true" calls to opt_result::failure_at, using
5060 the location of statement A rather than vect_location.
5061 (vect_analyze_data_ref_dependences): Convert return type from bool
5063 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
5064 calls to opt_result::failure_at, using the stmt location rather
5066 (vect_verify_datarefs_alignment): Convert return type from bool
5068 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
5069 into multiple more-tightly-scoped copies.
5070 (vect_analyze_data_refs_alignment): Convert return type from bool
5072 (vect_analyze_data_ref_accesses): Likewise, converting a
5073 "return false" to a "return opt_result::failure_at", adding a
5075 (vect_prune_runtime_alias_test_list): Convert return type from
5076 bool to opt_result, converting dump_printf_loc to
5077 opt_result::failure_at. Add a %G to show the pertinent statement,
5078 and use the stmt's location rather than vect_location.
5079 (vect_find_stmt_data_reference): Convert return type from
5080 bool to opt_result, converting dump_printf_loc to
5081 opt_result::failure_at, using stmt's location.
5082 (vect_analyze_data_refs): Convert return type from bool to
5083 opt_result. Convert "return false" to "return
5084 opt_result::failure_at", adding messages as needed.
5085 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
5086 type from bool to opt_result.
5087 (vect_determine_vf_for_stmt): Likewise.
5088 (vect_determine_vectorization_factor): Likewise, converting
5089 dump_printf_loc to opt_result::failure_at, using location of phi
5090 rather than vect_location.
5091 (vect_analyze_loop_form_1): Convert return type from bool to
5092 opt_result, converting dump_printf_loc calls, retaining the use of
5094 (vect_analyze_loop_form): Convert return type from loop_vec_info
5095 to opt_loop_vec_info.
5096 (vect_analyze_loop_operations): Convert return type from bool to
5097 opt_result, converting dump_printf_loc calls, using the location
5098 of phi/stmt rather than vect_location where available. Convert
5099 various "return false" to "return opt_result::failure_at" with
5100 "unsupported phi" messages.
5101 (vect_get_datarefs_in_loop): Convert return type from bool to
5102 opt_result. Add a message for the
5103 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
5104 (vect_analyze_loop_2): Convert return type from bool to
5105 opt_result. Ensure "ok" is set to a opt_result::failure_at before
5106 each "goto again;", adding new messages where needed.
5107 Add "unsupported grouped {store|load}" messages.
5108 (vect_analyze_loop): Convert return type from loop_vec_info to
5110 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
5112 * tree-vect-stmts.c (process_use): Likewise, converting
5113 dump_printf_loc call and using stmt location, rather than
5115 (vect_mark_stmts_to_be_vectorized): Likeise.
5116 (vect_analyze_stmt): Likewise, adding a %G.
5117 (vect_get_vector_types_for_stmt): Convert return type from bool to
5118 opt_result, converting dump_printf_loc calls and using stmt
5119 location, rather than vect_location.
5120 (vect_get_mask_type_for_stmt): Convert return type from tree to
5121 opt_tree, converting dump_printf_loc calls and using stmt location.
5122 * tree-vectorizer.c: Include "opt-problem.h.
5123 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
5124 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
5125 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
5126 enabled, use it to report at the top level "couldn't vectorize
5127 loop" followed by the problem.
5128 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5129 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5131 (vect_analyze_stmt): Likewise.
5132 (vect_get_vector_types_for_stmt): Likewise.
5133 (tree vect_get_mask_type_for_stmt): Likewise.
5134 (vect_analyze_data_ref_dependences): Likewise.
5135 (vect_enhance_data_refs_alignment): Likewise.
5136 (vect_analyze_data_refs_alignment): Likewise.
5137 (vect_verify_datarefs_alignment): Likewise.
5138 (vect_analyze_data_ref_accesses): Likewise.
5139 (vect_prune_runtime_alias_test_list): Likewise.
5140 (vect_find_stmt_data_reference): Likewise.
5141 (vect_analyze_data_refs): Likewise.
5142 (vect_analyze_loop): Convert return type from loop_vec_info to
5144 (vect_analyze_loop_form): Likewise.
5145 (vect_analyze_slp): Convert return type from bool to opt_result.
5147 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5149 * doc/invoke.texi (-fopt-info): Document new "internals"
5151 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
5152 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
5154 (optinfo_verbosity_options): Add "internals".
5155 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
5156 (dump_context::apply_dump_filter_p): New member function.
5157 (dump_context::dump_loc): Use apply_dump_filter_p rather than
5158 explicitly masking the dump_kind.
5159 (dump_context::begin_scope): Increment the scope depth first. Use
5160 apply_dump_filter_p rather than explicitly masking the dump_kind.
5161 (dump_context::emit_item): Use apply_dump_filter_p rather than
5162 explicitly masking the dump_kind.
5163 (dump_dec): Likewise.
5164 (dump_hex): Likewise.
5165 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
5166 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
5167 (opt_info_switch_p): Update handling of default
5168 MSG_OPTIMIZED_LOCATIONS to cope with default of
5169 MSG_PRIORITY_USER_FACING.
5170 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5171 masking the dump_kind.
5172 (selftest::test_capture_of_dump_calls): Update test_dump_context
5173 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5174 than MSG_ALL. Generalize scope test to be run at all four
5175 combinations of with/without MSG_PRIORITY_USER_FACING and
5176 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5177 for each of the two values.
5178 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5179 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
5180 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5181 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5182 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5183 with MSG_PRIORITY_*.
5184 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5185 dump messages as MSG_PRIORITY_USER_FACING.
5186 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5187 about the interaction with MSG_PRIORITY_*.
5189 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
5191 * varasm.c (output_constant): Add new parameter merge_strings.
5192 Make strings properly zero terminated in merge string sections.
5193 (mergeable_string_section): Don't fail if the last char is non-zero.
5194 (assemble_variable_contents): Handle merge string sections.
5195 (assemble_variable): Likewise.
5196 (assemble_constant_contents): Likewise.
5197 (output_constant_def_contents): Likewise.
5198 (output_constructor_array_range,
5199 output_constructor_regular_field): Adjust call to output_constant.
5200 (output_object_block): Adjust call to assemble_constant_contents
5201 and assemble_variable_contents.
5203 2018-10-04 Martin Liska <mliska@suse.cz>
5206 * cgraphunit.c (process_function_and_variable_attributes):
5207 Warn about a function with alias attribute and a body.
5209 2018-10-04 Martin Liska <mliska@suse.cz>
5212 * multiple_target.c (redirect_to_specific_clone): New function.
5213 (ipa_target_clone): Use it.
5214 * tree-inline.c: Fix comment.
5216 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5218 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5220 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5221 (gcc::dump_manager::register_pass): New member function, adapted
5222 from loop body in gcc::pass_manager::register_pass, adding a
5223 call to update_dfi_for_opt_info.
5224 (gcc::dump_manager::opt_info_enable_passes): Store the
5225 -fopt-info options into the new fields. Move the loop
5227 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5229 * dumpfile.h (struct opt_pass): New forward decl.
5230 (gcc::dump_manager::register_pass): New decl.
5231 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5232 (class gcc::dump_manager): Add fields "m_optgroup_flags",
5233 "m_optinfo_flags", and "m_optinfo_filename".
5234 * passes.c (gcc::pass_manager::register_pass): Move all of the
5235 dump-handling code to gcc::dump_manager::register_pass.
5237 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
5239 PR rtl-optimization/87466
5240 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5241 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5242 * doc/tm.texi: Regenerate.
5243 * ira-lives.c (process_bb_node_lives): Use the new target hook.
5244 * lra-lives.c (process_bb_lives): Likewise.
5245 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5248 2018-10-04 Tamar Christina <tamar.christina@arm.com>
5250 * params.c (add_params): Fix initialization.
5252 2018-10-04 Martin Liska <mliska@suse.cz>
5254 PR gcov-profile/84107
5255 * tree-profile.c (init_ic_make_global_vars):
5256 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5257 Come up with new ic_tuple* variables. Emit
5258 __gcov_indirect_call{,_topn} variables.
5259 (gimple_gen_ic_profiler): Access the variable
5261 (gimple_gen_ic_func_profiler): Access
5262 __gcov_indirect_call.callee field.
5263 (gimple_init_gcov_profiler): Use ptr_type_node.
5264 * value-prof.c (gimple_ic): Use ptr_type_node.
5266 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5268 PR tree-optimization/85787
5269 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5270 malloc_candidate_p into this function and add support for
5271 detecting multiple phis.
5272 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5274 2018-10-04 Martin Liska <mliska@suse.cz>
5277 * ipa-inline.c (inline_to_all_callers_1):
5278 Call ultimate_alias_target for node being inlined.
5280 2018-10-03 Jeff Law <law@redhat.com>
5282 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5284 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5285 * tree.h (get_typenode_from_name): Prototype.
5287 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5289 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5290 Change operand 2 predicate to nonimmediate_operand.
5291 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5293 2018-10-03 Martin Sebor <msebor@redhat.com>
5294 Jeff Law <law@redhat.com>
5296 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5298 (get_string_length): Detect unterminated arrays.
5299 (format_string): Same.
5300 (format_directive): Warn about unterminated arrays.
5301 (handle_gimple_call): Mark statements with no_warning as needed.
5303 2018-10-03 Jim Wilson <jimw@sifive.com>
5305 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5306 also define __riscv_abi_rve. Delete trailing white space.
5308 2018-10-03 Paul Koning <ni1d@arrl.net>
5310 Enable LRA register allocator for PDP11.
5311 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5314 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5315 * config/pdp11/pdp11.opt (-mlra): New option.
5316 * doc/invoke.texi (PDP-11 Options): Document -mlra.
5318 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5320 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5321 (*<absneg:code>extend<mode>xf2): Ditto.
5323 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5325 PR tree-optimization/87415
5326 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5329 2018-10-02 Jeff Law <law@redhat.com>
5331 * gimple-fold.c (get_range_strlen): Only set *nonstr when
5332 an unterminated string is discovered. Bubble up range
5333 even for unterminated strings.
5334 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5335 indicates the string was not terminated via NONSTR.
5337 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5339 * tree-vrp.c (extract_range_from_unary_expr): Special case all
5340 pointer conversions.
5341 Do not do anything special for anti-ranges.
5343 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
5345 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5346 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5348 2018-10-03 Martin Liska <mliska@suse.cz>
5350 PR gcov-profile/86109
5351 * coverage.c (coverage_begin_function): Do not
5352 mark lambdas as artificial.
5353 * tree-core.h (struct GTY): Remove tm_clone_flag
5354 and introduce new lambda_function.
5355 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5357 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5360 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5361 P8_VECTOR and VSX are enabled.
5363 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5365 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5366 0x3907 as CPU model number.
5368 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5370 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5371 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5372 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5373 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5374 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5375 * config/s390/s390.md: Likewise. Rename also the cpu attribute
5376 value from arch12 to z14.
5378 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5380 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5382 (isinf<mode>2): Ditto.
5384 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5386 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5387 before emitting fxam. Perform calculations in XFmode.
5389 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5391 * match.pd (((X /[ex] A) +- B) * A): New transformation.
5393 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5396 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5397 * tree.c (signed_or_unsigned_type_for): Handle complex.
5399 2018-10-02 Jeff Law <law@redhat.com>
5401 * gimple-fold.c (get_range_strlen): Remove dead code.
5403 2018-10-02 Martin Sebor <msebor@redhat.com>
5404 Jeff Law <law@redhat.com>
5406 * builtins.c (unterminated_array): Add new arguments.
5407 If argument is not terminated, bubble up size and exact
5409 (expand_builtin_strnlen): Detect, avoid expanding
5410 and diagnose unterminated arrays.
5411 (c_strlen): Fill in offset of start of unterminated strings.
5412 * builtins.h (unterminated_array): Update prototype.
5414 2018-10-02 Richard Biener <rguenther@suse.de>
5416 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5417 of haddv4df, first reduce to SSE width and exploit the fact
5418 that we only need element zero with the reduction result.
5419 (reduc_plus_scal_v2df): Likewise.
5421 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5423 * dojump.h (do_jump): Delete.
5424 (do_jump_1): Likewise.
5425 (split_comparison): Move around.
5426 * dojump.c (do_jump): Make static.
5427 (do_jump_1): Likewise.
5428 (jumpifnot): Move around.
5429 (jumpifnot_1): Likewise.
5431 (jumpif_1): Likewise.
5432 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5434 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5436 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5437 insns in the delay slot and add_insn_after for the jump insn.
5439 2018-10-02 Richard Biener <rguenther@suse.de>
5441 * tree-inline.c (expand_call_inline): Use the location of
5442 the callee declaration for the inline-entry marker.
5443 * final.c (notice_source_line): Remove special-casing of
5444 NOTE_INSN_INLINE_ENTRY.
5446 2018-10-01 Carl Love <cel@us.ibm.com>
5449 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5450 (__builtin_mtfsb0): New.
5451 (__builtin_mtfsb1): New.
5452 ( __builtin_set_fpscr_rn): New.
5453 (__builtin_set_fpscr_drn): New.
5454 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5455 (rs6000_expand_set_fpscr_rn_builtin): Add.
5456 (rs6000_expand_set_fpscr_drn_builtin): Add.
5457 (rs6000_expand_builtin): Add case statement entries for
5458 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5459 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5460 RS6000_BUILTIN_MFFSL.
5461 (rs6000_init_builtins): Add ftype initialization and def_builtin
5462 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5463 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5464 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5465 rs6000_mffscdrn): Add define_insn.
5466 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5467 * doc/extend.texi: Add documentation for the builtins.
5469 2018-10-01 Richard Biener <rguenther@suse.de>
5471 PR tree-optimization/87465
5472 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5473 causing branch miscounts.
5475 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5477 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5478 aarch64_option_default_param): New.
5479 (params.h): Include.
5480 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5481 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5482 stack-clash protection validation code.
5484 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5486 * params.c (validate_param): New.
5487 (add_params): Use it.
5488 (set_param_value): Refactor param validation into validate_param.
5489 (diagnostic.h): Include.
5490 * diagnostic.h (diagnostic_ready_p): New.
5492 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5494 * params.c (set_param_value):
5495 Add index of parameter being validated.
5496 * common/common-target.def (option_validate_param): New.
5497 * common/common-targhooks.h (default_option_validate_param): New.
5498 * common/common-targhooks.c (default_option_validate_param): New.
5499 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5500 * doc/tm.texi: Regenerate.
5502 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5505 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5506 Add validation for stack-clash parameters and set defaults.
5508 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5511 * configure.ac: Add stack-clash-protection-guard-size.
5512 * doc/install.texi: Document it.
5513 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5514 * params.def: Update comment for guard-size.
5515 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5516 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5517 * configure: Regenerate.
5519 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5522 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5523 STACK_DYNAMIC_OFFSET): New.
5524 * config/aarch64/aarch64.c (aarch64_layout_frame):
5525 Update outgoing args size.
5526 (aarch64_stack_clash_protection_alloca_probe_range,
5527 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5529 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5532 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5534 * target.def (stack_clash_protection_alloca_probe_range): New.
5535 (stack_clash_protection_final_dynamic_probe): Remove.
5536 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5537 (default_stack_clash_protection_final_dynamic_probe): Remove.
5538 * targhooks.c: Likewise.
5539 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5540 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5541 * doc/tm.texi: Regenerate.
5543 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5546 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5547 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5548 aarch64_clamp_to_uimm12_shift): New.
5549 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5550 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5552 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5555 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5557 2018-10-01 Jeff Law <law@redhat.com>
5558 Richard Sandiford <richard.sandiford@linaro.org>
5559 Tamar Christina <tamar.christina@arm.com>
5562 * config/aarch64/aarch64.md
5563 (probe_stack_range): Add k (SP) constraint.
5564 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5565 STACK_CLASH_MAX_UNROLL_PAGES): New.
5566 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5567 stack probes for stack clash.
5568 (aarch64_allocate_and_probe_stack_space): New.
5569 (aarch64_expand_prologue): Use it.
5570 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5571 (aarch64_sub_sp): Add emit_move_imm optional param.
5573 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
5575 PR tree-optimization/87261
5576 * match.pd: Remove trailing whitespace.
5577 Add (x & y) | ~(x | y) -> ~(x ^ y),
5578 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5580 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5582 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5584 (ashlsi3_insn): Update instruction constraints.
5585 (ashrsi3_insn): Likewise.
5586 (rotrsi3): Likewise.
5587 (add_shift): Likewise.
5588 * config/arc/constraints.md (Csz): New 32 bit constraint. It
5589 avoids placing in the limm field small constants which, otherwise,
5590 could end into a small instruction.
5592 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5594 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5595 destination register is not odd-even.
5596 (umaddsidi4_split): Likewise.
5598 2018-10-01 Richard Biener <rguenther@suse.de>
5600 * tree-inline.c (expand_call_inline): Store origin of fn
5601 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5602 * tree.c (block_ultimate_origin): Simplify and do some
5605 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
5607 * config/i386/mmx.md (EMMS): New int iterator.
5608 (emms): New int attribute.
5609 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5610 EMMS int iterator. Explicitly declare clobbers.
5611 (mmx_emms): Remove expander.
5613 * config/i386/predicates.md (emms_operation): Remove predicate.
5614 (vzeroall_pattern): New predicate.
5615 (vzeroupper_pattern): Rename from vzeroupper_operation.
5616 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5617 vzeroupper_pattern and vzeroall_pattern predicates.
5619 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
5621 PR rtl-optimization/86939
5622 * ira-lives.c (make_hard_regno_born): Rename from this...
5623 (make_hard_regno_live): ... to this. Remove update to conflict
5624 information. Update function comment.
5625 (make_hard_regno_dead): Add conflict information update. Update
5627 (make_object_born): Rename from this...
5628 (make_object_live): ... to this. Remove update to conflict information.
5629 Update function comment.
5630 (make_object_dead): Add conflict information update. Update function
5632 (mark_pseudo_regno_live): Call make_object_live.
5633 (mark_pseudo_regno_subword_live): Likewise.
5634 (mark_hard_reg_dead): Update function comment.
5635 (mark_hard_reg_live): Call make_hard_regno_live.
5636 (process_bb_node_lives): Likewise.
5637 * lra-lives.c (make_hard_regno_born): Rename from this...
5638 (make_hard_regno_live): ... to this. Remove update to conflict
5639 information. Remove now uneeded check_pic_pseudo_p argument.
5640 Update function comment.
5641 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5642 to conflict information. Update function comment.
5643 (mark_pseudo_live): Remove update to conflict information. Update
5645 (mark_pseudo_dead): Add conflict information update.
5646 (mark_regno_live): Call make_hard_regno_live.
5647 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5648 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5650 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
5653 * config/i386/i386.c (construct_container): Use TImode for
5654 BLKmode values in 2 integer registers.
5656 2018-09-29 Jeff Law <law@redhat.com>
5658 * builtins.c (unterminated_array): Pass in c_strlen_data * to
5659 c_strlen rather than just a tree *.
5660 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5661 Update recursive calls appropriately. If caller did not provide a
5662 suitable data pointer, create a local one. When a non-terminated
5663 string is discovered, bubble up information about the string via the
5664 c_strlen_data object.
5665 * builtins.h (c_strlen): Update prototype.
5666 (c_strlen_data): New structure.
5667 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5668 For a type 2 call, if c_strlen indicates a non-terminated string
5669 use the length of the non-terminated string.
5670 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5672 2018-09-29 Jakub Jelinek <jakub@redhat.com>
5675 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5676 __m512d type for __A argument rather than __m512.
5678 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
5680 * match.pd (simple_comparison): Don't optimize if either operand is
5681 a function pointer when target needs function pointer canonicalization.
5683 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5685 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5686 power5 .. power9 to remove indirection.
5687 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5688 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5689 ASM_CPU_476_SPEC): Delete.
5690 (ASM_CPU_SPEC): Adjust.
5691 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5692 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5694 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5696 * config.in: Delete HAVE_AS_DCI.
5697 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5698 * config/rs6000/rs6000.h: Ditto.
5699 * configure.ac: Delete HAVE_AS_DCI.
5700 * configure: Regenerate.
5702 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5704 * config.in (HAVE_AS_LWSYNC): Delete.
5705 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5706 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5708 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5709 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5711 * configure.ac: Delete HAVE_AS_LWSYNC.
5712 * configure: Regenerate.
5714 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5715 Pierre-Marie de Rodat <derodat@adacore.com>
5717 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5718 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5719 (cgraph_node::create_thunk): Add indirect_offset parameter.
5720 (thunk_adjust): Likewise.
5721 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5722 and initialize the corresponding field with it.
5723 (cgraph_node::dump): Dump indirect_offset field.
5724 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5725 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5726 (thunk_adjust): Add indirect_offset parameter and deal with it.
5727 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5728 pass it to thunk_adjust. Do not call the target hook if it's non-zero
5729 or if the thunk is external or local. Fix formatting. Do not chain
5730 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
5731 if any, in the GIMPLE representation.
5732 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5733 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5734 (input_node): Read indirect_offset field.
5735 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5736 call to thunk_adjust.
5737 * tree-nested.c (struct nesting_info): Add thunk_p field.
5738 (create_nesting_tree): Set it.
5739 (convert_all_function_calls): Copy static chain from targets to thunks.
5740 (finalize_nesting_tree_1): Return early for thunks.
5741 (unnest_nesting_tree_1): Do not finalize thunks.
5742 (gimplify_all_functions): Do not gimplify thunks.
5744 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5746 * opt-suggestions.c (option_proposer::build_option_suggestions):
5747 Release "option_values".
5749 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5751 * coverage.c (get_coverage_counts): Convert problem-reporting dump
5752 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5753 * dumpfile.c (kind_as_string): New function.
5754 (dump_loc): Rather than a hardcoded prefix of "note: ", use
5755 kind_as_string to vary the prefix based on dump_kind.
5756 (selftest::test_capture_of_dump_calls): Update for above.
5758 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5760 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5761 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
5763 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5765 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5766 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5767 INVALID_REGNUM instead of FPSR_REG.
5768 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5769 * config/i386/i386.md: Update comment of FP compares.
5770 (fldenv): Do not clobber FPSR_REG.
5772 2018-09-28 Richard Biener <rguenther@suse.de>
5774 * tree.h (BLOCK_ORIGIN): New.
5775 * omp-expand.c (grid_expand_target_grid_body): Assign
5776 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5777 * tree-inline.c (remap_block): Likewise.
5778 * auto-profile.c (get_function_decl_from_block): Simplify
5779 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5780 * langhooks.c (lhd_print_error_function): Likewise.
5781 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5783 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5784 * tree.c (block_nonartificial_location): Likewise.
5785 (block_ultimate_origin): Likewise.
5786 * tree-pretty-print.c (percent_K_format): Likewise. Remove
5787 no longer needed LTO case.
5789 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
5790 Jan Hubicka <jh@suse.cz>
5791 Martin Jambor <mjambor@suse.cz>
5793 * simplify-rtx.c (simplify_merge_mask): New function.
5794 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5795 same masks are used in op1 or op2.
5796 (test_vec_merge): New function.
5797 (test_vector_ops): Call test_vec_merge.
5799 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5801 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5802 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5803 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5804 (cypress_costs): Set it.
5805 (supersparc_costs): Likewise.
5806 (hypersparc_costs): Likewise.
5807 (leon_cost): Likewise.
5808 (leon3_costs): Likewise.
5809 (sparclet_costs): Likewise.
5810 (ultrasparc_costs): Likewise.
5811 (ultrasparc_costs): Likewise.
5812 (niagara_costs): Likewise.
5813 (niagara2_costs): Likewise.
5814 (niagara3_costs): Likewise.
5815 (niagara4_costs): Likewise.
5816 (niagara7_costs): Likewise.
5817 (m8_costs): Likewise.
5818 (TARGET_CAN_FOLLOW_JUMP): Define.
5819 (pass_work_around_errata::gate): Minor tweak.
5820 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5821 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5822 Automaitcally clear MASK_FSMULD mask for V7 processors.
5823 (sparc_can_follow_jump): New static function.
5824 (output_ubranch): Deal with CROSSING_JUMP_P.
5825 (sparc_use_sched_lookahead): Rewrite using switch statement.
5826 (sparc_issue_rate): Reorder.
5827 (sparc_branch_cost): New function.
5829 2018-09-27 Martin Sebor <msebor@redhat.com>
5831 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5832 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5833 (int_fits_type_p): Same.
5835 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
5837 * config/i386/i386.md (FPCR_REG): Remove.
5838 (UNSPEC_FLDCW): Remove.
5839 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5840 (x86_fldcw_1): Remove insn pattern.
5841 (fnstenv): Do not clobber FPCR_REG.
5843 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5844 (CALL_USED_REGISTERS): Ditto.
5845 (REG_ALLOC_ORDER): Ditto.
5846 (REG_CLASS_CONTENTS): Ditto.
5847 (HI_REGISTER_NAMES): Ditto.
5848 (ADDITIONAL_REGISTER_NAMES): Use defines instead
5849 of numerical constants.
5850 * config/i386/i386.c (regclass_map): Remove fpsr register.
5851 (dbx_register_map): Ditto.
5852 (dbx64_register_map): Ditto.
5853 (svr4_dbx_register_map): Ditto.
5854 (print_reg): Do not handle FPCR_REG.
5856 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
5859 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5860 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5861 Delete, always treat as true.
5862 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5863 Ditto. Simplify remaining code.
5864 * config/powerpcspe/powerpcspe.h: Ditto.
5865 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5866 Simplify remaining code.
5867 (rs6000_expand_builtin): Ditto.
5868 * config/rs6000/rs6000.h: Ditto.
5869 * configure.ac: Ditto.
5870 * configure: Regenerate.
5872 2018-09-27 Martin Liska <mliska@suse.cz>
5874 * coverage.c (get_coverage_counts): Revert the formatting
5875 of missing profile opt info.
5877 2018-09-27 Richard Biener <rguenther@suse.de>
5881 * dwarf2out.c (set_block_origin_self): Do not mark outermost
5882 block as we do not output that.
5883 (gen_inlined_subroutine_die): Elide the originally outermost
5884 block, matching what we do for concrete instances.
5885 (decls_for_scope): Add parameter specifying whether to recurse
5888 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
5889 Tom de Vries <tom@codesourcery.com>
5893 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5894 STORE_FLAG_VALUE == 1.
5896 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
5898 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5899 constant definitions.
5900 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5901 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5902 ("speculation_barrier"): New expander definition.
5904 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
5906 PR gcov-profile/86957
5907 * common.opt: New warning option -Wmissing-profile.
5908 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5909 * doc/invoke.texi: Document -Wmissing-profile.
5911 2018-09-26 Jim Wilson <jimw@sifive.com>
5913 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5914 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5916 2018-09-26 Martin Sebor <msebor@redhat.com>
5918 * tree.c (zerop): Change return type to bool.
5919 (integer_zerop, integer_onep, integer_each_onep): Same.
5920 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5921 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5922 (real_onep, real_minus_onep, chain_index): Same.
5923 (print_type_hash_statistics, type_list_equal): Same.
5924 * tree.h (zerop): Same.
5925 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5926 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5927 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5928 (real_onep, real_minus_onep, chain_index): Same.
5929 (print_type_hash_statistics, type_list_equal): Same.
5931 2018-09-26 Jim Wilson <jimw@sifive.com>
5933 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5935 2018-09-26 Jakub Jelinek <jakub@redhat.com>
5938 * config/i386/i386.c: Include debug.h and dwarf2out.h.
5939 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5942 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
5944 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5946 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5948 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5949 and FP_SECOND_SSE_REGS.
5950 (REG_CLASS_NAMES): Ditto.
5951 (REG_CLASS_CONTENTS): Ditto.
5952 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5953 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5954 (ix86_preferred_output_reload_class): Ditto.
5955 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5956 clobber constraint to "=&f".
5957 (fix_truncdi_i387): Ditto.
5958 (lrintxfdi2): Ditto.
5959 (fistdi2_<rounding>): Ditto.
5960 (fpremxf4_i387): Change "=u" constraint to "=f".
5961 (fprem1xf4_i387): Ditto.
5963 (fptanxf4_i387): Ditto.
5964 (fxtractxf3_i387): Ditto.
5965 (fscalexf4_i387): Ditto.
5966 (atan2xf3): Change "u" constraint to "f".
5967 (fyl2xxf3_i387): Ditto.
5968 (fyl2xp1xf3_i387): Ditto.
5970 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5973 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5974 for removed I387_MASK_PM entity.
5977 2018-09-26 Jeff Law <law@redhat.com>
5979 2018-09-26 Alexey Neyman <stilor@att.net>
5981 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5982 headers are no longer pulled in by <isl/val.h>.
5984 2018-09-26 Richard Biener <rguenther@suse.de>
5987 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5988 or concrete instance DIE to the tree. Create abstract origin
5989 attributes also for concrete instances.
5991 2018-09-26 Alexey Neyman <stilor@att.net>
5993 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5994 headers are no longer pulled in by <isl/val.h>.
5996 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
5998 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5999 Use new helper functions.
6000 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
6001 Use new helper functions.
6002 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
6003 aarch_mm_needs_release): New declarations.
6004 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
6005 aarch_mm_needs_release): New.
6007 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
6009 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
6010 (arm32_output_mi_thunk): Deal with long calls.
6012 2018-09-26 Richard Biener <rguenther@suse.de>
6016 * tree-inline.c (expand_call_inline): When the location
6017 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
6018 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
6019 the inserted BLOCK to make inlined_function_outer_scope_p
6021 * dwarf2out.c (add_call_src_coords_attributes): Do not add
6022 coords for reserved locations.
6024 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6026 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
6027 (*call_indirect_nonlocal_sysv<mode>): Ditto.
6028 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
6029 (*sibcall_nonlocal_sysv<mode>): Ditto.
6030 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
6031 (<bd>_<mode>): Ditto.
6032 (<bd>tf_<mode>): Ditto.
6034 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6036 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
6037 control string as a list of templates instead of as C code.
6038 (*altivec_movti): Ditto.
6039 * config/rs6000/darwin.md (movdf_low_di): Ditto.
6041 2018-09-25 Jim Wilson <jimw@sifive.com>
6043 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
6044 when target symbol is weak.
6046 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6049 * builtins.c (unterminated_array): Simplify.
6050 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
6051 where pointer arithmetic is safe.
6053 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6056 * config/rs6000/altivec.md (altivec_vspltb): Use
6057 const_0_to_15_operand instead of u5bit_cint_operand.
6058 (*altivec_vspltb_internal): Ditto.
6059 (altivec_vspltb_direct): Ditto.
6060 (altivec_vsplth): Use const_0_to_7_operand instead of
6062 (*altivec_vsplth_internal): Ditto.
6063 (altivec_vsplth_direct): Ditto.
6064 (altivec_vspltw): Use const_0_to_3_operand instead of
6066 (*altivec_vspltw_internal): Ditto.
6067 (altivec_vspltw_direct): Ditto.
6068 (altivec_vspltsf): Ditto.
6069 (*altivec_vspltsf_internal): Ditto.
6070 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
6071 various splats with the proper size immediate. Reorder the various
6072 cases by ascending size of immediate, and put all such together.
6074 2018-09-25 Richard Biener <rguenther@suse.de>
6077 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
6079 (maybe_create_die_with_external_ref): Do not create
6080 DW_TAG_imported_unit here.
6081 (add_abstract_origin_attribute): Handle external BLOCK refs.
6082 (dwarf2out_abstract_function): Simplify LTO case.
6083 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
6084 rather than using maybe_create_die_with_external_ref.
6086 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
6089 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
6090 (frndintxf2_mask_pm_i387): Ditto.
6091 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
6092 Enable for !flag_trapping_math.
6093 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
6094 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
6095 Change operand 1 predicate to nonimmediate_operand.
6096 (attr "i387_cw"): Remove mask_pm.
6097 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
6098 (enum ix86_entity): Remove I387_MASK_PM.
6099 * config/i386/i386.c (ix86_i387_mode_needed): Do not
6100 handle I387_MASK_PM.
6101 (ix86_mode_needed): Ditto.
6102 (ix86_mode_after): Ditto.
6103 (ix86_mode_entry): Ditto.
6104 (ix86_mode_exit): Ditto.
6105 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
6107 2018-09-25 Jakub Jelinek <jakub@redhat.com>
6109 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
6110 to_update_switch_stmts to vNULL instead of calling create on them
6113 2018-09-25 Richard Biener <rguenther@suse.de>
6115 PR tree-optimization/87402
6116 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
6117 (visit_phi): Re-instantiate handling of supposed to be VARYING
6118 but non-VARYING backedge value.
6120 2018-09-25 Richard Biener <rguenther@suse.de>
6123 * dwarf2out.c (struct sym_off_pair): New.
6124 (external_die_map): New global.
6125 (lookup_decl_die): When in LTO create DIEs lazily from the
6127 (lookup_block_die): New function, create DIEs lazily in LTO.
6128 (equate_block_to_die): New function.
6129 (dwarf2out_die_ref_for_decl): During WPA get the association
6130 from the external DIE map.
6131 (dwarf2out_register_external_die): Record mapping into the
6133 (maybe_create_die_with_external_ref): New function split out from
6134 DIE generation part of old dwarf2out_register_external_die.
6135 (add_abstract_origin_attribute): Do not return the DIE. When
6136 in LTO reference externals directly.
6137 (dwarf2out_abstract_function): When in LTO ignore calls for
6138 decls with external DIEs (already present abstract instances).
6139 (gen_call_site_die): Adjust.
6140 (add_high_low_attributes): Likewise.
6141 (gen_lexical_block_die): Likewise.
6142 (gen_inlined_subroutine_die): Likewie.
6143 (gen_block_die): Likewise.
6144 (dwarf2out_inline_entry): Likewise.
6145 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
6148 2018-09-25 Martin Liska <mliska@suse.cz>
6150 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
6151 integers and not by a float value.
6153 2018-09-25 Martin Liska <mliska@suse.cz>
6156 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
6158 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
6159 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
6160 * godump.c (go_format_type): Remove extra parenthesis.
6162 2018-09-25 Martin Liska <mliska@suse.cz>
6164 * alias.c (set_dest_equal_p): Remove unused function.
6165 * config/i386/i386.c (def_builtin_pure2): Likewise.
6166 * diagnostic-show-locus.c (class layout): Remove
6168 (layout::layout): Likewise here.
6169 * dump-context.h (class temp_dump_context): Likewise.
6170 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6171 (add_AT_loclistsptr): Likewise.
6172 (add_AT_offset): Likewise.
6173 (get_AT_hi_pc): Likewise.
6174 (is_comdat_die): Likewise.
6175 (type_is_enum): Likewise.
6176 (ceiling): Likewise.
6177 (add_AT_vms_delta): Likewise.
6178 (is_class_die): Likewise.
6179 * edit-context.c (class line_event): Remove unused field.
6180 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6182 * ipa-cp.c (ipa_get_vr_lat): Likewise.
6183 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6184 (ok_for_base_p_nonstrict): Likewise.
6185 * tree-chrec.c (is_not_constant_evolution): Likewise.
6186 (chrec_fold_poly_cst): Likewise.
6187 * tree-if-conv.c (has_pred_critical_p): Likewise.
6188 * tree-ssa-coalesce.c (print_exprs): Likewise.
6189 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6190 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6191 * tree-vrp.c (value_ranges_intersect_p): Likewise.
6192 (value_range_nonnegative_p): Likewise.
6194 2018-09-25 Martin Liska <mliska@suse.cz>
6196 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6197 Do not handle "GNU Pascal".
6198 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6200 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6201 from documentation. Likewise.
6202 * dbxout.c (dbxout_range_type): Likewise.
6203 * doc/cpp.texi: Likewise.
6204 * doc/extend.texi: Likewise.
6205 * doc/frontends.texi: Likewise.
6206 * doc/invoke.texi: Remove Pascal entry.
6207 * tree.def (CLEANUP_POINT_EXPR): Likewise.
6208 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6210 2018-09-25 Martin Liska <mliska@suse.cz>
6213 * doc/invoke.texi: Document all parameters and remove default
6216 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
6219 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6220 contains HOST_WIDE_INTs when computing its size.
6222 2018-09-24 Jim Wilson <jimw@sifive.com>
6225 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6227 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6229 2018-09-24 Andrew Pinski <apinski@marvell.com>
6231 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6232 access prev before checking it for NULLness in the
6233 AARCH64_FUSE_CMP_BRANCH case.
6235 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
6238 * config/i386/i386.c (rest_of_insert_endbranch): Set
6239 endbr_queued_at_entrance to true and don't insert ENDBR if
6240 x86_function_profiler will be called.
6241 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6243 * config/i386/i386.h (machine_function): Add
6244 endbr_queued_at_entrance.
6246 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6248 * genattrtab.c (mk_attr_alt): Use alternative_mask.
6249 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6251 (check_attr_test): Use alternative_mask.
6252 (get_attr_value): Likewise.
6253 (compute_alternative_mask): Use alternative_mask and XWINT.
6254 (make_alternative_compare): Use alternative_mask.
6255 (attr_alt_subset_p): Use XWINT.
6256 (attr_alt_subset_of_compl_p): Likewise.
6257 (attr_alt_intersection): Use alternative_mask and XWINT.
6258 (attr_alt_union): Likewise.
6259 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6260 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6261 (simplify_test_exp): Use alternative_mask and XWINT.
6262 (write_test_expr): Use alternative_mask and XWINT, adjust bit
6263 number calculation to support 64 bits. Generate code that
6264 checks 64-bit masks.
6265 (main): Use alternative_mask.
6266 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6268 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6271 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6272 RETURN+USE when returning via %r14.
6274 2018-09-24 Martin Liska <mliska@suse.cz>
6276 * gcov.c (output_lines): Print colorization legend
6277 for both flag_use_colors and flag_use_hotness_colors.
6280 2018-09-24 Martin Liska <mliska@suse.cz>
6282 * coverage.c (get_coverage_counts): Use warning_at
6283 with current_function_decl location. Use %qD in warning
6286 2018-09-24 Martin Liska <mliska@suse.cz>
6288 * memory-block.h (memory_block_pool::release): Annotate with
6289 valgrind that the memory is not accessible.
6291 2018-09-24 Martin Liska <mliska@suse.cz>
6294 * asan.c: Make asan_handled_variables extern.
6296 * cfgexpand.c (expand_stack_vars): Make sure
6297 a representative is unpoison if another
6298 variable in the partition is handled by
6299 use-after-scope sanitization.
6301 2018-09-24 Richard Biener <rguenther@suse.de>
6303 PR tree-optimization/63155
6304 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6305 the worklist when the edge of the respective argument isn't
6308 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6310 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6311 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6312 (MASK_CLASS_P): Update for rename.
6313 (MAYBE_MASK_CLASS_P): Ditto.
6314 (REG_CLASS_NAMES): Update.
6315 (REG_CLASS_CONTENT): Update.
6316 * config/i386/i386.c (regclass_map): Update for MASK_REG
6317 and ALL_MASK_REGS rename.
6318 * config/i386/constraints.md (Yk): Update for rename.
6321 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6323 * config/i386/i386.h (enum reg_class): Remove
6324 EVEX_SSE_REGS and MOD4_SSE_REGS.
6325 (REG_CLASS_NAMES): Update.
6326 (REG_CLASS_CONTENT): Update.
6327 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6328 registers as ALL_SSE_REGS.
6329 (ix86_additional_allocno_class_p): Remove.
6330 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6331 (ix86_register_priority): Lower priority of EVEX SSE registers.
6332 Use IN_RANGE macro where appropriate.
6333 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6334 AVX-5124VNNIW checks.
6335 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6336 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6337 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6338 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6339 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6340 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6341 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6342 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6343 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6344 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6345 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6346 * config/i386/constraints.md (Yh): Remove.
6348 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6350 * config/i386/i386.c (regclass_map): Declare integer REX registers
6353 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
6355 * doc/service.texi (Service): Switch the fsf.org link to https.
6357 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
6360 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6361 Define to speculation_safe_value_not_needed.
6363 2018-09-21 Florian Weimer <fweimer@redhat.com>
6366 * doc/extend.texi (Common Function Attributes): Mention that
6367 noreturn suppresses tail call optimization.
6369 2018-09-21 Jeff Law <law@redhat.com>
6371 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6372 vr_values::cleanup_edges_and_switches.
6373 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6375 (identify_jump_threads): Remove EDGE_IGNORE handling.
6376 (execute_vrp): Move handling of to_remove_edges and
6377 to_update_switch_stmts into vr_values class member functions.
6378 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6379 (to_update_switch_stmts): Likewise.
6380 * vr-values.c: Include cfghooks.h.
6381 (vr_values::vr_values): Initialize to_remove_edges and
6382 to_update_switch_stmts.
6383 (vr_values::~vr_values): Verify to_remove_edges and
6384 to_update_switch_stmts are empty.
6385 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6386 (vr_values::cleanup_edges_and_switches): New member function.
6387 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6388 function. Add new data members.
6390 2018-09-21 David Malcolm <dmalcolm@redhat.com>
6392 PR tree-optimization/87309
6393 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6394 calls with pflags and alt_flags.
6395 (selftest::test_capture_of_dump_calls): Add test of interaction of
6396 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6398 2018-09-21 Olivier Hainque <hainque@adacore.com>
6400 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6402 2018-09-21 Olivier Hainque <hainque@adacore.com>
6404 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6406 2018-09-21 Olivier Hainque <hainque@adacore.com>
6408 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6409 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6410 (VXWORKS_LIBS_RTP): Minor reordering.
6412 2018-09-21 Olivier Hainque <hainque@adacore.com>
6414 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6415 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6417 2018-09-21 Olivier Hainque <hainque@adacore.com>
6419 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6420 (PTRDIFF_TYPE): Likewise.
6422 2018-09-21 Olivier Hainque <hainque@adacore.com>
6424 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6425 triplet, similar to support for VxWorks7.
6426 * config/vxworks-dummy.h: Provide a default definition
6427 of TARGET_VXWORKS64 to 0.
6429 2018-09-21 Olivier Hainque <hainque@adacore.com>
6431 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6432 * config/vxworks-dummy.h: here.
6434 2018-09-21 Olivier Hainque <hainque@adacore.com>
6436 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6438 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
6439 Bo Zhou <zbo.zhou@hisilicon.com>
6441 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6442 * config/aarch64/aarch64-tune.md: Regenerated.
6443 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6444 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6445 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6447 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
6448 Julian Brown <julian@codesourcery.com>
6450 * builtins.c (get_builtin_sync_mem): Handle address spaces.
6452 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6454 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6455 if the call takes a static chain.
6457 2018-09-21 Martin Liska <mliska@suse.cz>
6459 * auto-profile.c (autofdo_source_profile::read): Do not
6461 (read_profile): Do not add working sets.
6462 (read_autofdo_file): Remove sum_all.
6463 (afdo_callsite_hot_enough_for_early_inline): Remove const
6465 * coverage.c (struct counts_entry): Remove gcov_summary.
6466 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6467 do not support GCOV_TAG_PROGRAM_SUMMARY.
6468 (get_coverage_counts): Remove summary and expected
6470 * coverage.h (get_coverage_counts): Likewise.
6471 * doc/gcov-dump.texi: Remove -w option.
6472 * gcov-dump.c (dump_working_sets): Remove.
6473 (main): Do not support '-w' option.
6474 (print_usage): Likewise.
6475 (tag_summary): Likewise.
6476 * gcov-io.c (gcov_write_summary): Do not dump
6478 (gcov_read_summary): Likewise.
6479 (gcov_histo_index): Remove.
6480 (gcov_histogram_merge): Likewise.
6481 (compute_working_sets): Likewise.
6482 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6484 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6485 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6486 (GCOV_HISTOGRAM_SIZE): Remove.
6487 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6488 (struct gcov_summary): Simplify rapidly just
6489 to runs and sum_max fields.
6490 (gcov_histo_index): Remove.
6491 (NUM_GCOV_WORKING_SETS): Likewise.
6492 (compute_working_sets): Likewise.
6493 * gcov-tool.c (print_overlap_usage_message): Remove
6494 trailing empty line.
6495 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6496 (output_lines): Remove program related line.
6497 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6498 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6500 (input_profile_summary): Do not read it.
6501 (merge_profile_summaries): And do not merge it.
6502 (input_symtab): Do not call removed function.
6503 * modulo-sched.c (sms_schedule): Do not print sum_max.
6504 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6505 removed when histogram method was invented.
6506 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6508 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6510 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6511 and dump selected value.
6512 * profile.c (add_working_set): Remove.
6513 (get_working_sets): Likewise.
6514 (find_working_set): Likewise.
6515 (get_exec_counts): Do not work with working sets.
6516 (read_profile_edge_counts): Do not inform as sum_max is removed.
6517 (compute_branch_probabilities): Likewise.
6518 (compute_value_histograms): Remove argument for call of
6519 get_coverage_counts.
6520 * profile.h: Do not make gcov_summary const.
6522 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6524 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6526 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6528 PR tree-optimization/86990
6529 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6530 Check that the entire merged store group is made of constants only for
6533 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6535 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6536 (VTABLE_VERIFICATION_SPEC): Likewise.
6537 (SANITIZER_EARLY_SPEC): Likewise.
6538 (SANITIZER_SPEC): Likewise.
6539 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6540 * doc/invoke.texi (Link Options): Document -r.
6542 2018-09-20 Richard Biener <rguenther@suse.de>
6545 * gimplify.c (gimplify_expr): Retain alignment of
6546 addressable lvalue in dereference.
6548 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6551 * configure.ac: Check for .loc is_stmt support.
6552 * configure, config.in: Rebuilt.
6553 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6556 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6558 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6559 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6562 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6564 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6566 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6569 2018-09-20 Marek Polacek <polacek@redhat.com>
6571 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6573 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6575 PR tree-optimization/87288
6576 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6577 into account when determining PEELING_FOR_NITERS.
6579 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6581 PR tree-optimization/86877
6582 * tree-vect-loop.c (vect_analyze_loop_2): Call
6583 vect_verify_datarefs_alignment.
6585 2018-09-19 Marek Polacek <polacek@redhat.com>
6587 * doc/invoke.texi: Document -Wclass-conversion.
6589 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
6591 * config/pa/pa.c (pa_adjust_priority): Delete.
6592 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6594 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6595 (atomic_storehi): Likewise.
6596 (atomic_storesi): Likewise.
6597 (atomic_loaddi): Restore compare and swap exchange loop code.
6599 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
6601 PR rtl-optimization/86902
6602 * combine.c (try_combine): When changing the CC mode used, don't change
6603 an unrelated mode in other_insn to that new CC mode.
6605 2018-09-19 David Malcolm <dmalcolm@redhat.com>
6607 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6608 with %T in place of calls to dump_generic_expr.
6609 (prune_runtime_alias_test_list): Likewise.
6610 (create_runtime_alias_checks): Likewise.
6611 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6612 (vect_analyze_data_ref_dependence): Likewise.
6613 (vect_slp_analyze_data_ref_dependence): Likewise.
6614 (vect_record_base_alignment): Likewise. Use %G in place of call
6615 to dump_gimple_stmt.
6616 (vect_compute_data_ref_alignment): Likewise.
6617 (verify_data_ref_alignment): Likewise.
6618 (vect_find_same_alignment_drs): Likewise.
6619 (vect_analyze_group_access_1): Likewise.
6620 (vect_analyze_data_ref_accesses): Likewise.
6621 (dependence_distance_ge_vf): Likewise.
6622 (dump_lower_bound): Likewise.
6623 (vect_prune_runtime_alias_test_list): Likewise.
6624 (vect_find_stmt_data_reference): Likewise.
6625 (vect_analyze_data_refs): Likewise.
6626 (vect_create_addr_base_for_vector_ref): Likewise.
6627 (vect_create_data_ref_ptr): Likewise.
6628 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6629 (vect_can_advance_ivs_p): Likewise.
6630 (vect_update_ivs_after_vectorizer): Likewise.
6631 (vect_gen_prolog_loop_niters): Likewise.
6632 (vect_prepare_for_masked_peels): Likewise.
6633 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6634 (vect_determine_vectorization_factor): Likewise.
6635 (vect_is_simple_iv_evolution): Likewise.
6636 (vect_analyze_scalar_cycles_1): Likewise.
6637 (vect_analyze_loop_operations): Likewise.
6638 (report_vect_op): Likewise.
6639 (vect_is_slp_reduction): Likewise.
6640 (check_reduction_path): Likewise.
6641 (vect_is_simple_reduction): Likewise.
6642 (vect_create_epilog_for_reduction): Likewise.
6643 (vect_finalize_reduction:): Likewise.
6644 (vectorizable_induction): Likewise.
6645 (vect_transform_loop_stmt): Likewise.
6646 (vect_transform_loop): Likewise.
6647 (optimize_mask_stores): Likewise.
6648 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6649 (vect_split_statement): Likewise.
6650 (vect_recog_over_widening_pattern): Likewise.
6651 (vect_recog_average_pattern): Likewise.
6652 (vect_determine_min_output_precision_1): Likewise.
6653 (vect_determine_precisions_from_range): Likewise.
6654 (vect_determine_precisions_from_users): Likewise.
6655 (vect_mark_pattern_stmts): Likewise.
6656 (vect_pattern_recog_1): Likewise.
6657 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6658 (vect_record_max_nunits): Likewise.
6659 (vect_build_slp_tree_1): Likewise.
6660 (vect_build_slp_tree_2): Likewise.
6661 (vect_print_slp_tree): Likewise.
6662 (vect_analyze_slp_instance): Likewise.
6663 (vect_detect_hybrid_slp_stmts): Likewise.
6664 (vect_detect_hybrid_slp_1): Likewise.
6665 (vect_slp_analyze_operations): Likewise.
6666 (vect_slp_analyze_bb_1): Likewise.
6667 (vect_transform_slp_perm_load): Likewise.
6668 (vect_schedule_slp_instance): Likewise.
6669 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6670 (vect_mark_stmts_to_be_vectorized): Likewise.
6671 (vect_init_vector_1): Likewise.
6672 (vect_get_vec_def_for_operand): Likewise.
6673 (vect_finish_stmt_generation_1): Likewise.
6674 (vect_check_load_store_mask): Likewise.
6675 (vectorizable_call): Likewise.
6676 (vectorizable_conversion): Likewise.
6677 (vectorizable_operation): Likewise.
6678 (vectorizable_load): Likewise.
6679 (vect_analyze_stmt): Likewise.
6680 (vect_is_simple_use): Likewise.
6681 (vect_get_vector_types_for_stmt): Likewise.
6682 (vect_get_mask_type_for_stmt): Likewise.
6683 * tree-vectorizer.c (increase_alignment): Likewise.
6685 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
6687 * doc/rtl.texi: Adjust vec_select description.
6688 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6689 non-constant selectors.
6691 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
6693 * config/aarch64/aarch64-protos.h
6694 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6695 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6696 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6697 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6698 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6699 (AARCH64_FL_PROFILE): Move index so flags are ordered.
6700 (AARCH64_ISA_RCPC8_4): New flag.
6701 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6702 to aarch64_offset_9bit_signed_unscaled_p.
6703 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6705 * config/aarch64/constraints.md (Ust): New constraint.
6706 * config/aarch64/predicates.md.
6707 (aarch64_9bit_offset_memory_operand): New predicate.
6708 (aarch64_rcpc_memory_operand): New predicate.
6710 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
6712 PR rtl-optimization/87361
6713 * rtlanal.c (nonzero_bits1): Revert accidental change.
6715 2018-09-19 Richard Biener <rguenther@suse.de>
6717 PR tree-optimization/87349
6718 PR tree-optimization/87342
6719 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6721 2018-09-18 Marek Polacek <polacek@redhat.com>
6723 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6724 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6726 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6728 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6730 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6732 PR rtl-optimization/86882
6733 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6735 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
6737 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6738 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6740 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
6743 * doc/invoke.texi (Link Options): Fix formatting and grammar.
6745 2018-09-18 Richard Biener <rguenther@suse.de>
6748 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6749 (compute_samebase_partition_bases): Likewise.
6750 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6751 (gimple_can_coalesce_p): Simplify.
6753 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
6755 Handle a library implementation of ffs calling __builtin_ffs.
6756 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6757 (mmix_init_libfuncs): New function: make __builtin_ffs expand
6760 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6762 * diagnostic-show-locus.c (class layout_range): Add field
6764 (layout_range::layout_range): Add "original_idx" param and use it
6765 to initialize new field.
6766 (make_range): Use 0 for original_idx.
6767 (layout::layout): Pass in index to calls to
6768 maybe_add_location_range.
6769 (layout::maybe_add_location_range): Add param "original_idx" and
6770 pass it on to layout_range.
6771 (layout::print_any_labels): Pass on range->m_original_idx to
6773 (gcc_rich_location::add_location_if_nearby): Use 0 for
6775 * gcc-rich-location.h (text_range_label::get_text): Update for new
6777 (range_label_for_type_mismatch::get_text): Likewise.
6779 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6781 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6783 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6785 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6786 format_string_diagnostic_t.
6787 (fmtwarn_n): Likewise.
6788 * substring-locations.c
6789 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6790 (format_warning_n_va): Convert to...
6791 (format_string_diagnostic_t::emit_warning_n_va): ...this.
6792 (format_warning_va): Convert to...
6793 (format_string_diagnostic_t::emit_warning_va): ...this.
6794 (format_warning_at_substring): Convert to...
6795 (format_string_diagnostic_t::emit_warning): ...this.
6796 (format_warning_at_substring_n): Convert to...
6797 (format_string_diagnostic_t::emit_warning_n): ...this.
6798 * substring-locations.h (class format_string_diagnostic_t): New
6800 (format_warning_va): Convert to
6801 format_string_diagnostic_t::emit_warning_va.
6802 (format_warning_n_va): Convert to
6803 format_string_diagnostic_t::emit_warning_n_va.
6804 (format_warning_at_substring): Convert to
6805 format_string_diagnostic_t::emit_warning.
6806 (format_warning_at_substring_n): Convert to
6807 format_string_diagnostic_t::emit_warning_n.
6809 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
6810 Bernd Schmidt <bernds_cb1@t-online.de>
6812 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6815 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6817 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6818 operand 0 predicate to nonimmediate operand.
6819 (rint<mode>2_frndint): Remove insn pattern.
6820 (rint<mode>2): Change operand 1 predicate to general_operand.
6821 Extend operand 1 to XFmode and generate rintxf2 insn.
6822 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6823 Do not use X87MODEF mode macro.
6824 (frndintxf2_<rounding>_i387): Rename from
6825 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
6826 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6827 to XFmode and generate significandxf3 insn.
6829 2018-09-17 Richard Biener <rguenther@suse.de>
6831 PR tree-optimization/87328
6832 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6833 visiting unexecutable backedges when not iterating.
6834 (do_rpo_vn): Mark all edges not executable even when not
6837 2018-09-17 Martin Jambor <mjambor@suse.cz>
6840 * doc/invoke.texi (Warning Options): Likewise.
6842 2018-09-17 Richard Biener <rguenther@suse.de>
6844 PR tree-optimization/87301
6845 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6846 clean EH info from leftover copy assignments.
6848 2018-09-17 Martin Liska <mliska@suse.cz>
6850 PR gcov-profile/85871
6851 * gcov.c (output_intermediate_file): Fix out of bounds
6854 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
6856 * config/arc/arc.c: Object attributes for core4 not reflected
6858 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6861 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
6863 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6865 2018-09-17 Martin Liska <mliska@suse.cz>
6867 * doc/gcov.texi: Document new option --use-hotness-colors.
6868 * gcov.c (struct source_info): Declare new field.
6869 (source_info::source_info): Set default for maximum_count.
6870 (print_usage): Add new -q option.
6871 (process_args): Process it.
6872 (accumulate_line_info): Save src->maximum_count.
6873 (output_line_beginning): Make color line number if
6874 flag_use_hotness_colors is set.
6875 (output_line_details): Pass default argument value.
6876 (output_lines): Pass src->maximum_count.
6878 2018-09-17 Martin Liska <mliska@suse.cz>
6880 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6881 Use processor_names table.
6882 * config/i386/i386.c (ix86_default_align): Use
6883 processor_cost_table for alignment values.
6884 (ix86_option_override_internal): Use processor_names.
6885 (ix86_function_specific_print): Likewise.
6886 * config/i386/i386.h (struct processor_costs):
6887 Add alignment values.
6888 (struct ptt): Remove and replace with const char *.
6889 * config/i386/x86-tune-costs.h (struct processor_costs):
6890 Declare default alignments for all costs.
6892 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
6894 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6895 symbolics or VR_VARYING ranges for ABS_EXPR.
6896 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6897 when range will wrap.
6899 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
6902 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6903 before and after a JUMP_TABLE_DATA.
6905 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
6908 * dojump.c (do_compare_and_jump): Canonicalize function pointers
6909 when one operand is a function pointer. Use POINTER_TYPE_P and
6910 FUNC_OR_METHOD_TYPE_P.
6911 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6912 * fold-const.c (build_range_check): Likewise.
6913 * match.pd (simple_comparison): Likewise.
6915 2018-09-14 David Malcolm <dmalcolm@redhat.com>
6918 * spellcheck.c (get_edit_distance_cutoff): New function.
6919 (selftest::test_edit_distance_unit_test_oneway): Rename to...
6920 (selftest::test_get_edit_distance_one_way): ...this.
6921 (selftest::test_get_edit_distance_unit): Rename to...
6922 (selftest::test_get_edit_distance_both_ways): ...this.
6923 (selftest::test_edit_distances): Move tests to this new function,
6924 and test some more pairs of strings. Update for above renaming.
6925 (selftest::get_old_cutoff): New function.
6926 (selftest::test_get_edit_distance_cutoff): New function.
6927 (selftest::assert_suggested_for): New function.
6928 (ASSERT_SUGGESTED_FOR): New macro.
6929 (selftest::assert_not_suggested_for): New function.
6930 (ASSERT_NOT_SUGGESTED_FOR): New macro.
6931 (selftest::test_suggestions): New function.
6932 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6933 tests to selftest::test_edit_distances and call it. Add calls to
6934 selftest::test_get_edit_distance_cutoff and
6935 selftest::test_suggestions.
6936 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6937 (best_match::consider): Replace hard-coded cutoff calculation with
6939 (best_match::get_cutoff): New declaration.
6940 (best_match::get_best_meaningful_candidate): Likewise.
6942 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6944 * builtins.c (fold_builtin_strlen): Remove TODO comment.
6946 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6949 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6951 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6952 terminated string literal.
6954 2018-09-14 Martin Sebor <msebor@redhat.com>
6956 * builtins.c (unterminated_array): Handle ARRAY_REF.
6957 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6958 * builtins.h (unterminated_array): Declare extern.
6959 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6961 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6964 2018-09-14 Martin Sebor <msebor@redhat.com>
6965 Jeff Law <law@redhat.com>
6967 * builtins.c (unterminated_array): New.
6968 (expand_builtin_strcpy): Adjust.
6969 (expand_builtin_strcpy_args): Detect unterminated arrays.
6970 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
6971 unterminated arrays.
6972 * gimple-fold.h (get_maxval_strlen): Add argument.
6973 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6975 * gimple-fold.c (get_range_strlen): Add argument.
6976 (get_maxval_strlen): Adjust.
6977 * gimple-fold.h (get_range_strlen): Add argument.
6979 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
6981 * config/i386/movdirintrin.h: Fix copyright year.
6983 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
6985 * reg-stack.c: Include regs.h.
6986 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6987 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6988 FIRST_STACK_REG, not DFmode.
6989 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6990 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
6991 (change stack): Default register mode to the reg_raw_mode of
6992 FIRST_STACK_REG, not DFmode.
6993 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6994 (*swapxf): Rename from swapxf.
6996 2018-09-14 Carl Love <cel@us.ibm.com>
6998 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6999 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
7001 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
7004 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
7007 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
7010 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
7012 2018-09-14 Jason Merrill <jason@redhat.com>
7014 Fix --enable-gather-detailed-mem-stats.
7015 * hash-table.c (hash_table_usage): Change from variable to function.
7016 * hash-table.h: Adjust.
7017 * Makefile.in: Add missing dependencies on hash-table.h.
7019 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7021 PR tree-optimization/87259
7023 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
7024 execute_cse_reciprocals_1 has tried transforming.
7026 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
7028 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
7029 VR_VARYING for PLUS/MINUS_EXPR.
7031 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
7033 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
7036 2018-09-14 Richard Biener <rguenther@suse.de>
7039 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
7040 bits for the merged partition.
7042 2018-09-13 Martin Sebor <msebor@redhat.com>
7043 Bernd Edlinger <bernd.edlinger@hotmail.de>
7045 * builtins.h (c_srlen): Add argument.
7046 * builtins.c (warn_string_no_nul): New function.
7047 (c_strlen): Add argument and use it. Update recursive calls.
7048 Pass DECL argument to string_constant to get info on non
7049 terminated strings. Update *NONSTR as needed.
7050 (fold_builtin_strlen): Add argument to calls to c_strlen.
7051 Warn for unterminated arrays.
7052 (warn_string_no_null): Add prototype.
7053 * expr.c (string_constant): Update arguments. Update recursive
7054 calls appropriately. Detect missing NUL terminator and outermost
7055 declaration its missing in.
7056 Improve checks for arrays with nonzero lower bound or elements
7057 that are not a single byte. Simplify offset computation.
7058 Simplify checks for non-NUL terminated strings.
7059 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
7060 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
7062 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
7064 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
7066 * fold-const.c (c_getstr): Fix function comment. Remove unused third
7067 argument. Fix range checks.
7068 * fold-const.h (c_getstr): Adjust protoype.
7069 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
7070 string is constant but contains no NUL byte.
7072 * expr.c (string_constant): Adjust function comment.
7073 Remove bogus check for zero termination.
7075 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
7077 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
7078 (get_constant_size): Don't make STRING_CSTs larger than they are.
7079 (check_string_literal): New check function for STRING_CSTs.
7080 (output_constant): Use it.
7082 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
7085 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
7087 2018-09-13 Richard Biener <rguenther@suse.de>
7089 PR tree-optimization/87263
7090 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
7091 (struct unwind_state): Add max_rpo field.
7092 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
7093 Compute max_rpo, the max RPO number a block can be backwards reached
7094 from. Re-write non-iterating mode to a RPO ordered worklist approach,
7095 separating it from the iterating mode.
7097 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7099 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
7100 (rfs_decision): New scheduling decision.
7102 2018-09-13 Richard Biener <rguenther@suse.de>
7105 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
7106 (vn_nary_op_insert_pieces_predicated): Do not write useless
7107 valid_dominated_by_p entry outside of the allocated storage.
7109 2018-09-13 Omar Sandoval <osandov@osandov.com>
7110 Tom de Vries <tdevries@suse.de>
7113 * dwarf2out.c (is_c): New function.
7114 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
7116 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
7119 * config/aarch64/aarch64.md (*aarch64_bfxil):
7121 * config/aarch64/constraints.md (Ulc): Define.
7122 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
7124 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7127 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7129 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7130 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7131 aarch64_layout_frame call.
7132 (aarch64_expand_epilogue): Likewise.
7133 (aarch64_initial_elimination_offset): Likewise.
7134 (aarch64_get_separate_components): Likewise.
7135 (aarch64_use_return_insn_p): Likewise.
7136 (aarch64_layout_frame): Remove unneeded check.
7138 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7140 * configure.ac: Only append
7141 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
7142 gcc_config_arguments if it was never reconfigured or last reconfigure
7143 was with different arguments.
7144 * configure: Regenerated.
7146 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7147 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7150 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
7151 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
7153 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7155 PR tree-optimization/87287
7156 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
7157 X % C == 0 to X % (unsigned) C == 0 optimization to ...
7158 * match.pd (X % C == 0): ... here. New optimization.
7160 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7163 * expr.h (maybe_optimize_mod_cmp): Declare.
7164 * expr.c (mod_inv): New function.
7165 (maybe_optimize_mod_cmp): New function.
7166 (do_store_flag): Use it.
7167 * cfgexpand.c (expand_gimple_cond): Likewise.
7169 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
7170 Julian Brown <julian@codesourcery.com>
7173 * gimplify.c (gimplify_scan_omp_clauses): Set
7174 target_firstprivatize_array_bases in OpenACC parallel and kernels
7175 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7176 OpenACC data regions.
7178 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
7180 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7181 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7183 2018-09-12 Richard Biener <rguenther@suse.de>
7185 PR tree-optimization/87280
7186 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7187 edge but unreachable target.
7188 (do_rpo_vn): For conservatively handling a PHI only mark
7189 the backedge executable but not the block reachable.
7191 2018-09-12 Richard Biener <rguenther@suse.de>
7193 PR tree-optimization/87266
7194 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7197 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
7199 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7201 ("trunc<BFP:mode><DFP_ALL:mode>2")
7202 ("trunc<DFP_ALL:mode><BFP:mode>2")
7203 ("extend<BFP:mode><DFP_ALL:mode>2")
7204 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7205 according to the target operand type.
7207 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7208 Andreas Krebbel <krebbel@linux.ibm.com>
7210 PR tree-optimization/86844
7211 * gimple-ssa-store-merging.c
7212 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7213 there are any overlapping stores in between them, make sure they are
7214 also coalesced or we give up completely.
7216 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7219 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7220 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
7222 2018-09-12 Tom de Vries <tdevries@suse.de>
7224 * common.opt (gdescribe-dies): Add option.
7225 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7226 attribute for artifical and nameless decls.
7227 (dwarf2out_register_external_die): Add description attribute to
7228 external reference die.
7229 (add_desc_attribute): New functions.
7230 (gen_subprogram_die): Add description attribute to
7231 DW_TAG_call_site_parameter.
7232 * tree-pretty-print.c (print_generic_expr_to_str): New function.
7233 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7234 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7236 (@item -gdescribe-dies): Add.
7238 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7240 * tree-vrp.c (vrp_shift_undefined_p): Remove.
7241 (extract_range_from_binary_expr_1: Call
7242 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7243 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7246 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7248 * gimple-ssa-warn-alloca.c
7249 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7250 field for ALLOCA_BOUND_*_LARGE.
7252 2018-09-11 Nathan Sidwell <nathan@acm.org>
7254 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7256 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7258 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7259 for clobbers. Remove obsolete comment.
7261 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7263 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7264 mpxchk, mpxld and mpxst types.
7265 (define_attr length_immediate): Remove all processing of mpx types.
7266 (define_attr prefix_0f): Ditto.
7267 (define_attr memory): Ditto.
7269 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7271 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7272 (log<mode>2): Change operand 1 predicate to general_operand.
7273 Extend operand 1 to XFmode and generate logxf3 insn.
7274 (log10<mode>2): Change operand 1 predicate to general_operand.
7275 Extend operand 1 to XFmode and generate log10xf3 insn.
7276 (log2<mode>2): Change operand 1 predicate to general_operand.
7277 Extend operand 1 to XFmode and generate log2xf3 insn.
7278 (fyl2xp1_extend<mode>xf3_i387): Remove.
7279 (log1p<mode>2): Change operand 1 predicate to general_operand.
7280 Extend operand 1 to XFmode and generate log1pxf3 insn.
7281 (fxtract_extend<mode>xf3_i387): Remove.
7282 (logb<mode>2): Change operand 1 predicate to general_operand.
7283 Extend operand 1 to XFmode and generate logbxf3 insn.
7284 (ilogb<mode>2): Change operand 1 predicate to general_operand.
7285 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7286 (significand<mode>2): Change operand 1 predicate to general_operand.
7287 Extend operand 1 to XFmode and generate significandxf3 insn.
7289 2018-09-11 Nathan Sidwell <nathan@acm.org>
7291 * gcc.c (perror_with_name, pfatal_with_name): Delete.
7292 (load_specs): Use fatal_error.
7293 (DELETE_IF_ORDINARY, process_command): Use error.
7294 (execute, run_attempt): Use fatal_error.
7296 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
7298 * diagnostic-core.h (sorry_at): New prototype.
7299 * diagnostic.c (sorry_at): New function.
7301 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
7303 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7304 by zero as VR_UNDEFINED.
7306 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7308 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7309 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7310 (<sincos>mode2): New expander.
7311 (sincos_extend<mode>xf3_i387): Remove insn pattern.
7312 (sincos -> sin, cos splitters): Remove splitter patterns.
7313 (sincos<mode>3): Change operand 2 predicate to general_operand.
7314 Extend operand 2 to XFmode and generate sincosxf3 insn.
7315 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7316 Change operand 3 predicate to const1_operand.
7317 (fptan_extend<mode>xf4_i387): Remove insn pattern.
7318 (tanxf2): Update operands in the call to fptanxf4_i387.
7319 (tan<mode>2): Change operand 1 predicate to general_operand.
7320 Extend operand 1 to XFmode and generate tanxf3 insn.
7321 (atan2xf3): Rename from *fpatanxf3_i387.
7322 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7323 (atan2xf3): Remove expander.
7324 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
7325 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7326 (atan<mode>2): Change operand 1 predicate to general_operand.
7327 Extend operand 1 to XFmode and generate atanxf3 insn.
7329 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7331 * config/i386/i386.md (x87/SSE constant load splitter): Use
7332 memory_operand instead of nonimmediate_operand for input operand
7335 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
7337 * config/i386/i386.md (float partial SSE register stall splitter): Move
7338 splitter near its instruction pattern.
7339 (float_extend partial SSE register stall splitter): Ditto.
7340 (float_truncate partial SSE register stall splitter): Ditto.
7342 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
7345 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7346 to speculation_safe_value_not_needed.
7349 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7350 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7351 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7352 leaf_function_p, instead use has_hard_reg_initial_val.
7354 2018-09-09 Nathan Sidwell <nathan@acm.org>
7356 * gcc.h (pfatal_with_name): Don't declare here.
7357 * gcc.c (pfatal_with_name): Make static.
7359 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
7361 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7364 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
7366 PR rtl-optimization/85458
7367 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7368 priority hook to reduce the priority of EXPR.
7370 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
7372 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7373 DImode for x87 on 32bit targets. Conditionally disable x87 modes
7374 with X87_ENABLE_FLOAT. Remove preparation code.
7375 (*float<SWI48:mode><MODEF:mode>2): Rename from
7376 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
7377 math using "enabled" attribute.
7378 (*floatdi<MODEF:mode>2_i387): Rename from
7379 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
7380 enable for 32bit targets only.
7381 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7383 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7384 as operand 1 predicate. Rewrite as define_insn_and_split.
7385 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7387 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7389 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7390 to fallthru to FLOAT case.
7392 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7395 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7396 around folding of vec_sl to handle out of range shift values.
7398 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7400 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7401 Update callers to gen_fix_trunc<mode>_i387_fisttp
7402 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7403 nonimmediate_operand.
7404 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7405 and corresponding splitters.
7406 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7407 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7408 (fix_truncdi_i387_with_temp): Remove insn pattern
7409 and corresponding splitters.
7410 (fix_trunc<mode>_i387): Change operand 0 predicate to
7411 nonimmediate_operand.
7412 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7413 and corresponding splitters.
7414 (*fistdi2_1): Remove.
7416 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7417 (lrintxfdi2): Remove expander. Reimplement as define_insn.
7418 (*fist<mode>2_1): Remove.
7419 (fist<mode>2): Ditto.
7420 (fist<mode>2_with_temp): Remove insn pattern and corresponding
7422 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
7423 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7424 (fistdi2_<rounding>): Change operand 0 predicate to
7425 nonimmediate_operand.
7426 (fistdi2_<rounding>_with_temp): Remove insn pattern
7427 and corresponding splitters.
7428 (fist<mode>2_<rounding>): Change operand 0 predicate to
7429 nonimmediate_operand.
7430 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7431 and corresponding splitters.
7433 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7435 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
7437 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7440 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7442 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7443 early gimple folding of vec_splat().
7444 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7445 * gimple-fold.h: Add an extern define for tree_vec_extract().
7447 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7449 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7450 wrappers around TREE_TYPE comparisons.
7452 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7455 * config/s390/predicates.md: Add nonsym_memory_operand.
7456 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7457 contains a SYMBOL_REF, load it into an intermediate pseudo.
7458 (s390_emit_compare_and_swap): Legitimize operand.
7459 * config/s390/s390.md: Use the new nonsym_memory_operand
7460 with UNSPECV_CAS patterns.
7462 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7465 * config/s390/s390-passes.def: New file.
7466 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7468 (make_pass_s390_early_mach): Add declaration.
7469 * config/s390/s390.c (make_pass_s390_early_mach):
7470 (s390_option_override): Remove dynamic registration.
7471 * config/s390/t-s390: Add s390-passes.def.
7473 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7475 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7476 Remove UNSPEC_LTREL_BASE check.
7477 (annotate_constant_pool_refs): Likewise.
7478 (find_constant_pool_ref): Likewise.
7479 (find_ltrel_base): Removed.
7480 (replace_ltrel_base): Removed.
7481 (s390_mainpool_finish): Remove replace_ltrel_base call.
7482 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7483 (s390_chunkify_finish): Remove replace_ltrel_base call.
7484 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7486 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7489 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7490 to speculation_safe_value_not_needed.
7492 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7493 Bernd Schmidt <bernds_cb1@t-online.de>
7495 * config/nvptx/nvptx-opts.h: New file.
7496 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7497 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7499 (TARGET_SM35): New macro.
7500 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7502 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7504 (misa=): New option.
7505 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7507 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7509 * config/i386/i386.md (truncdfsf2): Remove expander.
7510 (truncdfsf2_with_temp): Ditto.
7511 (truncxf<mode>2): Ditto.
7512 (*truncdfsf_fast_mixed): Remove insn pattern.
7513 (*truncdfsf_fast_i387): Ditto.
7514 (*truncdfsf_mixed): Ditto.
7515 (*truncdfsf_i387): Ditto.
7516 (*truncdfsf2_i387_1): Ditto.
7517 (*truncxfsf2_mixed): Ditto.
7518 (*truncxfdf2_mixed): Ditto.
7519 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7520 to call gen_truncxf<mode>2 instead.
7521 (*truncxf<mode>2_i387): Remove.
7522 (reg->reg splitters): Remove splitter pattern.
7523 (reg->mem splitters): Ditto.
7525 (truncdfsf2): New insn pattern.
7526 (truncxf<mode>2): Ditto.
7528 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7530 * tree-ssa-math-opts.c (is_mult_by): New function.
7531 (is_square_of): Use the above.
7532 (optimize_recip_sqrt): New function.
7533 (pass_cse_reciprocals::execute): Use the above.
7535 2018-09-05 Richard Biener <rguenther@suse.de>
7538 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7539 to zero-init the emplaced vec.
7541 2018-09-05 Martin Liska <mliska@suse.cz>
7543 PR tree-optimization/87205
7544 * tree-switch-conversion.c (pass_lower_switch::execute):
7545 Group cases for switch statements.
7547 2018-09-05 Richard Biener <rguenther@suse.de>
7549 PR tree-optimization/87217
7550 * tree-ssa-sccvn.c (vuse_valueize): New.
7551 (vn_reference_lookup_pieces): Use it.
7552 (vn_reference_lookup): Likewise.
7554 2018-09-05 Nathan Sidwell <nathan@acm.org>
7557 * stor-layout.c (place_field): Scan forwards to check last
7558 bitfield when ms_bitfield_placement is in effect.
7560 2018-09-05 Richard Biener <rguenther@suse.de>
7563 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7566 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
7567 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7569 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7570 * config.gcc (extra_objs): Build it.
7571 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7573 * config/aarch64/aarch64-passes.def
7574 (pass_tag_collision_avoidance): New pass.
7575 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7576 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7577 (aarch64_classify_address): Remove static qualifier.
7578 (aarch64_address_info, aarch64_address_type): Move to...
7579 * config/aarch64/aarch64-protos.h: ... here.
7580 (make_pass_tag_collision_avoidance): New function.
7581 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7584 2018-09-05 Martin Liska <mliska@suse.cz>
7586 * doc/gcov.texi: Update documentation of humar
7588 * gcov.c (format_count): Print one decimal place, it provides
7589 more fine number of situations like '1G' vs. '1.4G'.
7591 2018-09-05 Martin Liska <mliska@suse.cz>
7594 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7595 * optc-gen.awk: Allow 'Var' for Deprecated options in order
7596 to generate a MASK value.
7598 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
7601 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7602 if frame pointer isn't used.
7603 (compute_frame_pointer_to_fb_displacement): Likewise.
7605 2018-09-04 Jakub Jelinek <jakub@redhat.com>
7608 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7609 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7610 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7611 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7612 and OPTION_MASK_ISA_XSAVEC_UNSET.
7614 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
7616 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7617 XOR operations in NAND case.
7619 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7621 * wide-int-range.cc (wide_int_range_convert): New.
7622 * wide-int-range.h (wide_int_range_convert): New.
7623 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7624 code into wide_int_range_convert.
7625 (extract_range_into_wide_ints): Do not munge anti range constants
7626 into the entire domain. Just return the range back.
7628 2018-09-04 Martin Liska <mliska@suse.cz>
7630 * genmatch.c (output_line_directive): Add new argument
7632 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7634 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7636 * doc/invoke.texi (Option Summary): Add whitespace.
7638 * doc/invoke.texi (Option Summary): Add -Waligned-new.
7640 2018-09-04 Richard Biener <rguenther@suse.de>
7642 PR tree-optimization/87211
7643 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7644 backedge value we're supposed to treat as VARYING also number
7645 the PHI to VARYING in case it got a different value-number already.
7647 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7649 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7650 (extract_range_from_binary_expr_1): Do not call
7651 vrp_can_optimize_bit_op.
7652 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7654 (wide_int_range_get_mask_and_bounds): New.
7655 (wide_int_range_optimize_bit_op): New.
7656 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7657 (wide_int_range_bit_and): Same.
7658 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7659 (wide_int_range_optimize_bit_op): New.
7660 (wide_int_range_get_mask_and_bounds): New.
7662 2018-09-04 Richard Biener <rguenther@suse.de>
7664 PR tree-optimization/87176
7665 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7666 variable. When value-numbering a virtual PHI node make sure
7667 to not value-number to the backedge value.
7669 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7671 * doc/extend.texi (Long Long, Hex Floats): Document support for
7672 long long and hex floats in more recent versions of ISO C++.
7674 2018-09-03 Richard Biener <rguenther@suse.de>
7676 PR tree-optimization/87177
7677 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7680 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7682 * bb-reorder.c (edge_order): Convert to C-qsort-style
7683 tri-state comparator.
7684 (reorder_basic_blocks_simple): Change std::stable_sort to
7687 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7689 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7690 tri-state comparator.
7691 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7693 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7695 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
7696 (mergesort): ... here as maximum count for using netsort.
7697 (gcc_qsort): Set nlim to 3 if stable sort is requested.
7698 (gcc_stablesort): New.
7699 * system.h (gcc_stablesort): Declare.
7701 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7703 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7704 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
7705 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
7707 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
7709 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7710 lxsdx and stxsdx alternatives.
7711 (*mov<mode>_hardfloat64): Ditto.
7712 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7714 2018-09-03 Richard Biener <rguenther@suse.de>
7716 PR tree-optimization/87200
7717 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7720 2018-09-03 Martin Liska <mliska@suse.cz>
7722 PR tree-optimization/87201
7723 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7724 Fix parenthesis in an expression.
7726 2018-09-03 Richard Biener <rguenther@suse.de>
7728 PR tree-optimization/87197
7729 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7730 visited. CSE the VN_INFO hashtable lookup.
7732 PR tree-optimization/87169
7733 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7734 iterating make sure there's no extra backedges from irreducible
7735 regions feeding the header. Mark the destination block
7738 2018-09-03 Martin Liska <mliska@suse.cz>
7741 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7742 * common/common-targhooks.c (default_get_valid_option_values):
7744 * common/common-targhooks.h (default_get_valid_option_values):
7746 * common/config/i386/i386-common.c: Move processor_target_table
7748 (ix86_get_valid_option_values): New function.
7749 (TARGET_GET_VALID_OPTION_VALUES): New macro.
7750 * config/i386/i386.c (struct ptt): Move to i386-common.c.
7751 (PTA_*): Move all defined masks into i386-common.c.
7752 (ix86_function_specific_restore): Use new processor_cost_table.
7753 * config/i386/i386.h (struct ptt): Moved from i386.c.
7754 (struct pta): Likewise.
7755 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7756 * doc/tm.texi.in: Likewise.
7757 * opt-suggestions.c (option_proposer::suggest_option):
7758 Pass prefix to build_option_suggestions.
7759 (option_proposer::get_completions): Likewise.
7760 (option_proposer::build_option_suggestions): Use the new target
7762 * opts.c (struct option_help_tuple): New struct.
7763 (print_filtered_help): Use the new target hook.
7765 2018-09-03 Martin Liska <mliska@suse.cz>
7768 * predict.c (set_even_probabilities): Add likely_edges
7769 argument and handle cases where we have precisely one
7771 (combine_predictions_for_bb): Catch also likely_edges.
7772 (tree_predict_by_opcode): Handle gswitch statements.
7773 * tree-cfg.h (find_case_label_for_value): New declaration.
7774 (find_taken_edge_switch_expr): Likewise.
7775 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7776 Find pivot in decision tree based on probabily, not by number of
7779 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
7781 * doc/standards.texi (Standards): Update Objective-C reference.
7783 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7785 * doc/install.texi (Prerequisites): Update link for MPC.
7787 2018-09-01 Michael Matz <matz@suse.de>
7789 PR tree-optimization/87074
7790 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7791 PHIs for outer-loop uses.
7793 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7795 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7796 * doc/invoke.texi (C Dialect Options): Ditto.
7798 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7800 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7802 2018-08-31 Richard Biener <rguenther@suse.de>
7804 PR tree-optimization/87168
7805 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7806 (rpo_elim::eliminate_avail): When OP was not visited it must
7809 2018-08-31 David Malcolm <dmalcolm@redhat.com>
7811 * tree-vrp.c (copy_value_range): Convert param "from" from
7812 "value_range *" to "const value_range *".
7813 (range_is_null): Likewise for param "vr".
7814 (range_int_cst_p): Likewise.
7815 (range_int_cst_singleton_p): Likewise.
7816 (symbolic_range_p): Likewise.
7817 (value_ranges_intersect_p): Likewise for both params.
7818 (value_range_nonnegative_p): Likewise for param "vr".
7819 (value_range_constant_singleton): Likewise.
7820 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7821 (extract_range_into_wide_ints): Likewise for param "vr".
7822 (extract_range_from_multiplicative_op): Likewise for params "vr0"
7824 (vrp_can_optimize_bit_op): Likewise.
7825 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7827 (extract_range_from_unary_expr): Likewise.
7828 (debug_value_range): Likewise for param "vr".
7829 (value_range::dump): Add "const" qualifier.
7830 (vrp_prop::check_array_ref): Convert local "vr" from
7831 "value_range *" to "const value_range *".
7832 (vrp_prop::check_mem_ref): Likewise.
7833 (vrp_prop::visit_stmt): Likewise for local "old_vr".
7834 (vrp_intersect_ranges_1): Likewise for param "vr_1".
7835 (vrp_intersect_ranges): Likewise.
7836 (simplify_stmt_for_jump_threading): Likewise for local "vr".
7837 (vrp_prop::vrp_finalize): Likewise.
7838 * tree-vrp.h (value_range::dump): Add "const" qualifier.
7839 (vrp_intersect_ranges): Add "const" qualifier to params as above.
7840 (extract_range_from_unary_expr): Likewise.
7841 (value_range_constant_singleton): Likewise.
7842 (symbolic_range_p): Likewise.
7843 (copy_value_range): Likewise.
7844 (extract_range_from_binary_expr_1): Likewise.
7845 (range_int_cst_p): Likewise.
7846 (vrp_set_zero_nonzero_bits): Likewise.
7847 (range_int_cst_singleton_p): Likewise.
7849 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
7851 * config/aarch64/arm_neon.h (vabsd_s64): New.
7852 (vnegd_s64): Likewise.
7854 2018-08-31 Martin Jambor <mjambor@suse.cz>
7856 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7858 2018-08-31 Martin Liska <mliska@suse.cz>
7860 * ipa-icf.c (sem_item::add_type): Use
7861 sem_item::m_type_hash_cache.
7862 * ipa-icf.h: Move the cache from sem_item_optimizer
7865 2018-08-31 Nathan Sidwell <nathan@acm.org>
7867 * doc/extend.texi (Backwards Compatibility): Remove implicit
7868 extern C leeway of () being (...).
7870 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7872 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7874 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
7878 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7880 2018-08-31 Jakub Jelinek <jakub@redhat.com>
7883 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7884 gen_int_mode. Formatting fixes.
7886 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
7888 * target.def (custom_function_descriptors): Improve documentation.
7889 * doc/tm.texi.in (Trampolines): Expand discussion of function
7890 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7891 beginning of the section.
7892 * doc/tm.texi: Regenerated.
7894 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
7896 * cfg.h (class auto_edge_flag): Spell out the template-id of the
7897 base class in the initializer list. This is a workaround for
7898 building with older GCC.
7899 (class auto_bb_flag): Likewise.
7901 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
7903 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7904 (altivec_vcmpequ<VI_char>_p): Remove star.
7905 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7907 (expand_strncmp_vec_sequence): New function.
7908 (emit_final_str_compare_vec): New function.
7909 (expand_strn_compare): Add support for vector strncmp.
7910 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7911 length specification to bytes.
7912 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7913 (vcmpnezb_p): New pattern.
7914 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7915 for option -mstring-compare-inline-limit.
7917 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
7919 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7920 (PTA_SKYLAKE): Add PTA_AES.
7921 (PTA_GOLDMONT): Likewise.
7923 2018-08-29 Jan Hubicka <jh@suse.cz>
7926 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7927 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7929 2018-08-29 Jan Hubicka <jh@suse.cz>
7931 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7933 (hash_tree): Do not visit TYPE_STUB_DECL.
7934 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7935 stream TYPE_STUB_DECL.
7936 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7937 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7938 after free_lang_data.
7939 (type_in_anonymous_namespace_p): Likewise.
7941 2018-08-29 Jan Hubicka <jh@suse.cz>
7943 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7944 comment that it has to be even number.
7945 (class sreal): Change m_sig type to int32_t.
7946 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7947 int64_t for temporary calculations.
7948 (sreal_verify_basics): Drop one bit from minimum and maximum.
7950 2018-08-30 Richard Biener <rguenther@suse.de>
7952 PR tree-optimization/87147
7953 * tree-ssa-sccvn.c (SSA_VISITED): New function.
7954 (visit_phi): When the degenerate result is from the backedge and
7955 we didn't visit its definition yet drop to VARYING.
7956 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7958 2018-08-29 Jan Hubicka <jh@suse.cz>
7960 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7962 (hash_tree): Likewise.
7964 2018-08-29 Jan Hubicka <jh@suse.cz>
7966 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7967 and TYPE_NEXT_REF_TO.
7969 2018-08-29 Jan Hubicka <jh@suse.cz>
7971 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7972 comment that it has to be even number.
7973 (class sreal): Change m_sig type to int32_t.
7974 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7975 int64_t for temporary calculations.
7976 (sreal_verify_basics): Drop one bit from minimum and maximum.
7978 2018-08-30 Tamar Christina <tamar.christina@arm.com>
7980 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7982 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
7985 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7986 if to_add is negative.
7988 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
7991 * builtins.c (c_strlen): Improve range checks.
7993 2018-08-29 Martin Sebor <msebor@redhat.com>
7994 Jeff Law <law@redhat.com>
7996 PR tree-optimization/86714
7997 PR tree-optimization/86711
7998 * builtins.c (c_strlen): Add arguments to call to string_constant.
7999 * expr.c (string_constant): Add argument. Detect missing nul
8000 terminator and outermost declaration it's missing in.
8001 * expr.h (string_constant): Add argument.
8002 * fold-const.c (read_from_constant_string): Add arguments to call to
8004 (c_getstr): Likewise.
8005 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8007 * tree-ssa-strlen.c (get_stridx): Likewise.
8009 2018-08-29 Jan Hubicka <jh@suse.cz>
8011 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
8012 Do not stream DECL_VINDEX.
8013 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
8014 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
8015 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
8017 2018-08-29 Richard Biener <rguenther@suse.de>
8019 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
8020 virtual operands that are not default defs to honor region
8022 (rpo_vn_valueize): Remove ineffective code here.
8024 2018-08-29 Richard Biener <rguenther@suse.de>
8026 PR tree-optimization/87132
8027 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
8028 when skipping defs reachable over backedges.
8030 2018-08-29 Richard Biener <rguenther@suse.de>
8032 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
8033 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
8034 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
8035 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
8036 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
8037 (vn_reference_lookup_3): Remove use of const_parms.
8038 (free_rpo_vn): Do not free const_parms.
8039 (do_rpo_vn): Do not call init_const_parms.
8040 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
8041 SSA_NAME_POINTS_TO_READONLY_MEMORY.
8042 (call_may_clobber_ref_p_1): Likewise.
8044 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
8047 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
8049 (-ftree-scev-cprop): Document.
8051 2018-08-29 Jan Hubicka <jh@suse.cz>
8053 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
8055 (sreal constructor): Update.
8056 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
8057 sreal:operator/): Update.
8059 2018-08-29 Martin Liska <mliska@suse.cz>
8061 * tree-switch-conversion.c (switch_conversion::expand):
8062 Strenghten assumption about gswitch statements.
8064 2018-08-29 Richard Biener <rguenther@suse.de>
8066 PR tree-optimization/87117
8067 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
8068 re-value-number released SSA VDEFs.
8070 2018-08-29 Richard Biener <rguenther@suse.de>
8072 PR tree-optimization/87126
8073 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
8075 2018-08-28 Jim Wilson <jimw@sifive.com>
8077 * config/riscv/pic.md: Rewrite.
8078 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
8080 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
8081 (SOFTF, default_load, softload, softstore): New.
8083 2018-08-28 Jeff Law <law@redhat.com>
8085 * fold-const.c (fold_binary_loc): Remove recently added assert.
8087 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
8089 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8090 to OP parmeter of generated function.
8092 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
8094 PR tree-optimization/87009
8095 * match.pd: Add boolean optimizations.
8097 2018-08-28 Martin Sebor <msebor@redhat.com>
8100 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
8101 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
8102 (pass_walloca::gate): Use it.
8103 (alloca_call_type): Same.
8104 (pass_walloca::execute): Same.
8105 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
8107 2018-08-28 David Malcolm <dmalcolm@redhat.com>
8109 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
8110 GCC_VERSION for usage of "__gcc_dump_printf__" format from
8113 2018-08-28 Richard Biener <rguenther@suse.de>
8115 PR tree-optimization/87124
8116 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
8117 constants before looking up avail.
8119 2018-08-28 Jakub Jelinek <jakub@redhat.com>
8122 * calls.c (maybe_warn_nonstring_arg): Punt early if
8123 warn_stringop_overflow is zero. Don't call get_range_strlen
8124 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
8125 Swap comparison operands to have constants on rhs. Only use
8126 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
8127 increment lenrng[0].
8129 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
8131 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8132 use of tree_to_shwi. Remove duplicated test for the size being
8133 a whole number of bytes.
8135 2018-08-28 Richard Biener <rguenther@suse.de>
8137 PR tree-optimization/87117
8138 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
8139 Handle removed stmt without LHS (GIMPLE_NOP).
8141 2018-08-28 Richard Biener <rguenther@suse.de>
8143 PR tree-optimization/87117
8144 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
8145 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
8147 2018-08-28 Richard Biener <rguenther@suse.de>
8149 PR tree-optimization/87117
8150 * tree-ssa-pre.c (compute_avail): Do not make expressions
8151 with predicated values available.
8152 (get_expr_value_id): Assert we do not run into predicated value
8155 2018-08-28 Richard Biener <rguenther@suse.de>
8157 PR tree-optimization/87117
8158 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
8159 get virtual operands.
8160 (get_expr_operands): Handle STRING_CST like other decls.
8162 2018-08-28 Martin Liska <mliska@suse.cz>
8164 * tree.h: Update documentation of fndecl_built_in_p
8168 2018-08-27 Jeff Law <law@redhat.com>
8169 PR tree-optimization/87110
8170 * tree-ssa-dse.c (compute_trims): Handle non-constant
8173 2018-08-27 Martin Sebor <msebor@redhat.com>
8175 PR tree-optimization/86914
8176 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8178 2018-08-27 Martin Sebor <msebor@redhat.com>
8180 PR tree-optimization/87112
8181 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8182 the type of the bound argument.
8184 2018-08-27 Jeff Law <law@redhat.com>
8186 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8187 type does not have a TYPE_SIZE_UNIT.
8189 2018-08-27 Steve Ellcey <sellcey@cavium.com>
8191 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8192 with include of backend.h.
8194 2018-08-27 Richard Biener <rguenther@suse.de>
8196 PR tree-optimization/86927
8197 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8198 use const cond reduction code.
8200 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
8202 PR tree-optimization/85758
8203 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8205 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8208 * diagnostic-show-locus.c (class layout_range): Update for
8209 conversion of show_caret_p to a tri-state.
8210 (layout_range::layout_range): Likewise.
8211 (make_range): Likewise.
8212 (layout::maybe_add_location_range): Likewise.
8213 (layout::should_print_annotation_line_p): Don't show annotation
8214 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8215 (layout::get_state_at_point): Update for conversion of
8216 show_caret_p to a tri-state. Bail out early for
8217 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8218 underlining or source colorization.
8219 (gcc_rich_location::add_location_if_nearby): Update for conversion
8220 of show_caret_p to a tri-state.
8221 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8222 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8224 (selftest::test_one_liner_labels): Likewise.
8225 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8226 conversion of show_caret_p to a tri-state.
8227 * pretty-print.c (text_info::set_location): Likewise.
8228 * pretty-print.h (text_info::set_location): Likewise.
8229 * substring-locations.c (format_warning_n_va): Likewise.
8230 * tree-diagnostic.c (default_tree_printer): Likewise.
8231 * tree-pretty-print.c (newline_and_indent): Likewise.
8233 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8236 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8237 line above for line-insertion fix-it hints.
8238 (selftest::test_fixit_insert_containing_newline): Update the
8239 expected results, and add a test with line-numbering enabled.
8241 2018-08-27 Martin Liska <mliska@suse.cz>
8244 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8245 params with DECL_HAS_VALUE_EXPR_P.
8247 2018-08-27 Martin Liska <mliska@suse.cz>
8249 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8250 selected expansion strategy.
8252 2018-08-27 Martin Liska <mliska@suse.cz>
8254 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8255 * builtins.c (is_builtin_fn): Likewise.
8256 * attribs.c (diag_attr_exclusions): Use new function
8257 fndecl_built_in_p and remove check for FUNCTION_DECL if
8259 (builtin_mathfn_code): Likewise.
8260 (fold_builtin_expect): Likewise.
8261 (fold_call_expr): Likewise.
8262 (fold_builtin_call_array): Likewise.
8263 (fold_call_stmt): Likewise.
8264 (set_builtin_user_assembler_name): Likewise.
8265 (is_simple_builtin): Likewise.
8266 * calls.c (gimple_alloca_call_p): Likewise.
8267 (maybe_warn_nonstring_arg): Likewise.
8268 * cfgexpand.c (expand_call_stmt): Likewise.
8269 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8270 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8271 (cgraph_node::verify_node): Likewise.
8272 * cgraphclones.c (build_function_decl_skip_args): Likewise.
8273 (cgraph_node::create_clone): Likewise.
8274 * config/arm/arm.c (arm_insert_attributes): Likewise.
8275 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8276 * dse.c (scan_insn): Likewise.
8277 * expr.c (expand_expr_real_1): Likewise.
8278 * fold-const.c (operand_equal_p): Likewise.
8279 (fold_binary_loc): Likewise.
8280 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8281 * gimple-low.c (lower_stmt): Likewise.
8282 * gimple-pretty-print.c (dump_gimple_call): Likewise.
8283 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8285 * gimple.c (gimple_build_call_from_tree): Likewise.
8286 (gimple_call_builtin_p): Likewise.
8287 (gimple_call_combined_fn): Likewise.
8288 * gimplify.c (gimplify_call_expr): Likewise.
8289 (gimple_boolify): Likewise.
8290 (gimplify_modify_expr): Likewise.
8291 (gimplify_addr_expr): Likewise.
8292 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8293 * ipa-cp.c (determine_versionability): Likewise.
8294 * ipa-fnsummary.c (compute_fn_summary): Likewise.
8295 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8296 * ipa-split.c (visit_bb): Likewise.
8297 (split_function): Likewise.
8298 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8299 * lto-cgraph.c (input_node): Likewise.
8300 * lto-streamer-out.c (write_symbol): Likewise.
8301 * omp-low.c (setjmp_or_longjmp_p): Likewise.
8302 (lower_omp_1): Likewise.
8303 * predict.c (strip_predict_hints): Likewise.
8304 * print-tree.c (print_node): Likewise.
8305 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8306 * trans-mem.c (is_tm_irrevocable): Likewise.
8307 (is_tm_load): Likewise.
8308 (is_tm_simple_load): Likewise.
8309 (is_tm_store): Likewise.
8310 (is_tm_simple_store): Likewise.
8311 (is_tm_abort): Likewise.
8312 (tm_region_init_1): Likewise.
8313 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8314 * tree-cfg.c (verify_gimple_call): Likewise.
8315 (move_stmt_r): Likewise.
8316 (stmt_can_terminate_bb_p): Likewise.
8317 * tree-eh.c (lower_eh_constructs_2): Likewise.
8318 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8319 * tree-inline.c (remap_gimple_stmt): Likewise.
8320 (copy_bb): Likewise.
8321 (estimate_num_insns): Likewise.
8322 (fold_marked_statements): Likewise.
8323 * tree-sra.c (scan_function): Likewise.
8324 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8325 (optimize_stack_restore): Likewise.
8326 (pass_fold_builtins::execute): Likewise.
8327 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8328 (mark_all_reaching_defs_necessary_1): Likewise.
8329 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8330 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8331 (pass_forwprop::execute): Likewise.
8332 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8333 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8334 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8335 * tree-ssa-strlen.c (get_string_length): Likewise.
8336 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8337 (find_func_aliases_for_call): Likewise.
8338 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8339 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8340 * tree-tailcall.c (find_tail_calls): Likewise.
8341 * tree.c (need_assembler_name_p): Likewise.
8342 (free_lang_data_in_decl): Likewise.
8343 (get_call_combined_fn): Likewise.
8344 * ubsan.c (is_ubsan_builtin_p): Likewise.
8345 * varasm.c (incorporeal_function_p): Likewise.
8346 * tree.h (DECL_BUILT_IN): Remove and replace with
8348 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8349 (fndecl_built_in_p): New.
8351 2018-08-27 Martin Liska <mliska@suse.cz>
8353 PR tree-optimization/86847
8354 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8355 Dump also subtree probability.
8356 (switch_decision_tree::do_jump_if_equal): New function.
8357 (switch_decision_tree::emit_case_nodes): Handle special
8358 situations in balanced tree that can be emitted much simpler.
8359 Fix calculation of probabilities that happen in tree expansion.
8360 * tree-switch-conversion.h (struct cluster): Add
8362 (struct simple_cluster): Likewise.
8363 (struct case_tree_node): Add new function has_child.
8364 (do_jump_if_equal): New.
8366 2018-08-27 Martin Liska <mliska@suse.cz>
8368 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8369 Add new argument to bit_test_cluster constructor.
8370 (bit_test_cluster::emit): Set bits really number of values
8372 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8373 probability argument.
8374 * tree-switch-conversion.h (struct bit_test_cluster):
8375 Add m_handles_entire_switch.
8377 2018-08-27 Martin Liska <mliska@suse.cz>
8379 PR tree-optimization/86702
8380 * tree-switch-conversion.c (jump_table_cluster::emit):
8381 Make probabilities even for values in jump table
8382 according to number of cases handled.
8383 (switch_decision_tree::compute_cases_per_edge): Pass
8384 argument to reset_out_edges_aux function.
8385 (switch_decision_tree::analyze_switch_statement): Likewise.
8386 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8389 2018-08-27 Martin Liska <mliska@suse.cz>
8391 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8392 cfun argument explicitly.
8393 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8394 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8395 function gimple_switch_default_bb.
8396 (convert_switch_statements):
8398 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8399 * stmt.c (label_to_block_fn): Use label_to_block and pass
8400 cfun argument explicitly and use gimple_switch_label_bb.
8401 (expand_case): Likewise.
8402 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8403 cfun argument explicitly. Likewise.
8404 (make_edges_bb): Likewise.
8405 (make_cond_expr_edges): Likewise.
8406 (get_cases_for_edge): Likewise.
8407 (make_gimple_switch_edges): Likewise.
8408 (label_to_block_fn): Likewise.
8409 (label_to_block): Likewise.
8410 (make_goto_expr_edges): Likewise.
8411 (make_gimple_asm_edges): Likewise.
8412 (main_block_label): Likewise.
8413 (group_case_labels_stmt): Likewise.
8414 (find_taken_edge_computed_goto): Likewise.
8415 (find_taken_edge_switch_expr): Likewise.
8416 (gimple_verify_flow_info): Likewise.
8417 (gimple_redirect_edge_and_branch): Likewise.
8418 (gimple_switch_label_bb): New function.
8419 (gimple_switch_default_bb): Likewise.
8420 (gimple_switch_edge): Likewise.
8421 (gimple_switch_default_edge): Likewise.
8422 * tree-cfg.h (label_to_block_fn): Remove and replace ...
8423 (label_to_block): ... with this.
8424 (gimple_switch_label_bb): New.
8425 (gimple_switch_default_bb): Likewise.
8426 (gimple_switch_edge): Likewise.
8427 (gimple_switch_default_edge): Likewise.
8428 * tree-cfgcleanup.c (convert_single_case_switch): Use
8429 new gimple functions and pass new argument to label_to_block.
8430 (cleanup_control_flow_bb):
8431 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8432 cfun argument explicitly.
8433 (make_eh_edges): Likewise.
8434 (redirect_eh_dispatch_edge): Likewise.
8435 (lower_resx): Likewise.
8436 (lower_eh_dispatch): Likewise.
8437 (maybe_remove_unreachable_handlers): Likewise.
8438 (unsplit_eh): Likewise.
8439 (cleanup_empty_eh): Likewise.
8440 (verify_eh_edges): Likewise.
8441 (verify_eh_dispatch_edge): Likewise.
8442 * tree-ssa-dom.c (record_edge_info): Likewise.
8443 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8444 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8445 (thread_through_normal_block): Likewise.
8446 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8447 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8448 * tree-switch-conversion.c (switch_conversion::collect): Use new
8450 (switch_conversion::check_final_bb): Likewise.
8451 (switch_conversion::gather_default_values): Pass new argument
8453 (switch_conversion::build_constructors): Likewise.
8454 (switch_decision_tree::compute_cases_per_edge): Use new
8455 gimple_switch_edge function.
8456 (switch_decision_tree::analyze_switch_statement): Pass new argument
8458 (switch_decision_tree::try_switch_expansion): Use
8459 gimple_switch_default_edge.
8460 * tree-vrp.c (find_switch_asserts): Pass new argument
8462 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8463 (vr_values::simplify_switch_using_ranges): Likewise.
8465 2018-08-27 Richard Biener <rguenther@suse.de>
8467 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8468 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8470 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8471 (struct vn_nary_op_s): Add unwind_to member. Add
8472 predicated_values flag and put result into a union together
8473 with a linked list of vn_pval.
8474 (struct vn_ssa_aux): Add name member to make maintaining
8475 a map of SSA name to vn_ssa_aux possible. Remove no longer
8476 needed info, dfsnum, low, visited, on_sccstack, use_processed
8477 and range_info_anti_range_p members.
8478 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8479 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8481 (vn_valueize): New global.
8482 (vn_context_bb): Likewise.
8483 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8484 VN_INFO_PTR_INFO): Remove.
8485 * tree-ssa-sccvn.c: ... (rewrite)
8486 (pass_fre::execute): For -O2+ initialize loops and run
8487 RPO VN in optimistic mode (iterating). For -O1 and -Og
8488 run RPO VN in non-optimistic mode.
8489 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8490 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8491 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8492 (rpo-vn-max-loop-depth): Document.
8493 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8494 when valuezing the VUSE signals we walked out of the region.
8495 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8496 (phi_translate): Set VN context block to use for availability
8498 (compute_avail): Likewise.
8499 (pre_valueize): New function.
8500 (pass_pre::execute): Adjust to the RPO VN API.
8502 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8503 (propagate_constants_for_unrolling): Remove.
8504 (tree_unroll_loops_completely): Perform value-numbering
8505 on the unrolled bodies loop parent.
8507 2018-08-27 Richard Biener <rguenther@suse.de>
8509 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8510 for partial antic compute.
8512 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8514 PR rtl-optimization/87065
8515 * combine.c (simplify_if_then_else): Formatting fix.
8516 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8518 (known_cond): Don't return const_true_rtx for vector modes. Use
8519 CONST0_RTX instead of const0_rtx. Formatting fixes.
8521 2018-08-27 Martin Liska <mliska@suse.cz>
8523 PR gcov-profile/87069
8524 * gcov.c (process_file): Record files already processed
8525 and warn about a file being processed multiple times.
8527 2018-08-27 Martin Liska <mliska@suse.cz>
8530 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8531 Set default values for x_aarch64_*_string strings.
8532 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8533 prefix. For -mabi do not print '=ABI' in help and use
8534 <option_value> format for -msve-vector-bits and -moverride
8537 2018-08-26 Jeff Law <law@redhat.com>
8539 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8542 2018-08-26 Marek Polacek <polacek@redhat.com>
8544 PR c++/87029, Implement -Wredundant-move.
8545 * doc/invoke.texi: Document -Wredundant-move.
8547 2018-08-25 Martin Sebor <msebor@redhat.com>
8549 PR tree-optimization/87059
8550 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8551 to the same type as the other.
8552 * fold-const.c (fold_binary_loc): Assert expectation.
8554 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
8556 * config/darwin.c (machopic_legitimize_pic_address): Clean up
8557 extraneous parentheses, dead code section and formatting.
8559 2018-08-24 David Malcolm <dmalcolm@redhat.com>
8562 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8563 wide enough for jumps in the line-numbering to be visible.
8564 (layout::print_gap_in_line_numbering): New member function.
8565 (layout::calculate_line_spans): When using line numbering, merge
8566 line spans that are only 1 line apart.
8567 (diagnostic_show_locus): When printing line numbers, show gaps in
8568 line numbering directly, rather than printing headers.
8569 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8570 line-numbering with multiple line spans.
8571 (selftest::test_fixit_insert_containing_newline_2): Add test of
8572 line-numbering, in which the spans are close enough to be merged.
8574 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8576 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8577 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
8578 * tree-vrp.c (range_is_nonnull): Remove.
8579 (range_includes_zero_p): Accept value_range instead of min/max.
8580 (extract_range_from_binary_expr_1): Do not early bail on
8582 Use range_includes_zero_p instead of range_is_nonnull.
8583 (extract_range_from_unary_expr): Use range_includes_zero_p instead
8584 of range_is_nonnull.
8585 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
8586 special case VR_ANTI_RANGE.
8587 (vrp_finalize): Same.
8588 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8590 (range_is_nonnull): Remove.
8591 * vr-values.c (vrp_stmt_computes_nonzero): Use
8592 range_includes_zero_p instead of range_is_nonnull.
8593 (extract_range_basic): Pass value_range to range_includes_zero_p
8594 instead of range_is_nonnull.
8596 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
8598 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8599 * emit-rtl.h (rtl_data): Remove return_bnd.
8600 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8601 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8602 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8603 (POINTER_BOUNDS_MODE): Remove definition.
8604 (make_pointer_bounds_mode): Remove.
8605 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8606 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8607 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8608 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8609 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8610 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8611 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8613 * config/i386/i386-modes.def (BND32, BND64): Remove.
8614 * config/i386/i386.c (dbx_register_map): Remove bound registers.
8615 (dbx64_register_map): Ditto.
8616 (svr4_dbx_register_map): Ditto.
8617 (indirect_thunk_bnd_needed): Remove.
8618 (indirect_thunks_bnd_used): Ditto.
8619 (indirect_return_bnd_needed): Ditto.
8620 (indirect_return_via_cx_bnd): Ditto.
8621 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8622 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8623 (output_indirect_thunk): Ditto. Remove need_prefix argument.
8624 (output_indirect_thunk_function): Remove handling of
8625 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8626 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8627 (ix86_save_reg): Remove handling of crtl->return_bnd.
8628 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8629 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8630 and UNSPEC_BNDLX_ADDR.
8631 (ix86_output_indirect_branch_via_reg): Remove handling of
8632 indirect_thunk_prefix_bnd.
8633 (ix86_output_indirect_branch_via_push): Ditto.
8634 (ix86_output_function_return): Ditto.
8635 (ix86_output_indirect_function_return): Ditto.
8636 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8637 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8638 (CALL_USED_REGISTERS): Ditto.
8639 (REG_ALLOC_ORDER): Update for removal of bound registers.
8640 (HI_REGISTER_NAMES): Ditto.
8641 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8642 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8643 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8644 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8645 (FIRST_PSEUDO_REG): Update.
8646 (BND): Remove mode iterator.
8647 * config/i386/predicates.md (bnd_mem_operator): Remove.
8649 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8651 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8654 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8656 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8657 the case in which the permute needs only a single element and
8658 repeats for every vector of the result. Extend that case to
8659 handle variable-length vectors.
8660 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8662 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
8665 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8666 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8668 2018-08-24 Richard Biener <rguenther@suse.de>
8670 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8671 bb_flags_allocated members.
8672 (auto_flag): New RAII class for allocating flags.
8673 (auto_edge_flag): New RAII class for allocating edge flags.
8674 (auto_bb_flag): New RAII class for allocating bb flags.
8675 * cfgloop.c (verify_loop_structure): Allocate temporary edge
8677 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8678 in favor of temporarily allocated BB flag.
8679 * hsa-brig.c: Re-order includes.
8680 * hsa-dump.c: Likewise.
8681 * hsa-regalloc.c: Likewise.
8682 * print-rtl.c: Likewise.
8683 * profile-count.c: Likewise.
8685 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
8688 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8691 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8694 * wide-int-range.cc (wide_int_range_div): Do not ignore result
8695 from wide_int_range_multiplicative_op.
8697 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8699 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8702 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
8704 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8707 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
8709 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8710 full GENERIC expression used for replacement.
8712 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
8714 * tree-vrp.c (abs_extent_range): Remove.
8715 (extract_range_into_wide_ints): Pass wide ints by reference.
8716 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8717 Pass wide ints by reference in all calls to
8718 extract_range_into_wide_ints.
8719 * wide-int-range.cc (wide_int_range_div): New.
8720 * wide-int-range.h (wide_int_range_div): New.
8721 (wide_int_range_includes_zero_p): New.
8722 (wide_int_range_zero_p): New.
8724 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
8726 * config/aarch64/aarch64.md (arches): New enum.
8727 (arch): New enum attr.
8728 (arch_enabled): New attr.
8729 (enabled): Now uses arch_enabled only.
8730 (simd, sve, fp16): Removed attribute.
8731 (fp): Attr now defined in terms of 'arch'.
8732 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8733 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8734 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8735 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8736 attributes into 'arch'.
8737 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8738 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8739 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8740 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8741 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8742 'simd' attribute into 'arch'.
8743 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8744 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8745 Convert use of 'fp' attribute to 'arch'.
8746 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8747 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8749 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8750 (different modes) Merge 'fp' and 'simd' into 'arch'.
8751 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8754 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
8756 PR rtl-optimization/87026
8757 * expmed.c (canonicalize_comparison): If we can no longer create
8758 pseudoregisters, don't.
8760 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
8763 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8765 * config/arm/arm.c (speculation_barrier_libfunc): New static
8767 (arm_init_libfuncs): Initialize it.
8768 (arm_emit_speculation_barrier): New function.
8769 * config/arm/arm.md (speculation_barrier): Call
8770 arm_emit_speculation_barrier for architectures that do not have
8772 (speculation_barrier_insn): Only match on Armv7 or later.
8774 2018-08-23 Richard Biener <rguenther@suse.de>
8777 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8780 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8782 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8783 of single-vector TBLs.
8784 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8787 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8790 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8791 aarch64_evpc_tbl guard.
8793 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
8795 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8798 2018-08-22 Martin Sebor <msebor@redhat.com>
8801 * tree-pretty-print.c (pretty_print_string): Add argument.
8802 (dump_generic_node): Call to pretty_print_string with string size.
8804 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
8806 PR rtl-optimization/86771
8807 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8808 of two SETs into those two SETs, one to be placed at i2, if that SETs
8809 destination is modified between i2 and i3.
8811 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8813 PR tree-optimization/86725
8814 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8816 (vect_analyze_scalar_cycles_1): Check it.
8818 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8820 PR tree-optimization/86725
8821 * tree-vect-loop.c (vect_is_simple_reduction): When treating
8822 an outer loop phi as a double reduction, make sure that the
8823 single user of the phi result is an inner loop phi.
8825 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8827 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8828 grouped stores with gaps to a strided group.
8830 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8832 * tree-vect-stmts.c (get_group_load_store_type)
8833 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8834 first statement in a group.
8836 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8838 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8839 the sequence used in gcc/gcc.c.
8841 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8844 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8847 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8849 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8850 Darwin10-specific unwinder-shim.
8851 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8852 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8853 New to cater for Darwin10 Rosetta.
8855 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8857 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8858 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8860 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8865 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8866 (dwarf2out_switch_text_section): Generate a local label for the
8867 second function sub-section and apply it as the second FDE start
8869 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8870 second sub-section start.
8872 2018-08-22 Richard Biener <rguenther@suse.de>
8874 PR tree-optimization/86988
8875 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8877 2018-08-22 Richard Biener <rguenther@suse.de>
8879 PR tree-optimization/86945
8880 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8882 2018-08-22 Alexandre Oliva <oliva@adacore.com>
8884 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8885 a comment about how uses of r2 for .sdata2 come about.
8887 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8889 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8891 2018-08-21 Marek Polacek <polacek@redhat.com>
8893 PR c++/86981, Implement -Wpessimizing-move.
8894 * doc/invoke.texi: Document -Wpessimizing-move.
8896 2018-08-21 Jan Hubicka <jh@suse.cz>
8898 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8899 * tree.h (is_redundant_typedef): Remove.
8900 * dwarf2out.c (is_redundant_typedef): Turn into static function.
8902 2018-08-21 Jan Hubicka <jh@suse.cz>
8904 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8907 2018-08-21 Tamar Christina <tamar.christina@arm.com>
8909 * expmed.c (extract_low_bits): Reject invalid subregs early.
8911 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8914 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8917 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8919 * config/vxworks.h: Guard vxworks_asm_out_constructor and
8920 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8921 * config/vxworks.c: Likewise.
8923 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8925 * config/vxworks.c: Set targetm.have_ctors_dtors
8926 if HAVE_INITFINI_ARRAY_SUPPORT.
8927 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8928 if HAVE_INITFINI_ARRAY_SUPPORT.
8930 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8932 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8933 default search path for VxWorks < 7.
8935 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8937 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8938 (get_format_string): Refer to c_getstr.
8940 2018-08-21 Tom de Vries <tdevries@suse.de>
8942 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8943 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8944 (debuginfo_early_stop): Declare.
8945 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8946 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8947 (debuginfo_early_stop): New function.
8948 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8949 and debuginfo_early_stop.
8950 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8951 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8952 (general_init): Call debuginfo_early_init.
8953 (finalize): Call debuginfo_fini.
8954 (do_compile): Call debuginfo_init.
8955 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8957 (@item -fdump-debug, @item -fdump-earlydebug): Add.
8959 2018-08-21 Tom de Vries <tdevries@suse.de>
8961 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8962 flag_dump_noaddr and flag_dump_unnumbered.
8964 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
8966 * wide-int-range.cc (wide_int_range_abs): New.
8967 (wide_int_range_order_set): Rename from wide_int_range_min_max.
8968 * wide-int-range.h (wide_int_range_abs): New.
8969 (wide_int_range_min_max): New.
8970 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8971 case to call wide_int_range_abs.
8972 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8973 (extract_range_from_abs_expr): Delete.
8975 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
8978 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8979 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8982 2018-08-20 Nathan Sidwell <nathan@acm.org>
8983 Jeff Law <law@redhat.com>
8985 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8986 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8988 2018-08-20 David Malcolm <dmalcolm@redhat.com>
8991 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8992 (decl_attributes): Likewise.
8993 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8995 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8996 * diagnostic-core.h (class auto_diagnostic_group): New class.
8997 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8998 (diagnostic_report_diagnostic): Handle the first diagnostics within
9000 (emit_diagnostic): Add auto_diagnostic_group instance.
9002 (inform_n): Likewise.
9003 (warning): Likewise.
9004 (warning_at): Likewise.
9005 (warning_n): Likewise.
9006 (pedwarn): Likewise.
9007 (permerror): Likewise.
9009 (error_n): Likewise.
9010 (error_at): Likewise.
9012 (fatal_error): Likewise.
9013 (internal_error): Likewise.
9014 (internal_error_no_backtrace): Likewise.
9015 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
9016 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
9017 * diagnostic.h (struct diagnostic_context): Add fields
9018 "diagnostic_group_nesting_depth",
9019 "diagnostic_group_emission_count", "begin_group_cb",
9021 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
9022 Add auto_diagnostic_group instance(s).
9023 (find_explicit_erroneous_behavior): Likewise.
9024 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
9025 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
9026 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
9027 (gimplify_va_arg_expr): Likewise.
9028 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
9029 (HSA_SORRY_AT): Likewise.
9030 * ipa-devirt.c (compare_virtual_tables): Likewise.
9031 (warn_odr): Likewise.
9032 * multiple_target.c (expand_target_clones): Likewise.
9033 * opts-common.c (cmdline_handle_error): Likewise.
9034 * reginfo.c (globalize_reg): Likewise.
9035 * substring-locations.c (format_warning_n_va): Likewise.
9036 * tree-inline.c (expand_call_inline): Likewise.
9037 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
9038 * tree-ssa-loop-niter.c
9039 (do_warn_aggressive_loop_optimizations): Likewise.
9040 * tree-ssa-uninit.c (warn_uninit): Likewise.
9041 * tree.c (warn_deprecated_use): Likewise.
9043 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
9046 * config/i386/i386.md (eh_return): Always update EH return
9047 address in word_mode.
9049 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
9051 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
9052 TARGET_SPLIT_COMPLEX_ARG is defined.
9054 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9056 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
9058 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9061 * expr.c (expand_assignment): Assert that bitpos is positive.
9062 (store_field): Likewise
9063 (expand_expr_real_1): Make sure that bitpos is positive.
9064 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
9067 2018-08-20 Nathan Sidwell <nathan@acm.org>
9069 * Makefile.in (CPP_ID_DATA_H): Delete.
9070 (CPP_INTERNAL_H): Don't add it.
9071 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
9072 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
9074 2018-08-20 Richard Biener <rguenther@suse.de>
9076 PR tree-optimization/78655
9077 * tree-vrp.c (extract_range_from_binary_expr_1): Make
9078 pointer + offset nonnull if either operand is nonnull work.
9080 2018-08-20 Tom de Vries <tdevries@suse.de>
9082 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
9083 unless the referenced die describes the added property using
9084 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
9085 Otherwise, add a DW_AT_location to the referenced die.
9087 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
9090 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
9091 register_operand when calling ix86_set_reg_reg_cost.
9092 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
9093 Set *total to 0 for operands that satisfy x86_64_immediate_operand
9094 predicate and to 1 otherwise.
9096 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
9098 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
9099 emit a diagnostic that it is not supported and reset the option.
9100 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
9101 supported and consume the option. (ASM_FINAL_SPEC): New.
9103 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9105 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
9108 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
9110 C-SKY port: Documentation
9112 * doc/extend.texi (C-SKY Function Attributes): New section.
9113 * doc/invoke.texi (Option Summary): Add C-SKY options.
9114 (C-SKY Options): New section.
9115 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
9117 2018-08-17 Jojo <jijie_rong@c-sky.com>
9118 Huibin Wang <huibin_wang@c-sky.com>
9119 Sandra Loosemore <sandra@codesourcery.com>
9120 Chung-Lin Tang <cltang@codesourcery.com>
9122 C-SKY port: Backend implementation
9124 * config/csky/*: New.
9125 * common/config/csky/*: New.
9127 2018-08-17 Jojo <jijie_rong@c-sky.com>
9128 Huibin Wang <huibin_wang@c-sky.com>
9129 Sandra Loosemore <sandra@codesourcery.com>
9130 Chung-Lin Tang <cltang@codesourcery.com>
9131 Andrew Jenner <andrew@codesourcery.com>
9133 C-SKY port: Configury
9135 * config.gcc (csky-*-*): New.
9136 * configure.ac: Add csky to targets for dwarf2 debug_line support.
9137 * configure: Regenerated.
9139 2018-08-17 David Malcolm <dmalcolm@redhat.com>
9141 * dump-context.h: Include "dumpfile.h".
9142 (dump_context::dump_printf_va): Convert final param from va_list
9143 to va_list *. Convert from ATTRIBUTE_PRINTF to
9144 ATTRIBUTE_GCC_DUMP_PRINTF.
9145 (dump_context::dump_printf_loc_va): Likewise.
9146 * dumpfile.c: Include "stringpool.h".
9147 (make_item_for_dump_printf_va): Delete.
9148 (make_item_for_dump_printf): Delete.
9149 (class dump_pretty_printer): New class.
9150 (dump_pretty_printer::dump_pretty_printer): New ctor.
9151 (dump_pretty_printer::emit_items): New member function.
9152 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
9154 (dump_pretty_printer::emit_item): New member function.
9155 (dump_pretty_printer::stash_item): New member function.
9156 (dump_pretty_printer::format_decoder_cb): New member function.
9157 (dump_pretty_printer::decode_format): New member function.
9158 (dump_context::dump_printf_va): Reimplement in terms of
9159 dump_pretty_printer.
9160 (dump_context::dump_printf_loc_va): Convert final param from va_list
9162 (dump_context::begin_scope): Reimplement call to
9163 make_item_for_dump_printf.
9164 (dump_printf): Update for change to dump_printf_va.
9165 (dump_printf_loc): Likewise.
9166 (selftest::test_capture_of_dump_calls): Convert "stmt" from
9167 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
9168 with %T, %E, and %G.
9169 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9170 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9171 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9172 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9173 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9174 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9175 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9176 within a dump_printf_loc call to "%wu".
9177 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9178 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
9179 missing space after "=".
9180 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9181 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9182 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9183 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9184 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
9185 duplicate "vectorized" from message.
9187 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
9189 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9190 polyNxK_t element's TYPE_STRING_FLAG.
9192 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9194 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9195 (they were unnamed before). Fix comments.
9197 2018-08-17 Nathan Sidwell <nathan@acm.org>
9199 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9201 2018-08-17 Richard Biener <rguenther@suse.de>
9203 PR tree-optimization/86841
9204 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9206 2018-08-17 Martin Liska <mliska@suse.cz>
9208 * common.opt: Remove Warn, Init and Report for options with
9209 Ignore/Deprecated flag. Warning is done automatically for
9211 * config/i386/i386.opt: Likewise.
9212 * config/ia64/ia64.opt: Likewise.
9213 * config/rs6000/rs6000.opt: Likewise.
9214 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9215 Remove usage of flag_check_pointer_bounds.
9216 * lto-wrapper.c (merge_and_complain): Do not handle
9217 OPT_fcheck_pointer_bounds.
9218 (append_compiler_options): Likewise.
9219 * opt-functions.awk: Do not handle Deprecated.
9220 * optc-gen.awk: Check that Var, Report and Init are not
9221 used for an option with Ignore/Deprecated flag.
9222 * opts-common.c (decode_cmdline_option): Do not report
9224 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9226 * opts.h (struct cl_option): Remove cl_deprecated flag.
9227 (CL_ERR_DEPRECATED): Remove error enum value.
9229 2018-08-17 Richard Biener <rguenther@suse.de>
9232 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9233 across a va-arg-pack using call adjust its return value accordingly.
9235 2018-08-16 Martin Sebor <msebor@redhat.com>
9237 PR tree-optimization/86853
9238 * gimple-ssa-sprintf.c (struct format_result): Rename member.
9239 (struct fmtresult): Add member and initialize it in ctors.
9240 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
9241 (format_string): Handle %S the same as %ls. Set MAYFAIL.
9242 (format_directive): Set POSUNDER4K when MAYFAIL is set.
9243 (parse_directive): Handle %C same as %c.
9244 (sprintf_dom_walker::compute_format_length): Adjust.
9245 (is_call_safe): Adjust.
9247 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9249 * builtins.c (c_strlen): Add new parameter eltsize. Use it
9250 for determining how to count the elements.
9251 * builtins.h (c_strlen): Adjust prototype.
9252 * expr.c (string_constant): Add new parameter mem_size.
9253 Set *mem_size appropriately.
9254 * expr.h (string_constant): Adjust protoype.
9255 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9256 * gimple-fold.h (get_range_strlen): Adjust prototype.
9257 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9258 (format_string): Call get_string_length with eltsize.
9260 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9262 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9263 to emit the span, rather than setting it as the prefix.
9265 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9267 * diagnostic-show-locus.c (layout::start_annotation_line): Add
9268 "margin_char" parameter, defaulting to space. Use it in place
9269 of pp_space for the initial part of the margin.
9270 (layout::print_leading_fixits): Use '+' when filling the margin
9271 of line-insertion fix-it hints.
9273 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9275 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9278 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9280 * config/rs6000/altivec.md: Don't set length attribute to the default
9282 * config/rs6000/darwin.md: Ditto.
9283 * config/rs6000/dfp.md: Ditto.
9284 * config/rs6000/htm.md: Ditto.
9285 * config/rs6000/rs6000.md: Ditto.
9286 * config/rs6000/sync.md: Ditto.
9287 * config/rs6000/vsx.md: Ditto.
9289 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9291 * config/rs6000/altivec.md: Don't set length attribute to the default
9292 value, for branch instructions.
9293 * config/rs6000/darwin.md: Ditto.
9294 * config/rs6000/rs6000.md: Ditto.
9296 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9298 * config/rs6000/rs6000.md (length): Always define as const_int 4.
9299 (unnamed conditional branch define_insn): Set length to 4 or 8
9300 depending on offset.
9301 (<bd>_<mode>): Similar, for alternative 0.
9302 (<bd>tf_<mode>): Ditto.
9304 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9306 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9308 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
9310 * doc/rtl.texi: Replace old RTX class names with new names.
9313 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
9315 * expmed.h (canonicalize_comparison): New declaration.
9316 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9317 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9318 * optabs.c (prepare_cmp_insn): Likewise.
9319 * rtl.h (unsigned_condition_p): New function which checks if a
9320 comparison operator is unsigned.
9322 2018-08-16 Nathan Sidwell <nathan@acm.org>
9324 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9325 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9327 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9330 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9331 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9332 (mov<mov>): ..this and enable unconditionally.
9334 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9336 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9338 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
9340 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9341 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9342 "Common" with "Target".
9344 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9346 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9347 * doc/invoke.texi (mmitigate-rop): Remove.
9348 * config/i386/i386.c: Do not include "regrename.h".
9349 (ix86_rop_should_change_byte_p, reg_encoded_number)
9350 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9352 (ix86_reorg): Remove call to ix86_mitigate_rop.
9353 * config/i386/i386.md (attr "modrm_class"): Remove.
9354 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9355 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9356 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9358 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
9360 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9361 allow folding of mergeh() and mergel() for the float and double types.
9362 (fold_mergehl_helper): Rework to handle building a permute tree
9365 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9367 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9370 2018-08-15 David Malcolm <dmalcolm@redhat.com>
9372 * common.opt (fdiagnostics-show-labels): New option.
9373 * diagnostic-show-locus.c (class layout_range): Add field
9375 (class layout): Add field "m_show_labels_p".
9376 (layout_range::layout_range): Add param "label" and use it to
9378 (make_range): Pass in NULL for new "label" param of layout_range's
9380 (layout::layout): Initialize m_show_labels_p.
9381 (layout::maybe_add_location_range): Pass in loc_range->m_label
9382 when constructing layout_range instances.
9383 (struct line_label): New struct.
9384 (layout::print_any_labels): New member function.
9385 (layout::print_line): Call it if label-printing is enabled.
9386 (selftest::test_one_liner_labels): New test.
9387 (selftest::test_diagnostic_show_locus_one_liner): Call it.
9388 * diagnostic.c (diagnostic_initialize): Initialize
9389 context->show_labels_p.
9390 * diagnostic.h (struct diagnostic_context): Add field
9392 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9393 -fno-diagnostics-show-labels.
9394 * dwarf2out.c (gen_producer_string): Add
9395 OPT_fdiagnostics_show_labels to the ignored options.
9396 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9398 (gcc_rich_location::maybe_add_expr): Likewise.
9399 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9400 label" param, defaulting to NULL.
9401 (gcc_rich_location::add_expr): Add "label" param.
9402 (gcc_rich_location::maybe_add_expr): Likewise.
9403 (class text_range_label): New class.
9404 (class range_label_for_type_mismatch): New class.
9405 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9406 of format_warning_va.
9407 (fmtwarn_n): Likewise for new params of format_warning_n_va.
9408 * lto-wrapper.c (merge_and_complain): Add
9409 OPT_fdiagnostics_show_labels to the "pick one setting" options.
9410 (append_compiler_options): Likewise to the dropped options.
9411 (append_diag_options): Likewise to the passed-on options.
9412 * opts.c (common_handle_option): Handle the new option.
9413 * selftest-diagnostic.c
9414 (test_diagnostic_context::test_diagnostic_context): Enable
9416 * substring-locations.c: Include "gcc-rich-location.h".
9417 (format_warning_n_va): Add "fmt_label" and "param_label" params
9418 and use them as appropriate.
9419 (format_warning_va): Add "fmt_label" and "param_label" params,
9420 passing them on to format_warning_n_va.
9421 (format_warning_at_substring): Likewise.
9422 (format_warning_at_substring_n): Likewise.
9423 * substring-locations.h (format_warning_va): Add "fmt_label" and
9424 "param_label" params.
9425 (format_warning_n_va): Likewise.
9426 (format_warning_at_substring): Likewise.
9427 (format_warning_at_substring_n): Likewise.
9428 * toplev.c (general_init): Initialize global_dc->show_labels_p.
9430 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
9433 * builtins.c (expand_builtin_memcmp): Do not expand the call
9434 when overflow is detected.
9436 2018-08-15 Martin Sebor <msebor@redhat.com>
9438 PR tree-optimization/71625
9439 * config/aarch64/aarch64-builtins.c
9440 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9442 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
9444 * config/s390/s390.c (s390_reorg): Remove loop.
9446 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9449 (darwin_function_switched_text_sections): Delete.
9450 * gcc/config/darwin.h
9451 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9453 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9456 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9457 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
9458 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9460 2018-08-15 Martin Liska <mliska@suse.cz>
9462 PR tree-optimization/86925
9463 * predict.c (expr_expected_value_1): When taking
9464 later predictor, assign also probability.
9465 Use fold_build2_initializer_loc in order to fold
9466 the expression in -frounding-math.
9468 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9470 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9472 (expand_vec_perm_1): Try the new method.
9474 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9477 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9478 Check whether lra_live_max_point is 0 before dividing.
9480 2018-08-14 Martin Sebor <msebor@redhat.com>
9482 PR tree-optimization/86650
9483 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9484 (vrp_prop::check_mem_ref): Same.
9486 2018-08-13 Liu Hao <lh_mouse@126.com>
9488 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9489 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9490 and clear it thereafter, as it only works for DBCS.
9492 2018-08-13 Liu Hao <lh_mouse@126.com>
9494 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9495 handle returned by _get_osf_handle().
9497 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9499 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9500 for folding vec_perm.
9502 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9504 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9505 Add support for gimple-folding of vec_pack() and vec_unpack()
9508 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9510 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9511 vec_xst variants to the list.
9512 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9513 vector loads and stores.
9515 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9517 * config.gcc (rs6000-ibm-aix4.x): Delete.
9518 (rs6000-ibm-aix5.1): Delete.
9519 (rs6000-ibm-aix5.2): Delete.
9520 (rs6000-ibm-aix5.3): Delete.
9521 * config/rs6000/aix43.h: Delete.
9522 * config/rs6000/aix51.h: Delete.
9523 * config/rs6000/aix52.h: Delete.
9524 * config/rs6000/t-aix43: Delete.
9526 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9528 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9530 (s390_decompose_address): Factor out constant pool ref
9533 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9535 * config/nds32/nds32-predicates.c
9536 (nds32_can_use_bclr_p): Change return type as bool.
9537 (nds32_can_use_bset_p): Ditto.
9538 (nds32_can_use_btgl_p): Ditto.
9539 (nds32_can_use_bitci_p): Ditto.
9540 * config/nds32/nds32-protos.h
9541 (nds32_can_use_bclr_p): Change declaration.
9542 (nds32_can_use_bset_p): Ditto.
9543 (nds32_can_use_btgl_p): Ditto.
9544 (nds32_can_use_bitci_p): Ditto.
9546 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9548 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9549 Support -msched-prolog-epilog option.
9550 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9552 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9554 * common/config/nds32/nds32-common.c
9555 (nds32_option_optimization_table): Enalbe -malways-align.
9557 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9559 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9561 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9562 OPT_misr_secure_ case.
9563 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9564 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9565 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9567 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9568 (nds32_isr_info): New field security_level.
9569 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9570 * config/nds32/nds32.md (return_internal): Consider critical attribute.
9571 * config/nds32/nds32.opt (misr-secure): New option.
9572 * config/nds32/nds32_init.inc: New file.
9573 * config/nds32/nds32_isr.h: New file.
9575 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
9577 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9578 Update comment for atomic instructions.
9579 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9580 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9582 (atomic_loaddi): Revise fence expansion to only emit fence prior to
9583 load for __ATOMIC_SEQ_CST model.
9584 (atomic_loaddi_1): Remove float register target.
9585 (atomic_storedi): Handle CONST_INT values.
9586 (atomic_storedi_1): Remove float register source. Add special case
9588 (memory_barrier): New expander and insn.
9590 2018-08-11 Jakub Jelinek <jakub@redhat.com>
9592 PR tree-optimization/86835
9593 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9594 new_stmt after def_gsi, make sure to insert new_square_stmt after
9595 that stmt, not 2 stmts before it.
9597 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
9600 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9603 2018-08-10 Martin Liska <mliska@suse.cz>
9606 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9608 * builtins.c (expand_builtin_expect_with_probability):
9610 (expand_builtin_expect_with_probability): New function.
9611 (build_builtin_expect_predicate): Add new argumnet probability
9612 for BUILT_IN_EXPECT_WITH_PROBABILITY.
9613 (fold_builtin_expect):
9616 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9617 * builtins.h (fold_builtin_expect): Set new argument.
9618 * doc/extend.texi: Document __builtin_expect_with_probability.
9619 * doc/invoke.texi: Likewise.
9620 * gimple-fold.c (gimple_fold_call): Pass new argument.
9621 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9622 also BUILT_IN_EXPECT_WITH_PROBABILITY.
9623 * predict.c (get_predictor_value): New function.
9624 (expr_expected_value): Add new argument probability. Assume
9625 that predictor and probability are always non-null.
9626 (expr_expected_value_1): Likewise. For __builtin_expect and
9627 __builtin_expect_with_probability set probability. Handle
9628 combination in binary expressions.
9629 (tree_predict_by_opcode): Simplify code by simply calling
9630 get_predictor_value.
9631 (pass_strip_predict_hints::execute): Add handling of
9632 BUILT_IN_EXPECT_WITH_PROBABILITY.
9633 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9635 * tree.h (DECL_BUILT_IN_P): New function.
9637 2018-08-10 Martin Liska <mliska@suse.cz>
9639 PR tree-optimization/85799
9640 * passes.def: Add argument for pass_strip_predict_hints.
9641 * predict.c (class pass_strip_predict_hints): Add new argument
9643 (strip_predictor_early): New function.
9644 (pass_strip_predict_hints::execute): Call the function to
9646 (strip_predict_hints): New function.
9647 * predict.def: Fix comment.
9649 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
9651 * Makefile.in: Clarify which tm.texi to copy over to assert the
9652 right to grant a GFDL license for all.
9654 2018-08-09 Jeff Law <law@redhat.com>
9656 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9659 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
9661 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9664 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9666 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9667 reductions for variable-length vectors.
9669 2018-08-09 David Malcolm <dmalcolm@redhat.com>
9672 * common.opt (fdiagnostics-show-line-numbers): New option.
9673 * diagnostic-show-locus.c (class layout): Add fields
9674 "m_show_line_numbers_p" and "m_linenum_width";
9675 (num_digits): New function.
9676 (test_num_digits): New function.
9677 (layout::layout): Initialize new fields. Update m_x_offset
9678 logic to handle any left margin.
9679 (layout::print_source_line): Print line number when requested.
9680 (layout::start_annotation_line): New member function.
9681 (layout::print_annotation_line): Call it.
9682 (layout::print_leading_fixits): Likewise.
9683 (layout::print_trailing_fixits): Likewise. Update calls to
9684 move_to_column for new parameter.
9685 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9686 it to potentially call start_annotation_line.
9687 (layout::show_ruler): Call start_annotation_line.
9688 (selftest::test_line_numbers_multiline_range): New selftest.
9689 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9690 and selftest::test_line_numbers_multiline_range.
9691 * diagnostic.c (diagnostic_initialize): Initialize
9692 show_line_numbers_p.
9693 * diagnostic.h (struct diagnostic_context): Add field
9694 "show_line_numbers_p".
9695 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9696 -fno-diagnostics-show-line-numbers.
9697 * dwarf2out.c (gen_producer_string): Add
9698 OPT_fdiagnostics_show_line_numbers to the ignored options.
9699 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9700 one setting" options.
9701 (append_compiler_options): Likewise to the dropped options.
9702 (append_diag_options): Likewise to the passed-on options.
9703 * opts.c (common_handle_option): Handle the new option.
9704 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9706 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
9708 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9709 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
9710 third argument of type "const signed char" to descriptions of
9711 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9712 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9713 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9714 __builtin_bcdsub_ov functions.
9716 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9718 PR tree-optimization/86858
9719 * tree-vect-loop.c (vect_is_simple_reduction): Restore
9720 flow_bb_inside_loop_p calls.
9722 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9724 PR tree-optimization/86871
9725 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9726 instead of gimple_assign_lhs.
9728 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
9731 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9732 register constraint to operand 0.
9733 (add<mode>3_carryinC): Likewise.
9734 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9736 2018-08-09 Martin Liska <mliska@suse.cz>
9739 * common.opt: Remove extra line.
9741 2018-08-09 Martin Liska <mliska@suse.cz>
9743 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9744 at the end of a line, make first letter capital and end up
9745 a sentence with a dot.
9746 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9747 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9748 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9749 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9750 (PARAM_MAX_ISL_OPERATIONS): Likewise.
9751 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9752 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9753 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9754 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9755 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9756 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9757 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9758 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9759 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9760 (PARAM_TREE_REASSOC_WIDTH): Likewise.
9761 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9762 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9763 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9765 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
9768 * config/s390/s390.c (s390_option_override_internal): Reduce the
9769 stack-clash-protection-probe-interval param if it would be too big
9772 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
9775 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9776 * config/m68k/m68k.c (handle_move_double): Don't call
9777 m68k_final_prescan_insn.
9778 (m68k_adjust_decorated_operand): Renamed from
9779 m68k_final_prescan_insn, remove first and third operand and
9781 (print_operand): Call it.
9782 (print_operand_address): Call it.
9784 2018-08-08 Nathan Sidwell <nathan@acm.org>
9786 * diagnostic.c (diagnostic_report_current_module): Use
9787 linemap_included_from & linemap_included_from_linemap.
9789 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
9791 * config/aarch64/aarch64-cores.def: Add phecda core.
9792 * config/aarch64/aarch64-tune.md: Regenerate.
9793 * doc/invoke.texi: Add phecda core.
9795 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9798 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9800 * config/s390/s390.md ("movti"): Add more alternatives for
9801 constant to GPR copies.
9803 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9805 * config/s390/s390.c: Fix whitespace damage throughout the file.
9806 * config/s390/s390.h: Likewise.
9807 * config/s390/tpf.h: Likewise.
9809 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9811 * config/s390/s390.c (s390_loadrelative_operand_p):
9812 Remove TARGET_CPU_ZARCH usages.
9813 (s390_rtx_costs): Likewise.
9814 (s390_legitimate_constant_p): Likewise.
9815 (s390_cannot_force_const_mem): Likewise.
9816 (legitimate_reload_constant_p): Likewise.
9817 (s390_preferred_reload_class): Likewise.
9818 (legitimize_pic_address): Likewise.
9819 (legitimize_tls_address): Likewise.
9820 (s390_split_branches): Removed.
9821 (s390_add_execute): Removed.
9822 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9823 (s390_mainpool_start): Likewise.
9824 (s390_mainpool_finish): Likewise.
9825 (s390_mainpool_cancel): Removed.
9826 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9827 (s390_chunkify_cancel): Likewise.
9828 (s390_return_addr_rtx): Likewise.
9829 (s390_register_info): Remove split_branches_pending_p uages.
9830 (s390_optimize_register_info): Likewise.
9831 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9832 split_branches_pending_p usages.
9833 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9834 (s390_load_got): Likewise.
9835 (s390_expand_split_stack_prologue): Likewise.
9836 (output_asm_nops): Likewise.
9837 (s390_function_profiler): Likewise.
9838 (s390_emit_call): Likewise.
9839 (s390_conditional_register_usage): Likewise.
9840 (s390_optimize_prologue): Likewise.
9841 (s390_reorg): Remove TARGET_CPU_ZARCH and
9842 split_branches_pending_p usages.
9843 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9845 (s390_output_indirect_thunk_function): Likewise.
9846 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9847 (TARGET_CPU_ZARCH_P): Removed.
9848 (struct machine_function): Remove split_branches_pending_p.
9849 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9851 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9853 * common/config/s390/s390-common.c (processor_flags_table):
9855 * config.gcc: Remove with_arch/with_tune support.
9856 * config/s390/2064.md: Remove cpu attribute comparisons.
9857 * config/s390/driver-native.c (s390_host_detect_local_cpu):
9859 * config/s390/linux.h (ASM_SPEC):
9860 Remove -march support.
9861 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9862 Use a table to get an arch level.
9863 * config/s390/s390-opts.h (enum processor_type):
9865 * config/s390/s390.c
9866 (processor_table): Remove entries, add arch_level values.
9867 (s390_issue_rate): Remove cases.
9868 (s390_option_override): Adjust
9869 s390_option_override_internal() call.
9870 (s390_option_override_internal): Remove deprecation warning.
9871 (s390_valid_target_attribute_tree): Adjust
9872 s390_option_override_internal() call.
9873 * config/s390/s390.h (struct s390_processor):
9874 Share with s390-c.c, add arch_level field.
9875 * config/s390/s390.md:
9876 Remove occurrences in cpu attribute.
9877 * config/s390/s390.opt: Remove -march/-mtune support.
9878 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9879 * doc/invoke.texi: Remove deprecation warning.
9881 2018-08-08 Luis Machado <luis.machado@linaro.org>
9883 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9885 (qdf24xx_tunings): Set vector cost structure to
9886 qdf24xx_vector_cost.
9888 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9889 <register_sextend>: Set to 3.
9891 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
9894 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9895 * config/aarch64/aarch64-simd.md
9896 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9897 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9898 (aarch64_frecpx<mode>): ...this new pattern.
9899 * config/aarch64/aarch64-simd-builtins.def: Remove comment
9900 about aarch64_frecp<FRECP:frecp_suffix><mode>.
9902 2018-08-07 Martin Liska <mliska@suse.cz>
9905 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9906 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9907 * predict.def (PRED_MALLOC_NONNULL): New predictor.
9908 * doc/extend.texi: Document that malloc attribute adds
9911 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
9914 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9915 Define to speculation_safe_value_not_needed.
9917 2018-08-06 Jeff Law <law@redhat.com>
9919 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9920 the vr_values instance to cprop_into_stmt.
9921 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9922 (cprop_operand): Also query EVRP to determine if OP is a constant.
9924 2018-08-06 Nathan Sidwell <nathan@acm.org>
9926 * diagnostic.c (diagnostic_report_current_module): Reroll
9927 included-at loop. Translate text.
9929 2018-08-06 David Malcolm <dmalcolm@redhat.com>
9931 * function-tests.c (selftest::test_expansion_to_rtl): Call
9932 free_after_compilation.
9934 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9936 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9938 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
9940 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9941 loops with memory block operations from getting unrolled.
9943 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
9946 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9947 Define to speculation_safe_value_not_needed.
9949 2018-08-06 Jeff Law <law@redhat.com>
9951 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9954 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9957 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9958 with all enabled __intN types.
9960 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9962 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9964 * alias.c (record_set): Check for clobber high.
9965 * cfgexpand.c (expand_gimple_stmt): Likewise.
9966 * combine-stack-adj.c (single_set_for_csa): Likewise.
9967 * combine.c (find_single_use_1): Likewise.
9968 (set_nonzero_bits_and_sign_copies): Likewise.
9969 (get_combine_src_dest): Likewise.
9970 (is_parallel_of_n_reg_sets): Likewise.
9971 (try_combine): Likewise.
9972 (record_dead_and_set_regs_1): Likewise.
9973 (reg_dead_at_p_1): Likewise.
9974 (reg_dead_at_p): Likewise.
9975 * dce.c (deletable_insn_p): Likewise.
9976 (mark_nonreg_stores_1): Likewise.
9977 (mark_nonreg_stores_2): Likewise.
9978 * df-scan.c (df_find_hard_reg_defs): Likewise.
9979 (df_uses_record): Likewise.
9980 (df_get_call_refs): Likewise.
9981 * dwarf2out.c (mem_loc_descriptor): Likewise.
9982 * haifa-sched.c (haifa_classify_rtx): Likewise.
9983 * ira-build.c (create_insn_allocnos): Likewise.
9984 * ira-costs.c (scan_one_insn): Likewise.
9985 * ira.c (equiv_init_movable_p): Likewise.
9986 (rtx_moveable_p): Likewise.
9987 (interesting_dest_for_shprep): Likewise.
9988 * jump.c (mark_jump_label_1): Likewise.
9989 * postreload-gcse.c (record_opr_changes): Likewise.
9990 * postreload.c (reload_cse_simplify): Likewise.
9991 (struct reg_use): Add source expr.
9992 (reload_combine): Check for clobber high.
9993 (reload_combine_note_use): Likewise.
9994 (reload_cse_move2add): Likewise.
9995 (move2add_note_store): Likewise.
9996 * print-rtl.c (print_pattern): Likewise.
9997 * recog.c (decode_asm_operands): Likewise.
9998 (store_data_bypass_p): Likewise.
9999 (if_test_bypass_p): Likewise.
10000 * regcprop.c (kill_clobbered_value): Likewise.
10001 (kill_set_value): Likewise.
10002 * reginfo.c (reg_scan_mark_refs): Likewise.
10003 * reload1.c (maybe_fix_stack_asms): Likewise.
10004 (eliminate_regs_1): Likewise.
10005 (elimination_effects): Likewise.
10006 (mark_not_eliminable): Likewise.
10007 (scan_paradoxical_subregs): Likewise.
10008 (forget_old_reloads_1): Likewise.
10009 * reorg.c (find_end_label): Likewise.
10010 (try_merge_delay_insns): Likewise.
10011 (redundant_insn): Likewise.
10012 (own_thread_p): Likewise.
10013 (fill_simple_delay_slots): Likewise.
10014 (fill_slots_from_thread): Likewise.
10015 (dbr_schedule): Likewise.
10016 * resource.c (update_live_status): Likewise.
10017 (mark_referenced_resources): Likewise.
10018 (mark_set_resources): Likewise.
10019 * rtl.c (copy_rtx): Likewise.
10020 * rtlanal.c (reg_referenced_p): Likewise.
10021 (single_set_2): Likewise.
10022 (noop_move_p): Likewise.
10023 (note_stores): Likewise.
10024 * sched-deps.c (sched_analyze_reg): Likewise.
10025 (sched_analyze_insn): Likewise.
10027 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10029 * cse.c (invalidate_reg): New function extracted from...
10030 (invalidate): ...here.
10031 (canonicalize_insn): Check for clobber high.
10032 (invalidate_from_clobbers): invalidate clobber highs.
10033 (invalidate_from_sets_and_clobbers): Likewise.
10034 (count_reg_usage): Check for clobber high.
10035 (insn_live_p): Likewise.
10036 * cselib.c (cselib_expand_value_rtx_1):Likewise.
10037 (cselib_invalidate_regno): Check for clobber in setter.
10038 (cselib_invalidate_rtx): Pass through setter.
10039 (cselib_invalidate_rtx_note_stores):
10040 (cselib_process_insn): Check for clobber high.
10041 * cselib.h (cselib_invalidate_rtx): Add operand.
10043 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10045 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
10046 (mark_not_eliminable): Likewise.
10047 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
10048 * lra-lives.c (process_bb_lives): Check for clobber high.
10049 * lra.c (new_insn_reg): Remember clobber highs.
10050 (collect_non_operand_hard_regs): Check for clobber high.
10051 (lra_set_insn_recog_data): Likewise.
10052 (add_regs_to_insn_regno_info): Likewise.
10053 (lra_update_insn_regno_info): Likewise.
10055 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10057 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
10058 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
10060 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10062 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
10063 (copy_insn_1): Likewise.
10064 (gen_hard_reg_clobber_high): New gen function.
10065 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
10066 * genemit.c (gen_exp): Likewise.
10067 (gen_emit_seq): Pass through info.
10068 (gen_insn): Check for CLOBBER_HIGH.
10069 (gen_expand): Pass through info.
10070 (gen_split): Likewise.
10071 (output_add_clobbers): Likewise.
10072 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
10073 (remove_clobbers): Likewise.
10074 * rtl.h (gen_hard_reg_clobber_high): New declaration.
10076 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10078 * doc/rtl.texi (clobber_high): Add.
10079 (parallel): Add in clobber high
10080 * rtl.c (rtl_check_failed_code3): Add function.
10081 * rtl.def (CLOBBER_HIGH): Add expression.
10082 * rtl.h (RTL_CHECKC3): Add macro.
10083 (rtl_check_failed_code3): Add declaration.
10084 (XC3EXP): Add macro.
10086 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
10089 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
10090 cfun->machine->max_used_stack_alignment if needed.
10092 2018-08-04 Martin Sebor <msebor@redhat.com>
10094 PR tree-optimization/86571
10095 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
10098 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
10101 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10104 2018-08-03 Jeff Law <law@redhat.com>
10107 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10108 Define to speculation_safe_value_not_needed.
10110 2018-08-03 David Malcolm <dmalcolm@redhat.com>
10112 * doc/gcov.texi (-x): Remove duplicate "to".
10113 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
10114 (-Wif-not-aligned): Remove duplicate "is".
10115 (-flto): Remove duplicate "the".
10116 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
10117 duplicate "v5.00.b".
10118 (MSP430 Options): Remove duplicate "and" from the description
10119 of "-mgprel-sec=regexp".
10120 (x86 Options): Remove duplicate copies of "vmldLog102" and
10121 vmlsLog104 from description of "-mveclibabi=type".
10123 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
10125 * internal-fn.h (first_commutative_argument): Declare.
10126 * internal-fn.c (first_commutative_argument): New function.
10127 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10128 restrictions for pattern statements. Use first_commutative_argument
10129 to look for commutative operands in calls to internal functions.
10131 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
10133 * Makefile.in (wide-int-range.o): New.
10134 * tree-vrp.c: Move all the wide_int_* functions to...
10135 * wide-int-range.cc: ...here.
10136 * tree-vrp.h: Move all the wide_int_* prototypes to...
10137 * wide-int-range.h: ...here.
10139 2018-08-03 Tom de Vries <tdevries@suse.de>
10141 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
10143 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
10144 * except.c (output_function_exception_table): Do early exit if
10145 targetm_common.except_unwind_info (&global_options) == UI_NONE.
10147 2018-08-03 Martin Liska <mliska@suse.cz>
10149 * predict.c (dump_prediction): Change to 2 digits
10152 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
10154 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
10156 (falkor_am_1_gtov_gtov): ... a new insn reservation.
10158 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
10160 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
10161 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
10162 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
10163 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
10164 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
10166 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10168 * diagnostic-show-locus.c (diagnostic_show_locus): Use
10169 pp_take_prefix when saving the existing prefix.
10170 * diagnostic.c (diagnostic_append_note): Likewise.
10171 * langhooks.c (lhd_print_error_function): Likewise.
10172 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10173 param's type. Free the existing prefix.
10174 (pp_take_prefix): New function.
10175 (pretty_printer::pretty_printer): Drop the prefix parameter.
10176 Rename the length parameter to match the comment.
10177 (pretty_printer::~pretty_printer): Free the prefix.
10178 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10180 (struct pretty_printer): Drop the "const" from "prefix" field's
10181 type and clarify memory management.
10182 (pp_set_prefix): Drop the "const" from the 2nd param.
10183 (pp_take_prefix): New decl.
10185 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
10187 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10188 for word_mode_ok here instead of passing as argument.
10189 (expand_block_compare): Change select_block_compare_mode() call.
10190 (expand_strncmp_gpr_sequence): New function.
10191 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10193 2018-08-02 Jeff Law <law@redhat.com>
10196 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10197 Define to speculation_safe_value_not_needed.
10200 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10201 Define to speculation_safe_value_not_needed.
10203 2018-08-02 Tom de Vries <tdevries@suse.de>
10206 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10207 function. Return UI_TARGET unconditionally.
10208 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10209 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10211 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10213 * genemit.c (print_overload_test): Fix typo.
10215 2018-08-02 Richard Biener <rguenther@suse.de>
10217 PR tree-optimization/86816
10218 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10219 which checks for value availability before querying it.
10220 (gvn_uses_equal): Use it.
10221 (same_succ_hash): Likewise.
10222 (gimple_equal_p): Likewise.
10224 2018-08-02 Nick Clifton <nickc@redhat.com>
10227 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10228 Define to speculation_safe_value_not_needed.
10231 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10232 Define to speculation_safe_value_not_needed.
10235 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10236 Define to speculation_safe_value_not_needed.
10239 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10240 Define to speculation_safe_value_not_needed.
10243 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10244 Define to speculation_safe_value_not_needed.
10247 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10248 Define to speculation_safe_value_not_needed.
10251 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10252 Define to speculation_safe_value_not_needed.
10255 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10256 Define to speculation_safe_value_not_needed.
10259 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10260 speculation_safe_value_not_needed.
10263 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10264 to speculation_safe_value_not_needed.
10266 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10268 * doc/md.texi: Expand the documentation of instruction names
10269 to mention port-local uses. Document '@' in pattern names.
10270 * read-md.h (overloaded_instance, overloaded_name): New structs.
10271 (mapping): Declare.
10272 (md_reader::handle_overloaded_name): New member function.
10273 (md_reader::get_overloads): Likewise.
10274 (md_reader::m_first_overload): New member variable.
10275 (md_reader::m_next_overload_ptr): Likewise.
10276 (md_reader::m_overloads_htab): Likewise.
10277 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10278 m_next_overload_ptr and m_overloads_htab.
10279 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10280 (get_mode_token, get_code_token, get_int_token): New functions.
10281 (map_attr_string): Add an optional argument that passes back
10282 the associated iterator.
10283 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10284 (md_reader::handle_overloaded_name, add_overload_instance): New
10286 (apply_iterators): Handle '@' names. Report an error if '@'
10287 is used without iterators.
10288 (initialize_iterators): Initialize the new iterator_group fields.
10289 * genopinit.c (handle_overloaded_code_for)
10290 (handle_overloaded_gen): New functions.
10291 (main): Use them to print declarations of maybe_code_for_* and
10292 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10293 * genemit.c (print_overload_arguments, print_overload_test)
10294 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10295 (main): Use it to print definitions of maybe_code_for_* and
10296 maybe_gen_* functions.
10297 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10298 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10299 instead of explicit mode checks.
10300 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10301 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10302 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10303 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10304 (aarch64_expand_compare_and_swap): Likewise
10305 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10306 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10307 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10308 (aarch64_constant_pool_reload_icode): Delete.
10309 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10310 instead of aarch64_constant_pool_reload_icode. Use
10311 code_for_aarch64_reload_mov instead of explicit mode checks.
10312 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10313 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10314 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10315 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10316 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10317 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10318 (aarch64_atomic_load_op_code): Delete.
10319 (aarch64_emit_atomic_load_op): Likewise.
10320 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10321 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
10322 instead of aarch64_emit_atomic_load_op.
10323 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10324 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10325 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10326 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10327 character before the pattern name.
10328 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10329 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10330 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10331 (aarch64_frecps<mode>): Likewise.
10332 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10333 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10334 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10335 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10336 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10338 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10340 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10341 Allow HFmode constants if TARGET_FP_F16INST.
10343 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
10346 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10347 No longer check last store for clobber of address register.
10349 2018-08-02 Martin Liska <mliska@suse.cz>
10351 PR gcov-profile/86817
10352 * gcov.c (process_all_functions): New function.
10354 (process_file): Move functions processing to
10355 process_all_functions.
10357 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10359 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10360 "const" to the "gimple *" and "rtx_insn *" parameters.
10361 * dumpfile.h (dump_user_location_t::dump_user_location_t):
10363 (dump_location_t::dump_location_t): Likewise.
10365 2018-08-01 Martin Sebor <msebor@redhat.com>
10367 PR tree-optimization/86650
10368 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10369 rather than a "gcall *". Directly pass the data of interest
10370 to percent_K_format, rather than building a temporary CALL_EXPR
10372 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10373 (gimple_fold_builtin_strncat): Adjust.
10374 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10375 gcall* argument with gimple*.
10376 * gimple-ssa-warn-restrict.c (check_call): Same.
10377 (wrestrict_dom_walker::before_dom_children): Same.
10378 (builtin_access::builtin_access): Same.
10379 (check_bounds_or_overlap): Same
10380 (maybe_diag_overlap): Same.
10381 (maybe_diag_offset_bounds): Same.
10382 * tree-diagnostic.c (default_tree_printer): Move usage of
10383 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10385 * tree-pretty-print.c (percent_K_format): Add argument.
10386 * tree-pretty-print.h: Add argument.
10387 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10388 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10389 (maybe_diag_stxncpy_trunc): Same.
10390 (handle_builtin_stxncpy): Same.
10391 (handle_builtin_strcat): Same.
10393 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10395 * match.pd: Optimise pointer range checks.
10397 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10399 PR tree-optimization/86758
10400 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10401 to remove pattern statements.
10403 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10405 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10406 result of dfs_enumerate_from when constructing stmt_vec_infos,
10407 instead of additionally calling get_loop_body.
10409 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10411 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10413 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10414 When creating an iv, assert that the step is not known to be zero.
10415 (vect_setup_realignment): Update call accordingly.
10416 * tree-vect-stmts.c (vectorizable_store): Likewise.
10417 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
10419 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10421 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10422 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10423 (vectorizable_reduction): Likewise.
10424 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10425 (vect_detect_hybrid_slp_stmts): Likewise.
10426 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10428 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
10430 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10431 (wide_int_set_zero_nonzero_bits): ...this.
10432 (zero_nonzero_bits_from_vr): Rename to...
10433 (vrp_set_zero_nonzero_bits): ...this.
10434 (extract_range_from_multiplicative_op_1): Abstract wide int
10436 (wide_int_range_multiplicative_op): ...here.
10437 (extract_range_from_binary_expr_1): Extract wide int binary
10438 operations into their own functions.
10439 (wide_int_range_lshift): New.
10440 (wide_int_range_can_optimize_bit_op): New.
10441 (wide_int_range_shift_undefined_p): New.
10442 (wide_int_range_bit_xor): New.
10443 (wide_int_range_bit_ior): New.
10444 (wide_int_range_bit_and): New.
10445 (wide_int_range_trunc_mod): New.
10446 (extract_range_into_wide_ints): New.
10447 (vrp_shift_undefined_p): New.
10448 (extract_range_from_multiplicative_op): New.
10449 (vrp_can_optimize_bit_op): New.
10450 * tree-vrp.h (value_range::dump): New.
10451 (wide_int_range_multiplicative_op): New.
10452 (wide_int_range_lshift):New.
10453 (wide_int_range_shift_undefined_p): New.
10454 (wide_int_range_bit_xor): New.
10455 (wide_int_range_bit_ior): New.
10456 (wide_int_range_bit_and): New.
10457 (wide_int_range_trunc_mod): New.
10458 (zero_nonzero_bits_from_bounds): Rename to...
10459 (wide_int_set_zero_nonzero_bits): ...this.
10460 (zero_nonzero_bits_from_vr): Rename to...
10461 (vrp_set_zero_nonzero_bits): ...this.
10462 (range_easy_mask_min_max): Rename to...
10463 (wide_int_range_can_optimize_bit_op): this.
10464 * vr-values.c (simplify_bit_ops_using_ranges): Rename
10465 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10467 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10469 * tree-vectorizer.h (vect_orig_stmt): New function.
10470 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10471 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10472 (vect_create_epilog_for_reduction): Likewise.
10473 (vectorizable_live_operation): Likewise.
10474 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10475 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10476 * tree-vect-stmts.c (vectorizable_call): Likewise.
10477 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10479 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10481 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10483 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10484 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10485 (vect_transform_loop): Likewise.
10486 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10488 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10490 * tree-vectorizer.h (vect_schedule_slp): Return void.
10491 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10492 (vect_schedule_slp): Likewise.
10494 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10496 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10498 (vect_transform_loop): Update calls accordingly. Schedule SLP
10499 instances before the main loop, if any exist.
10501 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10503 PR tree-optimization/86749
10504 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10505 If the lhs is used in a COND_EXPR, check that it is being used
10506 as the "then" or "else" value.
10508 2018-08-01 Tom de Vries <tdevries@suse.de>
10511 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10512 speculation_safe_value_not_needed.
10514 2018-08-01 Richard Biener <rguenther@suse.de>
10516 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10517 as base and offset.
10519 2018-08-01 Martin Liska <mliska@suse.cz>
10521 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10522 format how successful transformation is dumped.
10523 (gimple_mod_pow2_value_transform): Likewise.
10524 (gimple_mod_subtract_transform): Likewise.
10525 (gimple_stringops_transform): Likewise.
10527 2018-08-01 Martin Liska <mliska@suse.cz>
10529 PR value-prof/35543
10530 * value-prof.c (interesting_stringop_to_profile_p):
10531 Simplify the code and add BUILT_IN_MEMMOVE.
10532 (gimple_stringops_transform): Likewise.
10534 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10536 * config/aarch64/aarch64-simd.md
10537 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10538 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10539 use GPI iterator instead of SI mode.
10541 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10543 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10544 rs6000_speculation_barrier.
10545 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10546 new barrier pattern name.
10548 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10550 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10551 (speculation_barrier): New insn.
10553 2018-08-01 Richard Biener <rguenther@suse.de>
10556 * graphite.h: Include isl/id.h and isl/space.h to allow build
10559 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
10562 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10563 mode for COFF targets.
10564 * defaults.h (TARGET_COFF): Define.
10565 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10566 TARGET_COFF): Define.
10567 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10568 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10569 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10571 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10573 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10574 * gimple-streamer-out.c (output_bb): Save it.
10575 * lto-streamer-in.c (input_struct_function_base): Restore
10576 instance discriminator if available. Create map on demand.
10577 * lto-streamer-out.c (output_struct_function_base): Save it if
10579 * final.c (decl_to_instance_map): Document LTO strategy.
10581 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10582 Olivier Hainque <hainque@adacore.com>
10584 * debug.h (decl_to_instance_map_t): New type.
10585 (decl_to_instance_map): Declare.
10586 (maybe_create_decl_to_instance_map): New inline function.
10587 * final.c (bb_discriminator, last_bb_discriminator): New statics,
10588 to track basic block discriminators.
10589 (final_start_function_1): Initialize them.
10590 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10592 (decl_to_instance_map): New variable.
10593 (map_decl_to_instance, maybe_set_discriminator): New functions.
10594 (notice_source_line): Set discriminator.
10596 2018-07-31 Ian Lance Taylor <iant@golang.org>
10598 * targhooks.c (default_have_speculation_safe_value): Add
10601 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10603 * dump-context.h: Include "pretty-print.h".
10604 (dump_context::refresh_dumps_are_enabled): New decl.
10605 (dump_context::emit_item): New decl.
10606 (class dump_context): Add fields "m_test_pp" and
10608 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10609 (temp_dump_context::get_dumped_text): New decl.
10610 (class temp_dump_context): Add field "m_pp".
10611 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10612 (dump_context::refresh_dumps_are_enabled): ...and add a test for
10614 (set_dump_file): Update for above change.
10615 (set_alt_dump_file): Likewise.
10616 (dump_loc): New overload, taking a pretty_printer *.
10617 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
10618 to any test pretty-printer.
10619 (make_item_for_dump_gimple_stmt): New function, adapted from
10620 optinfo::add_gimple_stmt.
10621 (dump_context::dump_gimple_stmt): Call it, and use the result,
10622 eliminating the direct usage of dump_file and alt_dump_file in
10623 favor of indirectly using them via emit_item.
10624 (make_item_for_dump_gimple_expr): New function, adapted from
10625 optinfo::add_gimple_expr.
10626 (dump_context::dump_gimple_expr): Call it, and use the result,
10627 eliminating the direct usage of dump_file and alt_dump_file in
10628 favor of indirectly using them via emit_item.
10629 (make_item_for_dump_generic_expr): New function, adapted from
10631 (dump_context::dump_generic_expr): Call it, and use the result,
10632 eliminating the direct usage of dump_file and alt_dump_file in
10633 favor of indirectly using them via emit_item.
10634 (make_item_for_dump_printf_va): New function, adapted from
10635 optinfo::add_printf_va.
10636 (make_item_for_dump_printf): New function.
10637 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10638 and use the result, eliminating the direct usage of dump_file and
10639 alt_dump_file in favor of indirectly using them via emit_item.
10640 (make_item_for_dump_dec): New function.
10641 (dump_context::dump_dec): Call it, and use the result,
10642 eliminating the direct usage of dump_file and alt_dump_file in
10643 favor of indirectly using them via emit_item.
10644 (make_item_for_dump_symtab_node): New function, adapted from
10645 optinfo::add_symtab_node.
10646 (dump_context::dump_symtab_node): Call it, and use the result,
10647 eliminating the direct usage of dump_file and alt_dump_file in
10648 favor of indirectly using them via emit_item.
10649 (dump_context::begin_scope): Reimplement, avoiding direct usage
10650 of dump_file and alt_dump_file in favor of indirectly using them
10652 (dump_context::emit_item): New member function.
10653 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10654 Set up test pretty-printer on the underlying context. Call
10655 refresh_dumps_are_enabled.
10656 (temp_dump_context::~temp_dump_context): Call
10657 refresh_dumps_are_enabled.
10658 (temp_dump_context::get_dumped_text): New member function.
10659 (selftest::verify_dumped_text): New function.
10660 (ASSERT_DUMPED_TEXT_EQ): New macro.
10661 (selftest::test_capture_of_dump_calls): Run all tests twice, with
10662 and then without optinfo enabled. Add uses of
10663 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
10664 * dumpfile.h: Update comment for the dump_* API.
10665 * optinfo-emit-json.cc
10666 (selftest::test_building_json_from_dump_calls): Update for new
10667 param for temp_dump_context ctor.
10668 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10669 and "m_owned" field.
10670 (optinfo_item::~optinfo_item): Likewise.
10671 (optinfo::add_item): New member function.
10672 (optinfo::emit): Update comment.
10673 (optinfo::add_string): Delete.
10674 (optinfo::add_printf): Delete.
10675 (optinfo::add_printf_va): Delete.
10676 (optinfo::add_gimple_stmt): Delete.
10677 (optinfo::add_gimple_expr): Delete.
10678 (optinfo::add_tree): Delete.
10679 (optinfo::add_symtab_node): Delete.
10680 (optinfo::add_dec): Delete.
10681 * optinfo.h (class dump_context): New forward decl.
10682 (optinfo::add_item): New decl.
10683 (optinfo::add_string): Delete.
10684 (optinfo::add_printf): Delete.
10685 (optinfo::add_printf_va): Delete.
10686 (optinfo::add_gimple_stmt): Delete.
10687 (optinfo::add_gimple_expr): Delete.
10688 (optinfo::add_tree): Delete.
10689 (optinfo::add_symtab_node): Delete.
10690 (optinfo::add_dec): Delete.
10691 (optinfo::add_poly_int): Delete.
10692 (optinfo_item::optinfo_item): Remove "owned" param.
10693 (class optinfo_item): Remove field "m_owned".
10695 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10697 PR middle-end/86705
10698 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10699 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10700 requested variable alignment.
10701 (expand_one_ssa_partition): Likewise.
10702 (expand_one_var): Likewise.
10704 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10706 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10707 to speculation_safe_value_not_needed.
10709 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10711 * targhooks.h (speculation_safe_value_not_needed): New prototype.
10712 * targhooks.c (speculation_safe_value_not_needed): New function.
10713 * target.def (have_speculation_safe_value): Update documentation.
10714 * doc/tm.texi: Regenerated.
10716 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10718 * config/aarch64/iterators.md (ALLI_TI): New iterator.
10719 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10721 (despeculate_copy<ALLI:mode>_insn): New insn.
10722 (despeculate_copyti_insn): New insn.
10723 (despeculate_simple<ALLI:mode>): New insn
10724 (despeculate_simpleti): New insn.
10725 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10727 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10728 aarch64_speculation_safe_value.
10729 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10731 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10733 * config/aarch64/aarch64-speculation.cc: New file.
10734 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10735 before pass_reorder_blocks.
10736 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10738 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10739 X14 and X15 when tracking speculation.
10740 * config/aarch64/aarch64.md (register name constants): Add
10741 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10742 (unspec): Add UNSPEC_SPECULATION_TRACKER.
10743 (speculation_barrier): New insn attribute.
10744 (cmp<mode>): Allow SP in comparisons.
10745 (speculation_tracker): New insn.
10746 (speculation_barrier): Add speculation_barrier attribute.
10747 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10748 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10749 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10751 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10753 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10754 aarch64_track_speculation is true.
10755 (tb<optab><mode>1): Likewise.
10756 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10757 generate CB[N]Z when tracking speculation.
10758 (aarch64_split_compare_and_swap): Likewise.
10759 (aarch64_split_atomic_op): Likewise.
10761 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10763 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10765 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10767 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10768 (speculation_barrier): New insn.
10770 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10772 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10773 * config/arm/arm.md (speculation_barrier): New expand.
10774 (speculation_barrier_insn): New pattern.
10776 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10778 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10779 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10780 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10781 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10783 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10784 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10785 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10786 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10787 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10788 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10789 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10790 * builtins.c (expand_speculation_safe_value): New function.
10791 (expand_builtin): Call it.
10792 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10793 * doc/extend.texi: Document __builtin_speculation_safe_value.
10794 * doc/md.texi: Document "speculation_barrier" pattern.
10795 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10796 TARGET_HAVE_SPECULATION_SAFE_VALUE.
10797 * doc/tm.texi: Regenerated.
10798 * target.def (have_speculation_safe_value, speculation_safe_value): New
10800 * targhooks.c (default_have_speculation_safe_value): New function.
10801 (default_speculation_safe_value): New function.
10802 * targhooks.h (default_have_speculation_safe_value): Add prototype.
10803 (default_speculation_safe_value): Add prototype.
10805 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10807 * dump-context.h (dump_context::dump_loc): New decl.
10808 * dumpfile.c (dump_context::dump_loc): New member function.
10809 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10810 and dump_gimple_stmt.
10811 (dump_context::dump_gimple_expr_loc): Likewise, using
10813 (dump_context::dump_generic_expr_loc): Likewise, using
10815 (dump_context::dump_printf_loc_va): Likewise, using
10817 (dump_context::begin_scope): Explicitly using the global function
10818 "dump_loc", rather than the member function.
10820 2018-07-31 Martin Sebor <msebor@redhat.com>
10822 PR tree-optimization/86741
10823 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10825 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
10827 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10828 depend on whether prefetch instructions will be emitted or not.
10829 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10830 will be emitted or not.
10831 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10832 (TARGET_SETMEM_PFD): New macros.
10834 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10836 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10837 (NULL_STMT_VEC_INFO): Delete.
10838 (stmt_vec_info::operator*): Likewise.
10839 (stmt_vec_info::operator gimple *): Likewise.
10840 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10841 of NULL_STMT_VEC_INFO.
10842 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10843 (vect_reassociating_reduction_p): Likewise.
10844 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10845 (vectorizable_store): Likewise.
10846 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10847 (vec_info::free_stmt_vec_infos): Likewise.
10849 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10851 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10852 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10854 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10856 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10857 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10858 (vec_info::free_stmt_vec_info): New private member functions.
10859 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10860 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10861 * tree-parloops.c (gather_scalar_reductions): Remove calls to
10862 set_stmt_vec_info_vec and free_stmt_vec_infos.
10863 * tree-vect-loop.c (_loop_vec_info): Remove call to
10864 set_stmt_vec_info_vec.
10865 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10866 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10867 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10868 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10869 (vec_info::free_stmt_vec_info): ...these new functions. Remove
10870 assignments in {vec_info::,}new_stmt_vec_info that are redundant
10871 with the clearing in the xcalloc.
10872 (stmt_vec_info_vec): Delete.
10873 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10874 (vectorize_loops): Likewise.
10875 (vec_info::~vec_info): Remove argument from call to
10876 free_stmt_vec_infos.
10877 (vec_info::add_stmt): Remove vinfo argument from call to
10880 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10882 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10883 rather than a gimple stmt.
10884 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
10885 information for pattern statements when passed the original
10886 statement; instead wait to be passed the pattern statement itself.
10887 Don't call set_vinfo_for_stmt here.
10888 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10889 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10890 stmt_vec_infos here.
10891 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10892 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10893 stmt_vec_infos entry.
10895 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10897 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10898 * tree-vectorizer.c (vec_info::replace_stmt): New function.
10899 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10900 * tree-vect-stmts.c (vectorizable_call): Likewise.
10901 (vectorizable_simd_clone_call): Likewise.
10903 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10905 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10906 * tree-vectorizer.c (vec_info::remove_stmt): New function.
10907 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10908 * tree-vect-loop.c (vect_transform_loop): Likewise.
10909 * tree-vect-slp.c (vect_schedule_slp): Likewise.
10910 * tree-vect-stmts.c (vect_remove_stores): Likewise.
10912 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10914 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10915 (vect_dr_stmt): Delete.
10916 * tree-vectorizer.c (vec_info::lookup_dr): New function.
10917 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10919 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10920 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10921 (vect_verify_datarefs_alignment, vect_peeling_supportable)
10922 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10923 (vect_analyze_data_refs): Likewise.
10924 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
10926 (vect_find_same_alignment_drs): Likewise.
10927 (vect_slp_analyze_node_dependences): Update calls accordingly.
10928 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10929 instead of DR_VECT_AUX.
10930 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10931 of a vector data references. Use vec_info::lookup_dr instead of
10933 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10934 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10935 instead of DR_VECT_AUX.
10937 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10939 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10941 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10943 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10944 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10945 (vect_gen_prolog_loop_niters): Likewise.
10947 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10949 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10950 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10951 (vect_known_alignment_in_bytes, vect_dr_behavior)
10952 (vect_get_scalar_dr_size): Take references as dr_vec_infos
10953 instead of data_references. Update calls to other routines for
10954 which the same change has been made.
10955 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10956 dr_vec_infos instead of stmt_vec_infos.
10957 (vect_analyze_data_ref_dependence): Update call accordingly.
10958 (vect_slp_analyze_data_ref_dependence)
10959 (vect_record_base_alignments): Use DR_VECT_AUX.
10960 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10961 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10962 (vector_alignment_reachable_p, vect_get_data_access_cost)
10963 (vect_peeling_supportable, vect_analyze_group_access_1)
10964 (vect_analyze_group_access, vect_analyze_data_ref_access)
10965 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10966 (vect_compile_time_alias, vect_small_gap_p)
10967 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10968 (vect_supportable_dr_alignment): Take references as dr_vec_infos
10969 instead of data_references. Update calls to other routines for
10970 which the same change has been made.
10971 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10972 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10973 (vect_slp_analyze_and_verify_node_alignment)
10974 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10975 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10976 (vect_setup_realignment): Use dr_vec_infos. Update calls after
10978 (_vect_peel_info::dr): Replace with...
10979 (_vect_peel_info::dr_info): ...this new field.
10980 (vect_peeling_hash_get_most_frequent)
10981 (vect_peeling_hash_choose_best_peeling): Update accordingly.
10982 (vect_peeling_hash_get_lowest_cost):
10983 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
10984 routines for which the same change has been made.
10985 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
10987 * tree-vect-loop-manip.c (get_misalign_in_elems)
10988 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
10990 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10991 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10992 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10993 (get_group_load_store_type, get_negative_load_store_type)
10994 (vect_get_data_ptr_increment, vectorizable_store)
10995 (vectorizable_load): Likewise.
10996 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10997 Update calls to other routines for which the same change has been made.
10999 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11001 * tree-vectorizer.h (vec_info::move_dr): New member function.
11002 (dataref_aux): Rename to...
11003 (dr_vec_info): ...this and add "dr" and "stmt" fields.
11004 (_stmt_vec_info::dr_aux): Update accordingly.
11005 (_stmt_vec_info::data_ref_info): Delete.
11006 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
11007 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
11008 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
11009 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
11011 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
11012 (STMT_VINFO_DR_INFO): New macro.
11013 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
11014 (set_dr_misalignment): Update after rename of dataref_aux.
11015 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
11016 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
11017 initialization of STMT_VINFO_DATA_REF.
11018 * tree-vectorizer.c (vec_info::move_dr): New function.
11019 * tree-vect-patterns.c (vect_recog_bool_pattern)
11020 (vect_recog_mask_conversion_pattern)
11021 (vect_recog_gather_scatter_pattern): Use it.
11022 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
11023 the "dr" and "stmt" fields of dr_vec_info instead of
11024 STMT_VINFO_DATA_REF.
11026 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11028 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
11029 (is_pattern_stmt_p): Use it.
11030 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
11031 on pattern statements.
11033 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11035 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
11036 original stmt as a stmt_vec_info rather than a gimple stmt.
11037 (vect_pattern_recog_1): Take the statement directly as a
11038 stmt_vec_info, rather than via a gimple_stmt_iterator.
11039 Update call to vect_mark_pattern_stmts.
11040 (vect_pattern_recog): Update calls accordingly.
11042 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11044 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
11045 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
11046 a vect_def_type for the first argument.
11047 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
11048 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
11049 operand if it isn't defined by a vectorized statement.
11050 (vect_build_gather_load_calls): Remove the mask_dt argument and
11051 update calls to vect_get_vec_def_for_stmt_copy.
11052 (vectorizable_bswap): Likewise the dt argument.
11053 (vectorizable_call): Update calls to vectorizable_bswap and
11054 vect_get_vec_def_for_stmt_copy.
11055 (vectorizable_simd_clone_call, vectorizable_assignment)
11056 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
11057 (vectorizable_comparison): Update calls to
11058 vect_get_vec_def_for_stmt_copy.
11059 (vectorizable_store): Likewise. Remove now-unnecessary calls to
11060 vect_is_simple_use.
11061 (vect_get_loop_based_defs): Remove dt argument and update call
11062 to vect_get_vec_def_for_stmt_copy.
11063 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
11064 and vect_get_vec_def_for_stmt_copy.
11065 (vectorizable_load): Update calls to vect_build_gather_load_calls
11066 and vect_get_vec_def_for_stmt_copy.
11067 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11068 (vectorizable_reduction, vectorizable_live_operation): Update calls
11069 to vect_get_vec_def_for_stmt_copy.
11071 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11073 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
11074 and gimple stmt arguments with a stmt_vec_info.
11075 (vect_record_base_alignments): Update calls accordingly.
11076 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
11077 and gimple stmt arguments with a stmt_vec_info.
11078 (vect_build_slp_tree_1): Remove vinfo argument and update call
11079 to vect_record_max_nunits.
11080 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11081 and vect_record_max_nunits.
11083 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11085 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
11086 file and take a stmt_vec_info instead of a gimple stmt.
11087 (supportable_widening_operation, vect_finish_replace_stmt)
11088 (vect_finish_stmt_generation, vect_get_store_rhs)
11089 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
11090 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
11091 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
11092 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
11093 (vect_create_data_ref_ptr, bump_vector_ptr)
11094 (vect_permute_store_chain, vect_setup_realignment)
11095 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
11096 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
11097 (vectorizable_reduction, vectorizable_induction)
11098 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
11099 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
11100 than gimple stmts as arguments.
11101 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
11102 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
11103 (can_group_stmts_p, vect_check_gather_scatter)
11104 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11105 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
11106 (vect_permute_load_chain, vect_shift_permute_load_chain)
11107 (vect_transform_grouped_load)
11108 (vect_record_grouped_load_vectors): Likewise.
11109 * tree-vect-loop.c (vect_fixup_reduc_chain)
11110 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
11111 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
11112 (vectorizable_reduction, vectorizable_induction)
11113 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
11114 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
11115 (vect_get_load_store_mask): Likewise.
11116 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
11117 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
11118 * tree-vect-stmts.c (vect_mark_relevant)
11119 (is_simple_and_all_uses_invariant)
11120 (exist_non_indexing_operands_for_use_p, process_use)
11121 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
11122 (vect_get_vec_def_for_operand, vect_get_vec_defs)
11123 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
11124 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
11125 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
11126 (get_negative_load_store_type, get_load_store_type)
11127 (vect_check_load_store_mask, vect_check_store_rhs)
11128 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11129 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11130 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11131 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11132 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11133 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
11134 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
11135 (supportable_widening_operation): Likewise.
11137 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11139 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
11140 a stmt_vec_info instead of a gcall.
11141 (vect_check_gather_scatter): Update call accordingly.
11142 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
11144 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
11145 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
11146 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
11147 instead of a gimple stmt.
11148 (vect_transform_loop): Update calls accordingly.
11149 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
11150 stmt_vec_infos instead of gimple stmts.
11151 (vect_analyze_slp_instance): Update use accordingly.
11152 * tree-vect-stmts.c (read_vector_array, write_vector_array)
11153 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
11154 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
11155 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
11156 (vect_gen_widened_results_half, vect_get_loop_based_defs)
11157 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
11158 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
11159 down to subroutines.
11161 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11163 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
11164 of the worklist from a vector of gimple stmts to a vector of
11166 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11167 (vect_mark_stmts_to_be_vectorized): Likewise
11169 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11171 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11172 statement before passing it to vect_analyze_stmt.
11173 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11174 the chain of phi vector definitions. Track the exit phi via its
11176 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11177 STMT_VINFO_REDUC_DEF.
11178 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11179 stmt_vec_infos to handle the statement chains.
11180 (vect_get_slp_defs): Record the first statement in the node
11181 using a stmt_vec_info.
11182 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11183 statements here and pass their stmt_vec_info down to subroutines.
11184 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11185 down to vect_finish_stmt_generation.
11186 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11187 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11188 stmt_vec_infos to subroutines.
11189 (vect_remove_stores): Use stmt_vec_infos to handle the statement
11192 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11194 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11195 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11196 (vect_permute_store_chain, vect_setup_realignment)
11197 (vect_permute_load_chain, vect_shift_permute_load_chain)
11198 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11199 stmts internally, and when passing values to other vectorizer routines.
11200 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11201 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11202 (vect_analyze_loop_operations, get_initial_def_for_reduction)
11203 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11204 (vectorizable_reduction, vectorizable_induction)
11205 (vectorizable_live_operation, vect_transform_loop_stmt)
11206 (vect_transform_loop): Likewise.
11207 * tree-vect-patterns.c (vect_reassociating_reduction_p)
11208 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11209 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11210 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11211 (vect_slp_analyze_node_operations_1): Likewise.
11212 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11213 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11214 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11215 (vect_finish_stmt_generation_1, get_group_load_store_type)
11216 (get_load_store_type, vect_build_gather_load_calls)
11217 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11218 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11219 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11220 (vectorizable_store, vectorizable_load, vectorizable_condition)
11221 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11222 (supportable_widening_operation): Likewise.
11223 (vect_get_vector_types_for_stmt): Likewise.
11224 * tree-vectorizer.h (vect_dr_behavior): Likewise.
11226 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11228 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11229 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11230 (vect_permute_store_chain, vect_permute_load_chain)
11231 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11232 repeated stmt_vec_info lookups.
11233 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11234 (vect_update_ivs_after_vectorizer): Likewise.
11235 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11236 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11237 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11238 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11239 (vect_bb_slp_scalar_cost): Likewise.
11240 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11242 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11244 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11245 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11246 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11247 to get gassigns and gcalls, rather than operating on generc gimple
11249 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11250 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11251 (vectorizable_load, vect_analyze_stmt): Likewise.
11252 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11254 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11256 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11257 return stmt_vec_infos rather than gimple stmts. Do not accept
11259 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11261 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11262 Update use of get_later_stmt.
11263 (vect_get_constant_vectors): Update call accordingly.
11264 (vect_schedule_slp_instance): Likewise
11265 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11266 (vect_slp_analyze_instance_dependence): Likewise.
11267 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11269 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11271 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11272 (stmt_info_for_cost::stmt_info): ...this new field.
11273 (add_stmt_costs): Update accordingly.
11274 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11275 (vect_get_known_peeling_cost): Likewise.
11276 (vect_estimate_min_profitable_iters): Likewise.
11277 * tree-vect-stmts.c (record_stmt_cost): Likewise.
11279 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11281 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11282 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11283 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11285 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11287 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11289 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11290 a gimple stmt to a stmt_vec_info.
11291 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11293 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11295 * tree-vectorizer.h (vec_info::grouped_stores): Change from
11296 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11297 (_loop_vec_info::reduction_chains): Likewise.
11298 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11300 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11302 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11304 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11305 a gimple stmt to a stmt_vec_info.
11306 (_stmt_vec_info::next_element): Likewise.
11307 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11308 (vect_slp_analyze_and_verify_node_alignment)
11309 (vect_analyze_group_access_1, vect_analyze_group_access)
11310 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11311 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11312 (vect_supportable_dr_alignment): Update accordingly.
11313 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11314 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11315 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11316 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11317 * tree-vect-slp.c (vect_build_slp_tree_1)
11318 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11319 (vect_split_slp_store_group, vect_analyze_slp_instance)
11320 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11321 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11322 (get_group_load_store_type, get_load_store_type)
11323 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11324 (vect_transform_stmt, vect_remove_stores): Likewise.
11326 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11328 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11329 than a gimple stmt.
11330 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11331 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11332 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11333 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11334 (vector_alignment_reachable_p, vect_get_data_access_cost)
11335 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11336 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11337 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11338 (vect_analyze_group_access_1, vect_analyze_group_access)
11339 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11340 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11341 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11342 result of vect_dr_stmt and use the stmt_vec_info instead of
11343 the associated gimple stmt.
11344 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11345 (vect_gen_prolog_loop_niters): Likewise.
11346 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11350 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11351 to a vec<stmt_vec_info>.
11352 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11353 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11354 vec<stmt_vec_info>.
11355 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11356 to a vec<stmt_vec_info>.
11357 (bst_traits::value_type, bst_traits::value_type): Likewise.
11358 (bst_traits::hash): Update accordingly.
11359 (vect_get_and_check_slp_defs): Change the stmts parameter from
11360 a vec<gimple *> to a vec<stmt_vec_info>.
11361 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11362 (vect_build_slp_tree): Likewise.
11363 (vect_build_slp_tree_2): Likewise. Update uses of
11364 SLP_TREE_SCALAR_STMTS.
11365 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11366 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11367 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11368 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11369 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11370 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11371 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11372 (vect_get_constant_vectors, vect_get_slp_defs)
11373 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11374 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11375 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11376 instead of gimple stmts.
11377 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11378 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11379 (vect_slp_analyze_instance_dependence): Update uses of
11380 SLP_TREE_SCALAR_STMTS.
11381 (vect_slp_analyze_and_verify_node_alignment): Likewise.
11382 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11383 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11384 (get_initial_defs_for_reduction): Likewise.
11385 (vect_create_epilog_for_reduction): Likewise.
11386 (vectorize_fold_left_reduction): Likewise.
11387 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11388 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11389 (can_vectorize_live_stmts): Likewise.
11391 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11393 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11394 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11395 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11397 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11399 (gather_scalar_reductions): Update after above interface changes.
11400 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11401 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11403 (vect_force_simple_reduction): Likewise.
11404 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11405 LOOP_VINFO_REDUCTIONS.
11406 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11408 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11410 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11411 a gimple stmt to a stmt_vec_info.
11412 * tree-vect-loop.c (vect_active_double_reduction_p)
11413 (vect_force_simple_reduction, vectorizable_reduction): Update
11416 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11418 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11419 vec<gimple *> to a vec<stmt_vec_info>.
11420 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11421 the reduction_phis argument from a vec<gimple *> to a
11422 vec<stmt_vec_info>.
11423 (vectorizable_reduction): Likewise the phis local variable that
11424 is passed to vect_create_epilog_for_reduction. Update for new type
11425 of SLP_TREE_VEC_STMTS.
11426 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11427 (vectorizable_live_operation): Likewise.
11428 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11429 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11431 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11433 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11434 a gimple stmt to a stmt_vec_info.
11435 (vectorizable_condition, vectorizable_live_operation)
11436 (vectorizable_reduction, vectorizable_induction): Pass back the
11437 vectorized statement as a stmt_vec_info.
11438 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11439 use of STMT_VINFO_VEC_STMT.
11440 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11441 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11442 as stmt_vec_infos rather than gimple stmts.
11443 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11444 to a stmt_vec_info.
11445 (vectorizable_live_operation): Likewise.
11446 (vectorizable_reduction, vectorizable_induction): Likewise,
11447 updating use of STMT_VINFO_VEC_STMT.
11448 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11449 of STMT_VINFO_VEC_STMT.
11450 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11451 (vectorizable_simd_clone_call, vectorizable_conversion)
11452 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11453 (vectorizable_store, vectorizable_load, vectorizable_condition)
11454 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11455 from a gimple stmt to a stmt_vec_info.
11456 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
11457 pointer to a stmt_vec_info to the vectorizable_* routines.
11459 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11461 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11462 a gimple stmt to a stmt_vec_info.
11463 (is_pattern_stmt_p): Update accordingly.
11464 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11465 (vect_record_grouped_load_vectors): Likewise.
11466 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11467 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11468 (vect_model_reduction_cost): Likewise.
11469 (vect_create_epilog_for_reduction): Likewise.
11470 (vectorizable_reduction, vectorizable_induction): Likewise.
11471 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11472 Return the stmt_vec_info for the pattern statement.
11473 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11474 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11475 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11476 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11477 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11478 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11479 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11480 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11482 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11484 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11485 (vect_finish_stmt_generation): Likewise.
11486 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11487 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11488 (vect_build_gather_load_calls): Use the return value of the above
11489 functions instead of a separate call to vinfo_for_stmt. Use narrow
11490 scopes for the input gimple stmt and wider scopes for the associated
11491 stmt_vec_info. Use vec_info::lookup_def when setting these
11492 stmt_vec_infos from an SSA_NAME definition.
11493 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11494 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11495 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11496 (vectorizable_store, vectorizable_load, vectorizable_condition)
11497 (vectorizable_comparison): Likewise.
11498 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11499 (vectorizable_reduction): Likewise.
11501 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11503 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11504 stmt_vec_info * parameter before the optional gimple **.
11505 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11506 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11507 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11508 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11509 (vectorizable_live_operation): Likewise.
11510 * tree-vect-patterns.c (type_conversion_p): Likewise.
11511 (vect_look_through_possible_promotion): Likewise.
11512 (vect_recog_rotate_pattern): Likewise.
11513 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11515 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11517 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11518 a typedef to a wrapper class.
11519 (NULL_STMT_VEC_INFO): New macro.
11520 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11521 (stmt_vec_info::operator*): New function.
11522 (stmt_vec_info::operator gimple *): Likewise.
11523 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11524 (add_stmt_costs): Likewise.
11525 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11526 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11527 (vect_get_known_peeling_cost): Likewise.
11528 (vect_estimate_min_profitable_iters): Likewise.
11529 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11530 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11531 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11532 (vectorizable_store, free_stmt_vec_infos): Likewise.
11533 (new_stmt_vec_info): Change return type of xcalloc to
11536 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11538 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11539 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11540 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11541 a single_imm_use-based sequence.
11542 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11544 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11546 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11547 * tree-vectorizer.c (vec_info::lookup_def): New function.
11548 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11549 (vect_widened_op_tree): Likewise.
11550 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11551 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11552 (vectorizable_reduction): Likewise.
11553 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11555 (vect_is_slp_reduction): Update calls accordingly. Use
11556 vec_info::lookup_def.
11557 (vect_is_simple_reduction): Likewise
11558 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11560 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11562 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11563 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11564 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11566 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11567 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11568 (vect_update_vf_for_slp, vect_analyze_loop_operations)
11569 (vect_is_slp_reduction, vectorizable_induction)
11570 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11571 * tree-vect-patterns.c (vect_init_pattern_stmt):
11572 (vect_determine_min_output_precision_1, vect_determine_precisions)
11573 (vect_pattern_recog): Likewise.
11574 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11575 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11576 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11577 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11578 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11579 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
11580 info field from a loop to a loop_vec_info.
11582 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11584 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11585 (vec_info::add_stmt): Declare.
11586 * tree-vectorizer.c (vec_info::add_stmt): New function.
11587 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11588 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11589 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11590 (vectorizable_induction): Likewise.
11591 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11592 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11593 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11594 (vectorizable_load): Likewise.
11595 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11596 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11597 (vect_recog_gather_scatter_pattern): Likewise.
11598 (append_pattern_def_seq): Likewise. Remove a check that is
11599 performed by add_stmt itself.
11601 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11603 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11604 which make_ssa_name was called with new_stmt before new_stmt
11607 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11609 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11611 (vect_is_slp_reduction): ...here...
11612 (vect_is_simple_reduction): ...and here. Remove repetition of tests
11613 that are already known to be false.
11615 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11617 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11618 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
11619 STMT_VINFO_NUM_SLP_USES when it's true.
11620 (vect_free_slp_instance): Add a final_p parameter and pass it to
11621 vect_free_slp_tree.
11622 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11623 (vect_analyze_slp_instance): Likewise.
11624 (vect_slp_analyze_operations): Likewise.
11625 (vect_slp_analyze_bb_1): Likewise.
11626 * tree-vectorizer.c (vec_info): Likewise.
11627 * tree-vect-loop.c (vect_transform_loop): Likewise.
11629 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11631 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11632 function is not called for second and subsequent members of
11635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11637 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11638 cases for nested loops from here to ...
11639 (vect_create_epilog_for_reduction): ...here. Only call
11640 vect_is_simple_use for inner-loop reductions.
11642 2018-07-31 Martin Liska <mliska@suse.cz>
11644 PR gcov-profile/85338
11645 PR gcov-profile/85350
11646 PR gcov-profile/85372
11647 * profile.c (struct location_triplet): New.
11648 (struct location_triplet_hash): Likewise.
11649 (output_location): Do not output a BB that
11650 is already recorded for a line.
11651 (branch_prob): Use streamed_locations.
11653 2018-07-31 Martin Liska <mliska@suse.cz>
11655 PR gcov-profile/85370
11656 * coverage.c (coverage_begin_function): Do not mark target
11657 clones as artificial functions.
11659 2018-07-31 Martin Liska <mliska@suse.cz>
11661 PR gcov-profile/83813
11662 PR gcov-profile/84758
11663 PR gcov-profile/85217
11664 PR gcov-profile/85332
11665 * profile.c (branch_prob): Do not record GOTO expressions
11666 for GIMPLE statements which locations are already streamed.
11668 2018-07-31 Olivier Hainque <hainque@adacore.com>
11670 * gcc.c (handle_spec_function): Accept a soft_matched_part
11671 argument, as do_spec_1. Pass it down to ...
11672 (eval_spec_function): Accept a soft_matched_part argument,
11673 and pass it down to ...
11674 (do_spec_2): Accept a soft_matched_part argument, and pass
11675 it down to do_spec_1.
11676 (do_spec_1): Pass soft_matched_part to handle_spec_function.
11677 (handle_braces): Update call to handle_spec_function.
11678 (driver::set_up_specs): Update calls to do_spec_2.
11679 (compare_debug_dump_opt_spec_function): Likewise.
11680 (compare_debug_self_opt_spec_function): Likewise.
11682 2018-07-31 Olivier Hainque <hainque@adacore.com>
11684 * common.opt (nolibc): New option.
11685 * doc/invoke.texi (Link Options): Document it.
11686 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11687 * config/alpha/linux.h: Likewise.
11688 * config/arc/elf.h: Likewise.
11689 * config/arm/uclinux-elf.h: Likewise.
11690 * config/arm/unknown-elf.h: Likewise.
11691 * config/avr/avrlibc.h: Likewise.
11692 * config/bfin/bfin.h: Likewise.
11693 * config/bfin/linux.h: Likewise.
11694 * config/bfin/uclinux.h: Likewise.
11695 * config/darwin.h: Likewise.
11696 * config/darwin10.h: Likewise.
11697 * config/darwin12.h: Likewise.
11698 * config/gnu-user.h: Likewise.
11699 * config/lm32/uclinux-elf.h: Likewise.
11700 * config/pa/pa-hpux11.h: Likewise.
11701 * config/pa/pa64-hpux.h: Likewise.
11702 * config/sparc/sparc.h: Likewise.
11704 2018-07-31 Olivier Hainque <hainque@adacore.com>
11706 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11707 undefined variables.
11709 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11712 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11713 instead of GEN_INT.
11715 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11717 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11718 terminated string literal.
11720 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11722 PR rtl-optimization/85160
11723 * combine.c (is_just_move): New function.
11724 (try_combine): Allow combining two instructions into two if neither of
11725 the original instructions was a move.
11727 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
11730 * doc/extend.texi (Global Register Variables): Discourage use of type
11732 (Local Register Variables): Likewise.
11734 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
11736 PR tree-optimization/86506
11737 * hwint.h (ceil_log2): Resync with hwint.c implementation.
11739 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
11742 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11743 hard_regno, make sure no insn between `from` and `to` clobbers it.
11745 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
11746 Tom de Vries <tdevries@suse.de>
11748 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11749 (PTX_DEFAULT_RUNTIME_DIM): ... this.
11750 (nvptx_goacc_validate_dims): Set default worker and gang dims to
11751 PTX_DEFAULT_RUNTIME_DIM.
11752 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11754 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
11756 * config/pa/pa.c (pa_output_addr_vec): Align address table.
11757 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11758 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11760 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
11762 * config/rs6000/constraints.md (wG constraint): Delete, no longer
11764 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11765 predicate to reflect toc fusion has been deleted.
11766 (toc_fusion_mem_raw): Delete, no longer used.
11767 (toc_fusion_mem_wrapped): Likewise.
11768 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11770 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11771 Delete, no longer used.
11772 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11773 meant to be used for toc fusion.
11774 (rs6000_debug_print_mode): Delete toc fusion debugging.
11775 (rs6000_debug_reg_global): Likewise.
11776 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11777 fusion and secondary reload support that were never used.
11778 (rs6000_option_override_internal): Delete TOC fusion, that was only
11779 partially defined, and it did not work unless you also used the
11781 (rs6000_legitimate_address_p): Delete TOC fusion support.
11782 (rs6000_opt_masks): Likewise.
11783 (fusion_wrap_memory_address): Delete function, no longer used.
11784 (fusion_split_address); Delete TOC fusion support.
11785 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11786 longer used with toc fusion being deleted.
11787 (TARGET_TOC_FUSION_FP): Likewise.
11788 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11790 (toc fusion spliter): Delete TOC fusion support.
11791 (toc_fusionload_<mode>): Likewise.
11792 (toc_fusionload_di): Likewise.
11793 (fusion_gpr_load_<mode>): Delete generator function, this insn no
11794 longer needs to be named. Rename predicate to delete TOC fusion.
11795 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11796 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11797 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11798 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11799 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11801 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
11803 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11804 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
11805 __int128 in built-in function prototypes.
11806 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11807 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11809 2018-07-27 Martin Sebor <msebor@redhat.com>
11811 PR tree-optimization/86696
11812 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11813 types, including enums.
11814 (handle_char_store): Be prepared for the above function to fail.
11816 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
11818 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11819 when optimization level is lower than 2 or optimize for size.
11821 2018-07-26 Martin Sebor <msebor@redhat.com>
11823 PR tree-optimization/86043
11824 PR tree-optimization/86042
11825 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11826 (get_string_cst_length): Rename...
11827 (get_min_string_length): ...to this. Add argument.
11828 (handle_char_store): Extend to handle multi-character stores by
11830 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
11831 * tree.h (initializer_zerop): Add argument.
11833 2018-07-26 Jakub Jelinek <jakub@redhat.com>
11835 PR middle-end/86660
11836 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11837 declare target to variables if they have always,{to,from,tofrom} map
11840 2018-07-26 Martin Liska <mliska@suse.cz>
11843 * lto-wrapper.c: Add linker_output as prefix
11844 for ltrans_output_file.
11846 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
11848 PR rtl-optimization/85805
11849 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11850 value for hard registers if that was written in the same mode.
11852 2018-07-26 Martin Liska <mliska@suse.cz>
11854 PR gcov-profile/86536
11855 * gcov.c (format_gcov): Use printf format %.*f directly
11856 and do not handle special values.
11858 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11860 * common/config/arc/arc-common.c (arc_option_optimization_table):
11861 Update default optimizations for size.
11863 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11865 * config/arc/arc.md (movsf_insn): Add short instruction selection.
11866 * config/arc/constraints.md (CfZ): New constraint.
11867 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11868 (subsf3_fpu): Likewise.
11869 (cmpsf_fpu): Likewise.
11870 (cmpsf_fpu_uneq): Likewise.
11872 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11874 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11876 (arc_is_uncached_mem_p): uncached applies to both the variable and
11879 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11881 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11884 2018-07-25 David Malcolm <dmalcolm@redhat.com>
11886 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11887 field "m_scopes" from vec to auto_vec.
11889 2018-07-25 Martin Liska <mliska@suse.cz>
11891 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11894 2018-07-25 Richard Biener <rguenther@suse.de>
11897 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11898 special wrt context_die late.
11899 (gen_subprogram_die): Re-use DIEs in local scope.
11901 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
11903 PR tree-optimization/86644
11904 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
11906 2018-07-25 Martin Liska <mliska@suse.cz>
11908 PR middle-end/86645
11909 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11910 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11912 2018-07-25 Martin Liska <mliska@suse.cz>
11915 * params.def: Explain ASan abbreviation and provide
11916 a documentation link.
11918 2018-07-24 Martin Sebor <msebor@redhat.com>
11920 PR tree-optimization/86622
11921 PR tree-optimization/86532
11922 * builtins.h (string_length): Declare.
11923 * builtins.c (c_strlen): Correct handling of non-constant offsets.
11924 (check_access): Be prepared for non-constant length ranges.
11925 (string_length): Make extern.
11926 * expr.c (string_constant): Only handle the minor non-constant
11927 array index. Use string_constant to compute the length of
11928 a generic string constant.
11930 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
11932 PR tree-optimization/86618
11933 * tree-vect-stmts.c (vectorizable_call): Don't take the address
11934 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11936 2018-07-24 David Malcolm <dmalcolm@redhat.com>
11938 PR tree-optimization/86636
11939 * json.cc (json::object::set): Fix comment. Add assertions.
11940 (json::array::append): Move here from json.h. Add comment and an
11942 (json::string::string): Likewise.
11943 * json.h (json::array::append): Move to json.cc.
11944 (json::string::string): Likewise.
11945 * optinfo-emit-json.cc
11946 (optrecord_json_writer::impl_location_to_json): Assert that we
11947 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11948 wrapper around it. Expand the location once, rather than three
11950 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11951 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11953 (optrecord_json_writer::optinfo_to_json): Likewise, in four
11954 places. Fix some overlong lines.
11956 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
11958 * config/aarch64/aarch64-simd.md
11959 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11960 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11961 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11962 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11963 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11964 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11965 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11966 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11967 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11969 2018-07-24 Jakub Jelinek <jakub@redhat.com>
11971 PR middle-end/86627
11972 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11973 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
11974 and abs_d == d, do the power of two handling if profitable.
11976 2018-07-24 Richard Biener <rguenther@suse.de>
11978 * match.pd: Add BIT_FIELD_REF canonicalizations.
11980 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11983 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11985 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11987 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11988 terminated STRING_CST object.
11990 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11992 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11994 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11996 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11997 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11998 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11999 the elements into a register.
12000 (rs6000_split_v4si_init_di_reg): Delete.
12001 (rs6000_split_v4si_init): Delete.
12002 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
12003 (vsx_init_v4si): Rewrite as a define_expand.
12005 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12007 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
12008 zero_extend argument from memory): New.
12010 2018-07-22 Martin Sebor <msebor@redhat.com>
12013 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
12014 diagnosing calls with unknown arguments unless -Walloca-larger-than
12015 is restricted to less than PTRDIFF_MAX bytes.
12017 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
12019 * doc/gcov.texi (Invoking Gcov): Editorial changes.
12021 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12023 * pretty-print.c (text_info::set_location): Remove redundant
12024 "line_table" parameter from call to rich_location::set_range.
12026 2018-07-20 Martin Sebor <msebor@redhat.com>
12028 PR middle-end/82063
12029 * builtins.c (expand_builtin_alloca): Adjust.
12030 * calls.c (alloc_max_size): Simplify.
12031 * cgraphunit.c (cgraph_node::expand): Adjust.
12032 * common.opt (larger_than_size, warn_frame_larger_than): Remove
12034 (frame_larger_than_size): Same.
12035 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
12036 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12038 * doc/invoke.texi (GCC Command Options): Document option arguments.
12039 Explain byte-size arguments and suffixes.
12040 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
12041 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
12042 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
12043 * doc/options.texi (UInteger): Expand.
12044 (Host_Wide_Int, ByteSize): Document new properties.
12045 * final.c (final_start_function_1): Include sizes in an error message.
12046 * function.c (frame_offset_overflow): Same.
12047 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
12048 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
12049 Diagnose unbounded alloca calls only for limits of less than
12051 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
12052 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
12054 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
12055 only for limits of less than PTRDIFF_MAX.
12056 * langhooks-def.h (lhd_handle_option): Change function argument
12058 * langhooks.c (lhd_handle_option): Same.
12059 * langhooks.h (handle_option): Same.
12060 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
12062 (var_type, var_type_struct): Same.
12063 (var_set): Handle ByteSize flag.
12064 * optc-gen.awk: Add comments to output to ease debugging. Make
12065 use of HOST_WIDE_INT where appropriate.
12066 * opts-gen-save.awk: Use %lx to format unsigned long.
12067 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
12068 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
12069 arguments. Parse bytes-size suffixes.
12070 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
12071 (enum_value_to_arg): Same.
12072 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
12073 (handle_option): Adjust.
12074 (generate_option): Change function argument to HOST_WIDE_INT.
12075 (cmdline_handle_error): Adjust.
12076 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
12077 (set_option): Change function argument to HOST_WIDE_INT.
12078 (option_enabled): Handle cl_host_wide_int.
12079 (get_option_state): Handle CLVC_SIZE.
12080 (control_warning_option): Same.
12081 * opts.c (common_handle_option): Change function argument to
12082 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
12083 OPT_Wvla_larger_than_.
12084 * opts.h (enum cl_var_type): Add an enumerator.
12085 * stor-layout.c (layout_decl): Print a more meaningful warning.
12086 * toplev.c (output_stack_usage): Adjust.
12088 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
12090 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
12091 call to inline_expand_builtin_string_cmp.
12092 (expand_builtin_strcmp): Likewise.
12093 (expand_builtin_strncmp): Likewise.
12094 (inline_string_cmp): Delete the last parameter, change char_type_node
12095 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
12097 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
12098 the inlining expansion on target where the type of the call has same or
12099 narrower precision than unsigned char.
12101 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12103 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
12104 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
12105 * common.opt (fsave-optimization-record): New option.
12106 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
12107 * doc/invoke.texi (-fsave-optimization-record): New option.
12108 * dumpfile.c: Include "optinfo-emit-json.h".
12109 (struct kv_pair): Move to coretypes.h.
12110 (optgroup_options): Make non-static.
12111 (dump_context::end_scope): Call
12112 optimization_records_maybe_pop_dump_scope.
12113 * dumpfile.h (optgroup_options): New decl.
12114 * json.cc: New file.
12115 * json.h: New file.
12116 * optinfo-emit-json.cc: New file.
12117 * optinfo-emit-json.h: New file.
12118 * optinfo.cc: Include "optinfo-emit-json.h".
12119 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
12120 (optinfo_enabled_p): Check optimization_records_enabled_p.
12121 (optinfo_wants_inlining_info_p): Likewise.
12122 * optinfo.h: Update comment.
12123 * profile-count.c (profile_quality_as_string): New function.
12124 * profile-count.h (profile_quality_as_string): New decl.
12125 (profile_count::quality): New accessor.
12126 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12127 and optinfo_emit_json_cc_tests.
12128 * selftest.h (selftest::json_cc_tests): New decl.
12129 (selftest::optinfo_emit_json_cc_tests): New decl.
12130 * toplev.c: Include "optinfo-emit-json.h".
12131 (compile_file): Call optimization_records_finish.
12132 (do_compile): Call optimization_records_start.
12133 * tree-ssa-live.c: Include optinfo.h.
12134 (remove_unused_scope_block_p): Retain inlining information if
12135 optinfo_wants_inlining_info_p returns true.
12137 2018-07-20 Richard Biener <rguenther@suse.de>
12140 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
12141 to cover -flto-partition=none.
12143 2018-07-20 Martin Liska <mliska@suse.cz>
12145 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
12146 (get_decl_source_range): Remove unused function.
12148 2018-07-20 Richard Biener <rguenther@suse.de>
12150 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
12151 (struct vn_phi_s): Likewise.
12152 (struct vn_reference_s): Likewise.
12153 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
12154 for searching the slot of an entry known to be in the hash itself.
12155 (vn_phi_hasher::equal): Likewise.
12156 (vn_reference_hasher::equal): Likewise.
12157 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
12159 (optimistic_info, current_info): Remove, keeping only valid_info.
12160 (vn_reference_lookup_1): Remove fallback lookup.
12161 (vn_reference_lookup_2): Likewise.
12162 (vn_nary_op_lookup_1): Likewise.
12163 (vn_phi_lookup): Likewise.
12164 (vn_nary_build_or_lookup_1): Make sure to not chain the built
12166 (vn_reference_insert): Adjust, chain the inserted hash element
12167 at last_inserted_ref.
12168 (vn_reference_insert_pieces): Likewise.
12169 (visit_reference_op_call): Likewise.
12170 (vn_nary_op_insert_into): Chain the inserted hash element at
12171 last_inserted_nary.
12172 (vn_nary_op_insert_pieces): Adjust.
12173 (vn_nary_op_insert): Likewise.
12174 (vn_nary_op_insert_stmt): Likewise.
12175 (vn_phi_insert): Adjust, chain the inserted hash element at
12177 (process_scc): Remove clearing and copying the optimistic
12178 table. Instead remove elements inserted during an optimistic
12179 iteration from the single table we maintain.
12180 (init_scc_vn): Adjust.
12181 (free_scc_vn): Likewise.
12182 (sccvn_dom_walker::record_cond): Likewise.
12183 (sccvn_dom_walker::after_dom_children): Likewise.
12185 2018-07-19 Martin Sebor <msebor@redhat.com>
12187 PR tree-optimization/84047
12188 PR tree-optimization/83776
12189 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12190 (check_array_bounds): Call it.
12192 2018-07-19 Martin Sebor <msebor@redhat.com>
12194 * align.h (align_flags): Use member initialization.
12196 2018-07-19 David Malcolm <dmalcolm@redhat.com>
12198 * Makefile.in (OBJS): Add optinfo.o.
12199 * coretypes.h (class symtab_node): New forward decl.
12200 (struct cgraph_node): New forward decl.
12201 (class varpool_node): New forward decl.
12202 * dump-context.h: New file.
12203 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12205 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12206 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12207 (set_alt_dump_file): Likewise.
12208 (dump_context::~dump_context): New dtor.
12209 (dump_gimple_stmt): Move implementation to...
12210 (dump_context::dump_gimple_stmt): ...this new member function.
12211 Add the stmt to any pending optinfo, creating one if need be.
12212 (dump_gimple_stmt_loc): Move implementation to...
12213 (dump_context::dump_gimple_stmt_loc): ...this new member function.
12214 Start a new optinfo and add the stmt to it.
12215 (dump_gimple_expr): Move implementation to...
12216 (dump_context::dump_gimple_expr): ...this new member function.
12217 Add the stmt to any pending optinfo, creating one if need be.
12218 (dump_gimple_expr_loc): Move implementation to...
12219 (dump_context::dump_gimple_expr_loc): ...this new member function.
12220 Start a new optinfo and add the stmt to it.
12221 (dump_generic_expr): Move implementation to...
12222 (dump_context::dump_generic_expr): ...this new member function.
12223 Add the tree to any pending optinfo, creating one if need be.
12224 (dump_generic_expr_loc): Move implementation to...
12225 (dump_context::dump_generic_expr_loc): ...this new member
12226 function. Add the tree to any pending optinfo, creating one if
12228 (dump_printf): Move implementation to...
12229 (dump_context::dump_printf_va): ...this new member function. Add
12230 the text to any pending optinfo, creating one if need be.
12231 (dump_printf_loc): Move implementation to...
12232 (dump_context::dump_printf_loc_va): ...this new member function.
12233 Start a new optinfo and add the stmt to it.
12234 (dump_dec): Move implementation to...
12235 (dump_context::dump_dec): ...this new member function. Add the
12236 value to any pending optinfo, creating one if need be.
12237 (dump_context::dump_symtab_node): New member function.
12238 (dump_context::get_scope_depth): New member function.
12239 (dump_context::begin_scope): New member function.
12240 (dump_context::end_scope): New member function.
12241 (dump_context::ensure_pending_optinfo): New member function.
12242 (dump_context::begin_next_optinfo): New member function.
12243 (dump_context::end_any_optinfo): New member function.
12244 (dump_context::s_current): New global.
12245 (dump_context::s_default): New global.
12246 (dump_scope_depth): Delete global.
12247 (dumpfile_ensure_any_optinfo_are_flushed): New function.
12248 (dump_symtab_node): New function.
12249 (get_dump_scope_depth): Reimplement in terms of dump_context.
12250 (dump_begin_scope): Likewise.
12251 (dump_end_scope): Likewise.
12252 (selftest::temp_dump_context::temp_dump_context): New ctor.
12253 (selftest::temp_dump_context::~temp_dump_context): New dtor.
12254 (selftest::verify_item): New function.
12255 (ASSERT_IS_TEXT): New macro.
12256 (ASSERT_IS_TREE): New macro.
12257 (ASSERT_IS_GIMPLE): New macro.
12258 (selftest::test_capture_of_dump_calls): New test.
12259 (selftest::dumpfile_c_tests): Call it.
12260 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12261 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12262 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12263 descriptive comment.
12264 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12265 (dump_node, dump_bb): Move these unrelated decls.
12266 (class dump_manager): Add leading comment.
12267 * optinfo.cc: New file.
12268 * optinfo.h: New file.
12270 2018-07-19 Michael Collison <michael.collison@arm.com>
12271 Richard Henderson <rth@redhat.com>
12273 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12274 (subti): Handle op1 zero.
12275 (subvti4, usub4ti4): New.
12276 (*sub<GPI>3_compare1_imm): New.
12277 (sub<GPI>3_carryinCV): New.
12278 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12279 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12281 2018-07-19 Michael Collison <michael.collison@arm.com>
12282 Richard Henderson <rth@redhat.com>
12284 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12285 (addti3): Create simpler code if low part is already known to be 0.
12286 (addvti4, uaddvti4): New.
12287 (*add<GPI>3_compareC_cconly_imm): New.
12288 (*add<GPI>3_compareC_cconly): New.
12289 (*add<GPI>3_compareC_imm): New.
12290 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12291 handle constants within this pattern..
12292 (*add<GPI>3_compareV_cconly_imm): New.
12293 (*add<GPI>3_compareV_cconly): New.
12294 (*add<GPI>3_compareV_imm): New.
12295 (add<GPI>3_compareV): New.
12296 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12297 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12298 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12299 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12300 with 'comparison' operator.
12301 (*add<GPI>3_compareV_cconly_imm): Ditto.
12302 (*add<GPI>3_compareV_cconly): Ditto.
12303 (*add<GPI>3_compareV_imm): Ditto.
12304 (add<GPI>3_compareV): Ditto.
12305 (add<mode>3_carryinC): Ditto.
12306 (*add<mode>3_carryinC_zero): Ditto.
12307 (*add<mode>3_carryinC): Ditto.
12308 (add<mode>3_carryinV): Ditto.
12309 (*add<mode>3_carryinV_zero): Ditto.
12310 (*add<mode>3_carryinV): Ditto.
12312 2018-07-19 Michael Collison <michael.collison@arm.com>
12313 Richard Henderson <rth@redhat.com>
12315 * config/aarch64/aarch64-modes.def (CC_V): New.
12316 * config/aarch64/aarch64-protos.h
12317 (aarch64_addti_scratch_regs): Declare
12318 (aarch64_subvti_scratch_regs): Declare.
12319 (aarch64_expand_subvti): Declare.
12320 (aarch64_gen_unlikely_cbranch): Declare
12321 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12322 for signed overflow using CC_Vmode.
12323 (aarch64_get_condition_code_1): Handle CC_Vmode.
12324 (aarch64_gen_unlikely_cbranch): New function.
12325 (aarch64_addti_scratch_regs): New function.
12326 (aarch64_subvti_scratch_regs): New function.
12327 (aarch64_expand_subvti): New function.
12329 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12331 * config/aarch64/aarch64-option-extensions.def: New entry for profile
12333 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12334 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12337 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12340 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12341 address check not strict.
12343 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12345 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12347 (store_pair_lanes<mode>): Likewise.
12348 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12349 enum value 'ADDR_QUERY_LDP_STP_N'.
12350 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12351 (aarch64_print_address_internal): Add declaration.
12352 (aarch64_print_ldpstp_address): Remove.
12353 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12354 (aarch64_print_operand): Change printing of 'y'.
12355 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12356 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12357 'true' rather than '1'.
12358 * config/aarch64/constraints.md (Uml): Likewise.
12359 (Uml): Rename to Umn.
12362 2018-07-19 Richard Biener <rguenther@suse.de>
12364 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12366 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12367 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12368 (vn_reference_hasher): Likewise.
12369 (struct vn_tables_s): Remove obstack and alloc-pool members.
12370 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12371 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12372 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12373 (vn_reference_insert_pieces): Likewise.
12374 (alloc_vn_nary_op_noinit): Adjust.
12375 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12376 (vn_phi_eq): Adjust.
12377 (shared_lookup_phiargs): Remove.
12378 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12379 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12380 (visit_reference_op_call): Likewise.
12381 (copy_nary, copy_phi, copy_reference): Remove.
12382 (process_scc): Rewind the obstack when iterating. Do not
12383 copy the elements to valid_info but just move them from one
12384 hashtable to the other.
12385 (allocate_vn_table): Adjust.
12386 (free_vn_table): Likewise.
12387 (init_scc_vn): Likewise.
12388 (free_scc_vn): Likewise.
12390 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
12393 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12394 indirect_return as function type attribute.
12395 (ix86_attribute_table): Change indirect_return to function
12397 * doc/extend.texi: Update indirect_return attribute.
12399 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
12401 * wide-int.h (widest2_int): New.
12402 * gimple-fold.c (arith_overflowed_p): Use it.
12403 * tree.h (widest2_int_cst): New.
12404 * tree-vrp.c (wide_int_binop_overflow): Rename from
12405 vrp_int_const_binop.
12406 Rewrite to work on trees.
12407 (extract_range_from_multiplicative_op_1): Abstract code to...
12408 (wide_int_range_min_max): ...here.
12409 (wide_int_range_cross_product): ...and here.
12410 (extract_range_from_binary_expr_1): Abstract overflow code to...
12411 (wide_int_range_mult_wrapping): ...here.
12412 * tree-vrp.h (wide_int_range_cross_product): New.
12413 (wide_int_range_mult_wrapping): New.
12415 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
12416 Julia Koval <julia.koval@intel.com>
12418 * config/i386/x86-tune-costs.h (skylake_memcpy,
12419 skylake_memset): Replace rep_prefix with unrolling for size 512.
12421 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
12423 PR middle-end/86544
12424 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12425 comparision with EQ_EXPR in last stmt.
12427 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
12429 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12430 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12431 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12432 previously known as "PowerPC AltiVec Built-in Functions". Move
12433 some material to new subsubsections "PowerPC AltiVec Built-in
12434 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12436 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12437 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12438 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12439 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12441 2018-07-18 Richard Biener <rguenther@suse.de>
12443 PR tree-optimization/86557
12444 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12447 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
12449 * config/s390/s390.c (s390_function_profiler): Generate CFI.
12451 2018-07-17 Jeff Law <law@redhat.com>
12453 * config/arm/arm.c (get_label_padding): Update for recent
12454 changes to label_to_alignment.
12456 PR tree-optimization/86010
12457 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12459 * config/mips/mips.c (vr4130_align_insns): Update for recent
12460 changes to label_to_alignment.
12462 * config/frv/frv.c (frv_label_align): Update for recent changes
12463 to label_to_alignment.
12465 * config/nios2/nios2.c (nios2_label_align): Update for recent
12466 changes which dropped ALIGN_LABELS_LOG.
12468 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12470 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12471 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12473 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12475 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12476 deprecated align_labels_log.
12478 2018-07-17 Richard Biener <rguenther@suse.de>
12481 * dwarf2out.c (init_sections_and_labels): Always generate
12482 a debug_line_str_section for early LTO debug.
12483 (dwarf2out_finish): Reset debug_line_str_hash output early.
12484 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12486 (dwarf2out_early_finish): Output debug_line_str.
12488 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12490 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12491 index register on z196 or later.
12493 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12495 * config/s390/s390.c (s390_default_align): Set default function
12497 (s390_override_options_after_change): Call s390_default align.
12498 (s390_option_override_internal): Call s390_default_align.
12499 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12501 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12503 PR middle-end/86542
12504 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12505 to _looptemp_ clauses, other than the first two.
12507 2018-07-17 Martin Liska <mliska@suse.cz>
12509 * opts.c: Do not enable OPT_falign_* for -Os.
12511 2018-07-17 Martin Liska <mliska@suse.cz>
12513 * align.h (MAX_CODE_ALIGN): New.
12514 (MAX_CODE_ALIGN_VALUE): New.
12515 * common/config/i386/i386-common.c (ix86_handle_option):
12516 (MAX_CODE_ALIGN): Moved to align.h.
12517 * final.c (MAX_CODE_ALIGN): Likewise.
12518 * opts.c (parse_and_check_align_values):
12519 (MAX_CODE_ALIGN): Likewise.
12520 (MAX_CODE_ALIGN_VALUE): Likewise.
12522 2018-07-17 Martin Liska <mliska@suse.cz>
12524 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12525 in order to fulfil coding style.
12526 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12527 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12528 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12529 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12530 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12531 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12532 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12533 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12534 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12536 2018-07-17 Martin Liska <mliska@suse.cz>
12538 * align.h: New file.
12539 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12541 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12542 align_flags of label_to_alignment.
12543 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12545 * config/m68k/m68k.c: Do not use removed align_labels_value and
12547 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12548 (LOOP_ALIGN): Likewise.
12549 (LABEL_ALIGN): Likewise.
12550 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12551 Remove not used macro.
12552 (rs6000_loop_align): Change return type to align_flags.
12553 (rs6000_loop_align_max_skip): Remove.
12554 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12555 Change return type to align_flags.
12556 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12557 Remove not used macro.
12558 (rs6000_loop_align): Change return type to align_flags.
12559 (rs6000_loop_align_max_skip): Remove.
12560 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12561 * config/rx/rx-protos.h (rx_align_for_label): Make it
12563 * config/rx/rx.c (rx_align_for_label): Change return type
12565 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12567 into align_flags class.
12568 (LABEL_ALIGN): Likewise.
12569 (LOOP_ALIGN): Likewise.
12570 * config/s390/s390.c (s390_label_align): Use align_flags
12572 (s390_asm_output_function_label): Likewise.
12573 * config/sh/sh.c (sh_override_options_after_change):
12574 Use align_flags class directly without macros.
12575 (find_barrier): Likewise.
12576 (barrier_align): Likewise.
12577 (sh_loop_align): Likewise.
12578 * config/spu/spu.c (spu_option_override):
12579 Use align_flags_tuple::get_value instead of removed macros.
12580 (spu_sched_init): Likewise.
12581 * config/spu/spu.h (GTY): Likewise.
12582 * config/visium/visium.c (visium_option_override):
12583 Set "8" as default secondary alignment.
12584 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12585 in order to guarantee secondary alignment of 8.
12586 * coretypes.h: Include align.h header file.
12587 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12588 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12589 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12590 * doc/tm.texi.in: Likewise.
12591 * final.c (struct label_alignment): Remove not used structure.
12592 (LABEL_ALIGN): Change type to align_flags.
12593 (LOOP_ALIGN): Likewise.
12594 (JUMP_ALIGN): Likewise.
12595 (default_loop_align_max_skip): Remove.
12596 (default_label_align_max_skip): Likewise.
12597 (default_jump_align_max_skip): Likewise.
12598 (default_label_align_after_barrier_max_skip):
12599 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12600 (LABEL_TO_MAX_SKIP): Remove.
12601 (label_to_alignment): Return align_flags type instead of integer.
12602 (label_to_max_skip): Remove.
12603 (align_fuzz): Use align_flags type.
12604 (compute_alignments): Use align_flags type and use align_flags::max
12605 to combine multiple alignments.
12606 (grow_label_align): Grow vec instead of C array.
12607 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12608 (shorten_branches): Use align_flags type and use align_flags::max
12609 to combine multiple alignments.
12610 (final_scan_insn_1): Remove usage of secondary alignment that comes
12611 from label alignment, but instead use proper secondary alignment
12612 which is computed in grow_label_align.
12613 * flags.h (struct align_flags_tuple): Move to align.h.
12614 (struct align_flags): Likewise.
12615 (state_align_loops): Rename to align_loops.
12616 (state_align_jumps): Rename to align_jumps.
12617 (state_align_labels): Rename to align_labels.
12618 (state_align_functions): Rename to align_functions.
12619 (align_loops_log): Remove.
12620 (align_jumps_log): Remove.
12621 (align_labels_log): Remove.
12622 (align_functions_log): Remove.
12623 (align_loops_max_skip): Remove.
12624 (align_jumps_max_skip): Remove.
12625 (align_labels_max_skip): Remove.
12626 (align_functions_max_skip): Remove.
12627 (align_loops_value): Remove.
12628 (align_jumps_value): Remove.
12629 (align_labels_value): Remove.
12630 (align_functions_value): Remove.
12631 * output.h (label_to_alignment): Change return type to align_flags.
12632 (label_to_max_skip): Remove.
12633 * target.def: Remove loop_align_max_skip, label_align_max_skip,
12634 jump_align_max_skip macros.
12635 * targhooks.h (default_loop_align_max_skip): Remove.
12636 (default_label_align_max_skip): Likewise.
12637 (default_jump_align_max_skip): Likewise.
12638 (default_label_align_after_barrier_max_skip): Remove.
12639 * toplev.c (read_log_maxskip): Use ::normalize function.
12640 (parse_N_M): Remove not used argument and also call ::normalize.
12641 (parse_alignment_opts): Do not pass unused arguments.
12642 * varasm.c (assemble_start_function): Use directly align_functions
12643 instead of removed macros.
12644 * system.h: Do not poison removed macros.
12646 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12648 PR middle-end/86539
12649 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12650 and cond temporaries don't have reference type if iterator has
12651 pointer type. For init use &for_pre_body instead of pre_p if
12652 for_pre_body is non-empty.
12654 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12656 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12657 double-double modes to SFmode directly directly.
12658 (trunc<mode>sf2_fprs): Delete.
12660 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12662 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12663 for conversions between IFmode and the decimal floating point modes.
12664 (init_float128_ieee): Use the correct names for conversions between
12665 KFmode and the decimal floating point modes.
12667 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12669 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12670 for the conversions between TDmode and IFmode.
12671 (init_float128_ieee): Use more correct names for the conversions
12672 between TDmode and KFmode.
12674 2018-07-16 Jakub Jelinek <jakub@redhat.com>
12676 PR tree-optimization/86526
12677 * builtins.c (expand_builtin_memcmp): Formatting fixes.
12678 (inline_expand_builtin_string_cmp): Likewise.
12679 (inline_string_cmp): Likewise. Use c_readstr instead of
12680 builtin_memcpy_read_str. Add unit_mode temporary.
12682 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12684 PR middle-end/86528
12685 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12686 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12688 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
12690 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12691 Alphabetize prototypes of built-in functions, separating out
12692 built-in functions that are listed in this section but should be
12693 described elsewhere.
12695 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
12698 * expmed.c (emit_store_flag): Do not emit setcc followed by a
12699 conditional move when trapping comparison was split to a
12700 non-trapping one (and vice versa).
12702 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12704 * config/s390/s390.c (s390_function_profiler): Generate nops
12705 instead of profiler call sequences.
12706 * config/s390/s390.opt: Add the new option.
12708 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12710 * config/s390/s390.c (s390_function_profiler): Generate
12711 __mcount_loc section.
12712 * config/s390/s390.opt: Add the new option.
12714 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12716 * common.opt: Add the new warning.
12717 * config/s390/s390.c (s390_function_profiler): Emit "brasl
12718 %r0,__fentry__" when -mfentry is specified.
12719 (s390_option_override_internal): Disallow -mfentry for 31-bit
12721 * config/s390/s390.opt: Add the new option.
12723 2018-07-16 Richard Biener <rguenther@suse.de>
12726 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12727 for function-local FUNCTION_DECL and RESULT_DECL immediately.
12729 2018-07-16 Martin Liska <mliska@suse.cz>
12732 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12735 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12737 * config/arc/arcHS.md: Update ARCHS scheduling rules.
12739 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12741 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12743 * config/arc/arc-cpus.def (hs4x): New cpu.
12745 * config/arc/arc-tables.opt: Regenerate.
12746 * config/arc/arc.c (arc_sched_issue_rate): New function.
12747 (TARGET_SCHED_ISSUE_RATE): Define.
12748 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12749 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12751 (attr tune): Add ARCHS4x tune values.
12752 (attr tune_dspmpy): Define.
12753 (*tst): Correct instruction type.
12754 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12755 * config/arc/arcHS4x.md: New file.
12756 * config/arc/fpu.md: Update instruction type attributes.
12757 * config/arc/t-multilib: Regenerate.
12759 2018-07-16 Tom de Vries <tdevries@suse.de>
12762 * var-tracking.c (vt_initialize): Fix pre_dec handling.
12764 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12766 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12769 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
12771 PR tree-optimization/86514
12772 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12773 conversion to a boolean type from a type with greater precision.
12775 2018-07-16 Tom de Vries <tdevries@suse.de>
12777 * var-tracking.c (vt_initialize): Print adjusted insn slim if
12778 dump_flags request TDF_SLIM.
12780 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
12782 * fold-const.c (int_const_binop_1): Abstract...
12783 (wide_int_binop): ...wide int code here.
12784 (poly_int_binop): ...poly int code here.
12785 Abstract the rest of int_const_binop_1 into int_const_binop.
12786 * fold-const.h (wide_int_binop): New.
12787 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12788 Remove useless PLUS/MINUS_EXPR case.
12789 (zero_nonzero_bits_from_vr): Move wide int code...
12790 (zero_nonzero_bits_from_bounds): ...here.
12791 (extract_range_from_binary_expr_1): Move mask optimization code...
12792 (range_easy_mask_min_max): ...here.
12793 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12794 (range_easy_mask_min_max): New.
12796 2018-07-15 Jeff Law <law@redhat.com>
12799 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12802 2018-07-14 Jim Wilson <jimw@sifive.com>
12804 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12806 2018-07-14 Paul Koning <ni1d@arrl.net>
12808 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12810 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
12812 * lto-streamer-out.c (copy_function_or_variable): Dump info about
12815 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
12816 Steve Munroe <munroesj52@gmail.com>
12818 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12819 (_mm_andnot_si128): Likewise.
12820 (_mm_or_si128): Likewise.
12821 (_mm_xor_si128): Likewise.
12823 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
12825 PR middle-end/78809
12826 * builtins.c (expand_builtin_memcmp): Inline the calls first
12827 when result_eq is false.
12828 (expand_builtin_strcmp): Inline the calls first.
12829 (expand_builtin_strncmp): Likewise.
12830 (inline_string_cmp): New routine. Expand a string compare
12831 call by using a sequence of char comparison.
12832 (inline_expand_builtin_string_cmp): New routine. Inline expansion
12833 a call to str(n)cmp/memcmp.
12834 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12836 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12838 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
12840 * config/arm/driver-arm.c: Include arm-native.h.
12841 (host_detect_local_cpu): Use auto-generated data tables.
12842 (vendors, arm_cpu_table): Delete. Move part information to ...
12843 * config/arm/arm-cpus.in: ... here.
12844 * config/arm/parsecpu.awk (gen_native): New function.
12845 (vendor, part): New CPU fields.
12846 (END): Add support for building the native CPU detection tables.
12847 * config/arm/t-arm (arm-native.h): Add build rule.
12848 (driver-arm.o): Add dependency on arm-native.h.
12850 2018-07-13 Richard Biener <rguenther@suse.de>
12852 PR middle-end/85974
12853 * match.pd (addr1 - addr2): Allow either of the operand to
12856 2018-07-13 Tom de Vries <tdevries@suse.de>
12858 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12861 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
12863 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12864 arrays instead of numbered variables.
12866 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
12868 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12869 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12871 2018-07-13 Richard Biener <rguenther@suse.de>
12874 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12875 instead of get_context_die.
12877 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
12878 Richard Biener <rguenther@suse.de>
12880 PR middle-end/86489
12881 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12882 that the loop latch destination where phi is defined.
12884 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
12886 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12887 (riscv_expand_epilogue): Add assertion to check interrupt mode.
12888 (riscv_set_current_function): Extract getting interrupt type to new
12890 (riscv_get_interrupt_type): New function.
12891 (riscv_merge_decl_attributes): New function, checking interrupt type is
12893 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12895 2018-07-12 Paul Koning <ni1d@arrl.net>
12897 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12900 2018-07-12 Paul Koning <ni1d@arrl.net>
12902 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12903 zero reference, add doloop_end instead.
12904 * doc/md.texi (decrement_and_branch_until_zero): Remove.
12905 (Looping patterns): Remove decrement_and_branch_until_zero. Add
12906 detail for doloop_end.
12908 2018-07-12 Martin Sebor <msebor@redhat.com>
12911 * attribs.c (decl_attributes): Reject conflicting attributes before
12912 calling attribute handlers.
12914 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12916 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12918 (gcc::dump_manager::get_dump_file_name): likewise.
12919 (dump_begin): Likewise.
12920 * dumpfile.h (dump_begin): Update prototype.
12921 (gcc::dump_manager::get_dump_file_name,
12922 gcc::dump_manager::get_dump_file_name): Update prototype.
12924 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12926 * internal-fn.h (vectorizable_internal_fn_p): New function.
12927 * tree-vect-slp.c (compatible_calls_p): Likewise.
12928 (vect_build_slp_tree_1): Remove nops argument. Handle calls
12929 to internal functions.
12930 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12932 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12934 * fold-const.h (inverse_conditions_p): Declare.
12935 * fold-const.c (inverse_conditions_p): New function.
12936 * match.pd: Use inverse_conditions_p. Add folds of view_converts
12937 that test the inverse condition of a conditional internal function.
12938 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12939 * internal-fn.c (internal_fn_mask_index): Handle conditional
12940 internal functions.
12941 (vectorized_internal_fn_supported_p): New function.
12942 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12943 (any_pred_load_store): Replace with...
12944 (need_to_predicate): ...this new variable.
12945 (redundant_ssa_names): New variable.
12946 (ifcvt_can_use_mask_load_store): Move initial checks to...
12947 (ifcvt_can_predicate): ...this new function. Handle tree codes
12948 for which a conditional internal function exists.
12949 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12950 instead of ifcvt_can_use_mask_load_store. Update after variable
12952 (predicate_load_or_store): New function, split out from
12953 predicate_mem_writes.
12954 (check_redundant_cond_expr): New function.
12955 (value_available_p): Likewise.
12956 (predicate_rhs_code): Likewise.
12957 (predicate_mem_writes): Rename to...
12958 (predicate_statements): ...this. Use predicate_load_or_store
12959 and predicate_rhs_code.
12960 (combine_blocks, tree_if_conversion): Update after above name changes.
12961 (ifcvt_local_dce): Handle redundant_ssa_names.
12962 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12963 general conditional functions.
12964 * tree-vect-stmts.c (vectorizable_call): Likewise.
12966 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12967 Alan Hayward <alan.hayward@arm.com>
12968 David Sherwood <david.sherwood@arm.com>
12970 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12971 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12972 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12973 plus and minus and convert them into IFN_COND_FMA-based sequences.
12974 (convert_mult_to_fma): Handle conditional plus and minus.
12976 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12978 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12979 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12980 (cond_fnms_optab): New optabs.
12981 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12982 internal functions.
12983 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12984 * internal-fn.h (get_conditional_internal_fn): Declare.
12985 (get_unconditional_internal_fn): Likewise.
12986 * internal-fn.c (cond_ternary_direct): New macro.
12987 (expand_cond_ternary_optab_fn): Likewise.
12988 (direct_cond_ternary_optab_supported_p): Likewise.
12989 (FOR_EACH_COND_FN_PAIR): Likewise.
12990 (get_conditional_internal_fn): New function.
12991 (get_unconditional_internal_fn): Likewise.
12992 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12993 (gimple_match_op::gimple_match_op): Add a new overload for 5
12995 (gimple_match_op::set_op): Likewise.
12996 (gimple_resimplify5): Declare.
12997 * genmatch.c (decision_tree::gen): Generate simplifications for
12999 * gimple-match-head.c (gimple_simplify): Define an overload for
13000 5 operands. Handle calls with 5 arguments in the top-level overload.
13001 (convert_conditional_op): Handle conversions from unconditional
13002 internal functions to conditional ones.
13003 (gimple_resimplify5): New function.
13004 (build_call_internal): Pass a fifth operand.
13005 (maybe_push_res_to_seq): Likewise.
13006 (try_conditional_simplification): Try converting conditional
13007 internal functions to unconditional internal functions.
13008 Handle 3-operand unconditional forms.
13009 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
13010 Define ternary equivalents of the current rules for binary conditional
13011 internal functions.
13012 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
13013 ternary operations.
13014 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
13015 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
13016 (optab): Handle them.
13017 (SVE_COND_FP_TERNARY): New int iterator.
13018 (sve_fmla_op, sve_fmad_op): New int attributes.
13019 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
13020 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
13021 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
13023 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13025 * target.def (preferred_else_value): New target hook.
13026 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
13027 * doc/tm.texi: Regenerate.
13028 * targhooks.h (default_preferred_else_value): Declare.
13029 * targhooks.c (default_preferred_else_value): New function.
13030 * internal-fn.h (conditional_internal_fn_code): Declare.
13031 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
13032 (get_conditional_internal_fn): Use it.
13033 (conditional_internal_fn_code): New function.
13034 * gimple-match.h (gimple_match_cond): New struct.
13035 (gimple_match_op): Add a cond member function.
13036 (gimple_match_op::gimple_match_op): Update all forms to take a
13038 * genmatch.c (expr::gen_transform): Use the same condition as res_op
13039 for the suboperation, but don't specify a particular else_value.
13040 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
13041 (visit_nary_op, visit_reference_op_load): Pass
13042 gimple_match_cond::UNCOND to the gimple_match_op constructor.
13043 * gimple-match-head.c: Include tree-eh.h
13044 (convert_conditional_op): New function.
13045 (maybe_resimplify_conditional_op): Likewise.
13046 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
13047 (gimple_resimplify2): Likewise.
13048 (gimple_resimplify3): Likewise.
13049 (gimple_resimplify4): Likewise.
13050 (maybe_push_res_to_seq): Return null for conditional operations.
13051 (try_conditional_simplification): New function.
13052 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
13054 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
13056 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
13058 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
13060 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13062 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13064 (hash_tree): Do not hash DECL_FCONTEXT
13065 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
13066 Do not stream DECL_FCONTEXT.
13067 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
13068 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
13070 2018-07-12 Richard Biener <rguenther@suse.de>
13073 * dwarf2out.c (gen_block_die): Only output blocks when they have
13074 at least one !DECL_IGNORED_P variable.
13076 2018-07-12 Richard Biener <rguenther@suse.de>
13079 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
13080 Remove -mieee-fp handling.
13082 2018-07-12 Richard Biener <rguenther@suse.de>
13084 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
13085 left-over from last patch.
13087 2018-07-12 Jakub Jelinek <jakub@redhat.com>
13089 PR tree-optimization/86492
13090 * gimple-ssa-store-merging.c
13091 (imm_store_chain_info::coalesce_immediate_stores): Call
13092 check_no_overlap even for the merge_overlapping case. Formatting fix.
13094 2018-07-12 Richard Biener <rguenther@suse.de>
13096 PR middle-end/86479
13097 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
13098 move possibly trapping operations into the conditional.
13100 2018-07-12 Richard Biener <rguenther@suse.de>
13102 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
13103 (vn_lookup_simplify_result): Remove recursion limit applied
13105 (vn_nary_build_or_lookup_1): Adjust.
13106 (try_to_simplify): Likewise.
13107 * gimple-match-head.c (gimple_resimplify1): Instead apply one
13109 (gimple_resimplify2): Likewise.
13110 (gimple_resimplify3): Likewise.
13111 (gimple_resimplify4): Likewise.
13113 2018-07-11 Jakub Jelinek <jakub@redhat.com>
13115 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
13116 Use __mmask64 type instead of __mmask8 for __M argument.
13117 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
13118 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
13120 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
13121 __mmask16 for __M argument.
13122 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
13123 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
13124 to __mmask16 instead of __mmask8.
13125 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
13126 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13127 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13128 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13129 instead of __mmask16 for __U argument.
13130 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13131 __mmask16 instead of __mmask8 for __U argument.
13132 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13134 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
13136 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
13138 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
13140 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
13142 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
13144 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
13146 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
13148 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
13150 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
13152 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
13153 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
13154 return type as well as __M argument type and all casts from __mmask8
13156 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
13157 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
13158 return type as well as __M argument type and all casts from __mmask8
13160 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
13161 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
13162 return type as well as __M argument type and all casts from __mmask8
13164 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
13165 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
13166 return type as well as __M argument type and all casts from __mmask8
13168 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13169 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13172 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
13174 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13175 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13178 2018-07-11 Paul Koning <ni1d@arrl.net>
13180 * doc/md.texi (define_subst): Document how multiple occurrences of
13181 the same argument in the replacement pattern are handled.
13183 2018-07-11 Paul Koning <ni1d@arrl.net>
13185 * doc/extend.texi (Common Variable Attributes): Move "mode" into
13186 alphabetical order.
13187 (Common Type Attributes): Add "mode" attribute.
13189 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
13191 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13192 stream DECL_ORIGINAL_TYPE.
13193 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13194 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13195 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13196 Do not walk original type.
13197 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13199 (write_ts_decl_non_common_tree_pointers): Do not stream
13201 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13202 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13204 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13206 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13207 thread twice from the same starting edge.
13209 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13211 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13212 * gimple.c (gimple_call_nonnull_result_p): ...here...
13213 (gimple_call_nonnull_arg): ...and here.
13214 * gimple.h (gimple_call_nonnull_result_p): New.
13215 (gimple_call_nonnull_arg): New.
13217 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
13219 * config/arm/arm-cpus.in: Move information from fpu field of each
13220 cpu definition to the isa field.
13221 * config/arm/parsecpu.awk (fpu): Delete match rule.
13222 (gen_comm_data): Don't add bits from the CPU's FPU entry.
13224 2018-07-11 Richard Biener <rguenther@suse.de>
13227 * dwarf2out.c (init_sections_and_labels): Use
13228 output_asm_line_debug_info consistently.
13229 (dwarf2out_early_finish): Likewise.
13230 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13233 2018-07-11 Richard Biener <rguenther@suse.de>
13235 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13236 Rework father_bb setting in a way to avoid propagating constants
13237 multiple times on a loop body.
13239 2018-07-10 Mark Wielaard <mark@klomp.org>
13242 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13244 2018-07-10 Richard Biener <rguenther@suse.de>
13246 * hash-map.h (hash_map::iterator::operator*): Return
13247 references to key and value.
13249 2018-07-10 Jakub Jelinek <jakub@redhat.com>
13252 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13253 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13254 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13255 (gimplify_omp_for): For composite loops, move outer
13256 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13257 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
13258 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
13259 TREE_LIST for both the original class iterator and the "last" helper
13260 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
13261 loop, remember has_decl_expr from outer composite loops for the
13262 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13264 2018-07-09 Martin Sebor <msebor@redhat.com>
13266 PR middle-end/77357
13267 PR middle-end/86428
13268 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13269 accessing implicitly initialized array elements.
13270 * expr.c (string_constant): Handle string initializers of
13271 character arrays within aggregates.
13272 * gimple-fold.c (fold_array_ctor_reference): Add argument.
13273 Store element offset. As a special case, handle zero size.
13274 (fold_nonarray_ctor_reference): Same.
13275 (fold_ctor_reference): Add argument. Store subobject offset.
13276 * gimple-fold.h (fold_ctor_reference): Add argument.
13278 2018-07-09 Paul Koning <ni1d@arrl.net>
13280 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13281 (pdp11_insn_cost): New function.
13282 (pdp11_md_asm_adjust): New function.
13283 (TARGET_INVALID_WITHIN_DOLOOP): Define.
13284 (pdp11_rtx_costs): Update to match machine better.
13285 (output_addr_const_pdp11): Correct format mismatch warnings.
13286 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13287 * config/pdp11/pdp11.md: General change to add base_cost and/or
13288 length attributes for use by new pdp11_insn_cost function.
13289 (MIN_BRANCH): Correct definition.
13291 (doloop_end): Use standard pattern name for looping pattern.
13292 (doloop_end_nocc): New.
13293 (movsf): Add another constraint alternative.
13294 (zero_extendqihi2): Add constraint alternatives for not in place
13296 (zero_extendhisi2): Remove.
13297 (shift patterns): Add CC handling variants.
13301 (define_peephole2): New peephole to recognize mov that sets CC for
13304 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13306 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13307 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13310 2018-07-09 Jakub Jelinek <jakub@redhat.com>
13313 * real.c (real_nextafter): Return true if result is denormal.
13315 2018-07-09 Martin Liska <mliska@suse.cz>
13317 * common.opt: Add back wrongly removed attribute.
13319 2018-07-09 Richard Biener <rguenther@suse.de>
13322 * dwarf2out.c (gen_block_die): For an early generated DIE
13323 always output high/low PC attributes.
13325 2018-07-09 Tom de Vries <tdevries@suse.de>
13327 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13328 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13329 onto VAR_DECL with abstract origin.
13331 2018-07-07 Jim Wilson <jimw@sifive.com>
13333 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13335 2018-07-07 Tom de Vries <tdevries@suse.de>
13337 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13339 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
13341 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13343 (combine_bound): Use wide-int overflow calculation instead of
13345 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13347 * fold-const.c (int_const_binop_2): Same.
13348 (extract_muldiv_1): Same.
13349 (fold_div_compare): Same.
13350 (fold_abs_const): Same.
13352 * poly-int.h (add): Same.
13356 * predict.c (predict_iv_comparison): Same.
13357 * profile-count.c (slow_safe_scale_64bit): Same.
13358 * simplify-rtx.c (simplify_const_binary_operation): Same.
13359 * tree-chrec.c (tree_fold_binomial): Same.
13360 * tree-data-ref.c (split_constant_offset_1): Same.
13361 * tree-if-conv.c (idx_within_array_bound): Same.
13362 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13363 * tree-ssa-phiopt.c (minmax_replacement): Same.
13364 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13365 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13366 * vr-values.c (vr_values::adjust_range_with_scev): Same.
13367 * wide-int.cc (wi::add_large): Same.
13368 (wi::mul_internal): Same.
13369 (wi::sub_large): Same.
13370 (wi::divmod_internal): Same.
13371 * wide-int.h: Change overflow type to overflow_type for neg, add,
13372 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13373 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13374 mul_internal, divmod_internal.
13375 (overflow_type): New enum.
13376 (accumulate_overflow): New.
13378 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
13380 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13381 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13383 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13385 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13386 argument is checked for zero before entering loop, avoid checking again.
13388 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13390 * gimplify.h (generic_expr_could_trap_p): Set as global function.
13391 * gimplify.h (generic_expr_could_trap_p): Likwise.
13392 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13394 2018-07-06 Jakub Jelinek <jakub@redhat.com>
13396 PR tree-optimization/86401
13397 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13398 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13399 (fold_bit_and_mask): ... here. New helper function for match.pd.
13400 * fold-const.h (fold_bit_and_mask): Declare.
13401 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13403 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
13406 * target.def (translate_mode_attribute): New hook.
13407 * targhooks.h (default_translate_mode_attribute): Declare.
13408 * targhooks.c (default_translate_mode_attribute): New function.
13409 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13410 * doc/tm.texi: Regenerate.
13411 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13412 (rs6000_translate_mode_attribute): New function.
13414 2018-07-06 Paul Koning <ni1d@arrl.net>
13416 * doc/md.texi (define_split): Document DONE and FAIL.
13417 (define_peephole2): Ditto.
13419 2018-07-05 Jeff Law <law@redhat.com>
13421 PR tree-optimization/86010
13422 * tree-ssa-dse.c (compute_trims): More aggressively trim at
13423 both the head and tail of mem* and str* calls.
13425 2018-07-05 Jim Wilson <jimw@sifive.com>
13427 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13429 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
13431 * config/aarch64/aarch64-simd.md: correct flags text for
13432 MIN_EXPR replacement.
13434 2018-07-05 James Clarke <jrtc27@jrtc27.com>
13436 * configure: Regenerated.
13438 2018-07-05 Carl Love <cel@us.ibm.com>
13440 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13441 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13442 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13443 VSX_BUILTIN_DOUBLEL_V4SF.
13445 2018-07-05 Martin Sebor <msebor@redhat.com>
13448 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13449 than its domain to compute its the upper bound of a char array.
13451 2018-07-05 Nathan Sidwell <nathan@acm.org>
13453 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13454 * doc/cpp.texi: Update comment.
13455 * doc/tm.texi: Rebuilt.
13456 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13457 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13458 * doc/extend.texi (Backwards Compatibility): Clarify it is system
13459 headers affected by extern "C".
13460 * system.h: Poison NO_IMPLICIT_EXTERN_C.
13461 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13462 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13463 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13464 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13465 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13466 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13467 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13468 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13469 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13470 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13471 config/sparc/sp64-elf.h, config/spu/spu.h,
13472 config/stormy16/stormy16.h, config/v850/v850.h,
13473 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13474 define NO_IMPLICIT_EXTERN_C.
13475 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13477 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13480 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13481 instead of GET_MODE_SIZE when comparing Units.
13483 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13486 * rtlanal.c (set_noop_p): Constrain on mode change,
13487 include hard-reg-set.h
13489 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13491 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13493 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13496 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13499 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13501 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13503 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13506 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13508 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13510 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13512 PR middle-end/86380
13513 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13515 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13517 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13518 neg_*_op* variables.
13520 2018-07-04 Martin Liska <mliska@suse.cz>
13522 * tree-switch-conversion.c: Define
13523 max_ratio_for_speed and max_ratio_for_size constants.
13525 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13526 Martin Liska <mliska@suse.cz>
13528 PR middle-end/66240
13531 * common.opt: Rename align options with 'str_' prefix.
13532 * common/config/i386/i386-common.c (set_malign_value): New
13534 (ix86_handle_option): Use it to set -falign-* options/
13535 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13536 type from int to string.
13537 * config/aarch64/aarch64.c: Update default values from int
13539 * config/alpha/alpha.c (alpha_override_options_after_change):
13541 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13542 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13543 max skip conditionally.
13544 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13545 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13546 max skip conditionally.
13547 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13548 max skip conditionally.
13549 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13550 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13551 max skip conditionally.
13552 * config/i386/i386.c (struct ptt): Change type from int to
13554 (ix86_default_align): Set default values.
13555 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13556 max skip conditionally.
13557 * config/i386/iamcu.h (SUBALIGN_LOG): New.
13558 (ASM_OUTPUT_MAX_SKIP_ALIGN):
13559 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13560 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13561 max skip conditionally.
13562 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13563 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13564 * config/i386/x86-64.h (SUBALIGN_LOG): New.
13565 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13566 max skip conditionally.
13567 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13568 * config/ia64/ia64.c (ia64_option_override): Set default values
13569 for alignment options.
13570 * config/m68k/m68k.c: Handle new str_align_* options.
13571 * config/mips/mips.c (mips_set_compression_mode): Change
13573 (mips_option_override): Set default values for options.
13574 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13576 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13578 * config/rx/rx.c (rx_option_override): Likewise.
13579 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13580 (LABEL_ALIGN): Use align_labels_log.
13581 (LOOP_ALIGN): Use align_loops_align.
13582 * config/s390/s390.c (s390_asm_output_function_label): Use new
13584 * config/sh/sh.c (sh_override_options_after_change):
13585 Change type of constants.
13586 * config/spu/spu.c (spu_sched_init): Likewise.
13587 * config/sparc/sparc.c (sparc_option_override): Set default
13588 values for options.
13589 * config/visium/visium.c (visium_option_override): Likewise.
13590 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13591 emit p2align format with last argument if it's not needed.
13592 * doc/invoke.texi: Document extended format of -falign-*.
13593 * final.c: Use align_labels alignment.
13594 * flags.h (struct target_flag_state): Change type to use
13596 (struct align_flags_tuple): New.
13597 (struct align_flags): Likewise.
13598 (align_loops_log): Redefine macro to use new types.
13599 (align_loops_max_skip): Redefine macro to use new types.
13600 (align_jumps_log): Redefine macro to use new types.
13601 (align_jumps_max_skip): Redefine macro to use new types.
13602 (align_labels_log): Redefine macro to use new types.
13603 (align_labels_max_skip): Redefine macro to use new types.
13604 (align_functions_log): Redefine macro to use new types.
13605 (align_loops): Redefine macro to use new types.
13606 (align_jumps): Redefine macro to use new types.
13607 (align_labels): Redefine macro to use new types.
13608 (align_functions): Redefine macro to use new types.
13609 (align_functions_max_skip): Redefine macro to use new types.
13610 (align_loops_value): New macro.
13611 (align_jumps_value): New macro.
13612 (align_labels_value): New macro.
13613 (align_functions_value): New macro.
13614 * function.c (invoke_set_current_function_hook): Propagate
13615 alignment values from flags to global variables default in
13617 * ipa-icf.c (sem_function::equals_wpa): Use
13618 cl_optimization_option_eq instead of memcmp.
13619 * lto-streamer.h (cl_optimization_stream_out): Support streaming
13621 (cl_optimization_stream_in): Likewise.
13622 * optc-save-gen.awk: Support strings in cl_optimization.
13623 * opth-gen.awk: Likewise.
13624 * opts.c (finish_options): Remove error checking of invalid
13626 (MAX_CODE_ALIGN): Remove.
13627 (MAX_CODE_ALIGN_VALUE): Likewise.
13628 (parse_and_check_align_values): New function.
13629 (check_alignment_argument): Likewise.
13630 (common_handle_option): Use check_alignment_argument.
13631 * opts.h (parse_and_check_align_values): Declare.
13632 * toplev.c (init_alignments): Remove.
13633 (read_log_maxskip): New.
13634 (parse_N_M): Likewise.
13635 (parse_alignment_opts): Likewise.
13636 (backend_init_target): Remove usage of init_alignments.
13637 * toplev.h (parse_alignment_opts): Declare.
13638 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13640 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13641 * tree.c (cl_option_hasher::equal): New.
13642 * varasm.c: Use new global macros.
13644 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13646 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13647 Use a simpler align directive also if MAXSKIP = ALIGN-1.
13648 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13649 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13650 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13651 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13652 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13653 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13654 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13655 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13656 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13657 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13658 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13660 2018-07-04 Martin Liska <mliska@suse.cz>
13661 Jonathan Wakely <jwakely@redhat.com>
13663 * coverage.c: Use correct type.
13664 * doc/invoke.texi: Language correction.
13666 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
13669 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13670 ENDBRANCH for non-tail call which may return via indirect branch.
13671 * doc/extend.texi: Document indirect_return attribute.
13673 2018-07-03 Martin Sebor <msebor@redhat.com>
13675 PR tree-optimization/86274
13676 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13678 (format_floating): Correct handling of infinities and NaNs.
13680 2018-07-03 Martin Sebor <msebor@redhat.com>
13682 * print-tree.c (print_real_cst): New function.
13683 (print_node_brief): Call it.
13684 (print_node): Ditto.
13686 2018-07-03 Jeff Law <law@redhat.com>
13688 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13689 into a single pattern.
13691 * config/h8300/h8300.md (ors code_iterator): New.
13692 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13693 a single pattern and single splitter.
13694 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13695 (iorqi3_1, xorqi3_1): Likewise.
13696 (iorqi3, xorqi3 expanders): Similarly.
13698 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13699 (movmd_internal) into a single pattern using the P mode iterator.
13700 (movmd splitters): Similarly.
13701 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13702 (movsd splitters): Similarly.
13704 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13705 ADDB, ADDW and ADDL into a single ADD attribute which selects the
13706 right table based on the size of the operand.
13707 * config/h8300/h8300.md (length_table): Corresponding changes. All
13708 references to "addb", "addw" and "addl" changed to "add".
13709 (btst patterns): Merge two variants into a single pattern.
13710 (tstqi, tsthi): Likewise.
13711 (addhi3_incdec, addsi3_incdec): Likewise.
13712 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13713 (mulhi3, mulsi3): Likewise.
13714 (udivhi3, udivsi3): Likewise.
13715 (divhi3, divsi3): Likewise.
13716 (andorqi3, andorhi3, andorsi3): Likewise.
13718 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
13721 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13722 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13724 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13726 PR tree-optimization/85694
13727 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13728 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13730 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13731 (<u>avg<mode>3_ceil): New patterns.
13733 2018-07-03 David Malcolm <dmalcolm@redhat.com>
13735 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13736 scan-tree-dump directive.
13737 * gcc.dg/vect/slp-perm-2.c: Likewise.
13738 * gcc.dg/vect/slp-perm-3.c: Likewise.
13739 * gcc.dg/vect/slp-perm-5.c: Likewise.
13740 * gcc.dg/vect/slp-perm-6.c: Likewise.
13741 * gcc.dg/vect/slp-perm-7.c: Likewise.
13742 * gcc.dg/vect/slp-perm-8.c: Likewise.
13744 2018-07-03 Marek Polacek <polacek@redhat.com>
13746 PR middle-end/86202
13747 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13749 2018-07-03 Richard Biener <rguenther@suse.de>
13752 * tree-ssa-structalias.c (find_func_clobbers): Properly
13753 handle indirect calls.
13755 2018-07-03 Jeff Law <law@redhat.com>
13757 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13758 (shifts): New code iterator.
13759 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13760 expander. Fix HImode handling on H8/SX.
13761 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13762 (subqi3, subhi3, subsi3 expanders): Likewise.
13763 (andqi3, andhi3, andsi3 expanders): Likewise.
13764 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13765 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13766 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13767 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13768 (zero_extendqihi2, zero_extendqisi2): Likewise.
13769 (extendqihi2, extendqisi2): Likewise.
13770 (rotlqi3, rotlhi3, rotlsi3): Likewise.
13771 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13772 (rotlqi3_1, rotlhi3_1): Likewise.
13773 (logicalhi3_sn, logicalsi3_sn): Likewise.
13774 (logicalhi3, logicalsi3): Likewise.
13776 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13778 * tree-vect-patterns.c (vect_recog_rotate_pattern)
13779 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13780 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13781 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13782 type to append_pattern_def_seq instead of creating a stmt_vec_info
13784 (build_mask_conversion): Likewise. Remove vinfo argument.
13785 (vect_add_conversion_to_patterm): Likewise, renaming to...
13786 (vect_add_conversion_to_pattern): ...this.
13787 (vect_recog_mask_conversion_pattern): Update call to
13788 build_mask_conversion. Pass the vector type to
13789 append_pattern_def_seq here too.
13790 (vect_recog_gather_scatter_pattern): Update call to
13791 vect_add_conversion_to_pattern.
13793 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13795 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13796 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13797 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13798 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13799 STMT_VINFO_PATTERN_DEF_SEQ to null here.
13800 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13801 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13802 append_pattern_def_seq instead of new_pattern_def_seq.
13803 (vect_recog_divmod_pattern): Do both of the above.
13804 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13807 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13809 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13810 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13811 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13812 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13813 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13814 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13815 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13816 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13817 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13818 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13819 parameter with a single stmt_vec_info.
13820 (vect_recog_func_ptr): Likewise.
13821 (vect_recog_gather_scatter_pattern): Likewise, folding in...
13822 (vect_try_gather_scatter_pattern): ...this.
13823 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13824 the stmt_vec_info of the statement to be matched. Don't clear
13825 STMT_VINFO_RELATED_STMT.
13826 (vect_pattern_recog): Update call accordingly.
13828 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13830 PR tree-optimization/85694
13831 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13832 (uavgM3_ceil): Document new optabs.
13833 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13834 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13836 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13837 (savg_ceil_optab): New optabs.
13838 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13839 (vect_vect_recog_func_ptrs): Add it.
13840 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13841 constant directly from the associated lhs.
13843 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13845 * tree-vect-patterns.c (vect_split_statement): New function.
13846 (vect_convert_input): Use it to try to split an existing cast.
13848 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13850 * poly-int.h (print_hex): New function.
13851 * dumpfile.h (dump_dec, dump_hex): Declare.
13852 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13853 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13854 min_input_precision, operation_precision and operation_sign.
13855 * tree-vect-patterns.c (vect_get_range_info): New function.
13856 (vect_same_loop_or_bb_p, vect_single_imm_use)
13857 (vect_operation_fits_smaller_type): Delete.
13858 (vect_look_through_possible_promotion): Add an optional
13859 single_use_p parameter.
13860 (vect_recog_over_widening_pattern): Rewrite to use new
13861 stmt_vec_info infomration. Handle one operation at a time.
13862 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13863 (vect_truncatable_operation_p, vect_set_operation_type)
13864 (vect_set_min_input_precision): New functions.
13865 (vect_determine_min_output_precision_1): Likewise.
13866 (vect_determine_min_output_precision): Likewise.
13867 (vect_determine_precisions_from_range): Likewise.
13868 (vect_determine_precisions_from_users): Likewise.
13869 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13870 (vect_vect_recog_func_ptrs): Put over_widening first.
13872 (vect_pattern_recog): Call vect_determine_precisions.
13874 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13876 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13877 statements that have been replaced by further pattern statements.
13878 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13880 2018-07-03 Richard Biener <rguenther@suse.de>
13882 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13883 always set *dt. Dump vectype in vectype overload.
13884 * dumpfile.h (dump_gimple_expr): New function.
13885 (dump_gimple_expr_loc): Likewise.
13886 * dumpfile.c (dump_gimple_expr): New function.
13887 (dump_gimple_expr_loc): Likewise.
13889 2018-07-02 Jeff Law <law@redhat.com>
13891 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13892 the H8/300, H8/300H and H8/S variants into a single pattern.
13893 (movhi_h8300, movqi_h8300hs): Similarly.
13894 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13895 (QHI mode iterator): New.
13897 * config/h8300/h8300.md: Remove trailing whitespace.
13899 2018-07-02 Jim Wilson <jimw@sifive.com>
13901 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13902 instead of emit_insn for interrupt returns.
13903 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13904 (riscv_sret, riscv_uret): Likewise.
13906 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13908 * pretty-print.c (selftest::test_pp_format): Move save and restore
13909 of quotes to class auto_fix_quotes, and add an instance.
13910 * selftest.c: Include "intl.h".
13911 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13912 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13913 * selftest.h (selftest::auto_fix_quotes): New class.
13915 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
13917 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13918 (aarch64_sve_prepare_conditional_op): Remove.
13919 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13920 Allow aarch64_simd_reg_or_zero as select operand; remove
13921 the aarch64_sve_prepare_conditional_op call.
13922 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13923 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13924 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13925 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13926 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13927 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13928 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13929 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13930 and a splitters to match all of the *_any patterns.
13931 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13933 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13934 (SVE_COND_FP_BINARY_REV): Remove.
13935 (sve_int_op_rev, sve_fp_op_rev): New.
13936 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13937 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13938 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13939 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13940 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13941 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13942 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13943 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13944 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13946 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13947 Remove match_dup 1 from the inner unspec.
13948 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13950 * config/aarch64/aarch64.md (movprfx): New attr.
13951 (length): Default movprfx to 8.
13952 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13953 (*madd<SVE_I>, *msub<SVE_I): Likewise.
13954 (*<su>mul<SVE_I>3_highpart): Likewise.
13955 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13956 (*v<ASHIFT><SVE_I>3): Likewise.
13957 (*<su><MAXMIN><SVE_I>3): Likewise.
13958 (*<su><MAXMIN><SVE_F>3): Likewise.
13959 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13960 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13961 (*div<SVE_F>4): Likewise.
13963 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
13965 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13968 2018-07-02 Richard Biener <rguenther@suse.de>
13970 PR tree-optimization/86363
13971 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13972 memset argument refers to a non-variable address.
13974 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13976 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13977 {PLUS,MINUS}_EXPR code to...
13978 (adjust_symbolic_bound): ...here,
13979 (combine_bound): ...here,
13980 (set_value_range_with_overflow): ...and here.
13982 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13984 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13986 (extract_range_from_abs_expr): ...here.
13988 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
13990 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13991 -fno-omit-frame-pointer when not optimizing.
13993 2018-07-02 Martin Liska <mliska@suse.cz>
13996 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13997 (propagate_nothrow): Likewise.
13999 2018-07-02 Martin Liska <mliska@suse.cz>
14002 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
14004 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14006 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
14007 function in r262149, changing "loc" param from source_location to
14008 const dump_location_t &.
14009 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
14010 declaration, as above.
14012 2018-07-01 Paul Koning <ni1d@arrl.net>
14014 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14015 -munit-asm, -mgnu-asm, -mdec-asm.
14016 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
14017 (pdp11_output_labelref): New.
14018 (pdp11_output_def): New.
14019 (pdp11_output_addr_vec_elt): New.
14020 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
14021 %# and %@ format codes.
14022 (pdp11_option_override): New.
14023 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
14024 (pdp11_output_ident): New.
14025 (pdp11_asm_named_section): New.
14026 (pdp11_asm_init_sections): New.
14027 (pdp11_file_start): New.
14028 (pdp11_file_end): New.
14029 (output_ascii): Use .ascii/.asciz for -mdec-asm.
14030 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
14031 %o, like %c but octal.
14032 (pdp11_option_override): New.
14033 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
14035 (DATA_SECTION_ASM_OP): Ditto.
14036 (READONLY_DATA_SECTION_ASM_OP): New.
14037 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
14038 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
14039 (ASM_OUTPUT_LABELREF): Ditto.
14040 (ASM_OUTPUT_DEF): Ditto.
14041 (ASM_OUTPUT_EXTERNAL): New.
14042 (ASM_OUTPUT_SOURCE_FILENAME): New.
14043 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
14044 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
14045 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
14046 %# and %@ format codes.
14047 * config/pdp11/pdp11.opt (mgnu-asm): New.
14048 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
14049 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
14050 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
14052 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
14054 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
14055 dereferencing path[] beyond its length.
14057 (debug_all_paths): New.
14058 (rewire_first_differing_edge): New.
14059 (adjust_paths_after_duplication): New.
14060 (duplicate_thread_path): Call adjust_paths_after_duplication.
14062 (thread_through_all_blocks): Add new argument to
14063 duplicate_thread_path.
14065 2018-06-30 Jim Wilson <jimw@sifive.com>
14067 * config/riscv/predicates.md (p2m1_shift_operand): New.
14068 (high_mask_shift_operand): New.
14069 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
14070 pattern using p2m1_shift_operand.
14071 (lshsi3_zero_extend_3+2): New combiner pattern using
14072 high_mask_shift_operand.
14074 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14076 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
14078 (vect_recog_rotate_pattern): ...here.
14079 (vect_convert_input): Try to insert casts of invariants in the
14081 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
14082 preheader to be empty.
14084 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14086 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
14087 vector type. If given, install it in the new statement's
14088 STMT_VINFO_VECTYPE.
14089 (vect_element_precision): New function.
14090 (vect_unpromoted_value): New struct.
14091 (vect_unpromoted_value::vect_unpromoted_value): New function.
14092 (vect_unpromoted_value::set_op): Likewise.
14093 (vect_look_through_possible_promotion): Likewise.
14094 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
14095 (vect_widened_op_tree, vect_convert_input): Likewise.
14096 (vect_convert_inputs, vect_convert_output): Likewise.
14097 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
14098 to handle the optional cast of the multiplication result and
14099 vect_widened_op_tree to detect the widened multiplication itself.
14100 Do not require the input and output of promotion casts to have
14101 the same sign, but base the signedness of the operation on the
14102 input rather than the result. If the pattern includes two
14103 promotions, check that those promotions have the same sign.
14104 Do not restrict the MULT_EXPR handling to a double-width result;
14105 handle quadruple-width results and wider. Use vect_convert_inputs
14106 to convert the inputs to the common type.
14107 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
14108 to handle the optional cast of the ABS result. Also allow a sign
14109 change or a sign extension between the ABS and MINUS.
14110 Use vect_widened_op_tree to detect the widened subtraction and use
14111 vect_convert_inputs to convert the inputs to the common type.
14112 (vect_handle_widen_op_by_const): Delete.
14113 (vect_recog_widen_op_pattern): New function.
14114 (vect_recog_widen_mult_pattern): Use it.
14115 (vect_recog_widen_shift_pattern): Likewise.
14116 (vect_recog_widen_sum_pattern): Use
14117 vect_look_through_possible_promotion to handle the promoted
14120 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14122 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
14123 the containing gimple_seq *.
14124 * gimple-iterator.h (gsi_for_stmt): Declare it.
14125 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
14126 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14127 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14128 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14129 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14131 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14133 (vect_mark_pattern_stmts): ...here. Handle cases in which the
14134 statement being replaced is part of an existing pattern
14135 definition sequence, inserting the new pattern statements before
14137 (vect_pattern_recog_1): Don't return a bool. If the statement
14138 is already part of a pattern, instead apply pattern matching
14139 to the pattern definition statements. Don't clear the
14140 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
14141 (vect_pattern_recog): Don't break after the first match;
14142 continue processing the pattern definition statements instead.
14143 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
14145 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14147 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14148 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14149 (vect_recog_widen_sum_pattern): Use it.
14151 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14153 * tree-vect-loop.c (vectorizable_reduction): Assert that the
14154 phi is not a pattern statement and has not been replaced by
14155 a pattern statement.
14156 * tree-vect-patterns.c (type_conversion_p): Don't check
14157 STMT_VINFO_IN_PATTERN_P.
14158 (vect_recog_vector_vector_shift_pattern): Likewise.
14159 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
14160 the pattern statement rather than the original statement; check
14161 directly for a WIDEN_MULT_EXPR here.
14162 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
14163 vect_is_simple_use to return the pattern statement rather
14164 than the original statement; use is_pattern_stmt_p to check
14165 for such a pattern statement.
14166 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
14167 to return the pattern statement rather than the original statement;
14168 don't do the same transformation here.
14169 (vect_is_simple_use): If the defining statement has been replaced
14170 by a pattern statement, return the pattern statement instead.
14171 Remove the corresponding (local) transformation from the vectype
14174 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14176 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14177 end and default to null.
14178 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14179 (vectorizable_reduction): Update calls accordingly, dropping the
14180 gimple ** argument if the passed-back statement isn't needed.
14181 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14182 (vect_recog_rotate_pattern): Likewise.
14183 (vect_recog_mask_conversion_pattern): Likewise.
14184 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14185 (vect_mask_constant_operand_p): Likewise.
14186 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14187 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14188 (get_group_load_store_type, get_load_store_type): Likewise.
14189 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14190 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14191 (vectorizable_conversion, vectorizable_assignment): Likewise.
14192 (vectorizable_shift, vectorizable_operation): Likewise.
14193 (vectorizable_store, vect_is_simple_cond): Likewise.
14194 (vectorizable_condition, vectorizable_comparison): Likewise.
14195 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14196 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14197 and move it to the end. Cope with null def_stmt_outs.
14199 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
14201 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14203 2018-06-29 Jeff Law <law@redhat.com>
14205 * config/v850/v850.c (v850_legitimate_address_p): Handle large
14206 displacements for TARGET_V850E2V3 and newer.
14207 (TARGET_LRA_P): Remove. Defaults to LRA now.
14208 * config/v850/v850.md (sign23byte_load): Remove.
14209 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14210 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14212 2018-06-29 Martin Liska <mliska@suse.cz>
14215 * coverage.c (coverage_init): Mangle full path name.
14216 * doc/invoke.texi: Document the change.
14217 * gcov-io.c (mangle_path): New.
14218 * gcov-io.h (mangle_path): Likewise.
14219 * gcov.c (mangle_name): Use mangle_path for path mangling.
14221 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14223 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14224 if starting source register is not even.
14226 2018-06-29 Martin Liska <mliska@suse.cz>
14228 PR tree-optimization/86263
14229 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14230 Make edge redirection.
14232 2018-06-29 David Malcolm <dmalcolm@redhat.com>
14234 * dumpfile.c (dump_loc): Add indentation based on scope depth.
14235 (dump_scope_depth): New variable.
14236 (get_dump_scope_depth): New function.
14237 (dump_begin_scope): New function.
14238 (dump_end_scope): New function.
14239 * dumpfile.h (get_dump_scope_depth): New declaration.
14240 (dump_begin_scope): New declaration.
14241 (dump_end_scope): New declaration.
14242 (class auto_dump_scope): New class.
14243 (AUTO_DUMP_SCOPE): New macro.
14244 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14247 2018-06-29 Richard Biener <rguenther@suse.de>
14249 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14250 compute_all_dependences succeeds.
14251 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14252 exceed --param loop-max-datarefs-for-datadeps.
14254 2018-06-29 Jakub Jelinek <jakub@redhat.com>
14256 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14258 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
14261 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14262 alternative 0 in preferred_for_speed attribute.
14264 2018-06-28 Paul Koning <ni1d@arrl.net>
14266 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14267 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14268 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14269 * config/pdp11/pdp11.md: Correct "length" attribute calculation
14270 for shift insn patterns.
14272 2018-06-28 David Malcolm <dmalcolm@redhat.com>
14274 * cgraph.c (cgraph_node::get_body): Replace assignments to
14275 "dump_file" with calls to set_dump_file.
14276 * dumpfile.c (alt_dump_file): Make static, and group with...
14277 (alt_flags): ...this definition.
14278 (dumps_are_enabled): New variable.
14279 (refresh_dumps_are_enabled): New function.
14280 (set_dump_file): New function.
14281 (set_alt_dump_file): New function.
14282 (gcc::dump_manager::dump_start): Replace assignments to
14283 "dump_file" and "alt_dump_file" with calls to set_dump_file and
14285 (gcc::dump_manager::dump_finish): Likewise.
14286 * dumpfile.h (alt_dump_file): Delete decl.
14287 (dumps_are_enabled): New variable decl.
14288 (set_dump_file): New function decl.
14289 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14291 * tree-nested.c (lower_nested_functions): Replace assignments to
14292 "dump_file" with calls to set_dump_file.
14294 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14296 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14297 goto_locus of each outgoing edge of each basic block.
14299 2018-06-28 Richard Biener <rguenther@suse.de>
14301 * dwarf2out.c (decl_scope_table): Remove.
14302 (push_decl_scope): Likewise.
14303 (pop_decl_scope): Likewise.
14304 (gen_type_die_for_member): Do not call push/pop_decl_scope.
14305 (gen_struct_or_union_type_die): Likewise.
14306 (gen_tagged_type_die): Likewise.
14307 (dwarf2out_init): Do not initialize decl_scope_table.
14308 (dwarf2out_c_finalize): Do not free it.
14310 2018-06-28 Richard Biener <rguenther@suse.de>
14312 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14313 deciding whether to not re-use a DIE.
14315 2018-06-28 Richard Biener <rguenther@suse.de>
14317 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14318 DW_AT_abstract_origin attribute.
14320 2018-06-28 Martin Liska <mliska@suse.cz>
14322 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14323 Use newly introduced constants.
14324 * tree-switch-conversion.h (struct jump_table_cluster):
14325 Define max_ratio_for_size and max_ratio_for_speed.
14327 2018-06-28 Martin Liska <mliska@suse.cz>
14329 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14330 Add new checking assert to catch invalid state.
14331 (jump_table_cluster::can_be_handled): Handle single case
14333 (jump_table_cluster::is_beneficial): Bail out for such case.
14334 (bit_test_cluster::find_bit_tests):
14335 Add new checking assert to catch invalid state.
14336 (bit_test_cluster::can_be_handled): Handle single case
14338 (bit_test_cluster::is_beneficial): Bail out for such case.
14339 (switch_decision_tree::analyze_switch_statement):
14342 2018-06-28 Martin Liska <mliska@suse.cz>
14344 * common.opt: Introduce -completion option.
14345 * gcc.c (driver_handle_option): Handle it.
14346 (driver::main): Print completions if completion
14348 * opt-suggestions.c (option_proposer::get_completions):
14350 (option_proposer::suggest_completion): Likewise.
14351 (option_proposer::find_param_completions): Likewise.
14352 (verify_autocompletions): Likewise.
14353 (test_completion_valid_options): Likewise.
14354 (test_completion_valid_params): Likewise.
14355 (in_completion_p): Likewise.
14356 (empty_completion_p): Likewise.
14357 (test_completion_partial_match): Likewise.
14358 (test_completion_garbage): Likewise.
14359 (opt_proposer_c_tests): Likewise.
14360 * opt-suggestions.h: Declare new functions.
14361 * opts.c (common_handle_option): Handle OPT__completion_.
14362 * selftest-run-tests.c (selftest::run_tests): Add
14363 opt_proposer_c_tests.
14364 * selftest.c (assert_str_startswith): New.
14365 * selftest.h (assert_str_startswith): Likewise.
14366 (opt_proposer_c_tests): New.
14367 (ASSERT_STR_STARTSWITH): Likewise.
14369 2018-06-28 Martin Liska <mliska@suse.cz>
14371 * Makefile.in: Add opt-suggestions.o.
14372 * gcc-main.c: Include opt-suggestions.h.
14373 * gcc.c (driver::driver): Likewise.
14374 (driver::~driver): Remove m_option_suggestions.
14375 (driver::build_option_suggestions): Moved to option_proposer.
14376 (driver::suggest_option): Likewise.
14377 (driver::handle_unrecognized_options): Use option_proposer.
14378 * gcc.h (class driver): Add new memver m_option_proposer.
14379 * opt-suggestions.c: New file.
14380 * opt-suggestions.h: New file.
14382 2018-06-28 Martin Liska <mliska@suse.cz>
14384 * vec.h (class auto_string_vec): New (moved from auto_argvec).
14385 (auto_string_vec::~auto_string_vec): Likewise.
14387 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14389 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14390 prevent_decl_creation_for_types fields up and add reset_location field.
14391 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14392 statement if id->reset_location is true.
14393 (copy_edges_for_bb): Do not set goto_locus on the new edges if
14394 id->reset_location is true.
14395 (copy_phis_for_bb): Force input_location on the arguments if
14396 id->reset_location is true.
14397 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14398 is set on the function to be inlined.
14400 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
14402 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14404 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
14406 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14407 registers for Pmode.
14408 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14409 hard registers for the clobbered pseudo.
14411 2018-06-27 Paul Koning <ni1d@arrl.net>
14413 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14414 mutually exclusive options.
14415 * config/pdp11/constraints.md (h): New constraint.
14416 (O): Update definition to match shift code generation.
14417 (D): New constraint.
14418 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14420 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14422 (output_jump): Change arguments.
14423 (pdp11_fixed_cc_regs): New function.
14424 (pdp11_cc_mode): Ditto.
14425 (pdp11_expand_shift): Ditto.
14426 (pdp11_assemble_shift): Ditto.
14427 (pdp11_small_shift): Ditto.
14428 (pdp11_branch_cost): Remove.
14429 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14431 (pdp11_register_move_cost): Update for CC registers.
14432 (pdp11_rtx_costs): Add case for LSHIFTRT.
14433 (pdp11_output_jump): Add CCNZ mode conditional branches.
14434 (notice_update_cc_on_set): Remove.
14435 (pdp11_cc_mode): New function.
14436 (simple_memory_operand): Correct pre/post decrement case.
14437 (no_side_effect_operand): New function.
14438 (pdp11_regno_reg_class): Add CC_REGS class.
14439 (pdp11_fixed_cc_regs): New function.
14440 (pdp11_small_shift): New function.
14441 (pdp11_expand_shift): New function to expand shift insns.
14442 (pdp11_assemble_shift): New function to output shifts.
14443 (pdp11_branch_cost): Remove.
14444 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14445 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14446 (WCHAR_TYPE): Ditto.
14447 (PTRDIFF_TYPE): Ditto.
14448 (ADJUST_INSN_LENGTH): New macro.
14449 (FIXED_REGISTERS): Add CC registers.
14450 (CALL_USED_REGISTERS): Ditto.
14451 (reg_class): Ditto.
14452 (REG_CLASS_NAMES): Ditto.
14453 (REG_CLASS_CONTENTS): Ditto.
14454 (SELECT_CC_MODE): Use new function.
14455 (TARGET_FLAGS_REGNUM): New macro.
14456 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14457 (cc0_reg_rtx): Remove.
14458 (CC_STATUS_MDEP): Remove.
14459 (CC_STATUS_MDEFP_INIT): Remove.
14460 (CC_IN_FPU): Remove.
14461 (NOTICE_UPDATE_CC): Remove.
14462 (REGISTER_NAMES): Add CC registers.
14463 (BRANCH_COST): Change to constant 1.
14464 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14466 * config/pdp11/pdp11.opt (mbcopy): Remove.
14467 (mbcopy-builtin): Remove.
14468 (mbranch-cheap): Remove.
14469 (mbranch-expensive): Remove.
14470 * config/pdp11/predicates.md (expand_shift_operand): Update to
14471 match shift code generation.
14472 (ccnz_operator): New predicate.
14473 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14474 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14475 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14477 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14478 description of O constraint.
14480 2018-06-27 Jeff Law <law@redhat.com>
14481 Austin Law <austinklaw@gmail.com>
14483 * config/v850/v850.md (addsi3_set_flags): New pattern.
14484 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14485 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14486 (zero_extendhisi2_v850_set_flags): Likewise.
14487 (zero_extendqisi2_v850_set_flags): Likewise.
14488 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14489 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14490 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14492 * config/v850/v850-protos.h (notice_update_cc): Remove.
14493 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14494 (v850_print_operand): Handle 'D' and "d".
14495 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14496 Add handling of arithmetic/logical operations compared against zero.
14497 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14498 Do not look at v850_compare_op, instead get mode from last argument.
14499 (v850_gen_compare): Remove
14500 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14501 after reload for prologue insns.
14502 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14504 (construct_save_jarl): Likewise.
14505 (TARGET_FLAGS_REGNUM): Define.
14506 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14507 (NOTICE_UPDATE_CC): Remove.
14508 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14509 than cc0. Conditionalize on reload_completed.
14510 (cmpsi_insn, setfcc_insn): Likewise.
14511 (tst1 splitter): Turn into define_and_split which sets the flags
14513 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14514 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14515 (cstoresf4, cstoredf4): Clobber the flags.
14516 (cmpsi, cmpsf, cmpdf): Remove expanders.
14517 (setf_insn): Remove pattern.
14518 (addsi3): Turn into define_and_split which clobbers the flags after
14519 reload and a suitable pattern (addsi3_clobber_flags) for use after
14521 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14522 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14523 (ashrsi3, ashrsi3_v850e2): Likewise.
14524 (bins): Clobber the flags.
14525 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14526 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14527 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14528 (call_value_internal_short, call_value_internal_long): Likewise.
14529 (callt_save_interrupt, callt_return_interrupt): Likewise.
14530 (save_interrupt, return_interrupt): Likewise.
14531 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14532 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14533 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14534 (All FP comparisons): Only allow after reload has completed.
14536 (divh, divhu): Tweak output template.
14537 (branch_z_normal, branch_z_invert): Remove
14538 (branch_nz_normal, branch_nz_invert): Likewise.
14539 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14541 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14542 * config/v850/v850.c (notice_update_cc): Remove.
14543 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14544 (CC_NO_CARRY): Likewise.
14545 (NOTICE_UPDATE_CC): Define to nothing.
14546 * config/v850/v850.md: Remove block comment on cc0 handling
14547 Remove "cc" attribute from all patterns. Remove cc_status handling
14548 from all patterns. Minor formatting fixes.
14550 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14552 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14553 (cortex-a76.cortex-a55): Likewise.
14554 * config/aarch64/aarch64-tune.md: Regenerate.
14555 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14556 cortex-a76.cortex-a55.
14558 2018-06-27 Jeff Law <law@redhat.com>
14560 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14561 (MULTILIB_DIRNAMES): Similarly.
14563 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
14565 * gimple.h (gimple_return_retbnd): Delete.
14566 (gimple_return_set_retbnd): Likewise.
14567 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14568 gimple_return_set_retbnd.
14569 * gimple-pretty-print.c (dump_gimple_return): Remove call to
14570 gimple_return_retbnd and adjust.
14571 * tree-inline.h (struct copy_body_data): Remove retbnd field.
14572 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14573 Explicitly return NULL in a couple more cases. Move assertion
14574 on debug statements and remove unreachable code.
14575 (reset_debug_binding): Do not test id->retbnd.
14576 (expand_call_inline): Do not set it.
14578 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
14580 * configure.ac: Add --disable-gcov option.
14581 * configure: Regenerate.
14582 * Makefile.in: Honour @enable_gcov@.
14583 * doc/install.texi: Document --disable-gcov.
14585 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14587 * config/arm/arm-cpus.in (cortex-a76): New entry.
14588 (cortex-a76.cortex-a55): Likewise.
14589 * config/arm/arm-tables.opt: Regenerate.
14590 * config/arm/arm-tune.md: Likewise.
14591 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14592 * doc/invoke.texi (ARM Options): Document cortex-a76 and
14593 cortex-a76.cortex-a55.
14595 2018-06-27 Tamar Christina <tamar.christina@arm.com>
14598 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14600 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
14602 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14604 (EPILOGUE_USES): Likewise.
14606 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
14608 * tree-inline.c (remap_location): New function extracted from...
14609 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
14610 (copy_phis_for_bb): ...here. Call remap_location.
14611 (copy_cfg_body): Adjust call to copy_edges_for_bb.
14613 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
14615 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14616 unaligned vsx for 16B memset.
14618 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
14621 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14622 ieee128_float_type_node to long_double_type_node unless
14623 TARGET_LONG_DOUBLE_128 is set.
14625 2018-06-26 David Malcolm <dmalcolm@redhat.com>
14627 * cfgloop.c (get_loop_location): Convert return type from
14628 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14629 by implicit construction from rtx_insn *, and using
14630 dump_user_location_t::from_function_decl for the fallback case.
14631 * cfgloop.h (get_loop_location): Convert return type from
14632 location_t to dump_user_location_t.
14633 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14634 dump_printf_loc to pass in a dump_location_t rather than a
14635 location_t, via the gimple stmt.
14636 * coverage.c (get_coverage_counts): Update calls to
14637 dump_printf_loc to pass in dump_location_t rather than a
14639 * doc/optinfo.texi (Dump types): Convert example of
14640 dump_printf_loc from taking "locus" to taking "insn". Update
14641 description of the "_loc" calls to cover dump_location_t.
14642 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14644 (dump_user_location_t::dump_user_location_t): New constructors,
14645 from gimple *stmt and rtx_insn *.
14646 (dump_user_location_t::from_function_decl): New function.
14647 (dump_loc): Make static.
14648 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14649 const dump_location_t &.
14650 (dump_generic_expr_loc): Delete.
14651 (dump_printf_loc): Convert param "loc" from location_t to
14652 const dump_location_t &.
14653 (selftest::test_impl_location): New function.
14654 (selftest::dumpfile_c_tests): New function.
14655 * dumpfile.h: Include "profile-count.h".
14656 (class dump_user_location_t): New class.
14657 (struct dump_impl_location_t): New struct.
14658 (class dump_location_t): New class.
14659 (dump_printf_loc): Convert 2nd param from source_location to
14660 const dump_location_t &.
14661 (dump_generic_expr_loc): Delete.
14662 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14663 const dump_location_t &.
14664 * gimple-fold.c (fold_gimple_assign): Update call to
14665 dump_printf_loc to pass in a dump_location_t rather than a
14666 location_t, via the gimple stmt.
14667 (gimple_fold_call): Likewise.
14668 * gimple-loop-interchange.cc
14669 (loop_cand::analyze_iloop_reduction_var): Update for change to
14670 check_reduction_path.
14671 (tree_loop_interchange::interchange): Update for change to
14672 find_loop_location.
14673 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14674 change in return-type of find_loop_location.
14675 (graphite_regenerate_ast_isl): Likewise.
14676 * graphite-optimize-isl.c (optimize_isl): Likewise.
14677 * graphite.c (graphite_transform_loops): Likewise.
14678 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14679 pass in a dump_location_t rather than a location_t, via the
14681 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14682 * ipa.c (walk_polymorphic_call_targets): Likewise.
14683 * loop-unroll.c (report_unroll): Convert "locus" param from
14684 location_t to dump_location_t.
14685 (decide_unrolling): Update for change to get_loop_location's
14687 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14688 location_t to dump_user_location_t.
14689 (grid_find_single_omp_among_assignments_1): Updates calls to
14690 dump_printf_loc to pass in a dump_location_t rather than a
14691 location_t, via the gimple stmt.
14692 (grid_parallel_clauses_gridifiable): Convert "tloc" from
14693 location_t to dump_location_t. Updates calls to dump_printf_loc
14694 to pass in a dump_location_t rather than a location_t, via the
14696 (grid_inner_loop_gridifiable_p): Likewise.
14697 (grid_dist_follows_simple_pattern): Likewise.
14698 (grid_gfor_follows_tiling_pattern): Likewise.
14699 (grid_target_follows_gridifiable_pattern): Likewise.
14700 (grid_attempt_target_gridification): Convert initialization
14701 of local "grid" from memset to zero-initialization; FIXME: does
14702 this require C++11? Update call to dump_printf_loc to pass in a
14703 optinfo_location rather than a location_t, via the gimple stmt.
14704 * profile.c (read_profile_edge_counts): Updates call to
14705 dump_printf_loc to pass in a dump_location_t rather than a
14707 (compute_branch_probabilities): Likewise.
14708 * selftest-run-tests.c (selftest::run_tests): Call
14710 * selftest.h (dumpfile_c_tests): New decl.
14711 * tree-loop-distribution.c (pass_loop_distribution::execute):
14712 Update for change in return type of find_loop_location.
14713 * tree-parloops.c (parallelize_loops): Likewise.
14714 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14715 "locus" from location_t to dump_user_location_t.
14716 (canonicalize_loop_induction_variables): Likewise.
14717 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14718 for change in return type of find_loop_location.
14719 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14720 to dump_printf_loc to pass in a dump_location_t rather than a
14721 location_t, via the stmt.
14722 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14724 * tree-vect-loop-manip.c (find_loop_location): Convert return
14725 type from source_location to dump_user_location_t.
14726 (vect_do_peeling): Update for above change.
14727 (vect_loop_versioning): Update for change in type of
14729 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14730 from location_t to dump_user_location_t.
14731 (vect_estimate_min_profitable_iters): Update for change in type
14733 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14734 location_t to dump_location_t.
14735 (vect_slp_bb): Update for change in type of vect_location.
14736 * tree-vectorizer.c (vect_location): Convert from source_location
14737 to dump_user_location_t.
14738 (try_vectorize_loop_1): Update for change in vect_location's type.
14739 (vectorize_loops): Likewise.
14740 (increase_alignment): Likewise.
14741 * tree-vectorizer.h (vect_location): Convert from source_location
14742 to dump_user_location_t.
14743 (find_loop_location): Convert return type from source_location to
14744 dump_user_location_t.
14745 (check_reduction_path): Convert 1st param from location_t to
14746 dump_user_location_t.
14747 * value-prof.c (check_counter): Update call to dump_printf_loc to
14748 pass in a dump_user_location_t rather than a location_t; update
14749 call to error_at for change in type of "locus".
14750 (check_ic_target): Update call to dump_printf_loc to
14751 pass in a dump_user_location_t rather than a location_t, via the
14754 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
14756 * config/s390/s390.h (enum processor_flags): Do not use
14757 default tune parameter when -march was specified.
14759 2018-06-26 Jakub Jelinek <jakub@redhat.com>
14762 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14763 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14766 2018-06-26 Richard Biener <rguenther@suse.de>
14768 PR tree-optimization/86287
14770 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14771 (vect_analyze_loop): Initialize n_stmts.
14773 2018-06-26 Richard Biener <rguenther@suse.de>
14775 PR middle-end/86271
14776 * fold-const.c (fold_convertible_p): Pointer extension
14779 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
14782 * dwarf2out.c (loc_list_has_views): Adjust comments.
14783 (dw_loc_list): Split single cross-partition range with
14786 2018-06-25 Jeff Law <law@redhat.com>
14788 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14789 on -mbig-switch by default.
14791 * config/v850/predicates.md (const_float_1_operand): Fix match_code
14793 (const_float_0_operand): Remove unused predicate.
14794 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14795 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14796 (recipsf2): New expander. Original pattern now called
14798 (recipdf2, recipdf2_insn): Similarly.
14799 (rsqrtsf2, rsqrtsf2_insn): Similarly
14800 (rsqrtdf2, rsqrtdf2_insn): Similarly
14802 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
14804 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14805 Simplify logic for FreeBSD (twice).
14807 2018-06-25 Martin Sebor <msebor@redhat.com>
14809 PR tree-optimization/86204
14810 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14811 a strnlen result if it's less than the length of the string.
14813 2018-06-25 Martin Sebor <msebor@redhat.com>
14815 PR tree-optimization/85700
14816 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14817 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14818 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14820 2018-06-25 Martin Sebor <msebor@redhat.com>
14822 * doc/extend.texi (Zero-length arrays): Update and clarify.
14824 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
14826 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14827 added IEEE/IBM long double multilib support on PowerPC little
14828 endian Linux systems.
14829 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14830 (MULTILIB_DEFAULTS): Likewise.
14831 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14833 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14834 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14835 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14837 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
14839 PR middle-end/86311
14840 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14841 (REORDER_45): Likewise.
14843 2018-06-25 Jeff Law <law@redhat.com>
14845 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14846 dividend to 32 bits. Adjust length.
14847 (udivmodhi4): Cleanup output template. Fix length.
14849 2018-06-25 Carl Love <cel@us.ibm.com>
14851 * config/rs6000/vsx.md: Change word selector to prefered location.
14853 2018-06-25 Richard Biener <rguenther@suse.de>
14855 PR tree-optimization/86304
14856 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14857 epilogue-if-converted loops as well.
14859 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
14861 * lto-section-out.c (lto_begin_section): Do not print section
14862 name for noaddr and unnumbered dumps.
14864 2018-06-25 Richard Biener <rguenther@suse.de>
14866 * tree-vectorizer.h (struct vec_info_shared): New structure
14867 with parts split out from struct vec_info and loop_nest from
14868 struct _loop_vec_info.
14869 (struct vec_info): Adjust accordingly.
14870 (struct _loop_vec_info): Likewise.
14871 (LOOP_VINFO_LOOP_NEST): Adjust.
14872 (LOOP_VINFO_DATAREFS): Likewise.
14873 (LOOP_VINFO_DDRS): Likewise.
14874 (struct _bb_vec_info): Likewise.
14875 (BB_VINFO_DATAREFS): Likewise.
14876 (BB_VINFO_DDRS): Likewise.
14877 (struct _stmt_vec_info): Add dr_aux member.
14878 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14879 (DR_MISALIGNMENT_UNINITIALIZED): New.
14880 (set_dr_misalignment): Adjust.
14881 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14882 (vect_analyze_loop): Adjust prototype.
14883 (vect_analyze_loop_form): Likewise.
14884 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14885 Compute dependences lazily.
14886 (vect_record_base_alignments): Use shared datarefs/ddrs.
14887 (vect_verify_datarefs_alignment): Likewise.
14888 (vect_analyze_data_refs_alignment): Likewise.
14889 (vect_analyze_data_ref_accesses): Likewise.
14890 (vect_analyze_data_refs): Likewise.
14891 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14892 constructor parameter for shared part.
14893 (vect_analyze_loop_form): Pass in shared part and adjust.
14894 (vect_analyze_loop_2): Pass in storage for the number of
14895 stmts. Move loop nest finding to the caller. Compute
14897 (vect_analyze_loop): Pass in shared part.
14898 (vect_transform_loop): Verify shared datarefs are unchanged.
14899 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14900 constructor parameter for shared part.
14901 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14902 (vect_slp_bb): Verify shared datarefs are unchanged before
14904 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14906 (new_stmt_vec_info): Initialize DR_AUX misalignment to
14907 DR_MISALIGNMENT_UNINITIALIZED.
14908 * tree-vectorizer.c (vec_info::vec_info): Add constructor
14909 parameter for shared part.
14910 (vec_info::~vec_info): Adjust.
14911 (vec_info_shared::vec_info_shared): New.
14912 (vec_info_shared::~vec_info_shared): Likewise.
14913 (vec_info_shared::save_datarefs): Likewise.
14914 (vec_info_shared::check_datarefs): Likewise.
14915 (try_vectorize_loop_1): Construct shared part live for analyses
14916 of a single loop for multiple vector sizes.
14917 * tree-parloops.c (gather_scalar_reductions): Adjust.
14919 2018-06-25 Richard Biener <rguenther@suse.de>
14921 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14922 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14923 (vect_analyze_data_refs): Remove similar code from here and
14924 simplify accordingly.
14926 2018-06-25 Richard Biener <rguenther@suse.de>
14928 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14929 for reverse storage order accesses rather than asserting
14930 they cannot happen here.
14932 2018-06-25 Tom de Vries <tdevries@suse.de>
14935 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14936 Use data16 instead of .byte for insn prefix.
14938 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
14941 * parser.c (make_char_string_pack): Pass this literal chars
14942 through cpp_interpret_string.
14943 (cp_parser_userdef_numeric_literal): Check the result of
14944 make_char_string_pack.
14946 2018-06-24 Maya Rashish <coypu@sdf.org>
14948 * ginclude/stddef.h: Simplify conditions around avoiding
14949 re-definition of __size_t.
14951 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14953 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14954 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14956 2018-06-22 Maya Rashish <coypu@sdf.org>
14958 * doc/invoke.texi (mno-fancy-math-387): Update for changes
14959 made to OpenBSD and NetBSD through the years.
14961 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14963 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14964 behavior of vec_pack (vector double, vector double) to match
14965 behavior of vec_float2 (vector double, vector double).
14967 2018-06-22 Olivier Hainque <hainque@adacore.com>
14969 * gimplify.c (gimplify_function_tree): Prevent creation
14970 of a trampoline for the address of the current function
14971 passed to entry/exit instrumentation hooks.
14973 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
14976 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14979 2018-06-22 Martin Liska <mliska@suse.cz>
14981 PR tree-optimization/86263
14982 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14983 Bail out if is_enabled is false.
14984 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14986 (jump_table_cluster::is_enabled): New function.
14988 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14990 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14991 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14992 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14993 (lto_input_ts_binfo_tree_pointers): Likewise.
14994 * tree-streamer-out.c (streamer_write_tree_bitfields,
14995 write_ts_binfo_tree_pointers): Likewise.
14996 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14998 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15000 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
15002 2018-06-22 Martin Liska <mliska@suse.cz>
15004 * symbol-summary.h (get): Make it pure and inline move
15005 functionality from ::get function.
15006 (get): Remove and inline into ::get and ::get_create.
15007 (get_create): Move code from ::get function.
15009 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15012 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
15013 -x assembler-with-cpp.
15015 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15017 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
15018 _FILE_OFFSET_BITS=64 for C++.
15020 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
15022 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
15023 conversion insn that shows up when pr85657-3.c is compiled using
15024 IEEE 128-bit long double.
15025 (neg<mode>2_internal): Use the correct mode to check whether the
15026 mode is IBM extended.
15027 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
15028 multiply and divide external functions from being created more
15031 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15033 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
15035 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
15036 the edge can be forwarded.
15037 (cfg_layout_merge_blocks): Likewise.
15039 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15041 * except.c (finish_eh_generation): Commit edge insertions only after
15042 the EH edges have been redirected from post-landing to landing pads.
15044 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15046 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
15047 create_tmp_var_for to create the FRAME decl.
15048 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
15050 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15052 * tree-inline.c (copy_edges_for_bb): Minor tweak.
15053 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
15054 debug statement when resetting its value.
15055 (expand_call_inline): Copy the locus of the call onto the assignment
15056 of the return value, if any. Use local variable in more cases.
15058 2018-06-21 Martin Liska <mliska@suse.cz>
15060 * ipa-pure-const.c (propagate_nothrow): Use
15061 funct_state_summaries->get.
15062 (dump_malloc_lattice): Likewise.
15063 (propagate_malloc): Likewise.
15065 2018-06-21 Richard Biener <rguenther@suse.de>
15067 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
15068 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
15069 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
15071 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
15072 BLOCK_ABSTRACT_ORIGIN unconditionally.
15074 2018-06-21 David Malcolm <dmalcolm@redhat.com>
15076 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
15078 * ipa-reference.c (ipa_reference_c_finalize): Delete
15079 ipa_ref_opt_sum_summaries and set it to NULL.
15081 2018-06-21 Tom de Vries <tdevries@suse.de>
15083 PR tree-optimization/85859
15084 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
15085 test with comment from bb_no_side_effects_p.
15087 2018-06-21 Richard Biener <rguenther@suse.de>
15089 PR tree-optimization/86232
15090 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
15091 max for constant niter.
15093 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15095 * config/aarch64/aarch64-simd.md
15096 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
15098 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15100 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
15101 Make opernads of the unspec commutative.
15103 2018-06-21 Richard Biener <rguenther@suse.de>
15105 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
15106 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15107 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
15108 (vect_analyze_data_ref_dependence): Re-order checks to deal with
15110 (vect_record_base_alignments): Do not record base alignment
15111 for gathers or scatters.
15112 (vect_compute_data_ref_alignment): Drop return value that is always
15113 true. Bail out early for gathers or scatters.
15114 (vect_enhance_data_refs_alignment): Bail out early for gathers
15116 (vect_find_same_alignment_drs): Likewise.
15117 (vect_analyze_data_refs_alignment): Remove dead code.
15118 (vect_slp_analyze_and_verify_node_alignment): Likewise.
15119 (vect_analyze_data_refs): For possible gathers or scatters do
15120 not create an alternate DR, just check their possible validity
15121 and mark them. Adjust DECL_NONALIASED handling to not rely
15122 on DR_BASE_ADDRESS.
15123 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
15124 update inits of gathers or scatters.
15125 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
15126 Also copy gather/scatter flag to pattern vinfo.
15128 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
15130 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15131 behavior of vec_packsu (vector unsigned long long, vector unsigned
15132 long long) to match behavior of vec_packs with same signature.
15134 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
15135 Thomas Schwinge <thomas@codesourcery.com>
15136 Cesar Philippidis <cesar@codesourcery.com>
15138 * gimplify.c (gimplify_scan_omp_clauses): Add support for
15139 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15140 (gimplify_adjust_omp_clauses): Likewise.
15141 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
15142 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
15143 (gimplify_omp_target_update): Update handling of acc update and
15145 * omp-low.c (install_var_field): Remove unused parameter
15146 base_pointers_restrict.
15147 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
15148 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
15150 (omp_target_base_pointers_restrict_p): Delete.
15151 (scan_omp_target): Update call to scan_sharing_clauses.
15152 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
15154 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
15155 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15156 (convert_local_omp_clauses): Likewise.
15157 * tree-pretty-print.c (dump_omp_clause): Likewise.
15158 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
15160 (omp_clause_code_name): Likewise.
15162 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15165 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
15168 PR tree-optimization/86231
15169 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
15170 anti-range don't overwrite *vr0min before using it to compute *vr0max.
15172 2018-06-20 Tom de Vries <tdevries@suse.de>
15174 PR tree-optimization/86097
15175 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15176 iv type if signedness of iv type is not the same as that of *nit.
15178 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15180 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
15181 EDGE_EH edges, verify they are all EDGE_EH.
15183 2018-06-20 Maya Rashish <coypu@sdf.org>
15185 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15187 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15189 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15190 * config/aarch64/aarch64.c (xgene1_tunings): Add
15191 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15192 (aarch64_mode_valid_for_sched_fusion_p):
15193 Allow 16-byte modes.
15194 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15195 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15197 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15199 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15200 * config/aarch64/iterators.md (VQ2): New mode iterator.
15202 2018-06-20 Martin Liska <mliska@suse.cz>
15204 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15205 Change default ratio from 10 to 8.
15207 2018-06-20 Martin Liska <mliska@suse.cz>
15209 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15211 (bit_test_cluster::find_bit_tests): Likewise.
15212 (switch_decision_tree::analyze_switch_statement): Find clusters.
15213 * tree-switch-conversion.h (struct jump_table_cluster): Document
15216 2018-06-20 Martin Liska <mliska@suse.cz>
15218 * tree-switch-conversion.c (switch_conversion::collect):
15219 Record m_uniq property.
15220 (switch_conversion::expand): Bail out for special conditions.
15221 (group_cluster::~group_cluster): New.
15222 (group_cluster::group_cluster): Likewise.
15223 (group_cluster::dump): Likewise.
15224 (jump_table_cluster::emit): New.
15225 (switch_decision_tree::fix_phi_operands_for_edges): New.
15226 (struct case_node): Remove struct.
15227 (jump_table_cluster::can_be_handled): New.
15228 (case_values_threshold): Moved to header.
15229 (reset_out_edges_aux): Likewise.
15230 (jump_table_cluster::is_beneficial): New.
15231 (bit_test_cluster::can_be_handled): Likewise.
15232 (add_case_node): Remove.
15233 (bit_test_cluster::is_beneficial): New.
15234 (case_bit_test::cmp): New.
15235 (bit_test_cluster::emit): New.
15236 (expand_switch_as_decision_tree_p): Remove.
15237 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15238 (fix_phi_operands_for_edge): Likewise.
15239 (switch_decision_tree::analyze_switch_statement): New.
15240 (compute_cases_per_edge): Move ...
15241 (switch_decision_tree::compute_cases_per_edge): ... here.
15242 (try_switch_expansion): Likewise.
15243 (switch_decision_tree::try_switch_expansion): Likewise.
15244 (record_phi_operand_mapping): Likewise.
15245 (switch_decision_tree::record_phi_operand_mapping): Likewise.
15246 (emit_case_decision_tree): Likewise.
15247 (switch_decision_tree::emit): Likewise.
15248 (balance_case_nodes): Likewise.
15249 (switch_decision_tree::balance_case_nodes): Likewise.
15250 (dump_case_nodes): Likewise.
15251 (switch_decision_tree::dump_case_nodes): Likewise.
15252 (emit_jump): Likewise.
15253 (switch_decision_tree::emit_jump): Likewise.
15254 (emit_cmp_and_jump_insns): Likewise.
15255 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15256 (emit_case_nodes): Likewise.
15257 (switch_decision_tree::emit_case_nodes): Likewise.
15258 (conditional_probability): Remove.
15259 * tree-switch-conversion.h (enum cluster_type): New.
15261 (struct cluster): Likewise.
15262 (cluster::cluster): Likewise.
15263 (struct simple_cluster): Likewise.
15264 (simple_cluster::simple_cluster): Likewise.
15265 (struct group_cluster): Likewise.
15266 (struct jump_table_cluster): Likewise.
15267 (struct bit_test_cluster): Likewise.
15268 (struct min_cluster_item): Likewise.
15269 (struct case_tree_node): Likewise.
15270 (case_tree_node::case_tree_node): Likewise.
15271 (jump_table_cluster::case_values_threshold): Likewise.
15272 (struct case_bit_test): Likewise.
15273 (struct switch_decision_tree): Likewise.
15274 (struct switch_conversion): Likewise.
15275 (switch_decision_tree::reset_out_edges_aux): Likewise.
15277 2018-06-20 Martin Liska <mliska@suse.cz>
15279 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15280 (hoist_edge_and_branch_if_true): Likewise.
15281 (expand_switch_using_bit_tests_p): Likewise.
15282 (struct case_bit_test): Likewise.
15283 (case_bit_test_cmp): Likewise.
15284 (emit_case_bit_tests): Likewise.
15285 (switch_conversion::switch_conversion): New class.
15286 (struct switch_conv_info): Remove old struct.
15287 (collect_switch_conv_info): More to ...
15288 (switch_conversion::collect): ... this.
15289 (check_range): Likewise.
15290 (switch_conversion::check_range): Likewise.
15291 (check_all_empty_except_final): Likewise.
15292 (switch_conversion::check_all_empty_except_final): Likewise.
15293 (check_final_bb): Likewise.
15294 (switch_conversion::check_final_bb): Likewise.
15295 (create_temp_arrays): Likewise.
15296 (switch_conversion::create_temp_arrays): Likewise.
15297 (free_temp_arrays): Likewise.
15298 (gather_default_values): Likewise.
15299 (switch_conversion::gather_default_values): Likewise.
15300 (build_constructors): Likewise.
15301 (switch_conversion::build_constructors): Likewise.
15302 (constructor_contains_same_values_p): Likewise.
15303 (switch_conversion::contains_same_values_p): Likewise.
15304 (array_value_type): Likewise.
15305 (switch_conversion::array_value_type): Likewise.
15306 (build_one_array): Likewise.
15307 (switch_conversion::build_one_array): Likewise.
15308 (build_arrays): Likewise.
15309 (switch_conversion::build_arrays): Likewise.
15310 (gen_def_assigns): Likewise.
15311 (switch_conversion::gen_def_assigns): Likewise.
15312 (prune_bbs): Likewise.
15313 (switch_conversion::prune_bbs): Likewise.
15314 (fix_phi_nodes): Likewise.
15315 (switch_conversion::fix_phi_nodes): Likewise.
15316 (gen_inbound_check): Likewise.
15317 (switch_conversion::gen_inbound_check): Likewise.
15318 (process_switch): Use the newly created class.
15319 (switch_conversion::expand): New.
15320 (switch_conversion::~switch_conversion): New.
15321 * tree-switch-conversion.h: New file.
15323 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15325 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15326 tree-vect-patterns.c.
15327 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15328 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
15329 (vect_recog_sad_pattern): Likewise.
15330 (vect_recog_widen_sum_pattern): Likewise.
15331 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
15332 (vect_recog_widen_shift_pattern): Remove the type_in argument.
15333 (vect_recog_rotate_pattern): Likewise.
15334 (vect_recog_mult_pattern): Likewise.
15335 (vect_recog_vector_vector_shift_pattern): Likewise.
15336 (vect_recog_divmod_pattern): Likewise.
15337 (vect_recog_mixed_size_cond_pattern): Likewise.
15338 (vect_recog_bool_pattern): Likewise.
15339 (vect_recog_mask_conversion_pattern): Likewise.
15340 (vect_try_gather_scatter_pattern): Likewise.
15341 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
15342 (vect_recog_over_widening_pattern): Likewise.
15343 (vect_recog_gather_scatter_pattern): Likewise.
15344 (vect_recog_func_ptr): Move from tree-vectorizer.h
15345 (vect_vect_recog_func_ptrs): Move further down the file.
15346 (vect_recog_func): Likewise. Remove the third argument.
15347 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15348 (vect_pattern_recog_1): Expect the pattern function to do any
15349 necessary target tests. Also expect it to provide a vector type.
15350 Remove the type_in handling.
15352 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15354 * tree-vect-patterns.c (vect_pattern_detected): New function.
15355 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15356 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15357 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15358 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15359 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15360 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15361 (vect_recog_mask_conversion_pattern)
15362 (vect_try_gather_scatter_pattern): Likewise.
15364 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15366 * tree-vect-patterns.c (vect_get_internal_def): New function.
15367 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15368 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15369 (search_type_for_mask_1): Use it.
15371 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15373 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15374 redundant WIDEN_SUM_EXPR handling.
15375 (vect_recog_sad_pattern): Likewise.
15377 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15379 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15380 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15381 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15382 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15383 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15385 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15387 * tree-vect-stmts.c (vectorizable_call): Make sure that we
15388 use the stmt_vec_info of the original bb statement for the
15389 new zero assignment, even if the call is part of a pattern.
15391 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15393 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15394 that the sequence is attached to the original statement rather
15395 than the pattern statement.
15396 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15397 PATTERN_DEF_SEQ from the original statement rather than
15398 the main pattern statement.
15399 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15400 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15401 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15403 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15405 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15406 definition statements before the early exit for statements that aren't
15408 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15410 (vect_transform_loop): ...here. Process pattern definition
15411 statements without first checking whether the main pattern
15412 statement is live or relevant.
15414 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15416 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15417 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15419 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
15421 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15422 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15423 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15424 (expand_block_compare): Change select_block_compare_mode call.
15425 (expand_strncmp_align_check): Use new functions, fix comment.
15426 (emit_final_str_compare_gpr): New function.
15427 (expand_strn_compare): Refactor and clean up code.
15428 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15430 2018-06-19 Tony Reix <tony.reix@atos.com>
15431 Damien Bergamini <damien.bergamini@atos.com>
15432 David Edelsohn <dje.gcc@gmail.com>
15434 * collect2.c (static_obj): New variable.
15435 (static_libs): New variable.
15436 (is_in_list): Uncomment declaration.
15437 (main): Track AIX libraries linked statically.
15438 (is_in_list): Uncomment definition.
15439 (scan_prog_file): Don't add AIX shared libraries initializer
15440 to constructor list if linking statically.
15442 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
15444 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15446 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15448 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
15450 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15453 2018-06-19 Martin Liska <mliska@suse.cz>
15455 * config/i386/i386.c (ix86_can_inline_p): Do not use
15456 ipa_fn_summaries::get_create.
15457 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15459 (devirtualization_time_bonus): Likewise.
15460 (ipcp_propagate_stage): Likewise.
15461 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15462 (edge_set_predicate): Likewise.
15463 (evaluate_conditions_for_known_args): Likewise.
15464 (evaluate_properties_for_edge): Likewise.
15465 (ipa_call_summary::reset): Tranform to ...
15466 (ipa_call_summary::~ipa_call_summary): ... this.
15467 (ipa_fn_summary::reset): Transform to ...
15468 (ipa_fn_summary::~ipa_fn_summary): ... this.
15469 (ipa_fn_summary_t::remove): Rename to ...
15470 (ipa_fn_summary_t::remove_callees): ... this.
15471 (ipa_fn_summary_t::duplicate): Use placement new
15472 instead of memory copy.
15473 (ipa_call_summary_t::duplicate): Likewise.
15474 (ipa_call_summary_t::remove): Remove.
15475 (dump_ipa_call_summary): Change get_create to get.
15476 (ipa_dump_fn_summary): Dump only when summary exists.
15477 (analyze_function_body): Use symbol_summary::get instead
15479 (compute_fn_summary): Likewise.
15480 (estimate_edge_devirt_benefit): Likewise.
15481 (estimate_edge_size_and_time): Likewise.
15482 (inline_update_callee_summaries): Likewise.
15483 (remap_edge_change_prob): Likewise.
15484 (remap_edge_summaries): Likewise.
15485 (ipa_merge_fn_summary_after_inlining): Likewise.
15486 (write_ipa_call_summary): Likewise.
15487 (ipa_fn_summary_write): Likewise.
15488 (ipa_free_fn_summary): Likewise.
15489 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15490 (struct ipa_call_summary): Likewise.
15491 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15493 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15494 (estimate_size_after_inlining): Likewise.
15495 (estimate_growth): Likewise.
15496 (growth_likely_positive): Likewise.
15497 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15498 (inline_call): Likewise.
15499 * ipa-inline.c (caller_growth_limits): Likewise.
15500 (can_inline_edge_p): Likewise.
15501 (can_inline_edge_by_limits_p): Likewise.
15502 (compute_uninlined_call_time): Likewise.
15503 (compute_inlined_call_time): Likewise.
15504 (want_inline_small_function_p): Likewise.
15505 (edge_badness): Likewise.
15506 (update_caller_keys): Likewise.
15507 (update_callee_keys): Likewise.
15508 (inline_small_functions): Likewise.
15509 (inline_to_all_callers_1): Likewise.
15510 (dump_overall_stats): Likewise.
15511 (early_inline_small_functions): Likewise.
15512 (early_inliner): Likewise.
15513 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15514 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15515 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15516 * ipa-split.c (execute_split_functions): Likewise.
15517 * symbol-summary.h: Likewise.
15518 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15520 2018-06-19 Richard Biener <rguenther@suse.de>
15522 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15523 (vectorize_loops): ... here. Fix dbgcnt handling.
15524 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15526 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15529 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15530 ieee128 argument takes up only one (vector) register, not two (floating
15533 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15535 * gimplify.c (gimplify_init_constructor): Really never clear for an
15536 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15538 2018-06-19 Richard Biener <rguenther@suse.de>
15540 PR tree-optimization/86179
15541 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15542 after failed recognition.
15544 2018-06-18 Martin Sebor <msebor@redhat.com>
15546 PR middle-end/85602
15547 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15548 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15549 Handle integer subtraction.
15550 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15551 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15553 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15555 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15556 param from rtx to rtx_insn *.
15557 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15559 (frv_ifcvt_modify_insn): Likwise.
15560 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15561 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
15562 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15563 as_a <rtx_insn *> cast to local "unprotected_region" once
15564 it's been established that it's not NULL or pc_rtx.
15565 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15566 param "sethi" from rtx to rtx_insn *.
15567 (nds32_group_float_insns): Likewise for param "insn".
15568 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15570 (vax_output_int_subtract): Likewise.
15571 * config/vax/vax.c (vax_output_int_add): Likewise for param
15573 (vax_output_int_subtract): Likewise.
15574 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15575 (emit_pattern_after): Likewise for param "after".
15576 (emit_insn_after): Likewise.
15577 (emit_jump_insn_after): Likewise.
15578 (emit_call_insn_after): Likewise.
15579 (emit_debug_insn_after): Likewise.
15580 (emit_pattern_before): Likewise for param "before".
15581 (emit_insn_before): Likewise.
15582 (emit_jump_insn_before): Likewise.
15583 * final.c (get_insn_template): Likewise for param "insn", removing
15585 * output.h (get_insn_template): Likewise for 2nd param.
15586 * rtl.h (emit_insn_before): Likewise.
15587 (emit_jump_insn_before): Likewise.
15588 (emit_debug_insn_before_noloc): Likewise.
15589 (emit_insn_after): Likewise.
15590 (emit_jump_insn_after): Likewise.
15591 (emit_call_insn_after): Likewise.
15592 (emit_debug_insn_after): Likewise.
15593 (set_insn_deleted): Likewise for param.
15595 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
15598 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15599 floating point modes, so that IFmode is numerically greater than
15600 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15601 to declare the ordering. This prevents IFmode from being
15602 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15603 machine. Include rs6000-modes.h to share the fractional values
15604 between genmodes* and the rest of the compiler.
15605 (IFmode): Likewise.
15606 (KFmode): Likewise.
15607 (TFmode): Likewise.
15608 * config/rs6000/rs6000-modes.h: New file.
15609 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15610 meaning of rs6000_long_double_size so that 126..128 selects an
15611 appropriate 128-bit floating point type.
15612 (rs6000_option_override_internal): Likewise.
15613 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15614 (TARGET_LONG_DOUBLE_128): Change the meaning of
15615 rs6000_long_double_size so that 126..128 selects an appropriate
15616 128-bit floating point type.
15617 (LONG_DOUBLE_TYPE_SIZE): Update comment.
15618 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15619 source and destination to match the standard usage.
15620 (truncifkf2): Likewise.
15621 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15622 ISA 2.07 to use an explicit clobber, instead of passing in a
15624 (copysign<mode>3_soft): Likewise.
15626 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15628 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15629 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15630 (vect_slp_analyze_instance_dependence): Likewise.
15631 (vect_enhance_data_refs_alignment): Likewise.
15632 (vect_analyze_data_refs_alignment): Likewise.
15633 (vect_slp_analyze_and_verify_instance_alignment
15634 (vect_analyze_data_ref_accesses): Likewise.
15635 (vect_prune_runtime_alias_test_list): Likewise.
15636 (vect_analyze_data_refs): Likewise.
15637 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15638 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15639 (vect_analyze_scalar_cycles_1): Likewise.
15640 (vect_get_loop_niters): Likewise.
15641 (vect_analyze_loop_form_1): Likewise.
15642 (vect_update_vf_for_slp): Likewise.
15643 (vect_analyze_loop_operations): Likewise.
15644 (vect_analyze_loop): Likewise.
15645 (vectorizable_induction): Likewise.
15646 (vect_transform_loop): Likewise.
15647 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15648 * tree-vect-slp.c (vect_analyze_slp): Likewise.
15649 (vect_make_slp_decision): Likewise.
15650 (vect_detect_hybrid_slp): Likewise.
15651 (vect_slp_analyze_operations): Likewise.
15652 (vect_slp_bb): Likewise.
15653 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15654 (vectorizable_bswap): Likewise.
15655 (vectorizable_call): Likewise.
15656 (vectorizable_simd_clone_call): Likewise.
15657 (vectorizable_conversion): Likewise.
15658 (vectorizable_assignment): Likewise.
15659 (vectorizable_shift): Likewise.
15660 (vectorizable_operation): Likewise.
15661 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15663 2018-06-18 Martin Sebor <msebor@redhat.com>
15665 PR tree-optimization/81384
15666 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15667 * builtins.c (expand_builtin_strnlen): New function.
15668 (expand_builtin): Call it.
15669 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15670 * builtins.def (BUILT_IN_STRNLEN): New.
15671 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15672 Warn for bounds in excess of maximum object size.
15673 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15674 single-value ranges. Handle strnlen.
15675 (handle_builtin_strlen): Handle strnlen.
15676 (strlen_check_and_optimize_stmt): Same.
15677 * doc/extend.texi (Other Builtins): Document strnlen.
15679 2018-06-18 Maya Rashish <coypu@sdf.org>
15681 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15682 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15683 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15685 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15687 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15689 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15691 * tree.c (escaped_string::escape): Replace cast to char * by
15692 const_cast<char *> (unescaped).
15694 2018-06-18 Nick Clifton <nickc@redhat.com>
15697 * tree.c (escaped_string): New class. Converts an unescaped
15698 string into its escaped equivalent.
15699 (warn_deprecated_use): Use the new class to convert the
15700 deprecation message, if present.
15701 (test_escaped_strings): New self test.
15702 (test_c_tests): Add test_escaped_strings.
15703 * doc/extend.texi (deprecated): Add a note that the
15704 deprecation message is affected by the -fmessage-length
15705 option, and that control characters will be escaped.
15706 (#pragma GCC error): Document this pragma.
15707 (#pragma GCC warning): Likewise.
15708 * doc/invoke.texi (-fmessage-length): Document this option's
15709 effect on the #warning and #error preprocessor directives and
15710 the deprecated attribute.
15712 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
15714 * tree.c (decl_value_expr_lookup): Revert latest change.
15715 (decl_value_expr_insert): Likewise.
15717 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
15719 * gimplify.c (nonlocal_vlas): Delete.
15720 (nonlocal_vla_vars): Likewise.
15721 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15723 (gimplify_body): Do not create and destroy nonlocal_vlas.
15724 * tree-nested.c: Include diagnostic.h.
15725 (use_pointer_in_frame): Tweak.
15726 (lookup_field_for_decl): Add assertion and declare the transformation.
15727 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15728 internal error when the reference is in a wrong context. Do not
15729 create a debug decl by default.
15730 (note_nonlocal_block_vlas): Delete.
15731 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15732 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
15733 create a debug decl by default.
15734 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15735 call is in a wrong context.
15736 (fixup_vla_decls): New function.
15737 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
15738 debug variables were created.
15739 * tree.c (decl_value_expr_lookup): Add checking assertion.
15740 (decl_value_expr_insert): Likewise.
15742 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15744 PR middle-end/82479
15745 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15746 * tree-scalar-evolution.c (interpret_expr): Likewise.
15747 (expression_expensive_p): Likewise.
15748 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15749 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15750 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15751 (ssa_defined_by_minus_one_stmt_p): New.
15753 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15755 PR middle-end/64946
15756 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15757 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15758 * dojump.c (do_jump): Likewise.
15759 * expr.c (expand_expr_real_2): Check operand type's sign.
15760 * fold-const.c (const_unop): Handle ABSU_EXPR.
15761 (fold_abs_const): Likewise.
15762 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15763 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15764 (strip_sign_op_1): Likesise.
15765 * match.pd: Add new pattern to generate ABSU_EXPR.
15766 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15767 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15768 * tree-eh.c (operation_could_trap_helper_p): Likewise.
15769 * tree-inline.c (estimate_operator_cost): Likewise.
15770 * tree-pretty-print.c (dump_generic_node): Likewise.
15771 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15772 * tree.def (ABSU_EXPR): New.
15774 2018-06-16 Jakub Jelinek <jakub@redhat.com>
15776 PR middle-end/86095
15777 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15778 documented as preserved for backward compatibility only.
15779 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15781 PR rtl-optimization/86108
15782 * bb-reorder.c (create_forwarder_block): Renamed to ...
15783 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
15784 jump from new landing pad to the second part.
15785 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15788 2018-06-15 Jakub Jelinek <jakub@redhat.com>
15790 PR middle-end/85878
15791 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15792 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15793 Only call store_expr for halves if the mode is the same.
15795 PR middle-end/86123
15796 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15797 Fix up comment formatting.
15799 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
15801 * typed-splay-tree.h (typed_splay_tree::remove): New function.
15802 (typed_splay_tree::closure,
15803 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15804 (typed_splay_tree::typed_splay_tree,
15805 typed_splay_tree::operator =): Declared private.
15806 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15807 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15808 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15809 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15810 typed_splay_tree::splay_tree_splay,
15811 typed_splay_tree::splay_tree_foreach_helper,
15812 typed_splay_tree::splay_tree_insert,
15813 typed_splay_tree::splay_tree_remove,
15814 typed_splay_tree::splay_tree_lookup,
15815 typed_splay_tree::splay_tree_predecessor,
15816 typed_splay_tree::splay_tree_successor,
15817 typed_splay_tree::splay_tree_min,
15818 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15819 (typed_splay_tree::root, typed_splay_tree::comp,
15820 typed_splay_tree::delete_key,
15821 typed_splay_tree::delete_value): New data members.
15822 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15823 typed_splay_tree::remove.
15825 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
15827 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15828 -mginv and -mno-ginv to the assembler.
15829 * config/mips/mips.opt (-mcrc): New option.
15830 (-mginv): Likewise.
15831 * doc/invoke.text (-mcrc): Document.
15832 (-mginv): Likewise.
15834 2018-06-15 Nick Clifton <nickc@redhat.com>
15837 * tree.c (escaped_string): New class. Converts an unescaped
15838 string into its escaped equivalent.
15839 (warn_deprecated_use): Use the new class to convert the
15840 deprecation message, if present.
15841 (test_escaped_strings): New self test.
15842 (test_c_tests): Add test_escaped_strings.
15843 * doc/extend.texi (deprecated): Add a note that the
15844 deprecation message is affected by the -fmessage-length
15845 option, and that control characters will be escaped.
15846 (#pragma GCC error): Document this pragma.
15847 (#pragma GCC warning): Likewise.
15848 * doc/invoke.texi (-fmessage-length): Document this option's
15849 effect on the #warning and #error preprocessor directives and
15850 the deprecated attribute.
15852 2018-06-15 Richard Biener <rguenther@suse.de>
15854 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15855 here, also noting vector size used.
15856 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
15857 size used in MSG_OPTIMIZED_LOCATIONS dump.
15858 (pass_slp_vectorize::execute): Adjust.
15860 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
15863 * config/arc/arc.c (arc_return_address_register): Fix
15866 2018-06-15 Richard Biener <rguenther@suse.de>
15868 PR middle-end/86159
15869 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15870 leave useless conversion stripping to force_gimple_operand_gsi.
15871 (gimplify_build2): Likewise.
15872 (gimplify_build1): Likewise.
15874 2018-06-15 Richard Biener <rguenther@suse.de>
15876 PR middle-end/86076
15877 * tree-cfg.c (move_stmt_op): unshare invariant addresses
15878 before adjusting their block.
15880 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
15882 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15883 multilibs for *-*-rtems*.
15884 * config/riscv/t-rtems: New file.
15886 2018-06-14 Jakub Jelinek <jakub@redhat.com>
15888 PR middle-end/86122
15889 * match.pd ((A +- CST1) +- CST2): Punt if last resort
15890 unsigned_type_for returns NULL.
15893 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15894 subregs of multi-word pseudos unless the float mode has word size.
15896 2018-06-14 Richard Biener <rguenther@suse.de>
15898 PR middle-end/86139
15899 * tree-vect-generic.c (build_word_mode_vector_type): Remove
15900 duplicate and harmful type_hash_canon.
15901 * tree.c (type_hash_canon): Assert we didn't find ourselves.
15903 2018-06-14 Richard Biener <rguenther@suse.de>
15906 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15909 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
15911 * config/rtems.h (STDINT_LONG32): Define.
15913 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
15914 Prachi Godbole <prachi.godbole@imgtec.com>
15916 * config/mips/mips-cpus.def: Define P6600.
15917 * config/mips/mips-tables.opt: Regenerate.
15918 * config/mips/mips.c (mips_ucbranch_type): New enum.
15919 (mips_rtx_cost_data): Add support for P6600.
15920 (mips_issue_rate): Likewise.
15921 (mips_multipass_dfa_lookahead): Likewise.
15922 (mips_avoid_hazard): Likewise.
15923 (mips_reorg_process_insns): Likewise.
15924 (mips_classify_branch_p6600): New function.
15925 * config/mips/mips.h (TUNE_P6600): New define.
15926 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15927 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15928 * config/mips/mips.md: Include p6600.md.
15929 (processor): Add p6600.
15930 * config/mips/p6600.md: New file.
15931 * doc/invoke.texi: Add p6600 to supported architectures.
15933 2018-06-13 Martin Sebor <msebor@redhat.com>
15935 PR tree-optimization/86114
15936 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15938 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15940 2018-06-13 Richard Biener <rguenther@suse.de>
15942 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15943 Properly set vector type of the intermediate stmt.
15944 * tree-vect-stmts.c (vectorizable_operation): The destination
15945 var always has vectype_out type.
15947 2018-06-13 Jeff Law <law@redhat.com>
15949 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15950 integer 0 for argument to print_rtl_with_bb.
15951 (rl78_reorg): Likewise.
15953 2018-06-13 David Malcolm <dmalcolm@redhat.com>
15955 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15956 from rtx to rtx_insn *.
15957 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15959 (add_sched_insns_for_speculation): Likewise for local "target",
15960 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15961 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15962 from rtx_insn ** to rtx_code_label **.
15963 (reorg_emit_nops): Likewise.
15964 (c6x_reorg): Likewise for local "call_labels".
15965 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15967 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15968 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15969 the loops over LABEL_REFS.
15970 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15972 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15973 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15974 (split_branches): Strengthen local "olabel" from rtx to
15975 rtx_insn *, adding a safe_as_a cast.
15976 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15978 (add_insn_after): Likewise for first two params.
15979 (add_insn_before): Likewise.
15980 (remove_insn): Likewise for param.
15981 (emit_pattern_before_noloc): Likewise for second and third params.
15982 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15983 (emit_call_insn_before_noloc): Likewise.
15984 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15986 (emit_barrier_before): Likewise.
15987 (emit_label_before): Strengthen "label" param from "rtx" to
15988 "rtx_code_label *". Strengthen "before" param from "rtx" to
15990 (emit_insn_after_1): Strengthen "after" param from "rtx" to
15992 (emit_pattern_after_noloc): Likewise.
15993 (emit_insn_after_noloc): Likewise.
15994 (emit_jump_insn_after_noloc): Likewise.
15995 (emit_call_insn_after_noloc): Likewise.
15996 (emit_debug_insn_after_noloc): Likewise.
15997 (emit_barrier_after): Likewise.
15998 (emit_label_after): Likewise for both params.
15999 (emit_pattern_after_setloc): Likewise for "after" param. Convert
16000 "loc" param from "int" to "location_t".
16001 (emit_insn_after_setloc): Likewise.
16002 (emit_jump_insn_after_setloc): Likewise.
16003 (emit_call_insn_after_setloc): Likewise.
16004 (emit_debug_insn_after_setloc): Likewise.
16005 (emit_pattern_before_setloc): Likewise for "before" param. Convert
16006 "loc" param from "int" to "location_t".
16007 (emit_pattern_before): Convert NULL_RTX to NULL.
16008 (emit_insn_before_setloc): Convert "loc" param from "int" to
16010 (emit_jump_insn_before_setloc): Likewise.
16011 (emit_call_insn_before_setloc): Likewise.
16012 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
16013 rtx_insn *. Convert "loc" param from "int" to "location_t".
16014 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
16015 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
16016 Convert 3rd param from "int" to "location_t".
16017 (emit_barrier_before, emit_barrier_after, next_real_insn):
16018 Strengthen param from rtx to rtx_insn *.
16019 (emit_label_before): Strengthen 1st param from "rtx" to
16020 "rtx_code_label *". Strengthen 2nd param from "rtx" to
16022 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
16023 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
16024 Strengthen 2nd param from "rtx" to "rtx_insn *".
16025 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
16026 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
16027 Likewise. Convert 3rd param from "int" to "location_t".
16028 (emit_label_after): Strengthen 1st param from "rtx" to
16029 "rtx_code_label *".
16030 (next_real_insn, remove_insn): Strengthen param from "rtx" to
16032 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
16033 from "rtx" to "rtx_insn *".
16035 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
16037 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
16038 bodies streamed in with -Q.
16039 * dumpfile.c (dump_files): Add lto-stream-out dump file.
16040 * dumpfile.h (tree_dump_index): Add lto_stream_out.
16041 * gimple-streamer-out.c: Include gimple-pretty-print.h
16042 (output_bb): Dump stmts streamed.
16043 * lto-section-out.c: Include print-tree.h
16044 (lto_begin_section): Dump sections created.
16045 (lto_output_decl_index): Dump decl encoded.
16046 * lto-streamer-out.c: Include print-tree.h
16047 (create_output_block): Dump output block created.
16048 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
16049 (output_function): Dump function output.
16050 (output_constructor): Dump constructor streamed.
16051 (write_global_stream): Output indexes encoded.
16052 (produce_asm_for_decls): Dump streams encoded.
16053 * lto-streamer.c (streamer_dump_file): New global var.
16054 * lto-streamer.h (streamer_dump_file): Declare.
16055 * passes.c (ipa_write_summaries): Initialize streamer dump.
16056 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
16059 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
16062 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
16063 offsets for register save directives. Emit a second batch of save
16064 directives, if need be, when the function accesses prior frames.
16066 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16068 * config/arc/fpu.md (fmasf4): Force operand to register.
16069 (fnmasf4): Likewise.
16071 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16073 * config/arc/arc-protos.h (arc_pad_return): Remove.
16074 * config/arc/arc.c (machine_function): Remove force_short_suffix
16076 (arc_print_operand): Adjust printing of '&'.
16077 (arc_verify_short): Remove conditional printing of short suffix.
16078 (arc_final_prescan_insn): Remove reference to size_reason.
16079 (pad_return): New function.
16080 (arc_reorg): Call pad_return.
16081 (arc_pad_return): Remove.
16082 (arc_init_machine_status): Remove reference to force_short_suffix.
16083 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
16084 (attr length): When attribute iscompact is true force to 2
16085 regardless; in the case of maybe check if we want to force the
16086 instruction to have 4 bytes length.
16087 (nopv): Change it to generate 4 byte long nop as well.
16088 (blockage): New pattern.
16089 (simple_return): Remove call to arc_pad_return.
16090 (p_return_i): Likewise.
16092 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16094 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
16096 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16098 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
16101 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16103 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
16104 for ARC700 and ARCv2.
16106 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
16109 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
16110 operands[2] instead of operands[1].
16113 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16115 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
16116 case, check whether the outer register overlaps an unallocatable
16117 register, not just whether it fits the required class.
16119 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16121 * poly-int.h (can_div_trunc_p): Add new overload in which all values
16123 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
16124 (memrefs_conflict_p): Likewise.
16125 (init_alias_analysis): Likewise.
16126 * cfgexpand.c (expand_debug_expr): Likewise.
16127 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16128 * cse.c (fold_rtx): Likewise.
16129 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16130 * expr.c (emit_block_move_hints): Likewise.
16131 (clear_storage_hints, push_block, emit_push_insn): Likewise.
16132 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16133 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
16134 (emit_group_store): Likewise.
16135 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
16136 to read the PRE/POST_MODIFY increment.
16137 * calls.c (store_one_arg): Use strip_offset.
16138 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
16140 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
16142 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
16143 (simplify_binary_operation_1): Extend CONST_INT handling to
16145 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
16146 than a HOST_WIDE_INT.
16147 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
16149 (adjust_mems, add_stores): Update accodingly.
16150 (vt_canonicalize_addr): Track polynomial offsets.
16151 (emit_note_insn_var_location): Likewise.
16152 (vt_add_function_parameter): Likewise.
16153 (vt_initialize): Likewise.
16155 2018-06-12 Jeff Law <law@redhat.com>
16157 * config.gcc (alpha*-*-freebsd*): Remove.
16158 * config/alpha/freebsd.h: Remove.
16160 2018-06-12 David Malcolm <dmalcolm@redhat.com>
16163 * spellcheck-tree.c (levenshtein_distance): Rename to...
16164 (get_edit_distance): ...this, and update for underlying renaming.
16165 * spellcheck-tree.h (levenshtein_distance): Rename to...
16166 (get_edit_distance): ...this.
16167 * spellcheck.c (levenshtein_distance): Rename to...
16168 (get_edit_distance): ...this. Convert from Levenshtein distance
16169 to Damerau-Levenshtein distance by supporting transpositions of
16170 adjacent characters. Rename "v1" to "v_next" and "v0" to
16172 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16173 (selftest::test_edit_distance_unit_test_oneway): ...this, and
16174 update for underlying renaming.
16175 (selftest::levenshtein_distance_unit_test): Rename to...
16176 (selftest::test_get_edit_distance_unit): ...this, and update for
16177 underlying renaming.
16178 (selftest::test_find_closest_string): Add example from PR 69968
16179 where transposition helps
16180 (selftest::test_metric_conditions): Update for renaming.
16181 (selftest::test_metric_conditions): Likewise.
16182 (selftest::spellcheck_c_tests): Likewise.
16183 * spellcheck.h (levenshtein_distance): Rename both overloads to...
16184 (get_edit_distance): ...this.
16185 (best_match::consider): Update for renaming.
16187 2018-06-12 Martin Sebor <msebor@redhat.com>
16189 PR tree-optimization/85259
16190 * builtins.c (compute_objsize): Handle constant offsets.
16191 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16192 true iff a warning has been issued.
16193 * gimple.h (gimple_nonartificial_location): New function.
16194 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16195 gimple_nonartificial_location and handle -Wno-system-headers.
16196 (handle_builtin_stxncpy): Same.
16198 2018-06-12 Martin Sebor <msebor@redhat.com>
16201 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16203 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
16205 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16206 BUILTIN_VEC_XST entries for pointer to double and long long.
16208 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
16211 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16213 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16216 2018-06-12 Martin Liska <mliska@suse.cz>
16218 * doc/options.texi: Document IntegerRange.
16220 2018-06-12 Martin Liska <mliska@suse.cz>
16222 * config/i386/i386.opt: Make MPX-related options as Deprecated.
16223 * opt-functions.awk: Handle Deprecated flag.
16224 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16226 (read_cmdline_option): Report warning for a deprecated option.
16227 * opts.h (struct cl_option): Add new field cl_deprecated.
16228 (CL_ERR_DEPRECATED): New.
16230 2018-06-12 Martin Liska <mliska@suse.cz>
16232 * doc/options.texi: Document Deprecated option flag.
16234 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16236 * config/arc/arc-arch.h (arc_extras): New enum.
16237 (arc_cpu_t):Add field extra.
16238 (arc_cpu_types): Consider the extras.
16239 * config/arc/arc-cpus.def: Add extras info.
16240 * config/arc/arc-opts.h (processor_type): Consider extra field.
16241 * config/arc/arc.c (arc_override_options): Handle extra field.
16243 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16245 * config/arc/arc-arch.h: Update ARC_OPTX macro.
16246 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16248 * config/arc/arc.c (arc_init): Update pic warning.
16249 (irq_range): Update irq range parsing warnings.
16250 (arc_override_options): Update various warning messages.
16251 (arc_handle_aux_attribute): Likewise.
16253 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
16255 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16257 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16259 * doc/sourcebuild.texi: Document usage of line number 0 in verify
16260 compiler messages directives.
16262 2018-06-12 Matthew Fortune <mfortune@gmail.com>
16264 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16265 * config/mips/mips-tables.opt: Regenerate.
16266 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16268 * doc/invoke.texi: Document -march=i6500.
16270 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
16272 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16273 (i6400_gpmul): Add cpu_unit.
16274 (i6400_gpdiv): Likewise.
16275 (i6400_msa_add_d): Update reservations.
16276 (i6400_msa_int_add) Likewise.
16277 (i6400_msa_short_logic3) Likewise.
16278 (i6400_msa_short_logic2) Likewise.
16279 (i6400_msa_short_logic) Likewise.
16280 (i6400_msa_move) Likewise.
16281 (i6400_msa_cmp) Likewise.
16282 (i6400_msa_short_float2) Likewise.
16283 (i6400_msa_div_d) Likewise.
16284 (i6400_msa_long_logic1) Likewise.
16285 (i6400_msa_long_logic2) Likewise.
16286 (i6400_msa_mult) Likewise.
16287 (i6400_msa_long_float2) Likewise.
16288 (i6400_msa_long_float4) Likewise.
16289 (i6400_msa_long_float5) Likewise.
16290 (i6400_msa_long_float8) Likewise.
16291 (i6400_fpu_fadd): Include frint type.
16292 (i6400_fpu_store): New define_insn_reservation.
16293 (i6400_fpu_load): Likewise.
16294 (i6400_fpu_move): Likewise.
16295 (i6400_fpu_fcmp): Likewise.
16296 (i6400_fpu_fmadd): Likewise.
16297 (i6400_int_mult): Include imul3nc type and update reservation.
16298 (i6400_int_div): Include idiv3 type and update reservation.
16299 (i6400_int_load): Update to check type not move_type.
16300 (i6400_int_store): Likewise.
16301 (i6400_int_prefetch): Set zero latency.
16303 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
16305 * gcc.c: Document new %@{...} sequence.
16306 (LINK_COMMAND_SPEC): Use it for the -L switches.
16307 (cpp_unique_options): Use it for the -I switches.
16308 (at_file_argbuf): New global variable.
16309 (in_at_file): Likewise.
16310 (alloc_args): Create at_file_argbuf.
16311 (clear_args): Truncate at_file_argbuf.
16312 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16313 (open_at_file): New function.
16314 (close_at_file): Likewise.
16315 (create_at_file): Delete.
16316 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16319 (validate_switches_from_spec): Deal with %@{...} sequence.
16320 (validate_switches): Likewise.
16321 (driver::finalize): Call clear_args.
16323 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
16325 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16327 2018-06-11 Martin Sebor <msebor@redhat.com>
16329 * doc/invoke.texi (-Wall): List -Wc++17-compat.
16330 (Wno-class-memaccess): Add @opindex.
16331 (Wno-templates, Wno-multiple-inheritance): Same.
16332 (Wno-virtual-inheritance, Wno-namespaces): Same.
16333 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16334 (Wno-format-overflow, Wno-format-truncation): Same.
16335 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16336 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16337 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16338 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16339 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16340 (Wno-misspelled-isr): Same.
16342 2018-06-11 Martin Sebor <msebor@redhat.com>
16344 * PR tree-optimization/86083
16345 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16347 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
16349 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16351 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
16354 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16355 on the correct operand.
16356 (*movdi_internal64): Ditto.
16358 2018-06-11 Martin Liska <mliska@suse.cz>
16360 PR tree-optimization/86089
16361 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16363 2018-06-11 Julia Koval <julia.koval@intel.com>
16365 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16366 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16367 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16369 2018-06-11 Olivier Hainque <hainque@adacore.com>
16371 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16372 for Ada with strict dwarf2.
16374 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
16377 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16380 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
16382 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16384 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
16386 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16389 2018-06-08 Martin Liska <mliska@suse.cz>
16391 * tree-cfg.h (debug_function): Fix argument type to match
16394 2018-06-08 Martin Liska <mliska@suse.cz>
16396 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16397 Remove usage of MPX-related (and removed) fields.
16398 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16400 2018-06-08 David Malcolm <dmalcolm@redhat.com>
16402 * cfg.c (debug): Use TDF_NONE rather than 0.
16403 * cfghooks.c (debug): Likewise.
16404 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16405 (struct dump_option_value_info): Convert to...
16406 (struct kv_pair): ...this template type.
16407 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16409 (optinfo_verbosity_options): Likewise.
16410 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16412 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16413 than int for "optgroup_flags" param.
16414 (dump_generic_expr_loc): Use dump_flags_t rather than int for
16416 (dump_dec): Likewise.
16417 (dump_finish): Use TDF_NONE rather than 0.
16418 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16419 rather than int for "optgroup_flags" param. Use TDF_NONE rather
16420 than 0. Update for change to option_ptr.
16421 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16422 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
16423 0. Update for changes to optinfo_verbosity_options and
16425 (opt_info_switch_p): Convert optgroup_flags from int to
16427 (dump_basic_block): Use dump_flags_t rather than int
16428 for "dump_kind" param.
16429 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16430 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16431 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16432 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16433 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16434 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16435 TDF_NONE): Convert from macros to...
16436 (enum dump_flag): ...this new enum.
16437 (dump_flags_t): Update to use enum.
16438 (operator|, operator&, operator~, operator|=, operator&=):
16439 Implement for dump_flags_t.
16440 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16441 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16442 Convert from macros to...
16443 (enum optgroup_flag): ...this new enum.
16444 (optgroup_flags_t): New typedef.
16445 (operator|, operator|=): Implement for optgroup_flags_t.
16446 (struct dump_file_info): Convert field "alt_flags" to
16447 dump_flags_t. Convert field "optgroup_flags" to
16449 (dump_basic_block): Use dump_flags_t rather than int for param.
16450 (dump_generic_expr_loc): Likewise.
16451 (dump_dec): Likewise.
16452 (dump_register): Convert param "optgroup_flags" to
16454 (opt_info_enable_passes): Likewise.
16455 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16457 * gimple-pretty-print.c (debug): Likewise.
16458 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16459 (merged_store_group::apply_stores): Likewise.
16460 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16461 * gimple.c (verify_gimple_pp): Likewise.
16462 * graphite-poly.c (print_pbb_body): Likewise.
16463 * passes.c (pass_manager::register_one_dump_file): Convert
16464 local "optgroup_flags" to optgroup_flags_t.
16465 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16467 (debug_body): Likewise.
16468 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16469 to optgroup_flags_t.
16470 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16472 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16473 (convert_mult_to_fma): Likewise.
16474 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16475 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16476 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16477 "dump_kind" to dump_flags_t.
16479 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16481 * config/rs6000/rs6000.c (min, max): Delete.
16483 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16485 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16486 -mabi=spe and -mabi=no-spe.
16488 2018-06-08 Martin Liska <mliska@suse.cz>
16490 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16491 where we expect an existing summary.
16493 2018-06-08 Martin Liska <mliska@suse.cz>
16495 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16496 * ipa-inline.h (estimate_edge_growth): Likewise.
16498 2018-06-08 Martin Liska <mliska@suse.cz>
16500 * cgraph.c (function_version_hasher::hash): Use
16501 cgraph_node::get_uid ().
16502 (function_version_hasher::equal):
16503 * cgraph.h (cgraph_node::get_uid): New method.
16504 * ipa-inline.c (update_caller_keys): Use
16505 cgraph_node::get_uid ().
16506 (update_callee_keys): Likewise.
16507 * ipa-utils.c (searchc): Likewise.
16508 (ipa_reduced_postorder): Likewise.
16509 * lto-cgraph.c (input_node): Likewise.
16510 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16511 * symbol-summary.h (symtab_insertion): Likewise.
16512 (symtab_removal): Likewise.
16513 (symtab_duplication): Likewise.
16514 * tree-pretty-print.c (dump_function_header): Likewise.
16515 * tree-sra.c (convert_callers_for_node): Likewise.
16517 2018-06-08 Martin Liska <mliska@suse.cz>
16519 * cgraph.c (symbol_table::create_edge): Always assign a new
16521 (symbol_table::free_edge): Do not recycle numbers.
16522 * cgraph.h (cgraph_edge::get): New method.
16523 * symbol-summary.h (symtab_removal): Use it.
16524 (symtab_duplication): Likewise.
16525 (call_summary::hashable_uid): Remove.
16527 2018-06-08 Martin Liska <mliska@suse.cz>
16529 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16530 (initialize_growth_caches): Remove.
16531 (free_growth_caches): Likewise.
16532 (do_estimate_edge_time): Use edge_growth_cache.
16533 (do_estimate_edge_size): Likewise.
16534 (do_estimate_edge_hints): Likewise.
16535 * ipa-inline.c (reset_edge_caches): Likewise.
16536 (recursive_inlining): Likewise.
16537 (inline_small_functions): Likewise.
16538 * ipa-inline.h (initialize_growth_caches): Remove.
16539 (estimate_edge_size): Likewise.
16540 (estimate_edge_time): Likewise.
16541 (estimate_edge_hints): Likewise.
16542 (reset_edge_growth_cache): Likewise.
16543 * symbol-summary.h (call_summary::remove): New method.
16545 2018-06-08 Martin Liska <mliska@suse.cz>
16547 * ipa-cp.c (class edge_clone_summary): New summary.
16548 (grow_edge_clone_vectors): Remove.
16549 (ipcp_edge_duplication_hook): Remove.
16550 (class edge_clone_summary_t): New call_summary class.
16551 (ipcp_edge_removal_hook): Remove.
16552 (edge_clone_summary_t::duplicate): New function.
16553 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16554 (create_specialized_node): Likewise.
16555 (ipcp_driver): Initialize edge_clone_summaries and do not
16558 2018-06-08 Martin Liska <mliska@suse.cz>
16560 * symbol-summary.h (get): New function.
16561 (call_summary::m_initialize_when_cloning): New class member.
16563 2018-06-08 Martin Liska <mliska@suse.cz>
16565 * cgraph.c (cgraph_node::remove): Do not recycle uid.
16566 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16567 (symbol_table::allocate_cgraph_symbol): Do not set uid.
16568 * passes.c (uid_hash_t): Record removed_nodes by their uids.
16569 (remove_cgraph_node_from_order): Use the removed_nodes set.
16570 (do_per_function_toporder): Likwise.
16571 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16572 instead of summary_uid.
16573 (symtab_removal): Likewise.
16574 (symtab_duplication): Likewise.
16576 2018-06-08 Martin Liska <mliska@suse.cz>
16578 * ipa-cp.c (ipcp_store_bits_results): Use
16579 ipcp_transformation_sum.
16580 (ipcp_store_vr_results): Likewise.
16581 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16583 (ipcp_transformation_initialize): ... this.
16584 (ipa_set_node_agg_value_chain):
16585 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16586 (write_ipcp_transformation_info): Likewise.
16587 (read_ipcp_transformation_info): Likewise.
16588 (ipcp_update_bits): Likewise.
16589 (ipcp_update_vr): Likewise.
16590 (ipcp_transform_function): Likewise.
16591 * ipa-prop.h: Rename ipcp_transformation_summary to
16592 ipcp_transformation.
16593 (class ipcp_transformation_t): New function summary.
16594 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16595 (ipa_get_agg_replacements_for_node): Likewise.
16597 2018-06-08 Martin Liska <mliska@suse.cz>
16599 * ipa-pure-const.c (struct funct_state_d): Do it class instead
16601 (class funct_state_summary_t): New function_summary class.
16602 (has_function_state): Remove.
16603 (get_function_state): Likewise.
16604 (set_function_state): Likewise.
16605 (add_new_function): Likewise.
16606 (funct_state_summary_t::insert): New function.
16607 (duplicate_node_data): Remove.
16608 (remove_node_data): Remove.
16609 (funct_state_summary_t::duplicate): New function.
16610 (register_hooks): Create new funct_state_summaries.
16611 (pure_const_generate_summary): Use it.
16612 (pure_const_write_summary): Likewise.
16613 (pure_const_read_summary): Likewise.
16614 (propagate_pure_const): Likewise.
16615 (propagate_nothrow): Likewise.
16616 (dump_malloc_lattice): Likewise.
16617 (propagate_malloc): Likewise.
16618 (execute): Do not register hooks, just remove summary
16620 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16623 2018-06-08 Martin Liska <mliska@suse.cz>
16625 * ipa-reference.c (remove_node_data): Remove.
16626 (duplicate_node_data): Likewise.
16627 (class ipa_ref_var_info_summary_t): New class.
16628 (class ipa_ref_opt_summary_t): Likewise.
16629 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16630 (get_reference_optimization_summary): Use
16631 ipa_ref_opt_sum_summaries.
16632 (set_reference_vars_info): Remove.
16633 (set_reference_optimization_summary): Likewise.
16634 (ipa_init): Create summaries.
16635 (init_function_info): Use function summary.
16636 (ipa_ref_opt_summary_t::duplicate): New function.
16637 (ipa_ref_opt_summary_t::remove): New function.
16638 (get_read_write_all_from_node): Fix GNU coding style.
16639 (propagate): Use function summary.
16640 (write_node_summary_p): Fix GNU coding style.
16641 (stream_out_bitmap): Likewise.
16642 (ipa_reference_read_optimization_summary): Use function summary.
16643 (ipa_reference_c_finalize): Do not release hooks.
16645 2018-06-08 Martin Liska <mliska@suse.cz>
16647 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16648 (analyze_function_body): Extract multiple calls of get_create.
16649 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16650 * ipa-inline.c (recursive_inlining): Use ::get method.
16651 * ipa-inline.h (estimate_edge_growth): Likewise.
16653 2018-06-08 Martin Liska <mliska@suse.cz>
16655 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16657 (hsa_function_summary::hsa_function_summary): Use the new enum
16659 (hsa_gpu_implementation_p): Use hsa_summaries::get.
16660 * hsa-gen.c (hsa_get_host_function): Likewise.
16661 (get_brig_function_name): Likewise.
16662 * ipa-hsa.c (process_hsa_functions): Likewise.
16663 (ipa_hsa_write_summary): Likewise.
16664 * symbol-summary.h (symtab_duplication): Use ::get function/
16665 (get): New function.
16667 2018-06-08 Martin Liska <mliska@suse.cz>
16669 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16671 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16672 (hsa_register_kernel): Likewise.
16673 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16674 * hsa-gen.c (hsa_get_host_function): Likewise.
16675 (get_brig_function_name): Likewise.
16676 (generate_hsa): Likewise.
16677 (pass_gen_hsail::execute): Likewise.
16678 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16679 (devirtualization_time_bonus): Likewise.
16680 (ipcp_propagate_stage): Likewise.
16681 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16682 (edge_set_predicate): Likewise.
16683 (evaluate_conditions_for_known_args): Likewise.
16684 (evaluate_properties_for_edge): Likewise.
16685 (ipa_fn_summary::reset): Likewise.
16686 (ipa_fn_summary_t::duplicate): Likewise.
16687 (dump_ipa_call_summary): Likewise.
16688 (ipa_dump_fn_summary): Likewise.
16689 (analyze_function_body): Likewise.
16690 (compute_fn_summary): Likewise.
16691 (estimate_edge_devirt_benefit): Likewise.
16692 (estimate_edge_size_and_time): Likewise.
16693 (estimate_calls_size_and_time): Likewise.
16694 (estimate_node_size_and_time): Likewise.
16695 (inline_update_callee_summaries): Likewise.
16696 (remap_edge_change_prob): Likewise.
16697 (remap_edge_summaries): Likewise.
16698 (ipa_merge_fn_summary_after_inlining): Likewise.
16699 (ipa_update_overall_fn_summary): Likewise.
16700 (read_ipa_call_summary): Likewise.
16701 (inline_read_section): Likewise.
16702 (write_ipa_call_summary): Likewise.
16703 (ipa_fn_summary_write): Likewise.
16704 (ipa_free_fn_summary): Likewise.
16705 * ipa-hsa.c (process_hsa_functions): Likewise.
16706 (ipa_hsa_write_summary): Likewise.
16707 (ipa_hsa_read_section): Likewise.
16708 * ipa-icf.c (sem_function::merge): Likewise.
16709 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16710 (do_estimate_edge_time): Likewise.
16711 (estimate_size_after_inlining): Likewise.
16712 (estimate_growth): Likewise.
16713 (growth_likely_positive): Likewise.
16714 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16715 (inline_call): Likewise.
16716 * ipa-inline.c (caller_growth_limits): Likewise.
16717 (can_inline_edge_p): Likewise.
16718 (can_inline_edge_by_limits_p): Likewise.
16719 (compute_uninlined_call_time): Likewise.
16720 (compute_inlined_call_time): Likewise.
16721 (want_inline_small_function_p): Likewise.
16722 (edge_badness): Likewise.
16723 (update_caller_keys): Likewise.
16724 (update_callee_keys): Likewise.
16725 (recursive_inlining): Likewise.
16726 (inline_small_functions): Likewise.
16727 (inline_to_all_callers_1): Likewise.
16728 (dump_overall_stats): Likewise.
16729 (early_inline_small_functions): Likewise.
16730 (early_inliner): Likewise.
16731 * ipa-inline.h (estimate_edge_growth): Likewise.
16732 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16733 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16734 * ipa-prop.h (IPA_NODE_REF): Likewise.
16735 (IPA_EDGE_REF): Likewise.
16736 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16737 (propagate_malloc): Likewise.
16738 * ipa-split.c (execute_split_functions): Likewise.
16739 * symbol-summary.h: Rename get to get_create.
16741 (get_create): Likewise.
16742 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16744 2018-06-08 Martin Liska <mliska@suse.cz>
16746 * symbol-summary.h (release): Move definition out of class
16748 (symtab_removal): Likewise.
16749 (symtab_duplication): Likewise.
16751 2018-06-08 Martin Liska <mliska@suse.cz>
16753 * symbol-summary.h (function_summary): Move constructor
16754 implementation out of class declaration.
16755 (release): Likewise.
16756 (symtab_insertion): Likewise.
16757 (symtab_removal): Likewise.
16758 (symtab_duplication): Likewise.
16761 2018-06-08 Martin Liska <mliska@suse.cz>
16763 * Makefile.in: Remove support for MPX (macros, related functions,
16764 fields in cgraph_node, ...).
16765 * builtin-types.def (BT_BND): Likewise.
16766 (BT_FN_BND_CONST_PTR): Likewise.
16767 (BT_FN_CONST_PTR_BND): Likewise.
16768 (BT_FN_VOID_PTR_BND): Likewise.
16769 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16770 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16771 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16772 (expand_builtin_mempcpy_with_bounds): Likewise.
16773 (expand_builtin_memset_with_bounds): Likewise.
16774 (expand_builtin_memset_args): Likewise.
16775 (std_expand_builtin_va_start): Likewise.
16776 (expand_builtin): Likewise.
16777 (expand_builtin_with_bounds): Likewise.
16778 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16779 (DEF_LIB_BUILTIN_CHKP): Likewise.
16780 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16781 (DEF_CHKP_BUILTIN): Likewise.
16782 (BUILT_IN_MEMCPY): Likewise.
16783 (BUILT_IN_MEMMOVE): Likewise.
16784 (BUILT_IN_MEMPCPY): Likewise.
16785 (BUILT_IN_MEMSET): Likewise.
16786 (BUILT_IN_STPCPY): Likewise.
16787 (BUILT_IN_STRCAT): Likewise.
16788 (BUILT_IN_STRCHR): Likewise.
16789 (BUILT_IN_STRCPY): Likewise.
16790 (BUILT_IN_STRLEN): Likewise.
16791 (BUILT_IN_MEMCPY_CHK): Likewise.
16792 (BUILT_IN_MEMMOVE_CHK): Likewise.
16793 (BUILT_IN_MEMPCPY_CHK): Likewise.
16794 (BUILT_IN_MEMSET_CHK): Likewise.
16795 (BUILT_IN_STPCPY_CHK): Likewise.
16796 (BUILT_IN_STRCAT_CHK): Likewise.
16797 (BUILT_IN_STRCPY_CHK): Likewise.
16798 * calls.c (store_bounds): Likewise.
16799 (emit_call_1): Likewise.
16800 (special_function_p): Likewise.
16801 (maybe_warn_nonstring_arg): Likewise.
16802 (initialize_argument_information): Likewise.
16803 (finalize_must_preallocate): Likewise.
16804 (compute_argument_addresses): Likewise.
16805 (expand_call): Likewise.
16806 * cfgexpand.c (expand_call_stmt): Likewise.
16807 (expand_return): Likewise.
16808 (expand_gimple_stmt_1): Likewise.
16809 (pass_expand::execute): Likewise.
16810 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16811 (cgraph_node::remove): Likewise.
16812 (cgraph_node::dump): Likewise.
16813 (cgraph_node::verify_node): Likewise.
16814 * cgraph.h (chkp_function_instrumented_p): Likewise.
16815 (symtab_node::get_alias_target): Likewise.
16816 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16817 (cgraph_local_p): Likewise.
16818 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16819 (cgraph_edge::rebuild_references): Likewise.
16820 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16821 (walk_polymorphic_call_targets): Likewise.
16822 (cgraph_node::expand_thunk): Likewise.
16823 (symbol_table::output_weakrefs): Likewise.
16824 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16825 (ix86_handle_option): Likewise.
16826 * config/i386/constraints.md: Likewise.
16827 * config/i386/i386-builtin-types.def (BND): Likewise.
16831 * config/i386/i386-builtin.def (BDESC_END): Likewise.
16832 (BDESC_FIRST): Likewise.
16834 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16835 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16836 * config/i386/i386.c (enum reg_class): Likewise.
16837 (ix86_target_string): Likewise.
16838 (ix86_option_override_internal): Likewise.
16839 (ix86_conditional_register_usage): Likewise.
16840 (ix86_valid_target_attribute_inner_p): Likewise.
16841 (ix86_set_indirect_branch_type): Likewise.
16842 (ix86_set_current_function): Likewise.
16843 (ix86_function_arg_regno_p): Likewise.
16844 (init_cumulative_args): Likewise.
16845 (ix86_function_arg_advance): Likewise.
16846 (ix86_function_arg): Likewise.
16847 (ix86_pass_by_reference): Likewise.
16848 (ix86_function_value_regno_p): Likewise.
16849 (ix86_function_value_1): Likewise.
16850 (ix86_function_value_bounds): Likewise.
16851 (ix86_return_in_memory): Likewise.
16852 (ix86_setup_incoming_vararg_bounds): Likewise.
16853 (ix86_va_start): Likewise.
16854 (indirect_thunk_need_prefix): Likewise.
16855 (print_reg): Likewise.
16856 (ix86_print_operand): Likewise.
16857 (ix86_expand_call): Likewise.
16858 (ix86_output_function_return): Likewise.
16859 (reg_encoded_number): Likewise.
16860 (BDESC_VERIFYS): Likewise.
16861 (ix86_init_mpx_builtins): Likewise.
16862 (ix86_init_builtins): Likewise.
16863 (ix86_emit_cmove): Likewise.
16864 (ix86_emit_move_max): Likewise.
16865 (ix86_expand_builtin): Likewise.
16866 (ix86_builtin_mpx_function): Likewise.
16867 (ix86_get_arg_address_for_bt): Likewise.
16868 (ix86_load_bounds): Likewise.
16869 (ix86_store_bounds): Likewise.
16870 (ix86_load_returned_bounds): Likewise.
16871 (ix86_store_returned_bounds): Likewise.
16872 (ix86_class_likely_spilled_p): Likewise.
16873 (ix86_hard_regno_mode_ok): Likewise.
16874 (x86_order_regs_for_local_alloc): Likewise.
16875 (ix86_mitigate_rop): Likewise.
16876 (ix86_bnd_prefixed_insn_p): Likewise.
16877 (ix86_mpx_bound_mode): Likewise.
16878 (ix86_make_bounds_constant): Likewise.
16879 (ix86_initialize_bounds): Likewise.
16880 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16881 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16882 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16883 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16884 (TARGET_CHKP_BOUND_MODE): Likewise.
16885 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16886 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16887 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16888 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16889 * config/i386/i386.h (TARGET_MPX): Likewise.
16890 (TARGET_MPX_P): Likewise.
16891 (VALID_BND_REG_MODE): Likewise.
16892 (FIRST_BND_REG): Likewise.
16893 (LAST_BND_REG): Likewise.
16894 (enum reg_class): Likewise.
16895 (BND_REG_P): Likewise.
16896 (BND_REGNO_P): Likewise.
16897 (BNDmode): Likewise.
16898 (ADJUST_INSN_LENGTH): Likewise.
16899 * config/i386/i386.md: Likewise.
16900 * config/i386/i386.opt: Likewise.
16901 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16902 (defined): Likewise.
16903 (LINK_MPX): Likewise.
16904 (MPX_SPEC): Likewise.
16905 (LIBMPX_SPEC): Likewise.
16906 (LIBMPXWRAPPERS_SPEC): Likewise.
16907 (CHKP_SPEC): Likewise.
16908 * config/i386/predicates.md: Likewise.
16909 * dbxout.c (dbxout_type): Likewise.
16910 * doc/extend.texi: Likewise.
16911 * doc/invoke.texi: Likewise.
16912 * doc/md.texi: Likewise.
16913 * doc/tm.texi: Likewise.
16914 * doc/tm.texi.in: Likewise.
16915 * dwarf2out.c (is_base_type): Likewise.
16916 (gen_formal_types_die): Likewise.
16917 (gen_subprogram_die): Likewise.
16918 (gen_type_die_with_usage): Likewise.
16919 (gen_decl_die): Likewise.
16920 (dwarf2out_late_global_decl): Likewise.
16921 * expr.c (expand_assignment): Likewise.
16922 (emit_storent_insn): Likewise.
16923 (store_expr_with_bounds): Likewise.
16924 (store_expr): Likewise.
16925 (expand_expr_real_1): Likewise.
16926 * expr.h (store_expr_with_bounds): Likewise.
16927 * function.c (use_register_for_decl): Likewise.
16928 (struct bounds_parm_data): Likewise.
16929 (assign_parms_augmented_arg_list): Likewise.
16930 (assign_parm_find_entry_rtl): Likewise.
16931 (assign_parm_is_stack_parm): Likewise.
16932 (assign_parm_load_bounds): Likewise.
16933 (assign_bounds): Likewise.
16934 (assign_parms): Likewise.
16935 (expand_function_start): Likewise.
16936 * gcc.c (CHKP_SPEC): Likewise.
16937 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16938 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16939 (wrestrict_dom_walker::check_call): Likewise.
16940 * gimple.c (gimple_build_call_from_tree): Likewise.
16941 * gimple.h (enum gf_mask): Likewise.
16942 (gimple_call_with_bounds_p): Likewise.
16943 (gimple_call_set_with_bounds): Likewise.
16944 * gimplify.c (gimplify_init_constructor): Likewise.
16945 * ipa-cp.c (initialize_node_lattices): Likewise.
16946 (propagate_constants_across_call): Likewise.
16947 (find_more_scalar_values_for_callers_subset): Likewise.
16948 * ipa-hsa.c (process_hsa_functions): Likewise.
16949 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16950 * ipa-icf.c (sem_function::merge): Likewise.
16951 * ipa-inline.c (early_inliner): Likewise.
16952 * ipa-pure-const.c (warn_function_noreturn): Likewise.
16953 (warn_function_cold): Likewise.
16954 (propagate_pure_const): Likewise.
16955 * ipa-ref.h (enum GTY): Likewise.
16956 * ipa-split.c (find_retbnd): Likewise.
16957 (consider_split): Likewise.
16958 (split_function): Likewise.
16959 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16960 * ipa.c (walk_polymorphic_call_targets): Likewise.
16961 (symbol_table::remove_unreachable_nodes): Likewise.
16962 (process_references): Likewise.
16963 (cgraph_build_static_cdtor_1): Likewise.
16964 * lto-cgraph.c (lto_output_node): Likewise.
16965 (output_refs): Likewise.
16966 (compute_ltrans_boundary): Likewise.
16967 (input_overwrite_node): Likewise.
16968 (input_node): Likewise.
16969 (input_cgraph_1): Likewise.
16970 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16971 * passes.c (pass_manager::execute_early_local_passes): Likewise.
16972 (class pass_chkp_instrumentation_passes): Likewise.
16973 (make_pass_chkp_instrumentation_passes): Likewise.
16974 * passes.def: Likewise.
16975 * rtl.h (struct GTY): Likewise.
16976 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16977 * stor-layout.c (layout_type): Likewise.
16978 * symtab.c: Likewise.
16979 * target.def: Likewise.
16980 * targhooks.c (default_chkp_bound_type): Likewise.
16981 (default_chkp_bound_mode): Likewise.
16982 (default_builtin_chkp_function): Likewise.
16983 (default_chkp_function_value_bounds): Likewise.
16984 (default_chkp_make_bounds_constant): Likewise.
16985 (default_chkp_initialize_bounds): Likewise.
16986 * targhooks.h (default_chkp_bound_type): Likewise.
16987 (default_chkp_bound_mode): Likewise.
16988 (default_builtin_chkp_function): Likewise.
16989 (default_chkp_function_value_bounds): Likewise.
16990 (default_chkp_make_bounds_constant): Likewise.
16991 (default_chkp_initialize_bounds): Likewise.
16992 * toplev.c (compile_file): Likewise.
16993 (process_options): Likewise.
16994 * tree-core.h (DEF_BUILTIN): Likewise.
16995 (DEF_BUILTIN_CHKP): Likewise.
16996 * tree-inline.c (declare_return_variable): Likewise.
16997 (remap_gimple_stmt): Likewise.
16998 (copy_bb): Likewise.
16999 (initialize_inlined_parameters): Likewise.
17000 (expand_call_inline): Likewise.
17001 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
17002 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
17003 (make_pass_ipa_chkp_produce_thunks): Likewise.
17004 (make_pass_chkp): Likewise.
17005 (make_pass_chkp_opt): Likewise.
17006 (make_pass_chkp_instrumentation_passes): Likewise.
17007 * tree-pretty-print.c (dump_generic_node): Likewise.
17008 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
17009 * tree-ssa-dce.c (propagate_necessity): Likewise.
17010 (eliminate_unnecessary_stmts): Likewise.
17011 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
17012 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
17013 * tree-ssa-sccvn.h: Likewise.
17014 * tree-ssa-strlen.c (get_string_length): Likewise.
17015 (valid_builtin_call): Likewise.
17016 (adjust_last_stmt): Likewise.
17017 (handle_builtin_strchr): Likewise.
17018 (handle_builtin_strcpy): Likewise.
17019 (handle_builtin_stxncpy): Likewise.
17020 (handle_builtin_memcpy): Likewise.
17021 (handle_builtin_strcat): Likewise.
17022 (strlen_check_and_optimize_stmt): Likewise.
17023 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
17024 * tree-streamer-in.c: Likewise.
17025 * tree-streamer.c (record_common_node): Likewise.
17026 * tree.c (tree_code_size): Likewise.
17027 (wide_int_to_tree_1): Likewise.
17028 (type_contains_placeholder_1): Likewise.
17029 (build_common_tree_nodes): Likewise.
17030 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
17031 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
17032 (POINTER_BOUNDS_P): Likewise.
17033 (BOUNDED_TYPE_P): Likewise.
17034 (BOUNDED_P): Likewise.
17035 (CALL_WITH_BOUNDS_P): Likewise.
17036 (pointer_bounds_type_node): Likewise.
17037 * value-prof.c (gimple_ic): Likewise.
17038 * var-tracking.c (vt_add_function_parameters): Likewise.
17039 * varasm.c (make_decl_rtl): Likewise.
17040 (assemble_start_function): Likewise.
17041 (output_constant): Likewise.
17042 (maybe_assemble_visibility): Likewise.
17043 * varpool.c (ctor_for_folding): Likewise.
17044 * chkp-builtins.def: Remove.
17045 * ipa-chkp.c: Remove.
17046 * ipa-chkp.h: Remove.
17047 * rtl-chkp.c: Remove.
17048 * rtl-chkp.h: Remove.
17049 * tree-chkp-opt.c: Remove.
17050 * tree-chkp.c: Remove.
17051 * tree-chkp.h: Remove.
17053 2018-06-07 Carl Love <cel@us.ibm.com>
17055 * config/rs6000/vsx.md (vextract_fp_from_shorth,
17056 vextract_fp_from_shortl): Add BE support.
17058 2018-06-07 Paul Koning <ni1d@arrl.net>
17060 * compare-elim.c (try_merge_compare): Don't merge compare if
17061 address contains a side effect.
17062 (try_eliminate_compare): Likewise.
17064 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
17066 * config.gcc: Support "tremont".
17067 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
17068 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17070 * config/i386/i386.c (m_TREMONT): Define.
17071 (processor_target_table): Add "tremont".
17072 (PTA_TREMONT): Define.
17073 (ix86_lea_outperforms): Add TARGET_TREMONT.
17074 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
17075 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
17076 and M_INTEL_GOLDMONT_PLUS.
17077 (fold_builtin_cpu): Add "tremont".
17078 (ix86_add_stmt_cost): Add TARGET_TREMONT.
17079 (ix86_option_override_internal): Add "tremont".
17080 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
17081 (processor_type): Add PROCESSOR_TREMONT.
17082 * config/i386/x86-tune.def: Add m_TREMONT.
17083 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
17085 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17087 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
17088 symbol defined for msp430i* devices to be lower case.
17090 2018-06-07 Richard Biener <rguenther@suse.de>
17092 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
17093 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
17094 Properly wrap signed arithmetic if overflow wraps.
17096 2018-06-07 Jakub Jelinek <jakub@redhat.com>
17098 PR tree-optimization/69615
17099 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
17100 of a cast from a same precision integral SSA_NAME in a bb dominated
17101 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
17102 cast to utype if rhs2 has already a compatible type.
17104 2018-06-07 Richard Biener <rguenther@suse.de>
17106 PR tree-optimization/85935
17107 * graphite-scop-detection.c (find_params_in_bb): Analyze
17108 condition operands with respect to the correct loop. Assert
17109 the analysis doesn't fail.
17111 2018-06-04 Carl Love <cel@us.ibm.com>
17113 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
17114 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
17115 as it is slightly cheaper.
17116 (first_match_or_eos_index_<mode>):
17117 Calculate index using natural element order.
17118 (first_match_index_<mode>):
17119 Calculate index using natural element order.
17120 (first_match_or_eos_index_<mode>):
17121 Calculate index using natural order.
17122 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
17123 for BE and LE modes.
17124 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
17125 P9V_BUILTIN_VCLZLSBB_V16QI.
17126 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17129 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17131 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17132 indentation and line wrap for many prototypes. Add missing
17133 @smallexample directives around block of prototypes for vec_xl and
17136 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
17138 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
17139 track if we pass or return IEEE 128-bit floating point.
17140 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
17141 C++ mangling that is compatible with GCC 8.1.
17142 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
17143 (init_cumulative_args): Note if we pass or return IEEE 128-bit
17144 floating point types.
17145 (rs6000_function_arg_advance_1): Likewise.
17146 (rs6000_mangle_type): Optionally generate mangled names that match
17147 what GCC 8.1 generated for IEEE 128-bit floating point types.
17148 (rs6000_globalize_decl_name): If we have an external function that
17149 passes or returns IEEE 128-bit types, generate a weak reference
17150 from the mangled name used in GCC 8.1 to the current mangled
17152 (rs6000_init_builtins): Make __ibm128 use the long double type if
17153 long double is IBM extended double. Make __float128 use the long
17154 double type if long double is IEEE 128-bit.
17157 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
17158 macro for __ibm128 built-in functions.
17159 (PACK_IF): Add __ibm128 pack/unpack functions.
17160 (UNPACK_IF): Likewise.
17161 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
17162 enable long double built-in functions if long double is IEEE
17163 128-bit floating point.
17164 (rs6000_invalid_builtin): Update long double built-in function
17166 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
17167 functions, adjust the built-in function to use the long double
17168 built-in function if __ibm128 and long double are the same type.
17169 * doc/extend.texi (PowerPC builtins): Update documention for
17170 __builtin_{,un}pack_longdouble. Add documentation for
17171 __builtin_{,un}pack_ibm128.
17173 2018-06-06 Jim Wilson <jimw@sifive.com>
17175 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17176 (struct machine_function): New field interrupt_mode.
17177 (riscv_handle_type_attribute): New function. Add forward declaration.
17178 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17179 (riscv_expand_epilogue): Check interrupt_mode field.
17180 (riscv_set_current_function): Check interrupt attribute args and
17181 set interrupt_mode field.
17182 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17183 (riscv_sret, riscv_uret): New.
17184 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17185 new arguments to interrupt attribute.
17187 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
17190 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17191 Don't handle -mcpu=power8 if -mpower9-vector is also used.
17193 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17195 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17196 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17197 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17198 several redundant entries.
17200 2018-06-06 David Malcolm <dmalcolm@redhat.com>
17202 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17203 type from "rtx" to "rtx_insn *".
17204 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17205 for local "call_insn", removing cast.
17206 (ix86_expand_call): Likewise, introducing a "call_insn" local.
17208 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
17210 PR tree-optimization/86066
17211 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17212 for BIT_INSERT_EXPR stores.
17214 2018-06-06 Richard Biener <rguenther@suse.de>
17216 PR tree-optimization/86062
17217 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17218 component refs ontop
17219 of to be offsetted base.
17221 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17223 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17224 to be static and remove check on interrupt attribute name.
17226 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
17228 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17229 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17231 2018-06-05 Steve Ellcey <sellcey@cavium.com>
17234 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17236 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17237 Remove second argument, change how error is called.
17238 (aarch64_layout_arg): Remove second argument from
17239 aarch64_err_no_fpadvsimd call.
17240 (aarch64_init_cumulative_args): Ditto.
17241 (aarch64_gimplify_va_arg_expr): Ditto.
17242 * config/aarch64/aarch64.md (mov<mode>): Ditto.
17244 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
17246 * config/i386/i386.md (simple_return_indirect_internal): New expander.
17247 (*simple_return_indirect_internal<mode>): Rename from
17248 simple_return_indirect_internal. Use W mode iterator.
17249 (rstorssp): New expander.
17250 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
17251 (clrssbsy): New expander.
17252 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
17254 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
17256 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17258 (cmse_check_pointed_object): Likewise.
17260 2018-06-05 Martin Liska <mliska@suse.cz>
17262 PR gcov-profile/47618
17263 * doc/invoke.texi: Document how -fprofile-dir format
17266 2018-06-05 Richard Biener <rguenther@suse.de>
17268 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17269 removal pretend DOM info isn't available so we do not update
17270 it and only remove edges, not dominated blocks. Actually free
17271 DOM info in case we removed something. Remove unreachable blocks.
17272 (mfb_keep_latches): Work with either DOM info or marked backedges.
17273 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17274 first. Mark backedges if DOM info isn't available.
17275 (Re-)compute DOM info after cleanup_control_flow_pre.
17277 2018-06-05 Richard Biener <rguenther@suse.de>
17279 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17280 (locus_discrim_hasher::hash): Adjust.
17281 (locus_discrim_hasher::equal): Likewise.
17282 (next_discriminator_for_locus): Work on line directly.
17283 (same_line_p): Pass in expanded locus1 as well.
17284 (assign_discriminators): Avoid redundant location expansions.
17286 2018-06-05 Richard Biener <rguenther@suse.de>
17288 PR tree-optimization/86046
17289 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17290 if required after clearing TREE_ADDRESSABLE.
17292 2018-06-05 Richard Biener <rguenther@suse.de>
17294 PR tree-optimization/86047
17295 * tree-ssa-loop.c (for_each_index): Glob handling of all
17296 decls and constants and really handle all of them.
17298 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17301 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17302 qualifier_void_pointer and qualifier_const_void_pointer.
17303 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17304 (arm_init_builtins): Handle the above.
17305 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17306 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17307 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17310 2018-06-05 Martin Liska <mliska@suse.cz>
17312 * auto-profile.c (read_autofdo_file): Do not use
17313 gcov_ctr_summary struct.
17314 (afdo_callsite_hot_enough_for_early_inline): Likewise.
17315 * coverage.c (struct counts_entry): Likewise.
17316 (read_counts_file): Read just single summary entry.
17317 (get_coverage_counts): Use gcov_summary struct.
17318 * coverage.h (get_coverage_counts): Likewise.
17319 * gcov-dump.c (dump_working_sets): Likewise.
17320 (tag_summary): Dump just single summary.
17321 * gcov-io.c (gcov_write_summary): Write just histogram
17323 (gcov_read_summary): Read just single summary.
17324 (compute_working_sets): Use gcov_summary struct.
17325 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17326 of GCOV_COUNTERS_SUMMABLE.
17327 (GCOV_COUNTERS_SUMMABLE): Remove.
17328 (GCOV_FIRST_VALUE_COUNTER): Replace with
17329 GCOV_COUNTER_V_INTERVAL.
17330 (struct gcov_ctr_summary): Remove.
17331 (struct gcov_summary): Directly use fields of former
17333 (compute_working_sets): Use gcov_summary struct.
17334 * gcov.c (read_count_file): Do not use ctrs fields.
17335 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17337 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17339 * profile.c: Likewise.
17340 * profile.h: Likewise.
17342 2018-06-05 Martin Liska <mliska@suse.cz>
17344 PR gcov-profile/84846
17345 * gcov.c (output_lines): Print working directory only
17346 in intermediate format.
17348 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
17350 * config/s390/s390-builtin-types.def: Add void function type.
17351 * config/s390/s390-builtins.def: Use the function type for the
17354 2018-06-04 Jim Wilson <jimw@sifive.com>
17356 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17358 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17359 and maybe_eh_return. Change regno to unsigned int. Use new args to
17360 handle EH_RETURN_DATA_REGNO registers properly.
17361 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17362 (riscv_expand_epilogue): Update comment. Change argument name and
17363 type. Update code to use new name and type. Pass new args to
17364 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
17366 * config/riscv/riscv.md (NORMAL_RETURN): New.
17367 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17368 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17369 (eh_return): Call gen_eh_return_internal and emit barrier.
17370 (eh_return_internal): Call riscv_expand_epilogue.
17372 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
17374 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17375 bit_insertion field and declare can_be_merged_into method.
17376 (merged_store_group::can_be_merged_into): New method.
17377 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17378 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
17379 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17381 2018-06-04 Richard Biener <rguenther@suse.de>
17383 PR tree-optimization/85955
17384 * builtins.c (fold_builtin_sincos): Convert pointers to
17385 destination to appropriate type before dereferencing.
17387 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
17389 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17391 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
17393 * expr.c (expand_expr_real_1): Force the operand into memory if
17394 its TYPE_MODE is BLKmode and if there is no integer mode for
17395 the number of bits being extracted.
17397 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17401 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17402 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17404 2018-06-04 Richard Biener <rguenther@suse.de>
17406 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17407 (cleanup_tree_cfg_noloop): ... single caller. Do
17408 start_recording_case_labels later.
17410 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
17412 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17413 to _IMMINTRIN_H_INCLUDED.
17414 * config/i386/pconfigintrin.h: Ditto.
17415 * config/i386/waitpkgintrin.h: Ditto.
17416 * config/i386/immintrin.h: Add includes for sgxintrin.h,
17417 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17418 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17419 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17420 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17421 waitpkgintrin.h and cldemoteintrin.h.
17423 2018-06-04 Richard Biener <rguenther@suse.de>
17425 PR tree-optimization/86038
17426 * tracer.c (find_best_successor): Check probability for
17427 being initialized, bail out if not.
17429 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
17432 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17433 of bits to ignore when comparing architectures.
17435 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17437 PR tree-optimization/69615
17438 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17439 maximum or minimum of the type, try to merge it also as if
17440 range1 is + [-, x - 1] or + [x + 1, -].
17443 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17445 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
17447 PR tree-optimization/86034
17448 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17449 the unsigned bitfield type in a bit insertion sequence if it does not
17450 have a larger precision than the bitfield size.
17451 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17453 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
17455 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17457 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17459 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17460 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17461 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17462 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17464 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17466 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17467 Disable -fdelete-null-pointer-checks for ELF toolchain.
17469 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17470 Kito Cheng <kito.cheng@gmail.com>
17472 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17473 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17474 (nds32*-*-*): Add glibc and uclibc conditions.
17475 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17476 (TARGET_EXCEPT_UNWIND_INFO): Define.
17477 * config/nds32/elf.h: New file.
17478 * config/nds32/linux.h: New file.
17479 * config/nds32/nds32-elf.opt: New file.
17480 * config/nds32/nds32-linux.opt: New file.
17481 * config/nds32/nds32-fp-as-gp.c
17482 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17483 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17485 (nds32_asm_file_end): Ditto.
17486 (nds32_print_operand): Ditto.
17487 (nds32_insert_attributes): Ditto.
17488 (nds32_init_libfuncs): New function.
17489 (TARGET_HAVE_TLS): Define.
17490 (TARGET_INIT_LIBFUNCS): Define.
17491 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17493 (TARGET_ELF): Apply different mcmodel setting.
17494 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17495 been migrated into elf.h and linux.h files.
17496 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17497 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17498 (mcmodel): The content has been migrated into nds32-elf.opt and
17499 nds32-linux.opt files.
17500 * config/nds32/t-elf: New file.
17501 * config/nds32/t-linux: New file.
17503 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17504 Shiva Chen <shiva0217@gmail.com>
17506 * config/nds32/constants.md (unspec_volatile_element): Add
17507 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17508 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17510 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17511 (make_pass_nds32_fp_as_gp): Declare.
17512 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17514 (nds32_asm_function_end_prologue): Remove unused asm output.
17515 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17516 (nds32_asm_file_start): Output necessary fp_as_gp information.
17517 (nds32_option_override): Adjust register usage.
17518 (nds32_expand_prologue): Consider fp_as_gp situation.
17519 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17520 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17523 (simple_return): Ditto.
17524 (omit_fp_begin): Output special directive for fp_as_gp.
17525 (omit_fp_end): Output special directive for fp_as_gp.
17526 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17527 mforbid-fp-as-gp): New options.
17529 2018-06-01 Mark Wielaard <mark@klomp.org>
17531 * dwarf2out.c (dwarf2out_finish): Remove generation of
17532 DW_AT_loclists_base.
17534 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17536 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17537 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17538 (struct merged_store_group): Add bit_insertion field.
17539 (dump_char_array): Use standard hexadecimal format.
17540 (merged_store_group::merged_store_group): Set bit_insertion to false.
17541 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17542 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17543 also print the mask in the dump file.
17544 (pass_store_merging::gate): Minor tweak.
17545 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17546 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17547 stores with INTEGER_CST stores.
17548 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17549 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17550 and use it throughout. Generate bit insertion sequences if need be.
17551 (pass_store_merging::process_store): Remove redundant condition.
17552 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17554 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
17556 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17557 the 128-bit floating point types. Fix function comment.
17559 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17561 * config/aarch64/aarch64-simd.md
17562 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17564 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17567 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17569 PR tree-optimization/85989
17570 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17572 (backprop::intersect_uses): Check it when deciding whether this
17573 is a backedge reference.
17574 (backprop::process_block): Add each phi to m_visited_phis
17575 after visiting it, then clear it at the end.
17577 2018-06-01 Richard Biener <rguenther@suse.de>
17579 * tree-vectorizer.h (vect_dr_stmt): New function.
17580 (vect_get_load_cost): Adjust.
17581 (vect_get_store_cost): Likewise.
17582 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17583 Use vect_dr_stmt instead of DR_SMTT.
17584 (vect_record_base_alignments): Likewise.
17585 (vect_calculate_target_alignment): Likewise.
17586 (vect_compute_data_ref_alignment): Likewise and make static.
17587 (vect_update_misalignment_for_peel): Likewise.
17588 (vect_verify_datarefs_alignment): Likewise.
17589 (vector_alignment_reachable_p): Likewise.
17590 (vect_get_data_access_cost): Likewise. Pass down
17591 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17592 (vect_get_peeling_costs_all_drs): Likewise.
17593 (vect_peeling_hash_get_lowest_cost): Likewise.
17594 (vect_enhance_data_refs_alignment): Likewise.
17595 (vect_find_same_alignment_drs): Likewise.
17596 (vect_analyze_data_refs_alignment): Likewise.
17597 (vect_analyze_group_access_1): Likewise.
17598 (vect_analyze_group_access): Likewise.
17599 (vect_analyze_data_ref_access): Likewise.
17600 (vect_analyze_data_ref_accesses): Likewise.
17601 (vect_vfa_segment_size): Likewise.
17602 (vect_small_gap_p): Likewise.
17603 (vectorizable_with_step_bound_p): Likewise.
17604 (vect_prune_runtime_alias_test_list): Likewise.
17605 (vect_analyze_data_refs): Likewise.
17606 (vect_supportable_dr_alignment): Likewise.
17607 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17608 (vect_gen_prolog_loop_niters): Likewise.
17609 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17610 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17612 (vect_recog_mask_conversion_pattern): Likewise.
17613 (vect_try_gather_scatter_pattern): Likewise.
17614 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17615 to vect_get_store_cost.
17616 (vect_get_store_cost): Get stmt_info instead of DR.
17617 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17618 (vect_get_load_cost): Get stmt_info instead of DR.
17620 2018-06-01 Richard Biener <rguenther@suse.de>
17622 PR middle-end/86017
17623 * gimple-fold.c (var_decl_component_p): Also allow offsetted
17624 vars wrapped in MEM_REFs.
17626 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17628 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17629 Fix subreg tests so that we only return a choice between
17630 GENERAL_REGS and FP_REGS if the original classes included both.
17632 2018-06-01 Richard Biener <rguenther@suse.de>
17635 * tree-ssa-structalias.c (get_function_part_constraint):
17636 Handle NULL fi->decl.
17637 (find_func_aliases_for_call): Properly handle indirect
17638 fi from direct call.
17639 (find_func_clobbers): Likewise.
17640 (ipa_pta_execute): Likewise.
17641 (create_variable_info_for): For functions that are ifunc_resolver
17642 resolve to a varinfo that contains the result of the resolver call.
17643 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17646 2018-05-31 Michael Collison <michael.collison@arm.com>
17648 * config/aarch64/aarch64.md:
17649 (*fix_to_zero_extenddfdi2): New pattern.
17650 * gcc.target/aarch64/fix_extend1.c: New testcase.
17652 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
17654 PR middle-end/78809
17655 PR middle-end/83026
17656 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17657 and BUILT_IN_STRNCMP_EQ.
17658 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17659 BUILT_IN_STRNCMP_EQ.
17660 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17661 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17662 (gimple_fold_builtin): Likewise.
17663 * tree-ssa-strlen.c (compute_string_length): New function.
17664 (determine_min_obsize): New function.
17665 (handle_builtin_string_cmp): New function to handle calls to
17666 string compare functions.
17667 (strlen_optimize_stmt): Add handling to builtin string compare
17669 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17670 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17671 * tree.c (build_common_builtin_nodes): Add new defines of
17672 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17674 2018-05-31 Jakub Jelinek <jakub@redhat.com>
17677 * bb-reorder.c (pass_partition_blocks::gate): Return false for
17678 functions with naked attribute.
17680 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
17682 * config/i386/sse.md (avx_vec_concat<mode>):
17683 Substitute concat_tg_mode mode attribute with xtg_mode.
17684 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17685 (concat_tg_mode): Remove mode attribute.
17687 2018-05-31 Martin Sebor <msebor@redhat.com>
17690 * calls.c (alloc_max_size): Correct a logic error/typo.
17691 Treat excessive arguments as infinite. Warn for invalid arguments.
17692 * doc/invoke.texi (-Walloc-size-larger-than): Update.
17694 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
17697 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17698 and movx for Haswell.
17700 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
17701 Cesar Philippidis <cesar@codesourcery.com>
17703 PR middle-end/85879
17704 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17705 when emitting error on private/firstprivate reductions.
17706 * omp-low.c (lower_omp_target): Avoid reference-type processing
17707 on pointers for firstprivate clause.
17709 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17711 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17714 * config/aarch64/aarch64-simd.md
17715 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17716 (aarch64_ld1_x3_<mode>): Likewise
17717 (aarch64_st1x2<VALLDIF:mode>): Likewise
17718 (aarch64_st1_x2_<mode>): Likewise
17719 (aarch64_st1x3<VALLDIF:mode>): Likewise
17720 (aarch64_st1_x3_<mode>): Likewise
17721 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17722 (vld1_s8_x3): Likewise.
17723 (vld1_u16_x3): Likewise.
17724 (vld1_s16_x3): Likewise.
17725 (vld1_u32_x3): Likewise.
17726 (vld1_s32_x3): Likewise.
17727 (vld1_u64_x3): Likewise.
17728 (vld1_s64_x3): Likewise.
17729 (vld1_f16_x3): Likewise.
17730 (vld1_f32_x3): Likewise.
17731 (vld1_f64_x3): Likewise.
17732 (vld1_p8_x3): Likewise.
17733 (vld1_p16_x3): Likewise.
17734 (vld1_p64_x3): Likewise.
17735 (vld1q_u8_x3): Likewise.
17736 (vld1q_s8_x3): Likewise.
17737 (vld1q_u16_x3): Likewise.
17738 (vld1q_s16_x3): Likewise.
17739 (vld1q_u32_x3): Likewise.
17740 (vld1q_s32_x3): Likewise.
17741 (vld1q_u64_x3): Likewise.
17742 (vld1q_s64_x3): Likewise.
17743 (vld1q_f16_x3): Likewise.
17744 (vld1q_f32_x3): Likewise.
17745 (vld1q_f64_x3): Likewise.
17746 (vld1q_p8_x3): Likewise.
17747 (vld1q_p16_x3): Likewise.
17748 (vld1q_p64_x3): Likewise.
17749 (vst1_s64_x2): Likewise.
17750 (vst1_u64_x2): Likewise.
17751 (vst1_f64_x2): Likewise.
17752 (vst1_s8_x2): Likewise.
17753 (vst1_p8_x2): Likewise.
17754 (vst1_s16_x2): Likewise.
17755 (vst1_p16_x2): Likewise.
17756 (vst1_s32_x2): Likewise.
17757 (vst1_u8_x2): Likewise.
17758 (vst1_u16_x2): Likewise.
17759 (vst1_u32_x2): Likewise.
17760 (vst1_f16_x2): Likewise.
17761 (vst1_f32_x2): Likewise.
17762 (vst1_p64_x2): Likewise.
17763 (vst1q_s8_x2): Likewise.
17764 (vst1q_p8_x2): Likewise.
17765 (vst1q_s16_x2): Likewise.
17766 (vst1q_p16_x2): Likewise.
17767 (vst1q_s32_x2): Likewise.
17768 (vst1q_s64_x2): Likewise.
17769 (vst1q_u8_x2): Likewise.
17770 (vst1q_u16_x2): Likewise.
17771 (vst1q_u32_x2): Likewise.
17772 (vst1q_u64_x2): Likewise.
17773 (vst1q_f16_x2): Likewise.
17774 (vst1q_f32_x2): Likewise.
17775 (vst1q_f64_x2): Likewise.
17776 (vst1q_p64_x2): Likewise.
17777 (vst1_s64_x3): Likewise.
17778 (vst1_u64_x3): Likewise.
17779 (vst1_f64_x3): Likewise.
17780 (vst1_s8_x3): Likewise.
17781 (vst1_p8_x3): Likewise.
17782 (vst1_s16_x3): Likewise.
17783 (vst1_p16_x3): Likewise.
17784 (vst1_s32_x3): Likewise.
17785 (vst1_u8_x3): Likewise.
17786 (vst1_u16_x3): Likewise.
17787 (vst1_u32_x3): Likewise.
17788 (vst1_f16_x3): Likewise.
17789 (vst1_f32_x3): Likewise.
17790 (vst1_p64_x3): Likewise.
17791 (vst1q_s8_x3): Likewise.
17792 (vst1q_p8_x3): Likewise.
17793 (vst1q_s16_x3): Likewise.
17794 (vst1q_p16_x3): Likewise.
17795 (vst1q_s32_x3): Likewise.
17796 (vst1q_s64_x3): Likewise.
17797 (vst1q_u8_x3): Likewise.
17798 (vst1q_u16_x3): Likewise.
17799 (vst1q_u32_x3): Likewise.
17800 (vst1q_u64_x3): Likewise.
17801 (vst1q_f16_x3): Likewise.
17802 (vst1q_f32_x3): Likewise.
17803 (vst1q_f64_x3): Likewise.
17804 (vst1q_p64_x3): Likewise.
17806 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17808 * config/msp430/msp430.c (msp430_output_labelref): Prepend
17809 user_label_prefix to name.
17811 * tree-core.h: Update comment about the format of NAME string
17812 passed to handler in attribute_spec.
17814 * config/msp430/msp430.md: Remove erroneous subreg expression from
17815 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17816 zero_extend{q,h}isi2.
17818 2018-05-30 Borislav Petkov <bp@suse.de>
17820 * doc/extend.texi: Document some architecture specific
17821 constraints and sort entries.
17823 2018-05-30 Martin Sebor <msebor@redhat.com>
17825 PR middle-end/85369
17826 * builtins.c (expand_builtin_stpcpy_1): New function.
17827 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17828 only if the former succeeds.
17830 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17832 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17835 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17837 * doc/invoke.texi (-flinker-output): Document
17839 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17841 * passes.c (ipa_write_summaries): Only modify statements if body
17843 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17844 incrementally linking.
17845 (ipa_passes): Likewise.
17846 * lto-cgraph.c (lto_output_node): When incrementally linking do not
17847 pass down resolution info.
17848 * common.opt (flag_incremental_link): Update info.
17849 * gcc.c (plugin specs): Turn flinker-output=* to
17850 -plugin-opt=-linker-output-known
17851 * toplev.c (compile_file): Also cut compilation when doing incremental
17853 * flag-types. (enum lto_partition_model): Add
17854 LTO_LINKER_OUTPUT_NOLTOREL.
17855 (invoke.texi): Add -flinker-output docs.
17856 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17857 link same way as WPA; do not stream in dead initializers.
17859 * dwarf2out.c (dwarf2out_die_ref_for_decl,
17860 darf2out_register_external_decl): Support incremental link.
17862 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17864 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17866 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17868 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17869 it down to simple_object_copy_lto_debug_sections.
17870 (run_gcc): Determine incremental LTO link time and configure
17871 lto1 into non-wpa mode, disable renaming of debug sections.
17873 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
17875 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17876 descriptions of various incorrectly documented functions.
17878 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
17881 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17882 address check not strict.
17884 2018-05-30 Richard Biener <rguenther@suse.de>
17886 PR tree-optimization/85964
17887 * tracer.c (better_p): Drop initialized count check, we only
17888 call the function with initialized counts now.
17889 (find_best_successor): Do find a best edge if one
17890 has uninitialized count.
17891 (find_best_predecessor): Likewise. Do BB frequency check only
17892 if count is initialized.
17894 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
17896 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17897 (aarch64_ldrstr_offset_compare): New.
17898 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17899 load/store orderings.
17900 (aarch64_gen_adjusted_ldpstp): Likewise.
17902 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
17904 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17905 Check for subset of GENERAL_REGS and FP_REGS.
17906 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17909 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
17911 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17912 and wi::to_poly_offset. Add the current offset and then check
17913 whether the sum fits, rather than using an unchecked addition of
17914 a checked term. Check for a shwi rather than a uhwi.
17915 * expr.c (get_bit_range): Use tree_to_poly_uint64.
17916 (store_constructor): Use poly_int_tree_p.
17917 (expand_expr_real_1): Likewise.
17918 * function.c (assign_temp): Likewise.
17919 * fold-const.c (const_binop): Use poly_int_tree_p and
17920 wi::to_poly_offset.
17921 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
17923 * ipa-icf-gimple.c (func_checker::compare_operand): Use
17924 to_poly_offset for MEM offsets.
17925 * ipa-icf.c (sem_variable::equals): Likewise.
17926 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17927 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17928 wi::to_poly_offset for BIT_FIELD_REF offsets.
17929 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17930 wi::to_poly_offset.
17931 * var-tracking.c (emit_note_insn_var_location): Use
17932 tree_to_poly_uint64.
17934 2018-05-29 Jim Wilson <jimw@sifive.com>
17936 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17938 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
17941 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17942 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17944 (sse4_1_round<mode>2): Use nonimmediate_operand
17945 for operand 1 predicate.
17947 2018-05-29 Martin Sebor <msebor@redhat.com>
17948 Richard Biener <rguenther@suse.de>
17951 * calls.c (get_size_range): Call determine_value_range instead
17952 of get_value_range..
17953 * tree-vrp.h (determine_value_range): Declared new function.
17954 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17956 2018-05-29 Richard Biener <rguenther@suse.de>
17958 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17959 sure to use non-pattern stmts for get_earlier_stmt arguments.
17960 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17961 called on pattern stmts.
17962 (get_later_stmt): Likewise.
17964 2018-05-29 Martin Liska <mliska@suse.cz>
17966 PR gcov-profile/85759
17967 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17970 2018-05-29 Jakub Jelinek <jakub@redhat.com>
17972 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17974 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17978 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17979 VEC_PACK_FLOAT_EXPR): New tree codes.
17980 * tree-pretty-print.c (op_code_prio): Handle
17981 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17982 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17983 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17984 * tree-inline.c (estimate_operator_cost): Likewise.
17985 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17986 * fold-const.c (const_binop): Likewise.
17987 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17988 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17989 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17990 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17991 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17992 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17993 * expr.c (expand_expr_real_2): Likewise.
17994 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17995 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17996 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17998 * optabs.c (expand_widen_pattern_expr): For
17999 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
18000 sign from result type rather than operand's type.
18001 (expand_binop_directly): For vec_packu_float_optab and
18002 vec_packs_float_optab allow result type to be different from operand's
18004 * optabs-tree.c (optab_for_tree_code): Handle
18005 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18006 VEC_PACK_FLOAT_EXPR. Formatting fixes.
18007 * tree-vect-generic.c (expand_vector_operations_1): Handle
18008 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18009 VEC_PACK_FLOAT_EXPR.
18010 * tree-vect-stmts.c (supportable_widening_operation): Handle
18012 (supportable_narrowing_operation): Handle FLOAT_EXPR.
18013 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
18014 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
18015 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
18016 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
18018 (vec_pack<floatprefix>_float_<mode>): New expander.
18019 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
18021 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
18022 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
18023 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
18024 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
18025 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
18027 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
18028 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
18029 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18030 VEC_PACK_FLOAT_EXPR): Document.
18032 2018-05-29 Richard Biener <rguenther@suse.de>
18034 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
18036 (stmt_vec_info_vec): Make pointer.
18037 (init_stmt_vec_info_vec): Remove.
18038 (free_stmt_vec_info_vec): Likewise.
18039 (set_stmt_vec_info_vec): New function.
18040 (free_stmt_vec_infos): Likewise.
18041 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
18042 (set_vinfo_for_stmt): Likewise.
18043 (get_earlier_stmt): Likewise.
18044 (get_later_stmt): Likewise.
18045 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
18046 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
18047 (vec_info::~vec_info): Free stmt_vec_infos.
18048 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
18049 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
18050 (pass_slp_vectorize::execute): Likewise.
18051 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
18052 (free_stmt_vec_info_vec): Likewise.
18053 (set_stmt_vec_info_vec): New function.
18054 (free_stmt_vec_infos): Likewise.
18055 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
18056 the global stmt_vec_info_vec.
18057 * tree-parloops.c (gather_scalar_reductions): Use
18058 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
18061 2018-05-29 Richard Biener <rguenther@suse.de>
18063 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
18065 2018-05-29 Martin Liska <mliska@suse.cz>
18066 David Malcolm <dmalcolm@redhat.com>
18068 * vec.c (test_reverse): New.
18069 (vec_c_tests): Add new test.
18070 * vec.h (vl_ptr>::reverse): New function.
18072 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
18074 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
18076 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
18079 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
18081 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
18083 2018-05-28 Richard Biener <rguenther@suse.de>
18085 PR tree-optimization/85933
18086 * tree-vect-data-refs.c (vect_record_base_alignments): Only
18087 look at stmts marked as vectorizable.
18089 2018-05-28 Richard Biener <rguenther@suse.de>
18091 PR tree-optimization/85934
18092 * tree-vect-generic.c (expand_vector_operations_1): Hoist
18093 vector boolean check before scalar optimization.
18095 2018-05-28 Jakub Jelinek <jakub@redhat.com>
18097 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
18100 2018-05-28 Mark Wielaard <mark@klomp.org>
18102 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
18103 if it is an expression containing a minus sign.
18105 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
18107 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
18109 2018-05-27 Paul Koning <ni1d@arrl.net>
18111 * config/pdp11/pdp11.md (truncsihi2): Remove.
18113 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
18114 Chung-Ju Wu <jasonwucj@gmail.com>
18116 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
18118 (unaligned_store_dw): Ditto.
18119 * config/nds32/nds32-memory-manipulation.c
18120 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
18121 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
18122 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
18123 (emit_setmem_word_loop): Rename to ...
18124 (emit_setmem_doubleword_loop): ... this.
18125 (nds32_gen_dup_4_byte_to_word_value): New function.
18126 (nds32_gen_dup_8_byte_to_double_word_value): New function.
18127 (nds32_expand_setmem_loop): Refine implementation.
18128 (nds32_expand_setmem_loop_v3m): Ditto.
18129 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18132 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18134 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
18136 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18138 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
18139 (nds32_init_machine_status): Initialize machine->attr_naked_p and
18140 machine->attr_no_prologue_p.
18141 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
18142 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
18143 (nds32_expand_epilogue): Consider attr_naked_p.
18144 (nds32_expand_epilogue_v3pop): Likewise.
18145 (nds32_can_use_return_insn): Likewise.
18146 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
18147 attr_no_prologue_p fields.
18148 * config/nds32/nds32.opt (mret-in-naked-func): New option.
18150 2018-05-27 Jakub Jelinek <jakub@redhat.com>
18153 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
18155 * config/i386/sse.md
18156 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
18158 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
18160 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
18162 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
18164 (*<floatsuffix>floatv2div2sf2): Rename to ...
18165 (*float<floatunssuffix>v2div2sf2): ... this.
18166 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
18167 (float<floatunssuffix>v2div2sf2_mask): ... this.
18168 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18169 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18170 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18172 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18174 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18176 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18178 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18180 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18182 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18183 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18184 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18185 gen_ufix_truncv8dfv8si2.
18186 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18187 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18188 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18189 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18190 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18191 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18192 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18193 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18195 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18199 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18201 2018-05-25 Jim Wilson <jimw@sifive.com>
18203 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18204 * config/riscv/riscv.c (struct machine_function): Add
18205 interrupt_handler_p and attribute_checked_p fields.
18206 (riscv_attribute_table): Add interrupt.
18207 (riscv_interrupt_type_p): New.
18208 (riscv_save_reg_p): Save extra regs for interrupt handler.
18209 (riscv_use_save_libcall): Return false for interrupt handler.
18210 (riscv_first_stack_step): Add forward declaration.
18211 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
18212 for interrupt handler with large frame. Use it for saved reg list.
18213 (riscv_expand_prologue): Move flag_stack_usage_info support to
18214 eliminate duplication.
18215 (riscv_expand_epilogue): Generate mret for interrupt handler.
18216 (riscv_epilogue_uses): New.
18217 (riscv_can_use_return_insn): Return false for interrupt handler.
18218 (riscv_function_ok_for_sibcall): Likewise.
18219 (riscv_set_current_function): Add interrupt handler support.
18220 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18221 * config/riscv/riscv.md (UNSPECV_MRET): New.
18223 (riscv_frflags, riscv_fsflags): Use tab after opcode.
18225 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18227 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
18229 PR tree-optimization/85712
18230 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18231 this candidate has already been replaced in-situ by a copy.
18233 2018-05-25 Jason Merrill <jason@redhat.com>
18235 PR c++/80485 - inline function non-zero address.
18236 * symtab.c (nonzero_address): Check DECL_COMDAT.
18238 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
18241 * config/alpha/alpha.md (ashlsi3): New insn pattern.
18242 (*ashlsi_se): Rename from *ashldi_se. Define as sign
18243 extension of SImode operation. Use const123_operand predicate.
18244 (*saddsi_1): Remove.
18245 (*saddl_se_1): Ditto.
18246 (*ssubsi_1): Ditto.
18247 (*ssubl_se_1): Ditto.
18248 * config/alpha/predicates.md (const123_operand): New predicate.
18249 * config/alpha/constraints.md (P): Use IN_RANGE.
18251 2018-05-25 Richard Biener <rguenther@suse.de>
18253 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18255 (ref_maybe_used_by_stmt_p): Likewise.
18256 (stmt_may_clobber_ref_p): Likewise.
18257 (stmt_may_clobber_ref_p_1): Likewise.
18258 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18260 (ref_maybe_used_by_stmt_p): Likewise.
18261 (stmt_may_clobber_ref_p): Likewise.
18262 (stmt_may_clobber_ref_p_1): Likewise.
18263 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18264 the alias oracle to disambiguate DRs with stmts DR analysis
18266 (vect_analyze_data_refs): Do not give up on not analyzable
18267 DRs for BB vectorization. Remove code truncating the dataref
18270 2018-05-25 Jakub Jelinek <jakub@redhat.com>
18273 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18274 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
18275 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18277 2018-05-25 Richard Biener <rguenther@suse.de>
18279 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18280 function, combining stmt data ref gathering and fatal analysis
18282 (vect_analyze_data_refs): Remove now redudnant code and simplify.
18283 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18284 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18285 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18286 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18288 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18290 PR tree-optimization/85720
18291 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18292 SCC if all partitions are builtins.
18293 (version_loop_by_alias_check): New parameter. Generate cancelable
18294 runtime alias check if all partitions are builtins.
18295 (distribute_loop): Update call to above function.
18297 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18299 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18300 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18301 (parm_default_def_partition_arg): Ditto.
18302 (set_parm_default_def_partition): Ditto.
18303 (get_parm_default_def_partitions): Ditto and make it static.
18304 (get_undefined_value_partitions): Ditto and make it static.
18305 (remove_ssa_form): Refactor call to init_var_map here.
18306 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18307 computation for loop region.
18308 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18309 (register_default_def): Delete.
18310 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18311 (parm_default_def_partition_arg): Ditto.
18312 (set_parm_default_def_partition): Ditto.
18313 (get_parm_default_def_partitions): Ditto and make it static.
18314 (get_undefined_value_partitions): Ditto and make it static.
18315 (coalesce_with_default, coalesce_with_default): Update comment.
18316 (create_coalesce_list_for_region): New func factored out from
18317 create_outofssa_var_map.
18318 (populate_coalesce_list_for_outofssa): New func factored out from
18319 create_outofssa_var_map and coalesce_ssa_name.
18320 (create_outofssa_var_map): Delete.
18321 (coalesce_ssa_name): Refactor to support live range computation.
18322 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18323 (get_parm_default_def_partitions): Delete.
18324 (get_undefined_value_partitions): Ditto.
18325 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18326 computation for loop region.
18327 (new_tree_live_info, loe_visit_block): Ditto.
18328 (live_worklist, set_var_live_on_entry): Ditto.
18329 (calculate_live_on_exit, verify_live_on_entry): Ditto.
18330 * tree-ssa-live.h (struct _var_map): New fields.
18331 (init_var_map): Change decl.
18332 (region_contains_p): New.
18334 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18336 * tree-ssa-live.h (live_merge_and_clear): Delete.
18338 2018-05-25 Richard Biener <rguenther@suse.de>
18341 * tree-dump.c (dequeue_and_dump): Remove access to removed
18342 operand 2 of a SWITCH_EXPR.
18344 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18346 * doc/sourcebuild.texi (vect_double_cond_arith): Include
18347 multiplication and division.
18348 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18349 (cond_udiv@var{m}, cond_umod@var{m}): Document.
18350 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18351 (cond_udiv_optab, cond_umod_optab): New optabs.
18352 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18353 (IFN_COND_RDIV): New internal functions.
18354 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18355 TRUNC_MOD_EXPR and RDIV_EXPR.
18356 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18357 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18359 (SVE_INT_BINARY): Include mult.
18360 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18361 (optab, sve_int_op): Handle mult.
18362 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18364 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18365 for SVE_INT_BINARY_SD.
18367 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18369 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18370 (optab, sve_int_op): Handle div and udiv.
18371 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18372 for SVE_INT_BINARY_SD.
18373 (*<optab><mode>3): New insn for the same.
18375 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18377 * tree-vect-patterns.c: Include predict.h.
18378 (vect_recog_divmod_pattern): Restrict check for division support
18379 to when optimizing for size.
18381 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18383 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18384 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18385 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18386 (gimple_match_op::set_op): Likewise.
18387 (gimple_resimplify4): Declare.
18388 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18389 (expr::gen_transform): Likewise.
18390 (decision_tree::gen): Generate a simplification routine for 4 operands.
18391 * gimple-match-head.c (gimple_simplify): Add an overload for
18392 4 operands. In the top-level function, handle up to 4 call
18393 arguments and call gimple_resimplify4.
18394 (gimple_resimplify4): New function.
18395 (build_call_internal): Pass a fourth operand.
18396 (maybe_push_to_seq): Likewise.
18397 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18398 Fold VEC_COND_EXPRs of an operation and a default value into
18399 an IFN_COND_* function if possible.
18400 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18402 (SVE_COND_FP_BINARY): Include them.
18403 (optab, sve_fp_op): Handle them.
18404 (SVE_INT_BINARY_REV): New code iterator.
18405 (SVE_COND_FP_BINARY_REV): New int iterator.
18406 (commutative): New int attribute.
18407 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18409 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18411 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18412 (*cond_<optab><mode>): New patterns for reversed operands.
18414 2018-05-25 Richard Biener <rguenther@suse.de>
18416 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18417 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18418 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18419 (STMT_VINFO_GROUPED_ACCESS): Adjust.
18420 * tree-vect-data-refs.c (everywhere): Adjust users.
18421 * tree-vect-loop.c (everywhere): Likewise.
18422 * tree-vect-slp.c (everywhere): Likewise.
18423 * tree-vect-stmts.c (everywhere): Likewise.
18424 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18426 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18428 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18430 (gcc_cv_as_section_exclude): ... this.
18431 Try Solaris as #exclude syntax.
18432 * configure: Regenerate.
18433 * config.in: Regenerate.
18434 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18436 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18437 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18439 * varasm.c (default_elf_asm_named_section): Don't check if
18440 HAVE_GAS_SECTION_EXCLUDE is defined.
18442 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18444 * doc/md.texi: Update the documentation of the cond_* optabs
18445 to mention the new final operand. Fix GET_MODE_NUNITS call.
18446 Describe the scalar case too.
18447 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18448 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18450 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18451 (get_conditional_internal_fn): Update comment.
18452 * tree-vect-loop.c (vectorizable_reduction): Pass the original
18453 accumulator value as a final argument to conditional functions.
18454 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18455 a define_expand and add an "else" operand. Assert for now that
18456 the else operand is equal to operand 2. Use SVE_INT_BINARY and
18457 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18458 (*cond_<optab><mode>): New patterns.
18459 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18460 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18461 (UNSPEC_COND_EOR): Delete.
18462 (optab): Remove associated mappings.
18463 (SVE_INT_BINARY): New code iterator.
18464 (sve_int_op): Remove int attribute and add "minus" to the code
18466 (SVE_COND_INT_OP): Delete.
18467 (SVE_COND_FP_OP): Rename to...
18468 (SVE_COND_FP_BINARY): ...this.
18470 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18472 * optabs.c (can_reuse_operands_p): New function.
18473 (maybe_legitimize_operands): Try to reuse the results for
18476 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18478 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18479 Add {q} suffix to insn mnemonic.
18481 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18483 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18484 (msp430_warn_func_return): New.
18486 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18488 * fold-const.c (tree_nonzero_bits): New function.
18489 * fold-const.h (tree_nonzero_bits): Likewise.
18490 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18491 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18493 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18497 * varasm.c (assemble_alias): Check ifunc_resolver only on
18500 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18503 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18504 when memory input operand is handled.
18506 2018-05-24 Luis Machado <luis.machado@linaro.org>
18508 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18510 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18512 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18514 * match.pd: Delay FMA folds until after vectorization.
18516 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18519 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18520 address check not strict.
18522 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18524 * gimple-match.h (gimple_match_op): New class.
18525 (mprts_hook): Replace parameters with a gimple_match_op *.
18526 (maybe_build_generic_op): Likewise.
18527 (gimple_simplified_result_is_gimple_val): Replace parameters with
18528 a const gimple_match_op *.
18529 (gimple_simplify): Replace code_helper * and tree * parameters with
18530 a gimple_match_op * parameter.
18531 (gimple_resimplify1): Replace code_helper *, tree and tree *
18532 parameters with a gimple_match_op * parameter.
18533 (gimple_resimplify2): Likewise.
18534 (gimple_resimplify3): Likewise.
18535 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18536 parameters with a gimple_match_op * parameter.
18537 * gimple-match-head.c (gimple_simplify): Change prototypes of
18538 auto-generated functions to take a gimple_match_op * instead of
18539 separate code_helper * and tree * parameters. Make the same
18540 change in the top-level overload and update calls to the
18541 gimple_resimplify routines. Update calls to the auto-generated
18542 functions and to maybe_push_res_to_seq in the publicly-facing
18543 operation-specific gimple_simplify overloads.
18544 (gimple_match_op::MAX_NUM_OPS): Define.
18545 (gimple_resimplify1): Replace rcode and ops with a single res_op
18546 parameter. Update call to gimple_simplify.
18547 (gimple_resimplify2): Likewise.
18548 (gimple_resimplify3): Likewise.
18549 (mprts_hook): Replace parameters with a gimple_match_op *.
18550 (maybe_build_generic_op): Likewise.
18551 (build_call_internal): Replace type, nargs and ops with
18552 a gimple_match_op *.
18553 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18554 with a single gimple_match_op *. Update calls to mprts_hook,
18555 build_call_internal and gimple_simplified_result_is_gimple_val.
18556 Factor out code that is common to the tree_code and combined_fn cases.
18557 * genmatch.c (expr::gen_transform): Replace tem_code and
18558 tem_ops with a gimple_match_op called tem_op. Update calls
18559 to the gimple_resimplify functions and maybe_push_res_to_seq.
18560 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18561 res_ops. Update call to the gimple_resimplify functions.
18562 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18563 (decision_tree::gen): Make the functions take a gimple_match_op *
18564 called res_op instead of separate res_code and res_ops parameters.
18565 Update call accordingly.
18566 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18567 and ops with a single res_op parameter. Update calls to
18568 maybe_build_generic_op and maybe_push_res_to_seq.
18569 (fold_stmt_1): Update calls to gimple_simplify and
18570 replace_stmt_with_simplification.
18571 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18572 and gimple_simplified_result_is_gimple_val.
18573 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18575 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18576 with a gimple_match_op *.
18577 (vn_nary_build_or_lookup): Likewise. Update call to
18578 vn_nary_build_or_lookup_1.
18579 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18580 gimple_match_op *. Update calls to the gimple_resimplify routines
18581 and to gimple_simplified_result_is_gimple_val.
18582 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18583 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18584 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18585 (visit_nary_op): Likewise.
18586 (visit_reference_op_load): Likewise.
18588 2018-05-23 Luis Machado <luis.machado@linaro.org>
18590 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18591 modifier for printing the step amount.
18593 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
18596 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18599 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
18601 * doc/sourcebuild.texi (Endianness): New subsubsection.
18603 2018-05-23 Luis Machado <luis.machado@linaro.org>
18605 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18606 <prefetch_dynamic_strides>: New const bool field.
18607 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18608 prefetch_dynamic_strides.
18609 (exynosm1_prefetch_tune): Likewise.
18610 (thunderxt88_prefetch_tune): Likewise.
18611 (thunderx_prefetch_tune): Likewise.
18612 (thunderx2t99_prefetch_tune): Likewise.
18613 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18615 (aarch64_override_options_internal): Update to set
18616 PARAM_PREFETCH_DYNAMIC_STRIDES.
18617 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18618 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18619 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18620 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18621 prefetch-dynamic-strides setting.
18623 2018-05-23 Luis Machado <luis.machado@linaro.org>
18625 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18626 <minimum_stride>: New const int field.
18627 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18628 minimum_stride field defaulting to -1.
18629 (exynosm1_prefetch_tune): Likewise.
18630 (thunderxt88_prefetch_tune): Likewise.
18631 (thunderx_prefetch_tune): Likewise.
18632 (thunderx2t99_prefetch_tune): Likewise.
18633 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18634 <default_opt_level>: Set to 3.
18635 (aarch64_override_options_internal): Update to set
18636 PARAM_PREFETCH_MINIMUM_STRIDE.
18637 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18638 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18639 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18640 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18641 stride is constant and is below the minimum stride threshold.
18643 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18645 * config/arm/arm-cpus.in (mode26): Delete.
18646 (armv4): Delete mode26 reference.
18647 * config/arm/arm.c (arm_configure_build_target): Delete use of
18650 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18652 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18654 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18655 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
18657 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
18658 (floatunsdidf2): Ditto.
18660 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18662 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18663 (fixuns_trunc<mode>si2_avx512f): Ditto.
18664 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18665 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18666 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18668 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18670 PR rtl-optimization/79985
18671 * df-scan.c (df_insn_refs_collect): Remove special case for
18672 global registers and asm statements.
18674 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18676 * extend.texi (Global Register Variables): Rewrite the bullet list.
18677 Note that the register is available for allocation. Note that access
18678 via inline asm must use constraints. Add note about async-signal
18679 handlers. Remove paragraph about automagic register selection.
18681 2018-05-23 Richard Biener <rguenther@suse.de>
18683 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18684 of fixed offset from memset VN.
18686 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
18688 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18689 first_interp field.
18690 (alloc_cand_and_find_basis): Initialize first_interp field.
18691 (slsr_process_mul): Modify first_interp field.
18692 (slsr_process_add): Likewise.
18693 (slsr_process_cast): Modify first_interp field for each new
18695 (slsr_process_copy): Likewise.
18696 (dump_candidate): Dump first_interp field.
18697 (replace_mult_candidate): Process all interpretations, not just
18699 (replace_rhs_if_not_dup): Likewise.
18700 (replace_one_candidate): Likewise.
18702 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
18704 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18706 (aarch64_needs_frame_chain): New function.
18707 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18709 2018-05-23 Sudakshina Das <sudi.das@arm.com>
18712 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18713 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18714 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18715 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18716 as true for strict-align.
18717 (aarch64_can_inline_p): Perform checks even when callee has no
18718 attributes to check for strict alignment.
18719 * doc/extend.texi (AArch64 Function Attributes): Document
18721 * doc/invoke.texi: (AArch64 Options): Likewise.
18723 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
18725 PR tree-optimization/85853
18726 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18727 the handling of the root of the node to...
18728 (vect_slp_analyze_node_operations_1): ...this new function,
18729 and run the whole thing with the child nodes' def types
18730 set according to their SLP node's def type.
18732 2018-05-23 Richard Biener <rguenther@suse.de>
18734 PR middle-end/85874
18735 * tree-data-ref.c (create_runtime_alias_checks): Defer
18736 and ignore overflow warnings.
18738 2018-05-23 Yury Gribov <tetra2005@gmail.com>
18740 PR tree-optimization/85822
18741 * tree-vrp.c (is_masked_range_test): Fix handling of negative
18744 2018-05-23 Richard Biener <rguenther@suse.de>
18746 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18747 memset constants via native_interpret_expr.
18749 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
18752 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18754 (cgraph_node::create_alias): Likewise.
18755 (cgraph_node::get_availability): Check ifunc_resolver instead
18756 of looking up ifunc attribute.
18757 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18758 * varasm.c (do_assemble_alias): Likewise.
18759 (assemble_alias): Likewise.
18760 (default_binds_local_p_3): Likewise.
18761 * cgraph.h (cgraph_node): Add ifunc_resolver.
18762 (cgraph_node::only_called_directly_or_aliased_p): Return false
18763 for IFUNC resolver.
18764 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18766 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18767 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18768 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18769 instead of looking up ifunc attribute.
18771 2018-05-22 Luis Machado <luis.machado@linaro.org>
18773 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18775 2018-05-22 Martin Sebor <msebor@redhat.com>
18777 PR middle-end/85359
18778 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18779 only when expasion succeeds.
18780 (expand_builtin_strcmp): Same.
18781 (expand_builtin_strncmp): Same.
18783 2018-05-22 Martin Sebor <msebor@redhat.com>
18785 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18787 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18788 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18790 * config/aarch64/aarch64-ldpstp.md: Replace uses of
18791 aarch64_mem_pair_operand with memory_operand and delete operand swapping
18793 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18794 Add check for legitimate_address.
18795 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18796 (aarch64_swap_ldrstr_operands): New.
18797 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18800 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18801 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18803 * config/aarch64/aarch64.md: New patterns to generate stp
18805 (store_pair_sw, store_pair_dw): New patterns to generate stp for
18806 single words and double words.
18807 (load_pair_sw, load_pair_dw): Likewise.
18808 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18810 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18812 * config/aarch64/aarch64-ldpstp.md: Modify peephole
18813 for different mode ldpstp and add peephole for merged zero stores.
18814 Likewise for loads.
18815 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18817 (aarch64_gen_store_pair): Rename calls to match new patterns.
18818 (aarch64_gen_load_pair): Rename calls to match new patterns.
18819 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18820 (load_pair<DREG:mode><DREG2:mode>): ... This.
18821 (store_pair<mode>): Rename to...
18822 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18823 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18824 New mode iterators.
18825 (V_INT_EQUIV): Handle SImode.
18826 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18829 2018-05-22 Martin Sebor <msebor@redhat.com>
18832 * calls.c (maybe_warn_nonstring_arg): Use string length to set
18833 or ajust the presumed bound on an operation to avoid unnecessary
18836 2018-05-22 Martin Sebor <msebor@redhat.com>
18838 PR tree-optimization/85826
18839 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18840 assuming that a DECL necesarily has a constant size.
18842 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
18844 PR middle-end/85862
18845 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18847 2018-05-22 Richard Biener <rguenther@suse.de>
18849 PR tree-optimization/85834
18850 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18851 non-constant and non-zero memset arguments.
18853 2018-05-22 Martin Liska <mliska@suse.cz>
18856 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18858 2018-05-22 Richard Biener <rguenther@suse.de>
18860 PR tree-optimization/85863
18861 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18862 comparisons when vectype is specified.
18863 (vectorizable_condition): Do not specify vectype for
18864 vect_is_simple_cond when SLP vectorizing.
18866 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
18869 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18870 define __ibm128 as long double.
18871 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18872 as a distinct type when IEEE 128-bit support is enabled.
18873 (init_float128_ieee): Fix up conversions between IFmode and IEEE
18874 128-bit types to use the correct functions.
18875 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18876 convert between 128-bit floating point types that have different
18877 modes but the same representation, instead of using gen_lowpart to
18879 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18881 (IFKF_reg): New attributes to give the register constraints for
18883 (extend<mode>tf2_internal): New insns to mark an explicit
18884 conversion between 128-bit floating point types that have a
18885 different mode but share the same representation.
18887 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
18889 PR tree-optimization/85814
18890 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18891 a null return from get_strinfo when unsharing the next
18892 strinfo in the chain.
18894 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18897 * varasm.c (weak_finish): Clean up weak_decls.
18899 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18901 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18902 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18903 UNSPEC_UADALP values.
18904 * config/aarch64/iterators.md (ABAL): New int iterator.
18907 (sur): Add mappings for the above.
18908 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18910 (aarch64_<sur>abal<mode>_4): Likewise.
18911 (aarch64_<sur>adalp<mode>_3): Likewise.
18912 (<sur>sadv16qi): New define_expand.
18914 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
18916 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18917 (*movdf_internal): Ditto.
18918 (*rcpsf2_sse): Ditto.
18919 (*rsqrtsf2_sse): Ditto.
18920 (*sqrt<mode>2_sse): Ditto.
18922 2018-05-21 Tamar Christina <tamar.christina@arm.com>
18924 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18926 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18927 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18928 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18929 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18931 * config/aarch64/arm_neon.h: Likewise.
18932 * config/aarch64/iterators.md (VQ_I): New.
18934 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
18936 * config.gcc: Add arc/t-multilib-linux to tmake_file for
18938 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18941 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18943 * config/nds32/constraints.md (S): New constraint.
18944 * config/nds32/nds32.md (call_internal): Use constraint S.
18945 (call_value_internal): Likewise.
18946 (sibcall_internal): Likewise.
18947 (sibcall_value_internal): Likewise.
18949 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18950 Chung-Ju Wu <jasonwucj@gmail.com>
18952 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18953 into consideration.
18955 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18956 Chung-Ju Wu <jasonwucj@gmail.com>
18958 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18959 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18960 (nds32_rtx_costs_impl): Simplify.
18961 (nds32_address_cost_impl): Simplify.
18962 (nds32_init_rtx_costs): New function.
18963 (nds32_rtx_costs_speed_prefer): Likewise.
18964 (nds32_rtx_costs_size_prefer): Likewise.
18965 (nds32_address_cost_speed_prefer): Likewise.
18966 (nds32_address_cost_speed_fwprop): Likewise.
18967 (nds32_address_cost_size_prefer): Likewise.
18968 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18969 * config/nds32/nds32.c (nds32_option_override): Use
18970 nds32_init_rtx_costs function.
18972 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18974 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18975 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18976 (TARGET_PIPELINE_N8): Likewise.
18977 (TARGET_PIPELINE_N10): Likewise.
18978 (TARGET_PIPELINE_N13): Likewise.
18979 (TARGET_PIPELINE_GRAYWOLF): Likewise.
18981 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
18983 * config/nds32/nds32-fpu.md: Update copyright year.
18985 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18987 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18989 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18991 * config/nds32/nds32.c
18992 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18993 * config/nds32/nds32.opt (minline-asm-r15): New option.
18995 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18997 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18999 * config/nds32/nds32.md (abssi2): New pattern.
19001 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
19003 * config/i386/i386.md (rex64namesuffix): New mode attribute.
19004 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
19005 Merge insn pattern from sse_cvtsi2ss<round_name> and
19006 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
19007 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
19008 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
19009 using SWI48 mode iterator.
19010 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
19011 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
19012 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
19013 pattern from sse_cvttss2si<round_saeonly_name>
19014 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
19015 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
19016 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
19017 using SWI48 mode iterator.
19018 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
19019 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
19020 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
19021 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
19022 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
19023 using SWI48 mode iterator.
19024 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
19025 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
19026 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
19027 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
19028 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
19029 SWI48 mode iterator.
19030 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
19031 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
19032 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
19033 pattern from sse_cvttsd2si<round_saeonly_name>
19034 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
19036 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19038 * config/nds32/nds32-md-auxiliary.c
19039 (nds32_valid_smw_lwm_base_p): Refine.
19040 (nds32_output_smw_single_word): Refine.
19041 (nds32_output_smw_double_word): New.
19042 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
19044 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19046 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
19047 (nds32_output_stack_pop): Refine.
19048 (nds32_expand_unaligned_load): Refine.
19049 (nds32_expand_unaligned_store): Refine.
19051 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19052 Chung-Ju Wu <jasonwucj@gmail.com>
19054 * config/nds32/constants.md: Add TP_REGNUM constant.
19055 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
19056 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
19058 * config/nds32/nds32-doubleword.md: Consider flag_pic.
19059 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
19060 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
19061 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
19062 and PIC code generation.
19063 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
19065 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
19067 * config/nds32/nds32.md: Support TLS and PIC.
19068 * config/nds32/nds32.c: Support TLS and PIC.
19069 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
19070 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
19073 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19075 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
19076 mode with E_ prefix.
19078 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19079 Chung-Ju Wu <jasonwucj@gmail.com>
19081 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
19082 * config/nds32/nds32-md-auxiliary.c
19083 (symbolic_reference_mentioned_p): New.
19084 (nds32_legitimize_ict_address): New.
19085 (nds32_expand_ict_move): New.
19086 (nds32_indirect_call_referenced_p): New.
19087 (nds32_symbol_binds_local_p): Delete.
19088 (nds32_long_call_p): Modify.
19089 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
19090 * config/nds32/nds32-protos.h
19091 (symbolic_reference_mentioned_p): Declare.
19092 (nds32_legitimize_ict_address): Declare.
19093 (nds32_expand_ict_move): Declare.
19094 (nds32_indirect_call_referenced_p): Declare.
19095 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
19096 (nds32_relax_group): Use nds32_ict_const_p as condition.
19097 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
19098 (nds32_asm_file_start): Output ict_model directive in asm code.
19099 (nds32_legitimate_address_p): Consider indirect call.
19100 (nds32_print_operand): Consider indirect call.
19101 (nds32_print_operand_address): Consider indirect call.
19102 (nds32_insert_attributes): Handle "indirect_call" attribute.
19103 (TARGET_LEGITIMATE_ADDRESS_P): Define.
19104 (TARGET_LEGITIMATE_CONSTANT_P): Define.
19105 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
19106 (TARGET_DELEGITIMIZE_ADDRESS): Define.
19107 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
19108 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
19109 (TARGET_ICT_MODEL_SMALL): Define.
19110 (TARGET_ICT_MODEL_LARGE): Define.
19111 * config/nds32/nds32.md (movsi): Consider ict model.
19112 (call, call_value): Consider ict model.
19113 (sibcall, sibcall_value): Consider ict model.
19114 * config/nds32/nds32.opt (mict-model): New option.
19115 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
19118 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
19119 Monk Chiang <sh.chiang04@gmail.com>
19120 Jim Wilson <jimw@sifive.com>
19122 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
19123 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
19124 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
19125 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
19126 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
19127 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19128 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19129 compute save_libcall_adjustment properly.
19130 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19131 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19132 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19133 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
19134 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
19135 (ABI_SPEC): Handle mabi=ilp32e.
19136 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
19137 (RVE): Add RVE mask.
19138 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
19139 <-march>: Add rv32e as an example.
19141 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
19144 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
19145 (intra_create_variable_infos): Handle C++ constructors.
19147 2018-05-18 Martin Liska <mliska@suse.cz>
19149 * passes.def: Remove a redundant pass.
19151 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
19154 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
19156 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19158 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
19160 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
19162 (armv2, armv2a, armv3, armv3m): Delete architectures.
19163 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
19164 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
19165 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
19167 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19168 (*mulsidi3adddi): Likewise.
19169 (mulsidi3): Likewise.
19170 (*mulsidi3_nov6): Likewise.
19171 (umulsidi3): Likewise.
19172 (umulsidi3_nov6): Likewise.
19173 (umaddsidi4): Likewise.
19174 (*umulsidi3adddi): Likewise.
19175 (smulsi3_highpart): Likewise.
19176 (*smulsi3_highpart_nov6): Likewise.
19177 (umulsi3_highpart): Likewise.
19178 (*umulsi3_highpart_nov6): Likewise.
19179 * config/arm/arm.h (arm_arch3m): Delete.
19180 * config/arm/arm.c (arm_arch3m): Delete.
19181 (arm_option_override_internal): Update armv3-related comment.
19182 (arm_configure_build_target): Delete use of isa_bit_mode32.
19183 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19184 (arm_rtx_costs_internal): Delete check of arm_arch3m.
19185 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19186 (mulsa3): Likewise.
19187 (mulusa3): Likewise.
19188 * config/arm/arm-protos.h (arm_arch3m): Delete.
19189 * config/arm/arm-tables.opt: Regenerate.
19190 * config/arm/arm-tune.md: Likewise.
19191 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19192 deleted architectures.
19194 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19196 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19197 (armv5t, armv5te): New features.
19198 (ARMv5, ARMv5e): Delete fgroups.
19199 (ARMv5t, ARMv5te): Adjust for above changes.
19200 (ARMv6m): Likewise.
19201 (armv5, armv5e): Delete arches.
19202 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19204 (*call_reg_arm): Likewise.
19205 (*call_value_reg_armv5): Likewise.
19206 (*call_value_reg_arm): Likewise.
19207 (*call_symbol): Likewise.
19208 (*call_value_symbol): Likewise.
19209 (*sibcall_insn): Likewise.
19210 (*sibcall_value_insn): Likewise.
19211 (clzsi2): Likewise.
19212 (prefetch): Likewise.
19213 (define_split and define_peephole2 dependent on arm_arch5):
19215 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19217 (TARGET_ARM_QBIT): Likewise.
19218 (TARGET_DSP_MULTIPLY): Likewise.
19219 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19220 (arm_arch5, arm_arch5e): Delete.
19221 (arm_arch5t, arm_arch5te): Declare.
19222 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19223 (arm_arch5t): Declare.
19224 (arm_option_reconfigure_globals): Update for the above.
19225 (arm_options_perform_arch_sanity_checks): Update comment, replace
19226 use of arm_arch5 with arm_arch5t.
19227 (use_return_insn): Likewise.
19228 (arm_emit_call_insn): Likewise.
19229 (output_return_instruction): Likewise.
19230 (arm_final_prescan_insn): Likewise.
19231 (arm_coproc_builtin_available): Likewise.
19232 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19233 arm_arch5e with arm_arch5t and arm_arch5te.
19234 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19235 (arm_arch5t, arm_arch5te): Declare.
19236 * config/arm/arm-tables.opt: Regenerate.
19237 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19238 * config/arm/t-multilib: Likewise.
19239 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19240 instead of arm_arch5.
19241 (*call_reg_thumb1): Likewise.
19242 (*call_value_reg_thumb1_v5): Likewise.
19243 (*call_value_reg_thumb1): Likewise.
19244 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19246 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19248 2018-05-18 Martin Liska <mliska@suse.cz>
19250 PR gcov-profile/84846
19251 * doc/gcov.texi: Document -t option of gcov tool.
19253 2018-05-18 Martin Liska <mliska@suse.cz>
19255 PR gcov-profile/84846
19256 * gcov.c (print_usage): Add new -t option.
19257 (process_args): Handle the option.
19258 (generate_results): Use stdout as output when requested by
19261 2018-05-18 Martin Liska <mliska@suse.cz>
19263 PR gcov-profile/84846
19264 * coverage.c (coverage_init): Write PWD to .gcno file.
19265 * doc/gcov.texi: Document how working directory is printed.
19266 * gcov-dump.c (dump_gcov_file): Print PWD.
19267 * gcov.c (output_intermediate_file): Likewise.
19268 (read_graph_file): Read PWD string.
19269 (output_lines): Print PWD.
19271 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19273 PR middle-end/85817
19274 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19275 for retval and return false if all args to phi are zero.
19277 2018-05-18 Richard Biener <rguenther@suse.de>
19279 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19281 (evrp_dom_walker::before_dom_children): Call it.
19283 2018-05-18 Richard Biener <rguenther@suse.de>
19285 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19286 results when processing array refs with variable index.
19288 2018-05-18 Toon Moene <toon@moene.org>
19290 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19291 directly after that of -floop-interchange. Indicate that both
19292 options are enabled by default when specifying -O3.
19294 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19296 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19297 iterator. Delete separate integer-mode vec_set<mode> expander.
19298 (aarch64_simd_vec_setv2di): Delete.
19299 (vec_setv2di): Delete.
19300 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19301 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
19302 the "w, r" alternative.
19304 2018-05-18 Martin Liska <mliska@suse.cz>
19306 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19307 * tree-pass.h (make_pass_lower_switch_O0): New function.
19308 * tree-switch-conversion.c (node_has_low_bound): Remove.
19309 (node_has_high_bound): Likewise.
19310 (node_is_bounded): Likewise.
19311 (class pass_lower_switch): Make it a template type and create
19313 (pass_lower_switch::execute): Add template argument.
19314 (make_pass_lower_switch): New function.
19315 (make_pass_lower_switch_O0): New function.
19316 (do_jump_if_equal): Remove.
19317 (emit_case_nodes): Simplify to just handle all 3 cases and leave
19318 all the hard work to tree optimization passes.
19320 2018-05-18 Martin Liska <mliska@suse.cz>
19322 * dbgcnt.c (limit_low): Renamed from limit.
19323 (limit_high): New variable.
19324 (dbg_cnt_is_enabled): Check for upper limit.
19325 (dbg_cnt): Adjust dumping.
19326 (dbg_cnt_set_limit_by_index): Add new argument for high
19328 (dbg_cnt_set_limit_by_name): Likewise.
19329 (dbg_cnt_process_single_pair): Parse new format.
19330 (dbg_cnt_process_opt): Use strtok.
19331 (dbg_cnt_list_all_counters): Remove 'value' and add
19333 * doc/invoke.texi: Document changes.
19335 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
19337 * doc/sourcebuild.texi (scalar_all_fma): Document.
19338 * tree.def (FMA_EXPR): Delete.
19339 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19340 * internal-fn.c (ternary_direct): New macro.
19341 (expand_ternary_optab_fn): Likewise.
19342 (direct_ternary_optab_supported_p): Likewise.
19343 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19344 * builtins.c (fold_builtin_fma): Delete.
19345 (fold_builtin_3): Don't call it.
19346 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19347 * expr.c (expand_expr_real_2): Likewise.
19348 * fold-const.c (operand_equal_p): Likewise.
19349 (fold_ternary_loc): Likewise.
19350 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19351 * gimple.c (DEFTREECODE): Likewise.
19352 * gimplify.c (gimplify_expr): Likewise.
19353 * optabs-tree.c (optab_for_tree_code): Likewise.
19354 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19355 * tree-eh.c (operation_could_trap_p): Likewise.
19356 (stmt_could_throw_1_p): Likewise.
19357 * tree-inline.c (estimate_operator_cost): Likewise.
19358 * tree-pretty-print.c (dump_generic_node): Likewise.
19359 (op_code_prio): Likewise.
19360 * tree-ssa-loop-im.c (stmt_cost): Likewise.
19361 * tree-ssa-operands.c (get_expr_operands): Likewise.
19362 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19363 * fold-const-call.h (fold_fma): Delete.
19364 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19365 CFN_FNMA and CFN_FNMS.
19366 (fold_fma): Delete.
19367 * genmatch.c (combined_fn): New enum.
19368 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19369 (commutative_op): New function.
19370 (commutate): Use it. Handle more than 2 operands.
19371 (dt_operand::gen_gimple_expr): Use commutative_op.
19372 (parser::parse_expr): Allow :c to be used with non-binary
19373 operators if the commutative operand is known.
19374 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19375 CFN_FMS, CFN_FNMA and CFN_FNMS.
19376 (backprop::process_assign_use): Remove FMA_EXPR handling.
19377 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19378 (gen_hsa_fma): New function.
19379 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19380 IFN_FNMA and IFN_FNMS.
19381 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19382 * gimple-fold.h (follow_all_ssa_edges): Declare.
19383 * gimple-fold.c (follow_all_ssa_edges): New function.
19384 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19385 gimple_build interface and use follow_all_ssa_edges to fold the result.
19386 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19387 instead of checking for optabs directly.
19388 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19389 rather than FMA_EXPRs.
19390 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19391 call to IFN_FMA instead of an FMA_EXPR.
19393 2018-05-17 Jim Wilson <jimw@sifive.com>
19395 * expr.c (do_tablejump): When converting index to Pmode, if we have a
19396 sign extended promoted subreg, and the range does not have the sign bit
19397 set, then do a sign extend.
19399 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19400 test, check for sign extended subreg and/or constant operands, and
19401 do a sign extend in that case.
19403 2018-05-17 Steve Ellcey <sellcey@cavium.com>
19405 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19406 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19408 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19409 Change logics_shift_reg to logics_shift_imm.
19410 (thunderx2t99_fp_loadpair_basic): Delete.
19411 (thunderx2t99_fp_storepair_basic): Delete.
19412 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19413 (thunderx2t99_asimd_polynomial): Delete.
19414 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19415 and neon_fp_mul_d_scalar_q.
19416 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19417 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19418 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19419 (thunderx2t99_asimd_lut): Add missing tbl types.
19420 (thunderx2t99_asimd_ext): Delete.
19421 (thunderx2t99_asimd_load1_1_mult): Delete.
19422 (thunderx2t99_asimd_load1_2_mult): Delete.
19423 (thunderx2t99_asimd_load1_ldp): New.
19424 (thunderx2t99_asimd_load1): New.
19425 (thunderx2t99_asimd_load2): Add missing *load2* types.
19426 (thunderx2t99_asimd_load3): New.
19427 (thunderx2t99_asimd_load4): New.
19428 (thunderx2t99_asimd_store1_1_mult): Delete.
19429 (thunderx2t99_asimd_store1_2_mult): Delete.
19430 (thunderx2t99_asimd_store2_mult): Delete.
19431 (thunderx2t99_asimd_store2_onelane): Delete.
19432 (thunderx2t99_asimd_store_stp): New.
19433 (thunderx2t99_asimd_store1): New.
19434 (thunderx2t99_asimd_store2): New.
19435 (thunderx2t99_asimd_store3): New.
19436 (thunderx2t99_asimd_store4): New.
19438 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
19440 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19441 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
19443 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
19444 Segher Boessenkool <segher@kernel.crashing.org>
19447 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19450 2018-05-17 Richard Biener <rguenther@suse.de>
19452 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19453 for pruning loop and prune defs feeding only already visited PHIs.
19455 2018-05-17 Richard Biener <rguenther@suse.de>
19457 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19459 2018-05-17 Bin Cheng <bin.cheng@arm.com>
19460 Richard Biener <rguenther@suse.de>
19462 PR tree-optimization/85793
19463 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19464 for VMAT_ELEMENTWISE.
19466 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19468 * internal-fn.h (lookup_internal_fn): Declare
19469 * internal-fn.c (lookup_internal_fn): New function.
19470 * gimple.c (gimple_build_call_from_tree): Handle calls to
19471 internal functions.
19472 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19473 internal function names.
19474 * tree-pretty-print.c (dump_generic_node): Likewise.
19475 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19477 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19479 * gimple-fold.h (gimple_build): Make the function forms take
19480 combined_fn rather than built_in_function.
19481 (gimple_simplify): Likewise.
19482 * gimple-match-head.c (gimple_simplify): Likewise.
19483 * gimple-fold.c (gimple_build): Likewise.
19484 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19485 rather than gimple_build_call_internal.
19486 (get_initial_defs_for_reduction): Likewise.
19487 (vect_create_epilog_for_reduction): Likewise.
19488 (vectorizable_live_operation): Likewise.
19490 2018-05-17 Martin Liska <mliska@suse.cz>
19492 * gimple-ssa-sprintf.c (format_directive): Do not use
19493 space in between 'G_' and '('.
19495 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19498 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19499 even if the mask is not all ones.
19502 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19504 (ix86_gimple_fold_builtin): Likewise.
19507 * config/i386/i386.c: Include tree-vector-builder.h.
19508 (ix86_vector_shift_count): New function.
19509 (ix86_fold_builtin): Fold shift builtins by scalar count.
19510 (ix86_gimple_fold_builtin): Likewise.
19512 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19513 _mm512_setzero): New intrinsics.
19515 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19516 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19518 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19519 code generation for cases where splatting a value is not useful.
19520 * simplify-rtx.c (simplify_ternary_operation): Simplify
19521 vec_merge across a vec_duplicate and a paradoxical subreg forming
19522 a vector mode to a vec_concat.
19524 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19526 * config.gcc: Support "goldmont-plus".
19527 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19529 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19530 PROCESSOR_GOLDMONT_PLUS.
19531 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19532 (processor_target_table): Add "goldmont-plus".
19533 (PTA_GOLDMONT_PLUS): Define.
19534 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19535 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19536 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19537 (fold_builtin_cpu): Add "goldmont-plus".
19538 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19539 (ix86_option_override_internal): Add "goldmont-plus".
19540 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19541 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19542 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19543 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19545 2018-05-17 Richard Biener <rguenther@suse.de>
19547 PR tree-optimization/85757
19548 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19549 remove defs that only feed that PHI from further processing.
19551 2018-05-16 Jim Wilson <jimw@sifive.com>
19553 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19555 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19557 2018-05-16 Mark Wielaard <mark@klomp.org>
19559 * dwarf2out.c (count_index_strings): New function.
19560 (output_indirect_strings): Call count_index_strings and generate
19561 header for dwarf_version >= 5.
19563 2018-05-16 Mark Wielaard <mark@klomp.org>
19565 * dwarf2out.c (dwarf_FORM): New function.
19566 (set_indirect_string): Use dwarf_FORM.
19567 (reset_indirect_string): Likewise.
19568 (size_of_die): Likewise.
19569 (value_format): Likewise.
19570 (output_die): Likewise.
19571 (add_skeleton_AT_string): Likewise.
19572 (output_macinfo_op): Likewise.
19573 (index_string): Likewise.
19574 (output_index_string_offset): Likewise.
19575 (output_index_string): Likewise.
19576 (count_index_strings): Likewise.
19578 2018-05-16 Carl Love <cel@us.ibm.com>
19580 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19581 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19583 2018-05-16 Martin Jambor <mjambor@suse.cz>
19585 * ipa-prop.c (ipa_free_all_edge_args): Remove.
19586 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19588 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
19590 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19591 (fnma<mode>4): Likewise.
19592 (fms<mode>4): Likewise.
19593 (fnms<mode>4): Likewise.
19594 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19595 (aarch64_fnma<mode>4): Likewise.
19596 (aarch64_fms<mode>4): Likewise.
19597 (aarch64_fnms<mode>4): Likewise.
19598 (aarch64_fnmadd<mode>4): Likewise.
19600 2018-05-16 Jason Merrill <jason@redhat.com>
19602 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
19604 2018-05-16 Richard Biener <rguenther@suse.de>
19606 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19607 (dump_stmt_cost): Declare.
19608 (add_stmt_cost): Dump cost we add.
19609 (add_stmt_costs): New function.
19610 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19611 No longer exported.
19612 (vect_analyze_stmt): Adjust prototype.
19613 (vectorizable_condition): Likewise.
19614 (vectorizable_live_operation): Likewise.
19615 (vectorizable_reduction): Likewise.
19616 (vectorizable_induction): Likewise.
19617 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19618 cost vector to pass to vectorizable_ and record afterwards.
19619 (vect_model_reduction_cost): Take cost vector argument and adjust.
19620 (vect_model_induction_cost): Likewise.
19621 (vectorizable_reduction): Likewise.
19622 (vectorizable_induction): Likewise.
19623 (vectorizable_live_operation): Likewise.
19624 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19625 SLP_TREE_NUMBER_OF_VEC_STMTS.
19626 (vect_analyze_slp_cost_1): Remove.
19627 (vect_analyze_slp_cost): Likewise.
19628 (vect_slp_analyze_node_operations): Take visited args and
19629 a target cost vector. Avoid processing already visited stmt sets.
19630 (vect_slp_analyze_operations): Use a local cost vector to gather
19631 costs and register those of non-discarded instances.
19632 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19633 (vect_schedule_slp_instance): Remove copying of
19634 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
19636 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19637 adding cost. Record cost entry location.
19638 (vect_prologue_cost_for_slp_op): Function to compute cost of
19639 a constant or invariant generated for SLP vect in the prologue,
19640 split out from vect_analyze_slp_cost_1.
19641 (vect_model_simple_cost): Make static. Adjust for SLP costing.
19642 (vect_model_promotion_demotion_cost): Likewise.
19643 (vect_model_store_cost): Likewise, make static.
19644 (vect_model_load_cost): Likewise.
19645 (vectorizable_bswap): Add cost vector arg and adjust.
19646 (vectorizable_call): Likewise.
19647 (vectorizable_simd_clone_call): Likewise.
19648 (vectorizable_conversion): Likewise.
19649 (vectorizable_assignment): Likewise.
19650 (vectorizable_shift): Likewise.
19651 (vectorizable_operation): Likewise.
19652 (vectorizable_store): Likewise.
19653 (vectorizable_load): Likewise.
19654 (vectorizable_condition): Likewise.
19655 (vectorizable_comparison): Likewise.
19656 (can_vectorize_live_stmts): Likewise.
19657 (vect_analyze_stmt): Likewise.
19658 (vect_transform_stmt): Adjust calls to vectorizable_*.
19659 * tree-vectorizer.c: Include gimple-pretty-print.h.
19660 (dump_stmt_cost): New function.
19662 2018-05-16 Richard Biener <rguenther@suse.de>
19664 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19665 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19666 * tree-ssa-dse.c: Include tree-ssa-loop.h.
19667 (check_name): New callback.
19668 (dse_classify_store): Track cycles via a visited bitmap of PHI
19669 defs and simplify handling of in-loop and across loop dead stores
19670 and properly fail for loop-variant refs. Handle byte-tracking with
19671 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19674 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
19676 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19677 (vect_get_mask_type_for_stmt): Likewise.
19678 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19680 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
19681 to determine the statement's vector type and the vector type that
19682 should be used for calculating nunits. Deal with cases in which
19683 the type has to be deferred.
19684 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19685 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19686 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19687 (vect_determine_vf_for_stmt): New functions, split out from...
19688 (vect_determine_vectorization_factor): ...here.
19689 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19690 (vect_get_mask_type_for_stmt): New functions, split out from
19691 vect_determine_vectorization_factor.
19693 2018-05-16 Richard Biener <rguenther@suse.de>
19695 * tree-cfg.c (verify_gimple_assign_ternary): Properly
19696 verify the [VEC_]COND_EXPR embedded comparison.
19698 2018-05-15 Martin Sebor <msebor@redhat.com>
19700 PR tree-optimization/85753
19701 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19702 RECORD_TYPE in addition to ARRAY_TYPE.
19704 2018-05-15 Martin Sebor <msebor@redhat.com>
19706 PR middle-end/85643
19707 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19709 2018-05-15 Richard Biener <rguenther@suse.de>
19711 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19712 add by_clobber_p one. Change algorithm to collect all defs
19713 representing uses we need to walk and try reducing them to
19714 a single one before failing.
19715 (dse_dom_walker::dse_optimize_stmt): Adjust.
19717 2018-05-13 Mark Wielaard <mark@klomp.org>
19719 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19720 (size_of_loc_descr): Likewise.
19721 (output_loc_operands): Likewise.
19722 (output_loc_operands_raw): Likewise.
19723 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19724 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19725 (hash_loc_operands): Likewise.
19726 (compare_loc_operands): Likewise.
19728 2018-05-14 Mark Wielaard <mark@klomp.org>
19730 * dwarf2out.c (count_index_addrs): New function.
19731 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19733 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19735 PR tree-optimization/83648
19736 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19737 return value as malloc candidate.
19739 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19742 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19743 param as true in call to suggest_attribute.
19745 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
19747 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19748 -mreadonly-in-sdata.
19750 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19752 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19754 (aarch64_crypto_aesd_fused): Likewise.
19756 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
19758 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19759 (movsi_aarch64): Likewise.
19760 (load_pairsi): Likewise.
19761 (load_pairdi): Likewise.
19762 (store_pairsi): Likewise.
19763 (store_pairdi): Likewise.
19764 (load_pairsf): Likewise.
19765 (load_pairdf): Likewise.
19766 (store_pairsf): Likewise.
19767 (store_pairdf): Likewise.
19768 (zero_extend): Likewise.
19769 (trunc): Swap alternatives.
19770 (fcvt_target): Add '?' to prefer w over r.
19772 2018-05-14 Jakub Jelinek <jakub@redhat.com>
19775 * config/i386/i386.md: Disallow non-commutative arithmetics in
19776 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19777 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
19778 in the peephole2 before it.
19780 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
19782 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19783 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19784 (ix86_handle_option): Handle -mcldemote.
19785 * config.gcc: New header.
19786 * config/i386/cldemoteintrin.h: New file.
19787 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19788 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19790 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19791 OPTION_MASK_ISA_CLDEMOTE.
19792 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19793 (ix86_valid_target_attribute_inner_p): Ditto.
19794 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19795 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19796 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19797 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19798 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19800 * config/i386/i386.opt: Add -mcldemote.
19801 * config/i386/x86intrin.h: New header.
19802 * doc/invoke.texi: Add -mcldemote.
19804 2018-05-14 Richard Biener <rguenther@suse.de>
19806 * doc/match-and-simplify.texi: Adjust :s documentation.
19808 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
19810 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19811 intended memcpy size.
19812 (REORDER_45): Likewise.
19814 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
19816 * sort.cc: New file.
19817 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19818 * vec.c (qsort_chk): Use gcc_qsort.
19819 * Makefile.in (OBJS-libcommon): Add sort.o.
19820 (build/sort.o): New target. Use it...
19821 (BUILD_RTL): ... here, and...
19822 (build/gencfn-macros): ... here, and...
19823 (build/genmatch): ... here.
19825 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19826 Chung-Ju Wu <jasonwucj@gmail.com>
19828 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19829 * config/nds32/nds32-graywolf.md: New file.
19830 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19831 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19833 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19834 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19835 * config/nds32/nds32.md (pipeline_model): Add graywolf.
19836 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19837 * config/nds32/pipelines.md: Include n15 settings.
19839 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19840 Chung-Ju Wu <jasonwucj@gmail.com>
19842 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19843 * config/nds32/nds32-n13.md: New file.
19844 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19845 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19847 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19848 * config/nds32/nds32.md (pipeline_model): Add n13.
19849 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19850 * config/nds32/pipelines.md: Include n13 settings.
19852 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19853 Chung-Ju Wu <jasonwucj@gmail.com>
19855 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19856 * config/nds32/nds32-n10.md: New file.
19857 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19858 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19860 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19861 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19862 * config/nds32/nds32.md (pipeline_model): Add n10.
19863 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19864 * config/nds32/pipelines.md: Include n10 settings.
19866 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
19867 Kito Cheng <kito.cheng@gmail.com>
19868 Chung-Ju Wu <jasonwucj@gmail.com>
19870 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19871 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19872 Add enum values for DSP extension instructions.
19873 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19875 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19876 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19877 New code iterators.
19878 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19879 * config/nds32/nds32-dspext.md: New file for DSP implementation.
19880 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19881 * config/nds32/nds32-intrinsic.md: Likewise.
19882 * config/nds32/nds32_intrinsic.h: Likewise.
19883 * config/nds32/nds32-md-auxiliary.c: Likewise.
19884 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19885 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19886 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19887 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19888 * config/nds32/nds32-protos.h: New declarations for DSP extension.
19889 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19890 TYPE_DMAC in switch statement.
19891 * config/nds32/nds32.c: New checking and implementation for DSP
19892 extension instructions.
19893 * config/nds32/nds32.h: Likewise.
19894 * config/nds32/nds32.md: Likewise.
19895 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19896 * config/nds32/predicates.md: Implement new predicates for DSP
19899 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19901 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19902 Reformat alternatives and attributes so it is easier to identify
19903 which constraints/attributes go with which instruction.
19904 (mov<mode>_hardfloat32, FMOVE64): Likewise.
19905 (mov<mode>_softfloat32, FMOVE64): Likewise.
19906 (mov<mode>_hardfloat64, FMOVE64): Likewise.
19907 (mov<mode>_softfloat64, FMOVE64): Likewise.
19909 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
19911 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19913 (Basic PowerPC Built-in Functions): The new name of the
19914 subsection previously known as "PowerPC Built-in Functions".
19915 (Basic PowerPC Built-in Functions Available on all Configurations):
19917 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19918 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19919 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19920 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19922 2018-05-11 Martin Jambor <mjambor@suse.cz>
19925 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19928 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19931 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19933 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
19935 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19936 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19937 (ix86_handle_option): Handle -mwaitpkg.
19938 * config.gcc: New header.
19939 * config/i386/cpuid.h (bit_WAITPKG): New bit.
19940 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19941 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19943 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19944 OPTION_MASK_ISA_WAITPKG.
19945 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19946 (ix86_option_override_internal): Add PTA_WAITPKG.
19947 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19948 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19949 IX86_BUILTIN_TPAUSE.
19950 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19951 __builtin_ia32_umwait and __builtin_ia32_tpause.
19952 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19953 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19954 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19955 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19956 UNSPECV_TPAUSE): New.
19957 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19958 * config/i386/i386.opt: Add -mwaitpkg.
19959 * config/i386/waitpkgintrin.h: New file.
19960 * config/i386/x86intrin.h: New header.
19961 * doc/invoke.texi: Add -mwaitpkg.
19963 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19966 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19968 (cortex-m0): Use armv6s-m isa.
19969 (cortex-m0plus): Likewise.
19970 (cortex-m1): Likewise.
19971 (cortex-m0.small-multiply): Likewise.
19972 (cortex-m0plus.small-multiply): Likewise.
19973 (cortex-m1.small-multiply): Likewise.
19975 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
19976 Jakub Jelinek <jakub@redhat.com>
19978 PR tree-optimization/85692
19979 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19980 source permute as well.
19982 2018-05-11 Martin Liska <mliska@suse.cz>
19985 * doc/extend.texi: Document LLVM style format for no_sanitize
19988 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19990 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19991 mode_supports_vsx_dform_quad to mode_supports_dq_form.
19992 (mode_supports_vsx_dform_quad): Likewise.
19993 (mode_supports_vmx_dform): Move these functions to be next to the
19994 other mode_supports functions.
19995 (mode_supports_dq_form): Likewise.
19996 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19997 mode_supports_dq_form.
19998 (reg_offset_addressing_ok_p): Likewise.
19999 (offsettable_ok_by_alignment): Likewise.
20000 (rs6000_legitimate_offset_address_p): Likewise.
20001 (legitimate_lo_sum_address_p): Likewise.
20002 (rs6000_legitimize_address): Likewise.
20003 (rs6000_legitimize_reload_address): Likewise.
20004 (rs6000_secondary_reload_inner): Likewise.
20005 (rs6000_preferred_reload_class): Likewise.
20006 (rs6000_output_move_128bit): Likewise.
20008 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20010 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
20011 Generate SImode target register for null target.
20012 <case IX86_BUILTIN_XGETBV>: Ditto.
20013 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
20014 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
20016 2018-05-10 Carl Love <cel@us.ibm.com>
20018 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20019 dcbtt and dcbtstt if operands[2] is 0.
20021 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20024 * config/i386/sse.md (usadv64qi): New expander.
20026 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
20028 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
20029 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
20030 -maltivec=be support.
20031 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
20032 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
20033 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20034 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
20035 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
20036 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
20037 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
20038 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
20039 altivec_vsumsws): Adjust.
20040 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
20041 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
20042 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
20044 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
20045 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
20046 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
20047 (altivec_lve<VI_char>x): Delete expand.
20048 (*altivec_lve<VI_char>x_internal): Rename to...
20049 (altivec_lve<VI_char>x): ... this.
20050 (altivec_lvxl_<mode>): Delete expand.
20051 (*altivec_lvxl_<mode>_internal): Rename to ...
20052 (altivec_lvxl_<mode>): ... this.
20053 (altivec_stvxl_<mode>): Delete expand.
20054 (*altivec_stvxl_<mode>_internal): Rename to ...
20055 (altivec_stvxl_<mode>): ... this.
20056 (altivec_stve<VI_char>x): Delete expand.
20057 (*altivec_stve<VI_char>x_internal): Rename to ...
20058 (altivec_stve<VI_char>x): ... this.
20059 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
20060 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
20061 reduc_plus_scal_<mode>): Adjust.
20062 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
20064 (rs6000_cpu_cpp_builtins): Adjust.
20065 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
20066 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
20067 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
20068 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
20069 -maltivec=be support.
20070 (rs6000_split_vec_extract_var): Adjust.
20071 (rs6000_split_v4si_init): Adjust.
20072 (swap_selector_for_mode): Delete.
20073 (altivec_expand_lvx_be, altivec_expand_stvx_be,
20074 altivec_expand_stvex_be): Delete.
20075 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
20076 -maltivec=be support.
20077 (rs6000_gimple_fold_builtin): Ditto.
20078 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
20080 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
20081 (TARGET_DIRECT_MOVE_64BIT): Adjust.
20082 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
20083 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
20084 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
20085 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
20086 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
20087 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
20088 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
20089 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
20090 anonymous split): Adjust.
20091 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
20092 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
20094 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
20096 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
20097 when --with-gxx-include-dir is also specified.
20098 * configure: Regenerate.
20100 2018-05-09 Jim Wilson <jimw@sifive.com>
20103 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
20104 * config/riscv/t-withmultilib: New.
20105 * config/riscv/withmultilib.h: New.
20106 * doc/install.texi: Document RISC-V --with-multilib-list support.
20108 2018-05-09 Richard Biener <rguenther@suse.de>
20110 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
20112 (vect_bb_vectorization_profitable_p): Adjust. Compute
20113 actual scalar cost using the cost vector and the add_stmt_cost
20116 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20118 PR rtl-optimization/85645
20119 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
20120 in the REG_CFA_REGISTER note for LR, don't leave it empty.
20122 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20124 PR rtl-optimization/85645
20125 * shrink-wrap.c (spread_components): Return a boolean saying if
20126 anything was changed.
20127 (try_shrink_wrapping_separate): Iterate spread_components until
20128 nothing changes anymore.
20130 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20132 PR rtl-optimization/85645
20133 * regrename.c (build_def_use): Also kill the chains that include the
20134 destination of a REG_CFA_REGISTER note.
20136 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20138 PR rtl-optimization/85645
20139 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
20140 insn that has a REG_CFA_REGISTER note.
20142 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
20144 * cfgexpand.c (expand_clobber): New function.
20145 (expand_gimple_stmt_1): Use it.
20146 * tree-vect-stmts.c (vect_clobber_variable): New function,
20148 (vectorizable_simd_clone_call): ...here.
20149 (vectorizable_store): Emit a clobber either side of an
20150 IFN_STORE_LANES sequence.
20151 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
20153 2018-05-09 Tom de Vries <tom@codesourcery.com>
20156 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
20157 (define_insn "trap_if_false"): Add exit after trap.
20159 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
20161 PR rtl-optimization/85638
20162 * bb-reorder.c: Include common/common-target.h.
20163 (create_forwarder_block): New function extracted from...
20164 (fix_up_crossing_landing_pad): ...here. Rename into...
20165 (dw2_fix_up_crossing_landing_pad): ...this.
20166 (sjlj_fix_up_crossing_landing_pad): New function.
20167 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20168 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20169 from both partitions and exit the loop after one iteration.
20171 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20174 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20176 (Basic PowerPC Built-in Functions): The new name of the
20177 subsection previously known as "PowerPC Built-in Functions".
20178 (Basic PowerPC Built-in Functions Available on all Configurations):
20180 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20182 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20184 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20186 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20189 2018-05-08 Jim Wilson <jimw@sifive.com>
20191 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20192 (LD_EMUL_SUFFIX): New.
20193 (LINK_SPEC): Use it.
20195 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20197 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20199 (Basic PowerPC Built-in Functions): The new name of the
20200 subsection previously known as "PowerPC Built-in Functions".
20201 (Basic PowerPC Built-in Functions Available on all Configurations):
20203 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20205 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20207 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20209 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20212 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20215 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20216 after cmpelim optimization.
20218 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
20220 * config.gcc: Support "goldmont".
20221 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20222 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20223 PROCESSOR_GOLDMONT.
20224 * config/i386/i386.c (m_GOLDMONT): Define.
20225 (processor_target_table): Add "goldmont".
20226 (PTA_GOLDMONT): Define.
20227 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20228 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20229 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20230 (fold_builtin_cpu): Add "goldmont".
20231 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20232 (ix86_option_override_internal): Add "goldmont".
20233 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20234 (processor_type): Add PROCESSOR_GOLDMONT.
20235 * config/i386/i386.md: Add CPU "glm".
20236 * config/i386/glm.md: New file.
20237 * config/i386/x86-tune.def: Add m_GOLDMONT.
20238 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20240 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20243 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20245 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20246 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
20247 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
20250 * config/i386/i386.c (ix86_fold_builtin): Handle
20251 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20254 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20255 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20257 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
20260 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20261 (check_arch): Likewise.
20262 (check_fpu): Return the result rather than printing it.
20263 (end arch): Fix operator precedence.
20264 (end cpu): Likewise.
20265 (END): Print the result from check_fpu.
20267 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20268 Alan Hayward <alan.hayward@arm.com>
20269 David Sherwood <david.sherwood@arm.com>
20271 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20272 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20273 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20274 (*fcmuo<mode>_and): New patterns.
20276 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20278 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20279 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20280 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20281 (cmp_op, sve_imm_con): New code attributes.
20282 (SVE_COND_INT_CMP, imm_con): Delete.
20283 (cmp_op): Remove above unspecs from int attribute.
20284 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20286 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
20287 comparison-specific unspecs.
20288 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20289 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20290 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20291 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20292 (*vec_fcm<cmp_op><mode>): Rename to...
20293 (*fcm<cmp_op><mode>): ...this and adjust likewise.
20294 (*vec_fcmuo<mode>): Rename to...
20295 (*fcmuo<mode>): ...this and adjust likewise.
20296 (*pred_fcm<cmp_op><mode>): New pattern.
20297 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20298 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20300 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20302 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20303 (aarch64_emit_sve_predicated_cond): New function.
20304 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20305 (aarch64_emit_unspec_cond_or): Replace with...
20306 (aarch64_emit_sve_or_conds): ...this new function. Use
20307 aarch64_emit_sve_ptrue_op for the individual comparisons and
20308 aarch64_emit_binop to OR them together.
20309 (aarch64_emit_inverted_unspec_cond): Replace with...
20310 (aarch64_emit_sve_inverted_cond): ...this new function. Use
20311 aarch64_emit_sve_ptrue_op for the comparison and
20312 aarch64_emit_unop to invert the result.
20313 (aarch64_expand_sve_vec_cmp_float): Update after the above
20314 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
20316 2018-05-07 Nathan Sidwell <nathan@acm.org>
20318 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20319 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20320 (Backwards Compatibility): Likewise.
20322 2018-05-07 Luis Machado <luis.machado@linaro.org>
20326 2018-05-07 Luis Machado <luis.machado@linaro.org>
20328 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20329 <prefetch_dynamic_strides>: New const bool field.
20330 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20331 prefetch_dynamic_strides.
20332 (exynosm1_prefetch_tune): Likewise.
20333 (thunderxt88_prefetch_tune): Likewise.
20334 (thunderx_prefetch_tune): Likewise.
20335 (thunderx2t99_prefetch_tune): Likewise.
20336 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20338 (aarch64_override_options_internal): Update to set
20339 PARAM_PREFETCH_DYNAMIC_STRIDES.
20340 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20341 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20342 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20343 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20344 prefetch-dynamic-strides setting.
20346 2018-05-07 Luis Machado <luis.machado@linaro.org>
20348 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20349 <minimum_stride>: New const int field.
20350 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20351 minimum_stride field.
20352 (exynosm1_prefetch_tune): Likewise.
20353 (thunderxt88_prefetch_tune): Likewise.
20354 (thunderx_prefetch_tune): Likewise.
20355 (thunderx2t99_prefetch_tune): Likewise.
20356 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20357 (aarch64_override_options_internal): Update to set
20358 PARAM_PREFETCH_MINIMUM_STRIDE.
20359 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20360 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20361 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20362 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20363 stride is constant and is below the minimum stride threshold.
20365 2018-05-07 Luis Machado <luis.machado@linaro.org>
20367 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20370 2018-05-07 Luis Machado <luis.machado@linaro.org>
20372 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20373 <prefetch_dynamic_strides>: New const bool field.
20374 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20375 prefetch_dynamic_strides.
20376 (exynosm1_prefetch_tune): Likewise.
20377 (thunderxt88_prefetch_tune): Likewise.
20378 (thunderx_prefetch_tune): Likewise.
20379 (thunderx2t99_prefetch_tune): Likewise.
20380 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20382 (aarch64_override_options_internal): Update to set
20383 PARAM_PREFETCH_DYNAMIC_STRIDES.
20384 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20385 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20386 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20387 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20388 prefetch-dynamic-strides setting.
20390 2018-05-07 Luis Machado <luis.machado@linaro.org>
20392 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20393 <minimum_stride>: New const int field.
20394 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20395 minimum_stride field.
20396 (exynosm1_prefetch_tune): Likewise.
20397 (thunderxt88_prefetch_tune): Likewise.
20398 (thunderx_prefetch_tune): Likewise.
20399 (thunderx2t99_prefetch_tune): Likewise.
20400 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20401 (aarch64_override_options_internal): Update to set
20402 PARAM_PREFETCH_MINIMUM_STRIDE.
20403 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20404 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20405 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20406 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20407 stride is constant and is below the minimum stride threshold.
20409 2018-05-06 Jakub Jelinek <jakub@redhat.com>
20412 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20413 the type is addressable. Don't force op into register if it has
20416 2018-05-05 Roland McGrath <mcgrathr@google.com>
20419 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20420 any section for which we don't know a specific type it should have,
20421 regardless of name. Previously this was done only for the exact
20422 names ".init_array", ".fini_array", and ".preinit_array".
20423 (default_elf_asm_named_section): Add comment about
20424 relationship with default_section_type_flags and SECTION_NOTYPE.
20425 (get_section): Don't consider it a type conflict if one side has
20426 SECTION_NOTYPE and the other doesn't, as long as neither has the
20427 SECTION_BSS et al used in the default_section_type_flags logic.
20429 2018-05-05 Tom de Vries <tom@codesourcery.com>
20432 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20433 (workaround_barsyncs): New function.
20434 (nvptx_reorg): Use workaround_barsyncs.
20435 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20436 (define_expand "nvptx_membar_cta"): New define_expand.
20437 (define_insn "*nvptx_membar_cta"): New insn.
20439 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
20441 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20442 To improve optimization opportunities.
20443 * builtin-types.def: The new needed builtin types for the above.
20445 2018-05-04 Richard Biener <rguenther@suse.de>
20447 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20448 * gimple-ssa-store-merging.c
20449 (imm_store_chain_info::output_merged_store): Remove redundant create,
20450 release split_store vector contents on failure.
20451 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20452 scalar stmt vector on cache hit.
20454 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
20456 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20458 * config.gcc (powerpc-xilinx-eabi*): Remove.
20459 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20461 (fusion_addis_mem_combo_load): Ditto.
20462 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20464 (rs6000_cpu_cpp_builtins): Ditto.
20465 * config/rs6000/rs6000-linux.c
20466 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20467 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20468 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20470 (rs6000_setup_reg_addr_masks): Ditto.
20471 (rs6000_init_hard_regno_mode_ok): Ditto.
20472 (rs6000_option_override_internal): Ditto.
20473 (legitimate_lo_sum_address_p): Ditto.
20474 (rs6000_legitimize_address): Ditto.
20475 (rs6000_legitimize_reload_address): Ditto.
20476 (rs6000_legitimate_address_p): Ditto.
20477 (abi_v4_pass_in_fpr): Ditto.
20478 (setup_incoming_varargs): Ditto.
20479 (rs6000_gimplify_va_arg): Ditto.
20480 (rs6000_split_multireg_move): Ditto.
20481 (rs6000_savres_strategy): Ditto.
20482 (rs6000_emit_prologue_components): Ditto.
20483 (rs6000_emit_epilogue_components): Ditto.
20484 (rs6000_emit_prologue): Ditto.
20485 (rs6000_emit_epilogue): Ditto.
20486 (rs6000_elf_file_end): Ditto.
20487 (rs6000_function_value): Ditto.
20488 (rs6000_libcall_value): Ditto.
20489 * config/rs6000/rs6000.h: Ditto.
20490 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20491 (TARGET_MINMAX): ... this. New.
20492 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20493 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20494 (*movsi_internal1_single): Delete.
20495 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20496 mfpu=, mxilinx-fpu): Delete.
20497 * config/rs6000/singlefp.h: Delete.
20498 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20499 * config/rs6000/t-rs6000: Ditto.
20500 * config/rs6000/t-xilinx: Delete.
20501 * config/rs6000/titan.md: Adjust for fp_type removal.
20502 * config/rs6000/vsx.md: Remove Xilinx FP support.
20503 (VStype_simple): Delete.
20504 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20505 * config/rs6000/xfpu.h: Delete.
20506 * config/rs6000/xfpu.md: Delete.
20507 * config/rs6000/xilinx.h: Delete.
20508 * config/rs6000/xilinx.opt: Delete.
20509 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20510 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20512 2018-05-04 Tom de Vries <tom@codesourcery.com>
20515 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20518 2018-05-04 Richard Biener <rguenther@suse.de>
20520 PR middle-end/85627
20521 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20522 (expand_complex_div_wide): Likewise.
20523 (expand_complex_operations_1): Likewise.
20524 (expand_complex_libcall): Preserve EH info of the original stmt.
20525 (tree_lower_complex): Handle removed blocks.
20526 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20527 on complex multiplication and division libcall builtins.
20529 2018-05-04 Richard Biener <rguenther@suse.de>
20531 PR middle-end/85574
20532 * fold-const.c (negate_expr_p): Restrict negation of operand
20533 zero of a division to when we know that can happen without
20535 (fold_negate_expr_1): Likewise.
20537 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20540 * real.h (real_nextafter): Declare.
20541 * real.c (real_nextafter): New function.
20542 * fold-const-call.c (fold_const_nextafter): New function.
20543 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20544 CASE_CFN_NEXTTOWARD.
20545 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20546 even when arg1_mode is different from arg0_mode.
20548 2018-05-03 Nathan Sidwell <nathan@acm.org>
20550 * doc/extend.texi (Deprecated Features): Remove
20551 -ffriend-injection.
20552 (Backwards Compatibility): Likewise.
20553 * doc/invoke.texi (C++ Language Options): Likewise.
20554 (C++ Dialect Options): Likewise.
20556 2018-05-03 Jakub Jelinek <jakub@redhat.com>
20559 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20560 _mm512_mask_mullox_epi64): New intrinsics.
20562 2018-05-03 Tom de Vries <tom@codesourcery.com>
20565 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20566 dump files): Add offload-tree.
20568 2018-05-03 Richard Biener <rguenther@suse.de>
20570 PR tree-optimization/85615
20571 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20572 to loops not nested in BBs loop father to avoid creating multi-entry
20575 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20577 PR tree-optimization/70291
20578 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20579 arguments. Change return type to tree. Emit libcall as a new
20580 statement rather than replacing existing one when inplace_p is true.
20581 (expand_complex_multiplication_components): New function.
20582 (expand_complex_multiplication): Expand floating-point complex
20583 multiplication using the above.
20584 (expand_complex_division): Rename inner_type parameter to type.
20585 Update expand_complex_libcall call-site.
20586 (expand_complex_operations_1): Update expand_complex_multiplication
20587 and expand_complex_division call-sites.
20589 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20592 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20593 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20594 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20595 the highest significant bit of the shift count mask is clear. In
20596 check whether and[sq]i3 is needed verify that all significant bits
20597 of the shift count other than the highest are set.
20599 2018-05-02 Tom de Vries <tom@codesourcery.com>
20602 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20603 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20604 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20605 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20606 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20607 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20608 __builtin_goacc_parlevel_size.
20610 2018-05-02 Richard Biener <rguenther@suse.de>
20612 PR tree-optimization/85597
20613 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20614 do not use split vect_get_vec_defs call but call vect_get_slp_defs
20617 2018-05-02 Tom de Vries <tom@codesourcery.com>
20620 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20621 dump files): Add ltrans-tree.
20623 2018-05-02 Tom de Vries <tom@codesourcery.com>
20626 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20627 dump files): Add wpa-ipa.
20629 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
20631 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
20632 powerpc*-*-linux*paired* target.
20633 * config/rs6000/750cl.h: Delete.
20634 * config/rs6000/paired.h: Delete.
20635 * config/rs6000/paired.md: Delete.
20636 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20638 * config/rs6000/rs6000-builtin.def: Remove paired float support.
20639 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20640 comment. Remove paired float support.
20641 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20642 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20644 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20645 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20647 * config/rs6000/rs6000.c: Remove paired float support.
20648 (paired_expand_vector_init, paired_expand_vector_move,
20649 paired_emit_vector_compare, paired_emit_vector_cond_expr,
20650 (paired_expand_lv_builtin, paired_expand_stv_builtin,
20651 paired_expand_builtin, paired_expand_predicate_builtin,
20652 paired_init_builtins): Delete.
20653 * config/rs6000/rs6000.h: Remove paired float support.
20654 * config/rs6000/rs6000.md: Remove paired float support.
20655 (move_from_CR_ov_bit): Delete.
20656 * config/rs6000/rs6000.opt (mpaired): Delete.
20657 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20658 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20660 2018-05-02 Richard Biener <rguenther@suse.de>
20662 PR middle-end/85567
20663 * gimplify.c (gimplify_save_expr): When in SSA form allow
20664 SAVE_EXPRs to compute to SSA vars.
20666 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20669 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20670 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20671 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20672 clobber operands[2], instead use a new pseudo. Formatting fixes.
20674 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
20676 PR tree-optimization/85586
20677 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20678 exit early for statements in the same group if the accesses are
20681 2018-05-02 Tom de Vries <tom@codesourcery.com>
20684 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20687 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
20689 PR tree-optimization/85143
20690 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20692 2018-05-01 Tom de Vries <tom@codesourcery.com>
20695 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20696 not found" error message.
20698 2018-05-01 Tom de Vries <tom@codesourcery.com>
20701 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20702 * vec.c (test_ordered_remove_if): New function.
20703 (vec_c_tests): Call test_ordered_remove_if.
20704 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20705 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20706 * tree-vect-patterns.c (vect_pattern_recog_1): Use
20707 VEC_ORDERED_REMOVE_IF.
20709 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20711 PR tree-optimization/82665
20712 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20713 pointer subtraction where arguments come from a memchr call.
20715 2018-05-01 Jakub Jelinek <jakub@redhat.com>
20717 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20718 --push-state --as-needed and --pop-state instead of --as-needed and
20719 --no-as-needed if ld supports it.
20720 * configure: Regenerated.
20723 * doc/install.texi2html: Replace _002d with - and _002a with * in
20724 generated html files using sed.
20726 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20729 * gcc-rich-location.c (blank_line_before_p): New function.
20730 (use_new_line): New function.
20731 (gcc_rich_location::add_fixit_insert_formatted): New function.
20732 * gcc-rich-location.h
20733 (gcc_rich_location::add_fixit_insert_formatted): New function.
20735 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20737 * selftest.c (assert_streq): Rename "expected" and "actual" to
20738 "val1" and "val2". Extend NULL-handling to cover both inputs
20739 symmetrically, while still requiring both to be non-NULL for a pass.
20740 * selftest.h (assert_streq): Rename "expected" and "actual" to
20742 (ASSERT_EQ): Likewise.
20743 (ASSERT_EQ_AT): Likewise.
20744 (ASSERT_KNOWN_EQ): Likewise.
20745 (ASSERT_KNOWN_EQ_AT): Likewise.
20746 (ASSERT_NE): Likewise.
20747 (ASSERT_MAYBE_NE): Likewise.
20748 (ASSERT_MAYBE_NE_AT): Likewise.
20749 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
20750 the assertion to pass.
20751 (ASSERT_STREQ_AT): Likewise.
20753 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20755 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20756 interaction with -pie.
20758 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20760 * selftest.h: Fix alphabetization of per-source-file selftest
20763 2018-04-30 Jason Merrill <jason@redhat.com>
20765 PR c++/61982 - dead stores to destroyed objects.
20766 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20769 2018-04-30 Jason Merrill <jason@redhat.com>
20771 * tree.c (build_clobber): New.
20772 * tree.h: Declare it.
20773 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20775 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20777 * diagnostic-show-locus.c (layout::layout): Update for
20778 location_get_source_line returning a char_span.
20779 (struct char_span): Move to input.h.
20780 (struct correction): Update for fields in char_span becoming
20782 (struct source_line): Update for location_get_source_line
20783 returning a char_span.
20784 (layout::print_line): Likewise.
20785 * edit-context.c (edited_file::print_content): Likewise.
20786 (edited_file::print_diff_hunk): Likewise.
20787 (edited_file::print_run_of_changed_lines): Likewise.
20788 (edited_file::get_num_lines): Likewise.
20789 (edited_line::edited_line): Likewise.
20790 * final.c (asm_show_source): Likewise.
20791 * input.c (location_get_source_line): Convert return type
20792 from const char * to char_span, losing the final "line_len"
20794 (dump_location_info): Update for the above.
20795 (get_substring_ranges_for_loc): Likewise. Use a char_span
20796 when handling the literal within the line.
20797 (test_reading_source_line): Update for location_get_source_line
20798 returning a char_span.
20799 * input.h (class char_span): Move here from
20800 diagnostic-show-locus.c, converting from a struct to a class.
20801 Make data members private.
20802 (char_span::operator bool): New.
20803 (char_span::length): New.
20804 (char_span::get_buffer): New.
20805 (char_span::operator[]): New.
20806 (char_span::subspan): Make const.
20807 (char_span::xstrdup): New.
20808 (location_get_source_line): Convert return type from const char *
20809 to char_span, losing the final "line_size" param.
20811 2018-04-30 Jan Hubicka <jh@suse.cz>
20813 * lto-wrapper.c (ltrans_priorities): New static var.
20814 (cmp_priority): New.
20815 (run_gcc): Read priorities and if doing parallel build order
20816 the Makefile by them.
20818 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20820 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20822 2018-04-30 Richard Biener <rguenther@suse.de>
20824 * tree-cfg.c (verify_address): Remove base argument, add
20825 flag whether to check TREE_ADDRESSABLE and do that.
20826 (verify_expr): Remove.
20827 (verify_types_in_gimple_reference): Add pieces from verify_expr.
20828 (verify_gimple_assign_single): Likewise.
20829 (verify_gimple_switch): Likewise.
20830 (verify_expr_location_1): Dereference tp once. Add (disabled)
20831 piece from verify_expr.
20832 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20834 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20836 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20838 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20840 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20841 (small_data_pattern): Likewise.
20842 (arc_rewrite_small_data): Likewise.
20843 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20844 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20845 (get_symbol_alignment): New function.
20846 (legitimate_small_data_address_p): Likewise.
20847 (legitimate_scaled_address): Update, call
20848 legitimate_small_data_address_p.
20849 (output_sdata): New static variable.
20850 (arc_print_operand): Update how we handle small data operands.
20851 (arc_print_operand_address): Likewise.
20852 (arc_legitimate_address_p): Update, use
20853 legitimate_small_data_address_p.
20854 (arc_rewrite_small_data_p): Remove.
20855 (arc_rewrite_small_data_1): Likewise.
20856 (arc_rewrite_small_data): Likewise.
20857 (small_data_pattern): Likewise.
20858 (compact_sda_memory_operand): Update to use
20859 legitimate_small_data_address_p and get_symbol_alignment.
20860 (prepare_move_operands): Don't rewite sdata pattern.
20861 (prepare_extend_operands): Remove.
20862 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20864 (zero_extendqisi2): Likewise.
20865 (zero_extendhisi2): Likewise.
20866 (extendqihi2): Likewise.
20867 (extendqisi2): Likewise.
20868 (extendhisi2): Likewise.
20869 (addsi3): Likewise.
20870 (subsi3): Likewise.
20871 (andsi3): Likewise.
20872 * config/arc/constraints.md (Usd): Change it to memory constraint.
20874 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20876 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20877 as source of std instructions.
20878 * config/arc/arc.md (movsi_insn): Update pattern predicate to
20879 allow 6-bit constants as source for store instructions.
20880 (movdi_insn): Update instruction pattern to allow 6-bit constants
20881 as source for store instructions.
20883 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20885 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20887 2018-04-30 Nathan Sidwell <nathan@acm.org>
20888 Sandra Loosemore <sandra@codesourcery.com>
20890 * dumpfile.c (dump_open): Allow '-' for stdout.
20891 * doc/invoke.texi (Developer Options): Document dump filename
20892 determination early. Document stdin/stdout selection.
20894 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
20896 Microblaze Target: PIC data text relative
20898 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20899 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20901 * config/microblaze/microblaze.h (microblaze_constant_address_p):
20902 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20903 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20904 New addressing mode for data-text relative position indepenedent code.
20905 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20906 'ADDRESS_SYMBOLIC_TXT_REL'.
20907 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20908 (microblaze_legitimate_pic_operand): Exclude function calls from
20909 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20910 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20912 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20913 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20914 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20915 for 'address + offset'.
20916 (microblaze_expand_prologue): Add new function prologue call for
20918 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20919 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20920 table in case of TARGET_PIC_DATA_TEXT_REL.
20921 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20922 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20923 Add new macros 'UNSPEC_TEXT',
20924 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20925 + exclude function calls from 'UNSPEC_PLT' in case of data text
20927 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20928 new target hook for generating address diff vector tables in case of
20930 * doc/tm.texi : Regenerate.
20931 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20932 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20933 of addr diff vector generation.
20934 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20935 target hook definition.
20936 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20937 Add default function for generate_pic_addr_diff_vec -> flag_pic.
20938 * doc/invoke.texi (Add new pic option): Add new microblaze pic
20939 option for data text relative.
20941 2018-04-30 Richard Biener <rguenther@suse.de>
20943 * tree-chrec.h (evolution_function_is_constant_p): Remove
20945 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20947 2018-04-30 Richard Biener <rguenther@suse.de>
20950 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20952 2018-04-30 Richard Biener <rguenther@suse.de>
20954 PR tree-optimization/28364
20955 PR tree-optimization/85275
20956 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20957 copying first exit test.
20959 2018-04-28 Mark Wielaard <mark@klomp.org>
20961 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20962 dwarf_version >= 5.
20963 (dwarf_AT): Handle DW_AT_addr_base.
20964 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20966 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
20969 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20970 (*ashl<dwi>3_doubleword_mask_1): Ditto.
20971 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20972 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20974 2018-04-28 Richard Biener <rguenther@suse.de>
20976 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20977 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20978 to reflect use. Only add interesting stmts.
20980 2018-04-27 Martin Jambor <mjambor@suse.cz>
20983 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20984 the jump function allows for passing through aggregate values.
20986 2018-04-27 David Malcolm <dmalcolm@redhat.com>
20988 * input.h (in_system_header_at): Convert from macro to inline
20990 (from_macro_expansion_at): Likewise.
20991 (from_macro_definition_at): Likewise.
20993 2018-04-27 Jeff Law <law@redhat.com>
20995 * config.gcc: Mark tile* targets as deprecated/obsolete.
20997 2018-04-27 Richard Biener <rguenther@suse.de>
20999 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
21002 2018-04-27 Richard Biener <rguenther@suse.de>
21004 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
21006 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
21008 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
21009 with Yd constraint. Set "preferred_for_speed" attribute from
21010 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
21011 with Yd constraint.
21012 (*movdi_internal): Ditto.
21013 (movti_interunit splitters): Remove
21014 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
21015 (movdi_interunit splitters): Ditto.
21016 * config/i386/constraints.md (Ye): Remove.
21017 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
21019 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21022 * config/aarch64/constraints.md (Usg): Limit to 31.
21023 (Usj): Limit to 63.
21025 2018-04-27 Jakub Jelinek <jakub@redhat.com>
21027 PR tree-optimization/85529
21028 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
21029 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
21030 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
21031 zero extension or masking of the MSB bit.
21032 (optimize_range_tests): Add FIRST_BB argument, pass it through
21033 to optimize_range_tests_var_bound.
21034 (maybe_optimize_range_tests, reassociate_bb): Adjust
21035 optimize_range_tests callers.
21037 2018-04-26 Richard Biener <rguenther@suse.de>
21038 Jakub Jelinek <jakub@redhat.com>
21040 * cgraph.h (symbol_table): Just declare debug method here.
21041 * symtab.c (symbol_table::debug): Define.
21043 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
21045 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
21047 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
21049 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
21050 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
21051 (*movdi_internal): Substitute Yi and Yj constraint with x
21052 and Ym and Yn constraint with y constraint. Update "isa"
21053 attribute and set "preferred_for_speed" attribute from
21054 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
21055 (*movsi_internal): Ditto.
21056 (*movdf_internal): Ditto.
21057 (*movsf_internal): Ditto.
21058 (*zero_extendsidi2): Ditto.
21059 * config/i386/sse.md (vec_set<mode>_0): Ditto.
21060 (sse2_loadld): Ditto.
21061 (*vec_extract<ssevecmodelower>_0): Ditto.
21062 (*vec_extractv4si_0_zext_sse4): Ditto.
21063 (vec_concatv2di): Ditto.
21064 (*vec_dup<mode>): Ditto.
21065 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
21066 * config/i386/constraints.md (Yi): Remove.
21071 2018-04-26 Nathan Sidwell <nathan@acm.org>
21073 * dumpfile.c (dump_open): New.
21074 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
21075 (dump_finish): Detect stdio/stderr by value not name.
21077 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
21079 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
21081 2018-04-26 Tom de Vries <tom@codesourcery.com>
21084 * config/nvptx/nvptx.c (verify_neutering_jumps)
21085 (verify_neutering_labels): New function
21086 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
21088 2018-04-26 Tom de Vries <tom@codesourcery.com>
21091 * config/nvptx/nvptx.c (needs_neutering_p): New function.
21092 (nvptx_single): Use needs_neutering_p to skip over insns that do not
21095 2018-04-26 Richard Biener <rguenther@suse.de>
21096 Tom de Vries <tom@codesourcery.com>
21099 * lto-streamer-out.c (output_function): Fixup loops if required to match
21100 discovery done in the reader.
21102 2018-04-26 Richard Biener <rguenther@suse.de>
21104 PR tree-optimization/85116
21105 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
21106 have a loop exit from the single latch predecessor. Remove
21107 case of header with just condition.
21108 (ch_base::copy_headers): Exclude infinite loops from any
21110 (pass_ch::execute): Record exits.
21112 2018-04-26 Richard Biener <rguenther@suse.de>
21114 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
21115 prologue cost vector and pass it to vect_get_load_cost.
21116 (vect_get_peeling_costs_all_drs): Likewise.
21117 (vect_peeling_hash_get_lowest_cost): Likewise.
21118 (vect_enhance_data_refs_alignment): Likewise.
21120 2018-04-26 Richard Biener <rguenther@suse.de>
21122 PR middle-end/85450
21123 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
21124 checking of integer<->pointer conversions.
21125 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
21126 sign-/zero-extending pointer types.
21127 (expand_omp_for_static_chunk): Likewise.
21129 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
21130 Jean Lee <xiaoyur347@gmail.com>
21132 * config/mips/mips.c (mips_asan_shadow_offset): New function.
21133 (TARGET_ASAN_SHADOW_OFFSET): Define.
21134 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
21135 true for -fsanitize=address.
21137 2018-04-25 Mark Wielaard <mark@klomp.org>
21139 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
21142 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21144 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
21145 than "alu", remove explicit "memory" and "imm_disp" attributes.
21146 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
21148 PR middle-end/85414
21149 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
21150 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
21151 gen_lowpart_no_emit.
21153 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
21156 * config/i386/i386.c (ix86_expand_builtin): Change memory
21157 operand to XI, extend p0 to Pmode.
21158 * config/i386/i386.md: Change unspec volatile and operand
21159 1 mode to XI, change operand 0 mode to P.
21161 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21163 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
21164 GET_MODE_MASK before any checking.
21165 (nds32_can_use_bset_p): Likewise.
21166 (nds32_can_use_btgl_p): Likewise.
21168 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21170 * config/nds32/nds32-doubleword.md: New define_split pattern for
21171 illegal register number.
21173 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21175 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21177 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21179 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21181 2018-04-25 Richard Biener <rguenther@suse.de>
21183 * lto-streamer.h (LTO_major_version): Bump to 8.
21185 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21187 * BASE-VER: Set to 9.0.0.
21189 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
21191 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21192 in __abskf2 and __powikf2.
21194 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21197 * config/aarch64/constraints.md (Usg, Usj): New constraints.
21198 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21199 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21200 Use the above on operand 2. Reindent.
21201 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21203 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21206 * common/config/i386/i386-common.c (ix86_handle_option): Don't
21208 * config/i386/i386.opt (mcet): Removed.
21209 * doc/install.texi: Remove -mcet documentation.
21210 * doc/invoke.texi: Likewise.
21212 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21215 * doc/install.texi: Remove -mcet from bootstrap-cet.
21217 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21220 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21221 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21225 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21226 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21227 containing a CONST_VECTOR.
21229 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
21231 * doc/install.texi: Update newlib dependency for nvptx.
21233 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21236 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21237 instead of INTVAL when shifting x left.
21239 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
21241 PR tree-optimization/85478
21242 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21243 vect_grouped_store_supported for single element vectors.
21245 2018-04-24 Richard Biener <rguenther@suse.de>
21248 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21249 load cost increase to the case of non-constant step.
21251 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21254 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21255 destination if any_malformed_asm.
21257 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
21259 PR middle-end/85496
21260 * expr.c (store_field): In the bitfield case, if the value comes from
21261 a function call and is returned in registers by means of a PARALLEL,
21262 do not change the mode of the temporary unless BLKmode and VOIDmode.
21264 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
21266 PR rtl-optimization/85423
21267 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21268 dependencies to debug insns when the previous insn is non-debug.
21270 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21272 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21273 enums into a single definition.
21274 (fls): Fix predicates and printing.
21277 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21279 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21280 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21281 and short u6 immediate.
21282 (check_if_valid_sleep_operand): Remove.
21283 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21285 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21287 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21288 flag_always_save_lp condition.
21289 * config/nds32/nds32.opt (malways-save-lp): New option.
21291 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21293 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21294 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21295 * config/nds32/nds32.h
21296 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21297 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21299 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21301 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21302 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21304 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21305 Chung-Ju Wu <jasonwucj@gmail.com>
21307 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21309 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21310 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21312 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21314 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21316 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21318 * config/nds32/nds32-protos.h (nds32_data_alignment,
21319 nds32_local_alignment): Declare.
21320 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21321 nds32_local_alignment): New functions.
21322 (TARGET_CONSTANT_ALIGNMENT): Define.
21323 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21325 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21327 * config/nds32/nds32.c
21328 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21329 (TARGET_MODES_TIEABLE_P): Likewise.
21331 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21333 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21334 level Ofast and Og.
21336 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
21337 Chung-Ju Wu <jasonwucj@gmail.com>
21339 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21340 for unaligned access.
21341 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21343 * config/nds32/nds32-intrinsic.md: Likewise.
21344 * config/nds32/nds32_intrinsic.h: Likewise.
21345 * config/nds32/nds32.h (nds32_builtins): Likewise.
21346 * config/nds32/nds32.opt (munaligned-access): New option.
21347 * config/nds32/nds32.c (nds32_asm_file_start): Display
21348 flag_unaligned_access status.
21350 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21352 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21353 -mno-relax is present.
21354 * config/riscv/linux.h (LINK_SPEC): Ditto.
21356 2018-04-20 Martin Sebor <msebor@redhat.com>
21359 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21361 (gimple_fold_builtin_stxcpy_chk): Same.
21362 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21364 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
21367 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21368 __powikf2 when long double is IEEE 128-bit.
21370 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21372 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21373 step to make sure stack always aligned.
21375 2018-04-20 Carl Love <cel@us.ibm.com>
21378 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21379 size check for arg0.
21381 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
21382 Tom de Vries <tom@codesourcery.com>
21385 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21386 Emit insns for calls too.
21387 (nvptx_find_par): Always look for worker-level predecessor insn.
21388 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
21390 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21391 (nvptx_process_pars): Propagate frames for calls.
21393 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
21396 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21398 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21399 (ix86_handle_option): Don't handle OPT_mibt.
21400 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21402 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21404 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21405 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21406 (ix86_target_macros): Define __CET__ with flag_cf_protection
21407 for -fcf-protection.
21408 * config/i386/i386.c (isa2_opts): Remove -mibt.
21409 * config/i386/i386.h (TARGET_IBT): Removed.
21410 (TARGET_IBT_P): Likewise.
21411 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21412 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21413 * config/i386/i386.opt (mcet): Update help message.
21414 (mshstk): Likewise.
21416 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
21417 -mcet as an alias for -mshstk.
21419 2018-04-20 Richard Biener <rguenther@suse.de>
21421 PR middle-end/85475
21422 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21423 complexity by forcing a single use of the multiply operand.
21425 2018-04-20 Martin Jambor <mjambor@suse.cz>
21428 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21429 recursion dependency to only apply to non-clones.
21431 2018-04-20 Martin Jambor <mjambor@suse.cz>
21434 * ipa-cp.c (create_specialized_node): Check that clones of
21435 self-recursive edges exist during IPA-CP.
21437 2018-04-19 Toon Moene <toon@moene.org>
21439 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21442 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21444 PR tree-optimization/85467
21445 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21446 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
21447 VECTOR_CST element to type.
21449 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21452 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21453 * config/i386/i386.md (builtin_setjmp_setup): Removed.
21454 (builtin_longjmp): Likewise.
21455 (save_stack_nonlocal): New pattern.
21456 (restore_stack_nonlocal): Likewise.
21458 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21461 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21462 Replace ASM_OUTPUT_LABEL with fprintf.
21464 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21467 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21468 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21469 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21470 define __IBT__ and __SHSTK__ for -fcf-protection.
21471 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21473 (ix86_trampoline_init): Likewise.
21474 (x86_output_mi_thunk): Likewise.
21475 (ix86_notrack_prefixed_insn_p): Likewise.
21476 (ix86_option_override_internal): Don't disallow -fcf-protection.
21477 * config/i386/i386.md (rdssp<mode>): Also enable for
21479 (incssp<mode>): Likewise.
21480 (nop_endbr): Likewise.
21481 * config/i386/i386.opt (mcet): Change help message to built-in
21484 (mshstk): Likewise.
21485 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21486 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21487 enable CET built-in functions.
21489 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21491 * common/config/i386/i386-common.c
21492 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21493 OPTION_MASK_ISA_MOVDIRI_UNSET,
21494 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21495 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21496 * config.gcc (movdirintrin.h): New header.
21497 * config/i386/cpuid.h (bit_MOVDIRI,
21498 bit_MOVDIR64B): New bits.
21499 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21501 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21502 (VOID, PVOID, PCVOID)): New function types.
21503 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21504 __builtin_ia32_directstoreu_u64,
21505 __builtin_ia32_movdir64b): New builtins.
21506 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21507 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21509 (ix86_valid_target_attribute_inner_p): Ditto.
21510 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21511 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21512 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21513 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21514 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21515 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21516 (movdiri<mode>, movdir64b_<mode>): New.
21517 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21518 * config/i386/immintrin.h: Include movdirintrin.h.
21519 * config/i386/movdirintrin.h: New file.
21520 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21522 2018-04-19 Richard Biener <rguenther@suse.de>
21524 PR middle-end/85455
21525 * cfg.c (clear_bb_flags): When loop state says we have
21526 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21528 2018-04-19 Richard Biener <rguenther@suse.de>
21530 PR tree-optimization/84737
21531 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21532 copying restrict info.
21533 (vect_setup_realignment): Use it.
21534 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21535 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21536 the first DR to all generated stores.
21537 (vectorizable_load): Likewise for loads.
21539 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21541 PR tree-optimization/85446
21542 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21543 the integral and pointer types to have the same precision.
21545 * doc/install.texi: Document --disable-cet being the default and
21548 2018-04-18 Martin Liska <mliska@suse.cz>
21550 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21553 2018-04-18 Martin Liska <mliska@suse.cz>
21556 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21559 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21560 arguments if they are comparable.
21562 2018-04-18 Martin Liska <mliska@suse.cz>
21565 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21568 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21571 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
21574 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21575 ENDBR after calling __morestack.
21577 2018-04-18 David Malcolm <dmalcolm@redhat.com>
21580 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21581 by using gcc_base_ver to generate a gcc_driver_version, and use
21582 it when generating GCC_DRIVER_NAME.
21583 * configure: Regenerate.
21585 2018-04-18 Jakub Jelinek <jakub@redhat.com>
21588 * config.gcc: Obsolete powerpc*-*-*spe*.
21590 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21593 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21594 (stabstr_D): Change type of unum from unsigned int to
21595 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
21598 2018-04-17 Jim Wilson <jimw@sifive.com>
21601 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21602 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21603 Set arg_pointer_offset after using pretend_args_size.
21605 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21607 PR rtl-optimization/85431
21608 * dse.c (record_store): Ignore zero width stores.
21611 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
21612 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21613 __builtin_stack_restore rather than after it.
21614 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21615 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21616 argument instead of virtual_dynamic_stack_rtx.
21618 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
21620 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21622 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21623 Add note to error message to explain internal mapping of overloaded
21624 built-in function name to non-overloaded built-in function name.
21625 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21628 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21631 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21632 where the inputs overlap with the output.
21634 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21636 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21637 (=v, v) alternative and explicit "memory" attribute.
21638 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
21639 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21641 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21642 "sselog1" type instead of "sselog".
21643 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21644 "sselog". Remove explicit "memory" attribute.
21645 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21646 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21648 (vec_extract_hi_v32hi): Merge all alternatives into one, use
21649 "sselog1" type instead of "sselog". Remove explicit "memory"
21651 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21652 use "sselog1" type instead of "sselog". Remove explicit "memory"
21654 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21655 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21657 (vec_extract_hi_v64qi): Merge all alternatives into one, use
21658 "sselog1" type instead of "sselog". Remove explicit "memory"
21660 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21661 use "sselog1" type instead of "sselog". Remove explicit "memory"
21665 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21667 PR middle-end/85414
21668 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21671 2018-04-17 Martin Jambor <mjambor@suse.cz>
21674 * ipa-cp.c (create_specialized_node): Call
21675 expand_all_artificial_thunks if necessary.
21677 2018-04-17 Martin Liska <mliska@suse.cz>
21680 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21681 in message, remote space in between '_G' and '('.
21683 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21686 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21687 avx512f_vmcmp<mode>3<round_saeonly_name>,
21688 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21689 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21690 avx512f_rndscale<mode><round_saeonly_name>,
21691 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21692 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21693 Use %<iptr>2 instead of %2 for -masm=intel.
21694 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21695 avx512f_vcvttss2usi<round_saeonly_name>,
21696 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21698 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21699 avx512f_vcvttsd2usi<round_saeonly_name>,
21700 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21701 Use %q1 instead of %1 for -masm=intel.
21702 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21703 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21704 of %3 for -masm=intel.
21705 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21707 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21709 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21711 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21712 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21714 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21716 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21717 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21718 %g1 and one with %0 and %1.
21719 (avx512er_vmrcp28<mode><round_saeonly_name>,
21720 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21721 %1 for -masm=intel.
21722 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21723 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21724 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21725 of %0 and %{%4%} for -masm=intel.
21726 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21727 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21728 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21729 order of %0 and %{%5%}%{z%} for -masm=intel.
21731 2018-04-17 Jan Hubicka <jh@suse.cz>
21734 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21736 2018-04-17 Martin Liska <mliska@suse.cz>
21739 * multiple_target.c (create_dispatcher_calls): Set apostrophes
21740 for target_clone error message. Make default implementation
21741 clone to be a local declaration.
21742 (separate_attrs): Add new argument and check for an empty
21744 (expand_target_clones): Handle it.
21745 (ipa_target_clone): Make redirection just for target_clones
21748 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
21749 Tom de Vries <tom@codesourcery.com>
21751 PR middle-end/84955
21752 * omp-expand.c (expand_oacc_for): Add dummy false branch for
21753 tiled basic blocks without omp continue statements.
21755 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
21758 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21759 vec_extract expression as having side effects to make sure it gets
21762 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
21765 * config/i386/i386.c (get_builtin_code_for_version): Check
21768 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
21771 * config.gcc: Support "skylake".
21772 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21774 * config/i386/i386.c (m_SKYLAKE): Define.
21775 (processor_target_table): Add "skylake".
21776 (ix86_option_override_internal): Add "skylake".
21777 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21778 PROCESSOR_CANNONLAKE.
21779 (get_builtin_code_for_version): Fix priority for
21780 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21781 PROCESSOR_SKYLAKE-AVX512.
21782 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21783 (processor_type): Add PROCESSOR_SKYLAKE.
21785 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
21786 Jason Merrill <jason@redhat.com>
21789 * convert.c (convert_to_integer_1): Use direct recursion for
21790 enumeral types and types with a precision less than the number
21791 of bits in their mode.
21793 2018-04-16 Julia Koval <julia.koval@intel.com>
21796 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21797 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21799 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
21802 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21803 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21804 and -mno-direct-move.
21806 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
21809 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21810 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21811 Ensure negative shifts result in {0}.
21813 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
21815 PR rtl-optimization/79916
21816 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21817 regs (if any) to define how to gnerate SD moves when LRA is in
21820 2018-04-13 Jakub Jelinek <jakub@redhat.com>
21822 PR rtl-optimization/85393
21823 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21824 * except.c (expand_dw2_landing_pad_for_region): Make static.
21825 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21826 a label and unconditional jump to old_bb, rather than
21827 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21830 PR rtl-optimization/85376
21831 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21832 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21833 instead of a specific value.
21835 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21836 Bin Cheng <bin.cheng@arm.com>
21838 PR tree-optimization/82965
21839 PR tree-optimization/83991
21840 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21841 by_profile_only parameter.
21842 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21843 information if the loop was predicted to iterate too many times.
21844 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21846 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21849 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21852 2018-04-13 Martin Liska <mliska@suse.cz>
21853 Jakub Jelinek <jakub@redhat.com>
21855 PR middle-end/81657
21856 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21857 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21858 * builtins.c (expand_builtin_memory_copy_args): Use
21859 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21860 handle dest_addr == pc_rtx.
21862 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
21865 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21866 asked to not generate direct moves.
21867 (fix_trunc<mode>si2_stfiwx): Similar.
21868 (fix_trunc<mode>si2_internal): Similar.
21870 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21873 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21874 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21875 lookup if dest in some wider mode is known to be const0_rtx and
21876 if so, record permanent equivalence for it to be ZERO_EXTEND of
21877 the narrower mode destination.
21879 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21881 * lto-streamer-out.c (output_function): Revert 259346.
21882 * omp-expand.c (expand_oacc_for): Likewise.
21884 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
21886 PR rtl-optimization/85354
21887 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21888 * sel-sched.c (sel_global_init): ... here.
21890 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
21893 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21894 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21895 mode for PE-COFF targets.
21896 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21897 (i386_pe_asm_lto_end): Likewise.
21898 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21899 (TARGET_ASM_LTO_END): Likewise.
21900 * config/i386/winnt.c (saved_debug_info_level): New static variable.
21901 (i386_pe_asm_lto_start): New function.
21902 (i386_pe_asm_lto_end): Likewise.
21904 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21905 Richard Biener <rguenther@suse.de>
21907 PR middle-end/84955
21908 * lto-streamer-out.c (output_function): Fix CFG loop state before
21910 * omp-expand.c (expand_oacc_for): Handle calls to internal
21911 functions like regular functions.
21913 2018-04-12 Richard Biener <rguenther@suse.de>
21916 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21917 for the early LTO debug to properly generate references to it
21918 during DIE emission. Do not re-use that for the skeleton for
21920 (dwarf2out_early_finish): Likewise.
21922 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21925 * config/i386/sse.md
21926 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21927 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21928 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21929 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21930 and output is a reg, avoid creating invalid lowpart subreg, but
21931 instead split into a 512-bit move. Don't split if not AVX512VL,
21932 input is xmm16+ reg and output is a mem.
21933 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21934 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21935 xmm16+ reg and output is a mem.
21937 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21939 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21940 also for flag_dwarf2_cfi_asm.
21942 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21944 PR rtl-optimization/85342
21945 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21946 a bool scalar var inside of the loop instead. Don't try to update
21947 recog_data.operand after failed apply_change_group.
21949 2018-04-12 Tom de Vries <tom@codesourcery.com>
21952 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21953 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
21954 array with flexible array member as array without given dimension.
21955 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21956 argument for undefined param to true.
21958 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
21961 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21962 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21963 from PowerPC section.
21964 * config/rs6000/sysv4.opt (mcall-): Improve help text.
21965 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21966 help text that is too long.
21967 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21968 help text that is too long.
21969 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21970 help text that is too long.
21972 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
21974 * config/alpha/alpha.md (stack_probe_internal): Rename
21975 from "probe_stack". Update all callers.
21977 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21979 PR rtl-optimization/84566
21980 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21981 sched_macro_fuse_insns.
21983 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21986 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21987 (compute_block_dependences): ... from here.
21989 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21991 PR tree-optimization/85331
21992 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21993 from int to HOST_WIDE_INT.
21995 2018-04-11 Martin Jambor <mjambor@suse.cz>
21998 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21999 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
22000 not the same as the source val.
22001 (cgraph_edge_brings_value_p): New parameter.
22002 (gather_edges_for_value): Pass destination value to
22003 cgraph_edge_brings_value_p.
22004 (perhaps_add_new_callers): Likewise.
22005 (get_info_about_necessary_edges): Likewise and exclude values brought
22006 only by self-recursive edges.
22007 (create_specialized_node): Redirect only clones of self-calling edges.
22008 (+self_recursive_pass_through_p): New function.
22009 (find_more_scalar_values_for_callers_subset): Use it.
22010 (find_aggregate_values_for_callers_subset): Likewise.
22011 (known_aggs_to_agg_replacement_list): Removed.
22012 (decide_whether_version_node): Re-calculate known constants for all
22013 remaining context clones.
22015 2018-04-11 Richard Biener <rguenther@suse.de>
22018 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
22019 from early DWARF output.
22020 (dwarf2out_early_finish): Output line info unconditionally into
22021 early DWARF and add reference to it.
22023 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22026 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
22027 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
22028 other than V2DFmode using iptr mode attribute.
22029 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
22031 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22033 PR rtl-optimization/84659
22034 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
22036 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22039 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
22041 (output_loc_list): Pass address of a dummy size variable even in the
22042 locview handling loop.
22043 (index_location_lists): Add comment on why skip_loc_list_entry can't
22046 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
22049 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
22052 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
22055 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22056 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
22057 and -mstring-compare-inline-limit.
22059 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22062 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
22063 for stack clash protection in a register whenever we need it to be in
22066 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22068 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
22069 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
22071 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22074 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
22076 (mlong-double-): Ditto.
22077 * config/rs6000/sysv4.opt (msdata=): Ditto.
22078 (mtls-size=): Ditto.
22080 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22082 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
22083 erroneous entries for
22084 "vector int vec_ldl (int, long int *)", and
22085 "vector unsigned int vec_ldl (int, unsigned long int *)".
22086 Add comments and entries for
22087 "vector bool char vec_ldl (int, bool char *)",
22088 "vector bool short vec_ldl (int, bool short *)",
22089 "vector bool int vec_ldl (int, bool int *)",
22090 "vector bool long long vec_ldl (int, bool long long *)",
22091 "vector pixel vec_ldl (int, pixel *)",
22092 "vector long long vec_ldl (int, long long *)",
22093 "vector unsigned long long vec_ldl (int, unsigned long long *)".
22094 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
22095 type tree bool_long_long_type_node and correct definition of
22096 bool_V2DI_type_node to make reference to this new type tree.
22097 (rs6000_mangle_type): Replace erroneous reference to
22098 bool_long_type_node with bool_long_long_type_node.
22099 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
22100 comments to emphasize sign distinctions for char and int types and
22101 replace RS6000_BTI_bool_long constant with
22102 RS6000_BTI_bool_long_long constant. Also add comment to restrict
22103 use of RS6000_BTI_pixel.
22104 (bool_long_type_node): Remove this macro definition.
22105 (bool_long_long_type_node): New macro definition
22107 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22109 PR rtl-optimization/85300
22110 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
22111 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
22112 simplify_unary_operation fails.
22114 2018-04-10 Martin Liska <mliska@suse.cz>
22116 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
22117 cgraph_edge and ipa_ref.
22119 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22123 * config/i386/sse.md
22124 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
22125 computation of the VEC_MERGE selector from mask.
22126 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22127 Fix decoding of the VEC_MERGE selector into mask.
22129 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22131 PR tree-optimization/85286
22132 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
22134 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22136 * final.c (final_1): Set insn_last_address as well as
22137 insn_current_address.
22139 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22142 * explow.c (emit_stack_probe): Call validize_mem on memory location
22143 before passing it to gen_probe_stack. Create address operand and
22144 legitimize it for the probe_stack_address case.
22146 2018-04-09 Jan Hubicka <jh@suse.cz>
22149 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
22150 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
22151 * tree.c (free_lang_data_in_type): Fix handling of binfos;
22153 (free_lang_data): Rebuild type inheritance graph.
22155 2018-04-09 Martin Sebor <msebor@redhat.com>
22157 * invoke.texi (-finline-small-functions): Mention other optimization
22159 (-findirect-inlining, -fpartial-inlining): Same.
22160 (-finline-functions-called-once): Same.
22161 (-freorder-blocks-and-partition): Same.
22163 2018-04-09 Jan Hubicka <jh@suse.cz>
22166 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
22167 jumps; choose last target that matches the criteria (i.e.
22168 no partition changes for non-crossing jumps).
22169 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22170 support for redirecting crossing jumps to non-crossing.
22172 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
22174 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22175 also for naked functions.
22177 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
22179 * config/arc/arc.md (add_shift): New pattern.
22180 (add_shift2): Likewise.
22181 (sub_shift): Likewise.
22182 (sub_shift_cmp0_noout): Likewise.
22183 (compare_si_ashiftsi): Likewise.
22184 (xbfu_cmp0_noout): New combine pattern.
22185 (xbfu_cmp0"): Likewise.
22186 (movsi_set_cc_insn): Place the predicable variant first.
22187 (commutative_binary_cmp0_noout): Remove clobber.
22188 (commutative_binary_cmp0): New pattern.
22189 (noncommutative_binary_cmp0): Likewise.
22190 (noncommutative_binary_cmp0_noout): Likewise.
22191 (noncommutative_binary_comparison_result_used): Removed.
22192 (rsub_cmp0): New pattern.
22193 (rsub_cmp0_noout): Likewise.
22194 (extzvsi): Changed, keep only meaningful variants.
22195 (SQH, SEZ): New iterators.
22196 (SQH_postfix): New mode attribute.
22197 (SEZ_prefix): New code attribute.
22198 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22199 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22200 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22201 of numerical value.
22202 (noncommutative_operator): Check the availability of barrel
22205 2018-04-09 Richard Biener <rguenther@suse.de>
22207 PR tree-optimization/85284
22208 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22209 Only use the niter constraining form of simple_iv when the exit
22210 is always executed.
22212 2018-04-09 Tom de Vries <tom@codesourcery.com>
22215 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22216 (define_expand "*memory_barrier"): New define_expand.
22217 (define_insn "memory_barrier"): New insn.
22219 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22221 PR rtl-optimization/80463
22222 PR rtl-optimization/83972
22223 PR rtl-optimization/83480
22225 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22226 correct producer for the insn.
22227 (tidy_control_flow): Fixup seqnos in case of debug insns.
22229 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22231 PR rtl-optimization/83913
22233 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22234 different sched-times when merging exprs.
22236 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22238 PR rtl-optimization/83962
22240 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22241 tidy_fallthru_edge and tidy_control_flow.
22243 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22245 PR rtl-optimization/83530
22247 * sel-sched.c (force_next_insn): New global variable.
22248 (remove_insn_for_debug): When force_next_insn is true, also leave only
22249 next insn in the ready list.
22250 (sel_sched_region): When the region wasn't scheduled, make another pass
22251 over it with force_next_insn set to 1.
22253 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22255 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22257 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22258 for interrupt control.
22259 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22260 functions for interrupt control.
22261 * config/nds32/nds32-intrinsic.md: Likewise.
22262 * config/nds32/nds32_intrinsic.h: Likewise.
22263 * config/nds32/nds32.h (nds32_builtins): Likewise.
22265 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22267 * config/nds32/nds32.c (nds32_init_machine_status,
22268 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22269 strict_aligned_p field.
22270 (nds32_expand_to_rtl_hook): New function.
22271 (TARGET_EXPAND_TO_RTL_HOOK): Define.
22272 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22274 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22275 Chung-Ju Wu <jasonwucj@gmail.com>
22277 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22278 * config/nds32/nds32-n7.md: New file.
22279 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22280 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22282 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22283 * config/nds32/nds32.md (pipeline_model): Add n7.
22284 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22285 * config/nds32/pipelines.md: Include n7 settings.
22287 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22288 Chung-Ju Wu <jasonwucj@gmail.com>
22290 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22291 * config/nds32/nds32-e8.md: New file.
22292 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22293 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22295 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22296 * config/nds32/nds32.md (pipeline_model): Add e8.
22297 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22298 * config/nds32/pipelines.md: Include e8 settings.
22300 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22301 Chung-Ju Wu <jasonwucj@gmail.com>
22303 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22304 * config/nds32/nds32-n8.md: New file.
22305 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22306 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22308 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22309 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22310 * config/nds32/nds32.md (pipeline_model): Add n8.
22311 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22312 * config/nds32/pipelines.md: Include n8 settings.
22314 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22315 Chung-Ju Wu <jasonwucj@gmail.com>
22317 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22318 * config/nds32/nds32-n9-2r1w.md: New file.
22319 * config/nds32/nds32-n9-3r2w.md: New file.
22320 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22321 nds32_register_ports): New or modify for cpu n9.
22322 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22324 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22325 * config/nds32/nds32-utils.c: New file.
22326 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22327 TARGET_MUL_SLOW): Define.
22328 * config/nds32/nds32.md (pipeline_model): New attribute.
22329 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22330 New options that support cpu n9.
22331 * config/nds32/pipelines.md: Include n9 settings.
22332 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22334 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22336 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22337 information if necessary.
22338 (output_cond_branch_compare_zero): Likewise.
22339 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22340 (nds32_target_alignment): Refine for alignment.
22341 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22342 (FUNCTION_BOUNDARY): Modify.
22343 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22345 * config/nds32/nds32.opt (malways-align, malign-functions): New.
22347 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22349 * config/nds32/constants.md (unspec_volatile_element): Add values for
22350 TLB operation and data prefetch.
22351 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22352 functions for TLB operation and data prefetch.
22353 * config/nds32/nds32-intrinsic.md: Likewise.
22354 * config/nds32/nds32_intrinsic.h: Likewise.
22355 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22356 (nds32_print_operand): Likewise.
22357 * config/nds32/nds32.h (nds32_builtins): Likewise.
22359 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
22360 Andrew Pinski <pinsika@gcc.gnu.org>
22362 PR middle-end/82976
22363 * match.pd: Use constant_boolean_node of correct type instead of
22364 boolean_true_node or boolean_false_node for simplifying
22365 pointer comparisons to zero.
22367 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22369 PR tree-optimization/80021
22370 * tree.c (verify_type_variant): Make error call in verify_variant_match
22371 translatable and remove final full stop.
22373 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22375 * config/nds32/constants.md (unspec_volatile_element): Add
22376 UNSPEC_VOLATILE_EH_RETURN.
22377 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22378 nds32_output_stack_pop): Support dwarf exception handling process.
22379 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22380 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22381 exception handling process.
22382 (nds32_compute_stack_frame): Likewise.
22383 (nds32_return_addr_rtx): Likewise.
22384 (nds32_initial_elimination_offset): Likewise.
22385 (nds32_expand_prologue): Likewise.
22386 (nds32_expand_epilogue): Likewise.
22387 (nds32_dynamic_chain_address): New function.
22388 * config/nds32/nds32.h (machine_function): Add fields for dwarf
22389 exception handling.
22390 (DYNAMIC_CHAIN_ADDRESS): Define.
22391 (EH_RETURN_DATA_REGNO): Define.
22392 (EH_RETURN_STACKADJ_RTX): Define.
22393 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22394 patterns for dwarf exception handling.
22396 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22398 * config/nds32/nds32.h: Clean up obsolete macros.
22400 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22402 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22403 Add enum values for particular instructions.
22404 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22405 particular intrinsic functions.
22406 * config/nds32/nds32-intrinsic.md: Likewise.
22407 * config/nds32/nds32_intrinsic.h: Likewise.
22408 * config/nds32/nds32.h (nds32_builtins): Likewise.
22409 * config/nds32/nds32.md (type): Add pbsad and pbsada.
22410 (btst, ave): New patterns for particular instructions.
22412 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22414 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22415 Add enum values for atomic load/store and memory sync.
22416 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22418 * config/nds32/nds32-intrinsic.md: Likewise.
22419 * config/nds32/nds32_intrinsic.h: Likewise.
22420 * config/nds32/nds32.h (nds32_builtins): Likewise.
22422 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22424 PR tree-optimization/85257
22425 * fold-const.c (native_encode_vector): If not all elts could fit
22426 and off is -1, return 0 rather than offset.
22427 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22428 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22429 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
22430 adjust buffer in native_interpret_expr call.
22432 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22434 * config/nds32/constants.md (unspec_volatile_element): Add cache
22435 control enum values.
22436 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22437 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22438 * config/nds32/nds32.c (nds32_cctl_names): New.
22439 (nds32_print_operand): Handle cache control register names.
22440 * config/nds32/nds32.h (nds32_builtins): New enum values.
22441 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22443 * config/nds32/nds32.md (type): Add mmu.
22444 * config/nds32/pipelines.md (simple_insn): Add mmu.
22446 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22448 * config/nds32/nds32.md (type): Remove call.
22449 * config/nds32/pipelines.md (simple_insn): Likewise.
22451 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22453 * config/nds32/constants.md (unspec_volatile_element): Add
22454 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22455 UNSPEC_VOLATILE_FMFCFG.
22456 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22457 description for fmfcfg and fmfcsr.
22458 (bdesc_1arg): Add fmtcsr.
22459 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22460 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22461 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22462 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22463 unspec_fmfcfg): New patterns.
22464 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22465 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22466 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22467 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22468 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22469 __nds32__fmfcfg): Define.
22471 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22473 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22474 intrinsic register names.
22475 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22476 intrinsic register enum values and macros.
22478 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22480 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22481 for load/store addressing form.
22482 (nds32_print_operand_address): Likewise.
22484 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22487 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22488 based on LABEL_REF. Remove useless assertion.
22489 (pic_address_needs_scratch): Fix formatting.
22490 (sparc_legitimize_pic_address): Minor tweaks.
22491 (sparc_delegitimize_address): Adjust assertion accordingly.
22492 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22493 into symbolic_operand.
22494 (movsi_high_pic_label_ref): Likewise.
22495 (movsi_lo_sum_pic_label_ref): Likewise.
22496 (movdi_pic_label_ref): Likewise.
22497 (movdi_high_pic_label_ref): Likewise.
22498 (movdi_lo_sum_pic_label_ref): Likewise.
22500 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22502 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22503 custom LIB_SPEC setup.
22505 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22506 Kito Cheng <kito.cheng@gmail.com>
22508 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22509 * config/riscv/freebsd.h: New.
22511 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22513 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22514 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22517 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22518 Kito Cheng <kito.cheng@gmail.com>
22520 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22521 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22522 * config/nds32/nds32-protos.h (nds32_output_call,
22523 nds32_output_return): Declare.
22524 * config/nds32/nds32.md: Refine all the call and return patterns.
22526 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22529 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22530 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22532 PR rtl-optimization/84872
22533 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22534 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22535 EDGE_CROSSING edge.
22537 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22539 * expr.c (copy_blkmode_to_reg): Revert 254862.
22540 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22542 2018-04-06 Richard Biener <rguenther@suse.de>
22544 PR middle-end/85244
22545 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22546 after seeing a component reference with an adjacent field. Treat
22547 refs to arrays at struct end of external decls similar to
22548 refs to unconstrained commons.
22550 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22553 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22554 look through SAVE_EXPRs with non-side-effects argument. Adjust
22556 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22559 2018-04-06 Richard Biener <rguenther@suse.de>
22561 PR middle-end/85180
22562 * alias.c (find_base_term): New wrapper around find_base_term
22563 unwinding CSELIB_VAL_PTR changes.
22564 (find_base_term): Do not restore CSELIB_VAL_PTR during the
22567 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22569 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22571 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22572 constant definitions.
22573 ("nop"): lr 0,0 -> nopr r0
22574 ("nop_lr0", "nop_lr1"): New insn definitions.
22576 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22578 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22579 NDS32_V3PUSH_AVAILABLE_P macro.
22581 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
22582 Chung-Ju Wu <jasonwucj@gmail.com>
22584 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22585 (nds32*-*-*): Add float and fpu_config into supported_defaults.
22586 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22587 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22588 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22589 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22590 * config/nds32/constraints.md: New constraints and checking for hard
22591 float configuration.
22592 * config/nds32/iterators.md: New mode iterator and attribute for hard
22593 float configuration.
22594 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22596 * config/nds32/nds32-fpu.md: New file.
22597 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22598 deal with hard float code generation.
22599 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22601 (abi_type, float_reg_number): New enum type.
22602 * config/nds32/nds32-predicates.c: New predicates for hard float.
22603 * config/nds32/nds32-protos.h: Declare functions for hard float.
22604 * config/nds32/nds32.c: Implementation for hard float configuration.
22605 * config/nds32/nds32.h: Definitions for hard float configuration.
22606 * config/nds32/nds32.md: Include hard float machine description and
22607 modify patterns for hard float configuration.
22608 * config/nds32/nds32.opt: New options for hard float configuration.
22609 * config/nds32/predicates.md: New predicates for hard float
22612 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22614 * common/config/nds32/nds32-common.c
22615 (nds32_option_optimization_table): Enable -mreleax-hint by default.
22617 2018-04-05 Jakub Jelinek <jakub@redhat.com>
22619 PR middle-end/85195
22620 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22621 CONSTRUCTOR_ELT (ctor, ...)->value.
22623 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
22626 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22628 2018-04-05 Tom de Vries <tom@codesourcery.com>
22631 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22634 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22635 Kito Cheng <kito.cheng@gmail.com>
22637 * config/nds32/constraints.md (U33): Fine-tune checking condition.
22638 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22639 * config/nds32/nds32.h (nds32_16bit_address_type): Add
22640 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22642 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22643 Kito Cheng <kito.cheng@gmail.com>
22645 * config/nds32/constraints.md (Ufe): New memory constraint.
22646 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22647 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22648 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22650 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22651 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22653 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22655 * config/nds32/nds32.md: Use optimize_size in the condition for
22656 alu-shift instructions.
22658 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22660 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22662 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22664 * config/nds32/nds32.md (negsi2): Refine pattern.
22666 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22667 Chung-Ju Wu <jasonwucj@gmail.com>
22669 * config/nds32/iterators.md (shift_rotate): New code iterator.
22670 (shift): New code attribute.
22671 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22672 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22673 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22674 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22675 bit-wise operations.
22676 (andsi3, *andsi3): Ditto.
22677 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22678 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22679 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22680 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22681 nds32_ior_operand, nds32_xor_operand): New predicates.
22683 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22685 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22686 (addsi3, subsi3): ... this.
22688 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22690 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22692 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22694 * config/nds32/nds32.md: Adjust indention.
22696 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22698 * config/nds32/nds32.md (feature): New attribute.
22700 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22702 * config/nds32/nds32.md (subtype): New attribute.
22704 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
22707 * config/arm/arm-builtins.c (arm_expand_builtin): Change
22708 expansion to perform a bitwise AND of the argument followed by a
22709 boolean negation of the result.
22711 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
22713 PR rtl-optimization/84878
22714 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22715 the basic block. Assert the use reference is not artificial and that
22716 it has an associated insn.
22718 2018-04-04 Michael Matz <matz@suse.de>
22720 * builtins.c (compute_objsize): Pass correct operand
22721 to array_at_struct_end_p.
22723 2018-04-04 Richard Biener <rguenther@suse.de>
22726 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22727 from contexts for DINFO_LEVEL_TERSE and below.
22729 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22731 * config/nds32/nds32-doubleword.md (move_<mode>): Require
22732 resiter_operand condition.
22733 * config/nds32/nds32.md (*move<mode>): Ditto.
22735 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22736 Monk Chiang <sh.chiang04@gmail.com>
22738 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22740 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22742 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22744 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22745 Kito Cheng <kito.cheng@gmail.com>
22747 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22748 nds32_cond_code_str, output_cond_branch,
22749 output_cond_branch_compare_zero, nds32_expand_cbranch,
22750 nds32_expand_cstore, nds32_expand_movcc,
22751 nds32_output_cbranchsi4_equality_zero,
22752 nds32_output_cbranchsi4_equality_reg,
22753 nds32_output_cbranchsi4_equality_reg_or_const_int,
22754 nds32_output_cbranchsi4_greater_less_zero: New functions.
22755 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22756 nds32_expand_cstore, nds32_expand_movcc,
22757 nds32_output_cbranchsi4_equality_zero,
22758 nds32_output_cbranchsi4_equality_reg,
22759 nds32_output_cbranchsi4_equality_reg_or_const_int,
22760 nds32_output_cbranchsi4_greater_less_zero): Declare.
22761 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22762 nds32_rimm11s_operand): New predicates.
22763 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22764 * config/nds32/nds32.md: Rewrite all the branch and conditional move
22767 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22769 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22770 * config/nds32/nds32.md: Ditto.
22771 * config/nds32/pipelines.md: Ditto.
22773 2018-04-04 Richard Biener <rguenther@suse.de>
22775 PR tree-optimization/85168
22776 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22777 propagating abnormals.
22779 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22781 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22783 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22784 Kito Cheng <kito.cheng@gmail.com>
22786 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22787 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22788 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22789 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22790 * config/nds32/nds32.md (sibcall_internal): New.
22791 (sibcall_register): Remove.
22792 (sibcall_immediate): Remove.
22793 (sibcall_value_internal): New.
22794 (sibcall_value_register): Remove.
22795 (sibcall_value_immediate): Remove.
22796 * config/nds32/predicates.md (nds32_general_register_operand): New.
22797 (nds32_call_address_operand): New.
22799 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22801 PR rtl-optimization/85167
22802 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22803 bb_defs if *split_p, instead preinitialize it to NULL.
22805 PR tree-optimization/85156
22806 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22807 evaluating the argument multiple times.
22809 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
22811 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22813 (_mm_cvtpd_ps): Likewise.
22814 (_mm_cvttpd_epi32): Likewise.
22815 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22816 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22817 vector, pixel, and bool following altivec.h include.
22819 2018-04-03 Martin Sebor <msebor@redhat.com>
22821 * doc/extend.texi (Common Function Attributes): Clarify.
22822 (const attribute): Likewise.
22823 (pure attribute): Likewise.
22825 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22828 * config/i386/i386.c (ix86_expand_vector_set): Use
22829 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
22831 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
22833 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22834 instructions when changing rounding bits to preserve precision bits
22835 in the x87 control word.
22837 2018-04-03 Martin Liska <mliska@suse.cz>
22839 PR tree-optimization/82491
22840 * rtl.h (strip_offset_and_add): Replace += suboffset with
22841 poly_uint64 () + suboffset.
22843 2018-03-29 Martin Liska <mliska@suse.cz>
22844 Martin Jambor <mjambor@suse.cz>
22847 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22848 param_type is not an integral or pointer type.
22850 2018-04-03 Richard Biener <rguenther@suse.de>
22852 * sese.h (recompute_all_dominators): Remove.
22854 2018-04-02 Martin Sebor <msebor@redhat.com>
22856 * doc/invoke.texi (-Wrestrict): Fix typos.
22858 2018-04-02 Jim Wilson <jimw@sifive.com>
22860 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22861 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22862 (<optab>di3, <optab>si3_extend): Likewise.
22863 (<optab>si3_mask, <optab>si3_mask_1): New.
22864 (<optab>di3_mask, <optab>di3_mask_1): New.
22865 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22866 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22867 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22869 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
22871 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22874 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
22876 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22877 (nds32_canonicalize_comparison): New function.
22879 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22880 Kito Cheng <kito.cheng@gmail.com>
22881 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22883 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22884 * config/nds32/constants.md (unspec_volatile_element): Add
22885 UNSPEC_VOLATILE_RELAX_GROUP.
22886 * config/nds32/nds32-relax-opt.c: New file.
22887 * config/nds32/nds32-predicates.c
22888 (nds32_symbol_load_store_p): New function.
22889 * config/nds32/nds32-protos.h
22890 (nds32_symbol_load_store_p): Declare function.
22891 (make_pass_nds32_relax_opt): Declare new rtl pass function.
22892 * config/nds32/nds32.c
22893 (nds32_register_pass): New function to register pass.
22894 (nds32_register_passes): New function to register passes.
22895 * config/nds32/nds32.md (relax_group): New pattern.
22896 * config/nds32/nds32.opt (mrelax-hint): New option.
22897 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22899 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
22901 * config/nds32/t-nds32: Modify files dependency.
22903 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22905 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22906 (PROFILE_HOOK): Define its implementation.
22908 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22910 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22911 type and 32-bit size.
22913 2018-04-01 Jakub Jelinek <jakub@redhat.com>
22915 PR middle-end/85090
22916 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22917 (V_128_256): New mode iterator.
22918 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22919 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22920 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22922 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22923 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22925 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
22928 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22929 NaN inputs correctly.
22931 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
22934 * config/rs6000/vsx.md (??r): New mode attribute.
22935 (*vsx_mov<mode>_64bit): Use it.
22936 (*vsx_mov<mode>_32bit): Likewise.
22938 2018-03-30 Martin Sebor <msebor@redhat.com>
22940 PR tree-optimization/84818
22941 * builtins.c (check_access): Use warning_n.
22943 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22946 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22948 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22951 2018-03-30 Julia Koval <julia.koval@intel.com>
22954 * x86-tune.def (movx, partial_reg_dependency): Enable for
22957 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
22959 PR inline-asm/84985
22960 * lra-constraints.c (process_alt_operands): Move setting
22961 this_alternative_matches below.
22963 2018-03-29 Martin Liska <mliska@suse.cz>
22966 * doc/invoke.texi: Document how LTO works with debug info.
22967 Describe auto-load support of binutils. Mention 'x86-64'
22968 as valid option value of -march option.
22970 2018-03-29 Jakub Jelinek <jakub@redhat.com>
22972 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22975 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22976 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22977 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22980 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22983 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22984 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22985 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22986 for RS6000_BTM_POWERPC64.
22987 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22988 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22989 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22992 (DIVDEU): Likewise.
22994 2018-03-28 Carl Love <cel@us.ibm.com>
22997 2017-09-27 Carl Love <cel@us.ibm.com>
22999 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
23000 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
23001 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
23004 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23006 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
23007 instead of __vector bool.
23008 (_mm_max_pu8): Likewise.
23009 (_mm_min_pi16): Likewise.
23011 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23014 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
23015 (DIVWEUO): Likewise.
23016 (DIVDEO): Likewise.
23017 (DIVDEUO): Likewise.
23018 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
23019 DIVWEUO and DIVDEUO.
23020 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
23021 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
23022 (div_extend): Likewise.
23023 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
23025 (__builtin_divweuo): Likewise.
23026 (__builtin_divdeo): Likewise.
23027 (__builtin_divdeuo): Likewise.
23029 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23032 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
23033 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
23035 PR tree-optimization/82004
23036 * gimple-match-head.c (optimize_pow_to_exp): New function.
23037 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
23038 Don't fold to exp if optimize_pow_to_exp is false.
23040 2018-03-28 Martin Liska <mliska@suse.cz>
23043 * calls.c (initialize_argument_information): Fix trailing space.
23044 * common.opt: Fix typo and provide better explanation for
23045 -fsanitize-coverage option.
23046 * config/i386/i386.opt: Fix typo.
23048 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23049 Martin Liska <mliska@suse.cz>
23052 * gimplify.c (asan_poison_variable): Don't do the check for
23053 gimplify_omp_ctxp here.
23054 (gimplify_decl_expr): Do it here.
23055 (gimplify_target_expr): Likewise.
23057 2018-03-28 Martin Liska <mliska@suse.cz>
23060 * config/i386/i386.c (ix86_function_arg_advance): Do not call
23061 chkp_type_bounds_count if MPX is not enabled.
23063 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
23065 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
23067 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
23070 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
23071 function to create the function decl for complex long double
23072 multiply and divide for -mabi=ieeelongdouble.
23073 (init_float128_ieee): Call it.
23075 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
23078 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
23079 -fcf-protection=branch -mibt.
23080 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
23082 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23085 * config/arm/arm.c (arm_valid_symbolic_address): Handle
23086 arm_word_relocations.
23088 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
23091 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
23092 extern array declarations.
23094 2018-03-27 Richard Biener <rguenther@suse.de>
23096 PR middle-end/84067
23097 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
23098 explicit single_use checks.
23100 2018-03-27 Richard Biener <rguenther@suse.de>
23102 PR tree-optimization/85082
23103 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
23106 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23108 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
23109 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
23110 Turn on fasynchronous-unwind-tables and funwind-tables.
23112 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
23115 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
23116 (*bmi_blsr_<mode>_ccz): Ditto.
23118 2018-03-26 Tom de Vries <tom@codesourcery.com>
23120 PR tree-optimization/85063
23121 * omp-general.c (offloading_function_p): New function. Factor out
23123 * omp-offload.c (pass_omp_target_link::gate): ... here.
23124 * omp-general.h (offloading_function_p): Declare.
23125 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
23126 with attribute omp declare target for offloading functions.
23128 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
23130 PR tree-optimization/84005
23131 * tree-data-ref.h (get_base_for_alignment): Declare.
23132 * tree-data-ref.c (get_base_for_alignment_1): New function.
23133 (get_base_for_alignment): Likewise.
23134 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23135 get_base_for_alignment to find a suitable base object, instead
23136 of always using drb->base_address.
23138 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23140 PR inline-asm/85022
23141 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
23142 known size by default.
23144 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
23146 PR inline-asm/85030
23147 * lra-constraints.c (process_alt_operands): Don't match BLKmode
23148 and non BLKmode operands.
23150 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23153 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
23154 Clean up attributes.
23156 2018-03-23 Richard Biener <rguenther@suse.de>
23159 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
23160 we are going to emit early debug for LTO.
23162 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23164 PR inline-asm/85034
23165 * function.c (match_asm_constraints_1): Don't optimize if input
23166 doesn't satisfy general_operand predicate for output's mode.
23168 PR inline-asm/85022
23169 * alias.c (write_dependence_p): Don't require for x_canonicalized
23170 non-VOIDmode if x has VOIDmode.
23173 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23174 just don't try to optimize it rather than assert it never happens.
23176 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23178 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23179 macro expansions for definition of ST_INTERNAL_<mode> and
23180 LD_INTERNAL_<mode> builtins.
23181 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23183 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23185 (altivec_expand_st_builtin): Likewise.
23186 (altivec_expand_builtin): Remove calls to deleted functions.
23187 (rs6000_address_for_altivec): Delete this function.
23188 * config/rs6000/vector.md: Remove expands for
23189 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23191 2018-03-22 Sudakshina Das <sudi.das@arm.com>
23194 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23195 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23196 re-computing once computed.
23197 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23198 (arm_init_machine_status): Initialize
23199 machine->static_chain_stack_bytes.
23201 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23204 * doc/extend.texi: Add four new prototypes for vec_ld.
23205 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23206 definitions for more logical presentation.
23207 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23208 entries for V1TI variants of __builtin_altivec_ld builtin.
23209 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23210 handling of V1TI variant of LVX icode pattern.
23211 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23212 (rs6000_gimple_fold_builtin): Likewise.
23213 (altivec_init_builtins): Add code to define
23214 __builtin_altivec_lvx_v1ti function.
23216 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23218 PR inline-asm/84941
23219 * function.c (match_asm_constraints_1): Don't do the optimization
23220 if input isn't a REG, SUBREG, MEM or constant.
23222 2018-03-22 Tom de Vries <tom@codesourcery.com>
23224 PR tree-optimization/84956
23225 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23226 bb_has_abnormal_pred.
23228 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23231 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23232 DECL_INITIAL (decl) to decl at the end.
23233 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23234 adjust the comment.
23236 2018-03-21 Joseph Myers <joseph@codesourcery.com>
23238 * doc/extend.texi (__builtin_tgmath): Document when complex
23239 integer types are treated as _Complex _Float64.
23241 2018-03-21 Tom de Vries <tom@codesourcery.com>
23243 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23245 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23247 PR tree-optimization/84960
23248 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23249 if it is ENTRY block, move them into single succ of ENTRY in that case.
23251 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
23253 PR tree-optimization/84811
23254 * poly-int.h (poly_span_traits): Remove the T3 parameter and
23255 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23256 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23257 (known_subrange_p): Update accordingly. Cast each value involved
23258 in the size comparison, rather than casting the result of the
23261 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23263 PR tree-optimization/84982
23264 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23265 by flipping the least significant bit rather than all bits from
23266 bitpos to bitpos + bitsize - 1.
23268 2018-03-21 Nathan Sidwell <nathan@acm.org>
23270 * doc/extend.texi (Deprecated Features): Remove mention of
23271 long-deleted deprecations.
23273 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23276 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23277 * configure: Regenerate.
23279 2018-03-21 Tom de Vries <tom@codesourcery.com>
23281 PR tree-optimization/83126
23282 * tree-parloops.c (num_phis): New function.
23283 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23285 2018-03-21 Nathan Sidwell <nathan@acm.org>
23287 * doc/extend.texi (Deprecated Features): Update deprecated flags,
23288 mention anon-struct/union members and trailing attributes.
23290 2018-03-21 Bin Cheng <bin.cheng@arm.com>
23292 PR tree-optimization/84969
23293 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23294 builtin memset partitions if they set different rhs values.
23296 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23298 PR rtl-optimization/84989
23299 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23300 VEC_DUPLICATE with scalar result mode.
23302 2018-03-21 Martin Liska <mliska@suse.cz>
23305 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23306 not intended return statement.
23308 2018-03-21 Martin Liska <mliska@suse.cz>
23311 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23312 (chkp_find_bound_slots_1): Limit number of iterations.
23314 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
23317 * Minor grammar fixes for x86 options.
23319 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23322 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23323 holding REG_CFA_RESTORE notes, instead turn them into a USE.
23325 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
23328 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23329 (altivec_lvx_<mode>_1op): Likewise.
23330 (altivec_stvx_<mode>_2op): Likewise.
23331 (altivec_stvx_<mode>_1op): Likewise.
23332 (altivec_lvx_<VM2:mode>): New define_expand.
23333 (altivec_stvx_<VM2:mode>): Likewise.
23334 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23335 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23336 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23337 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23338 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23339 (rs6000_gen_lvx): Likewise.
23340 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23341 (altivec_expand_stv_builtin): Likewise.
23342 (altivec_expand_builtin): Likewise.
23343 * config/rs6000/vector.md: Likewise.
23345 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23348 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23351 2018-03-20 Richard Biener <rguenther@suse.de>
23354 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23355 sign-conversions as zero, fall back to standard scalar_stmt
23358 2018-03-20 Martin Liska <mliska@suse.cz>
23361 * predict.c (rebuild_frequencies): Handle case when we have
23362 PROFILE_ABSENT, but flag_guess_branch_prob is false.
23364 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23367 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23368 flag_section_anchors.
23369 * varasm.c (use_blocks_for_decl_p): Remove hack for
23370 dw2_force_const_mem.
23373 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23375 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
23376 be created, use lowpart_subreg of operands[0] rather than operands[0]
23378 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23379 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23380 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23381 and n constraint instead of aarch64_shift_imm_di and Usd.
23382 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23383 (*aarch64_<optab>_reg_minus<mode>3): ... this.
23385 2018-03-20 Sudakshina Das <sudi.das@arm.com>
23388 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23389 to favor GPR over NEON registers.
23390 (<shift>di3_neon): Likewise.
23392 2018-03-20 Tom de Vries <tom@codesourcery.com>
23395 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23396 (nvptx_process_pars): Emit bar.sync asap and alap.
23398 2018-03-20 Tom de Vries <tom@codesourcery.com>
23401 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23402 seen_label if seen_label is already set.
23404 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23407 * config/i386/i386.c (fold_builtin_cpu): For features above 31
23408 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23409 Use 1U instead of 1. Formatting fixes.
23412 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23413 instead of TREE_TYPE (s1) for the return value.
23415 2018-03-19 Jakub Jelinek <jakub@redhat.com>
23417 PR tree-optimization/84946
23418 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23419 bitsize + bitsize in poly_uint64 rather than poly_int64.
23422 * dwarf2asm.c: Include fold-const.c.
23423 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23424 of decl rather than decl itself.
23426 PR rtl-optimization/84643
23427 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23429 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
23432 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23433 calling assemble_variable.
23435 2018-03-19 Sudakshina Das <sudi.das@arm.com>
23438 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23439 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23441 2018-03-19 Jim Wilson <jimw@sifive.com>
23444 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23445 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23446 (riscv_first_stack_step): Likewise.
23447 (riscv_option_override): Use STACK_BOUNDARY instead of
23448 MIN_STACK_BOUNDARY.
23449 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23450 MIN_STACK_BOUNDARY.
23451 (BIGGEST_ALIGNMENT): Set to 128.
23452 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23453 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23456 2018-03-19 Richard Biener <rguenther@suse.de>
23458 PR tree-optimization/84933
23459 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23460 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23462 2018-03-19 Richard Biener <rguenther@suse.de>
23464 PR tree-optimization/84859
23465 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23466 (cond_if_else_store_replacement): Perform sinking operation on
23467 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23468 Generalize what a BB with a single eligible store is.
23470 2018-03-19 Richard Biener <rguenther@suse.de>
23472 PR tree-optimization/84929
23473 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23474 chrec_is_positive against non-chrec arg.
23476 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23479 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23481 2018-03-18 Martin Liska <mliska@suse.cz>
23483 PR rtl-optimization/84635
23484 * regrename.c (build_def_use): Use matches_mode only when
23487 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23489 PR tree-optimization/84913
23490 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23491 vectorize chains of COND_EXPRs.
23493 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23495 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23497 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23499 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23501 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23503 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23505 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23506 Kito Cheng <kito.cheng@gmail.com>
23508 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23509 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23510 (nds32_adjust_reg_alloc_order): New function.
23511 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23513 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23515 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23516 nds32_print_operand, nds32_print_operand_address): Use
23517 HOST_WIDE_INT_PRINT_DEC instead.
23519 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23521 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23523 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23526 * config/i386/i386.c (initial_ix86_tune_features,
23527 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23528 unsigned long long.
23529 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23530 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23531 rather than 1u << ix86_tune. Formatting fix.
23532 (ix86_option_override_internal): Change ix86_arch_mask from
23533 unsigned int to unsigned HOST_WIDE_INT, initialize to
23534 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23535 (ix86_function_specific_restore): Likewise.
23537 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23540 * postreload.c (reload_combine_recognize_pattern): Perform
23541 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23542 truncate_int_for_mode the result for the destination's mode.
23545 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23546 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23548 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23551 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23554 * lra-assigns.c (lra_split_hard_reg_for): Don't use
23555 regno_allocno_class_array and sorted_pseudos.
23556 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23557 insns where regno is used.
23559 2018-03-16 Martin Liska <mliska@suse.cz>
23562 * multiple_target.c (create_dispatcher_calls): Redirect
23563 reference in the symbol table.
23565 2018-03-16 Martin Liska <mliska@suse.cz>
23568 * multiple_target.c (create_dispatcher_calls): Redirect also
23571 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23575 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23576 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23577 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23579 2018-03-16 Julia Koval <julia.koval@intel.com>
23581 * doc/invoke.texi (Skylake Server): Add CLWB.
23582 Cannonlake): Remove CLWB.
23584 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23586 PR tree-optimization/84841
23587 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23589 (FLOAT_ONE_CONST_TYPE): Define.
23590 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23591 (sort_by_operand_rank): Put entries with higher constant_type last
23592 rather than first to match comments.
23594 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
23596 * config/nios2/nios2.md (movsi_internal): Fix thinko in
23599 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23602 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23603 check and use address of target always.
23605 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
23608 * config/i386/i386.c (indirect_thunk_needed): Update comments.
23609 (indirect_thunk_bnd_needed): Likewise.
23610 (indirect_thunks_used): Likewise.
23611 (indirect_thunks_bnd_used): Likewise.
23612 (indirect_return_needed): New.
23613 (indirect_return_bnd_needed): Likewise.
23614 (output_indirect_thunk_function): Add a bool argument for
23616 (output_indirect_thunk_function): Don't generate alias for
23617 function return thunk.
23618 (ix86_code_end): Call output_indirect_thunk_function to generate
23619 function return thunks.
23620 (ix86_output_function_return): Set indirect_return_bnd_needed
23621 and indirect_return_needed instead of indirect_thunk_bnd_needed
23622 and indirect_thunk_needed.
23624 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
23626 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23627 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23628 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23630 2018-03-15 David Malcolm <dmalcolm@redhat.com>
23631 Paul Hua <paul.hua.gm@gmail.com>
23634 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23636 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
23638 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23639 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23640 resp. SFmode cases.
23642 2018-03-15 Tamar Christina <tamar.christina@arm.com>
23645 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23646 instead of GET_MODE_SIZE when comparing Units.
23648 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
23651 * varasm.c (hash_section): Return an unchangeble hash value
23652 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23653 Return !aarch64_can_use_per_function_literal_pools_p ().
23655 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23658 * optabs.c (emit_conditional_move): Pass address of cmode's copy
23659 rather than address of cmode as last argument to prepare_cmp_insn.
23661 2018-03-15 Julia Koval <julia.koval@intel.com>
23663 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23664 F_AVX512VNNI, F_AVX512BITALG): New.
23666 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
23669 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
23670 insn for floating-point loads and stores.
23672 2018-03-14 Carl Love <cel@us.ibm.com>
23674 * config/rs6000/rs6000-c.c: Add macro definitions for
23675 ALTIVEC_BUILTIN_VEC_PERMXOR.
23676 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23677 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23678 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23679 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23681 * config/doc/extend.texi: Add prototypes for vec_permxor.
23683 2018-03-14 David Malcolm <dmalcolm@redhat.com>
23686 * diagnostic-show-locus.c (class layout_point): Convert m_line
23687 from int to linenum_type.
23688 (line_span::comparator): Use linenum "compare" function when
23689 comparing line numbers.
23690 (test_line_span): New function.
23691 (layout_range::contains_point): Convert param "row" from int to
23693 (layout_range::intersects_line_p): Likewise.
23694 (layout::will_show_line_p): Likewise.
23695 (layout::print_source_line): Likewise.
23696 (layout::should_print_annotation_line_p): Likewise.
23697 (layout::print_annotation_line): Likewise.
23698 (layout::print_leading_fixits): Likewise.
23699 (layout::annotation_line_showed_range_p): Likewise.
23700 (struct line_corrections): Likewise for field m_row.
23701 (line_corrections::line_corrections): Likewise for param "row".
23702 (layout::print_trailing_fixits): Likewise.
23703 (layout::get_state_at_point): Likewise.
23704 (layout::get_x_bound_for_row): Likewise.
23705 (layout::print_line): Likewise.
23706 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23707 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23708 * input.c (selftest::test_linenum_comparisons): New function.
23709 (selftest::input_c_tests): Call it.
23710 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23711 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23712 * selftest.h (ASSERT_GT): New macro.
23713 (ASSERT_GT_AT): New macro.
23714 (ASSERT_LT): New macro.
23715 (ASSERT_LT_AT): New macro.
23717 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
23719 PR rtl-optimization/84780
23720 * combine.c (distribute_links): Don't make a link based on pc_rtx.
23722 2018-03-14 Martin Liska <mliska@suse.cz>
23724 * tree.c (record_node_allocation_statistics): Use
23725 get_stats_node_kind.
23726 (get_stats_node_kind): New function extracted from
23727 record_node_allocation_statistics.
23728 (free_node): Use get_stats_node_kind.
23730 2018-03-14 Richard Biener <rguenther@suse.de>
23732 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23733 that the value-set of ANTIC_IN doesn't grow.
23736 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23738 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23739 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23741 2018-03-14 Julia Koval <julia.koval@intel.com>
23743 * config.gcc (icelake-client, icelake-server): New.
23745 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23746 (initial_ix86_arch_features): Ditto.
23747 (PTA_SKYLAKE): Add SGX.
23748 (PTA_ICELAKE): Remove.
23749 (PTA_ICELAKE_CLIENT): New.
23750 (PTA_ICELAKE_SERVER): New.
23751 (ix86_option_override_internal): Split up icelake on icelake client and
23753 (get_builtin_code_for_version): Ditto.
23754 (fold_builtin_cpu): Ditto.
23755 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23756 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23757 * config/i386/i386.h (processor_type): Ditto.
23758 * doc/invoke.texi: Ditto.
23760 2018-03-14 Jakub Jelinek <jakub@redhat.com>
23763 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23764 INTEGER_CST offset, add it together with bitpos / 8 and
23765 sign extend based on POINTER_SIZE.
23769 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
23772 * config/i386/constraints.md (Yc): New register constraint.
23773 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23774 Use Yc constraint for alternative 2 of operand 0. Remove
23775 preferred_for_speed attribute.
23777 2018-03-14 Richard Biener <rguenther@suse.de>
23779 PR tree-optimization/84830
23780 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23781 with the old one to avoid oscillations.
23783 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
23786 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23788 (assign_by_spills): Return a flag of reload assignment failure.
23789 Do not process the reload assignment failures. Do not spill other
23790 reload pseudos if they has the same reg class. Update n if
23792 (lra_assign): Add a return arg. Set up from the result of
23793 assign_by_spills call.
23794 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23795 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23796 usage_insns if it is not NULL.
23797 (spill_hard_reg_in_range): New function.
23798 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23799 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23800 function prototypes.
23801 (lra_assign): Change prototype.
23802 * lra.c (lra): Add code to deal with fails by splitting hard reg
23805 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
23807 * config/riscv/riscv.opt (mrelax): New option.
23808 * config/riscv/riscv.c (riscv_file_start): Emit ".option
23809 "norelax" when riscv_mrelax is disabled.
23810 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23812 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23815 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23816 reassociation for int modes.
23818 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23820 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23821 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23823 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23824 * config/aarch64/aarch64-sve.md
23825 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23826 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23827 (*extend<mode><Vwide>2): Rename to...
23828 (aarch64_sve_extend<mode><Vwide>2): ...this.
23829 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23830 renaming the old pattern to...
23831 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
23833 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23834 define_expand, renaming the old pattern to...
23835 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23836 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23837 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23838 account when deciding which SVE instruction the optab should use.
23839 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23841 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23843 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23844 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23845 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23846 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23847 (tlsdesc_small_<mode>): Turn a define_expand and use
23848 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
23849 (tlsdesc_small_advsimd_<mode>): ...this.
23850 (tlsdesc_small_sve_<mode>): New pattern.
23852 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23854 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23855 (UNSPEC_UMUL_HIGHPART): New constants.
23856 (MUL_HIGHPART): New int iteraor.
23857 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23858 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23860 (*<su>mul<mode>3_highpart): New define_insn.
23862 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23865 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23868 2018-03-13 Martin Liska <mliska@suse.cz>
23871 * (sem_item_optimizer::sem_item_optimizer): Initialize new
23873 (sem_item_optimizer::~sem_item_optimizer): Release it.
23874 (sem_item_optimizer::merge_classes): Register variable aliases.
23875 (sem_item_optimizer::fixup_pt_set): New function.
23876 (sem_item_optimizer::fixup_points_to_sets): Likewise.
23877 * ipa-icf.h: Declare new variables and functions.
23879 2018-03-13 Jakub Jelinek <jakub@redhat.com>
23881 PR middle-end/84834
23882 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23883 integer_pow2p@2 and test integer_pow2p in condition.
23884 (A < 0 ? C : 0): Similarly for @1.
23886 PR middle-end/84831
23887 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23888 characters starting at p contain '\0' character, don't look beyond
23892 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23893 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23896 * reg-stack.c (change_stack): Change update_end var from int to
23897 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23898 also call set_block_for_insn on the newly added insns and rescan.
23901 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23902 on the last operand.
23905 * tree.c (stabilize_reference_1): Return save_expr (e) for
23906 STATEMENT_LIST even if it doesn't have side-effects.
23908 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
23910 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23912 2018-03-12 Renlin Li <renlin.li@arm.com>
23914 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23915 aarch64_output_scalar_simd_mov_immediate.
23917 2018-03-12 Martin Sebor <msebor@redhat.com>
23919 PR tree-optimization/83456
23920 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23921 for perfectly overlapping calls to memcpy.
23922 (gimple_fold_builtin_memory_chk): Same.
23923 (gimple_fold_builtin_strcpy): Handle no-warning.
23924 (gimple_fold_builtin_stxcpy_chk): Same.
23925 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23927 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23929 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23930 parameter. Use it for SFmode.
23931 (rs6000_function_arg_advance_1): Adjust.
23932 (rs6000_function_arg): Adjust.
23933 (rs6000_gimplify_va_arg): Pass false for that new parameter.
23935 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23937 PR rtl-optimization/84169
23938 PR rtl-optimization/84780
23939 * combine.c (can_combine_p): Check for a 2-insn combination whether
23940 the destination register is used between the two insns, too.
23942 2018-03-12 Richard Biener <rguenther@suse.de>
23944 PR tree-optimization/84803
23945 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23946 for refs DR analysis didn't process.
23948 2018-03-12 Richard Biener <rguenther@suse.de>
23950 PR tree-optimization/84777
23951 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23952 force-vectorize loops ignore whether we are optimizing for size.
23954 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
23956 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23957 (TARGET_MD_ASM_ADJUST): Define.
23959 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
23960 Kito Cheng <kito.cheng@gmail.com>
23961 Chung-Ju Wu <jasonwucj@gmail.com>
23963 * config/nds32/nds32.c (nds32_compute_stack_frame,
23964 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23965 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23966 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23967 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23968 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23969 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23970 * config/nds32/nds32.md (prologue, epilogue): Use macro
23971 NDS32_V3PUSH_AVAILABLE_P to do checking.
23973 2018-03-11 Jakub Jelinek <jakub@redhat.com>
23976 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23977 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23978 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
23979 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
23980 addition of most attributes on !orig_type_die or the attribute not
23981 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23983 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23984 Chung-Ju Wu <jasonwucj@gmail.com>
23986 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23987 __NDS32_VH__ macro.
23988 * config/nds32/nds32.opt (mvh): New option.
23990 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23991 Chung-Ju Wu <jasonwucj@gmail.com>
23993 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23995 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23996 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23999 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24000 Chung-Ju Wu <jasonwucj@gmail.com>
24002 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
24004 * config/nds32/nds32-multiple.md (strlensi): New pattern.
24005 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
24007 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
24008 Kito Cheng <kito.cheng@gmail.com>
24009 Chung-Ju Wu <jasonwucj@gmail.com>
24011 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
24012 UNSPEC_FFMISM and UNSPEC_FLMISM.
24013 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
24014 for ffb, ffmism and flmism.
24015 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
24016 (unspec_ffmism): Ditto.
24017 (unspec_flmism): Ditto.
24018 (nds32_expand_builtin_impl): Check if string extension is available.
24019 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
24020 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
24022 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
24025 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24028 * lra-assigns.c (assign_by_spills): Return a flag of reload
24029 assignment failure. Do not process the reload assignment
24030 failures. Do not spill other reload pseudos if they has the same
24032 (lra_assign): Add a return arg. Set up from the result of
24033 assign_by_spills call.
24034 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24035 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24036 usage_insns if it is not NULL.
24037 (spill_hard_reg_in_range): New function.
24038 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24039 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24040 function prototypes.
24041 (lra_assign): Change prototype.
24042 * lra.c (lra): Add code to deal with fails by splitting hard reg
24045 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
24048 * config/i386/i386.opt: Replace Enforcment with Enforcement.
24050 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
24053 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
24054 (dw_val_node): Add val_symbolic_view.
24055 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
24056 (symview_upper_bound): New.
24057 (new_line_info_table): Initialize symviews_since_reset.
24058 (dwarf2out_source_line): Count symviews_since_reset and set
24059 symview_upper_bound.
24060 (dw_val_equal_p): Handle symview.
24061 (add_AT_symview): New.
24062 (print_dw_val): Handle symview.
24063 (attr_checksum, attr_checksum_ordered): Likewise.
24064 (same_dw_val_p, size_of_die): Likewise.
24065 (value_format, output_die): Likewise.
24066 (add_high_low_attributes): Use add_AT_symview for entry_view.
24067 (dwarf2out_finish): Reset symview_upper_bound, clear
24070 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
24073 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
24074 Add strict argument and use it.
24075 (rs6000_split_multireg_move): Update for new strict argument.
24076 (mem_operand_gpr): Disallow all non-offsettable addresses.
24077 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
24079 2018-03-09 Jakub Jelinek <jakub@redhat.com>
24082 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
24083 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
24084 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
24087 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
24088 decl, use remap_type if we want to use the type.
24090 2018-03-09 Martin Sebor <msebor@redhat.com>
24092 PR tree-optimization/84526
24093 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24095 (builtin_access::generic_overlap): Be prepared to handle non-array
24098 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
24100 PR rtl-optimization/84682
24101 * lra-constraints.c (process_address_1): Check is_address flag
24102 for address constraints.
24103 (process_alt_operands): Likewise.
24104 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
24105 preprocess_constraints.
24106 * recog.h (preprocess_constraints): Add oploc parameter.
24108 * recog.c (preprocess_constraints): Test address_operand for
24109 CT_ADDRESS constraints.
24111 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24114 * lra-assigns.c (assign_by_spills): Return a flag of reload
24115 assignment failure. Do not process the reload assignment
24116 failures. Do not spill other reload pseudos if they has the same
24118 (lra_assign): Add a return arg. Set up from the result of
24119 assign_by_spills call.
24120 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24121 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24122 usage_insns if it is not NULL.
24123 (spill_hard_reg_in_range): New function.
24124 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24125 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24126 function prototypes.
24127 (lra_assign): Change prototype.
24128 * lra.c (lra): Add code to deal with fails by splitting hard reg
24131 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24134 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
24135 Accept complain bool parameter. Only emit errors if it is true.
24136 (arm_parse_cpu_option_name): Likewise.
24137 (arm_target_thumb_only): Adjust callers of the above.
24138 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
24139 prototype to take a default true bool parameter.
24140 (arm_parse_arch_option_name): Likewise.
24142 2018-03-09 David Malcolm <dmalcolm@redhat.com>
24143 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
24147 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
24148 * configure: Regenerate.
24149 * configure.ac ("linker --version-script option"): New.
24150 ("linker soname option"): New.
24152 2018-03-09 Richard Biener <rguenther@suse.de>
24154 PR tree-optimization/84775
24155 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
24156 immediate uses of predicate stmts and mark them modified.
24159 PR tree-optimization/84178
24160 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24162 (version_loop_for_if_conversion): Delay update_ssa call.
24163 (tree_if_conversion): Delay update_ssa until after predicate
24166 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
24169 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24170 when the function accesses prior frames.
24172 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24175 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24176 gen_llsym, otherwise call maybe_gen_llsym.
24178 PR inline-asm/84742
24179 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24180 has ',' character inside of it.
24182 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24185 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24186 as clobbering CC_REGNUM.
24188 2018-03-08 Richard Biener <rguenther@suse.de>
24190 PR middle-end/84552
24191 * tree-scalar-evolution.c: Include tree-into-ssa.h.
24192 (follow_copies_to_constant): Do not follow SSA names registered
24195 2018-03-08 Richard Biener <rguenther@suse.de>
24197 PR tree-optimization/84178
24198 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24200 (version_loop_for_if_conversion): Delay update_ssa call.
24201 (tree_if_conversion): Delay update_ssa until after predicate
24204 2018-03-08 David Malcolm <dmalcolm@redhat.com>
24206 PR tree-optimization/84178
24207 * tree-if-conv.c (release_bb_predicate): Remove the
24208 the assertion that the stmts have NULL use_ops.
24209 Discard the statements, asserting that they haven't
24210 yet been added to a BB.
24212 2018-03-08 Richard Biener <rguenther@suse.de>
24214 PR tree-optimization/84746
24215 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24216 (phi_translate): Pass in destination ANTIC_OUT set.
24217 (phi_translate_1): Likewise. For a simplified result lookup
24218 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24219 (phi_translate_set): Adjust.
24220 (do_pre_regular_insertion): Likewise.
24221 (do_pre_partial_partial_insertion): Likewise.
24223 2018-03-08 Martin Liska <mliska@suse.cz>
24225 PR gcov-profile/84735
24226 * doc/gcov.texi: Document usage of profile files.
24227 * gcov-io.h: Document changes in the format.
24229 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
24233 * dwarf2out.c (struct dw_line_info_table): Update comments for
24235 (FORCE_RESET_NEXT_VIEW): New.
24236 (FORCE_RESETTING_VIEW_P): New.
24237 (RESETTING_VIEW_P): Check for -1 too.
24238 (ZERO_VIEW_P): Likewise.
24239 (new_line_info_table): Force-reset next view.
24240 (dwarf2out_begin_function): Likewise.
24241 (dwarf2out_source_line): Simplify zero_view_p initialization.
24242 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24243 view directly. Omit view when omitting .loc at line 0.
24245 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24247 PR tree-optimization/84740
24248 * tree-switch-conversion.c (process_switch): Call build_constructors
24249 only if info.phi_count is non-zero.
24251 PR tree-optimization/84739
24252 * tree-tailcall.c (find_tail_calls): Check call arguments against
24253 DECL_ARGUMENTS (current_function_decl) rather than
24254 DECL_ARGUMENTS (func) when checking for tail recursion.
24256 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24258 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24259 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24260 Volker Reichelt's entry and add entries for people that perform
24261 GCC fuzzy testing and report numerous bugs.
24263 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
24266 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24267 readonly data in sdata, if that is disabled.
24268 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24269 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24270 -mreadonly-in-sdata option.
24272 2018-03-07 Martin Sebor <msebor@redhat.com>
24274 PR tree-optimization/84468
24275 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24276 basic block when looking for nul assignment.
24278 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
24281 * except.h (output_function_exception_table): Adjust prototype.
24282 * except.c (output_function_exception_table): Remove FNNAME parameter
24283 and add SECTION parameter. Ouput one part of the table at a time.
24284 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24285 the first part of the exception table and emit unwind directives.
24286 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24287 (i386_pe_seh_cold_init): Likewise.
24288 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24289 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24290 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24291 (ix86_output_call_insn): Emit a nop in one more case for SEH.
24292 * config/i386/winnt.c: Include except.h.
24293 (struct seh_frame_state): Add reg_offset, after_prologue and
24294 in_cold_section fields.
24295 (i386_pe_seh_end_prologue): Set seh->after_prologue.
24296 (i386_pe_seh_cold_init): New function.
24297 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24298 to seh->in_cold_section.
24299 (seh_emit_push): Record the offset of the push.
24300 (seh_emit_save): Record the offet of the save.
24301 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24302 Test seh->after_prologue to disregard the epilogue.
24303 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24304 (i386_pe_end_cold_function): New function.
24306 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24309 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24310 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24313 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24315 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24316 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24318 PR middle-end/84723
24319 * multiple_target.c: Include tree-inline.h and intl.h.
24320 (expand_target_clones): Diagnose and fail if node->definition and
24321 !tree_versionable_function_p (node->decl).
24323 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
24325 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24327 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24328 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24329 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24331 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24334 * combine.c (try_combine): Use reg_or_subregno instead of handling
24335 just paradoxical SUBREGs and REGs.
24337 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
24339 * config/arc/arc.c (arc_finalize_pic): Remove function.
24340 (arc_must_save_register): We use single base PIC register, remove
24341 checks to save/restore the PIC register.
24342 (arc_expand_prologue): Likewise.
24343 * config/arc/arc-protos.h (arc_set_default_type_attributes):
24345 (arc_verify_short): Likewise.
24346 (arc_attr_type): Likewise.
24347 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24348 (walk_stores): Likewise.
24349 (arc_address_cost): Make it static.
24350 (arc_verify_short): Likewise.
24351 (branch_dest): Likewise.
24352 (arc_attr_type): Likewise.
24353 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24354 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24355 (arc_final_prescan_insn): Remove inserting the nops due to
24356 hardware hazards. It is done in reorg step.
24357 (insn_length_variant_t): Remove.
24358 (insn_length_parameters_t): Likewise.
24359 (arc_insn_length_parameters): Likewise.
24360 (arc_get_insn_variants): Likewise.
24361 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24363 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24365 PR inline-asm/84683
24366 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24369 PR tree-optimization/84687
24370 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24372 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24374 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24376 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24377 Rename to ppc_speculation_barrier.
24378 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24379 __builtin_ppc_speculation_barrier.
24381 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24384 * combine.c (combine_simplify_rtx): Don't try to simplify if
24385 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24388 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
24390 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24391 to 32 bytes when compiling for POWER9.
24393 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24396 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24397 regparm >= 3 with no arg reg available also for calls with
24398 flag_force_indirect_call. Pass decl to ix86_function_regparm.
24401 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24403 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
24405 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
24408 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24410 2018-03-05 Richard Biener <rguenther@suse.de>
24412 PR tree-optimization/84486
24413 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24414 When inserting a __builtin_assume_aligned call set the LHS
24415 SSA name alignment info accordingly.
24417 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
24419 PR tree-optimization/84114
24420 * config/aarch64/aarch64.c (aarch64_reassociation_width)
24421 Avoid reassociation of FLOAT_MODE addition.
24423 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
24425 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24426 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24427 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24428 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24429 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24430 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24431 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24433 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24434 __builtin_ia32_wbinvd): New builtins.
24435 (SPECIAL_ARGS2): New.
24436 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24437 (SPECIAL_ARGS2): New.
24438 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24439 (ix86_valid_target_attribute_inner_p): Ditto.
24440 (ix86_init_mmx_sse_builtins): Add special_args2.
24441 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24442 TARGET_WBNOINVD_P): New.
24443 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24444 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24445 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24446 * config/i386/immintrin.h (_wbinvd): New intrinsic.
24447 * config/i386/pconfigintrin.h: New file.
24448 * config/i386/wbnoinvdintrin.h: Ditto.
24449 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24451 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24453 2018-03-05 Richard Biener <rguenther@suse.de>
24455 PR tree-optimization/84670
24456 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24458 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24459 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24460 (compute_antic_aux): Only assert the number of values in ANTIC_IN
24461 doesn't grow if all successors (recursively) were visited at least
24464 2018-03-05 Richard Biener <rguenther@suse.de>
24466 PR tree-optimization/84650
24467 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24468 if executed in the loop pipeline.
24470 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24472 * doc/configfiles.texi (Configuration Files): Move info about
24473 conditionalizing $target-protos.h to...
24474 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24475 differs from $target-protos.h.
24477 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24478 Chung-Ju Wu <jasonwucj@gmail.com>
24480 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24481 * config/nds32/nds32-multiple.md (setmemsi): Define.
24482 * config/nds32/nds32-memory-manipulation.c
24483 (nds32_gen_dup_4_byte_to_word_value): New.
24484 (emit_setmem_word_loop): New.
24485 (emit_setmem_byte_loop): New.
24486 (nds32_expand_setmem_loop): New.
24487 (nds32_expand_setmem_loop_v3m): New.
24488 (nds32_expand_setmem_unroll): New.
24489 (nds32_expand_setmem): New.
24491 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24492 Chung-Ju Wu <jasonwucj@gmail.com>
24494 * config/nds32/nds32-memory-manipulation.c
24495 (nds32_emit_load_store): New.
24496 (nds32_emit_post_inc_load_store): New.
24497 (nds32_emit_mem_move): New.
24498 (nds32_emit_mem_move_block): New.
24499 (nds32_expand_movmemsi_loop_unknown_size): New.
24500 (nds32_expand_movmemsi_loop_known_size): New.
24501 (nds32_expand_movmemsi_loop): New.
24502 (nds32_expand_movmemsi_unroll): New.
24503 (nds32_expand_movmemqi): Rename ...
24504 (nds32_expand_movmemsi): ... to this.
24505 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24506 (movmemsi): ... to this.
24507 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24508 (nds32_expand_movmemsi): ... to this.
24510 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24511 Monk Chiang <sh.chiang04@gmail.com>
24512 Chung-Ju Wu <jasonwucj@gmail.com>
24514 * config/nds32/nds32-protos.h
24515 (nds32_expand_load_multiple): New arguments.
24516 (nds32_expand_store_multiple): Ditto.
24517 (nds32_valid_multiple_load_store): Rename ...
24518 (nds32_valid_multiple_load_store_p): ... to this.
24519 * config/nds32/nds32-memory-manipulation.c
24520 (nds32_expand_load_multiple): Refine implementation.
24521 (nds32_expand_store_multiple): Ditto.
24522 * config/nds32/nds32-multiple.md
24523 (load_multiple): Update nds32_expand_load_multiple interface.
24524 (store_multiple): Update nds32_expand_store_multiple interface.
24525 * config/nds32/nds32-predicates.c
24526 (nds32_valid_multiple_load_store): Rename ...
24527 (nds32_valid_multiple_load_store_p): ... to this and refine
24529 * config/nds32/predicates.md
24530 (nds32_load_multiple_and_update_address_operation): New predicate.
24531 (nds32_store_multiple_and_update_address_operation): New predicate.
24533 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24534 Chung-Ju Wu <jasonwucj@gmail.com>
24536 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24537 (combo): New attribute.
24538 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24540 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24542 * config/nds32/nds32.opt: Change -mcmodel= default value.
24544 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24545 Monk Chiang <sh.chiang04@gmail.com>
24546 Chung-Ju Wu <jasonwucj@gmail.com>
24548 * config/nds32/constants.md (unspec_element): New enum.
24549 * config/nds32/constraints.md (Umw): New constraint.
24550 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24551 * config/nds32/nds32-intrinsic.md: Likewise.
24552 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24553 (nds32_valid_smw_lwm_base_p): New.
24554 (nds32_output_smw_single_word): New.
24555 (nds32_output_lmw_single_word): New.
24556 (nds32_expand_unaligned_load): New.
24557 (nds32_expand_unaligned_store): New.
24558 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24559 (nds32_output_smw_single_word): Declare.
24560 (nds32_output_lmw_single_word): Declare.
24561 (nds32_expand_unaligned_load): Declare.
24562 (nds32_expand_unaligned_store): Declare.
24563 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24564 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24565 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24566 NDS32_BUILTIN_UASTORE_DW.
24567 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24570 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
24571 Kito Cheng <kito.cheng@gmail.com>
24572 Chung-Ju Wu <jasonwucj@gmail.com>
24574 * config/nds32/nds32-intrinsic.c
24575 (nds32_expand_builtin_null_ftype_reg): Delete.
24576 (nds32_expand_builtin_reg_ftype_imm): Ditto.
24577 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24578 (nds32_read_argument): New.
24579 (nds32_legitimize_target): Ditto.
24580 (nds32_legitimize_argument): Ditto.
24581 (nds32_check_constant_argument): Ditto.
24582 (nds32_expand_unop_builtin): Ditto.
24583 (nds32_expand_unopimm_builtin): Ditto.
24584 (nds32_expand_binop_builtin): Ditto.
24585 (nds32_builtin_decl_impl): Ditto.
24586 (builtin_description): Ditto.
24587 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24588 (nds32_init_builtins_impl): Ditto.
24589 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24590 (nds32_builtin_decl): New.
24591 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24592 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24594 2018-03-02 Jeff Law <law@redhat.com>
24596 * reorg.c (stop_search_p): Handle DEBUG_INSN.
24597 (redundant_insn, fill_simple_delay_slots): Likewise.
24598 (fill_slots_from_thread): Likewise.
24599 * resource.c (mark_referenced_resources): Likewise.
24600 (mark_set_resources, find_dead_or_set_registers): Likewise.
24602 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24604 * substring-locations.h (format_warning_va): Formatting fix for
24605 ATTRIBUTE_GCC_DIAG.
24606 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24608 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24609 * substring-locations.c: Include intl.h.
24610 (format_warning_va): Turned into small wrapper around
24611 format_warning_n_va, renamed to ...
24612 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24613 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24615 (format_warning_at_substring_n): New function.
24616 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24617 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
24618 format_warning_at_substring with just a shorter name instead of
24619 const function pointer.
24620 (fmtwarn_n): New function.
24621 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24622 appropriate, get rid of all the fmtstr temporaries, move conditionals
24623 with G_() wrapped string literals directly into fmtwarn arguments,
24624 cast dir.len to (int), formatting fixes.
24626 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
24628 * doc/invoke.texi: Remove "Cilk Plus" references.
24630 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24631 Richard Biener <rguenther@suse.de>
24634 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24635 for error or warning attributes if CALL_FROM_THUNK_P is set.
24638 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24641 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24642 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24645 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24646 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24648 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24649 instead of -1U in last predictors element's probability member.
24651 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
24654 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24655 arguments if they are comparable.
24657 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24659 PR tree-optimization/84634
24660 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24661 masks and masked_loop_p with a single loop_masks, making sure it's
24662 null for bb vectorization.
24664 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24666 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24667 (vect_analyze_data_ref_access): Use loop->safe_len rather than
24668 loop->force_vectorize to check whether there is no alias.
24670 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24673 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24675 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24677 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24678 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24679 instead of a loop around prev_real_insn.
24680 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24683 PR inline-asm/84625
24684 * config/i386/i386.c (ix86_print_operand): Use conditional
24685 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24688 2018-03-02 Richard Biener <rguenther@suse.de>
24690 PR tree-optimization/84427
24691 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24692 (bitmap_set_subtract_values): Rewrite to handle multiple
24695 (prune_clobbered_mems): Likewise.
24696 (phi_translate): Take edge instead of pred/phiblock.
24697 (phi_translate_1): Likewise.
24698 (phi_translate_set): Likewise. Insert all translated
24699 exprs for a value into the set, keeping possibly multiple
24700 expressions per value.
24701 (compute_antic_aux): Adjust for phi_translate changes.
24702 When intersecting union the expressions and prune those
24703 not in the final value set, keeping possibly multiple
24704 expressions per value. Do not use value-insertion
24705 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24706 all expressions. Add verification that the value-sets
24707 only shrink during iteration.
24708 (compute_partial_antic_aux): Adjust for the phi_translate changes.
24709 (do_pre_regular_insertion): Likewise.
24710 (do_pre_partial_partial_insertion): Likewise.
24712 2018-03-02 Richard Biener <rguenther@suse.de>
24715 * config/darwin.c (saved_debug_info_level): New static global.
24716 (darwin_asm_lto_start): Disable debug info generation for LTO out.
24717 (darwin_asm_lto_end): Restore debug info generation settings.
24719 2018-03-01 Martin Liska <mliska@suse.cz>
24722 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24723 volatile arguments.
24725 2018-03-01 Richard Biener <rguenther@suse.de>
24728 * dwarf2out.c (gen_variable_die): Properly handle late VLA
24729 type annotation with LTO when debug was disabled at compile-time.
24731 2018-03-01 Matthew Fortune <mfortune@gmail.com>
24733 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24735 (mips_final_postscan_insn): Likewise.
24737 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
24739 PR rtl-optimization/84528
24740 * alias.c (init_alias_target): Add commentary.
24741 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24742 a unique base value if the frame pointer is not eliminated
24743 to the stack pointer.
24745 2018-03-01 Tom de Vries <tom@codesourcery.com>
24747 PR rtl-optimization/83327
24748 * lra-int.h (hard_regs_spilled_into): Declare.
24749 * lra.c (hard_regs_spilled_into): Define.
24750 (init_reg_info): Init hard_regs_spilled_into.
24751 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24752 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24753 (process_bb_lives): Handle hard_regs_spilled_into.
24754 (lra_create_live_ranges_1): Before doing liveness propagation, clear
24755 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24757 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
24759 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24760 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24761 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24762 * config/rs6000/aix72.h: New file.
24764 2018-02-28 Jakub Jelinek <jakub@redhat.com>
24766 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24767 instead of warning_at with conditional singular and plural messages
24771 * stor-layout.c (update_alignment_for_field): For
24772 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24773 && !DECL_PACKED (field), do the alignment update, just use
24774 only desired_align instead of MAX (type_align, desired_align)
24776 (place_field): Don't do known_align < desired_align handling
24777 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24778 is non-NULL, instead do it after rli->prev_field handling and
24779 only if not within a bitfield word. For DECL_PACKED (field)
24780 use type_align of BITS_PER_UNIT.
24782 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
24784 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24785 superfluous parentheses and trailing spaces.
24787 2018-02-28 Richard Biener <rguenther@suse.de>
24789 PR tree-optimization/84584
24790 * graphite-scop-detection.c (scop_detection::add_scop): Discard
24791 SCoPs with fake exit edge.
24793 2018-02-28 Martin Liska <mliska@suse.cz>
24796 * timevar.c (timer::print): Fix format to properly print 100%
24799 2018-02-28 Richard Biener <rguenther@suse.de>
24801 PR middle-end/84607
24802 * genmatch.c (capture_info::walk_match): Do not mark
24803 captured expressions without operands as expr_p given
24804 they act more like predicates and should be subject to
24805 "lost tail" side-effect preserving.
24807 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
24809 PR rtl-optimization/81611
24810 * auto-inc-dec.c (attempt_change): Move dead note from
24811 mem_insn if it's the next use of regno
24812 (find_address): Take address use of reg holding
24813 non-incremented value. Add parm to limit search to the named
24815 (merge_in_block): Attempt to use a mem insn that is the next
24816 use of the original regno.
24818 2018-02-27 Martin Sebor <msebor@redhat.com>
24821 * doc/invoke.texi (-Wmissing-attributes): New option.
24822 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24824 2018-02-27 Martin Sebor <msebor@redhat.com>
24826 PR translation/84207
24827 * diagnostic-core.h (warning_n, error_n, inform_n): Change
24828 n argument to unsigned HOST_WIDE_INT.
24829 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24830 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
24831 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24832 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24834 2018-02-27 Richard Biener <rguenther@suse.de>
24836 PR tree-optimization/84512
24837 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24838 Do not use the estimate returned from record_stmt_cost for
24839 the scalar iteration cost but sum properly using add_stmt_cost.
24841 2018-02-27 Richard Biener <rguenther@suse.de>
24843 PR tree-optimization/84466
24844 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24845 Adjust last change to less strictly validate use operands.
24847 2018-02-27 Martin Liska <mliska@suse.cz>
24849 PR gcov-profile/84548
24850 * gcov.c (process_file): Allow partial overlap and consider it
24851 also as group functions.
24852 (output_lines): Properly calculate range of lines for a group.
24854 2018-02-27 Martin Liska <mliska@suse.cz>
24856 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24857 'ggc' suffixes. Change first column width.
24858 (timer::print): Fix formatting of the column.
24860 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
24862 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24863 preserve inline entry blocks for the sake of debug inline
24864 entry point markers alone.
24865 (remove_unused_locals): Suggest in comments a better place to
24866 force the preservation of inline entry blocks that are
24867 otherwise unused, but do not preserve them.
24869 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24871 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24873 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24876 * config/i386/constraints.md (Bs): Replace
24877 ix86_indirect_branch_register with
24878 TARGET_INDIRECT_BRANCH_REGISTER.
24880 * config/i386/i386.md (indirect_jump): Likewise.
24881 (tablejump): Likewise.
24882 (*sibcall_memory): Likewise.
24883 (*sibcall_value_memory): Likewise.
24884 Peepholes of indirect call and jump via memory: Likewise.
24885 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24886 (*sibcall_value_GOT_32): Likewise.
24887 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24888 (GOT_memory_operand): Likewise.
24889 (call_insn_operand): Likewise.
24890 (sibcall_insn_operand): Likewise.
24891 (GOT32_symbol_operand): Likewise.
24892 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24894 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24896 PR rtl-optimization/83496
24897 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24898 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
24899 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24900 redundant insn, if any.
24901 (relax_delay_slots): Likewise.
24902 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24904 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
24906 PR tree-optimization/83965
24907 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24908 that grouped statements are part of a reduction chain. Return
24909 true if the statement is not marked as a reduction itself but
24910 is part of a group.
24911 (vect_recog_dot_prod_pattern): Don't check whether the statement
24912 is part of a group here.
24913 (vect_recog_sad_pattern): Likewise.
24914 (vect_recog_widen_sum_pattern): Likewise.
24916 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24919 * final.c (rest_of_clean_state): Also look for calls inside sequences.
24921 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24924 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24926 (ix86_output_indirect_function_return): New prototype.
24927 (ix86_split_simple_return_pop_internal): Likewise.
24928 * config/i386/i386.c (indirect_return_via_cx): New.
24929 (indirect_return_via_cx_bnd): Likewise.
24930 (indirect_thunk_name): Handle return va CX_REG.
24931 (output_indirect_thunk_function): Create alias for
24932 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24933 (ix86_output_indirect_jmp): Remove the bool argument.
24934 (ix86_output_indirect_function_return): New function.
24935 (ix86_split_simple_return_pop_internal): Likewise.
24936 * config/i386/i386.md (*indirect_jump): Don't pass false
24937 to ix86_output_indirect_jmp.
24938 (*tablejump_1): Likewise.
24939 (simple_return_pop_internal): Change it to define_insn_and_split.
24940 Call ix86_split_simple_return_pop_internal to split it for
24941 -mfunction-return=.
24942 (simple_return_indirect_internal): Call
24943 ix86_output_indirect_function_return instead of
24944 ix86_output_indirect_jmp.
24946 2018-02-26 Jakub Jelinek <jakub@redhat.com>
24949 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24950 memset and value initialization afterwards.
24952 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
24954 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24956 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24959 * common/config/aarch64/aarch64-common.c
24960 (aarch_option_optimization_table[]): Switch
24961 off fomit-frame-pointer
24963 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24964 Chung-Ju Wu <jasonwucj@gmail.com>
24966 * config/nds32/nds32-multiple.md (load_multiple): Disallow
24968 (store_multiple): Ditto.
24970 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24972 * config.gcc: Add --with-cpu support for nds32 target.
24973 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24974 * config/nds32/nds32.opt: Add -mcpu= option.
24976 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
24978 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24979 isel=yes): Warn for these deprecated options.
24981 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
24983 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24984 ISA_2_5_MASKS_EMBEDDED.
24986 2018-02-23 Jakub Jelinek <jakub@redhat.com>
24988 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24989 p->max as pointers rather than using iterative_hash_expr.
24991 2018-02-23 Carl Love <cel@us.ibm.com>
24993 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24994 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24996 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24997 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24998 P8V_BUILTIN_VEC_VUNSIGNED2.
25000 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
25003 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
25004 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
25006 * lra-constraints.c (curr_insn_transform): Set up
25007 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
25009 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
25010 * lra-eliminations.c (spill_pseudos): Ditto.
25011 (process_insn_for_elimination): Ditto.
25012 * lra-lives.c (reg_early_clobber_p): Use the new macros.
25013 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
25014 LRA_NON_CLOBBERED_ALT.
25016 2018-02-22 Martin Sebor <msebor@redhat.com>
25018 PR tree-optimization/84480
25019 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
25020 to maybe_diag_stxncpy_trunc. Call it.
25021 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
25022 from gimple_fold_builtin_strcpy. Print inlining stack.
25023 (handle_builtin_stxncpy): Print inlining stack.
25024 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
25026 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
25029 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
25030 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
25031 and -fcheck-pointer-bounds are used together.
25032 (indirect_thunk_prefix): New enum.
25033 (indirect_thunk_need_prefix): New function.
25034 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
25035 "_nt" instead of "_bnd" for NOTRACK prefix.
25036 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
25037 (output_indirect_thunk_function): Likewise.
25039 (ix86_code_end): Update output_indirect_thunk_function calls.
25040 (ix86_output_indirect_branch_via_reg): Replace
25041 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
25042 (ix86_output_indirect_branch_via_push): Likewise.
25043 (ix86_output_function_return): Likewise.
25044 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
25045 incompatible with -fcf-protection=branch and
25046 -fcheck-pointer-bounds.
25048 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25051 * config/aarch64/aarch64.c (aarch64_print_address_internal):
25052 Change gcc_assert call to output_operand_lossage.
25054 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25056 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
25058 2018-02-22 DJ Delorie <dj@redhat.com>
25059 Sebastian Perta <sebastian.perta@renesas.com>
25060 Oleg Endo <olegendo@gcc.gnu.org>
25062 * config/rx/rx.c (rx_rtx_costs): New function.
25063 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
25065 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
25067 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
25069 2018-02-22 Martin Liska <mliska@suse.cz>
25072 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
25073 Add "native" as a possible value.
25075 2018-02-22 Martin Liska <mliska@suse.cz>
25078 * config/i386/i386.c (ix86_option_override_internal):
25079 Add "native" as a possible value for -march and -mtune.
25081 2018-02-22 Jakub Jelinek <jakub@redhat.com>
25084 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
25085 to all type variants.
25087 PR tree-optimization/84503
25088 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
25089 width as info->bitpos + info->bitsize - start.
25090 (merged_store_group::merge_overlapping): Simplify width computation.
25091 (check_no_overlap): New function.
25092 (imm_store_chain_info::try_coalesce_bswap): Compute expected
25093 start + width and last_order of the group, fail if check_no_overlap
25095 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
25096 to group if check_no_overlap fails.
25098 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25100 * config/rs6000/altivec.md: Delete contraint arguments to
25101 define_expand, define_split, and define_peephole2, and in
25102 define_insn_and_split if always unused.
25103 * config/rs6000/darwin.md: Ditto.
25104 * config/rs6000/dfp.md: Ditto.
25105 * config/rs6000/rs6000.md: Ditto.
25106 * config/rs6000/sync.md: Ditto.
25107 * config/rs6000/vector.md: Ditto.
25108 * config/rs6000/vsx.md: Ditto.
25110 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25112 * config/rs6000/altivec.md: Write output control strings as braced
25113 blocks instead of double-quoted strings.
25114 * config/rs6000/darwin.md: Ditto.
25115 * config/rs6000/rs6000.md: Ditto.
25116 * config/rs6000/vector.md: Ditto.
25117 * config/rs6000/vsx.md: Ditto.
25119 2018-02-21 Jason Merrill <jason@redhat.com>
25121 PR c++/84314 - ICE with templates and fastcall attribute.
25122 * attribs.c (build_type_attribute_qual_variant): Remove assert.
25124 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25126 * ipa-cp.c (determine_versionability): Fix comment typos.
25128 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25131 * ipa-cp.c (determine_versionability): Do not version functions caling
25134 2018-02-21 Martin Liska <mliska@suse.cz>
25137 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
25138 Add "native" as a possible value.
25139 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
25140 the macro when native cpu detection is available.
25142 2018-02-21 Martin Liska <mliska@suse.cz>
25145 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
25146 Add "native" as a possible value.
25147 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
25148 when native cpu detection is available.
25150 2018-02-21 Jakub Jelinek <jakub@redhat.com>
25151 Martin Sebor <msebor@redhat.com>
25153 PR tree-optimization/84478
25154 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
25156 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
25157 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
25158 support which is conservatively correct, for 2 only stay conservative
25159 for maxlen. Formatting and comment capitalization fixes. Add STRICT
25160 argument to the 2 argument get_range_strlen, adjust 6 arg
25161 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
25163 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
25164 (gimple_fold_builtin_strlen): Pass true as last argument to
25167 2018-02-20 Martin Sebor <msebor@redhat.com>
25169 PR middle-end/84095
25170 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25171 (builtin_memref::set_base_and_offset): Same. Handle inner references.
25172 (builtin_memref::builtin_memref): Factor out parts into
25173 set_base_and_offset and call it.
25175 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25177 PR middle-end/84406
25178 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25179 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25180 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
25181 search at the associated MODE_INT.
25183 2018-02-20 Jeff Law <law@redhat.com>
25185 PR middle-end/82123
25186 PR tree-optimization/81592
25187 PR middle-end/79257
25188 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25189 for range data rather than using global data.
25190 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25191 range data rather than using global data.
25192 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25193 pass it to children as needed.
25194 (struct directive::fmtresult): Similarly.
25195 (struct directive::set_width): Similarly.
25196 (struct directive::set_precision): Similarly.
25197 (format_integer, format_directive, parse_directive): Similarly.
25198 (format_none): Accept unnamed vr_values parameter.
25199 (format_percent, format_floating, format_character): Similarly.
25200 (format_string, format_plain): Similarly.
25201 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25202 the EVRP range analyzer for range data rather than using global data.
25203 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25204 gimple-ssa-evrp-analyze.h
25205 (class sprintf_dom_walker): Add after_dom_children member function.
25206 Add evrp_range_analyzer member.
25207 (sprintf_dom_walker::before_dom_children): Call into the EVRP
25208 range analyzer as needed.
25209 (sprintf_dom_walker::after_dom_children): New member function.
25210 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25212 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25213 (evrp_range_analyzer::pop_to_marker): Likewise.
25215 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25217 PR tree-optimization/84419
25218 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25219 with the required type if its current type is compatible but
25222 2018-02-20 Jakub Jelinek <jakub@redhat.com>
25224 PR middle-end/82004
25225 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25226 after vectorization.
25228 2018-02-20 Martin Liska <mliska@suse.cz>
25231 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25232 possible values if we don't have a hint.
25234 2018-02-20 Martin Liska <mliska@suse.cz>
25238 * final.c (shorten_branches): Build align_tab array with one
25240 * opts.c (finish_options): Add alignment option limit check.
25241 (MAX_CODE_ALIGN): Likewise.
25242 (MAX_CODE_ALIGN_VALUE): Likewise.
25243 * doc/invoke.texi: Document maximum allowed option value for
25244 all -falign-* options.
25246 2018-02-19 Jakub Jelinek <jakub@redhat.com>
25249 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25250 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25251 * var-tracking.c (emit_note_insn_var_location): Remove all references
25252 to NOTE_INSN_CALL_ARG_LOCATION.
25253 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25254 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25255 Use copy_rtx_if_shared.
25256 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25257 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25258 (dwarf2out_var_location): Remove handling of
25259 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25261 * final.c (final_scan_insn): Remove all references to
25262 NOTE_INSN_CALL_ARG_LOCATION.
25263 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
25264 before dumping final insns.
25265 * except.c (emit_note_eh_region_end): Remove all references to
25266 NOTE_INSN_CALL_ARG_LOCATION.
25267 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25268 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25269 * config/arc/arc.c (hwloop_optimize): Likewise.
25270 * config/arm/arm.c (create_fix_barrier): Likewise.
25271 * config/s390/s390.c (s390_chunkify_start): Likewise.
25272 * config/sh/sh.c (find_barrier): Likewise.
25273 * config/i386/i386.c (rest_of_insert_endbranch,
25274 ix86_seh_fixup_eh_fallthru): Likewise.
25275 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25276 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25277 * config/frv/frv.c (frv_function_prologue): Likewise.
25278 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
25280 (note_outside_basic_block_p): Remove all references to
25281 NOTE_INSN_CALL_ARG_LOCATION.
25282 * gengtype.c (adjust_field_rtx_def): Likewise.
25283 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25285 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25286 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25289 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25292 PR tree-optimization/84452
25293 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25294 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25297 2018-02-19 Martin Liska <mliska@suse.cz>
25300 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25302 2018-02-19 Martin Liska <mliska@suse.cz>
25303 Richard Sandiford <richard.sandiford@linaro.org>
25305 PR tree-optimization/82491
25306 * gimple-fold.c (get_base_constructor): Make earlier bail out
25309 2018-02-19 Carl Love <cel@us.ibm.com>
25311 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25312 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25314 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25315 P8V_BUILTIN_VEC_NEG.
25317 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
25319 * config/rl78/rl78.md (movdf): New define expand.
25321 2018-02-19 Martin Liska <mliska@suse.cz>
25324 * doc/invoke.texi: Fix typo.
25325 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25327 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
25329 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25330 handle rs6000_single_float and rs6000_double_float specially for
25333 2018-02-16 Jeff Law <law@redhat.com>
25335 * config/rx/rx.c (add_pop_cfi_notes): New function.;
25336 (pop_regs): Use it.
25338 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25341 * ipa-inline.c (inline_small_functions): Fix a typo.
25343 2018-02-16 Nathan Sidwell <nathan@acm.org>
25345 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25347 2018-02-16 Carl Love <cel@us.ibm.com>
25349 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25350 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25351 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25352 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25353 expansion to P8V_BUILTIN_VEC_FLOAT2.
25355 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
25357 PR rtl-optimization/70023
25358 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25359 src_regno into account.
25361 2018-02-16 Carl Love <cel@us.ibm.com>
25363 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25364 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25365 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25366 * config/rs6000/rs6000.c: Remove case statements for
25367 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25368 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25369 and P9V_BUILTIN_VEC_VINSERT4B.
25370 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25371 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25372 * config/rs6000/vsx.md:
25373 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25376 2018-02-16 Carl Love <cel@us.ibm.com>
25378 * config/rs6000/altivec.h: Add builtin names vec_extract4b
25380 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25382 * config/rs6000/rs6000-c.c: Add the definitions for
25383 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25384 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25385 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25386 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
25387 definition for insert4b and define insn *insert3b_internal.
25388 * doc/extend.texi: Add documentation for vec_extract4b.
25390 2018-02-16 Nathan Sidwell <nathan@acm.org>
25392 * doc/extend.texi (Backwards Compatibility): Mention friend
25393 injection. Note for-scope is deprecated.
25394 * doc/invoke.texi (-ffriend-injection): Deprecate.
25396 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
25398 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25399 that moved to I2, also allow destinations that are a paradoxical
25400 subreg (instead of a normal reg).
25402 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
25405 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25408 2018-02-16 Richard Biener <rguenther@suse.de>
25410 PR tree-optimization/84037
25411 PR tree-optimization/84016
25413 * config/i386/i386.c (ix86_builtin_vectorization_cost):
25414 Adjust vec_construct for the fact we need additional higher latency
25415 128bit inserts for AVX256 and AVX512 vector builds.
25416 (ix86_add_stmt_cost): Scale vector construction cost for
25419 2018-02-16 Richard Biener <rguenther@suse.de>
25421 PR tree-optimization/84417
25422 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25423 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25424 (non_rewritable_lvalue_p): Likewise, use poly-ints.
25426 2018-02-16 Martin Liska <mliska@suse.cz>
25429 * internal-fn.def (ASAN_CHECK): Set proper flags.
25430 (ASAN_MARK): Likewise.
25432 2018-02-16 Julia Koval <julia.koval@intel.com>
25434 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25435 from PTA_CANNONLAKE.
25437 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25440 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25441 Use ++iter rather than iter++ for std::list iterators.
25442 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
25443 defer deleting them until all nodes in the forest are processed. Do
25444 free even leaf nodes. Change to_process into auto_vec.
25447 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25448 * vec.h (vec_default_construct): Use memset instead of placement new
25449 if BROKEN_VALUE_INITIALIZATION is defined.
25450 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25451 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25454 PR rtl-optimization/83723
25455 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25456 * lra.c (lra_substitute_pseudo): Likewise. If true, use
25457 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
25459 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25461 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25463 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
25465 PR rtl-optimization/81443
25466 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25467 from inner REGs to paradoxical SUBREGs.
25469 2018-02-16 Richard Biener <rguenther@suse.de>
25471 PR tree-optimization/84399
25472 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25473 For operands we can analyze at their definition make sure we can
25474 analyze them at each use as well.
25476 2018-02-16 Richard Biener <rguenther@suse.de>
25478 PR tree-optimization/84190
25479 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25480 volatile accesses if the decl isn't volatile.
25482 2018-02-15 Jason Merrill <jason@redhat.com>
25484 PR c++/84314 - ICE with templates and fastcall attribute.
25485 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25486 TYPE_CANONICAL on an existing type.
25488 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25490 PR tree-optimization/84383
25491 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25492 dstoff nor call operand_equal_p if dstbase is NULL.
25494 PR tree-optimization/84334
25495 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25496 also a CONSTANT_CLASS_P, punt.
25498 2018-02-14 Jim Wilson <jimw@sifive.com>
25500 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25501 first SMALL_OPERAND check. New local min_second_step. Move assert
25502 to where locals are set. Add TARGET_RVC support.
25503 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25505 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25507 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25509 2018-02-14 Martin Sebor <msebor@redhat.com>
25511 PR tree-optimization/83698
25512 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25513 arrays constrain the offset range to their bounds.
25514 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25515 (builtin_access::overlap): Avoid setting the size of overlap if it's
25517 (maybe_diag_overlap): Also consider arrays when deciding what values
25518 of offsets to include in diagnostics.
25520 2018-02-14 Martin Sebor <msebor@redhat.com>
25523 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25524 that correspond to the kind of a declaration.
25526 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25529 * config/pa/pa.md: Load address of PIC label using the linkage table
25530 if the label is nonlocal.
25532 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25534 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25535 warning message if user requests -maltivec=be.
25536 * doc/invoke.texi: Document deprecation of -maltivec=be.
25538 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25541 * config/rs6000/rs6000-c.c: Update definitions for
25542 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25543 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25545 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25548 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25549 add _get_ssp intrinsics. Remove argument from
25550 __builtin_ia32_rdssp[d|q].
25551 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25552 * config/i386/i386-builtin.def: Remove argument from
25553 __builtin_ia32_rdssp[d|q].
25554 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25555 ix86_expand_special_args_builtin for _rdssp[d|q].
25556 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25557 Clear register before usage.
25558 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25559 Add documentation for new _get_ssp and _inc_ssp intrinsics.
25561 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
25563 PR tree-optimization/84357
25564 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25565 operand 1 of an ARRAY_REF too.
25567 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
25570 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25571 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25573 (set_of_reg): New struct.
25574 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25575 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25576 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25578 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25579 Split into bitclr, bitset, bitinvert patterns if appropriate.
25580 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25581 use rx_fuse_in_memory_bitop.
25582 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25583 to named insn, correct maximum insn length.
25585 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
25588 * machmode.def: Define a complex mode for PARTIAL_INT.
25589 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25591 * doc/rtl.texi: Document CSPImode.
25592 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25594 (msp430_hard_regno_nregs_with_padding): Likewise.
25596 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
25599 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25601 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
25603 PR rtl-optimization/84169
25604 * combine.c (try_combine): New variable split_i2i3. Set it to true if
25605 we generated a parallel as new i3 and we split that to new i2 and i3
25606 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
25607 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
25608 those to i2, not i1. Partially rewrite this scan code.
25610 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25613 * stor-layout.c (place_field): For variable length fields, adjust
25614 offset_align afterwards not just based on the field's alignment,
25615 but also on the size.
25617 PR middle-end/84309
25618 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25619 of exps and logs in the use_exp2 case.
25621 2018-02-13 Jeff Law <law@redhat.com>
25623 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25624 entry for "vector".
25626 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25629 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
25633 * common.opt (gas-loc-support, gas-locview-support): New.
25634 (ginline-points, ginternal-reset-location-views): New.
25635 * doc/invoke.texi: Document them. Use @itemx where intended.
25636 (gvariable-location-views): Adjust.
25637 * target.def (reset_location_view): New.
25638 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25639 (TARGET_RESET_LOCATION_VIEW): New.
25640 * doc/tm.texi: Rebuilt.
25641 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25642 (dwarf2out_default_as_locview_support): New.
25643 (output_asm_line_debug_info): Use option variables.
25644 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25645 (output_loc_list): Likewise.
25646 (add_high_low_attributes): Check option variables.
25647 Don't output entry view attribute in strict mode.
25648 (gen_inlined_subroutine_die): Check option variables.
25649 (dwarf2out_inline_entry): Likewise.
25650 (init_sections_and_labels): Likewise.
25651 (dwarf2out_early_finish): Likewise.
25652 (maybe_reset_location_view): New, from...
25653 (dwarf2out_var_location): ... here. Call it.
25654 * debug.h (dwarf2out_default_as_loc_support): Declare.
25655 (dwarf2out_default_as_locview_support): Declare.
25656 * hooks.c (hook_int_rtx_insn_0): New.
25657 * hooks.h (hook_int_rtx_insn_0): Declare.
25658 * toplev.c (process_options): Take -gas-loc-support and
25659 -gas-locview-support from dwarf2out. Enable
25660 -gvariable-location-views by default only with locview
25661 assembler support. Enable -ginternal-reset-location-views by
25662 default only if the target defines the corresponding hook.
25663 Enable -ginline-points by default if location views are
25664 enabled; force it disabled if statement frontiers are
25666 * tree-inline.c (expand_call_inline): Check option variables.
25667 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25669 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
25671 PR tree-optimization/84321
25672 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25673 handling. Also check whether the anti-range contains any values
25674 that satisfy the mask; switch to a VR_RANGE if not.
25676 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
25679 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25681 2018-02-13 Martin Jambor <mjambor@suse.cz>
25684 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25685 of call statements, also set location of a load to a temporary.
25687 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
25689 * config/rl78/rl78.c (add_vector_labels): New function.
25690 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25691 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25692 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25693 which checks that no arguments are passed.
25694 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25695 * doc/extend.texi: Documentation for the new attribute.
25697 2018-02-13 Andreas Schwab <schwab@suse.de>
25699 * config/riscv/linux.h (CPP_SPEC): Define.
25701 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25704 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25705 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25706 OPTION_MASK_ISA_AES as first argument to def_builtin_const
25707 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25708 instead of OPTION_MASK_ISA_PCLMUL as first argument to
25709 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25710 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25711 temporarily for AES and PCLMUL builtins.
25713 PR tree-optimization/84339
25714 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25715 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25718 PR middle-end/84309
25719 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25720 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25721 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25723 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25725 * omp-simd-clone.h: New file.
25726 * omp-simd-clone.c: Include omp-simd-clone.h.
25727 (expand_simd_clones): No longer static.
25728 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25729 cgraph.h and omp-simd-clone.h.
25730 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25731 (vect_recog_widen_shift_pattern): Formatting fix.
25732 (vect_pattern_recog_1): Don't check optab for calls.
25735 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25736 operands[2] into a REG before using gen_lowpart on it.
25738 2018-02-12 Jeff Law <law@redhat.com>
25741 * config/sh/sh.c (find_barrier): Consider a sibling call
25744 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25745 successfully back substituting a reg.
25747 2018-02-12 Richard Biener <rguenther@suse.de>
25749 PR tree-optimization/84037
25750 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25751 parameter, move visited init to caller.
25752 (vect_slp_analyze_operations): Separate cost from validity
25753 check, initialize visited once for all instances.
25754 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25756 * tree-vect-stmts.c (vect_model_simple_cost): Make early
25758 (vect_model_promotion_demotion_cost): Likewise.
25759 (vectorizable_bswap): Guard cost modeling with !slp_node
25760 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25762 (vectorizable_call): Likewise.
25763 (vectorizable_conversion): Likewise.
25764 (vectorizable_assignment): Likewise.
25765 (vectorizable_shift): Likewise.
25766 (vectorizable_operation): Likewise.
25767 (vectorizable_store): Likewise.
25768 (vectorizable_load): Likewise.
25769 (vectorizable_condition): Likewise.
25770 (vectorizable_comparison): Likewise.
25772 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
25775 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25776 (ASAN_MARK): Fix fnspec to account for return value, change pointer
25777 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25779 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25781 PR middle-end/83665
25782 * params.def (inline-min-speedup): Increase from 8 to 15.
25783 (max-inline-insns-auto): Decrease from 40 to 30.
25784 * ipa-split.c (consider_split): Add some buffer for function to
25785 be considered inlining candidate.
25786 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25789 2018-02-12 Richard Biener <rguenther@suse.de>
25791 PR tree-optimization/84037
25792 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25793 matched stmts if we cannot swap the non-matched ones.
25795 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25797 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25798 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25799 _mm_maskz_scalef_round_ss): New intrinsics.
25800 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25801 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25802 __builtin_ia32_scalefss_round): Remove.
25803 (__builtin_ia32_scalefsd_mask_round,
25804 __builtin_ia32_scalefss_mask_round): New intrinsics.
25805 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25806 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25807 ((match_operand:VF_128 2 "<round_nimm_predicate>"
25808 "<round_constraint>")): Changed to ...
25809 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25810 "<round_scalar_constraint>")): ... this.
25811 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25812 %0, %1, %2<round_op3>}"): Changed to ...
25813 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25814 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25815 %2<round_scalar_mask_op3>}"): ... this.
25816 * config/i386/subst.md (round_scalar_nimm_predicate): New.
25818 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25820 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25821 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25822 (_mm_maskz_sqrt_round_ss): New intrinsics.
25823 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25824 (__builtin_ia32_sqrtsd_mask_round)
25825 (__builtin_ia32_sqrtss_mask_round): New builtins.
25826 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25827 (__builtin_ia32_sqrtss_round): Remove.
25828 (__builtin_ia32_sqrtsd_mask_round)
25829 (__builtin_ia32_sqrtss_mask_round): New builtins.
25830 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25831 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25832 ((match_operand:VF_128 1 "vector_operand"
25833 "xBm,<round_constraint>")): Changed to ...
25834 ((match_operand:VF_128 1 "vector_operand"
25835 "xBm,<round_scalar_constraint>")): ... this.
25836 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25837 %0, %2, %<iptr>1<round_op3>}): Changed to ...
25838 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25839 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25840 %<iptr>1<round_scalar_mask_op3>}): ... this.
25841 ((set_attr "prefix" "<round_prefix>")): Changed to ...
25842 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25844 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
25847 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25848 Cast vec_cmpeq result to correct type.
25849 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25850 Cast vec_cmpgt result to correct type.
25852 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
25854 * final.c (final_scan_insn_1): Renamed from...
25855 (final_scan_insn): ... this. New wrapper, to recover
25856 seen from the outermost call in recursive ones.
25857 * config/sparc/sparc.c (output_return): Drop seen from call.
25858 (output_sibcall): Likewise.
25859 * config/visium/visium.c (output_branch): Likewise.
25861 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
25863 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25866 2018-02-10 Alan Modra <amodra@gmail.com>
25869 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25870 Specify LR as an input.
25872 2018-02-10 Jakub Jelinek <jakub@redhat.com>
25875 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25876 remove_member_access_dummy_vars): New functions.
25877 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25878 lower_omp_1, execute_lower_omp): Use them.
25880 PR rtl-optimization/84308
25881 * shrink-wrap.c (spread_components): Release todo vector.
25883 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
25885 PR rtl-optimization/57193
25886 * ira-color.c (struct allocno_color_data): Add member
25887 conflict_allocno_hard_prefs.
25888 (update_conflict_allocno_hard_prefs): New.
25889 (bucket_allocno_compare_func): Add a preference based on
25890 conflict_allocno_hard_prefs.
25891 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25892 (color_allocnos): Remove a dead code. Initiate
25893 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
25895 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25898 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25899 constraint from =wa to wa. Avoid a subreg on the output operand,
25900 instead use a pseudo and subreg it in a move.
25901 (p9_xxbrd_<mode>): Changed to ...
25902 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25903 (p9_xxbrd_v2df): New expander.
25904 (p9_xxbrw_<mode>): Changed to ...
25905 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25906 (p9_xxbrw_v4sf): New expander.
25908 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25910 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25912 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
25915 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25916 multiply in 32-bit mode.
25917 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25918 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25921 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25923 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25924 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25925 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25926 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25928 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
25931 * dwarf2out.c (is_trivial_indirect_ref): New function.
25932 (dwarf2out_late_global_decl): Do not generate a location
25933 attribute for variables that have a non-trivial DECL_VALUE_EXPR
25934 and that are not defined in the current unit.
25936 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25938 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25939 instead of a libcall for UNORDERED.
25941 2018-02-09 Tamar Christina <tamar.christina@arm.com>
25944 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25945 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25947 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25950 * config/s390/s390.c (s390_set_current_function): Invoke
25951 s390_indirect_branch_settings also if fndecl didn't change.
25953 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25955 * config/rs6000/rs6000.md (blockage): Set length to zero.
25957 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25959 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25961 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25964 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25965 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25969 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25970 PARALLEL incoming that failed vt_get_decl_and_offset check.
25972 PR middle-end/84237
25973 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25974 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25976 (get_variable_section): For decls in named .bss* sections pass true as
25977 second argument to bss_initializer_p.
25979 2018-02-09 Marek Polacek <polacek@redhat.com>
25980 Jakub Jelinek <jakub@redhat.com>
25983 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25984 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
25985 Sync some changes from cxx_fold_indirect_ref.
25987 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25989 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25991 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25992 (BLOCK_INLINE_ENTRY_LABEL): New.
25993 (dwarf2out_var_location): Disregard inline entry markers.
25994 (inline_entry_data): New struct.
25995 (inline_entry_data_hasher): New hashtable type.
25996 (inline_entry_data_hasher::hash): New.
25997 (inline_entry_data_hasher::equal): New.
25998 (inline_entry_data_table): New variable.
25999 (add_high_low_attributes): Add DW_AT_entry_pc and
26000 DW_AT_GNU_entry_view attributes if a pending entry is found
26001 in inline_entry_data_table. Add old entry_pc attribute only
26002 if debug nonbinding markers are disabled.
26003 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
26004 markers are enabled.
26005 (block_within_block_p, dwarf2out_inline_entry): New.
26006 (dwarf2out_finish): Check that no entries remained in
26007 inline_entry_data_table.
26008 * final.c (reemit_insn_block_notes): Handle inline entry notes.
26009 (final_scan_insn, notice_source_line): Likewise.
26010 (rest_of_clean_state): Skip inline entry markers.
26011 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
26013 * gimple.c (gimple_build_debug_inline_entry): New.
26014 * gimple.h (enum gimple_debug_subcode): Add
26015 GIMPLE_DEBUG_INLINE_ENTRY.
26016 (gimple_build_debug_inline_entry): Declare.
26017 (gimple_debug_inline_entry_p): New.
26018 (gimple_debug_nonbind_marker_p): Adjust.
26019 * insn-notes.def (INLINE_ENTRY): New.
26020 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
26021 inline entry marker notes.
26022 (print_insn): Likewise.
26023 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
26024 (INSN_DEBUG_MARKER_KIND): Likewise.
26025 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
26026 * tree-inline.c (expand_call_inline): Build and insert
26027 debug_inline_entry stmt.
26028 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
26029 inline entry blocks early, if nonbind markers are enabled.
26030 (dump_scope_block): Dump fragment info.
26031 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
26032 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
26033 (gimple_build_debug_inline_entry): New.
26034 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
26035 Enable/disable inline entry points too.
26036 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
26037 (DEBUG_INSN): Describe inline entry markers.
26039 * common.opt (gvariable-location-views): New.
26040 (gvariable-location-views=incompat5): New.
26041 * config.in: Rebuilt.
26042 * configure: Rebuilt.
26043 * configure.ac: Test assembler for view support.
26044 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
26045 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
26046 * dwarf2out.c (var_loc_view): New typedef.
26047 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
26048 (dwarf2out_locviews_in_attribute): New.
26049 (dwarf2out_locviews_in_loclist): New.
26050 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
26051 (enum dw_line_info_opcode): Add LI_adv_address.
26052 (struct dw_line_info_table): Add view.
26053 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
26054 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
26055 (zero_view_p): New variable.
26056 (ZERO_VIEW_P): New macro.
26057 (output_asm_line_debug_info): New.
26058 (struct var_loc_node): Add view.
26059 (add_AT_view_list, AT_loc_list): New.
26060 (add_var_loc_to_decl): Add view param. Test it against last.
26061 (new_loc_list): Add view params. Record them.
26062 (AT_loc_list_ptr): Handle loc and view lists.
26063 (view_list_to_loc_list_val_node): New.
26064 (print_dw_val): Handle dw_val_class_view_list.
26065 (size_of_die): Likewise.
26066 (value_format): Likewise.
26067 (loc_list_has_views): New.
26068 (gen_llsym): Set vl_symbol too.
26069 (maybe_gen_llsym, skip_loc_list_entry): New.
26070 (dwarf2out_maybe_output_loclist_view_pair): New.
26071 (output_loc_list): Output view list or entries too.
26072 (output_view_list_offset): New.
26073 (output_die): Handle dw_val_class_view_list.
26074 (output_dwarf_version): New.
26075 (output_compilation_unit_header): Use it.
26076 (output_skeleton_debug_sections): Likewise.
26077 (output_rnglists, output_line_info): Likewise.
26078 (output_pubnames, output_aranges): Update version comments.
26079 (output_one_line_info_table): Output view numbers in asm comments.
26080 (dw_loc_list): Determine current endview, pass it to new_loc_list.
26081 Call maybe_gen_llsym.
26082 (loc_list_from_tree_1): Adjust.
26083 (add_AT_location_description): Create view list attribute if
26084 needed, check it's absent otherwise.
26085 (convert_cfa_to_fb_loc_list): Adjust.
26086 (maybe_emit_file): Call output_asm_line_debug_info for test.
26087 (dwarf2out_var_location): Reset views as needed. Precompute
26088 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
26089 attribute. Set view.
26090 (new_line_info_table): Reset next view.
26091 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
26092 (dwarf2out_source_line): Likewise. Output view resets and labels to
26093 the assembler, or select appropriate line info opcodes.
26094 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
26095 (optimize_string_length): Catch it. Adjust.
26096 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
26097 dw_val_class_view_list, and remove it if no longer needed.
26098 (hash_loc_list): Hash view numbers.
26099 (loc_list_hasher::equal): Compare them.
26100 (optimize_location_lists): Check whether a view list symbol is
26101 needed, and whether the locview attribute is present, and
26102 whether they match. Remove the locview attribute if no longer
26104 (index_location_lists): Call skip_loc_list_entry for test.
26105 (dwarf2out_finish): Call output_asm_line_debug_info for test.
26106 Use output_dwarf_version.
26107 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
26108 (struct dw_val_node): Add val_view_list.
26109 * final.c (SEEN_NEXT_VIEW): New.
26110 (set_next_view_needed): New.
26111 (clear_next_view_needed): New.
26112 (maybe_output_next_view): New.
26113 (final_start_function): Rename to...
26114 (final_start_function_1): ... this. Take pointer to FIRST,
26115 add SEEN parameter. Emit param bindings in the initial view.
26116 (final_start_function): Reintroduce SEEN-less interface.
26117 (final): Rename to...
26118 (final_1): ... this. Take SEEN parameter. Output final pending
26119 next view at the end.
26120 (final): Reintroduce seen-less interface.
26121 (final_scan_insn): Output pending next view before switching
26122 sections or ending a block. Mark the next view as needed when
26123 outputting variable locations. Notify debug backend of section
26124 changes, and of location view changes.
26125 (rest_of_handle_final): Adjust.
26126 * toplev.c (process_options): Autodetect value for debug variable
26127 location views option. Warn on incompat5 without -gdwarf-5.
26128 * doc/invoke.texi (gvariable-location-views): New.
26129 (gvariable-location-views=incompat5): New.
26130 (gno-variable-location-views): New.
26132 2018-02-08 David Malcolm <dmalcolm@redhat.com>
26134 PR tree-optimization/84136
26135 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
26136 that the result of find_edge is non-NULL.
26138 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26141 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
26142 storing integer register in SImode. Fix cost of 256 and 512
26143 byte aligned SSE register store.
26145 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26147 * config/i386/i386.c (ix86_multiplication_cost): Fix
26148 multiplication cost for TARGET_AVX512DQ.
26150 2018-02-08 Marek Polacek <polacek@redhat.com>
26152 PR tree-optimization/84238
26153 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
26156 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26158 PR tree-optimization/84265
26159 * tree-vect-stmts.c (vectorizable_store): Don't treat
26160 VMAT_CONTIGUOUS accesses as grouped.
26161 (vectorizable_load): Likewise.
26163 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26165 PR tree-optimization/81635
26166 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
26167 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26168 (test_round_for_mask): New functions.
26169 (wide_int_cc_tests): Call test_round_for_mask.
26170 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26171 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26172 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26173 range returned by get_range_info.
26175 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26178 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26179 * symtab.c: Include builtins.h
26180 (symtab_node::output_to_lto_symbol_table_p): Move here
26181 from lto-streamer-out.c:output_symbol_p.
26182 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26183 (output_symbol_p): Move all logic to symtab.c
26184 (produce_symtab): Update.
26186 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26188 * config/s390/s390-opts.h (enum indirect_branch): Define.
26189 * config/s390/s390-protos.h (s390_return_addr_from_memory)
26190 (s390_indirect_branch_via_thunk)
26191 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26192 (enum s390_indirect_branch_type): Define.
26193 * config/s390/s390.c (struct s390_frame_layout, struct
26194 machine_function): Remove.
26195 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26196 (indirect_branch_table_label_no, indirect_branch_table_name):
26198 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26199 (enum s390_indirect_branch_option): Define.
26200 (s390_return_addr_from_memory): New function.
26201 (s390_handle_string_attribute): New function.
26202 (s390_attribute_table): Add new attribute handler.
26203 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26204 (s390_indirect_branch_via_thunk): New function.
26205 (s390_indirect_branch_via_inline_thunk): New function.
26206 (s390_function_ok_for_sibcall): When jumping via thunk disallow
26207 sibling call optimization for non z10 compiles.
26208 (s390_emit_call): Force indirect branch target to be a single
26209 register. Add r1 clobber for non-z10 compiles.
26210 (s390_emit_epilogue): Emit return jump via return_use expander.
26211 (s390_reorg): Handle JUMP_INSNs as execute targets.
26212 (s390_option_override_internal): Perform validity checks for the
26213 new command line options.
26214 (s390_indirect_branch_attrvalue): New function.
26215 (s390_indirect_branch_settings): New function.
26216 (s390_set_current_function): Invoke s390_indirect_branch_settings.
26217 (s390_output_indirect_thunk_function): New function.
26218 (s390_code_end): Implement target hook.
26219 (s390_case_values_threshold): Implement target hook.
26220 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26222 * config/s390/s390.h (struct s390_frame_layout)
26223 (struct machine_function): Move here from s390.c.
26224 (TARGET_INDIRECT_BRANCH_NOBP_RET)
26225 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26226 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26227 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26228 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26229 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26230 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26231 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26232 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26233 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26234 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26235 (mnemonic attribute): Add values which aren't recognized
26237 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26238 pattern for branch conversion. Fix mnemonic attribute.
26239 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26240 indirect branch via thunk if requested.
26241 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26242 ("*indirect_jump"): Disable for branch conversion using out of
26244 ("indirect_jump_via_thunk<mode>_z10")
26245 ("indirect_jump_via_thunk<mode>")
26246 ("indirect_jump_via_inlinethunk<mode>_z10")
26247 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26248 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26249 ("casesi_jump_via_inlinethunk<mode>_z10")
26250 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26251 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26252 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26253 ("*indirect2_jump"): Disable for branch conversion.
26254 ("casesi_jump"): Turn into expander and expand patterns for branch
26256 ("return_use"): New expander.
26257 ("*return"): Emit return via thunk and rename it to ...
26258 ("*return<mode>"): ... this one.
26259 * config/s390/s390.opt: Add new options and and enum for the
26262 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26264 * lra-constraints.c (match_reload): Unconditionally use
26265 gen_lowpart_SUBREG, rather than selecting between that
26266 and equivalent gen_rtx_SUBREG code.
26268 2018-02-08 Richard Biener <rguenther@suse.de>
26270 PR tree-optimization/84233
26271 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26272 changed flag instead of boguously re-using phi_inserted.
26274 2018-02-08 Martin Jambor <mjambor@suse.cz>
26276 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26277 static local variables.
26279 2018-02-08 Richard Biener <rguenther@suse.de>
26281 PR tree-optimization/84278
26282 * tree-vect-stmts.c (vectorizable_store): When looking for
26283 smaller vector types to perform grouped strided loads/stores
26284 make sure the mode is supported by the target.
26285 (vectorizable_load): Likewise.
26287 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26289 * config/aarch64/aarch64.c (aarch64_components_for_bb):
26290 Increase LDP/STP opportunities by adding adjacent callee-saves.
26292 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26294 PR rtl-optimization/84068
26295 PR rtl-optimization/83459
26296 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26298 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
26300 PR tree-optimization/84224
26301 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26302 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26303 non-zero arguments.
26305 2018-02-07 Iain Sandoe <iain@codesourcery.com>
26308 * config/rs6000/altivec.md (*restore_world): Remove LR use.
26309 * config/rs6000/predicates.md (restore_world_operation): Adjust op
26310 count, remove one USE.
26312 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
26314 * doc/install.texi (Configuration): Document the
26315 --with-long-double-format={ibm,ieee} PowerPC configuration
26319 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26320 Convert from define_expand to be define_insn_and_split. Rework
26321 float/double/_Float128 conversions to QI/HI/SImode to work with
26322 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
26323 conversions to QI/HImode types did a store and then a load to
26324 truncate the value. For conversions to VSX registers, don't split
26325 the insn, instead emit the code directly. Use the code iterator
26326 any_fix to combine signed and unsigned conversions.
26327 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26328 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26329 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26330 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26331 (fix_<mode>di2_hw): Likewise.
26332 (fixuns_<mode>di2_hw): Likewise.
26333 (fix_<mode>si2_hw): Likewise.
26334 (fixuns_<mode>si2_hw): Likewise.
26335 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26336 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26337 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26338 fix<uns>_trunc<SFDF:mode>si2_p8.
26339 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26340 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26341 (fix<uns>_<mode>_mem): Likewise.
26342 (fctiw<u>z_<mode>_mem): Likewise.
26343 (fix<uns>_<mode>_mem): Likewise.
26344 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26345 the register allocator from doing a direct move to the GPRs to do
26346 a store, and instead use the ISA 3.0 store byte/half-word from
26347 vector register instruction. For IEEE 128-bit floating point,
26348 also optimize stores of 32-bit ints.
26349 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26351 2018-02-07 Alan Hayward <alan.hayward@arm.com>
26353 * genextract.c (push_pathstr_operand): New function to support
26355 (walk_rtx): Call push_pathstr_operand.
26356 (print_path): Support [a-zA-Z].
26358 2018-02-07 Richard Biener <rguenther@suse.de>
26360 PR tree-optimization/84037
26361 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26362 (cse_and_gimplify_to_preheader): Declare.
26363 (vect_get_place_in_interleaving_chain): Likewise.
26364 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26366 (_loop_vec_info::~_loop_vec_info): Delete it.
26367 (cse_and_gimplify_to_preheader): New function.
26368 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26369 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26370 (vectorizable_load): Likewise. For grouped stores always base
26371 the IV on the first element.
26372 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26373 condition before gimplifying.
26375 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26377 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26378 *DIV_EXPR and *MOD_EXPR.
26380 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
26383 * config/i386/i386.c (ix86_option_override_internal): Mask out
26384 the CF_SET bit when checking -fcf-protection.
26386 2018-02-07 Tom de Vries <tom@codesourcery.com>
26389 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26392 2018-02-07 Richard Biener <rguenther@suse.de>
26394 PR tree-optimization/84204
26395 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26398 PR tree-optimization/84205
26399 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26400 special-case isl_ast_op_zdiv_r.
26402 PR tree-optimization/84223
26403 * graphite-scop-detection.c (gather_bbs::before_dom_children):
26404 Only add conditions from within the region.
26405 (gather_bbs::after_dom_children): Adjust.
26407 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
26410 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26411 * config/avr/avr.md: Only post-reload split REG-REG moves if
26412 either register is GENERAL_REG_P.
26414 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26416 PR tree-optimization/84235
26417 * tree-ssa-scopedtables.c
26418 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26419 if the subtraction is performed in floating point type where NaNs are
26420 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26421 build 1. Formatting fix.
26423 2018-02-06 Jakub Jelinek <jakub@redhat.com>
26426 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26427 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26428 and skip it regardless of bb boundaries. Use CALL_P macro,
26429 don't test INSN_P (insn) together with CALL_P or JUMP_P check
26430 unnecessarily, formatting fix.
26432 2018-02-06 Michael Collison <michael.collison@arm.com>
26434 * config/arm/thumb2.md:
26435 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26436 (*thumb_mov_notscc): Ditto.
26438 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
26441 * config/rs6000/rs6000.md (su code attribute): Use "u" for
26442 unsigned_fix, not "s".
26444 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26446 * configure.ac (gcc_fn_eh_frame_ro): New function.
26447 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26448 correct .eh_frame permissions.
26449 * configure: Regenerate.
26451 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
26453 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26454 irrelevant options.
26456 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26458 * config/rs6000/rs6000.c (rs6000_option_override_internal):
26459 Display warning message for -mno-speculate-indirect-jumps.
26461 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
26463 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26465 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26467 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26469 PR tree-optimization/84225
26470 * tree-eh.c (find_trapping_overflow): Only call
26471 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26473 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26476 * config/i386/i386.c: Reimplement the check of possible options
26477 -mibt/-mshstk conbination. Change error messages.
26478 * doc/invoke.texi: Fix a typo: remove extra '='.
26480 2018-02-06 Marek Polacek <polacek@redhat.com>
26482 PR tree-optimization/84228
26483 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26485 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26488 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26489 emitted arch directives.
26490 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26491 __ARM_FEATURE_COPROC before changing architectures.
26493 2018-02-06 Richard Biener <rguenther@suse.de>
26495 * config/i386/i386.c (print_reg): Fix typo.
26496 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26498 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26500 * configure: Regenerate.
26502 2018-02-05 Martin Sebor <msebor@redhat.com>
26504 PR tree-optimization/83369
26505 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26508 2018-02-05 Martin Liska <mliska@suse.cz>
26510 * doc/invoke.texi: Cherry-pick upstream r323995.
26512 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26514 * ira.c (ira_init_register_move_cost): Adjust comment.
26516 2018-02-05 Martin Liska <mliska@suse.cz>
26518 PR gcov-profile/84137
26519 * doc/gcov.texi: Fix typo in documentation.
26521 2018-02-05 Martin Liska <mliska@suse.cz>
26523 PR gcov-profile/83879
26524 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26525 using dlopen functionality.
26527 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26529 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26530 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26531 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26532 _mm_maskz_range_round_ss): New intrinsics.
26533 (__builtin_ia32_rangesd128_round)
26534 (__builtin_ia32_rangess128_round): Remove.
26535 (__builtin_ia32_rangesd128_mask_round,
26536 __builtin_ia32_rangess128_mask_round): New builtins.
26537 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26538 __builtin_ia32_rangess128_round): Remove.
26539 (__builtin_ia32_rangesd128_mask_round,
26540 __builtin_ia32_rangess128_mask_round): New builtins.
26541 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26542 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26543 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26544 "<round_saeonly_constraint>")): Changed to ...
26545 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26546 "<round_saeonly_scalar_constraint>")): ... this.
26547 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26548 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26549 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26550 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26551 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26553 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
26555 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26557 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26558 Remove all values except native, 8540 and 8548.
26560 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
26562 * config/i386/i386.c (ix86_output_function_return): Pass
26563 INVALID_REGNUM, instead of -1, as invalid register number to
26564 indirect_thunk_name and output_indirect_thunk.
26566 2018-02-02 Julia Koval <julia.koval@intel.com>
26568 * config.gcc: Add -march=icelake.
26569 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26570 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26571 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26572 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26573 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26574 (processor_target_table): Add icelake.
26575 (ix86_option_override_internal): Handle new PTAs.
26576 (get_builtin_code_for_version): Handle icelake.
26577 (M_INTEL_COREI7_ICELAKE): New.
26578 (fold_builtin_cpu): Handle icelake.
26579 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26580 * doc/invoke.texi: Add -march=icelake.
26582 2018-02-02 Julia Koval <julia.koval@intel.com>
26584 * config/i386/i386.c (ix86_option_override_internal): Change flags type
26585 to wide_int_bitmask.
26586 * wide-int-bitmask.h: New.
26588 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26591 * config/i386/i386.md: Replace Pmode with word_mode in
26592 builtin_setjmp_setup and builtin_longjmp to support x32.
26594 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
26598 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26600 (rs6000_supported_cpu_names): New static variable.
26601 (linux_cpu_translation_table): Likewise.
26602 (elf_platform) <cpu>: Define new static variable and use it.
26603 Translate kernel AT_PLATFORM name to canonical name if needed.
26604 Error if platform name is unknown.
26606 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
26609 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26611 2018-02-01 Jeff Law <law@redhat.com>
26614 * config/i386/i386.c (release_scratch_register_on_entry): Add new
26615 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
26616 the scratch if RELEASE_VIA_POP is false.
26617 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26618 If we have to save a temporary register, decrement SIZE appropriately.
26619 Pass new arguments to release_scratch_register_on_entry.
26620 (ix86_adjust_stack_and_probe): Likewise.
26621 (ix86_emit_probe_stack_range): Pass new arguments to
26622 release_scratch_register_on_entry.
26624 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
26626 PR rtl-optimization/84157
26627 * combine.c (change_zero_ext): Use REG_P predicate in
26628 front of HARD_REGISTER_P predicate.
26630 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
26632 * config/avr/avr.c (avr_option_override): Move disabling of
26633 -fdelete-null-pointer-checks to...
26634 * common/config/avr/avr-common.c (avr_option_optimization_table):
26637 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26639 PR tree-optimization/81635
26640 * tree-data-ref.c (split_constant_offset_1): For types that
26641 wrap on overflow, try to use range info to prove that wrapping
26644 2018-02-01 Renlin Li <renlin.li@arm.com>
26647 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26648 TAILCALL_ADDR_REGS.
26649 (aarch64_register_move_cost): Likewise.
26650 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26651 TAILCALL_ADDR_REGS.
26652 (REG_CLASS_NAMES): Likewise.
26653 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26654 TAILCALL_ADDR_REGS. Remove IP registers.
26655 * config/aarch64/aarch64.md (Ucs): Update register constraint.
26657 2018-02-01 Richard Biener <rguenther@suse.de>
26659 * domwalk.h (dom_walker::dom_walker): Add additional constructor
26660 for specifying RPO order and allow NULL for that.
26661 * domwalk.c (dom_walker::dom_walker): Likewise.
26662 (dom_walker::walk): Handle NULL RPO order.
26663 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26665 (rewrite_update_dom_walker): Likewise.
26666 (mark_def_dom_walker): Likewise.
26668 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26670 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26671 (aarch64_maybe_expand_sve_subreg_move): Declare.
26672 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26673 * config/aarch64/predicates.md (aarch64_any_register_operand): New
26675 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26676 that are semantically a reverse operation.
26677 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26678 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26679 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26681 (aarch64_can_change_mode_class): For big-endian, forbid changes
26682 between two SVE modes if they have different element sizes.
26684 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26686 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26687 the TImode handling for big-endian targets.
26689 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26691 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26692 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
26694 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26695 Remove BSWAP handing for big-endian targets and use the form of
26696 LD1RQ appropariate for the mode.
26698 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26700 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26701 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26702 duplicated element.
26704 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26707 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26708 check for operands that need to go through aarch64_sve_reload_be.
26710 2018-02-01 Jakub Jelinek <jakub@redhat.com>
26712 PR tree-optimization/81661
26713 PR tree-optimization/84117
26714 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26715 * tree-eh.c: Include gimplify.h.
26716 (find_trapping_overflow, replace_trapping_overflow,
26717 rewrite_to_non_trapping_overflow): New functions.
26718 * tree-vect-loop.c: Include tree-eh.h.
26719 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26720 * tree-data-ref.c: Include tree-eh.h.
26721 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26723 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
26725 PR rtl-optimization/84123
26726 * combine.c (change_zero_ext): Check if hard register satisfies
26727 can_change_dest_mode before calling gen_lowpart_SUBREG.
26729 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
26732 * ira.c (ira_init_register_move_cost): Remove assert.
26734 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26736 PR rtl-optimization/84071
26737 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26738 * doc/tm.texi: Regenerate.
26740 2018-01-31 Richard Biener <rguenther@suse.de>
26742 PR tree-optimization/84132
26743 * tree-data-ref.c (analyze_miv_subscript): Properly
26744 check whether evolution_function_is_affine_multivariate_p
26745 before calling gcd_of_steps_may_divide_p.
26747 2018-01-31 Julia Koval <julia.koval@intel.com>
26750 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26751 * config/i386/i386.md (rdpid_rex64) New.
26752 (rdpid): Make 32bit only.
26754 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
26757 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26758 an IDENTIFIER_NODE for FUNCTION_TYPE's.
26760 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26763 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26765 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26767 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26769 PR rtl-optimization/84071
26770 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26771 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26773 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26775 * config/arc/arc.c (arc_handle_aux_attribute): New function.
26776 (arc_attribute_table): Add 'aux' attribute.
26777 (arc_in_small_data_p): Consider aux like variables.
26778 (arc_is_aux_reg_p): New function.
26779 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26780 (arc_get_aux_arg): New function.
26781 (prepare_move_operands): Handle aux-register access.
26782 (arc_handle_aux_attribute): New function.
26783 * doc/extend.texi (ARC Variable attributes): Add subsection.
26785 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26787 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26788 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26789 (arc_attribute_table): Add 'uncached' attribute.
26790 (arc_print_operand): Print '.di' flag for uncached memory
26792 (arc_in_small_data_p): Do not consider for small data the uncached
26794 (arc_is_uncached_mem_p): New function.
26795 * config/arc/predicates.md (compact_store_memory_operand): Check
26796 for uncached memory accesses.
26797 (nonvol_nonimm_operand): Likewise.
26798 * doc/extend.texi (ARC Type Attribute): New subsection.
26800 2018-01-31 Jakub Jelinek <jakub@redhat.com>
26803 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26804 falign-loops=): Add Optimization flag.
26806 2018-01-30 Jeff Law <law@redhat.com>
26809 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26810 INT_REGISTERS_SAVED. Check it prior to calling
26811 get_scratch_register_on_entry.
26812 (ix86_adjust_stack_and_probe): Similarly.
26813 (ix86_emit_probe_stack_range): Similarly.
26814 (ix86_expand_prologue): Corresponding changes.
26816 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26819 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26820 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26822 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
26825 * lra-constraints.c (curr_insn_transform): Process AND in the
26828 2018-01-30 Jakub Jelinek <jakub@redhat.com>
26830 PR rtl-optimization/83986
26831 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26832 dependence against last_pending_memory_flush in addition to
26833 pending_jump_insns.
26835 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
26837 PR tree-optimization/81611
26838 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26841 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26844 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26847 2018-01-30 Richard Biener <rguenther@suse.de>
26848 Jakub Jelinek <jakub@redhat.com>
26850 PR tree-optimization/84111
26851 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26852 inner loops added during recursion, as they don't have up-to-date
26855 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26858 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26859 (can_inline_edge_by_limits_p): ... here.
26860 (can_early_inline_edge_p, check_callers,
26861 update_caller_keys, update_callee_keys, recursive_inlining,
26862 add_new_edges_to_heap, speculation_useful_p,
26863 inline_small_functions,
26864 inline_small_functions, flatten_function,
26865 inline_to_all_callers_1): Update.
26867 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26869 * profile-count.c (profile_count::combine_with_ipa_count): Handle
26872 2018-01-30 Richard Biener <rguenther@suse.de>
26874 PR tree-optimization/83008
26875 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26876 invariant and constant vector uses in stmts when they need
26877 more than one stmt.
26879 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26882 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26883 * configure: Regenerate.
26885 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26887 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26889 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26890 Use gen_rtx_REG rather than gen_lowpart.
26892 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26894 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26895 rather than 0 when creating partial subregs.
26897 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26899 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26902 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
26905 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26906 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26907 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26908 flags. This restores the settings used before the 2017-07-24.
26909 Turning off pre increment/decrement/modify allows IVOPTS to
26910 optimize DF/SF loops where the index is an int.
26912 2018-01-29 Richard Biener <rguenther@suse.de>
26913 Kelvin Nilsen <kelvin@gcc.gnu.org>
26916 * tree-vect-stmts.c (vectorizable_call): Don't call
26917 targetm.vectorize_builtin_md_vectorized_function if callee is
26920 2018-01-22 Carl Love <cel@us.ibm.com>
26922 * doc/extend.tex: Fix typo in second arg in
26923 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26925 2018-01-29 Richard Biener <rguenther@suse.de>
26927 PR tree-optimization/84086
26928 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26929 (flush_ssaname_freelist): When SSA names were released reset
26930 the SCEV hash table.
26932 2018-01-29 Richard Biener <rguenther@suse.de>
26934 PR tree-optimization/84057
26935 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26936 removed paths when removing edges.
26938 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
26940 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26941 -mfunction-return=@var{choice}.
26943 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
26945 PR diagnostic/84034
26946 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26947 Handle CR like TAB.
26948 (layout::print_source_line): Likewise.
26949 (test_get_line_width_without_trailing_whitespace): Add test cases.
26951 2018-01-27 Jakub Jelinek <jakub@redhat.com>
26953 PR middle-end/84040
26954 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26957 2018-01-26 Jim Wilson <jimw@sifive.com>
26959 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26961 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26964 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26966 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26967 and CMP + SUB-immediate -> SUBS.
26969 2018-01-26 Martin Sebor <msebor@redhat.com>
26971 PR tree-optimization/83896
26972 * tree-ssa-strlen.c (get_string_len): Rename...
26973 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
26974 Avoid assuming length is constant.
26975 (handle_char_store): Use HOST_WIDE_INT for string length.
26977 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
26980 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26981 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26983 2018-01-26 Richard Biener <rguenther@suse.de>
26985 PR rtl-optimization/84003
26986 * dse.c (record_store): Only record redundant stores when
26987 the earlier store aliases at least all accesses the later one does.
26989 2018-01-26 Jakub Jelinek <jakub@redhat.com>
26991 PR rtl-optimization/83985
26992 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26993 REG_CFA_RESTORE insns.
26994 (delete_unmarked_insns): Don't ignore separate shrink wrapping
26995 REG_CFA_RESTORE insns here.
26998 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26999 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
27001 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27003 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
27004 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
27005 (arc_init): Likewise.
27006 (arc_override_options): Likewise.
27007 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
27009 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
27011 * config/arc/arc.h (TARGET_DBNZ): Define.
27012 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
27013 properly set the tune attribute.
27014 (dbnz): Use TARGET_DBNZ guard.
27015 * config/arc/arc.opt (mtune): Add core3 option.
27017 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27019 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
27020 recognize new pic like addresses.
27021 (arc_delegitimize_address): Clean up.
27023 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27025 * config/arc/arc-arches.def: Option mrf16 valid for all
27027 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
27028 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
27029 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
27030 * config/arc/arc-tables.opt: Regenerate.
27031 * config/arc/arc.c (arc_conditional_register_usage): Handle
27032 reduced register file case.
27033 (arc_file_start): Set must have build attributes.
27034 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
27035 mrf16 option value.
27036 * config/arc/arc.opt (mrf16): Add new option.
27037 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
27038 * config/arc/genmultilib.awk: Handle new mrf16 option.
27039 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
27040 * config/arc/t-multilib: Regenerate.
27041 * doc/invoke.texi (ARC Options): Document mrf16 option.
27043 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27045 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
27046 * config/arc/arc.c (arc_handle_secure_attribute): New function.
27047 (arc_attribute_table): Add 'secure_call' attribute.
27048 (arc_print_operand): Print secure call operand.
27049 (arc_function_ok_for_sibcall): Don't optimize tail calls when
27051 (arc_is_secure_call_p): New function. * config/arc/arc.md
27052 (call_i): Add support for sjli instruction.
27053 (call_value_i): Likewise.
27054 * config/arc/constraints.md (Csc): New constraint.
27056 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27057 John Eric Martin <John.Martin@emmicro-us.com>
27059 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
27060 * config/arc/arc.c (_arc_jli_section): New struct.
27061 (arc_jli_section): New type.
27062 (rc_jli_sections): New static variable.
27063 (arc_handle_jli_attribute): New function.
27064 (arc_attribute_table): Add jli_always and jli_fixed attribute.
27065 (arc_file_end): New function.
27066 (TARGET_ASM_FILE_END): Define.
27067 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
27068 (arc_add_jli_section): New function.
27069 (jli_call_scan): Likewise.
27070 (arc_reorg): Call jli_call_scan.
27071 (arc_output_addsi): Remove 'S' from printing asm operand.
27072 (arc_is_jli_call_p): New function.
27073 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
27075 (movhi_insn): Likewise.
27076 (movsi_insn): Likewise.
27077 (movsi_set_cc_insn): Likewise.
27078 (loadqi_update): Likewise.
27079 (load_zeroextendqisi_update): Likewise.
27080 (load_signextendqisi_update): Likewise.
27081 (loadhi_update): Likewise.
27082 (load_zeroextendhisi_update): Likewise.
27083 (load_signextendhisi_update): Likewise.
27084 (loadsi_update): Likewise.
27085 (loadsf_update): Likewise.
27086 (movsicc_insn): Likewise.
27087 (bset_insn): Likewise.
27088 (bxor_insn): Likewise.
27089 (bclr_insn): Likewise.
27090 (bmsk_insn): Likewise.
27091 (bicsi3_insn): Likewise.
27092 (cmpsi_cc_c_insn): Likewise.
27093 (movsi_ne): Likewise.
27094 (movsi_cond_exec): Likewise.
27095 (clrsbsi2): Likewise.
27096 (norm_f): Likewise.
27106 (call_i): Remove 'S' asm letter, add jli instruction.
27107 (call_value_i): Likewise.
27108 * config/arc/arc.op (mjli-always): New option.
27109 * config/arc/constraints.md (Cji): New constraint.
27110 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
27112 (subsf3_fpx): Likewise.
27113 (mulsf3_fpx): Likewise.
27114 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
27116 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
27117 function attrbutes.
27118 * doc/invoke.texi (ARC): Document mjli-always option.
27120 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
27122 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
27123 avoid addition with 0 and use incw and decw where possible.
27125 2018-01-26 Richard Biener <rguenther@suse.de>
27127 PR tree-optimization/81082
27128 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27129 association if it requires casting to unsigned.
27130 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27131 from fold_plusminus_mult_expr to catch important cases late when
27132 range info is available.
27134 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27136 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
27137 * configure.ac (hidden_linkonce): New test.
27138 * configure: Regenerate.
27139 * config.in: Regenerate.
27141 2018-01-26 Julia Koval <julia.koval@intel.com>
27143 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
27144 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
27145 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
27146 _mm_mask_bitshuffle_epi64_mask): Fix type.
27147 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
27148 USI_FTYPE_V4DI_V4DI_USI): Remove.
27149 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
27150 __builtin_ia32_vpshufbitqmb256_mask,
27151 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
27152 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
27153 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
27155 2018-01-26 Alan Modra <amodra@gmail.com>
27158 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
27159 UNSPEC_VBPERMQ. Sort other unspecs.
27161 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
27163 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
27165 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
27167 PR middle-end/83055
27168 * predict.c (drop_profile): Do not push/pop cfun; update also
27170 (handle_missing_profiles): Fix logic looking for zero profiles.
27172 2018-01-25 Jakub Jelinek <jakub@redhat.com>
27174 PR middle-end/83977
27175 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27176 on functions with #pragma omp declare simd or functions with simd
27178 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27179 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27180 Remove trailing \n from warning_at calls.
27182 2018-01-25 Tom de Vries <tom@codesourcery.com>
27185 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27186 for neutered workers.
27188 2018-01-24 Joseph Myers <joseph@codesourcery.com>
27191 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27192 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27194 2018-01-24 Jeff Law <law@redhat.com>
27197 * i386.c (get_probe_interval): Move to earlier point.
27198 (ix86_compute_frame_layout): If -fstack-clash-protection and
27199 the frame is larger than the probe interval, then use pushes
27200 to save registers rather than reg->mem moves.
27201 (ix86_expand_prologue): Remove conditional for int_registers_saved
27204 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
27207 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27208 min/max for never referenced object.
27210 2018-01-24 Jakub Jelinek <jakub@redhat.com>
27212 PR middle-end/83977
27213 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27215 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27216 attributes from DECL_ATTRIBUTES (decl) without affecting
27217 DECL_ATTRIBUTES (current_function_decl).
27218 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27219 functions with non-NULL DECL_ABSTRACT_ORIGIN.
27221 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
27223 PR tree-optimization/83979
27224 * fold-const.c (fold_comparison): Use constant_boolean_node
27225 instead of boolean_{true,false}_node.
27227 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
27229 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27232 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27234 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27235 Simplify the clause that sets the length attribute.
27236 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27237 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27238 clause that sets the length attribute.
27239 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27241 2018-01-24 Tom de Vries <tom@codesourcery.com>
27244 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27245 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27246 Add strict parameter.
27247 (prevent_branch_around_nothing): Insert dummy insn between branch to
27248 label and label with no ptx insn inbetween.
27249 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27251 2018-01-24 Tom de Vries <tom@codesourcery.com>
27254 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27255 for neutered threads in warp.
27256 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27258 2018-01-24 Richard Biener <rguenther@suse.de>
27260 PR tree-optimization/83176
27261 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27264 2018-01-24 Richard Biener <rguenther@suse.de>
27266 PR tree-optimization/82819
27267 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27268 code generating pluses that are no-ops in the target precision.
27270 2018-01-24 Richard Biener <rguenther@suse.de>
27272 PR middle-end/84000
27273 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27275 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27277 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27278 to merge probabilities.
27279 * predict.c (probably_never_executed): Also mark as cold functions
27280 with global 0 profile and guessed local profile.
27281 * profile-count.c (profile_probability::combine_with_count): New
27283 * profile-count.h (profile_probability::operator*,
27284 profile_probability::operator*=, profile_probability::operator/,
27285 profile_probability::operator/=): Reduce precision to adjusted
27286 and set value to guessed on contradictory divisions.
27287 (profile_probability::combine_with_freq): Remove.
27288 (profile_probability::combine_wiht_count): Declare.
27289 (profile_count::force_nonzero):: Set to adjusted.
27290 (profile_count::probability_in):: Set quality to adjusted.
27291 * tree-ssa-tail-merge.c (replace_block_by): Use
27292 combine_with_count.
27294 2018-01-23 Andrew Waterman <andrew@sifive.com>
27295 Jim Wilson <jimw@sifive.com>
27297 * config/riscv/riscv.c (riscv_stack_boundary): New.
27298 (riscv_option_override): Set riscv_stack_boundary. Handle
27299 riscv_preferred_stack_boundary_arg.
27300 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27301 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27302 (STACK_BOUNDARY): Set to riscv_stack_boundary.
27303 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27304 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27305 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27307 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
27310 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27311 of struct ix86_frame.
27312 (ix86_expand_epilogue): Likewise. Add a local variable for
27313 the reg_save_offset field in struct ix86_frame.
27315 2018-01-23 Bin Cheng <bin.cheng@arm.com>
27317 PR tree-optimization/82604
27318 * tree-loop-distribution.c (enum partition_kind): New enum item
27319 PKIND_PARTIAL_MEMSET.
27320 (partition_builtin_p): Support above new enum item.
27321 (generate_code_for_partition): Ditto.
27322 (compute_access_range): Differentiate cases that equality can be
27323 proven at all loops, the innermost loops or no loops.
27324 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27325 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
27326 (finalize_partitions, distribute_loop): Don't fuse partition of
27327 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27328 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27329 parloop is enabled.
27331 2018-01-23 Martin Liska <mliska@suse.cz>
27333 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27334 order to ignore the predictor.
27335 (PRED_POLYMORPHIC_CALL): Likewise.
27336 (PRED_RECURSIVE_CALL): Likewise.
27338 2018-01-23 Martin Liska <mliska@suse.cz>
27340 * tree-profile.c (tree_profiling): Print function header to
27341 aware reader which function we are working on.
27342 * value-prof.c (gimple_find_values_to_profile): Do not print
27343 not interesting value histograms.
27345 2018-01-23 Martin Liska <mliska@suse.cz>
27347 * profile-count.h (enum profile_quality): Add
27348 profile_uninitialized as the first value. Do not number values
27349 as they are zero based.
27350 (profile_count::verify): Update sanity check.
27351 (profile_probability::verify): Likewise.
27353 2018-01-23 Nathan Sidwell <nathan@acm.org>
27355 * doc/invoke.texi (ffor-scope): Deprecate.
27357 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27359 PR tree-optimization/83510
27360 * domwalk.c (set_all_edges_as_executable): New function.
27361 (dom_walker::dom_walker): Convert bool param
27362 "skip_unreachable_blocks" to enum reachability. Move setup of
27363 edge flags to set_all_edges_as_executable and only do it when
27364 reachability is REACHABLE_BLOCKS.
27365 * domwalk.h (enum dom_walker::reachability): New enum.
27366 (dom_walker::dom_walker): Convert bool param
27367 "skip_unreachable_blocks" to enum reachability.
27368 (set_all_edges_as_executable): New decl.
27369 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
27370 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27372 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27373 but converting true to REACHABLE_BLOCKS.
27374 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27376 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27377 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27378 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27380 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27381 if check_all_array_refs will be called.
27383 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27385 * tree.c (selftest::test_location_wrappers): Add more test
27388 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27390 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27391 (selftest::test_bit_in_range): Likewise.
27393 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27396 * doc/sourcebuild.texi (vect_float): Say that the selector
27397 only describes the situation when -funsafe-math-optimizations is on.
27398 (vect_float_strict): Document.
27400 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27402 PR tree-optimization/83965
27403 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27404 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27405 instead of checking only for a reduction.
27406 (vect_recog_widen_sum_pattern): Likewise.
27408 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27410 * predict.c (probably_never_executed): Only use precise profile info.
27411 (compute_function_frequency): Skip after inlining hack since we now
27412 have quality checking.
27414 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27416 * profile-count.h (profile_probability::very_unlikely,
27417 profile_probability::unlikely, profile_probability::even): Set
27418 precision to guessed.
27420 2018-01-23 Richard Biener <rguenther@suse.de>
27422 PR tree-optimization/83963
27423 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27424 Properly terminate dominator walk when crossing the exit edge not
27425 when visiting its source block.
27427 2018-01-23 Jakub Jelinek <jakub@redhat.com>
27430 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27431 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27433 2018-01-22 Jakub Jelinek <jakub@redhat.com>
27435 PR tree-optimization/83957
27436 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
27437 semicolon after for body surrounded by braces.
27439 PR tree-optimization/83081
27440 * profile-count.h (profile_probability::split): New method.
27441 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27442 Use profile_probability::split.
27443 (do_compare_rtx_and_jump): Fix adjustment of probabilities
27444 when splitting a single conditional jump into 2.
27446 2018-01-22 David Malcolm <dmalcolm@redhat.com>
27448 PR tree-optimization/69452
27449 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27452 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27454 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27455 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27456 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27458 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27460 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27462 * config/rl78/rl78.md (movdi): New define_expand.
27463 * config/rl78/rl78.c (rl78_split_movdi): New function.
27465 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27468 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27470 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27471 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27472 128-bit to produce an UNSPEC move to get the double word with the
27473 signbit and then a shift directly to do signbit.
27474 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27475 implementation with a new version that just does either a direct
27476 move or a regular move. Move memory interface to separate insns.
27477 Move insns so they are next to the expander.
27478 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27479 with signbit move. Split big and little endian case.
27480 (signbit<mode>2_dm_mem_le): Likewise.
27481 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27482 (signbit<mode>2_dm2): Likewise.
27484 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27486 * config/rl78/rl78.md (anddi3): New define_expand.
27488 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27490 * config/rl78/rl78.md (umindi3): New define_expand.
27492 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27494 * config/rl78/rl78.md (smindi3): New define_expand.
27496 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27498 * config/rl78/rl78.md (smaxdi3): New define_expand.
27500 2018-01-22 Carl Love <cel@us.ibm.com>
27502 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27503 LVX_V1TI): Add macro expansion.
27504 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27505 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27506 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27507 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27508 Change check to determine if the instruction is a byte reversing
27509 entry. Fix typo in comment.
27510 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27511 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27512 Add def_builtin calls for new builtins.
27513 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27514 Add define_insn expansion.
27516 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27518 * config/rl78/rl78.md (umaxdi3): New define_expand.
27520 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27522 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27523 for non-QImode registers.
27525 2018-01-22 Richard Biener <rguenther@suse.de>
27527 PR tree-optimization/83963
27528 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27529 including the loop exit block.
27530 (scop_detection::merge_sese): Likewise.
27531 (scop_detection::add_scop): Do it here instead.
27533 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27535 * doc/sourcebuild.texi (arm_softfloat): Document.
27537 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27540 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27541 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27542 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27544 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27545 David Edelsohn <dje.gcc@gmail.com>
27548 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27549 Change "crset eq" to "crset 2".
27550 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27551 (*call_indirect_aix<mode>_nospec): Likewise.
27552 (*call_value_indirect_aix<mode>_nospec): Likewise.
27553 (*call_indirect_elfv2<mode>_nospec): Likewise.
27554 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27555 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27556 change assembly output from . to $.
27557 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27558 (indirect_jump<mode>_nospec): Change assembly output from . to $.
27559 (*tablejump<mode>_internal1_nospec): Likewise.
27561 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
27564 * config/sh/sh_optimize_sett_clrt.cc:
27565 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27567 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
27569 PR tree-optimization/83940
27570 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27571 offset_dt to vect_constant_def rather than vect_unknown_def_type.
27572 (vect_check_load_store_mask): Add a mask_dt_out parameter and
27573 use it to pass back the definition type.
27574 (vect_check_store_rhs): Likewise rhs_dt_out.
27575 (vect_build_gather_load_calls): Add a mask_dt argument and use
27576 it instead of a call to vect_is_simple_use.
27577 (vectorizable_store): Update calls to vect_check_load_store_mask
27578 and vect_check_store_rhs. Use the dt returned by the latter instead
27579 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
27580 instead of calls to vect_is_simple_use. Pass the scalar rather
27581 than the vector operand to vect_is_simple_use when handling
27582 second and subsequent copies of an rhs value.
27583 (vectorizable_load): Update calls to vect_check_load_store_mask
27584 and vect_build_gather_load_calls. Use the cached mask_dt and
27585 gs_info.offset_dt instead of calls to vect_is_simple_use.
27587 2018-01-20 Jakub Jelinek <jakub@redhat.com>
27589 PR middle-end/83945
27590 * tree-emutls.c: Include gimplify.h.
27591 (lower_emutls_2): New function.
27592 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27593 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27594 it before further processing.
27597 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27598 UINTVAL (trueop1) instead of INTVAL (op1).
27600 2018-01-19 Jakub Jelinek <jakub@redhat.com>
27604 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27605 INCOMING_FRAME_SP_OFFSET if not defined.
27606 (scan_trace): Add ENTRY argument. If true and
27607 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27608 emit a note to adjust the CFA offset.
27609 (create_cfi_notes): Adjust scan_trace callers.
27610 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27611 INCOMING_FRAME_SP_OFFSET in the CIE.
27612 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27613 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27615 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27616 * doc/tm.texi: Regenerated.
27618 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27620 PR rtl-optimization/83147
27621 * lra-constraints.c (remove_inheritance_pseudos): Use
27622 lra_substitute_pseudo_within_insn.
27624 2018-01-19 Tom de Vries <tom@codesourcery.com>
27625 Cesar Philippidis <cesar@codesourcery.com>
27628 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27630 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
27633 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27634 spaces for function labels.
27636 2018-01-19 Martin Liska <mliska@suse.cz>
27638 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27639 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27640 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27641 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27642 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27643 (PRED_CONST_RETURN): Change from 69 to 65.
27644 (PRED_NULL_RETURN): Change from 91 to 71.
27645 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27646 (PRED_LOOP_GUARD): Change from 66 to 73.
27648 2018-01-19 Martin Liska <mliska@suse.cz>
27650 * predict.c (predict_insn_def): Add new assert.
27651 (struct branch_predictor): Change type to signed integer.
27652 (test_prediction_value_range): Amend test to cover
27653 PROB_UNINITIALIZED.
27654 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27655 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27656 (PRED_LOOP_ITERATIONS_MAX): Likewise.
27657 (PRED_LOOP_IV_COMPARE): Likewise.
27658 * predict.h (PROB_UNINITIALIZED): Define new constant.
27660 2018-01-19 Martin Liska <mliska@suse.cz>
27662 * predict.c (dump_prediction): Add new format for
27663 analyze_brprob.py script which is enabled with -details
27665 * profile-count.h (precise_p): New function.
27667 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27669 PR tree-optimization/83922
27670 * tree-vect-loop.c (vect_verify_full_masking): Return false if
27671 there are no statements that need masking.
27672 (vect_active_double_reduction_p): New function.
27673 (vect_analyze_loop_operations): Use it when handling phis that
27674 are not in the loop header.
27676 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27678 PR tree-optimization/83914
27679 * tree-vect-loop.c (vectorizable_induction): Don't convert
27680 init_expr or apply the peeling adjustment for inductions
27681 that are nested within the vectorized loop.
27683 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27685 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27688 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27692 * function.h (gimplify_parameters): Add gimple_seq * argument.
27693 * function.c: Include gimple.h and options.h.
27694 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27695 for the added local temporaries if needed.
27696 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27697 if there are any parameter cleanups, wrap whole body into a
27698 try/finally with the cleanups.
27700 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
27703 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27704 Use GET_MODE_CLASS for scalar floating point.
27706 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27710 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27711 Fix call of call_cgraph_insertion_hooks.
27713 2018-01-18 Martin Sebor <msebor@redhat.com>
27715 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27717 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27720 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27723 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
27726 * common.opt: (-ffile-prefix-map): New option.
27727 * opts.c (common_handle_option): Defer it.
27728 * opts-global.c (handle_common_deferred_options): Handle it.
27729 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27730 * file-prefix-map.h: New file.
27731 (remap_debug_filename, add_debug_prefix_map): ...here.
27732 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27733 * final.c (debug_prefix_map, add_debug_prefix_map
27734 remap_debug_filename): Move to...
27735 * file-prefix-map.c: New file.
27736 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27737 generalize, get rid of alloca(), use strrchr() instead of strchr().
27738 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27739 Implement in terms of add_prefix_map().
27740 (remap_macro_filename, remap_debug_filename): Implement in term of
27742 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27743 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27744 * dbxout.c: Include file-prefix-map.h.
27745 * varasm.c: Likewise.
27746 * vmsdbgout.c: Likewise.
27747 * xcoffout.c: Likewise.
27748 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27749 * doc/cppopts.texi (-fmacro-prefix-map): Document.
27750 * doc/invoke.texi (-ffile-prefix-map): Document.
27751 (-fdebug-prefix-map): Update description.
27753 2018-01-18 Martin Liska <mliska@suse.cz>
27755 * config/i386/i386.c (indirect_thunk_name): Document that also
27757 (output_indirect_thunk): Document why both instructions
27758 (pause and lfence) are generated.
27760 2018-01-18 Richard Biener <rguenther@suse.de>
27762 PR tree-optimization/83887
27763 * graphite-scop-detection.c
27764 (scop_detection::get_nearest_dom_with_single_entry): Remove.
27765 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27766 (scop_detection::merge_sese): Re-implement with a flood-fill
27767 algorithm that properly finds a SESE region if it exists.
27769 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27772 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27773 pointer_diff optimizations use view_convert instead of convert.
27775 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27777 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27778 Generate different code for -mno-speculate-indirect-jumps.
27779 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27780 (*call_indirect_aix<mode>): Disable for
27781 -mno-speculate-indirect-jumps.
27782 (*call_indirect_aix<mode>_nospec): New define_insn.
27783 (*call_value_indirect_aix<mode>): Disable for
27784 -mno-speculate-indirect-jumps.
27785 (*call_value_indirect_aix<mode>_nospec): New define_insn.
27786 (*sibcall_nonlocal_sysv<mode>): Generate different code for
27787 -mno-speculate-indirect-jumps.
27788 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27790 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
27792 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27793 long double type, set the flags for noting the default long double
27794 type, even if we don't pass or return a long double type.
27796 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
27799 * ipa-inline.c (flatten_function): Do not overwrite final inlining
27802 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
27804 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27805 support for merge[hl].
27806 (fold_mergehl_helper): New helper function.
27807 (tree-vector-builder.h): New #include for tree_vector_builder usage.
27808 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27809 (altivec_vmrglw_direct): Add xxmrglw insn.
27811 2018-01-17 Andrew Waterman <andrew@sifive.com>
27813 * config/riscv/riscv.c (riscv_conditional_register_usage): If
27814 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27816 2018-01-17 David Malcolm <dmalcolm@redhat.com>
27819 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27820 call the lto_location_cache before reading the
27821 DECL_SOURCE_LOCATION of the types.
27823 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
27824 Richard Sandiford <richard.sandiford@linaro.org>
27826 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27827 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27828 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27829 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27830 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27832 * config/aarch64/constraints.md (aarch64_movti_operand):
27834 * config/aarch64/predicates.md (Uti): Add new constraint.
27836 2018-01-17 Carl Love <cel@us.ibm.com>
27838 * config/rs6000/vsx.md (define_expand xl_len_r,
27839 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27840 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27842 (define_expand, define_insn): Move the shift left from the
27843 define_insn to the define_expand for lxvl and stxvl instructions.
27844 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27845 and XL_LEN_R definitions to PURE.
27847 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
27849 * config/i386/i386.c (indirect_thunk_name): Declare regno
27850 as unsigned int. Compare regno with INVALID_REGNUM.
27851 (output_indirect_thunk): Ditto.
27852 (output_indirect_thunk_function): Ditto.
27853 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
27854 in the call to output_indirect_thunk_function.
27856 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
27858 PR middle-end/83884
27859 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27860 rather than the size of inner_type to determine the stack slot size
27861 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27863 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
27866 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27869 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
27871 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27872 endian Linux systems to optionally enable multilibs for selecting
27873 the long double type if the user configured an explicit type.
27874 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27875 have no long double multilibs if not defined.
27876 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27877 warn if the user used -mabi={ieee,ibm}longdouble and we built
27878 multilibs for long double.
27879 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27880 appropriate multilib option.
27881 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27883 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27884 for building long double multilibs.
27885 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27887 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
27889 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27892 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27894 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27897 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27900 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27903 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27905 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27906 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27908 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
27910 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27911 different rtl trees depending on TARGET_64BIT.
27912 (rs6000_gen_lvx): Likewise.
27914 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27916 * config/visium/visium.md (nop): Tweak comment.
27917 (hazard_nop): Likewise.
27919 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27921 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27922 -mspeculate-indirect-jumps.
27923 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27924 for -mno-speculate-indirect-jumps.
27925 (*call_indirect_elfv2<mode>_nospec): New define_insn.
27926 (*call_value_indirect_elfv2<mode>): Disable for
27927 -mno-speculate-indirect-jumps.
27928 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27929 (indirect_jump): Emit different RTL for
27930 -mno-speculate-indirect-jumps.
27931 (*indirect_jump<mode>): Disable for
27932 -mno-speculate-indirect-jumps.
27933 (*indirect_jump<mode>_nospec): New define_insn.
27934 (tablejump): Emit different RTL for
27935 -mno-speculate-indirect-jumps.
27936 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27937 (tablejumpsi_nospec): New define_expand.
27938 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27939 (tablejumpdi_nospec): New define_expand.
27940 (*tablejump<mode>_internal1): Disable for
27941 -mno-speculate-indirect-jumps.
27942 (*tablejump<mode>_internal1_nospec): New define_insn.
27943 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27946 2018-01-16 Artyom Skrobov tyomitch@gmail.com
27948 * caller-save.c (insert_save): Drop unnecessary parameter. All
27951 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27952 Richard Biener <rguenth@suse.de>
27955 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27956 return early, inline manually is_gimple_sizepos. Make sure if we
27957 call gimplify_expr we don't end up with a gimple constant.
27958 * tree.c (variably_modified_type_p): Don't return true for
27959 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
27960 * gimplify.h (is_gimple_sizepos): Remove.
27962 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27964 PR tree-optimization/83857
27965 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27966 vectorizable_live_operation for pure SLP statements.
27967 (vectorizable_live_operation): Handle PHIs.
27969 2018-01-16 Richard Biener <rguenther@suse.de>
27971 PR tree-optimization/83867
27972 * tree-vect-stmts.c (vect_transform_stmt): Precompute
27973 nested_in_vect_loop_p since the scalar stmt may get invalidated.
27975 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27978 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27979 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27980 If off is not INTEGER_CST, issue a may not be aligned warning
27981 rather than isn't aligned. Use isn%'t rather than isn't.
27982 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27984 <case MULT_EXPR>: Improve the case when bottom and one of the
27985 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27986 operand, in that case check if the other operand is multiple of
27987 bottom divided by the INTEGER_CST operand.
27989 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27992 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27993 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27994 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27995 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27996 * config/pa/pa.c (pa_function_arg_advance): Likewise.
27997 (pa_function_arg, pa_arg_partial_bytes): Likewise.
27998 (pa_function_arg_size): New function.
28000 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28002 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
28003 in a separate statement.
28005 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28007 PR tree-optimization/83847
28008 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
28009 group gathers and scatters.
28011 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28013 PR rtl-optimization/86620
28014 * params.def (max-sched-ready-insns): Bump minimum value to 1.
28016 PR rtl-optimization/83213
28017 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
28018 to last if both are JUMP_INSNs.
28020 PR tree-optimization/83843
28021 * gimple-ssa-store-merging.c
28022 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
28023 store_immediate_info for bswap/nop orig_stores.
28025 2018-01-15 Andrew Waterman <andrew@sifive.com>
28027 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
28029 <UDIV>: Increase cost if !TARGET_DIV.
28031 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
28033 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
28034 (define_attr "cr_logical_3op"): New.
28035 (cceq_ior_compare): Adjust.
28036 (cceq_ior_compare_complement): Adjust.
28037 (*cceq_rev_compare): Adjust.
28038 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
28039 (is_cracked_insn): Adjust.
28040 (insn_must_be_first_in_group): Adjust.
28041 * config/rs6000/40x.md: Adjust.
28042 * config/rs6000/440.md: Adjust.
28043 * config/rs6000/476.md: Adjust.
28044 * config/rs6000/601.md: Adjust.
28045 * config/rs6000/603.md: Adjust.
28046 * config/rs6000/6xx.md: Adjust.
28047 * config/rs6000/7450.md: Adjust.
28048 * config/rs6000/7xx.md: Adjust.
28049 * config/rs6000/8540.md: Adjust.
28050 * config/rs6000/cell.md: Adjust.
28051 * config/rs6000/e300c2c3.md: Adjust.
28052 * config/rs6000/e500mc.md: Adjust.
28053 * config/rs6000/e500mc64.md: Adjust.
28054 * config/rs6000/e5500.md: Adjust.
28055 * config/rs6000/e6500.md: Adjust.
28056 * config/rs6000/mpc.md: Adjust.
28057 * config/rs6000/power4.md: Adjust.
28058 * config/rs6000/power5.md: Adjust.
28059 * config/rs6000/power6.md: Adjust.
28060 * config/rs6000/power7.md: Adjust.
28061 * config/rs6000/power8.md: Adjust.
28062 * config/rs6000/power9.md: Adjust.
28063 * config/rs6000/rs64.md: Adjust.
28064 * config/rs6000/titan.md: Adjust.
28066 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28068 * config/i386/predicates.md (indirect_branch_operand): Rewrite
28069 ix86_indirect_branch_register logic.
28071 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28073 * config/i386/constraints.md (Bs): Update
28074 ix86_indirect_branch_register check. Don't check
28075 ix86_indirect_branch_register with GOT_memory_operand.
28077 * config/i386/predicates.md (GOT_memory_operand): Don't check
28078 ix86_indirect_branch_register here.
28079 (GOT32_symbol_operand): Likewise.
28081 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28083 * config/i386/predicates.md (constant_call_address_operand):
28084 Rewrite ix86_indirect_branch_register logic.
28085 (sibcall_insn_operand): Likewise.
28087 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28089 * config/i386/constraints.md (Bs): Replace
28090 ix86_indirect_branch_thunk_register with
28091 ix86_indirect_branch_register.
28093 * config/i386/i386.md (indirect_jump): Likewise.
28094 (tablejump): Likewise.
28095 (*sibcall_memory): Likewise.
28096 (*sibcall_value_memory): Likewise.
28097 Peepholes of indirect call and jump via memory: Likewise.
28098 * config/i386/i386.opt: Likewise.
28099 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28100 (GOT_memory_operand): Likewise.
28101 (call_insn_operand): Likewise.
28102 (sibcall_insn_operand): Likewise.
28103 (GOT32_symbol_operand): Likewise.
28105 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28107 PR middle-end/83837
28108 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
28109 type rather than type addr's type points to.
28110 (expand_omp_atomic_mutex): Likewise.
28111 (expand_omp_atomic): Likewise.
28113 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28116 * config/i386/i386.c (output_indirect_thunk_function): Use
28117 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
28118 for __x86_return_thunk.
28120 2018-01-15 Richard Biener <rguenther@suse.de>
28122 PR middle-end/83850
28123 * expmed.c (extract_bit_field_1): Fix typo.
28125 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28128 * config/arm/iterators.md (VF): New mode iterator.
28129 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28130 Remove integer-related logic from pattern.
28131 (neon_vabd<mode>_3): Likewise.
28133 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28135 PR middle-end/82694
28136 * common.opt (fstrict-overflow): No longer an alias.
28137 (fwrapv-pointer): New option.
28138 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
28139 also for pointer types based on flag_wrapv_pointer.
28140 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
28141 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
28142 opts->x_flag_wrapv got set.
28143 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
28144 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
28145 POINTER_TYPE_OVERFLOW_UNDEFINED.
28146 * match.pd: Likewise in address comparison pattern.
28147 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
28149 2018-01-15 Richard Biener <rguenther@suse.de>
28152 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
28153 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
28154 Reset type names to their identifier if their TYPE_DECL doesn't
28155 have linkage (and thus is used for ODR and devirt).
28156 (save_debug_info_for_decl): Remove.
28157 (save_debug_info_for_type): Likewise.
28158 (add_tree_to_fld_list): Adjust.
28159 * tree-pretty-print.c (dump_generic_node): Make dumping of
28160 type names more robust.
28162 2018-01-15 Richard Biener <rguenther@suse.de>
28164 * BASE-VER: Bump to 8.0.1.
28166 2018-01-14 Martin Sebor <msebor@redhat.com>
28169 * builtins.c (check_access): Avoid warning when the no-warning bit
28172 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
28174 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28175 * ira-color (allocno_hard_regs_compare): Likewise.
28177 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
28180 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28181 Use .pushsection/.popsection.
28183 2018-01-14 Martin Sebor <msebor@redhat.com>
28186 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28188 2018-01-14 Jakub Jelinek <jakub@redhat.com>
28190 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28191 entry from extra_headers.
28192 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28193 extra_headers, make the list bitwise identical to the i?86-*-* one.
28195 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28197 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28198 -mcmodel=large with -mindirect-branch=thunk,
28199 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28200 -mfunction-return=thunk-extern.
28201 * doc/invoke.texi: Document -mcmodel=large is incompatible with
28202 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28203 -mfunction-return=thunk and -mfunction-return=thunk-extern.
28205 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28207 * config/i386/i386.c (print_reg): Print the name of the full
28208 integer register without '%'.
28209 (ix86_print_operand): Handle 'V'.
28210 * doc/extend.texi: Document 'V' modifier.
28212 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28214 * config/i386/constraints.md (Bs): Disallow memory operand for
28215 -mindirect-branch-register.
28217 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28218 (GOT_memory_operand): Likewise.
28219 (call_insn_operand): Likewise.
28220 (sibcall_insn_operand): Likewise.
28221 (GOT32_symbol_operand): Likewise.
28222 * config/i386/i386.md (indirect_jump): Call convert_memory_address
28223 for -mindirect-branch-register.
28224 (tablejump): Likewise.
28225 (*sibcall_memory): Likewise.
28226 (*sibcall_value_memory): Likewise.
28227 Disallow peepholes of indirect call and jump via memory for
28228 -mindirect-branch-register.
28229 (*call_pop): Replace m with Bw.
28230 (*call_value_pop): Likewise.
28231 (*sibcall_pop_memory): Replace m with Bs.
28232 * config/i386/i386.opt (mindirect-branch-register): New option.
28233 * doc/invoke.texi: Document -mindirect-branch-register option.
28235 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28237 * config/i386/i386-protos.h (ix86_output_function_return): New.
28238 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28239 set function_return_type.
28240 (indirect_thunk_name): Add ret_p to indicate thunk for function
28242 (output_indirect_thunk_function): Pass false to
28243 indirect_thunk_name.
28244 (ix86_output_indirect_branch_via_reg): Likewise.
28245 (ix86_output_indirect_branch_via_push): Likewise.
28246 (output_indirect_thunk_function): Create alias for function
28247 return thunk if regno < 0.
28248 (ix86_output_function_return): New function.
28249 (ix86_handle_fndecl_attribute): Handle function_return.
28250 (ix86_attribute_table): Add function_return.
28251 * config/i386/i386.h (machine_function): Add
28252 function_return_type.
28253 * config/i386/i386.md (simple_return_internal): Use
28254 ix86_output_function_return.
28255 (simple_return_internal_long): Likewise.
28256 * config/i386/i386.opt (mfunction-return=): New option.
28257 (indirect_branch): Mention -mfunction-return=.
28258 * doc/extend.texi: Document function_return function attribute.
28259 * doc/invoke.texi: Document -mfunction-return= option.
28261 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28263 * config/i386/i386-opts.h (indirect_branch): New.
28264 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28265 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28266 with local indirect jump when converting indirect call and jump.
28267 (ix86_set_indirect_branch_type): New.
28268 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28269 (indirectlabelno): New.
28270 (indirect_thunk_needed): Likewise.
28271 (indirect_thunk_bnd_needed): Likewise.
28272 (indirect_thunks_used): Likewise.
28273 (indirect_thunks_bnd_used): Likewise.
28274 (INDIRECT_LABEL): Likewise.
28275 (indirect_thunk_name): Likewise.
28276 (output_indirect_thunk): Likewise.
28277 (output_indirect_thunk_function): Likewise.
28278 (ix86_output_indirect_branch_via_reg): Likewise.
28279 (ix86_output_indirect_branch_via_push): Likewise.
28280 (ix86_output_indirect_branch): Likewise.
28281 (ix86_output_indirect_jmp): Likewise.
28282 (ix86_code_end): Call output_indirect_thunk_function if needed.
28283 (ix86_output_call_insn): Call ix86_output_indirect_branch if
28285 (ix86_handle_fndecl_attribute): Handle indirect_branch.
28286 (ix86_attribute_table): Add indirect_branch.
28287 * config/i386/i386.h (machine_function): Add indirect_branch_type
28288 and has_local_indirect_jump.
28289 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28291 (tablejump): Likewise.
28292 (*indirect_jump): Use ix86_output_indirect_jmp.
28293 (*tablejump_1): Likewise.
28294 (simple_return_indirect_internal): Likewise.
28295 * config/i386/i386.opt (mindirect-branch=): New option.
28296 (indirect_branch): New.
28299 (thunk-inline): Likewise.
28300 (thunk-extern): Likewise.
28301 * doc/extend.texi: Document indirect_branch function attribute.
28302 * doc/invoke.texi: Document -mindirect-branch= option.
28304 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
28307 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28309 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
28311 * ipa-inline.c (want_inline_small_function_p): Return false if
28312 inlining has already failed with CIF_FINAL_ERROR.
28313 (update_caller_keys): Call want_inline_small_function_p before
28315 (update_callee_keys): Likewise.
28317 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
28319 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28321 (rs6000_quadword_masked_address_p): Likewise.
28322 (quad_aligned_load_p): Likewise.
28323 (quad_aligned_store_p): Likewise.
28324 (const_load_sequence_p): Add comment to describe the outer-most loop.
28325 (mimic_memory_attributes_and_flags): New function.
28326 (rs6000_gen_stvx): Likewise.
28327 (replace_swapped_aligned_store): Likewise.
28328 (rs6000_gen_lvx): Likewise.
28329 (replace_swapped_aligned_load): Likewise.
28330 (replace_swapped_load_constant): Capitalize argument name in
28331 comment describing this function.
28332 (rs6000_analyze_swaps): Add a third pass to search for vector loads
28333 and stores that access quad-word aligned addresses and replace
28334 with stvx or lvx instructions when appropriate.
28335 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28336 New function prototype.
28337 (rs6000_quadword_masked_address_p): Likewise.
28338 (rs6000_gen_lvx): Likewise.
28339 (rs6000_gen_stvx): Likewise.
28340 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28341 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28342 when memory address is aligned.
28343 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28344 this split to select lvx instruction when memory address is aligned.
28345 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28346 instruction when memory address is aligned.
28347 (*vsx_le_perm_load_v16qi): Likewise.
28348 (four unnamed splitters): Modify to select the stvx instruction
28349 when memory is aligned.
28351 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
28353 * predict.c (determine_unlikely_bbs): Handle correctly BBs
28354 which appears in the queue multiple times.
28356 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28357 Alan Hayward <alan.hayward@arm.com>
28358 David Sherwood <david.sherwood@arm.com>
28360 * tree-vectorizer.h (vec_lower_bound): New structure.
28361 (_loop_vec_info): Add check_nonzero and lower_bounds.
28362 (LOOP_VINFO_CHECK_NONZERO): New macro.
28363 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28364 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28365 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28366 fields. Make seg_len the distance travelled, not including the
28368 (dr_direction_indicator): Declare.
28369 (dr_zero_step_indicator): Likewise.
28370 (dr_known_forward_stride_p): Likewise.
28371 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28373 (runtime_alias_check_p): Allow runtime alias checks with
28375 (operator ==): Compare access_size and align.
28376 (prune_runtime_alias_test_list): Rework for new distinction between
28377 the access_size and seg_len.
28378 (create_intersect_range_checks_index): Likewise. Cope with polynomial
28380 (get_segment_min_max): New function.
28381 (create_intersect_range_checks): Use it.
28382 (dr_step_indicator): New function.
28383 (dr_direction_indicator): Likewise.
28384 (dr_zero_step_indicator): Likewise.
28385 (dr_known_forward_stride_p): Likewise.
28386 * tree-loop-distribution.c (data_ref_segment_size): Return
28387 DR_STEP * (niters - 1).
28388 (compute_alias_check_pairs): Update call to the dr_with_seg_len
28390 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28391 (vect_preserves_scalar_order_p): New function, split out from...
28392 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
28393 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28394 (vect_vfa_access_size): New function.
28395 (vect_vfa_align): Likewise.
28396 (vect_compile_time_alias): Take access_size_a and access_b arguments.
28397 (dump_lower_bound): New function.
28398 (vect_check_lower_bound): Likewise.
28399 (vect_small_gap_p): Likewise.
28400 (vectorizable_with_step_bound_p): Likewise.
28401 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28402 depencies if the vectorization factor is 1. Convert the checks
28403 for nonzero steps into checks on the bounds of DR_STEP. Try using
28404 a bunds check for variable steps if the minimum required step is
28405 relatively small. Update calls to the dr_with_seg_len
28406 constructor and to vect_compile_time_alias.
28407 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28409 (vect_loop_versioning): Call it.
28410 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28412 (vect_estimate_min_profitable_iters): Account for any bounds checks.
28414 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28415 Alan Hayward <alan.hayward@arm.com>
28416 David Sherwood <david.sherwood@arm.com>
28418 * doc/sourcebuild.texi (vect_scatter_store): Document.
28419 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28421 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28423 * genopinit.c (main): Add supports_vec_scatter_store and
28424 supports_vec_scatter_store_cached to target_optabs.
28425 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28426 IFN_MASK_SCATTER_STORE.
28427 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28429 * internal-fn.h (internal_store_fn_p): Declare.
28430 (internal_fn_stored_value_index): Likewise.
28431 * internal-fn.c (scatter_store_direct): New macro.
28432 (expand_scatter_store_optab_fn): New function.
28433 (direct_scatter_store_optab_supported_p): New macro.
28434 (internal_store_fn_p): New function.
28435 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28436 IFN_MASK_SCATTER_STORE.
28437 (internal_fn_mask_index): Likewise.
28438 (internal_fn_stored_value_index): New function.
28439 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28440 for scatter stores.
28441 * optabs-query.h (supports_vec_scatter_store_p): Declare.
28442 * optabs-query.c (supports_vec_scatter_store_p): New function.
28443 * tree-vectorizer.h (vect_get_store_rhs): Declare.
28444 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28445 true for scatter stores.
28446 (vect_gather_scatter_fn_p): Handle scatter stores too.
28447 (vect_check_gather_scatter): Consider using scatter stores if
28448 supports_vec_scatter_store_p.
28449 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28450 scatter stores too.
28451 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28452 internal_fn_stored_value_index.
28453 (check_load_store_masking): Handle scatter stores too.
28454 (vect_get_store_rhs): Make public.
28455 (vectorizable_call): Use internal_store_fn_p.
28456 (vectorizable_store): Handle scatter store internal functions.
28457 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28458 when deciding whether the end of the group has been reached.
28459 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28460 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28461 (mask_scatter_store<mode>): New insns.
28463 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28464 Alan Hayward <alan.hayward@arm.com>
28465 David Sherwood <david.sherwood@arm.com>
28467 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28468 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28469 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28471 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28472 Use vect_truncate_gather_scatter_offset if we can't treat the
28473 operation as a normal gather load or scatter store.
28474 (get_group_load_store_type): Take the gather_scatter_info
28475 as argument. Try using a gather load or scatter store for
28476 single-element groups.
28477 (get_load_store_type): Update calls to get_group_load_store_type
28478 and vect_use_strided_gather_scatters_p.
28480 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28481 Alan Hayward <alan.hayward@arm.com>
28482 David Sherwood <david.sherwood@arm.com>
28484 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28485 optional tree argument.
28486 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28488 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28489 but continue to use the current value as a fallback.
28490 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28491 to compare the updates.
28492 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28493 (get_load_store_type): Use it when handling a strided access.
28494 (vect_get_strided_load_store_ops): New function.
28495 (vect_get_data_ptr_increment): Likewise.
28496 (vectorizable_load): Handle strided gather loads. Always pass
28497 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28499 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28500 Alan Hayward <alan.hayward@arm.com>
28501 David Sherwood <david.sherwood@arm.com>
28503 * doc/md.texi (gather_load@var{m}): Document.
28504 (mask_gather_load@var{m}): Likewise.
28505 * genopinit.c (main): Add supports_vec_gather_load and
28506 supports_vec_gather_load_cached to target_optabs.
28507 * optabs-tree.c (init_tree_optimization_optabs): Use
28508 ggc_cleared_alloc to allocate target_optabs.
28509 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28510 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28512 * internal-fn.h (internal_load_fn_p): Declare.
28513 (internal_gather_scatter_fn_p): Likewise.
28514 (internal_fn_mask_index): Likewise.
28515 (internal_gather_scatter_fn_supported_p): Likewise.
28516 * internal-fn.c (gather_load_direct): New macro.
28517 (expand_gather_load_optab_fn): New function.
28518 (direct_gather_load_optab_supported_p): New macro.
28519 (direct_internal_fn_optab): New function.
28520 (internal_load_fn_p): Likewise.
28521 (internal_gather_scatter_fn_p): Likewise.
28522 (internal_fn_mask_index): Likewise.
28523 (internal_gather_scatter_fn_supported_p): Likewise.
28524 * optabs-query.c (supports_at_least_one_mode_p): New function.
28525 (supports_vec_gather_load_p): Likewise.
28526 * optabs-query.h (supports_vec_gather_load_p): Declare.
28527 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28528 and memory_type field.
28529 (NUM_PATTERNS): Bump to 15.
28530 * tree-vect-data-refs.c: Include internal-fn.h.
28531 (vect_gather_scatter_fn_p): New function.
28532 (vect_describe_gather_scatter_call): Likewise.
28533 (vect_check_gather_scatter): Try using internal functions for
28534 gather loads. Recognize existing calls to a gather load function.
28535 (vect_analyze_data_refs): Consider using gather loads if
28536 supports_vec_gather_load_p.
28537 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28538 (vect_get_gather_scatter_offset_type): Likewise.
28539 (vect_convert_mask_for_vectype): Likewise.
28540 (vect_add_conversion_to_patterm): Likewise.
28541 (vect_try_gather_scatter_pattern): Likewise.
28542 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28543 (vect_vect_recog_func_ptrs): Add it.
28544 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28545 internal_fn_mask_index and internal_gather_scatter_fn_p.
28546 (check_load_store_masking): Take the gather_scatter_info as an
28547 argument and handle gather loads.
28548 (vect_get_gather_scatter_ops): New function.
28549 (vectorizable_call): Check internal_load_fn_p.
28550 (vectorizable_load): Likewise. Handle gather load internal
28552 (vectorizable_store): Update call to check_load_store_masking.
28553 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28554 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28555 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28556 (aarch64_gather_scale_operand_d): New predicates.
28557 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28558 (mask_gather_load<mode>): New insns.
28560 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28561 Alan Hayward <alan.hayward@arm.com>
28562 David Sherwood <david.sherwood@arm.com>
28564 * optabs.def (fold_left_plus_optab): New optab.
28565 * doc/md.texi (fold_left_plus_@var{m}): Document.
28566 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28567 * internal-fn.c (fold_left_direct): Define.
28568 (expand_fold_left_optab_fn): Likewise.
28569 (direct_fold_left_optab_supported_p): Likewise.
28570 * fold-const-call.c (fold_const_fold_left): New function.
28571 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28572 * tree-parloops.c (valid_reduction_p): New function.
28573 (gather_scalar_reductions): Use it.
28574 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28575 (vect_finish_replace_stmt): Declare.
28576 * tree-vect-loop.c (fold_left_reduction_fn): New function.
28577 (needs_fold_left_reduction_p): New function, split out from...
28578 (vect_is_simple_reduction): ...here. Accept reductions that
28579 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28580 (vect_force_simple_reduction): Also store the reduction type in
28581 the assignment's STMT_VINFO_REDUC_TYPE.
28582 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28583 (merge_with_identity): New function.
28584 (vect_expand_fold_left): Likewise.
28585 (vectorize_fold_left_reduction): Likewise.
28586 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
28587 scalar phi in place for it. Check for target support and reject
28588 cases that would reassociate the operation. Defer the transform
28589 phase to vectorize_fold_left_reduction.
28590 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28591 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28592 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28594 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28596 * tree-if-conv.c (predicate_mem_writes): Remove redundant
28597 call to ifc_temp_var.
28599 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28600 Alan Hayward <alan.hayward@arm.com>
28601 David Sherwood <david.sherwood@arm.com>
28603 * target.def (legitimize_address_displacement): Take the original
28604 offset as a poly_int.
28605 * targhooks.h (default_legitimize_address_displacement): Update
28607 * targhooks.c (default_legitimize_address_displacement): Likewise.
28608 * doc/tm.texi: Regenerate.
28609 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28610 as an argument, moving assert of ad->disp == ad->disp_term to...
28611 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
28612 Try calling targetm.legitimize_address_displacement before expanding
28613 the address rather than afterwards, and adjust for the new interface.
28614 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28615 Match the new hook interface. Handle SVE addresses.
28616 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28617 new hook interface.
28619 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28621 * Makefile.in (OBJS): Add early-remat.o.
28622 * target.def (select_early_remat_modes): New hook.
28623 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28624 * doc/tm.texi: Regenerate.
28625 * targhooks.h (default_select_early_remat_modes): Declare.
28626 * targhooks.c (default_select_early_remat_modes): New function.
28627 * timevar.def (TV_EARLY_REMAT): New timevar.
28628 * passes.def (pass_early_remat): New pass.
28629 * tree-pass.h (make_pass_early_remat): Declare.
28630 * early-remat.c: New file.
28631 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28633 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28635 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28636 Alan Hayward <alan.hayward@arm.com>
28637 David Sherwood <david.sherwood@arm.com>
28639 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28640 vfm1 with a bound_epilog parameter.
28641 (vect_do_peeling): Update calls accordingly, and move the prologue
28642 call earlier in the function. Treat the base bound_epilog as 0 for
28643 fully-masked loops and retain vf - 1 for other loops. Add 1 to
28644 this base when peeling for gaps.
28645 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28646 with fully-masked loops.
28647 (vect_estimate_min_profitable_iters): Handle the single peeled
28648 iteration in that case.
28650 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28651 Alan Hayward <alan.hayward@arm.com>
28652 David Sherwood <david.sherwood@arm.com>
28654 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28655 single-element interleaving even if the size is not a power of 2.
28656 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28657 accesses for single-element interleaving if the group size is
28660 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28661 Alan Hayward <alan.hayward@arm.com>
28662 David Sherwood <david.sherwood@arm.com>
28664 * doc/md.texi (fold_extract_last_@var{m}): Document.
28665 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28666 * optabs.def (fold_extract_last_optab): New optab.
28667 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28668 * internal-fn.c (fold_extract_direct): New macro.
28669 (expand_fold_extract_optab_fn): Likewise.
28670 (direct_fold_extract_optab_supported_p): Likewise.
28671 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28672 * tree-vect-loop.c (vect_model_reduction_cost): Handle
28673 EXTRACT_LAST_REDUCTION.
28674 (get_initial_def_for_reduction): Do not create an initial vector
28675 for EXTRACT_LAST_REDUCTION reductions.
28676 (vectorizable_reduction): Leave the scalar phi in place for
28677 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
28678 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
28679 epilogue code for EXTRACT_LAST_REDUCTION and defer the
28680 transform phase to vectorizable_condition.
28681 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28683 (vect_finish_stmt_generation): ...here.
28684 (vect_finish_replace_stmt): New function.
28685 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28686 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28688 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28690 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28691 Alan Hayward <alan.hayward@arm.com>
28692 David Sherwood <david.sherwood@arm.com>
28694 * doc/md.texi (extract_last_@var{m}): Document.
28695 * optabs.def (extract_last_optab): New optab.
28696 * internal-fn.def (EXTRACT_LAST): New internal function.
28697 * internal-fn.c (cond_unary_direct): New macro.
28698 (expand_cond_unary_optab_fn): Likewise.
28699 (direct_cond_unary_optab_supported_p): Likewise.
28700 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28701 loops using EXTRACT_LAST.
28702 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28703 (extract_last_<mode>): ...this optab.
28704 (vec_extract<mode><Vel>): Update accordingly.
28706 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28707 Alan Hayward <alan.hayward@arm.com>
28708 David Sherwood <david.sherwood@arm.com>
28710 * target.def (empty_mask_is_expensive): New hook.
28711 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28712 * doc/tm.texi: Regenerate.
28713 * targhooks.h (default_empty_mask_is_expensive): Declare.
28714 * targhooks.c (default_empty_mask_is_expensive): New function.
28715 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28716 if the target says that empty masks are expensive.
28717 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28719 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28721 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28722 Alan Hayward <alan.hayward@arm.com>
28723 David Sherwood <david.sherwood@arm.com>
28725 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28726 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28727 (vect_use_loop_mask_for_alignment_p): New function.
28728 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28729 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28730 niters_skip argument. Make sure that the first niters_skip elements
28731 of the first iteration are inactive.
28732 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28733 Update call to vect_set_loop_masks_directly.
28734 (get_misalign_in_elems): New function, split out from...
28735 (vect_gen_prolog_loop_niters): ...here.
28736 (vect_update_init_of_dr): Take a code argument that specifies whether
28737 the adjustment should be added or subtracted.
28738 (vect_update_init_of_drs): Likewise.
28739 (vect_prepare_for_masked_peels): New function.
28740 (vect_do_peeling): Skip prologue peeling if we're using a mask
28741 instead. Update call to vect_update_inits_of_drs.
28742 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28744 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28745 alignment. Do not include the number of peeled iterations in
28746 the minimum threshold in that case.
28747 (vectorizable_induction): Adjust the start value down by
28748 LOOP_VINFO_MASK_SKIP_NITERS iterations.
28749 (vect_transform_loop): Call vect_prepare_for_masked_peels.
28750 Take the number of skipped iterations into account when calculating
28752 * tree-vect-stmts.c (vect_gen_while_not): New function.
28754 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28755 Alan Hayward <alan.hayward@arm.com>
28756 David Sherwood <david.sherwood@arm.com>
28758 * doc/sourcebuild.texi (vect_fully_masked): Document.
28759 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28760 default value to 0.
28761 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28763 (vect_analyze_loop_2): ...here. Don't check the vectorization
28764 factor against the number of loop iterations if the loop is
28767 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28768 Alan Hayward <alan.hayward@arm.com>
28769 David Sherwood <david.sherwood@arm.com>
28771 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28772 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28773 (dump_groups): Update accordingly.
28774 (iv_use::mem_type): New member variable.
28775 (address_p): New function.
28776 (record_use): Add a mem_type argument and initialize the new
28778 (record_group_use): Add a mem_type argument. Use address_p.
28779 Remove obsolete null checks of base_object. Update call to record_use.
28780 (find_interesting_uses_op): Update call to record_group_use.
28781 (find_interesting_uses_cond): Likewise.
28782 (find_interesting_uses_address): Likewise.
28783 (get_mem_type_for_internal_fn): New function.
28784 (find_address_like_use): Likewise.
28785 (find_interesting_uses_stmt): Try find_address_like_use before
28786 calling find_interesting_uses_op.
28787 (addr_offset_valid_p): Use the iv mem_type field as the type
28788 of the addressed memory.
28789 (add_autoinc_candidates): Likewise.
28790 (get_address_cost): Likewise.
28791 (split_small_address_groups_p): Use address_p.
28792 (split_address_groups): Likewise.
28793 (add_iv_candidate_for_use): Likewise.
28794 (autoinc_possible_for_pair): Likewise.
28795 (rewrite_groups): Likewise.
28796 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28797 (determine_group_iv_cost): Update after split of USE_ADDRESS.
28798 (get_alias_ptr_type_for_ptr_address): New function.
28799 (rewrite_use_address): Rewrite address uses in calls that were
28800 identified by find_address_like_use.
28802 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28803 Alan Hayward <alan.hayward@arm.com>
28804 David Sherwood <david.sherwood@arm.com>
28806 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28808 * gimple-expr.h (is_gimple_addressable: Likewise.
28809 * gimple-expr.c (is_gimple_address): Likewise.
28810 * internal-fn.c (expand_call_mem_ref): New function.
28811 (expand_mask_load_optab_fn): Use it.
28812 (expand_mask_store_optab_fn): Likewise.
28814 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28815 Alan Hayward <alan.hayward@arm.com>
28816 David Sherwood <david.sherwood@arm.com>
28818 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28819 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28820 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28821 (cond_umax@var{mode}): Document.
28822 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28823 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28824 (cond_umin_optab, cond_umax_optab): New optabs.
28825 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28826 (COND_IOR, COND_XOR): New internal functions.
28827 * internal-fn.h (get_conditional_internal_fn): Declare.
28828 * internal-fn.c (cond_binary_direct): New macro.
28829 (expand_cond_binary_optab_fn): Likewise.
28830 (direct_cond_binary_optab_supported_p): Likewise.
28831 (get_conditional_internal_fn): New function.
28832 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28833 Cope with reduction statements that are vectorized as calls rather
28835 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28836 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28837 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28838 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28839 (UNSPEC_COND_EOR): New unspecs.
28840 (optab): Add mappings for them.
28841 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28842 (sve_int_op, sve_fp_op): New int attributes.
28844 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28845 Alan Hayward <alan.hayward@arm.com>
28846 David Sherwood <david.sherwood@arm.com>
28848 * optabs.def (while_ult_optab): New optab.
28849 * doc/md.texi (while_ult@var{m}@var{n}): Document.
28850 * internal-fn.def (WHILE_ULT): New internal function.
28851 * internal-fn.h (direct_internal_fn_supported_p): New override
28852 that takes two types as argument.
28853 * internal-fn.c (while_direct): New macro.
28854 (expand_while_optab_fn): New function.
28855 (convert_optab_supported_p): Likewise.
28856 (direct_while_optab_supported_p): New macro.
28857 * wide-int.h (wi::udiv_ceil): New function.
28858 * tree-vectorizer.h (rgroup_masks): New structure.
28859 (vec_loop_masks): New typedef.
28860 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28861 and fully_masked_p.
28862 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28863 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28864 (vect_max_vf): New function.
28865 (slpeel_make_loop_iterate_ntimes): Delete.
28866 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28867 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28868 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28869 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28870 internal-fn.h, stor-layout.h and optabs-query.h.
28871 (vect_set_loop_mask): New function.
28872 (add_preheader_seq): Likewise.
28873 (add_header_seq): Likewise.
28874 (interleave_supported_p): Likewise.
28875 (vect_maybe_permute_loop_masks): Likewise.
28876 (vect_set_loop_masks_directly): Likewise.
28877 (vect_set_loop_condition_masked): Likewise.
28878 (vect_set_loop_condition_unmasked): New function, split out from
28879 slpeel_make_loop_iterate_ntimes.
28880 (slpeel_make_loop_iterate_ntimes): Rename to..
28881 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
28882 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28883 (vect_do_peeling): Update call accordingly.
28884 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28886 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28887 mask_compare_type, can_fully_mask_p and fully_masked_p.
28888 (release_vec_loop_masks): New function.
28889 (_loop_vec_info): Use it to free the loop masks.
28890 (can_produce_all_loop_masks_p): New function.
28891 (vect_get_max_nscalars_per_iter): Likewise.
28892 (vect_verify_full_masking): Likewise.
28893 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28894 retries, and free the mask rgroups before retrying. Check loop-wide
28895 reasons for disallowing fully-masked loops. Make the final decision
28896 about whether use a fully-masked loop or not.
28897 (vect_estimate_min_profitable_iters): Do not assume that peeling
28898 for the number of iterations will be needed for fully-masked loops.
28899 (vectorizable_reduction): Disable fully-masked loops.
28900 (vectorizable_live_operation): Likewise.
28901 (vect_halve_mask_nunits): New function.
28902 (vect_double_mask_nunits): Likewise.
28903 (vect_record_loop_mask): Likewise.
28904 (vect_get_loop_mask): Likewise.
28905 (vect_transform_loop): Handle the case in which the final loop
28906 iteration might handle a partial vector. Call vect_set_loop_condition
28907 instead of slpeel_make_loop_iterate_ntimes.
28908 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28909 (check_load_store_masking): New function.
28910 (prepare_load_store_mask): Likewise.
28911 (vectorizable_store): Handle fully-masked loops.
28912 (vectorizable_load): Likewise.
28913 (supportable_widening_operation): Use vect_halve_mask_nunits for
28915 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28916 (vect_gen_while): New function.
28917 * config/aarch64/aarch64.md (umax<mode>3): New expander.
28918 (aarch64_uqdec<mode>): New insn.
28920 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28921 Alan Hayward <alan.hayward@arm.com>
28922 David Sherwood <david.sherwood@arm.com>
28924 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28925 (reduc_xor_scal_optab): New optabs.
28926 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28927 (reduc_xor_scal_@var{m}): Document.
28928 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28929 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28930 internal functions.
28931 * fold-const-call.c (fold_const_call): Handle them.
28932 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28933 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28934 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28935 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28936 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28937 (UNSPEC_XORV): New unspecs.
28938 (optab): Add entries for them.
28939 (BITWISEV): New int iterator.
28940 (bit_reduc_op): New int attributes.
28942 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28943 Alan Hayward <alan.hayward@arm.com>
28944 David Sherwood <david.sherwood@arm.com>
28946 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28947 * internal-fn.def (VEC_SHL_INSERT): New internal function.
28948 * optabs.def (vec_shl_insert_optab): New optab.
28949 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28950 (duplicate_and_interleave): Likewise.
28951 * tree-vect-loop.c: Include internal-fn.h.
28952 (neutral_op_for_slp_reduction): New function, split out from
28953 get_initial_defs_for_reduction.
28954 (get_initial_def_for_reduction): Handle option 2 for variable-length
28955 vectors by loading the neutral value into a vector and then shifting
28956 the initial value into element 0.
28957 (get_initial_defs_for_reduction): Replace the code argument with
28958 the neutral value calculated by neutral_op_for_slp_reduction.
28959 Use gimple_build_vector for constant-length vectors.
28960 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28961 but the first group_size elements have a neutral value.
28962 Use duplicate_and_interleave otherwise.
28963 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28964 Update call to get_initial_defs_for_reduction. Handle SLP
28965 reductions for variable-length vectors by creating one vector
28966 result for each scalar result, with the elements associated
28967 with other scalar results stubbed out with the neutral value.
28968 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28969 Require IFN_VEC_SHL_INSERT for double reductions on
28970 variable-length vectors, or SLP reductions that have
28971 a neutral value. Require can_duplicate_and_interleave_p
28972 support for variable-length unchained SLP reductions if there
28973 is no neutral value, such as for MIN/MAX reductions. Also require
28974 the number of vector elements to be a multiple of the number of
28975 SLP statements when doing variable-length unchained SLP reductions.
28976 Update call to vect_create_epilog_for_reduction.
28977 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28978 and remove initial values.
28979 (duplicate_and_interleave): Make public.
28980 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28981 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28983 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28984 Alan Hayward <alan.hayward@arm.com>
28985 David Sherwood <david.sherwood@arm.com>
28987 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28988 (can_duplicate_and_interleave_p): New function.
28989 (vect_get_and_check_slp_defs): Take the vector of statements
28990 rather than just the current one. Remove excess parentheses.
28991 Restriction rejectinon of vect_constant_def and vect_external_def
28992 for variable-length vectors to boolean types, or types for which
28993 can_duplicate_and_interleave_p is false.
28994 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28995 (duplicate_and_interleave): New function.
28996 (vect_get_constant_vectors): Use gimple_build_vector for
28997 constant-length vectors and suitable variable-length constant
28998 vectors. Use duplicate_and_interleave for other variable-length
28999 vectors. Don't defer the update when inserting new statements.
29001 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29002 Alan Hayward <alan.hayward@arm.com>
29003 David Sherwood <david.sherwood@arm.com>
29005 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
29006 min_profitable_iters doesn't go negative.
29008 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29009 Alan Hayward <alan.hayward@arm.com>
29010 David Sherwood <david.sherwood@arm.com>
29012 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
29013 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
29014 * optabs.def (vec_mask_load_lanes_optab): New optab.
29015 (vec_mask_store_lanes_optab): Likewise.
29016 * internal-fn.def (MASK_LOAD_LANES): New internal function.
29017 (MASK_STORE_LANES): Likewise.
29018 * internal-fn.c (mask_load_lanes_direct): New macro.
29019 (mask_store_lanes_direct): Likewise.
29020 (expand_mask_load_optab_fn): Handle masked operations.
29021 (expand_mask_load_lanes_optab_fn): New macro.
29022 (expand_mask_store_optab_fn): Handle masked operations.
29023 (expand_mask_store_lanes_optab_fn): New macro.
29024 (direct_mask_load_lanes_optab_supported_p): Likewise.
29025 (direct_mask_store_lanes_optab_supported_p): Likewise.
29026 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
29028 (vect_load_lanes_supported): Likewise.
29029 * tree-vect-data-refs.c (strip_conversion): New function.
29030 (can_group_stmts_p): Likewise.
29031 (vect_analyze_data_ref_accesses): Use it instead of checking
29032 for a pair of assignments.
29033 (vect_store_lanes_supported): Take a masked_p parameter.
29034 (vect_load_lanes_supported): Likewise.
29035 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
29036 vect_store_lanes_supported and vect_load_lanes_supported.
29037 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
29038 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
29039 parameter. Don't allow gaps for masked accesses.
29040 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
29041 and vect_load_lanes_supported.
29042 (get_load_store_type): Take a masked_p parameter and update
29043 call to get_group_load_store_type.
29044 (vectorizable_store): Update call to get_load_store_type.
29045 Handle IFN_MASK_STORE_LANES.
29046 (vectorizable_load): Update call to get_load_store_type.
29047 Handle IFN_MASK_LOAD_LANES.
29049 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29050 Alan Hayward <alan.hayward@arm.com>
29051 David Sherwood <david.sherwood@arm.com>
29053 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
29055 * config/aarch64/aarch64-protos.h
29056 (aarch64_sve_struct_memory_operand_p): Declare.
29057 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
29058 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
29059 (VPRED, vpred): Handle SVE structure modes.
29060 * config/aarch64/constraints.md (Utx): New constraint.
29061 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
29062 (aarch64_sve_struct_nonimmediate_operand): New predicates.
29063 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
29064 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
29065 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
29066 structure modes. Split into pieces after RA.
29067 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
29068 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
29070 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
29071 SVE structure modes.
29072 (aarch64_classify_address): Likewise.
29073 (sizetochar): Move earlier in file.
29074 (aarch64_print_operand): Handle SVE register lists.
29075 (aarch64_array_mode): New function.
29076 (aarch64_sve_struct_memory_operand_p): Likewise.
29077 (TARGET_ARRAY_MODE): Redefine.
29079 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29080 Alan Hayward <alan.hayward@arm.com>
29081 David Sherwood <david.sherwood@arm.com>
29083 * target.def (array_mode): New target hook.
29084 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
29085 * doc/tm.texi: Regenerate.
29086 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
29087 * hooks.c (hook_optmode_mode_uhwi_none): New function.
29088 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
29089 targetm.array_mode.
29090 * stor-layout.c (mode_for_array): Likewise. Support polynomial
29093 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29094 Alan Hayward <alan.hayward@arm.com>
29095 David Sherwood <david.sherwood@arm.com>
29097 * fold-const.c (fold_binary_loc): Check the argument types
29098 rather than the result type when testing for a vector operation.
29100 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29102 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
29103 * doc/tm.texi: Regenerate.
29105 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29106 Alan Hayward <alan.hayward@arm.com>
29107 David Sherwood <david.sherwood@arm.com>
29109 * doc/invoke.texi (-msve-vector-bits=): Document new option.
29110 (sve): Document new AArch64 extension.
29111 * doc/md.texi (w): Extend the description of the AArch64
29112 constraint to include SVE vectors.
29113 (Upl, Upa): Document new AArch64 predicate constraints.
29114 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
29116 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
29117 (msve-vector-bits=): New option.
29118 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
29119 SVE when these are disabled.
29120 (sve): New extension.
29121 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
29122 modes. Adjust their number of units based on aarch64_sve_vg.
29123 (MAX_BITSIZE_MODE_ANY_MODE): Define.
29124 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
29125 aarch64_addr_query_type.
29126 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29127 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29128 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29129 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29130 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29131 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29132 (aarch64_simd_imm_zero_p): Delete.
29133 (aarch64_check_zero_based_sve_index_immediate): Declare.
29134 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29135 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29136 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29137 (aarch64_sve_float_mul_immediate_p): Likewise.
29138 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29139 rather than an rtx.
29140 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
29141 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
29142 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
29143 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
29144 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
29145 (aarch64_regmode_natural_size): Likewise.
29146 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
29147 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
29149 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
29150 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
29151 for VG and the SVE predicate registers.
29152 (V_ALIASES): Add a "z"-prefixed alias.
29153 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
29154 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
29155 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
29156 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
29157 (REG_CLASS_NAMES): Add entries for them.
29158 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
29159 and the predicate registers.
29160 (aarch64_sve_vg): Declare.
29161 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
29162 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
29163 (REGMODE_NATURAL_SIZE): Define.
29164 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
29166 * config/aarch64/aarch64.c: Include cfgrtl.h.
29167 (simd_immediate_info): Add a constructor for series vectors,
29168 and an associated step field.
29169 (aarch64_sve_vg): New variable.
29170 (aarch64_dbx_register_number): Handle VG and the predicate registers.
29171 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29172 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29173 (VEC_ANY_DATA, VEC_STRUCT): New constants.
29174 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29175 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29176 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29177 (aarch64_get_mask_mode): New functions.
29178 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29179 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29180 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
29181 predicate modes and predicate registers. Explicitly restrict
29182 GPRs to modes of 16 bytes or smaller. Only allow FP registers
29183 to store a vector mode if it is recognized by
29184 aarch64_classify_vector_mode.
29185 (aarch64_regmode_natural_size): New function.
29186 (aarch64_hard_regno_caller_save_mode): Return the original mode
29188 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29189 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29190 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29191 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29193 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
29194 does not overlap dest if the function is frame-related. Handle
29196 (aarch64_split_add_offset): New function.
29197 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29198 them aarch64_add_offset.
29199 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29200 and update call to aarch64_sub_sp.
29201 (aarch64_add_cfa_expression): New function.
29202 (aarch64_expand_prologue): Pass extra temporary registers to the
29203 functions above. Handle the case in which we need to emit new
29204 DW_CFA_expressions for registers that were originally saved
29205 relative to the stack pointer, but now have to be expressed
29206 relative to the frame pointer.
29207 (aarch64_output_mi_thunk): Pass extra temporary registers to the
29209 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
29210 IP0 and IP1 values for SVE frames.
29211 (aarch64_expand_vec_series): New function.
29212 (aarch64_expand_sve_widened_duplicate): Likewise.
29213 (aarch64_expand_sve_const_vector): Likewise.
29214 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29215 Handle SVE constants. Use emit_move_insn to move a force_const_mem
29216 into the register, rather than emitting a SET directly.
29217 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29218 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29219 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29220 (offset_9bit_signed_scaled_p): New functions.
29221 (aarch64_replicate_bitmask_imm): New function.
29222 (aarch64_bitmask_imm): Use it.
29223 (aarch64_cannot_force_const_mem): Reject expressions involving
29224 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
29225 (aarch64_classify_index): Handle SVE indices, by requiring
29226 a plain register index with a scale that matches the element size.
29227 (aarch64_classify_address): Handle SVE addresses. Assert that
29228 the mode of the address is VOIDmode or an integer mode.
29229 Update call to aarch64_classify_symbol.
29230 (aarch64_classify_symbolic_expression): Update call to
29231 aarch64_classify_symbol.
29232 (aarch64_const_vec_all_in_range_p): New function.
29233 (aarch64_print_vector_float_operand): Likewise.
29234 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
29235 "vN" for FP registers with SVE modes. Handle (const ...) vectors
29236 and the FP immediates 1.0 and 0.5.
29237 (aarch64_print_address_internal): Handle SVE addresses.
29238 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29239 (aarch64_regno_regclass): Handle predicate registers.
29240 (aarch64_secondary_reload): Handle big-endian reloads of SVE
29242 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29243 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29244 (aarch64_convert_sve_vector_bits): New function.
29245 (aarch64_override_options): Use it to handle -msve-vector-bits=.
29246 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29247 rather than an rtx.
29248 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29249 Handle SVE vector and predicate modes. Accept VL-based constants
29250 that need only one temporary register, and VL offsets that require
29251 no temporary registers.
29252 (aarch64_conditional_register_usage): Mark the predicate registers
29253 as fixed if SVE isn't available.
29254 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29255 Return true for SVE vector and predicate modes.
29256 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29257 rather than an unsigned int. Handle SVE modes.
29258 (aarch64_preferred_simd_mode): Update call accordingly. Handle
29260 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29262 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29263 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29264 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29265 (aarch64_sve_float_mul_immediate_p): New functions.
29266 (aarch64_sve_valid_immediate): New function.
29267 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29268 Explicitly reject structure modes. Check for INDEX constants.
29269 Handle PTRUE and PFALSE constants.
29270 (aarch64_check_zero_based_sve_index_immediate): New function.
29271 (aarch64_simd_imm_zero_p): Delete.
29272 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29273 vector modes. Accept constants in the range of CNT[BHWD].
29274 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29275 ask for an Advanced SIMD mode.
29276 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29277 (aarch64_simd_vector_alignment): Handle SVE predicates.
29278 (aarch64_vectorize_preferred_vector_alignment): New function.
29279 (aarch64_simd_vector_alignment_reachable): Use it instead of
29281 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29282 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29284 (MAX_VECT_LEN): Delete.
29285 (expand_vec_perm_d): Add a vec_flags field.
29286 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29287 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29288 (aarch64_evpc_ext): Don't apply a big-endian lane correction
29290 (aarch64_evpc_rev): Rename to...
29291 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
29292 (aarch64_evpc_rev_global): New function.
29293 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29294 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29296 (aarch64_evpc_sve_tbl): New function.
29297 (aarch64_expand_vec_perm_const_1): Update after rename of
29298 aarch64_evpc_rev. Handle SVE permutes too, trying
29299 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29300 than aarch64_evpc_tbl.
29301 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29302 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29303 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29304 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29305 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29306 (aarch64_expand_sve_vcond): New functions.
29307 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29308 of aarch64_vector_mode_p.
29309 (aarch64_dwarf_poly_indeterminate_value): New function.
29310 (aarch64_compute_pressure_classes): Likewise.
29311 (aarch64_can_change_mode_class): Likewise.
29312 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29313 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29314 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29315 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29316 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29317 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29318 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29319 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29321 (Dn, Dl, Dr): Accept const as well as const_vector.
29322 (Dz): Likewise. Compare against CONST0_RTX.
29323 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29324 of "vector" where appropriate.
29325 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29326 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29327 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29328 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29329 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29330 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29331 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29332 (v_int_equiv): Extend to SVE modes.
29333 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29335 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29336 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29337 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29338 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29339 (SVE_COND_FP_CMP): New int iterators.
29340 (perm_hilo): Handle the new unpack unspecs.
29341 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29343 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29344 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29345 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29346 (aarch64_equality_operator, aarch64_constant_vector_operand)
29347 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29348 (aarch64_sve_nonimmediate_operand): Likewise.
29349 (aarch64_sve_general_operand): Likewise.
29350 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29351 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29352 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29353 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29354 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29355 (aarch64_sve_float_arith_immediate): Likewise.
29356 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29357 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29358 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29359 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29360 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29361 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29362 (aarch64_sve_float_arith_operand): Likewise.
29363 (aarch64_sve_float_arith_with_sub_operand): Likewise.
29364 (aarch64_sve_float_mul_operand): Likewise.
29365 (aarch64_sve_vec_perm_operand): Likewise.
29366 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29367 (aarch64_mov_operand): Accept const_poly_int and const_vector.
29368 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29369 as well as const_vector.
29370 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29371 in file. Use CONST0_RTX and CONSTM1_RTX.
29372 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
29373 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29374 Use aarch64_simd_imm_zero.
29375 * config/aarch64/aarch64-sve.md: New file.
29376 * config/aarch64/aarch64.md: Include it.
29377 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29378 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29379 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29380 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29381 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29382 (sve): New attribute.
29383 (enabled): Disable instructions with the sve attribute unless
29385 (movqi, movhi): Pass CONST_POLY_INT operaneds through
29386 aarch64_expand_mov_immediate.
29387 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29388 CNT[BHSD] immediates.
29389 (movti): Split CONST_POLY_INT moves into two halves.
29390 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29391 Split additions that need a temporary here if the destination
29392 is the stack pointer.
29393 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29394 (*add<mode>3_poly_1): New instruction.
29395 (set_clobber_cc): New expander.
29397 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29399 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29400 parameter and use it instead of GET_MODE_SIZE (innermode). Use
29401 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29402 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29403 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
29404 Change innermode from fixed_mode_size to machine_mode.
29405 (simplify_subreg): Update call accordingly. Handle a constant-sized
29406 subreg of a variable-length CONST_VECTOR.
29408 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29409 Alan Hayward <alan.hayward@arm.com>
29410 David Sherwood <david.sherwood@arm.com>
29412 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29413 (add_offset_to_base): New function, split out from...
29414 (create_mem_ref): ...here. When handling a scale other than 1,
29415 check first whether the address is valid without the offset.
29416 Add it into the base if so, leaving the index and scale as-is.
29418 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29421 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29422 fold_for_warn before checking if arg2 is INTEGER_CST.
29424 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
29426 * config/rs6000/predicates.md (load_multiple_operation): Delete.
29427 (store_multiple_operation): Delete.
29428 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29429 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29430 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29431 guarded by TARGET_STRING.
29432 (rs6000_output_load_multiple): Delete.
29433 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29434 OPTION_MASK_STRING / TARGET_STRING handling.
29435 (print_operand) <'N', 'O'>: Add comment that these are unused now.
29436 (const rs6000_opt_masks) <"string">: Change mask to 0.
29437 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29438 (MASK_STRING): Delete.
29439 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29441 (load_multiple): Delete.
29448 (store_multiple): Delete.
29455 (movmemsi_8reg): Delete.
29456 (corresponding unnamed define_insn): Delete.
29457 (movmemsi_6reg): Delete.
29458 (corresponding unnamed define_insn): Delete.
29459 (movmemsi_4reg): Delete.
29460 (corresponding unnamed define_insn): Delete.
29461 (movmemsi_2reg): Delete.
29462 (corresponding unnamed define_insn): Delete.
29463 (movmemsi_1reg): Delete.
29464 (corresponding unnamed define_insn): Delete.
29465 * config/rs6000/rs6000.opt (mno-string): New.
29466 (mstring): Replace by deprecation warning stub.
29467 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29469 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29471 * regrename.c (regrename_do_replace): If replacing the same
29472 reg multiple times, try to reuse last created gen_raw_REG.
29475 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29476 main to workaround a bug in GDB.
29478 2018-01-12 Tom de Vries <tom@codesourcery.com>
29481 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29483 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29485 PR rtl-optimization/80481
29486 * ira-color.c (get_cap_member): New function.
29487 (allocnos_conflict_by_live_ranges_p): Use it.
29488 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29489 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29491 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29494 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29495 (*saddl_se_1): Ditto.
29496 (*ssubsi_1): Ditto.
29497 (*ssubl_se_1): Ditto.
29499 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29501 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29502 rather than wi::to_widest for DR_INITs.
29503 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29504 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29505 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29507 (vect_analyze_group_access_1): Note that here.
29509 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29511 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29512 polynomial type sizes.
29514 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29516 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29517 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29518 (gimple_add_tmp_var): Likewise.
29520 2018-01-12 Martin Liska <mliska@suse.cz>
29522 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29523 (gimple_alloc_sizes): Likewise.
29524 (dump_gimple_statistics): Use PRIu64 in printf format.
29525 * gimple.h: Change uint64_t to int.
29527 2018-01-12 Martin Liska <mliska@suse.cz>
29529 * tree-core.h: Use uint64_t instead of int.
29530 * tree.c (tree_node_counts): Likewise.
29531 (tree_node_sizes): Likewise.
29532 (dump_tree_statistics): Use PRIu64 in printf format.
29534 2018-01-12 Martin Liska <mliska@suse.cz>
29536 * Makefile.in: As qsort_chk is implemented in vec.c, add
29537 vec.o to linkage of gencfn-macros.
29538 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29539 passing the info to record_node_allocation_statistics.
29540 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29542 * ggc-common.c (struct ggc_usage): Add operator== and use
29543 it in operator< and compare function.
29544 * mem-stats.h (struct mem_usage): Likewise.
29545 * vec.c (struct vec_usage): Remove operator< and compare
29546 function. Can be simply inherited.
29548 2018-01-12 Martin Jambor <mjambor@suse.cz>
29551 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29552 * tree-ssa-math-opts.c: Include domwalk.h.
29553 (convert_mult_to_fma_1): New function.
29554 (fma_transformation_info): New type.
29555 (fma_deferring_state): Likewise.
29556 (cancel_fma_deferring): New function.
29557 (result_of_phi): Likewise.
29558 (last_fma_candidate_feeds_initial_phi): Likewise.
29559 (convert_mult_to_fma): Added deferring logic, split actual
29560 transformation to convert_mult_to_fma_1.
29561 (math_opts_dom_walker): New type.
29562 (math_opts_dom_walker::after_dom_children): New method, body moved
29563 here from pass_optimize_widening_mul::execute, added deferring logic
29565 (pass_optimize_widening_mul::execute): Moved most of code to
29566 math_opts_dom_walker::after_dom_children.
29567 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29568 * config/i386/i386.c (ix86_option_override_internal): Added
29569 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29571 2018-01-12 Richard Biener <rguenther@suse.de>
29574 * dwarf2out.c (gen_variable_die): Do not reset old_die for
29575 inline instance vars.
29577 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
29580 * config/rx/rx.c (rx_is_restricted_memory_address):
29581 Handle SUBREG case.
29583 2018-01-12 Richard Biener <rguenther@suse.de>
29585 PR tree-optimization/80846
29586 * target.def (split_reduction): New target hook.
29587 * targhooks.c (default_split_reduction): New function.
29588 * targhooks.h (default_split_reduction): Declare.
29589 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29590 target requests first reduce vectors by combining low and high
29592 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29593 (get_vectype_for_scalar_type_and_size): Export.
29594 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29595 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29596 * doc/tm.texi: Regenerate.
29597 * config/i386/i386.c (ix86_split_reduction): Implement
29598 TARGET_VECTORIZE_SPLIT_REDUCTION.
29600 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29603 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29604 in PIC mode except for TARGET_VXWORKS_RTP.
29605 * config/sparc/sparc.c: Include cfgrtl.h.
29606 (TARGET_INIT_PIC_REG): Define.
29607 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29608 (sparc_pic_register_p): New predicate.
29609 (sparc_legitimate_address_p): Use it.
29610 (sparc_legitimize_pic_address): Likewise.
29611 (sparc_delegitimize_address): Likewise.
29612 (sparc_mode_dependent_address_p): Likewise.
29613 (gen_load_pcrel_sym): Remove 4th parameter.
29614 (load_got_register): Adjust call to above. Remove obsolete stuff.
29615 (sparc_expand_prologue): Do not call load_got_register here.
29616 (sparc_flat_expand_prologue): Likewise.
29617 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29618 (sparc_use_pseudo_pic_reg): New function.
29619 (sparc_init_pic_reg): Likewise.
29620 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29621 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29623 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
29625 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29626 Add item for branch_cost.
29628 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29630 PR rtl-optimization/83565
29631 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29632 not extend the result to a larger mode for rotate operations.
29633 (num_sign_bit_copies1): Likewise.
29635 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29638 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29640 Use values-Xc.o for -pedantic.
29641 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29643 2018-01-12 Martin Liska <mliska@suse.cz>
29646 * ipa-devirt.c (final_warning_record::grow_type_warnings):
29648 (possible_polymorphic_call_targets): Use it.
29649 (ipa_devirt): Likewise.
29651 2018-01-12 Martin Liska <mliska@suse.cz>
29653 * profile-count.h (enum profile_quality): Use 0 as invalid
29654 enum value of profile_quality.
29656 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
29658 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29659 -mext-string options.
29661 2018-01-12 Richard Biener <rguenther@suse.de>
29663 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29664 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29665 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29667 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29669 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
29671 * configure.ac (--with-long-double-format): Add support for the
29672 configuration option to change the default long double format on
29674 * config.gcc (powerpc*-linux*-*): Likewise.
29675 * configure: Regenerate.
29676 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29677 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29678 used without modification.
29680 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29682 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29683 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29684 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29685 MISC_BUILTIN_SPEC_BARRIER.
29686 (rs6000_init_builtins): Likewise.
29687 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29689 (speculation_barrier): New define_insn.
29690 * doc/extend.texi: Document __builtin_speculation_barrier.
29692 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29695 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29696 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29697 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29699 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
29700 integral modes instead of "ss" and "sd".
29701 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29702 vectors with 32-bit and 64-bit elements.
29703 (vecdupssescalarmodesuffix): New mode attribute.
29704 (vec_dup<mode>): Use it.
29706 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
29709 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29710 frame if argument is passed on stack.
29712 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29715 * ree.c (combine_reaching_defs): Optimize also
29716 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29717 reg2=any_extend(exp); reg1=reg2;, formatting fix.
29719 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29721 PR middle-end/83189
29722 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29724 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29726 PR middle-end/83718
29727 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29728 after they are computed.
29730 2018-01-11 Bin Cheng <bin.cheng@arm.com>
29732 PR tree-optimization/83695
29733 * gimple-loop-linterchange.cc
29734 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29735 reset cached scev information after interchange.
29736 (pass_linterchange::execute): Remove call to scev_reset_htab.
29738 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29740 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29741 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29742 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29743 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29744 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29745 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29746 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29747 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29748 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29749 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29750 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29751 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29752 (V_lane_reg): Likewise.
29753 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29755 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29756 (vfmal_lane_low<mode>_intrinsic,
29757 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29758 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29759 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29760 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29761 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29762 vfmsl_lane_high<mode>_intrinsic): New define_insns.
29764 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29766 * config/arm/arm-cpus.in (fp16fml): New feature.
29767 (ALL_SIMD): Add fp16fml.
29768 (armv8.2-a): Add fp16fml as an option.
29769 (armv8.3-a): Likewise.
29770 (armv8.4-a): Add fp16fml as part of fp16.
29771 * config/arm/arm.h (TARGET_FP16FML): Define.
29772 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29774 * config/arm/arm-modes.def (V2HF): Define.
29775 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29776 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29777 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29778 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29779 vfmsl_low, vfmsl_high): New set of builtins.
29780 * config/arm/iterators.md (PLUSMINUS): New code iterator.
29781 (vfml_op): New code attribute.
29782 (VFMLHALVES): New int iterator.
29783 (VFML, VFMLSEL): New mode attributes.
29784 (V_reg): Define mapping for V2HF.
29785 (V_hi, V_lo): New mode attributes.
29786 (VF_constraint): Likewise.
29787 (vfml_half, vfml_half_selector): New int attributes.
29788 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29790 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29791 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29793 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29794 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29795 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29796 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
29798 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29799 Document new effective target and option set.
29801 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29803 * config/arm/arm-cpus.in (armv8_4): New feature.
29804 (ARMv8_4a): New fgroup.
29805 (armv8.4-a): New arch.
29806 * config/arm/arm-tables.opt: Regenerate.
29807 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29808 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29809 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29810 Add matching rules for -march=armv8.4-a and extensions.
29811 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29813 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
29816 * config/rx/rx.md (BW): New mode attribute.
29817 (sync_lock_test_and_setsi): Add mode suffix to insn output.
29819 2018-01-11 Richard Biener <rguenther@suse.de>
29821 PR tree-optimization/83435
29822 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29823 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29824 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29826 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29827 Alan Hayward <alan.hayward@arm.com>
29828 David Sherwood <david.sherwood@arm.com>
29830 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29832 (aarch64_classify_address): Initialize it. Track polynomial offsets.
29833 (aarch64_print_address_internal): Use it to check for a zero offset.
29835 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29836 Alan Hayward <alan.hayward@arm.com>
29837 David Sherwood <david.sherwood@arm.com>
29839 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29840 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29841 Return a poly_int64 rather than a HOST_WIDE_INT.
29842 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29843 rather than a HOST_WIDE_INT.
29844 * config/aarch64/aarch64.h (aarch64_frame): Protect with
29845 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
29846 hard_fp_offset, frame_size, initial_adjust, callee_offset and
29847 final_offset from HOST_WIDE_INT to poly_int64.
29848 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29849 to_constant when getting the number of units in an Advanced SIMD
29851 (aarch64_builtin_vectorized_function): Check for a constant number
29853 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29855 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29856 attribute instead of GET_MODE_NUNITS.
29857 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29858 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29859 GET_MODE_SIZE for fixed-size registers.
29860 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29861 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29862 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29863 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29864 (aarch64_print_operand, aarch64_print_address_internal)
29865 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29866 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29867 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29868 Handle polynomial GET_MODE_SIZE.
29869 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
29870 wider than SImode without modification.
29871 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29872 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29873 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29874 passing and returning SVE modes.
29875 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29876 rather than GEN_INT.
29877 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29878 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29879 (aarch64_allocate_and_probe_stack_space): Likewise.
29880 (aarch64_layout_frame): Cope with polynomial offsets.
29881 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29882 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
29883 polynomial offsets.
29884 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29885 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29886 poly_int64 rather than a HOST_WIDE_INT.
29887 (aarch64_get_separate_components, aarch64_process_components)
29888 (aarch64_expand_prologue, aarch64_expand_epilogue)
29889 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29890 (aarch64_anchor_offset): New function, split out from...
29891 (aarch64_legitimize_address): ...here.
29892 (aarch64_builtin_vectorization_cost): Handle polynomial
29893 TYPE_VECTOR_SUBPARTS.
29894 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29896 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29897 number of elements from the PARALLEL rather than the mode.
29898 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29899 rather than GET_MODE_BITSIZE.
29900 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29901 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29902 (aarch64_expand_vec_perm_const_1): Handle polynomial
29903 d->perm.length () and d->perm elements.
29904 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
29905 Apply to_constant to d->perm elements.
29906 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29907 polynomial CONST_VECTOR_NUNITS.
29908 (aarch64_move_pointer): Take amount as a poly_int64 rather
29910 (aarch64_progress_pointer): Avoid temporary variable.
29911 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29912 the mode attribute instead of GET_MODE.
29914 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29915 Alan Hayward <alan.hayward@arm.com>
29916 David Sherwood <david.sherwood@arm.com>
29918 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29919 x exists before using it.
29920 (aarch64_add_constant_internal): Rename to...
29921 (aarch64_add_offset_1): ...this. Replace regnum with separate
29922 src and dest rtxes. Handle the case in which they're different,
29923 including when the offset is zero. Replace scratchreg with an rtx.
29924 Use 2 additions if there is no spare register into which we can
29925 move a 16-bit constant.
29926 (aarch64_add_constant): Delete.
29927 (aarch64_add_offset): Replace reg with separate src and dest
29928 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
29929 Use aarch64_add_offset_1.
29930 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29931 an rtx rather than an int. Take the delta as a poly_int64
29932 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
29933 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29934 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29935 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29936 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29937 and aarch64_add_sp.
29938 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29939 aarch64_add_constant.
29941 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29943 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29944 Use scalar_float_mode.
29946 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29948 * config/aarch64/aarch64-simd.md
29949 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29950 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29951 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29952 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29953 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29954 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29955 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29956 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29957 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29958 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29960 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29963 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29964 targ_options->x_arm_arch_string is non NULL.
29966 2018-01-11 Tamar Christina <tamar.christina@arm.com>
29968 * config/aarch64/aarch64.h
29969 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
29971 2018-01-11 Sudakshina Das <sudi.das@arm.com>
29974 * expmed.c (emit_store_flag_force): Swap if const op0
29975 and change VOIDmode to mode of op0.
29977 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29979 PR rtl-optimization/83761
29980 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29981 than bytes to mode_for_size.
29983 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29985 PR middle-end/83189
29986 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29987 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29990 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29992 PR middle-end/83575
29993 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29994 when in layout mode.
29995 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29996 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29999 2018-01-10 Michael Collison <michael.collison@arm.com>
30001 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
30002 * config/aarch64/aarch64-option-extension.def: Add
30003 AARCH64_OPT_EXTENSION of 'fp16fml'.
30004 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30005 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
30006 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
30007 * config/aarch64/constraints.md (Ui7): New constraint.
30008 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
30009 (VFMLA_SEL_W): Ditto.
30012 (VFMLA16_LOW): New int iterator.
30013 (VFMLA16_HIGH): Ditto.
30014 (UNSPEC_FMLAL): New unspec.
30015 (UNSPEC_FMLSL): Ditto.
30016 (UNSPEC_FMLAL2): Ditto.
30017 (UNSPEC_FMLSL2): Ditto.
30018 (f16mac): New code attribute.
30019 * config/aarch64/aarch64-simd-builtins.def
30020 (aarch64_fmlal_lowv2sf): Ditto.
30021 (aarch64_fmlsl_lowv2sf): Ditto.
30022 (aarch64_fmlalq_lowv4sf): Ditto.
30023 (aarch64_fmlslq_lowv4sf): Ditto.
30024 (aarch64_fmlal_highv2sf): Ditto.
30025 (aarch64_fmlsl_highv2sf): Ditto.
30026 (aarch64_fmlalq_highv4sf): Ditto.
30027 (aarch64_fmlslq_highv4sf): Ditto.
30028 (aarch64_fmlal_lane_lowv2sf): Ditto.
30029 (aarch64_fmlsl_lane_lowv2sf): Ditto.
30030 (aarch64_fmlal_laneq_lowv2sf): Ditto.
30031 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
30032 (aarch64_fmlalq_lane_lowv4sf): Ditto.
30033 (aarch64_fmlsl_lane_lowv4sf): Ditto.
30034 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
30035 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
30036 (aarch64_fmlal_lane_highv2sf): Ditto.
30037 (aarch64_fmlsl_lane_highv2sf): Ditto.
30038 (aarch64_fmlal_laneq_highv2sf): Ditto.
30039 (aarch64_fmlsl_laneq_highv2sf): Ditto.
30040 (aarch64_fmlalq_lane_highv4sf): Ditto.
30041 (aarch64_fmlsl_lane_highv4sf): Ditto.
30042 (aarch64_fmlalq_laneq_highv4sf): Ditto.
30043 (aarch64_fmlsl_laneq_highv4sf): Ditto.
30044 * config/aarch64/aarch64-simd.md:
30045 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
30046 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30047 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
30048 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30049 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
30050 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
30051 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
30052 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
30053 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
30054 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
30055 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
30056 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
30057 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
30058 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
30059 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
30060 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
30061 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
30062 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
30063 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
30064 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
30065 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
30066 (vfmlsl_low_u32): Ditto.
30067 (vfmlalq_low_u32): Ditto.
30068 (vfmlslq_low_u32): Ditto.
30069 (vfmlal_high_u32): Ditto.
30070 (vfmlsl_high_u32): Ditto.
30071 (vfmlalq_high_u32): Ditto.
30072 (vfmlslq_high_u32): Ditto.
30073 (vfmlal_lane_low_u32): Ditto.
30074 (vfmlsl_lane_low_u32): Ditto.
30075 (vfmlal_laneq_low_u32): Ditto.
30076 (vfmlsl_laneq_low_u32): Ditto.
30077 (vfmlalq_lane_low_u32): Ditto.
30078 (vfmlslq_lane_low_u32): Ditto.
30079 (vfmlalq_laneq_low_u32): Ditto.
30080 (vfmlslq_laneq_low_u32): Ditto.
30081 (vfmlal_lane_high_u32): Ditto.
30082 (vfmlsl_lane_high_u32): Ditto.
30083 (vfmlal_laneq_high_u32): Ditto.
30084 (vfmlsl_laneq_high_u32): Ditto.
30085 (vfmlalq_lane_high_u32): Ditto.
30086 (vfmlslq_lane_high_u32): Ditto.
30087 (vfmlalq_laneq_high_u32): Ditto.
30088 (vfmlslq_laneq_high_u32): Ditto.
30089 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
30090 (AARCH64_FL_FOR_ARCH8_4): New.
30091 (AARCH64_ISA_F16FML): New ISA flag.
30092 (TARGET_F16FML): New feature flag for fp16fml.
30093 (doc/invoke.texi): Document new fp16fml option.
30095 2018-01-10 Michael Collison <michael.collison@arm.com>
30097 * config/aarch64/aarch64-builtins.c:
30098 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
30099 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30100 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
30101 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
30102 (AARCH64_ISA_SHA3): New ISA flag.
30103 (TARGET_SHA3): New feature flag for sha3.
30104 * config/aarch64/iterators.md (sha512_op): New int attribute.
30105 (CRYPTO_SHA512): New int iterator.
30106 (UNSPEC_SHA512H): New unspec.
30107 (UNSPEC_SHA512H2): Ditto.
30108 (UNSPEC_SHA512SU0): Ditto.
30109 (UNSPEC_SHA512SU1): Ditto.
30110 * config/aarch64/aarch64-simd-builtins.def
30111 (aarch64_crypto_sha512hqv2di): New builtin.
30112 (aarch64_crypto_sha512h2qv2di): Ditto.
30113 (aarch64_crypto_sha512su0qv2di): Ditto.
30114 (aarch64_crypto_sha512su1qv2di): Ditto.
30115 (aarch64_eor3qv8hi): Ditto.
30116 (aarch64_rax1qv2di): Ditto.
30117 (aarch64_xarqv2di): Ditto.
30118 (aarch64_bcaxqv8hi): Ditto.
30119 * config/aarch64/aarch64-simd.md:
30120 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
30121 (aarch64_crypto_sha512su0qv2di): Ditto.
30122 (aarch64_crypto_sha512su1qv2di): Ditto.
30123 (aarch64_eor3qv8hi): Ditto.
30124 (aarch64_rax1qv2di): Ditto.
30125 (aarch64_xarqv2di): Ditto.
30126 (aarch64_bcaxqv8hi): Ditto.
30127 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
30128 (vsha512h2q_u64): Ditto.
30129 (vsha512su0q_u64): Ditto.
30130 (vsha512su1q_u64): Ditto.
30131 (veor3q_u16): Ditto.
30132 (vrax1q_u64): Ditto.
30133 (vxarq_u64): Ditto.
30134 (vbcaxq_u16): Ditto.
30135 * config/arm/types.md (crypto_sha512): New type attribute.
30136 (crypto_sha3): Ditto.
30137 (doc/invoke.texi): Document new sha3 option.
30139 2018-01-10 Michael Collison <michael.collison@arm.com>
30141 * config/aarch64/aarch64-builtins.c:
30142 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
30143 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30144 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
30145 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
30146 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
30147 (AARCH64_ISA_SM4): New ISA flag.
30148 (TARGET_SM4): New feature flag for sm4.
30149 * config/aarch64/aarch64-simd-builtins.def
30150 (aarch64_sm3ss1qv4si): Ditto.
30151 (aarch64_sm3tt1aq4si): Ditto.
30152 (aarch64_sm3tt1bq4si): Ditto.
30153 (aarch64_sm3tt2aq4si): Ditto.
30154 (aarch64_sm3tt2bq4si): Ditto.
30155 (aarch64_sm3partw1qv4si): Ditto.
30156 (aarch64_sm3partw2qv4si): Ditto.
30157 (aarch64_sm4eqv4si): Ditto.
30158 (aarch64_sm4ekeyqv4si): Ditto.
30159 * config/aarch64/aarch64-simd.md:
30160 (aarch64_sm3ss1qv4si): Ditto.
30161 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
30162 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
30163 (aarch64_sm4eqv4si): Ditto.
30164 (aarch64_sm4ekeyqv4si): Ditto.
30165 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
30166 (sm3part_op): Ditto.
30167 (CRYPTO_SM3TT): Ditto.
30168 (CRYPTO_SM3PART): Ditto.
30169 (UNSPEC_SM3SS1): New unspec.
30170 (UNSPEC_SM3TT1A): Ditto.
30171 (UNSPEC_SM3TT1B): Ditto.
30172 (UNSPEC_SM3TT2A): Ditto.
30173 (UNSPEC_SM3TT2B): Ditto.
30174 (UNSPEC_SM3PARTW1): Ditto.
30175 (UNSPEC_SM3PARTW2): Ditto.
30176 (UNSPEC_SM4E): Ditto.
30177 (UNSPEC_SM4EKEY): Ditto.
30178 * config/aarch64/constraints.md (Ui2): New constraint.
30179 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30180 * config/arm/types.md (crypto_sm3): New type attribute.
30181 (crypto_sm4): Ditto.
30182 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30183 (vsm3tt1aq_u32): Ditto.
30184 (vsm3tt1bq_u32): Ditto.
30185 (vsm3tt2aq_u32): Ditto.
30186 (vsm3tt2bq_u32): Ditto.
30187 (vsm3partw1q_u32): Ditto.
30188 (vsm3partw2q_u32): Ditto.
30189 (vsm4eq_u32): Ditto.
30190 (vsm4ekeyq_u32): Ditto.
30191 (doc/invoke.texi): Document new sm4 option.
30193 2018-01-10 Michael Collison <michael.collison@arm.com>
30195 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30196 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30197 (AARCH64_FL_FOR_ARCH8_4): New.
30198 (AARCH64_FL_V8_4): New flag.
30199 (doc/invoke.texi): Document new armv8.4-a option.
30201 2018-01-10 Michael Collison <michael.collison@arm.com>
30203 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30204 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30205 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30206 * config/aarch64/aarch64-option-extension.def: Add
30207 AARCH64_OPT_EXTENSION of 'sha2'.
30208 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30209 (crypto): Disable sha2 and aes if crypto disabled.
30210 (crypto): Enable aes and sha2 if enabled.
30211 (simd): Disable sha2 and aes if simd disabled.
30212 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30214 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30215 (TARGET_SHA2): New feature flag for sha2.
30216 (TARGET_AES): New feature flag for aes.
30217 * config/aarch64/aarch64-simd.md:
30218 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30219 conditional on TARGET_AES.
30220 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30221 (aarch64_crypto_sha1hsi): Make pattern conditional
30223 (aarch64_crypto_sha1hv4si): Ditto.
30224 (aarch64_be_crypto_sha1hv4si): Ditto.
30225 (aarch64_crypto_sha1su1v4si): Ditto.
30226 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30227 (aarch64_crypto_sha1su0v4si): Ditto.
30228 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30229 (aarch64_crypto_sha256su0v4si): Ditto.
30230 (aarch64_crypto_sha256su1v4si): Ditto.
30231 (doc/invoke.texi): Document new aes and sha2 options.
30233 2018-01-10 Martin Sebor <msebor@redhat.com>
30235 PR tree-optimization/83781
30236 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30239 2018-01-11 Martin Sebor <msebor@gmail.com>
30240 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30242 PR tree-optimization/83501
30243 PR tree-optimization/81703
30245 * tree-ssa-strlen.c (get_string_cst): Rename...
30246 (get_string_len): ...to this. Handle global constants.
30247 (handle_char_store): Adjust.
30249 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
30250 Jim Wilson <jimw@sifive.com>
30252 * config/riscv/riscv-protos.h (riscv_output_return): New.
30253 * config/riscv/riscv.c (struct machine_function): New naked_p field.
30254 (riscv_attribute_table, riscv_output_return),
30255 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30256 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30257 (riscv_compute_frame_info): Only compute frame->mask if not a naked
30259 (riscv_expand_prologue): Add early return for naked function.
30260 (riscv_expand_epilogue): Likewise.
30261 (riscv_function_ok_for_sibcall): Return false for naked function.
30262 (riscv_set_current_function): New.
30263 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30264 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30265 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30266 * doc/extend.texi (RISC-V Function Attributes): New.
30268 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
30270 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30271 check for 128-bit long double before checking TCmode.
30272 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30273 128-bit long doubles before checking TFmode or TCmode.
30274 (FLOAT128_IBM_P): Likewise.
30276 2018-01-10 Martin Sebor <msebor@redhat.com>
30278 PR tree-optimization/83671
30279 * builtins.c (c_strlen): Unconditionally return zero for the empty
30281 Use -Warray-bounds for warnings.
30282 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30283 for non-constant array indices with COMPONENT_REF, arrays of
30284 arrays, and pointers to arrays.
30285 (gimple_fold_builtin_strlen): Determine and set length range for
30286 non-constant character arrays.
30288 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
30290 PR middle-end/81897
30291 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30294 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
30296 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30298 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30301 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30302 VECTOR_MEM_ALTIVEC_OR_VSX_P.
30303 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30304 indexed_or_indirect_operand predicate.
30305 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30306 (*vsx_le_perm_load_v8hi): Likewise.
30307 (*vsx_le_perm_load_v16qi): Likewise.
30308 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30309 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30310 (*vsx_le_perm_store_v8hi): Likewise.
30311 (*vsx_le_perm_store_v16qi): Likewise.
30312 (eight unnamed splitters): Likewise.
30314 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30316 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30317 * config/rs6000/emmintrin.h: Likewise.
30318 * config/rs6000/mmintrin.h: Likewise.
30319 * config/rs6000/xmmintrin.h: Likewise.
30321 2018-01-10 David Malcolm <dmalcolm@redhat.com>
30324 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30326 * tree.c (tree_nop_conversion): Return true for location wrapper
30328 (maybe_wrap_with_location): New function.
30329 (selftest::check_strip_nops): New function.
30330 (selftest::test_location_wrappers): New function.
30331 (selftest::tree_c_tests): Call it.
30332 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30333 (maybe_wrap_with_location): New decl.
30334 (EXPR_LOCATION_WRAPPER_P): New macro.
30335 (location_wrapper_p): New inline function.
30336 (tree_strip_any_location_wrapper): New inline function.
30338 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
30341 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30342 stack_realign_offset for the largest alignment of stack slot
30344 (ix86_find_max_used_stack_alignment): New function.
30345 (ix86_finalize_stack_frame_flags): Use it. Set
30346 max_used_stack_alignment if we don't realign stack.
30347 * config/i386/i386.h (machine_function): Add
30348 max_used_stack_alignment.
30350 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
30352 * config/arm/arm.opt (-mbranch-cost): New option.
30353 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30356 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
30359 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30360 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30362 2018-01-10 Richard Biener <rguenther@suse.de>
30365 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30366 early out so it also covers the case where we have a non-NULL
30369 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30371 PR tree-optimization/83753
30372 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30373 for non-strided grouped accesses if the number of elements is 1.
30375 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30378 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30379 * i386.h (TARGET_USE_GATHER): Define.
30380 * x86-tune.def (X86_TUNE_USE_GATHER): New.
30382 2018-01-10 Martin Liska <mliska@suse.cz>
30385 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30386 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30388 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30389 CLEANUP_NO_PARTITIONING is not set.
30391 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30393 * doc/rtl.texi: Remove documentation of (const ...) wrappers
30394 for vectors, as a partial revert of r254296.
30395 * rtl.h (const_vec_p): Delete.
30396 (const_vec_duplicate_p): Don't test for vector CONSTs.
30397 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30398 * expmed.c (make_tree): Likewise.
30401 * common.md (E, F): Use CONSTANT_P instead of checking for
30403 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30404 checking for CONST_VECTOR.
30406 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30408 PR middle-end/83575
30409 * predict.c (force_edge_cold): Handle in more sane way edges
30410 with no prediction.
30412 2018-01-09 Carl Love <cel@us.ibm.com>
30414 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30416 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30417 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30418 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30419 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
30420 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30421 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
30422 * config/rs6000/rs6000-protos.h: Add extern defition for
30423 rs6000_generate_float2_double_code.
30424 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30426 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30427 (float2_v2df): Add define_expand.
30429 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
30432 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30433 op_mode in the force_to_mode call.
30435 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30437 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30438 instead of checking each element individually.
30439 (aarch64_evpc_uzp): Likewise.
30440 (aarch64_evpc_zip): Likewise.
30441 (aarch64_evpc_ext): Likewise.
30442 (aarch64_evpc_rev): Likewise.
30443 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30444 instead of checking each element individually. Return true without
30446 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30447 whether all selected elements come from the same input, instead of
30448 checking each element individually. Remove calls to gen_rtx_REG,
30449 start_sequence and end_sequence and instead assert that no rtl is
30452 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30454 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30455 order of HIGH and CONST checks.
30457 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30459 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30460 if the destination isn't an SSA_NAME.
30462 2018-01-09 Richard Biener <rguenther@suse.de>
30464 PR tree-optimization/83668
30465 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30467 (canonicalize_loop_form): ... here, renamed from ...
30468 (canonicalize_loop_closed_ssa_form): ... this and amended to
30469 swap successor edges for loop exit blocks to make us use
30470 the RPO order we need for initial schedule generation.
30472 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30474 PR tree-optimization/64811
30475 * match.pd: When optimizing comparisons with Inf, avoid
30476 introducing or losing exceptions from comparisons with NaN.
30478 2018-01-09 Martin Liska <mliska@suse.cz>
30481 * asan.c (shadow_mem_size): Add gcc_assert.
30483 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30485 Don't save registers in main().
30488 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30489 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30490 * config/avr/avr.c (avr_set_current_function): Don't error if
30491 naked, OS_task or OS_main are specified at the same time.
30492 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30494 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30496 * common/config/avr/avr-common.c (avr_option_optimization_table):
30497 Switch on -mmain-is-OS_task for optimizing compilations.
30499 2018-01-09 Richard Biener <rguenther@suse.de>
30501 PR tree-optimization/83572
30502 * graphite.c: Include cfganal.h.
30503 (graphite_transform_loops): Connect infinite loops to exit
30504 and remove fake edges at the end.
30506 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30508 * ipa-inline.c (edge_badness): Revert accidental checkin.
30510 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30513 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30514 symbols; not inline clones.
30516 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30519 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30520 hard registers. Formatting fixes.
30522 PR preprocessor/83722
30523 * gcc.c (try_generate_repro): Pass
30524 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30525 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30528 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30529 Kito Cheng <kito.cheng@gmail.com>
30531 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30532 (riscv_leaf_function_p): Delete.
30533 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30535 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30537 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30539 (do_ifelse): New function.
30540 (do_isel): New function.
30541 (do_sub3): New function.
30542 (do_add3): New function.
30543 (do_load_mask_compare): New function.
30544 (do_overlap_load_compare): New function.
30545 (expand_compare_loop): New function.
30546 (expand_block_compare): Call expand_compare_loop() when appropriate.
30547 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30548 option description.
30549 (-mblock-compare-inline-loop-limit): New option.
30551 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30554 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30555 Reverse order of second and third operands in first alternative.
30556 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30557 of first and second elements in UNSPEC_VPERMR vector.
30558 (altivec_expand_vec_perm_le): Likewise.
30560 2018-01-08 Jeff Law <law@redhat.com>
30562 PR rtl-optimizatin/81308
30563 * tree-switch-conversion.c (cfg_altered): New file scoped static.
30564 (process_switch): If group_case_labels makes a change, then set
30566 (pass_convert_switch::execute): If a switch is converted, then
30567 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
30569 PR rtl-optimization/81308
30570 * recog.c (split_all_insns): Conditionally cleanup the CFG after
30573 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
30575 PR target/83663 - Revert r255946
30576 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30577 generation for cases where splatting a value is not useful.
30578 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30579 across a vec_duplicate and a paradoxical subreg forming a vector
30580 mode to a vec_concat.
30582 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30584 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30585 -march=armv8.3-a variants.
30586 * config/arm/t-multilib: Likewise.
30587 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
30589 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30591 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30593 (cceq_ior_compare_complement): Give it a name so I can use it, and
30594 change boolean_or_operator predicate to boolean_operator so it can
30595 be used to generate a crand.
30596 (eqne): New code iterator.
30597 (bd/bd_neg): New code_attrs.
30598 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30599 a single define_insn.
30600 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30601 decrement (bdnzt/bdnzf/bdzt/bdzf).
30602 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30603 with the new names of the branch decrement patterns, and added the
30604 names of the branch decrement conditional patterns.
30606 2018-01-08 Richard Biener <rguenther@suse.de>
30608 PR tree-optimization/83563
30609 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30612 2018-01-08 Richard Biener <rguenther@suse.de>
30614 PR middle-end/83713
30615 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30617 2018-01-08 Richard Biener <rguenther@suse.de>
30619 PR tree-optimization/83685
30620 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30621 references to abnormals.
30623 2018-01-08 Richard Biener <rguenther@suse.de>
30626 * dwarf2out.c (output_indirect_strings): Handle empty
30627 skeleton_debug_str_hash.
30628 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30630 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30632 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30633 (emit_store_direct): Likewise.
30634 (arc_trampoline_adjust_address): Likewise.
30635 (arc_asm_trampoline_template): New function.
30636 (arc_initialize_trampoline): Use asm_trampoline_template.
30637 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30638 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30639 * config/arc/arc.md (flush_icache): Delete pattern.
30641 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30643 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30644 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30647 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30650 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30651 by not USED_FOR_TARGET.
30652 (make_pass_resolve_sw_modes): Likewise.
30654 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30656 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30659 2018-01-08 Richard Biener <rguenther@suse.de>
30661 PR middle-end/83580
30662 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30664 2018-01-08 Richard Biener <rguenther@suse.de>
30666 PR middle-end/83517
30667 * match.pd ((t * 2) / 2) -> t): Add missing :c.
30669 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
30671 PR middle-end/81897
30672 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30673 basic blocks with a small number of successors.
30674 (convert_control_dep_chain_into_preds): Improve handling of
30676 (dump_predicates): Split apart into...
30677 (dump_pred_chain): ...here...
30678 (dump_pred_info): ...and here.
30679 (can_one_predicate_be_invalidated_p): Add debugging printfs.
30680 (can_chain_union_be_invalidated_p): Improve check for invalidation
30682 (uninit_uses_cannot_happen): Avoid unnecessary if
30683 convert_control_dep_chain_into_preds yielded nothing.
30685 2018-01-06 Martin Sebor <msebor@redhat.com>
30687 PR tree-optimization/83640
30688 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30689 subtracting negative offset from size.
30690 (builtin_access::overlap): Adjust offset bounds of the access to fall
30691 within the size of the object if possible.
30693 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
30695 PR rtl-optimization/83699
30696 * expmed.c (extract_bit_field_1): Restrict the vector usage of
30697 extract_bit_field_as_subreg to cases in which the extracted
30698 value is also a vector.
30700 * lra-constraints.c (process_alt_operands): Test for the equivalence
30701 substitutions when detecting a possible reload cycle.
30703 2018-01-06 Jakub Jelinek <jakub@redhat.com>
30706 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30707 by default if flag_selective_schedling{,2}. Formatting fixes.
30709 PR rtl-optimization/83682
30710 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30711 if it has non-VECTOR_MODE element mode.
30712 (vec_duplicate_p): Likewise.
30714 PR middle-end/83694
30715 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30716 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30718 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30721 * config/i386/i386-builtin.def
30722 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30723 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30724 Require also OPTION_MASK_ISA_AVX512F in addition to
30725 OPTION_MASK_ISA_GFNI.
30726 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30727 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30728 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30729 to OPTION_MASK_ISA_GFNI.
30730 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30731 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30732 OPTION_MASK_ISA_AVX512BW.
30733 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30734 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30735 addition to OPTION_MASK_ISA_GFNI.
30736 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30737 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30738 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30739 to OPTION_MASK_ISA_GFNI.
30740 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30741 a requirement for all ISAs rather than any of them with a few
30743 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30745 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30746 bitmasks to be enabled with 3 exceptions, instead of requiring any
30747 enabled ISA with lots of exceptions.
30748 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30749 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30750 Change avx512bw in isa attribute to avx512f.
30751 * config/i386/sgxintrin.h: Add license boilerplate.
30752 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
30753 to __AVX512F__ and __AVX512VL to __AVX512VL__.
30754 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30755 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30757 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30758 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30759 temporarily sse2 rather than sse if not enabled already.
30762 * config/i386/sse.md (VI248_VLBW): Rename to ...
30763 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
30764 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30765 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30766 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30767 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30768 mode iterator instead of VI248_VLBW.
30770 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
30772 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30773 (record_modified): Skip clobbers; add debug output.
30774 (param_change_prob): Use sreal frequencies.
30776 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30778 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30779 punt for user-aligned variables.
30781 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30783 * tree-chrec.c (chrec_contains_symbols): Return true for
30786 2018-01-05 Sudakshina Das <sudi.das@arm.com>
30789 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30790 of (x|y) == x for BICS pattern.
30792 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30794 PR tree-optimization/83605
30795 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30796 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30799 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
30801 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30802 * config/epiphany/rtems.h: New file.
30804 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30805 Uros Bizjak <ubizjak@gmail.com>
30808 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30809 QIreg_operand instead of register_operand predicate.
30810 * config/i386/i386.c (ix86_rop_should_change_byte_p,
30811 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30812 comments instead of -fmitigate[-_]rop.
30814 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30817 * cgraphunit.c (symbol_table::compile): Switch to text_section
30818 before calling assembly_start debug hook.
30819 * run-rtl-passes.c (run_rtl_passes): Likewise.
30822 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30824 * tree-vrp.c (extract_range_from_binary_expr_1): Check
30825 range_int_cst_p rather than !symbolic_range_p before calling
30826 extract_range_from_multiplicative_op_1.
30828 2018-01-04 Jeff Law <law@redhat.com>
30830 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30831 redundant test in assertion.
30833 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30835 * doc/rtl.texi: Document machine_mode wrapper classes.
30837 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30839 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30840 using tree_to_uhwi.
30842 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30844 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30845 the VEC_PERM_EXPR fold to fail.
30847 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30850 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30851 to switched_sections.
30853 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30856 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30857 test for d.testing.
30859 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
30862 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30863 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30865 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30868 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30869 is BLKmode and bitpos not zero or mode change is needed.
30871 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30874 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30877 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
30880 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30881 instead of MULT rtx. Update all corresponding splitters.
30882 (*saddl_se): Ditto.
30883 (*ssub<modesuffix>): Ditto.
30884 (*ssubl_se): Ditto.
30885 (*cmp_sadd_di): Update split patterns.
30886 (*cmp_sadd_si): Ditto.
30887 (*cmp_sadd_sidi): Ditto.
30888 (*cmp_ssub_di): Ditto.
30889 (*cmp_ssub_si): Ditto.
30890 (*cmp_ssub_sidi): Ditto.
30891 * config/alpha/predicates.md (const23_operand): New predicate.
30892 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30893 Look for ASHIFT, not MULT inner operand.
30894 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30896 2018-01-04 Martin Liska <mliska@suse.cz>
30898 PR gcov-profile/83669
30899 * gcov.c (output_intermediate_file): Add version to intermediate
30901 * doc/gcov.texi: Document new field 'version' in intermediate
30902 file format. Fix location of '-k' option of gcov command.
30904 2018-01-04 Martin Liska <mliska@suse.cz>
30907 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30909 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30911 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30913 2018-01-03 Martin Sebor <msebor@redhat.com>
30915 PR tree-optimization/83655
30916 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30917 checking calls with invalid arguments.
30919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30921 * tree-vect-stmts.c (vect_get_store_rhs): New function.
30922 (vectorizable_mask_load_store): Delete.
30923 (vectorizable_call): Return false for masked loads and stores.
30924 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
30925 instead of gimple_assign_rhs1.
30926 (vectorizable_load): Handle IFN_MASK_LOAD.
30927 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30931 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30933 (vectorizable_mask_load_store): ...here.
30934 (vectorizable_load): ...and here.
30936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30938 * tree-vect-stmts.c (vect_build_all_ones_mask)
30939 (vect_build_zero_merge_argument): New functions, split out from...
30940 (vectorizable_load): ...here.
30942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30944 * tree-vect-stmts.c (vect_check_store_rhs): New function,
30946 (vectorizable_mask_load_store): ...here.
30947 (vectorizable_store): ...and here.
30949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30951 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30953 (vectorizable_mask_load_store): ...here.
30955 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30957 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30958 (vect_model_store_cost): Take a vec_load_store_type instead of a
30960 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30961 (vect_model_store_cost): Take a vec_load_store_type instead of a
30963 (vectorizable_mask_load_store): Update accordingly.
30964 (vectorizable_store): Likewise.
30965 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30967 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30969 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30970 IFN_MASK_LOAD calls here rather than...
30971 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30974 Alan Hayward <alan.hayward@arm.com>
30975 David Sherwood <david.sherwood@arm.com>
30977 * expmed.c (extract_bit_field_1): For vector extracts,
30978 fall back to extract_bit_field_as_subreg if vec_extract
30981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30982 Alan Hayward <alan.hayward@arm.com>
30983 David Sherwood <david.sherwood@arm.com>
30985 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30986 they are variable or constant sized.
30987 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30988 slots for constant-sized data.
30990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30991 Alan Hayward <alan.hayward@arm.com>
30992 David Sherwood <david.sherwood@arm.com>
30994 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30995 handling COND_EXPRs with boolean comparisons, try to find a better
30996 basis for the mask type than the boolean itself.
30998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31000 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
31001 is calculated and how it can be overridden.
31002 * genmodes.c (max_bitsize_mode_any_mode): New variable.
31003 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
31005 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
31008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31009 Alan Hayward <alan.hayward@arm.com>
31010 David Sherwood <david.sherwood@arm.com>
31012 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
31013 Remove the mode argument.
31014 (aarch64_simd_valid_immediate): Remove the mode and inverse
31016 * config/aarch64/iterators.md (bitsize): New iterator.
31017 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
31018 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
31019 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
31020 aarch64_simd_valid_immediate.
31021 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
31022 (aarch64_reg_or_bic_imm): Likewise.
31023 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
31024 with an insn_type enum and msl with a modifier_type enum.
31025 Replace element_width with a scalar_mode. Change the shift
31026 to unsigned int. Add constructors for scalar_float_mode and
31027 scalar_int_mode elements.
31028 (aarch64_vect_float_const_representable_p): Delete.
31029 (aarch64_can_const_movi_rtx_p)
31030 (aarch64_simd_scalar_immediate_valid_for_move)
31031 (aarch64_simd_make_constant): Update call to
31032 aarch64_simd_valid_immediate.
31033 (aarch64_advsimd_valid_immediate_hs): New function.
31034 (aarch64_advsimd_valid_immediate): Likewise.
31035 (aarch64_simd_valid_immediate): Remove mode and inverse
31036 arguments. Rewrite to use the above. Use const_vec_duplicate_p
31037 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
31038 and aarch64_float_const_representable_p on the result.
31039 (aarch64_output_simd_mov_immediate): Remove mode argument.
31040 Update call to aarch64_simd_valid_immediate and use of
31041 simd_immediate_info.
31042 (aarch64_output_scalar_simd_mov_immediate): Update call
31045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31046 Alan Hayward <alan.hayward@arm.com>
31047 David Sherwood <david.sherwood@arm.com>
31049 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
31050 (mode_nunits): Likewise CONST_MODE_NUNITS.
31051 * machmode.def (ADJUST_NUNITS): Document.
31052 * genmodes.c (mode_data::need_nunits_adj): New field.
31053 (blank_mode): Update accordingly.
31054 (adj_nunits): New variable.
31055 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
31057 (emit_mode_size_inline): Set need_bytesize_adj for all modes
31058 listed in adj_nunits.
31059 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
31060 listed in adj_nunits. Don't emit case statements for such modes.
31061 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
31062 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
31063 nothing if adj_nunits is nonnull.
31064 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
31065 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
31066 (emit_mode_fbit): Update use of print_maybe_const_decl.
31067 (emit_move_size): Likewise. Treat the array as non-const
31069 (emit_mode_adjustments): Handle adj_nunits.
31071 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31073 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
31074 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
31075 (VECTOR_MODES): Use it.
31076 (make_vector_modes): Take the prefix as an argument.
31078 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31079 Alan Hayward <alan.hayward@arm.com>
31080 David Sherwood <david.sherwood@arm.com>
31082 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
31083 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
31084 for MODE_VECTOR_BOOL.
31085 * machmode.def (VECTOR_BOOL_MODE): Document.
31086 * genmodes.c (VECTOR_BOOL_MODE): New macro.
31087 (make_vector_bool_mode): New function.
31088 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
31090 * lto-streamer-in.c (lto_input_mode_table): Likewise.
31091 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
31093 * stor-layout.c (int_mode_for_mode): Likewise.
31094 * tree.c (build_vector_type_for_mode): Likewise.
31095 * varasm.c (output_constant_pool_2): Likewise.
31096 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
31097 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
31098 for MODE_VECTOR_BOOL.
31099 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
31100 of mode class checks.
31101 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
31102 instead of a list of mode class checks.
31103 (expand_vector_scalar_condition): Likewise.
31104 (type_for_widest_vector_mode): Handle BImode as an inner mode.
31106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31107 Alan Hayward <alan.hayward@arm.com>
31108 David Sherwood <david.sherwood@arm.com>
31110 * machmode.h (mode_size): Change from unsigned short to
31112 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
31113 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31114 or if measurement_type is not polynomial.
31115 (fixed_size_mode::includes_p): Check for constant-sized modes.
31116 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
31117 return a poly_uint16 rather than an unsigned short.
31118 (emit_mode_size): Change the type of mode_size from unsigned short
31119 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
31120 (emit_mode_adjustments): Cope with polynomial vector sizes.
31121 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31123 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31125 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
31126 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31127 * caller-save.c (setup_save_areas): Likewise.
31128 (replace_reg_with_saved_mem): Likewise.
31129 * calls.c (emit_library_call_value_1): Likewise.
31130 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31131 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31132 (gen_lowpart_for_combine): Likewise.
31133 * convert.c (convert_to_integer_1): Likewise.
31134 * cse.c (equiv_constant, cse_insn): Likewise.
31135 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
31136 (cselib_subst_to_values): Likewise.
31137 * dce.c (word_dce_process_block): Likewise.
31138 * df-problems.c (df_word_lr_mark_ref): Likewise.
31139 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
31140 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
31141 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
31142 (rtl_for_decl_location): Likewise.
31143 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
31144 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
31145 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
31146 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
31147 (expand_expr_real_1): Likewise.
31148 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
31149 (pad_below): Likewise.
31150 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31151 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
31152 * ira.c (get_subreg_tracking_sizes): Likewise.
31153 * ira-build.c (ira_create_allocno_objects): Likewise.
31154 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
31155 (ira_sort_regnos_for_alter_reg): Likewise.
31156 * ira-costs.c (record_operand_costs): Likewise.
31157 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
31158 (resolve_simple_move): Likewise.
31159 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
31160 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
31161 (lra_constraints): Likewise.
31162 (CONST_POOL_OK_P): Reject variable-sized modes.
31163 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
31164 (add_pseudo_to_slot, lra_spill): Likewise.
31165 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31166 * optabs-query.c (get_best_extraction_insn): Likewise.
31167 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31168 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31169 (expand_mult_highpart, valid_multiword_target_p): Likewise.
31170 * recog.c (offsettable_address_addr_space_p): Likewise.
31171 * regcprop.c (maybe_mode_change): Likewise.
31172 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31173 * regrename.c (build_def_use): Likewise.
31174 * regstat.c (dump_reg_info): Likewise.
31175 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31176 (find_reloads, find_reloads_subreg_address): Likewise.
31177 * reload1.c (eliminate_regs_1): Likewise.
31178 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31179 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31180 (simplify_binary_operation_1, simplify_subreg): Likewise.
31181 * targhooks.c (default_function_arg_padding): Likewise.
31182 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31183 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31184 (verify_gimple_assign_ternary): Likewise.
31185 * tree-inline.c (estimate_move_cost): Likewise.
31186 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31187 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31188 (get_address_cost_ainc): Likewise.
31189 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31190 (vect_supportable_dr_alignment): Likewise.
31191 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31192 (vectorizable_reduction): Likewise.
31193 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31194 (vectorizable_operation, vectorizable_load): Likewise.
31195 * tree.c (build_same_sized_truth_vector_type): Likewise.
31196 * valtrack.c (cleanup_auto_inc_dec): Likewise.
31197 * var-tracking.c (emit_note_insn_var_location): Likewise.
31198 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31199 (ADDR_VEC_ALIGN): Likewise.
31201 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31202 Alan Hayward <alan.hayward@arm.com>
31203 David Sherwood <david.sherwood@arm.com>
31205 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31207 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31208 or if measurement_type is polynomial.
31209 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31210 * combine.c (make_extraction): Likewise.
31211 * dse.c (find_shift_sequence): Likewise.
31212 * dwarf2out.c (mem_loc_descriptor): Likewise.
31213 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31214 (extract_bit_field, extract_low_bits): Likewise.
31215 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31216 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31217 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31218 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31219 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31220 * reload.c (find_reloads): Likewise.
31221 * reload1.c (alter_reg): Likewise.
31222 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31223 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31224 * tree-if-conv.c (predicate_mem_writes): Likewise.
31225 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31226 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31227 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31228 * valtrack.c (dead_debug_insert_temp): Likewise.
31229 * varasm.c (mergeable_constant_section): Likewise.
31230 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31233 Alan Hayward <alan.hayward@arm.com>
31234 David Sherwood <david.sherwood@arm.com>
31236 * expr.c (expand_assignment): Cope with polynomial mode sizes
31237 when assigning to a CONCAT.
31239 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31240 Alan Hayward <alan.hayward@arm.com>
31241 David Sherwood <david.sherwood@arm.com>
31243 * machmode.h (mode_precision): Change from unsigned short to
31245 (mode_to_precision): Return a poly_uint16 rather than an unsigned
31247 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31248 or if measurement_type is not polynomial.
31249 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
31250 in which the mode is already known to be a scalar_int_mode.
31251 * genmodes.c (emit_mode_precision): Change the type of mode_precision
31252 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
31254 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31255 for GET_MODE_PRECISION.
31256 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31257 for GET_MODE_PRECISION.
31258 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31260 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31261 (expand_field_assignment, make_extraction): Likewise.
31262 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31263 (get_last_value): Likewise.
31264 * convert.c (convert_to_integer_1): Likewise.
31265 * cse.c (cse_insn): Likewise.
31266 * expr.c (expand_expr_real_1): Likewise.
31267 * lra-constraints.c (simplify_operand_subreg): Likewise.
31268 * optabs-query.c (can_atomic_load_p): Likewise.
31269 * optabs.c (expand_atomic_load): Likewise.
31270 (expand_atomic_store): Likewise.
31271 * ree.c (combine_reaching_defs): Likewise.
31272 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31273 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31274 * tree.h (type_has_mode_precision_p): Likewise.
31275 * ubsan.c (instrument_si_overflow): Likewise.
31277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31278 Alan Hayward <alan.hayward@arm.com>
31279 David Sherwood <david.sherwood@arm.com>
31281 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31282 polynomial numbers of units.
31283 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31284 (valid_vector_subparts_p): New function.
31285 (build_vector_type): Remove temporary shim and take the number
31286 of units as a poly_uint64 rather than an int.
31287 (build_opaque_vector_type): Take the number of units as a
31288 poly_uint64 rather than an int.
31289 * tree.c (build_vector_from_ctor): Handle polynomial
31290 TYPE_VECTOR_SUBPARTS.
31291 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31292 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31293 (build_vector_from_val): If the number of units is variable,
31294 use build_vec_duplicate_cst for constant operands and
31295 VEC_DUPLICATE_EXPR otherwise.
31296 (make_vector_type): Remove temporary is_constant ().
31297 (build_vector_type, build_opaque_vector_type): Take the number of
31298 units as a poly_uint64 rather than an int.
31299 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31301 * cfgexpand.c (expand_debug_expr): Likewise.
31302 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31303 (store_constructor, expand_expr_real_1): Likewise.
31304 (const_scalar_mask_from_tree): Likewise.
31305 * fold-const-call.c (fold_const_reduction): Likewise.
31306 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31307 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31308 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31309 (fold_relational_const): Likewise.
31310 (native_interpret_vector): Likewise. Change the size from an
31311 int to an unsigned int.
31312 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31313 TYPE_VECTOR_SUBPARTS.
31314 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31315 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31316 duplicating a non-constant operand into a variable-length vector.
31317 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31318 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31319 * ipa-icf.c (sem_variable::equals): Likewise.
31320 * match.pd: Likewise.
31321 * omp-simd-clone.c (simd_clone_subparts): Likewise.
31322 * print-tree.c (print_node): Likewise.
31323 * stor-layout.c (layout_type): Likewise.
31324 * targhooks.c (default_builtin_vectorization_cost): Likewise.
31325 * tree-cfg.c (verify_gimple_comparison): Likewise.
31326 (verify_gimple_assign_binary): Likewise.
31327 (verify_gimple_assign_ternary): Likewise.
31328 (verify_gimple_assign_single): Likewise.
31329 * tree-pretty-print.c (dump_generic_node): Likewise.
31330 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31331 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31332 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31333 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31334 (vect_shift_permute_load_chain): Likewise.
31335 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31336 (expand_vector_condition, optimize_vector_constructor): Likewise.
31337 (lower_vec_perm, get_compute_type): Likewise.
31338 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31339 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31340 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31341 (vect_recog_mask_conversion_pattern): Likewise.
31342 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31343 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31344 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31345 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31346 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31347 (vectorizable_shift, vectorizable_operation, vectorizable_store)
31348 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31349 (supportable_widening_operation): Likewise.
31350 (supportable_narrowing_operation): Likewise.
31351 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31353 * varasm.c (output_constant): Likewise.
31355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31356 Alan Hayward <alan.hayward@arm.com>
31357 David Sherwood <david.sherwood@arm.com>
31359 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31360 so that both the length == 3 and length != 3 cases set up their
31361 own permute vectors. Add comments explaining why we know the
31362 number of elements is constant.
31363 (vect_permute_load_chain): Likewise.
31365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31366 Alan Hayward <alan.hayward@arm.com>
31367 David Sherwood <david.sherwood@arm.com>
31369 * machmode.h (mode_nunits): Change from unsigned char to
31371 (ONLY_FIXED_SIZE_MODES): New macro.
31372 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31373 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31374 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31376 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31377 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31378 or if measurement_type is not polynomial.
31379 * genmodes.c (ZERO_COEFFS): New macro.
31380 (emit_mode_nunits_inline): Make mode_nunits_inline return a
31382 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31383 Use ZERO_COEFFS when emitting initializers.
31384 * data-streamer.h (bp_pack_poly_value): New function.
31385 (bp_unpack_poly_value): Likewise.
31386 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31387 for GET_MODE_NUNITS.
31388 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31389 for GET_MODE_NUNITS.
31390 * tree.c (make_vector_type): Remove temporary shim and make
31391 the real function take the number of units as a poly_uint64
31392 rather than an int.
31393 (build_vector_type_for_mode): Handle polynomial nunits.
31394 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31395 * emit-rtl.c (const_vec_series_p_1): Likewise.
31396 (gen_rtx_CONST_VECTOR): Likewise.
31397 * fold-const.c (test_vec_duplicate_folding): Likewise.
31398 * genrecog.c (validate_pattern): Likewise.
31399 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31400 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31401 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31402 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31403 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31404 * rtlanal.c (subreg_get_info): Likewise.
31405 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31406 (vect_grouped_load_supported): Likewise.
31407 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31408 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31409 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31410 (simplify_const_unary_operation, simplify_binary_operation_1)
31411 (simplify_const_binary_operation, simplify_ternary_operation)
31412 (test_vector_ops_duplicate, test_vector_ops): Likewise.
31413 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31414 instead of CONST_VECTOR_NUNITS.
31415 * varasm.c (output_constant_pool_2): Likewise.
31416 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31417 explicit-encoded elements in the XVEC for variable-length vectors.
31419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31421 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31424 Alan Hayward <alan.hayward@arm.com>
31425 David Sherwood <david.sherwood@arm.com>
31427 * coretypes.h (fixed_size_mode): Declare.
31428 (fixed_size_mode_pod): New typedef.
31429 * builtins.h (target_builtins::x_apply_args_mode)
31430 (target_builtins::x_apply_result_mode): Change type to
31431 fixed_size_mode_pod.
31432 * builtins.c (apply_args_size, apply_result_size, result_vector)
31433 (expand_builtin_apply_args_1, expand_builtin_apply)
31434 (expand_builtin_return): Update accordingly.
31436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31438 * cse.c (hash_rtx_cb): Hash only the encoded elements.
31439 * cselib.c (cselib_hash_rtx): Likewise.
31440 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31441 CONST_VECTOR encoding.
31443 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31444 Jeff Law <law@redhat.com>
31447 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31448 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31449 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31450 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31453 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31454 explicitly probe *sp in a noreturn function if there were any callee
31455 register saves or frame pointer is needed.
31457 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31460 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31461 BLKmode for ternary, binary or unary expressions.
31464 * var-tracking.c (delete_vta_debug_insn): New inline function.
31465 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31466 insns from get_insns () to NULL instead of each bb separately.
31467 Use delete_vta_debug_insn. No longer static.
31468 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31469 delete_vta_debug_insns callers.
31470 * rtl.h (delete_vta_debug_insns): Declare.
31471 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31472 instead of variable_tracking_main.
31474 2018-01-03 Martin Sebor <msebor@redhat.com>
31476 PR tree-optimization/83603
31477 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31478 arguments past the endof the argument list in functions declared
31479 without a prototype.
31480 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31481 Avoid checking when arguments are null.
31483 2018-01-03 Martin Sebor <msebor@redhat.com>
31486 * doc/extend.texi (attribute const): Fix a typo.
31487 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31488 issuing -Wsuggest-attribute for void functions.
31490 2018-01-03 Martin Sebor <msebor@redhat.com>
31492 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31493 offset_int::from instead of wide_int::to_shwi.
31494 (maybe_diag_overlap): Remove assertion.
31495 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31496 * gimple-ssa-sprintf.c (format_directive): Same.
31497 (parse_directive): Same.
31498 (sprintf_dom_walker::compute_format_length): Same.
31499 (try_substitute_return_value): Same.
31501 2018-01-03 Jeff Law <law@redhat.com>
31503 PR middle-end/83654
31504 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31505 non-constant residual for zero at runtime and avoid probing in
31506 that case. Reorganize code for trailing problem to mirror handling
31509 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31511 PR tree-optimization/83501
31512 * tree-ssa-strlen.c (get_string_cst): New.
31513 (handle_char_store): Call get_string_cst.
31515 2018-01-03 Martin Liska <mliska@suse.cz>
31517 PR tree-optimization/83593
31518 * tree-ssa-strlen.c: Include tree-cfg.h.
31519 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31520 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31521 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31523 (strlen_dom_walker::before_dom_children): Call
31524 gimple_purge_dead_eh_edges. Dump tranformation with details
31526 (strlen_dom_walker::before_dom_children): Update call by adding
31527 new argument cleanup_eh.
31528 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31530 2018-01-03 Martin Liska <mliska@suse.cz>
31533 * cif-code.def (VARIADIC_THUNK): New enum value.
31534 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31537 2018-01-03 Jan Beulich <jbeulich@suse.com>
31539 * sse.md (mov<mode>_internal): Tighten condition for when to use
31540 vmovdqu<ssescalarsize> for TI and OI modes.
31542 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31544 Update copyright years.
31546 2018-01-03 Martin Liska <mliska@suse.cz>
31549 * ipa-visibility.c (function_and_variable_visibility): Skip
31550 functions with noipa attribure.
31552 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31554 * gcc.c (process_command): Update copyright notice dates.
31555 * gcov-dump.c (print_version): Ditto.
31556 * gcov.c (print_version): Ditto.
31557 * gcov-tool.c (print_version): Ditto.
31558 * gengtype.c (create_file): Ditto.
31559 * doc/cpp.texi: Bump @copying's copyright year.
31560 * doc/cppinternals.texi: Ditto.
31561 * doc/gcc.texi: Ditto.
31562 * doc/gccint.texi: Ditto.
31563 * doc/gcov.texi: Ditto.
31564 * doc/install.texi: Ditto.
31565 * doc/invoke.texi: Ditto.
31567 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31569 * vector-builder.h (vector_builder::m_full_nelts): Change from
31570 unsigned int to poly_uint64.
31571 (vector_builder::full_nelts): Update prototype accordingly.
31572 (vector_builder::new_vector): Likewise.
31573 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31574 (vector_builder::operator ==): Likewise.
31575 (vector_builder::finalize): Likewise.
31576 * int-vector-builder.h (int_vector_builder::int_vector_builder):
31577 Take the number of elements as a poly_uint64 rather than an
31579 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31580 from unsigned int to poly_uint64.
31581 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31582 (vec_perm_indices::new_vector): Likewise.
31583 (vec_perm_indices::length): Likewise.
31584 (vec_perm_indices::nelts_per_input): Likewise.
31585 (vec_perm_indices::input_nelts): Likewise.
31586 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31587 number of elements per input as a poly_uint64 rather than an
31588 unsigned int. Use the original encoding for variable-length
31589 vectors, rather than clamping each individual element.
31590 For the second and subsequent elements in each pattern,
31591 clamp the step and base before clamping their sum.
31592 (vec_perm_indices::series_p): Handle polynomial element counts.
31593 (vec_perm_indices::all_in_range_p): Likewise.
31594 (vec_perm_indices_to_tree): Likewise.
31595 (vec_perm_indices_to_rtx): Likewise.
31596 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31597 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31598 (tree_vector_builder::new_binary_operation): Handle polynomial
31599 element counts. Return false if we need to know the number
31600 of elements at compile time.
31601 * fold-const.c (fold_vec_perm): Punt if the number of elements
31602 isn't known at compile time.
31604 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31606 * vec-perm-indices.h (vec_perm_builder): Change element type
31607 from HOST_WIDE_INT to poly_int64.
31608 (vec_perm_indices::element_type): Update accordingly.
31609 (vec_perm_indices::clamp): Handle polynomial element_types.
31610 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31611 (vec_perm_indices::all_in_range_p): Likewise.
31612 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31614 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31615 polynomial vec_perm_indices element types.
31616 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31617 * fold-const.c (fold_vec_perm): Likewise.
31618 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31619 * tree-vect-generic.c (lower_vec_perm): Likewise.
31620 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31621 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31622 element type to HOST_WIDE_INT.
31624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31625 Alan Hayward <alan.hayward@arm.com>
31626 David Sherwood <david.sherwood@arm.com>
31628 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31629 rather than an int. Use plus_constant.
31630 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31631 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31634 Alan Hayward <alan.hayward@arm.com>
31635 David Sherwood <david.sherwood@arm.com>
31637 * calls.c (emit_call_1, expand_call): Change struct_value_size from
31638 a HOST_WIDE_INT to a poly_int64.
31640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31641 Alan Hayward <alan.hayward@arm.com>
31642 David Sherwood <david.sherwood@arm.com>
31644 * calls.c (load_register_parameters): Cope with polynomial
31645 mode sizes. Require a constant size for BLKmode parameters
31646 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
31647 forces a parameter to be padded at the lsb end in order to
31648 fill a complete number of words, require the parameter size
31649 to be ordered wrt UNITS_PER_WORD.
31651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31652 Alan Hayward <alan.hayward@arm.com>
31653 David Sherwood <david.sherwood@arm.com>
31655 * reload1.c (spill_stack_slot_width): Change element type
31656 from unsigned int to poly_uint64_pod.
31657 (alter_reg): Treat mode sizes as polynomial.
31659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31660 Alan Hayward <alan.hayward@arm.com>
31661 David Sherwood <david.sherwood@arm.com>
31663 * reload.c (complex_word_subreg_p): New function.
31664 (reload_inner_reg_of_subreg, push_reload): Use it.
31666 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31667 Alan Hayward <alan.hayward@arm.com>
31668 David Sherwood <david.sherwood@arm.com>
31670 * lra-constraints.c (process_alt_operands): Reject matched
31671 operands whose sizes aren't ordered.
31672 (match_reload): Refer to this check here.
31674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31675 Alan Hayward <alan.hayward@arm.com>
31676 David Sherwood <david.sherwood@arm.com>
31678 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31679 that the mode size is in the set {1, 2, 4, 8, 16}.
31681 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31682 Alan Hayward <alan.hayward@arm.com>
31683 David Sherwood <david.sherwood@arm.com>
31685 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31686 Use plus_constant instead of gen_rtx_PLUS.
31688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31689 Alan Hayward <alan.hayward@arm.com>
31690 David Sherwood <david.sherwood@arm.com>
31692 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31693 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31694 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31695 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31696 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31697 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31698 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31699 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31700 * config/i386/i386.c (ix86_push_rounding): ...this new function.
31701 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31703 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31704 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31705 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31706 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31707 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31708 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31709 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31710 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31711 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31712 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31714 * expr.c (emit_move_resolve_push): Treat the input and result
31715 of PUSH_ROUNDING as a poly_int64.
31716 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31717 (emit_push_insn): Likewise.
31718 * lra-eliminations.c (mark_not_eliminable): Likewise.
31719 * recog.c (push_operand): Likewise.
31720 * reload1.c (elimination_effects): Likewise.
31721 * rtlanal.c (nonzero_bits1): Likewise.
31722 * calls.c (store_one_arg): Likewise. Require the padding to be
31723 known at compile time.
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 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31730 Use plus_constant instead of gen_rtx_PLUS.
31732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31733 Alan Hayward <alan.hayward@arm.com>
31734 David Sherwood <david.sherwood@arm.com>
31736 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31737 rather than an int.
31739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31740 Alan Hayward <alan.hayward@arm.com>
31741 David Sherwood <david.sherwood@arm.com>
31743 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31744 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31745 via stack temporaries. Treat the mode size as polynomial too.
31747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31748 Alan Hayward <alan.hayward@arm.com>
31749 David Sherwood <david.sherwood@arm.com>
31751 * expr.c (expand_expr_real_2): When handling conversions involving
31752 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31753 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
31754 as a poly_uint64 too.
31756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31757 Alan Hayward <alan.hayward@arm.com>
31758 David Sherwood <david.sherwood@arm.com>
31760 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
31767 REGMODE_NATURAL_SIZE.
31768 * expmed.c (store_bit_field_1): Likewise.
31769 * expr.c (store_constructor): Likewise.
31770 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31771 and polynomial REGMODE_NATURAL_SIZE.
31772 (gen_lowpart_common): Likewise.
31773 * reginfo.c (record_subregs_of_mode): Likewise.
31774 * rtlanal.c (read_modify_subreg_p): Likewise.
31776 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31777 Alan Hayward <alan.hayward@arm.com>
31778 David Sherwood <david.sherwood@arm.com>
31780 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31781 numbers of elements.
31783 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31784 Alan Hayward <alan.hayward@arm.com>
31785 David Sherwood <david.sherwood@arm.com>
31787 * match.pd: Cope with polynomial numbers of vector elements.
31789 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31790 Alan Hayward <alan.hayward@arm.com>
31791 David Sherwood <david.sherwood@arm.com>
31793 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31794 in a POINTER_PLUS_EXPR.
31796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31797 Alan Hayward <alan.hayward@arm.com>
31798 David Sherwood <david.sherwood@arm.com>
31800 * omp-simd-clone.c (simd_clone_subparts): New function.
31801 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31802 (ipa_simd_modify_function_body): Likewise.
31804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31805 Alan Hayward <alan.hayward@arm.com>
31806 David Sherwood <david.sherwood@arm.com>
31808 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31809 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31810 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31811 (expand_vector_condition, vector_element): Likewise.
31812 (subparts_gt): New function.
31813 (get_compute_type): Use subparts_gt.
31814 (count_type_subparts): Delete.
31815 (expand_vector_operations_1): Use subparts_gt instead of
31816 count_type_subparts.
31818 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31819 Alan Hayward <alan.hayward@arm.com>
31820 David Sherwood <david.sherwood@arm.com>
31822 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31823 (vect_compile_time_alias): ...this new function. Do the calculation
31824 on poly_ints rather than trees.
31825 (vect_prune_runtime_alias_test_list): Update call accordingly.
31827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31828 Alan Hayward <alan.hayward@arm.com>
31829 David Sherwood <david.sherwood@arm.com>
31831 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31833 (vect_schedule_slp_instance): Likewise.
31835 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31836 Alan Hayward <alan.hayward@arm.com>
31837 David Sherwood <david.sherwood@arm.com>
31839 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31840 constant and extern definitions for variable-length vectors.
31841 (vect_get_constant_vectors): Note that the number of units
31842 is known to be constant.
31844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31845 Alan Hayward <alan.hayward@arm.com>
31846 David Sherwood <david.sherwood@arm.com>
31848 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31849 of units as polynomial. Choose between WIDE and NARROW based
31852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31853 Alan Hayward <alan.hayward@arm.com>
31854 David Sherwood <david.sherwood@arm.com>
31856 * tree-vect-stmts.c (simd_clone_subparts): New function.
31857 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31859 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31860 Alan Hayward <alan.hayward@arm.com>
31861 David Sherwood <david.sherwood@arm.com>
31863 * tree-vect-stmts.c (vectorizable_call): Treat the number of
31864 vectors as polynomial. Use build_index_vector for
31865 IFN_GOMP_SIMD_LANE.
31867 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31868 Alan Hayward <alan.hayward@arm.com>
31869 David Sherwood <david.sherwood@arm.com>
31871 * tree-vect-stmts.c (get_load_store_type): Treat the number of
31872 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31873 for variable-length vectors.
31874 (vectorizable_mask_load_store): Treat the number of units as
31875 polynomial, asserting that it is constant if the condition has
31876 already been enforced.
31877 (vectorizable_store, vectorizable_load): Likewise.
31879 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31880 Alan Hayward <alan.hayward@arm.com>
31881 David Sherwood <david.sherwood@arm.com>
31883 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31884 of units as polynomial. Punt if we can't tell at compile time
31885 which vector contains the final result.
31887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31888 Alan Hayward <alan.hayward@arm.com>
31889 David Sherwood <david.sherwood@arm.com>
31891 * tree-vect-loop.c (vectorizable_induction): Treat the number
31892 of units as polynomial. Punt on SLP inductions. Use an integer
31893 VEC_SERIES_EXPR for variable-length integer reductions. Use a
31894 cast of such a series for variable-length floating-point
31897 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31898 Alan Hayward <alan.hayward@arm.com>
31899 David Sherwood <david.sherwood@arm.com>
31901 * tree.h (build_index_vector): Declare.
31902 * tree.c (build_index_vector): New function.
31903 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31904 of units as polynomial, forcibly converting it to a constant if
31905 vectorizable_reduction has already enforced the condition.
31906 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
31907 to create a {1,2,3,...} vector.
31908 (vectorizable_reduction): Treat the number of units as polynomial.
31909 Choose vectype_in based on the largest scalar element size rather
31910 than the smallest number of units. Enforce the restrictions
31913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31914 Alan Hayward <alan.hayward@arm.com>
31915 David Sherwood <david.sherwood@arm.com>
31917 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31918 number of units as polynomial.
31920 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31921 Alan Hayward <alan.hayward@arm.com>
31922 David Sherwood <david.sherwood@arm.com>
31924 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31925 * target.def (autovectorize_vector_sizes): Return the vector sizes
31926 by pointer, using vector_sizes rather than a bitmask.
31927 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31928 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31929 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31931 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31932 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31933 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31934 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31935 * omp-general.c (omp_max_vf): Likewise.
31936 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31937 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31938 * tree-vect-loop.c (vect_analyze_loop): Likewise.
31939 * tree-vect-slp.c (vect_slp_bb): Likewise.
31940 * doc/tm.texi: Regenerate.
31941 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31943 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31944 the vector size as a poly_uint64 rather than an unsigned int.
31945 (current_vector_size): Change from an unsigned int to a poly_uint64.
31946 (get_vectype_for_scalar_type): Update accordingly.
31947 * tree.h (build_truth_vector_type): Take the size and number of
31948 units as a poly_uint64 rather than an unsigned int.
31949 (build_vector_type): Add a temporary overload that takes
31950 the number of units as a poly_uint64 rather than an unsigned int.
31951 * tree.c (make_vector_type): Likewise.
31952 (build_truth_vector_type): Take the number of units as a poly_uint64
31953 rather than an unsigned int.
31955 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31956 Alan Hayward <alan.hayward@arm.com>
31957 David Sherwood <david.sherwood@arm.com>
31959 * target.def (get_mask_mode): Take the number of units and length
31960 as poly_uint64s rather than unsigned ints.
31961 * targhooks.h (default_get_mask_mode): Update accordingly.
31962 * targhooks.c (default_get_mask_mode): Likewise.
31963 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31964 * doc/tm.texi: Regenerate.
31966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31967 Alan Hayward <alan.hayward@arm.com>
31968 David Sherwood <david.sherwood@arm.com>
31970 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31971 * omp-general.c (omp_max_vf): Likewise.
31972 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31973 (expand_omp_simd): Handle polynomial safelen.
31974 * omp-low.c (omplow_simd_context): Add a default constructor.
31975 (omplow_simd_context::max_vf): Change from int to poly_uint64.
31976 (lower_rec_simd_input_clauses): Update accordingly.
31977 (lower_rec_input_clauses): Likewise.
31979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31980 Alan Hayward <alan.hayward@arm.com>
31981 David Sherwood <david.sherwood@arm.com>
31983 * tree-vectorizer.h (vect_nunits_for_cost): New function.
31984 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31985 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31986 (vect_analyze_slp_cost): Likewise.
31987 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31988 (vect_model_load_cost): Likewise.
31990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31991 Alan Hayward <alan.hayward@arm.com>
31992 David Sherwood <david.sherwood@arm.com>
31994 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31995 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31996 from an unsigned int * to a poly_uint64_pod *.
31997 (calculate_unrolling_factor): New function.
31998 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
32000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32001 Alan Hayward <alan.hayward@arm.com>
32002 David Sherwood <david.sherwood@arm.com>
32004 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
32005 from an unsigned int to a poly_uint64.
32006 (_loop_vec_info::slp_unrolling_factor): Likewise.
32007 (_loop_vec_info::vectorization_factor): Change from an int
32009 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
32010 (vect_get_num_vectors): New function.
32011 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
32012 (vect_get_num_copies): Use vect_get_num_vectors.
32013 (vect_analyze_data_ref_dependences): Change max_vf from an int *
32014 to an unsigned int *.
32015 (vect_analyze_data_refs): Change min_vf from an int * to a
32017 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32018 than an unsigned HOST_WIDE_INT.
32019 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
32020 (vect_analyze_data_ref_dependence): Change max_vf from an int *
32021 to an unsigned int *.
32022 (vect_analyze_data_ref_dependences): Likewise.
32023 (vect_compute_data_ref_alignment): Handle polynomial vf.
32024 (vect_enhance_data_refs_alignment): Likewise.
32025 (vect_prune_runtime_alias_test_list): Likewise.
32026 (vect_shift_permute_load_chain): Likewise.
32027 (vect_supportable_dr_alignment): Likewise.
32028 (dependence_distance_ge_vf): Take the vectorization factor as a
32029 poly_uint64 rather than an unsigned HOST_WIDE_INT.
32030 (vect_analyze_data_refs): Change min_vf from an int * to a
32032 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
32033 vfm1 as a poly_uint64 rather than an int. Make the same change
32034 for the returned bound_scalar.
32035 (vect_gen_vector_loop_niters): Handle polynomial vf.
32036 (vect_do_peeling): Likewise. Update call to
32037 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
32038 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
32040 * tree-vect-loop.c (vect_determine_vectorization_factor)
32041 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
32042 (vect_get_known_peeling_cost): Likewise.
32043 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
32044 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
32045 (vect_transform_loop): Likewise. Use the lowest possible VF when
32046 updating the upper bounds of the loop.
32047 (vect_min_worthwhile_factor): Make static. Return an unsigned int
32048 rather than an int.
32049 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
32050 polynomial unroll factors.
32051 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
32052 (vect_make_slp_decision): Likewise.
32053 (vect_supported_load_permutation_p): Likewise, and polynomial
32055 (vect_analyze_slp_cost): Handle polynomial vf.
32056 (vect_slp_analyze_node_operations): Likewise.
32057 (vect_slp_analyze_bb_1): Likewise.
32058 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32059 than an unsigned HOST_WIDE_INT.
32060 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
32061 (vectorizable_load): Handle polynomial vf.
32062 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
32064 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
32066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32067 Alan Hayward <alan.hayward@arm.com>
32068 David Sherwood <david.sherwood@arm.com>
32070 * match.pd: Handle bit operations involving three constants
32071 and try to fold one pair.
32073 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32075 * tree-vect-loop-manip.c: Include gimple-fold.h.
32076 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
32077 niters_maybe_zero parameters. Handle other cases besides a step of 1.
32078 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
32079 Add a path that uses a step of VF instead of 1, but disable it
32081 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
32082 and niters_no_overflow parameters. Update calls to
32083 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
32084 Create a new SSA name if the latter choses to use a ste other
32085 than zero, and return it via niters_vector_mult_vf_var.
32086 * tree-vect-loop.c (vect_transform_loop): Update calls to
32087 vect_do_peeling, vect_gen_vector_loop_niters and
32088 slpeel_make_loop_iterate_ntimes.
32089 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
32090 (vect_gen_vector_loop_niters): Update declarations after above changes.
32092 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
32094 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
32095 128-bit round to integer instructions.
32096 (ceil<mode>2): Likewise.
32097 (btrunc<mode>2): Likewise.
32098 (round<mode>2): Likewise.
32100 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32102 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
32103 unaligned VSX load/store on P8/P9.
32104 (expand_block_clear): Allow the use of unaligned VSX
32105 load/store on P8/P9.
32107 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32109 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
32111 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
32112 swap associated with both a load and a store.
32114 2018-01-02 Andrew Waterman <andrew@sifive.com>
32116 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
32117 * config/riscv/riscv.md (clear_cache): Use it.
32119 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
32121 * web.c: Remove out-of-date comment.
32123 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32125 * expr.c (fixup_args_size_notes): Check that any existing
32126 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32127 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32128 (emit_single_push_insn): ...here.
32130 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32132 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32133 (const_vector_encoded_nelts): New function.
32134 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
32135 (const_vector_int_elt, const_vector_elt): Declare.
32136 * emit-rtl.c (const_vector_int_elt_1): New function.
32137 (const_vector_elt): Likewise.
32138 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
32139 of CONST_VECTOR_ELT.
32141 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32143 * expr.c: Include rtx-vector-builder.h.
32144 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
32145 directly on the tree encoding.
32146 (const_vector_from_tree): Likewise.
32147 * optabs.c: Include rtx-vector-builder.h.
32148 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
32149 sequence of "u" values.
32150 * vec-perm-indices.c: Include rtx-vector-builder.h.
32151 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
32152 directly on the vec_perm_indices encoding.
32154 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32156 * doc/rtl.texi (const_vector): Describe new encoding scheme.
32157 * Makefile.in (OBJS): Add rtx-vector-builder.o.
32158 * rtx-vector-builder.h: New file.
32159 * rtx-vector-builder.c: Likewise.
32160 * rtl.h (rtx_def::u2): Add a const_vector field.
32161 (CONST_VECTOR_NPATTERNS): New macro.
32162 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
32163 (CONST_VECTOR_DUPLICATE_P): Likewise.
32164 (CONST_VECTOR_STEPPED_P): Likewise.
32165 (CONST_VECTOR_ENCODED_ELT): Likewise.
32166 (const_vec_duplicate_p): Check for a duplicated vector encoding.
32167 (unwrap_const_vec_duplicate): Likewise.
32168 (const_vec_series_p): Check for a non-duplicated vector encoding.
32169 Say that the function only returns true for integer vectors.
32170 * emit-rtl.c: Include rtx-vector-builder.h.
32171 (gen_const_vec_duplicate_1): Delete.
32172 (gen_const_vector): Call gen_const_vec_duplicate instead of
32173 gen_const_vec_duplicate_1.
32174 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32175 (gen_const_vec_duplicate): Use rtx_vector_builder.
32176 (gen_const_vec_series): Likewise.
32177 (gen_rtx_CONST_VECTOR): Likewise.
32178 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32179 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32180 Build a new vector rather than modifying a CONST_VECTOR in-place.
32181 (handle_special_swappables): Update call accordingly.
32182 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32183 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32184 Build a new vector rather than modifying a CONST_VECTOR in-place.
32185 (handle_special_swappables): Update call accordingly.
32187 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32189 * simplify-rtx.c (simplify_const_binary_operation): Use
32190 CONST_VECTOR_ELT instead of XVECEXP.
32192 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32194 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32195 the selector elements to be different from the data elements
32196 if the selector is a VECTOR_CST.
32197 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32198 ssizetype for the selector.
32200 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32202 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32203 before testing each element individually.
32204 * tree-vect-generic.c (lower_vec_perm): Likewise.
32206 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32208 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32209 * selftest-run-tests.c (selftest::run_tests): Call it.
32210 * vector-builder.h (vector_builder::operator ==): New function.
32211 (vector_builder::operator !=): Likewise.
32212 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32213 (vec_perm_indices::all_from_input_p): New function.
32214 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32215 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32216 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32217 instead of reading the VECTOR_CST directly. Detect whether both
32218 vector inputs are the same before constructing the vec_perm_indices,
32219 and update the number of inputs argument accordingly. Use the
32220 utility functions added above. Only construct sel2 if we need to.
32222 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32224 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32225 the broadcast of the low byte.
32226 (expand_mult_highpart): Use an explicit encoding for the permutes.
32227 * optabs-query.c (can_mult_highpart_p): Likewise.
32228 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32229 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32230 (vectorizable_bswap): Likewise.
32231 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32232 explicit encoding for the power-of-2 permutes.
32233 (vect_permute_store_chain): Likewise.
32234 (vect_grouped_load_supported): Likewise.
32235 (vect_permute_load_chain): Likewise.
32237 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32239 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32240 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32241 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32242 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32243 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32244 (vect_gen_perm_mask_any): Likewise.
32246 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32248 * int-vector-builder.h: New file.
32249 * vec-perm-indices.h: Include int-vector-builder.h.
32250 (vec_perm_indices): Redefine as an int_vector_builder.
32251 (auto_vec_perm_indices): Delete.
32252 (vec_perm_builder): Redefine as a stand-alone class.
32253 (vec_perm_indices::vec_perm_indices): New function.
32254 (vec_perm_indices::clamp): Likewise.
32255 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32256 (vec_perm_indices::new_vector): New function.
32257 (vec_perm_indices::new_expanded_vector): Update for new
32258 vec_perm_indices class.
32259 (vec_perm_indices::rotate_inputs): New function.
32260 (vec_perm_indices::all_in_range_p): Operate directly on the
32261 encoded form, without computing elided elements.
32262 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32263 encoding. Update for new vec_perm_indices class.
32264 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32265 the given vec_perm_builder.
32266 (expand_vec_perm_var): Update vec_perm_builder constructor.
32267 (expand_mult_highpart): Use vec_perm_builder instead of
32268 auto_vec_perm_indices.
32269 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32270 vec_perm_indices instead of auto_vec_perm_indices. Use a single
32271 or double series encoding as appropriate.
32272 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32273 vec_perm_indices instead of auto_vec_perm_indices.
32274 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32275 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32276 (vect_permute_store_chain): Likewise.
32277 (vect_grouped_load_supported): Likewise.
32278 (vect_permute_load_chain): Likewise.
32279 (vect_shift_permute_load_chain): Likewise.
32280 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32281 (vect_transform_slp_perm_load): Likewise.
32282 (vect_schedule_slp_instance): Likewise.
32283 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32284 (vectorizable_mask_load_store): Likewise.
32285 (vectorizable_bswap): Likewise.
32286 (vectorizable_store): Likewise.
32287 (vectorizable_load): Likewise.
32288 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32289 vec_perm_indices instead of auto_vec_perm_indices. Use
32290 tree_to_vec_perm_builder to read the vector from a tree.
32291 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32292 vec_perm_builder instead of a vec_perm_indices.
32293 (have_whole_vector_shift): Use vec_perm_builder and
32294 vec_perm_indices instead of auto_vec_perm_indices. Leave the
32295 truncation to calc_vec_perm_mask_for_shift.
32296 (vect_create_epilog_for_reduction): Likewise.
32297 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32298 from auto_vec_perm_indices to vec_perm_indices.
32299 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32300 instead of changing individual elements.
32301 (aarch64_vectorize_vec_perm_const): Use new_vector to install
32302 the vector in d.perm.
32303 * config/arm/arm.c (expand_vec_perm_d::perm): Change
32304 from auto_vec_perm_indices to vec_perm_indices.
32305 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32306 instead of changing individual elements.
32307 (arm_vectorize_vec_perm_const): Use new_vector to install
32308 the vector in d.perm.
32309 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32310 Update vec_perm_builder constructor.
32311 (rs6000_expand_interleave): Likewise.
32312 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32313 (rs6000_expand_interleave): Likewise.
32315 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32317 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32318 to qimode could truncate the indices.
32319 * optabs.c (expand_vec_perm_var): Likewise.
32321 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32323 * Makefile.in (OBJS): Add vec-perm-indices.o.
32324 * vec-perm-indices.h: New file.
32325 * vec-perm-indices.c: Likewise.
32326 * target.h (vec_perm_indices): Replace with a forward class
32328 (auto_vec_perm_indices): Move to vec-perm-indices.h.
32329 * optabs.h: Include vec-perm-indices.h.
32330 (expand_vec_perm): Delete.
32331 (selector_fits_mode_p, expand_vec_perm_var): Declare.
32332 (expand_vec_perm_const): Declare.
32333 * target.def (vec_perm_const_ok): Replace with...
32334 (vec_perm_const): ...this new hook.
32335 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32336 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32337 * doc/tm.texi: Regenerate.
32338 * optabs.def (vec_perm_const): Delete.
32339 * doc/md.texi (vec_perm_const): Likewise.
32340 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32341 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32342 expand_vec_perm for constant permutation vectors. Assert that
32343 the mode of variable permutation vectors is the integer equivalent
32344 of the mode that is being permuted.
32345 * optabs-query.h (selector_fits_mode_p): Declare.
32346 * optabs-query.c: Include vec-perm-indices.h.
32347 (selector_fits_mode_p): New function.
32348 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32349 is defined, instead of checking whether the vec_perm_const_optab
32350 exists. Use targetm.vectorize.vec_perm_const instead of
32351 targetm.vectorize.vec_perm_const_ok. Check whether the indices
32352 fit in the vector mode before using a variable permute.
32353 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32354 vec_perm_indices instead of an rtx.
32355 (expand_vec_perm): Replace with...
32356 (expand_vec_perm_const): ...this new function. Take the selector
32357 as a vec_perm_indices rather than an rtx. Also take the mode of
32358 the selector. Update call to shift_amt_for_vec_perm_mask.
32359 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32360 Use vec_perm_indices::new_expanded_vector to expand the original
32361 selector into bytes. Check whether the indices fit in the vector
32362 mode before using a variable permute.
32363 (expand_vec_perm_var): Make global.
32364 (expand_mult_highpart): Use expand_vec_perm_const.
32365 * fold-const.c: Includes vec-perm-indices.h.
32366 * tree-ssa-forwprop.c: Likewise.
32367 * tree-vect-data-refs.c: Likewise.
32368 * tree-vect-generic.c: Likewise.
32369 * tree-vect-loop.c: Likewise.
32370 * tree-vect-slp.c: Likewise.
32371 * tree-vect-stmts.c: Likewise.
32372 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32374 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32375 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32376 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32377 (aarch64_vectorize_vec_perm_const): ...this new function.
32378 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32379 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32380 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32381 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32382 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32383 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32384 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32386 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
32387 check for NEON modes.
32388 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32389 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32390 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32391 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32393 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
32394 the old VEC_PERM_CONST conditions.
32395 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32396 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32397 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32398 (ia64_vectorize_vec_perm_const_ok): Merge into...
32399 (ia64_vectorize_vec_perm_const): ...this new function.
32400 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32401 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32402 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32403 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32404 * config/mips/mips.c (mips_expand_vec_perm_const)
32405 (mips_vectorize_vec_perm_const_ok): Merge into...
32406 (mips_vectorize_vec_perm_const): ...this new function.
32407 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32408 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32409 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32410 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32411 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32412 (rs6000_expand_vec_perm_const): Delete.
32413 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32415 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32416 (altivec_expand_vec_perm_const_le): Take each operand individually.
32417 Operate on constant selectors rather than rtxes.
32418 (altivec_expand_vec_perm_const): Likewise. Update call to
32419 altivec_expand_vec_perm_const_le.
32420 (rs6000_expand_vec_perm_const): Delete.
32421 (rs6000_vectorize_vec_perm_const_ok): Delete.
32422 (rs6000_vectorize_vec_perm_const): New function.
32423 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32424 an element count and rtx array.
32425 (rs6000_expand_extract_even): Update call accordingly.
32426 (rs6000_expand_interleave): Likewise.
32427 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32428 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32429 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32430 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32431 (rs6000_expand_vec_perm_const): Delete.
32432 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32433 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32434 (altivec_expand_vec_perm_const_le): Take each operand individually.
32435 Operate on constant selectors rather than rtxes.
32436 (altivec_expand_vec_perm_const): Likewise. Update call to
32437 altivec_expand_vec_perm_const_le.
32438 (rs6000_expand_vec_perm_const): Delete.
32439 (rs6000_vectorize_vec_perm_const_ok): Delete.
32440 (rs6000_vectorize_vec_perm_const): New function. Remove stray
32441 reference to the SPE evmerge intructions.
32442 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32443 an element count and rtx array.
32444 (rs6000_expand_extract_even): Update call accordingly.
32445 (rs6000_expand_interleave): Likewise.
32446 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32447 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32449 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32451 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32453 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32454 vector mode and that that mode matches the mode of the data
32456 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32457 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
32458 directly using expand_vec_perm_1 when forcing selectors into
32460 (expand_vec_perm_var): New function, split out from expand_vec_perm.
32462 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32464 * optabs-query.h (can_vec_perm_p): Delete.
32465 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32466 * optabs-query.c (can_vec_perm_p): Split into...
32467 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32468 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32469 particular selector is valid.
32470 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32471 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32472 (vect_grouped_load_supported): Likewise.
32473 (vect_shift_permute_load_chain): Likewise.
32474 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32475 (vect_transform_slp_perm_load): Likewise.
32476 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32477 (vectorizable_bswap): Likewise.
32478 (vect_gen_perm_mask_checked): Likewise.
32479 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32480 implementations of variable permutation vectors into account
32481 when deciding which selector to use.
32482 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32483 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32484 with a false third argument.
32485 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32486 to test whether the constant selector is valid and can_vec_perm_var_p
32487 to test whether a variable selector is valid.
32489 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32491 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32492 * optabs-query.c (can_vec_perm_p): Likewise.
32493 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32494 instead of vec_perm_indices.
32495 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32496 (vect_gen_perm_mask_checked): Likewise,
32497 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32498 (vect_gen_perm_mask_checked): Likewise,
32500 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32502 * optabs-query.h (qimode_for_vec_perm): Declare.
32503 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32504 (qimode_for_vec_perm): ...this new function.
32505 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32507 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32509 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32510 does not have a conditional at the top.
32512 2018-01-02 Richard Biener <rguenther@suse.de>
32514 * ipa-inline.c (big_speedup_p): Fix expression.
32516 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32519 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32522 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32526 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32527 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32528 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32529 cond_taken_branch_cost 3->4.
32531 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32533 PR tree-optimization/83581
32534 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32535 TODO_cleanup_cfg if any changes have been made.
32537 PR middle-end/83608
32538 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32539 convert_modes if target mode has the right side, but different mode
32542 PR middle-end/83609
32543 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32544 last argument when extracting from CONCAT. If either from_real or
32545 from_imag is NULL, use expansion through memory. If result is not
32546 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32547 the parts directly to inner mode, if even that fails, use expansion
32550 PR middle-end/83623
32551 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32552 check for bswap in mode rather than HImode and use that in expand_unop
32555 Copyright (C) 2018 Free Software Foundation, Inc.
32557 Copying and distribution of this file, with or without modification,
32558 are permitted in any medium without royalty provided the copyright
32559 notice and this notice are preserved.