1 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
4 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
5 -fno-implicit-templates.
7 2018-11-17 Jakub Jelinek <jakub@redhat.com>
9 PR tree-optimization/87546
10 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
11 min_precision variable, initially set it to orig_precision, only does
12 something if op_type's precision is <= min_precision and update
13 min_precision whenever calling set_op.
15 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
18 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
20 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
22 * doc/invoke.texi (Option Summary): Fix whitespace and line
23 breaks in @gccoptlist environments.
24 (Warning Options): Likewise.
25 (Optimize Options): Likewise.
26 (PowerPC SPE Options): Likewise.
27 (RS/6000 and PowerPC Options): Likewise.
29 2018-11-16 Jeff Law <law@redhat.com>
31 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
34 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
37 * doc/invoke.texi (Optimize Options): Update options enabled by
38 fprofile-generate, -fprofile-use, and -fauto-profile.
40 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
43 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
44 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
45 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
47 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
48 * targhooks.c (default_print_patchable_function_entry): Assert
49 asm_int_op does not return a NULL string.
50 * varasm.c (integer_asm_op): Return the op for a partial int type
51 when the requested size does not correspond to an integer type.
52 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
53 * doc/tm.texi: Regenerate.
55 2018-11-12 Jason Merrill <jason@redhat.com>
57 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
59 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
61 * config/rs6000/constraints.md (wF constraint): Remove power9
62 fusion documentation. Just document wF's use for power8 fusion.
63 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
64 (fusion_gpr_addis): Delete power9 fusion support. Change power8
65 fusion support to require the upper 12 bits to be all 0's or all
67 (fusion_gpr_mem_load): Add comment.
68 (fusion_addis_mem_combo_load): Remove power9 fusion support.
69 (fusion_addis_mem_combo_store): Delete.
70 (fusion_offsettable_mem_operand): Delete.
71 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
73 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
74 (POWERPC_MASKS): Delete power9 fusion.
75 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
76 (fusion_p9_p): Delete.
77 (expand_fusion_p9_load): Delete.
78 (expand_fusion_p9_store): Delete.
79 (emit_fusion_p9_load): Delete.
80 (emit_fusion_p9_store): Delete.
81 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
83 (rs6000_option_override_internal): Set power8 fusion based on
84 whether we are tuning for power8. Delete power9 fusion support.
85 (rs6000_opt_masks): Delete -mpower9-fusion switch.
86 (emit_fusion_load): Rename emit_fusion_load_store to
87 emit_fusion_load, and drop fusion store support. Update callers.
88 (emit_fusion_load_store): Likewise.
89 (emit_fusion_gpr_load): Likewise.
90 (fusion_p9_p): Delete.
91 (expand_fusion_p9_load): Delete.
92 (expand_fusion_p9_store): Delete.
93 (emit_fusion_p9_load): Delete.
94 (emit_fusion_p9_store): Delete.
95 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
98 (power9 fusion peephole2s): Delete.
99 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
100 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
101 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
102 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
103 (fusion_p9_<mode>_constant): Delete.
104 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
105 power9 fusion switch.
106 * doc/md.texi (PowerPC constraints): Update wF constraint
107 documentation for power8 fusion only.
109 2018-11-16 Jakub Jelinek <jakub@redhat.com>
111 PR rtl-optimization/87475
112 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
113 CROSSING_JUMP_P insns.
114 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
116 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
119 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
120 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
121 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
123 2018-11-16 Jakub Jelinek <jakub@redhat.com>
126 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
127 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
129 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
131 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
132 location_t parameter.
133 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
134 (switch_decision_tree::do_jump_if_equal): Likewise.
135 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
136 of switch statement to emit_case_nodes.
137 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
138 set it on the newly built GIMPLE comparison statement.
139 (switch_decision_tree::do_jump_if_equal): Likewise.
140 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
141 in calls to do_jump_if_equal as well as recursive calls.
143 2018-11-16 Andi Kleen <ak@linux.intel.com>
145 * config/i386/i386.md: Allow memory operands to ptwrite.
147 2018-11-16 Michael Matz <matz@suse.de>
149 * system.h (PRsa): New macro.
150 (SIZE_AMOUNT): Cast number to uint64_t.
151 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
152 (pool_usage::dump_footer): Likewise and also use PRIu64.
153 * bitmap.h (bitmap_usage::dump): Likewise.
154 * ggc-common.c (ggc_usage::dump): Likewise.
155 * ggc-page.c (ggc_print_statistics): Likewise.
156 * input.c (dump_line_table_statistics): Likewise.
157 * mem-stats.h (mem_usage::dump): Likewise.
158 (mem_usage::dump_footer): Likewise.
159 * rtl.c (dump_rtx_statistics): Likewise.
160 * tree-cfg.c (dump_cfg_stats): Likewise.
161 * tree-dfa.c (dump_dfa_stats): Likewise.
162 * tree-phinodes.c (phinodes_print_statistics): Likewise.
163 * tree-ssanames (ssanames_print_statistics): Likewise.
164 * vec.c (vec_usage::dump): Likewise.
165 (vec_usage::dump_footer): Likewise.
167 2018-11-16 Richard Biener <rguenther@suse.de>
169 PR tree-optimization/88011
170 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
171 replacing set_value_range_to_undefined and
172 set_value_range_to_varying with method calls.
174 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
176 * config/s390/s390.md
177 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
179 (*r<noxa>sbg_<mode>_sll): Likewise.
180 (*r<noxa>sbg_<mode>_srl): Likewise.
181 (*r<noxa>sbg_sidi_srl): New pattern.
183 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
185 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
186 Default to TARGET_VXWORKS_RTP.
187 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
188 of TARGET_VXWORKS_RTP.
189 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
190 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
191 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
193 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
196 * doc/extend.texi (Common Type Attributes): Make it explicit
197 that attribute "packed" can apply to C++ classes.
199 2018-11-15 Martin Sebor <msebor@redhat.com>
203 * tree.c (type_argument_type): New function.
204 * tree.h (type_argument_type): Declare it.
205 * gcc/doc/extend.texi (alloc_align): Update and clarify.
206 (alloc_size, nonnull, sentinel): Same.
208 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
209 Kwok Cheung Yeung <kcy@codesourcery.com>
211 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
212 int_mode_for_size fails.
213 (vectorizable_load): Likewise.
215 2018-11-15 David Malcolm <dmalcolm@redhat.com>
217 * doc/ux.texi (Group logically-related diagnostics): Move
218 discussion of auto_diagnostic_group into this new subsection.
219 Give an example of where this grouping is used.
221 2018-11-15 David Malcolm <dmalcolm@redhat.com>
224 * Makefile.in (OBJS): Move json.o to...
225 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
226 * common.opt (fdiagnostics-format=): New option.
227 (diagnostics_output_format): New enum.
228 * diagnostic-format-json.cc: New file.
229 * diagnostic.c (default_diagnostic_final_cb): New function, taken
230 from start of diagnostic_finish.
231 (diagnostic_initialize): Initialize final_cb to
232 default_diagnostic_final_cb.
233 (diagnostic_finish): Move "being treated as errors" messages to
234 default_diagnostic_final_cb. Call any final_cb.
235 (default_diagnostic_finalizer): Add diagnostic_t param.
236 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
237 diagnostic_finalizer callback.
238 * diagnostic.h (enum diagnostics_output_format): New enum.
239 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
240 (struct diagnostic_context): Add "final_cb".
241 (default_diagnostic_finalizer): Add diagnostic_t param.
242 (diagnostic_output_format_init): New decl.
243 * doc/invoke.texi (-fdiagnostics-format): New option.
244 * dwarf2out.c (gen_producer_string): Ignore
245 OPT_fdiagnostics_format_.
246 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
247 * lto-wrapper.c (append_diag_options): Ignore it.
248 * opts.c (common_handle_option): Handle it.
250 2018-11-15 David Malcolm <dmalcolm@redhat.com>
252 PR tree-optimization/88015
253 * graphite-isl-ast-to-gimple.c
254 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
256 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
258 2018-11-15 Richard Biener <rguenther@suse.de>
261 * gimple.c (gimple_call_flags): Union flags from decl, type
263 * trans-mem.c (is_tm_pure_call): Simplify.
265 2018-11-15 Richard Biener <rguenther@suse.de>
267 PR tree-optimization/88031
268 * tree-vect-loop.c (vectorizable_reduction): Move check
269 for multiple types earlier so we get the expected dump.
270 Simplify calls to vectorizable_condition.
271 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
272 * tree-vect-stmts.c (vectorizable_condition): Instead of
273 reduc_def and reduc_index take just a flag. Simplify
274 code-generation now that we can rely on the defs being set up.
275 (vectorizable_comparison): Remove unused argument.
277 2018-11-15 Richard Biener <rguenther@suse.de>
279 PR tree-optimization/88030
280 * tree-complex.c (need_eh_cleanup): New global.
281 (update_complex_assignment): Mark blocks that need EH update.
282 (expand_complex_comparison): Likewise.
283 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
284 perform EH cleanup and schedule CFG cleanup if that did anything.
286 2018-11-15 Jakub Jelinek <jakub@redhat.com>
288 PR rtl-optimization/88018
289 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
290 on the presence of fallthru edge, rather than if it is a USE or not.
292 2018-11-15 Richard Biener <rguenther@suse.de>
295 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
296 analyze_subscript_affine_affine properly.
298 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
300 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
301 (GLIBC_DYNAMIC_LINKER): Define.
302 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
304 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
306 PR tree-optimization/84648
307 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
308 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
309 by calling adjust_cond_for_loop_until_wrap.
311 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
314 * doc/extend.texi (Common Function Attributes): Clarify linker
315 restrictions on "aligned" attribute.
316 (Common Variable Attributes): Likewise. Mention that linker
317 restrictions don't apply to stack-allocated variables.
319 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
321 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
324 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
328 * doc/invoke.texi (Optimize Options): Remove bad example about
329 interaction between -flto and -O. Replace it with a note that
330 you need to compile with -O and not just link. Copy-edit -flto
331 discussion to reduce verbiage and improve flow.
333 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
336 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
337 also suppress many optimizations. Alphabetize option lists for
338 -O1, -O2, and -Os. Add list of options disabled with -Og, and
339 correct documentation for those options to say that.
340 * opts.c (default_options_table): Sort table by level and option
341 name, to make it easier to correlate to the manual.
343 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
345 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
346 printing of the names of segment registers.
348 2018-11-14 Nathan Sidwell <nathan@acm.org>
352 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
355 2018-11-14 David Malcolm <dmalcolm@redhat.com>
357 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
359 2018-11-14 Jakub Jelinek <jakub@redhat.com>
361 P1236R1 - Signed integers are two's complement
362 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
365 * hash-map.h (hash_map::iterator::reference_pair): New class.
366 (hash_map::iterator::operator*): Return it rather than std::pair.
368 2018-11-14 Jeff Law <law@redhat.com>
370 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
371 iff the operand is a constant.
373 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
375 * gimple-ssa-evrp-analyze.c
376 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
377 ignore_equivs_equal_p to equal_p.
378 * ipa-cp.c (meet_with_1): Use equal_p instead of
379 ignore_equivs_equal_p.
380 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
381 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
382 (value_range::operator==): Remove.
383 (value_range::operator!=): Remove.
384 (vrp_prop::visit_stmt): Use equal_p.
385 * tree-vrp.h (value_range): Remove operator==, operator!=,
386 ignore_equivs_equal_p.
387 * vr-values.c (update_value_range): Use equal_p.
389 2018-11-14 Michael Matz <matz@suse.de>
392 * gimplify.c (collect_fallthrough_labels): Add new argument,
393 return location via that, don't modify statements.
394 (warn_implicit_fallthrough_r): Adjust call, don't use
395 statement location directly.
397 2018-11-14 Richard Biener <rguenther@suse.de>
400 * tree-data-ref.c (split_constant_offset): Add wrapper
401 allocating a cache hash-map.
402 (split_constant_offset_1): Cache results of expanding
403 expressions from SSA def stmts.
405 2018-11-14 Richard Biener <rguenther@suse.de>
408 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
410 (lambda_vector_mult_const): Likewise.
411 (lambda_matrix_right_hermite): Use lambda_int temporaries.
413 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
414 Jackson Woodruff <jackson.woodruff@arm.com>
416 PR 71026/tree-optimization
417 * match.pd: Simplify floating point comparisons.
419 2018-11-14 Jakub Jelinek <jakub@redhat.com>
421 PR rtl-optimization/87817
422 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
423 last argument has low 8 bits clear, fold to 0.
425 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
427 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
428 MAX_OFILE_ALIGNMENT as needed.
430 2018-11-14 Richard Biener <rguenther@suse.de>
432 PR tree-optimization/88019
433 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
434 COND_EXPR arguments to non-trapping overflow.
436 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
438 * config/arc/arc.h (reg_class): Reorder registers classes, remove
439 unused register classes.
440 (REG_CLASS_NAMES): Likewise.
441 (REG_CLASS_CONTENTS): Likewise.
442 (FIXED_REGISTERS): Make lp_count fixed.
443 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
444 (PROGRAM_COUNTER_REGNO): Remove.
445 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
446 register classes, use constants for register numbers, remove
447 reg_class_contents references.
448 (arc_process_double_reg_moves): Add asserts.
449 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
450 lra_in_progress predicate.
451 (arc_init_reg_tables): Remove unused register classes.
452 (arc_register_move_cost): Likewise.
453 (arc_preferred_reload_class): Likewise.
454 (hwloop_optimize): Update rtx patterns involving lp_count register.
455 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
456 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
457 CHEAP_CORE_REGS. Former one will be used for LRA.
458 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
459 one will be used for LRA.
460 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
461 one will be used for LRA.
462 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
463 Former one will be used for LRA.
464 ("f"): Delete constraint.
467 ("l"): Change it from register constraint to constraint.
468 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
469 (movhi_insn): Likewise.
470 (movsi_insn): Update pattern.
473 (stack_tie): Remove 'b' constraint letter.
475 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
476 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
477 (R57_REG, R59_REG, PCL_REG): Likewise.
478 (ILINK1_REGNUM): Renamed to ILINK1_REG.
479 (ILINK2_REGNUM): Renamed to ILINK2_REG.
482 (Rcw): Remove unused reg classes.
483 * config/arc/predicates.md (dest_reg_operand): Just default on
484 register_operand predicate.
485 (mpy_dest_reg_operand): Likewise.
486 (move_dest_operand): Use macros instead of constants.
487 * config/arc/arc.opt (mlra): Switch to lra as default.
489 2018-11-14 Richard Biener <rguenther@suse.de>
491 PR tree-optimization/87974
492 * tree-vect-loop.c (vectorizable_reduction): When computing
493 the vectorized reduction PHI vector type ignore constant
496 2018-11-14 Jakub Jelinek <jakub@redhat.com>
498 PR tree-optimization/87977
499 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
500 stmt, build a new one and replace the old one with it. Formatting fix.
501 Call release_ssa_name (x) if !has_other_use and !delete_div.
502 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
503 verify lhs of stmt is still def.
505 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
507 PR rtl-optimization/87507
508 * lower-subreg.c (operand_for_swap_move_operator): New function.
509 (simple_move): Strip simple operators.
510 (find_pseudo_copy): Likewise.
511 (resolve_operand_for_swap_move_operator): New function.
512 (resolve_simple_move): Strip simple operators and swap operands.
514 2018-11-13 Jakub Jelinek <jakub@redhat.com>
516 PR tree-optimization/87898
517 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
518 (ipa_simd_modify_function_body): Remove debug stmts where the first
519 argument was changed into a non-decl.
521 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
523 PR rtl-optimization/87899
524 * lra-lives.c (start_living): Update white space in comment.
525 (enum point_type): New.
526 (sparseset_contains_pseudos_p): New function.
527 (update_pseudo_point): Likewise.
528 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
529 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
530 handling. Move early exit after adding conflicts.
531 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
532 if regno is already live. Remove all handling of program points.
533 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
534 after adding conflicts. Remove all handling of program points and
535 ignore_reg_for_conflicts.
536 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
537 and do not guard call to mark_pseudo_live.
538 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
539 and do not guard call to mark_pseudo_dead.
540 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
541 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
542 Use new function update_pseudo_point. Handle register copies by
543 removing the source register from the live set. Handle INOUT operands.
544 Update to the next program point using the unused_set, dead_set and
546 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
548 2018-11-13 David Malcolm <dmalcolm@redhat.com>
550 * builtins.c: Replace "source_location" with "location_t".
551 * diagnostic-show-locus.c: Likewise.
552 * diagnostic.c: Likewise.
553 * dumpfile.c: Likewise.
554 * gcc-rich-location.h: Likewise.
555 * genmatch.c: Likewise.
556 * gimple.h: Likewise.
557 * gimplify.c: Likewise.
559 * input.h: Likewise. Eliminate the typedef.
560 * omp-expand.c: Likewise.
561 * selftest.h: Likewise.
562 * substring-locations.h (get_source_location_for_substring):
564 (get_location_within_string): ...this.
565 * tree-cfg.c: Replace "source_location" with "location_t".
566 * tree-cfgcleanup.c: Likewise.
567 * tree-diagnostic.c: Likewise.
568 * tree-into-ssa.c: Likewise.
569 * tree-outof-ssa.c: Likewise.
570 * tree-parloops.c: Likewise.
571 * tree-phinodes.c: Likewise.
572 * tree-phinodes.h: Likewise.
573 * tree-ssa-loop-ivopts.c: Likewise.
574 * tree-ssa-loop-manip.c: Likewise.
575 * tree-ssa-phiopt.c: Likewise.
576 * tree-ssa-phiprop.c: Likewise.
577 * tree-ssa-threadupdate.c: Likewise.
578 * tree-ssa.c: Likewise.
579 * tree-ssa.h: Likewise.
580 * tree-vect-loop-manip.c: Likewise.
582 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
584 * doc/extend.texi: Fix typo in the weakref description.
586 2018-11-13 Richard Biener <rguenther@suse.de>
588 PR tree-optimization/86991
589 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
590 group building until we have successfully detected the SLP
592 (vect_is_simple_reduction): Remove fixup code here.
594 2018-11-13 David Malcolm <dmalcolm@redhat.com>
596 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
597 (dump_gimple_stmt): Use it.
598 (dump_gimple_stmt_loc): Likewise.
599 (dump_gimple_expr): Likewise.
600 (dump_gimple_expr_loc): Likewise.
601 (dump_generic_expr): Likewise.
602 (dump_generic_expr_loc): Likewise.
603 (dump_printf): Likewise.
604 (dump_printf_loc): Likewise.
605 (dump_dec): Likewise.
606 (dump_dec): Likewise.
607 (dump_hex): Likewise.
608 (dump_symtab_node): Likewise.
609 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
610 Guard dump call with dump_enabled_p.
611 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
612 * graphite-optimize-isl.c (optimize_isl): Likewise.
613 * graphite.c (graphite_transform_loops): Likewise.
614 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
615 * tree-parloops.c (parallelize_loops): Likewise.
616 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
617 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
618 (vect_prune_runtime_alias_test_list): Likewise.
619 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
620 (vect_estimate_min_profitable_iters): Likewise.
621 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
622 (vect_build_slp_tree_2): Likewise.
623 (vect_supported_load_permutation_p): Likewise.
624 (vect_slp_analyze_operations): Likewise.
625 (vect_slp_analyze_bb_1): Likewise.
626 (vect_slp_bb): Likewise.
627 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
628 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
629 (pass_slp_vectorize::execute): Likewise.
630 (increase_alignment): Likewise.
632 2018-11-13 David Malcolm <dmalcolm@redhat.com>
635 * ipa-inline.c (report_inline_failed_reason): Guard calls to
636 cl_target_option_print_diff and cl_optimization_print_diff with
639 2018-11-13 David Malcolm <dmalcolm@redhat.com>
641 * doc/invoke.texi (-fsave-optimization-record): Note that the
642 output is compressed.
643 * optinfo-emit-json.cc: Include <zlib.h>.
644 (optrecord_json_writer::write): Compress the output.
646 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
648 * tree-vrp.c (value_range_base::dump): Dump type.
649 Do not use INF nomenclature for 1-bit types.
650 (dump_value_range): Group all variants to common dumping code.
651 (debug): New overloaded functions for value_ranges.
652 (value_range_base::dump): Remove no argument version.
653 (value_range::dump): Same.
655 2018-11-13 Richard Biener <rguenther@suse.de>
657 PR tree-optimization/87931
658 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
659 nested cycles we support to latch computations vectorizable_reduction
662 2018-11-13 Martin Liska <mliska@suse.cz>
664 PR tree-optimization/87885
665 * cfghooks.c (account_profile_record): Rename
667 (profile_record_check_consistency): ... this.
668 Calculate missing num_mismatched_freq_in.
669 (profile_record_account_profile): New function
670 that calculates time and size of a function.
671 * cfghooks.h (struct profile_record): Remove
673 (struct cfg_hooks): Remove after_pass flag.
674 (account_profile_record): Rename to ...
675 (profile_record_check_consistency): ... this.
676 (profile_record_account_profile): New.
677 * cfgrtl.c (rtl_account_profile_record): Remove
679 * passes.c (check_profile_consistency): Do only
681 (account_profile): Calculate size and time of
683 (pass_manager::dump_profile_report): Reformat
685 (execute_one_ipa_transform_pass): Call
686 consistency check before clean upand call account_profile
687 after a clean up is done.
688 (execute_one_pass): Call check_profile_consistency and
689 account_profile instead of using after_pass flag..
690 * tree-cfg.c (gimple_account_profile_record): Likewise.
692 2018-11-13 Martin Liska <mliska@suse.cz>
695 * config/i386/i386.c (ix86_option_override_internal): Error
696 about usage -mabi=ms and -fsanitize={,kernel-}address.
698 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
700 * config/aarch64/aarch64.c
701 (aarch64_vectorize_preferred_vector_alignment): Change return type to
703 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
704 alignment being a poly int.
705 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
706 return type to poly_uint64.
707 * target.def (default_preferred_vector_alignment): Likewise.
708 * targhooks.c (default_preferred_vector_alignment): Likewise.
709 * targhooks.h (default_preferred_vector_alignment): Likewise.
710 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
711 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
713 (vect_update_misalignment_for_peel): Likewise.
714 (vect_enhance_data_refs_alignment): Likewise.
715 (vect_find_same_alignment_drs): Likewise.
716 (vect_duplicate_ssa_name_ptr_info): Likewise.
717 (vect_setup_realignment): Likewise.
718 (vect_can_force_dr_alignment_p): Change alignment parameter type to
720 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
721 mask with a compile time variable vector alignment.
722 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
724 (vect_do_peeling): Exit early if vector alignment is not constant.
725 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
727 (vectorizable_store): Likewise.
728 (vectorizable_load): Likweise.
729 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
731 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
733 (vect_can_force_dr_alignment_p): Change alignment parameter type to
736 2018-11-13 Richard Biener <rguenther@suse.de>
738 PR tree-optimization/87962
739 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
740 detect outer reduction for disqualifying in-loop uses.
742 2018-11-13 Richard Biener <rguenther@suse.de>
744 PR tree-optimization/87967
745 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
746 for constants for the scalar loop.
748 2018-11-13 Alan Modra <amodra@gmail.com>
750 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
751 integer constants when -mcmodel=medium.
753 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
755 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
756 * config/arc/elf.h (PROFILE_HOOK): Define.
757 * config/arc/linux.h (PROFILE_HOOK): Likewise.
759 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
761 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
762 jump table data in the text section.
764 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
766 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
767 to fit the eh_return pattern.
768 * config/arc/arc.md (eh_return): Define.
769 (VUNSPEC_ARC_EH_RETURN): Likewise.
770 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
772 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
775 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
777 * common/config/arc/arc-common.c (arc_option_optimization_table):
778 Millicode optimization is default on for size optimizations.
779 * config/arc/arc-protos.h (arc_check_multi): New function.
780 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
781 (ENTER_LEAVE_START_REG): Define.
782 (ENTER_LEAVE_END_REG): Likewise.
783 (arc_override_options): Disable millicode when long calls option
785 (arc_frame_info): Change it from int to bool.
786 (arc_compute_frame_size): Clean up.
787 (arc_save_restore): Remove.
788 (frame_save_reg): New function.
789 (frame_restore_reg): Likewise.
790 (arc_enter_leave_p): Likewise.
791 (arc_save_callee_saves): Likewise.
792 (arc_restore_callee_saves): Likewise.
793 (arc_save_callee_enter): Likewise.
794 (arc_restore_callee_leave): Likewise.
795 (arc_save_callee_milli): Likewise.
796 (arc_restore_callee_milli): Likewise.
797 (arc_expand_prologue): Reimplement to emit enter/leave
799 (arc_expand_epilogue): Likewise.
800 (arc_check_multi): New function.
801 * config/arc/arc.md (push_multi_fp): New pattern.
802 (push_multi_fp_blink): Likewise.
803 (pop_multi_fp): Likewise.
804 (pop_multi_fp_blink): Likewise.
805 (pop_multi_fp_ret): Likewise.
806 (pop_multi_fp_blink_ret): Likewise.
807 * config/arc/arc.opt (mmillicode): Update option.
808 (mcode-density-frame): New option.
809 * config/arc/predicates.md (push_multi_operand): New predicate.
810 (pop_multi_operand): Likewise.
811 * doc/invoke.texi (ARC): Update ARC options information.
814 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
816 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
817 * config/arc/arc.c (operands_ok_ldd_std): New function.
818 (mem_ok_for_ldd_std): Likewise.
819 (gen_operands_ldd_std): Likewise.
820 * config/arc/arc.md: Add peephole2 rules for std/ldd.
822 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
824 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
825 test on stack_usage_file.
826 (lang_dependent_init): Do not open the .su file if generating LTO.
828 2018-11-13 Jakub Jelinek <jakub@redhat.com>
830 PR rtl-optimization/87918
831 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
832 simplify_gen_relational rather than simplify_gen_binary.
834 2018-11-13 Richard Biener <rguenther@suse.de>
836 * tree-ssanames.h (set_range_info): Use value_range_base.
837 (get_range_info): Likewise.
838 * tree-ssanames.c (set_range_info): Likewise.
839 (get_range_info): Likewise.
840 * tree-vrp.c (value_range_base::union_helper): Split
841 out common parts of value_range[_base]::union_.
842 (value_range_base::union_): Update.
843 (value_range::union_): Likewise.
844 (determine_value_range_1): Use value_range_base.
845 (determine_value_range): Likewise.
846 * tree-vrp.h (value_range_base::union_helper): Move ...
847 (value_range::union_helper): ... from here.
849 2018-11-13 Alan Modra <amodra@gmail.com>
851 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
853 (rs6000_secondary_reload_gpr): Don't call find_replacement.
855 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
858 * doc/invoke.texi (Optimize Options): Clarify that the
859 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
860 apply to data cache size.
862 2018-11-13 Alan Modra <amodra@gmail.com>
864 * config/rs6000/predicates.md (logical_const_operand),
865 (logical_operand): Correct comment.
866 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
868 2018-11-13 Alan Modra <amodra@gmail.com>
870 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
872 2018-11-13 Alan Modra <amodra@gmail.com>
874 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
876 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
877 covered by alternative.
878 (movcc_internal1): Ignore h for register preference.
879 (mov<mode>_hardfloat64): Likewise.
880 (mov<mode>_softfloat): Ignore c, l, h for register preference.
882 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
884 PR preprocessor/47823
885 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
888 * doc/extend.texi (Pragmas): Note additional pragmas documented
891 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
895 * tree-scalar-evolution.c (expression_expensive_p): Make
896 BUILTIN POPCOUNT as expensive when backend does not define it.
898 2018-11-12 Fredrik Noring <noring@nocrew.org>
900 * config.gcc: Update with-llsc defaults for MIPS r5900.
902 2018-11-12 Martin Liska <mliska@suse.cz>
904 PR gcov-profile/87442
905 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
907 * doc/invoke.texi: Document them.
908 * tree-profile.c (parse_profile_filter): New.
909 (parse_profile_file_filtering): Likewise.
910 (release_profile_file_filtering): Likewise.
911 (include_source_file_for_profile): Likewise.
912 (tree_profiling): Filter source files based on the
915 2018-11-12 Martin Liska <mliska@suse.cz>
918 * doc/extend.texi: Add missing values for __builtin_cpu_is and
919 __builtin_cpu_supports for x86 target.
921 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
924 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
926 (Arithmetic): Likewise for "lo_sum".
928 2018-11-12 Renlin Li <renlin.li@arm.com>
931 * dse.c (get_stored_val): Add check for compile-time constantness
934 2018-11-12 Sudakshina Das <sudi.das@arm.com>
936 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
937 (ARMv8_5a): New fgroup.
938 (armv8.5-a): New arch.
939 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
941 * config/arm/arm-tables.opt: Regenerate.
942 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
943 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
944 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
945 Add matching rules for -march=armv8.5-a and extensions.
946 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
947 Add sb and predres to all armv8-a except armv8.5-a.
949 2018-11-12 Richard Biener <rguenther@suse.de>
951 * tree-vrp.h (value_range[_base]::set): Make public. Provide
952 overload for single value.
953 (value_range[_base]::set_nonnull): New.
954 (value_range[_base]::set_null): Likewise.
955 (value_range): Document bitmap copying behavior, mark
956 copy constructor and assignment operator deleted.
957 (value_range::move): New.
958 (value_range::set_and_canonicalize): Default bitmap to zero.
959 (set_value_range_to_nonnull): Remove.
960 (set_value_range_to_null): Likewise.
961 (set_value_range): Likewise.
962 (set_value_range_to_value): Likewise.
963 (extract_range_from_unary_expr): Work on value_range_base.
964 (extract_range_from_binary_expr_1): Likewise. Rename to...
965 (extract_range_from_binary_expr): ... this.
966 * tree-vrp.c (value_range::update): Clear equiv bitmap
968 (value_range::move): New, move equiv bitmap.
969 (value_range_base::set_undefined): Avoid assignment.
970 (value_range::set_undefined): Likewise.
971 (value_range_base::set_varying): Likewise.
972 (value_range::set_varying): Likewise.
973 (set_value_range): Remove.
974 (value_range_base::set): New overload for value.
975 (value_range::set): Likewise.
976 (set_value_range_to_nonnull): Remove.
977 (value_range_base::set_nonnull): New.
978 (value_range::set_nonnull): Likewise.
979 (set_value_range_to_null): Remove.
980 (value_range_base::set_null): New.
981 (value_range::set_null): Likewise.
982 (range_is_null): Work on value_range_base.
983 (range_is_nonnull): Likewise.
984 (ranges_from_anti_range): Likewise.
985 (extract_range_into_wide_ints): Likewise.
986 (extract_range_from_multiplicative_op): Likewise.
987 (extract_range_from_binary_expr): Likewise. Update for API changes.
988 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
990 (value_range::intersect_helper): Avoid copy and assignment.
991 (value_range::union_helper): Likewise.
992 (determine_value_range_1): Adjust.
993 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
994 Avoid assignment by using move.
995 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
996 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
998 * tree-ssanames.c (get_range_info): Likewise.
999 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
1000 * vr-values.c (vr_values::get_value_range): Adjust.
1001 (vr_values::update_value_range): Likewise.
1002 (symbolic_range_based_on_p): Work on value_range_base.
1003 (vr_values::extract_range_from_binary_expr): Use value_range_base.
1004 (vr_values::extract_range_from_unary_expr): Likewise.
1005 (vr_values::extract_range_from_cond_expr): Avoid assignment.
1006 (vr_values::extract_range_from_comparison): Adjust.
1007 (vr_values::check_for_binary_op_overflow): Use value_range_base.
1008 (vr_values::extract_range_basic): Adjust.
1009 (vr_values::adjust_range_with_scev): Likewise.
1010 (vr_values::vrp_visit_assignment_or_call): Likewise.
1011 (vr_values::get_vr_for_comparison): Change API to avoid
1012 assignment and copy construction.
1013 (vr_values::compare_name_with_value): Adjust accordingly.
1014 (vr_values::compare_names): Likewise.
1015 (vr_values::extract_range_from_phi_node): Avoid assignment and
1016 bogus in-place modify of equiv bitmap.
1017 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
1018 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
1019 for extract_range_from_unary_expr API change.
1020 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
1022 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
1024 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
1026 2018-11-12 Richard Biener <rguenther@suse.de>
1028 * tree-vrp.h (value_range_base::symbolic_p,
1029 value_range_base::constant_p, value_range_base::zero_p,
1030 value_range_base::singleton_p): Move from value_range.
1031 (value_range::dump): Add.
1032 * gimple-ssa-evrp-analyze.c
1033 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
1034 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
1035 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1037 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
1038 (value_range::constant_p): Likewise.
1039 (value_range::singleton_p): Likewise.
1040 (value_range_base::dump): Add.
1041 (set_value_range_to_undefined): Remove.
1042 (set_value_range_to_varying): Likewise.
1043 (range_int_cst_p): Take value_range_base argument.
1044 (range_int_cst_singleton_p): Likewise.
1045 (value_range_constant_singleton): Likewise.
1046 (vrp_set_zero_nonzero_bits): Likewise.
1047 (extract_range_from_multiplicative_op): Use set_varying.
1048 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
1049 (extract_range_from_unary_expr): Likewise.
1050 (dump_value_range_base): Change to overload of dump_value_range.
1051 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
1052 (vrp_prop::visit_stmt): Likewise.
1053 (value_range::intersect_helper): Likewise.
1054 (value_range::union_helper): Likewise.
1055 (determine_value_range_1): Likewise.
1057 2018-11-12 Richard Biener <rguenther@suse.de>
1059 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
1060 (set_value_range_to_null): Likewise.
1061 * vr-values.c (vr_values::extract_range_from_comparison):
1062 Clear equiv for constant singleton ranges.
1064 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
1066 * config/i386/sse.md: Combine VFIXUPIMM* patterns
1067 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1068 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1069 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
1070 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1071 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1072 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
1074 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1077 * doc/extend.texi (Common Type Attributes): For the align type
1078 attribute, copy language about decreasing alignment from the
1079 corresponding variable attribute.
1081 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1083 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
1086 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1089 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
1090 -frtti and -fno-rtti code.
1092 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
1095 * doc/extend.texi (Other Builtins): Document probability associated
1096 with __builtin_expect.
1098 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
1101 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
1102 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
1103 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
1104 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
1106 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1108 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
1110 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
1112 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
1114 2018-11-11 Richard Biener <rguenther@suse.de>
1116 * tree-vrp.h (class value_range_base): New base class for
1117 value_range containing all but the m_equiv member.
1118 (dump_value_range_base): Add.
1119 (range_includes_zero_p): Work on value_range_base.
1120 * tree-vrp.c (value_range_base::set): Split out base handling
1122 (value_range::set): this.
1123 (value_range::set_equiv): New.
1124 (value_range_base::value_range_base): New constructors.
1125 (value_range_base::check): Split out base handling from...
1126 (value_range::check): this.
1127 (value_range::equal_p): Refactor in terms of
1128 ignore_equivs_equal_p which is now member of the base.
1129 (value_range_base::set_undefined): New.
1130 (value_range_base::set_varying): Likewise.
1131 (value_range_base::dump):Split out base handling from...
1132 (value_range::dump): this.
1133 (value_range_base::set_and_canonicalize): Split out base handling
1135 (value_range::set_and_canonicalize): this.
1136 (value_range_base::union_): New.
1137 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
1139 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
1140 instead of value_range everywhere.
1141 (ipcp_vr_lattice::print): Use dump_value_range_base.
1142 (ipcp_vr_lattice::meet_with): Adjust.
1143 (ipcp_vr_lattice::meet_with_1): Likewise.
1144 (ipa_vr_operation_and_type_effects): Likewise.
1145 (propagate_vr_across_jump_function): Likewise.
1146 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
1147 (ipa_get_value_range): Likewise.
1148 (ipa_set_jfunc_vr): Likewise.
1149 (ipa_compute_jump_functions_for_edge): Likewise.
1151 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
1154 * doc/invoke.texi (Optimize Options): Add @opindex entries
1155 for the positive forms of -fno-xxx and -mno-xxx options
1156 that were lacking them.
1158 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
1160 * combine.c (make_more_copies): Only make an intermediate copy if the
1161 dest of a move is a pseudo.
1163 2018-11-09 Maya Rashish <coypu@sdf.org>
1166 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1167 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1169 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
1173 * doc/invoke.texi (Optimize Options): Clarify default behavior
1174 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
1176 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
1178 PR tree-optimization/87940
1179 * expr.c (string_constant): Don't strip NOPS in subexpressions.
1180 Fold PLUS_EXPR correctly.
1182 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
1185 * config/s390/s390.c (s390_safe_relative_long_p): New function.
1186 (annotate_constant_pool_refs): Skip insns which support
1187 relative addressing.
1188 (annotate_constant_pool_refs_1): New helper function.
1189 (find_constant_pool_ref): Skip insns which support relative
1191 (find_constant_pool_ref_1): New helper function.
1192 (replace_constant_pool_ref): Skip insns which support
1193 relative addressing.
1194 (replace_constant_pool_ref_1): New helper function.
1195 (s390_mainpool_start): Adapt to the new signature.
1196 (s390_mainpool_finish): Likewise.
1197 (s390_chunkify_start): Likewise.
1198 (s390_chunkify_finish): Likewise.
1199 (pass_s390_early_mach::execute): Likewise.
1200 (s390_prologue_plus_offset): Likewise.
1201 (s390_emit_prologue): Likewise.
1202 (s390_emit_epilogue): Likewise.
1204 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1206 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1207 but unsupported lastprivate with conditional modifier.
1209 2018-11-09 Jeff Law <law@redhat.com>
1211 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1212 unused argument better. Add gcc_unreachable to silence warning.
1214 2018-11-09 Martin Sebor <msebor@redhat.com>
1217 * attribs.c (has_attribute): New helper function.
1218 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1219 * attribs.h (decls_mismatched_attributes): Declare.
1220 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1221 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1222 * common.opt (-Wattribute-alias): Take an argument.
1223 (-Wno-attribute-alias): New option.
1224 * doc/extend.texi (Common Function Attributes): Document copy.
1225 (Common Variable Attributes): Same.
1226 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1227 (-Wattribute-alias): Document new option argument.
1229 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1231 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1232 matching criteria. Remove unused array initializer.
1234 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
1235 Jinsong Ji <jji@us.ibm.com>
1237 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1238 constraints by introducing a new temporary.
1239 (_mm_cvtss_si64): Likewise.
1241 2018-11-09 Martin Liska <mliska@suse.cz>
1243 * common.opt: Add -fipa-stack-alignment flag.
1244 * doc/invoke.texi: Document it.
1245 * final.c (rest_of_clean_state): Guard stack
1246 shrinking with flag.
1248 2018-11-09 Martin Liska <mliska@suse.cz>
1250 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1252 (ipa_discover_variable_flags): ... this.
1253 * common.opt: Come up with new flag -fipa-reference-addressable.
1254 * doc/invoke.texi: Document it.
1255 * ipa-reference.c (propagate): Call the renamed fn.
1256 * ipa-visibility.c (whole_program_function_and_variable_visibility):
1258 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1260 (ipa_discover_variable_flags): ... this. Discover
1261 non-addressable variables only with the newly added flag.
1262 * opts.c: Enable the newly added flag with -O1 and higher
1265 2018-11-09 David Malcolm <dmalcolm@redhat.com>
1267 * json.cc (selftest::test_writing_literals): Fix comment.
1269 2018-11-09 Martin Liska <mliska@suse.cz>
1271 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1272 string to a stack buffer.
1273 (aarch64_parse_cpu): Likewise.
1274 (aarch64_parse_tune): Likewise.
1276 2018-11-09 Richard Biener <rguenther@suse.de>
1278 PR tree-optimization/87953
1279 * tree-vect-loop.c (vectorizable_reduction): For analysis
1280 always pass ops[0] to vectorizable_condition.
1282 2018-11-09 Stafford Horne <shorne@gmail.com>
1283 Richard Henderson <rth@twiddle.net>
1284 Joel Sherrill <joel@rtems.org>
1286 * common/config/or1k/or1k-common.c: New file.
1287 * config/or1k/*: New.
1288 * config.gcc (or1k*-*-*): New.
1289 * configure.ac (or1k*-*-*): New test for openrisc tls.
1290 * configure: Regenerated.
1291 * doc/install.texi: Document OpenRISC triplets.
1292 * doc/invoke.texi: Document OpenRISC arguments.
1293 * doc/md.texi: Document OpenRISC.
1295 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
1297 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1298 (arm7tdmi-s): Delete CPU.
1299 (arm710t): Add aliases for arm720t and arm740t.
1300 (arm720t, arm740t): Delete CPUs.
1301 (arm920t): Add aliases for arm920, arm922t and arm940t.
1302 (arm920, arm922t, arm940t): Delete CPUs.
1303 (arm10tdmi): Add alias for arm1020t.
1304 (arm1020t): Delete CPU.
1305 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1306 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1307 (arm10e): Add aliases for arm1020e and arm1022e.
1308 (arm1020e, arm1022e): Delete CPU.
1309 * config/arm/arm.md (generic_sched): Remove entries that are now
1311 (generic_vfp): Likewise.
1312 * config/arm/arm1020e.md: Simplify tuning selection based on alias
1314 * config/arm/arm-tune.md: Regenerated.
1315 * config/arm/arm-tables.opt: Regenerated.
1317 2018-11-09 Richard Biener <rguenther@suse.de>
1319 PR tree-optimization/87621
1320 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1321 op with only phi inputs.
1322 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1323 (ch_base::copy_headers): Run CSE on copied loop headers.
1324 (pass_ch_vect::process_loop_p): Simplify.
1326 2018-11-09 Alexandre Oliva <oliva@adacore.com>
1328 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1329 for non-w64 x86_64 biarch.
1331 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
1333 PR rtl-optimization/86438
1334 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1335 of in_b for the compare if in_b is SET_DEST.
1338 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1339 non-toplevel UNSPEC.
1341 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1343 * tree-vrp.c (value_range::check): Do not access internals
1345 (value_range::singleton_p): Same.
1346 (value_range::type): Same.
1347 (vrp_finalize): Use value_range API.
1349 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1351 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1353 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1355 * vr-values.c (vr_values::get_value_range): Use value_range API
1356 instead of piecing together ranges.
1357 (vr_values::update_value_range): Same.
1359 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
1361 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1362 of performing ad-hoc calculations.
1363 * tree-ssanames.c (set_range_info): New overloaded function
1364 accepting value_range &.
1365 (get_range_info): Same.
1366 * tree-ssanames.h (set_range_info_raw): Remove.
1367 (set_range_info): New prototype.
1368 (get_range_info): Same.
1369 * tree-vrp.h (value_range::null_p): Rename to zero_p.
1370 * tree-vrp.c (value_range::null_p): Same.
1372 2018-11-09 Jan Hubicka <jh@suse.cz>
1374 * tree.c (fld_type_variant_equal_p): Test user align flag.
1375 (flt_type_variant): Copy user align flag.
1376 (fld_incomplete_type_of): Clear it.
1378 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1380 * config/arm/neon.md (div<mode>3): New pattern.
1382 2018-11-08 Andi Kleen <ak@linux.intel.com>
1384 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1385 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1386 (ix86_handle_option): Handle OPT_mptwrite.
1387 * config/i386/cpuid.h (bit_PTWRITE): Add.
1388 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1389 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1390 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1391 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1392 (ix86_option_override_internal): Handle PTA_PTWRITE.
1393 (ix86_valid_target_attribute_inner_p): Define ptwrite.
1394 (def_builtin2): Force UINT64 to be 64bit only.
1395 * config/i386/i386.h (TARGET_PTWRITE): Add.
1396 (TARGET_PTWRITE_P): Add.
1398 * config/i386/i386.md: Define ptwrite.
1399 * config/i386/i386.opt: Add -mptwrite.
1400 * config/i386/immintrin.h (_ptwrite64): Add.
1402 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1403 * doc/invoke.texi: Document -mptwrite.
1405 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
1407 PR rtl-optimization/87600
1408 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1409 * lra-constraints.c (process_alt_operands): Skip illegal hard
1410 register usage. Prefer reloading non hard register operands.
1412 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
1415 * doc/invoke.texi (Optimize Options): Clarify default behavior
1416 for -fno-sched-interblock and -fno-sched-spec.
1418 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
1420 * collect2.c (linker_select): Add USE_LLD_LD.
1421 (ld_suffixes): Add ld.lld.
1422 (main): Handle -fuse-ld=lld.
1423 * common.opt (-fuse-ld=lld): New option.
1424 * doc/invoke.texi (-fuse-ld=lld): Document.
1425 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1427 2018-11-08 Paul Koning <ni1d@arrl.net>
1429 * config/pdp11/constraints.md: Add "Z" series constraints for use
1430 with pre-dec and post-inc addressing.
1431 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1432 (pdp11_expand_operands): Add int argument (word count).
1433 (pdp11_sp_frame_offset): Delete.
1434 (pdp11_cmp_length): New function.
1435 (pushpop_regeq): New function.
1436 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1438 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1440 (pdp11_initial_elimination_offset): Ditto.
1441 (pdp11_expand_operands): Add word count argument. Bugfixes.
1442 (output_move_multiple): Change how pointer adjustment is done.
1443 (pdp11_gen_int_label): Correct format.
1444 (output_ascii): Ditto.
1445 (pdp11_asm_output_var): Add code for DEC assembler case.
1446 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1448 (legitimate_const_double_p): Ditto.
1449 (pdp11_register_move_cost): Adjust for new register classes.
1450 (pdp11_regno_reg_class): Ditto.
1451 (expand_block_move): Delete.
1452 (pushpop_regeq): New function.
1453 (pdp11_legitimate_address_p): Bugfix in check for constant
1455 (pdp11_sp_frame_offset): Delete.
1456 (pdp11_reg_save_size): New helper function for new frame layout.
1457 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1458 (pdp11_expand_shift): Bugfix in check for constant shift count.
1459 (pdp11_shift_length): Ditto.
1460 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1461 (pdp11_cmp_length): New function.
1462 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1463 some compile options.
1464 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1465 (CALL_USED_REGISTERS): Ditto.
1466 (ELIMINABLE_REGS): Ditto.
1467 (REGISTER_NAMES): Ditto.
1468 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1470 (REG_CLASS_NAMES): Ditto.
1471 (REG_CLASS_CONTENTS): Ditto. Also remove
1472 HARD_FRAME_POINTER_REGNUM.
1473 (CPU_REG_CLASS): New macro.
1474 (CLASS_MAX_NREGS): Adjust for new register classes.
1475 (FUNCTION_PROFILER): Make no-op.
1476 (may_call_alloca): Remove unused declaration.
1477 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1478 (ASM_OUTPUT_SKIP): Fix format.
1479 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1480 (HARD_FRAME_POINTER_REGNUM): Remove.
1482 (*rts): Rename. Remove epilogue related checks.
1483 (cmpsi, cmpdi): New insn.
1484 (cbranch<mode>4): Change to apply to SI and DI modes as well.
1485 (mov<mode>): Change constraints to enforce that push/pop
1486 destination cannot use the same register as source.
1487 (*mov<mode><cc_cc>): Ditto.
1488 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1489 at assembly output rather than as RTL expander.
1490 (zero_extendqihi2): Bugfix in check for same registers.
1491 (adddi3_nocc): Bugfix in check for constant operand.
1492 (addsi3_nocc): Ditto.
1493 (subdi3_nocc): Ditto.
1494 (subsi3_nocc): Ditto.
1495 (negdi2_nocc): Copy input to pdp11_expand_operands.
1496 (negsi2_nocc): Ditto.
1497 (bswap2_nocc): Ditto.
1498 * config/pdp11/pdp11.opt (mlra): Fix documentation.
1499 * config/pdp11/t-pdp11: Use -Os.
1501 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
1503 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1504 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1505 (gen_comm_data): Print out CPU alias tables.
1506 (check_cpu): Match aliases when checking the CPU name.
1507 * config/arm/arm-protos.h (cpu_alias): New structure.
1508 (cpu_option): Add entry for aliases.
1509 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1510 strongarm1100 and strongarm1110.
1511 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1512 (config/arm/arm-generic.md): Remove redundant references to
1513 strongarm110, strongarm1100 and strongarm1110.
1514 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1515 Scan aliases for additional hints.
1516 (arm_parse_cpu_option_name): Also match a cpu name against the list
1518 * config/arm/arm-tables.opt: Regenerated.
1519 * config/arm/arm-tune.md: Regenerated.
1521 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1523 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1524 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1525 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1526 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1527 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1528 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1529 * gengtype.c (open_base_files): Add omp-general.h.
1530 * gimple.c (gimple_build_omp_critical):
1531 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1532 gimple_omp_taskgroup_set_clauses.
1533 (gimple_build_omp_atomic_load): Add mo argument, call
1534 gimple_omp_atomic_set_memory_order.
1535 (gimple_build_omp_atomic_store): Likewise.
1536 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1537 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1539 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1540 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1541 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1542 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1543 different value for GF_OMP_ATOMIC_NEED_VALUE.
1544 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1546 (struct gimple_statement_omp_single_layout): And remove here.
1547 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1548 than gimple_statement_omp_single_layout.
1549 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1551 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1552 (gimple_omp_subcode): Formatting fix.
1553 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1554 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1555 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1556 gimple_omp_teams_host, gimple_omp_teams_set_host,
1557 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1558 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1559 gimple_omp_taskgroup_set_clauses): New inline functions.
1560 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1561 (gimple_build_omp_atomic_store): Likewise.
1562 (gimple_omp_atomic_seq_cst_p): Remove.
1563 (gimple_omp_atomic_memory_order): New function.
1564 (gimple_omp_atomic_set_seq_cst): Remove.
1565 (gimple_omp_atomic_set_memory_order): New function.
1566 (gimple_build_omp_taskgroup): Add clauses argument.
1567 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1568 (dump_gimple_omp_task): Print taskwait with depend clauses.
1569 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1570 dump_omp_atomic_memory_order.
1571 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1572 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1573 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1574 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1575 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1576 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1577 ORT_UNTIED_TASKLOOP enumerators.
1578 (enum gimplify_defaultmap_kind): New.
1579 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1580 target_map_pointers_as_0len_arrays members, add defaultmap.
1581 (new_omp_context): Initialize defaultmap member.
1582 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1583 (maybe_fold_stmt): Don't fold even in host teams regions.
1584 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1585 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1586 ctx->omp_firstprivatize_variable.
1587 (omp_add_variable): Don't add private/firstprivate for VLAs in
1589 (omp_default_clause): Print "taskloop" rather than "task" if
1591 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1592 Handle new defaultmap clause kinds.
1593 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
1594 iterator to be lastprivate or private. Fix up diagnostics if linear
1595 is used on collapse>1 simd iterator.
1596 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1597 (gimplify_omp_depend): New function.
1598 (gimplify_scan_omp_clauses): Add shared clause on parallel for
1599 combined parallel master taskloop{, simd} if taskloop has
1600 firstprivate, lastprivate or reduction clause. Handle
1601 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
1602 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
1603 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
1604 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
1605 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
1607 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
1608 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
1609 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
1610 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1611 (gimplify_omp_task): Handle taskwait with depend clauses.
1612 (gimplify_omp_for): Add shared clause on parallel for combined
1613 parallel master taskloop{, simd} if taskloop has firstprivate,
1614 lastprivate or reduction clause. Use ORT_TASKLOOP or
1615 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
1616 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
1617 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
1618 __for_end and __for_range temporaries on OMP_PARALLEL for
1619 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
1620 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1621 sandwiched in between two taskloops.
1622 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1623 instead of ctx->omp_firstprivatize_variable.
1624 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1625 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
1626 host teams, use gimplify_and_return_first etc. for body like
1627 for target or target data constructs, and at the end call
1628 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1629 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1630 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1631 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1632 gimple_omp_atomic_set_seq_cst calls.
1633 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1634 case, handle taskgroup clauses.
1635 * lto-streamer-out.c (hash_tree): Handle
1636 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1637 * Makefile.in (GTFILES): Add omp-general.h.
1638 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1639 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1640 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1641 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1642 BUILT_IN_GOMP_LOOP_DOACROSS_START,
1643 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1644 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1645 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1646 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1647 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1648 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1649 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1650 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1651 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1652 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1653 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1654 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1655 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1656 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1657 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1658 * omp-expand.c (workshare_safe_to_combine_p): Return false for
1659 non-worksharing loops.
1660 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1661 (determine_parallel_type): Don't combine parallel with worksharing
1662 which has _reductemp_ clause.
1663 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1664 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1665 if there is nonmonotonic modifier or if there is no modifier and no
1666 ordered clause. For dynamic and guided schedule without monotonic
1667 and nonmonotonic modifier, default to nonmonotonic.
1668 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
1669 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1671 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1672 there are any reduction clauses.
1673 (expand_taskwait_call): New function.
1674 (expand_teams_call): New function.
1675 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1676 expand_teams_call for it. Formatting fix. Handle taskwait with
1678 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
1679 of worksharing loops with task reductions.
1680 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1681 expansion of worksharing loops with task reductions.
1682 (expand_omp_sections): Handle expansion of sections with task
1684 (expand_omp_synch): For host teams call expand_omp_taskreg.
1685 (omp_memory_order_to_memmodel): New function.
1686 (expand_omp_atomic_load, expand_omp_atomic_store,
1687 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1688 instead of gimple_omp_atomic_seq_cst_p.
1689 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1690 depend clauses as a standalone directive.
1691 * omp-general.c (enum omp_requires): New variable.
1692 (omp_extract_for_data): Initialize have_reductemp member. Allow
1693 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1694 GT_EXPR loops depending on incr sign. Formatting fixes.
1695 * omp-general.h (struct omp_for_data): Add have_reductemp member.
1696 (enum omp_requires): New enum.
1697 (omp_requires_mask): Declare.
1698 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1700 * omp-low.c (struct omp_context): Add task_reductions and
1701 task_reduction_map fields.
1702 (is_host_teams_ctx): New function.
1703 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1704 (use_pointer_for_field): Use is_global_var instead of
1705 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1707 (build_outer_var_ref): Ignore taskgroup outer contexts.
1708 (delete_omp_context): Release task_reductions and task_reduction_map.
1709 (scan_sharing_clauses): Don't add any fields for reduction clause on
1710 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
1711 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1712 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
1713 Handle OMP_CLAUSE_NONTEMPORAL.
1714 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1716 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1717 clauses with task modifier.
1718 (scan_omp_task): Handle taskwait with depend clauses.
1719 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1720 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1721 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1722 (scan_omp_for): Fix comment formatting.
1723 (scan_omp_teams): Handle host teams constructs.
1724 (check_omp_nesting_restrictions): Allow teams with no outer
1725 OpenMP context. Adjust diagnostics for teams strictly nested into
1726 some explicit OpenMP construct other than target. Allow OpenMP atomics
1727 inside of simd regions.
1728 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1729 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1730 taskreg_nesting_level while scanning host teams construct.
1731 (task_reduction_read): New function.
1732 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1733 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1734 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
1735 second argument create_tmp_var if it is NULL. Don't ignore shared
1736 clauses in is_host_teams_ctx contexts. Handle
1737 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1739 (lower_reduction_clauses): Ignore reduction clauses with task
1740 modifier. Remove second argument create_tmp_var if it is NULL.
1741 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1742 (lower_send_clauses): Ignore reduction clauses with task modifier.
1743 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
1744 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
1745 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1746 rely that it is the last stmt in body so far. Ignore outer taskgroup
1748 (omp_task_reductions_find_first, omp_task_reduction_iterate,
1749 lower_omp_task_reductions): New functions.
1750 (lower_omp_sections): Handle reduction clauses with taskgroup
1751 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
1752 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1753 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
1755 (lower_omp_taskgroup): Handle taskgroup reductions.
1756 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1757 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1758 (lower_depend_clauses): If there are any
1759 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1760 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
1761 seen, assume lowering is done already and return early. Set kind
1762 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1763 (lower_omp_taskreg): Handle reduction clauses with task modifier on
1764 parallel construct. Handle reduction clause on taskloop construct.
1765 Handle taskwait with depend clauses.
1766 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1767 for host teams constructs.
1768 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1769 nontemporal and _reductemp_ clause entries.
1770 (omp_clause_code_name): Likewise.
1771 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1772 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1773 * tree-core.h (enum omp_clause_code): Add
1774 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1775 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1776 (struct tree_base): Add omp_atomic_memory_order field into union.
1777 Remove OMP_ATOMIC_SEQ_CST comment.
1778 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1779 and OMP_CLAUSE_DEPEND_DEPOBJ.
1780 (struct tree_omp_clause): Add subcode.defaultmap_kind.
1781 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1782 OpenMP constructs with body and clauses operands.
1783 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1784 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1785 (OMP_TASKGROUP_CLAUSES): Define.
1786 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1787 OMP_CLAUSE__LOOPTEMP_.
1788 (OMP_ATOMIC_SEQ_CST): Remove.
1789 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1790 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1791 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1792 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1793 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1794 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1795 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1796 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1797 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1798 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1800 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1801 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1802 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1803 (convert_local_omp_clauses): Likewise. Remove useless test.
1804 * tree-parloops.c (create_call_for_reduction_1): Pass
1805 OMP_MEMORY_ORDER_RELAXED as new argument to
1806 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1807 * tree-pretty-print.c (dump_omp_iterators): New function.
1808 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1809 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
1810 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1811 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
1812 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
1813 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
1814 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1815 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1816 (dump_omp_atomic_memory_order): New function.
1817 (dump_generic_node): Use it. Print taskgroup clauses. Print
1818 taskwait with depend clauses.
1819 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1820 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1821 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1822 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1823 write_ts_omp_clause_tree_pointers): Likewise.
1825 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1828 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1829 "-missed", "-note", and "-all" sub-options.
1830 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1832 (can_early_inline_edge_p): Likewise.
1833 (want_early_inline_function_p): Likewise.
1834 (want_inline_self_recursive_call_p): Likewise.
1835 (recursive_inlining): Likewise.
1836 (inline_small_functions): Likewise.
1837 (flatten_function): Likewise.
1838 (ipa_inline): Likewise.
1839 (inline_always_inline_functions): Likewise.
1840 (early_inline_small_functions): Likewise.
1841 (early_inliner): Likewise.
1842 * tree-inline.c (expand_call_inline): Likewise.
1844 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1846 * pretty-print.c (pp_format): Handle %f.
1847 (selftest::test_pp_format): Add test of %f.
1848 * pretty-print.h (pp_double): New macro.
1850 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1852 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1853 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1854 (dump_pretty_printer::decode_format): Implement "%C" for
1856 (selftest::test_capture_of_dump_calls): Rename "where" to
1857 "stmt_loc". Convert test_decl to a function decl and set its
1858 location. Add a symbol_table_test RAII instance and a
1859 cgraph_node, using it to test "%C" and dump_symtab_node.
1861 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
1864 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1866 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1868 * cgraph.c: Include "selftest.h".
1869 (saved_symtab): New variable.
1870 (selftest::symbol_table_test::symbol_table_test): New ctor.
1871 (selftest::symbol_table_test::~symbol_table_test): New dtor.
1872 (selftest::test_symbol_table_test): New test.
1873 (selftest::cgraph_c_tests): New.
1874 * cgraph.h (saved_symtab): New decl.
1875 (selftest::symbol_table_test): New class.
1876 * selftest-run-tests.c (selftest::run_tests): Call
1877 selftest::cgraph_c_tests.
1878 * selftest.h (selftest::cgraph_c_tests): New decl.
1880 2018-11-08 Richard Biener <rguenther@suse.de>
1882 * tree-data-ref.h (lambda_int): New typedef.
1883 (lambda_vector_gcd): Adjust.
1884 (lambda_vector_new): Likewise.
1885 (lambda_matrix_new): Likewise.
1886 * tree-data-ref.c (print_lambda_vector): Adjust.
1888 2018-11-08 Richard Biener <rguenther@suse.de>
1890 PR tree-optimization/87929
1891 * tree-complex.c (expand_complex_comparison): Clean EH.
1893 2018-11-08 Martin Liska <mliska@suse.cz>
1895 * doc/extend.texi: Reword.
1896 * predict.c (expr_expected_value_1): Likewise.
1898 2018-11-08 Richard Biener <rguenther@suse.de>
1900 PR tree-optimization/87913
1901 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1902 of extreme values to ordered comparisons.
1904 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1907 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1909 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1911 * doc/invoke.texi: Remove leading dash from @opindex entries
1912 throughout the file.
1914 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1917 * doc/invoke.texi (Option Summary): Add -e and --entry.
1918 (Link Options): Likewise.
1920 2018-11-07 Nathan Sidwell <nathan@acm.org>
1923 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1924 --disable-checking bootstrap.
1926 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
1928 * configure: Regenerated.
1930 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1933 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1934 to the mode of the widest field iff the widest field has mode class
1935 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1938 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
1940 * common.opt: Add -Wattribute-warning.
1941 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1942 * expr.c (expand_expr_real_1): Add new attribute to warning_at
1943 call to allow user configure behavior of "warning" attribute.
1945 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
1947 * target.def: Put @: after every vs., e.g., and i.e. where it is
1948 followed by whitespace.
1949 * doc/extend.texi: Ditto.
1950 * doc/fragments.texi: Ditto.
1951 * doc/gimple.texi: Ditto.
1952 * doc/implement-c.texi: Ditto.
1953 * doc/install.texi: Ditto.
1954 * doc/invoke.texi: Ditto.
1955 * doc/md.texi: Ditto.
1956 * doc/plugins.texi: Ditto.
1957 * doc/rtl.texi: Ditto.
1958 * doc/sourcebuild.texi: Ditto.
1959 * doc/tm.texi.in: Ditto.
1960 * doc/ux.texi: Ditto.
1961 * doc/tm.texi: Regenerate.
1963 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1965 * config/arm/arm-cpus.in (ares): New entry.
1966 * config/arm/arm-tables.opt: Regenerate.
1967 * config/arm/arm-tune.md: Likewise.
1968 * doc/invoke.texi (ARM Options): Document ares.
1970 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1972 * config/aarch64/aarch64-cores.def (ares): Define.
1973 * config/aarch64/aarch64-tune.md: Regenerate.
1974 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1976 2018-11-07 Jan Hubicka <jh@suse.cz>
1978 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1979 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1980 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1983 2018-11-07 Richard Biener <rguenther@suse.de>
1985 PR tree-optimization/87914
1986 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1988 (vectorizable_reduction): Handle shifts and rotates by dispatching
1989 to vectorizable_shift.
1990 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1991 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
1993 (vectorizable_shift): Export and handle being called as
1995 (vect_analyze_stmt): Call vectorizable_shift after
1996 vectorizable_reduction.
1997 * tree-vectorizer.h (vectorizable_shift): Declare.
1999 2018-11-07 Jan Hubicka <jh@suse.cz>
2001 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
2002 than const decls in TREE_VALUE of enum.
2003 (dump_type_inheritance_graph): Improve duplicate dumping.
2004 (free_enum_values): New.
2005 (build_type_inheritance_graph): Use it.
2006 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
2007 which are not main variants or not ODR types.
2008 (verify_type_variant): Expect variants to have no TYPE_VALUES.
2010 2018-11-07 Richard Biener <rguenther@suse.de>
2012 * ipa-inline.c (want_inline_small_function_p): Compute
2013 big_speedup_p lazily and last.
2015 2018-11-07 Jan Hubicka <jh@suse.cz>
2017 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
2018 building incomplete variant of complete type.
2019 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
2020 variant of complete type.
2022 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2024 * config/mips/mips.c: Fix typo in documentation of
2025 mips_loongson_ext2_prefetch_cookie.
2026 (mips_option_override): fix brain twister logical.
2027 * config/mips/mips.h: Fix typo in documentation of
2028 ISA_HAS_CTZ_CTO and define pattern.
2029 * config/mips/mips.md (prefetch): Hoist EXT2 above
2031 (prefetch_indexed): Hoist EXT2 above the EXT block.
2033 2018-11-07 Jan Hubicka <jh@suse.cz>
2035 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
2036 return and parameter types of function and method types.
2037 (free_lang_data_in_cgraph): Update.
2039 2018-11-07 Martin Liska <mliska@suse.cz>
2041 PR rtl-optimization/87868
2042 * postreload-gcse.c (eliminate_partially_redundant_load): Set
2043 threshold to max_count if we would overflow.
2044 * profile-count.h: Make max_count a public constant.
2046 2018-11-07 Martin Liska <mliska@suse.cz>
2048 * mem-stats.h: Fix GNU coding style.
2050 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2052 * config/mips/gs264e.md: New.
2053 * config/mips/mips-cpus.def: Define gs264e.
2054 * config/mips/mips-tables.opt: Regenerate.
2055 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2057 (mips_issue_rate): Add support for gs264e.
2058 (mips_multipass_dfa_lookahead): Likewise.
2059 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
2060 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
2061 (MIPS_ASE_MSA_SPEC): New.
2062 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
2063 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
2064 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
2065 * config/mips/mips.md: Include gs264e.md.
2066 (processor): Add gs264e.
2067 * config/mips/mips.opt (MSA): Use Mask instead of Var.
2068 * doc/invoke.texi: Add gs264e to supported architectures.
2070 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2072 * config/mips/gs464e.md: New.
2073 * config/mips/mips-cpus.def: Define gs464e.
2074 * config/mips/mips-tables.opt: Regenerate.
2075 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2077 (mips_issue_rate): Add support for gs464e.
2078 (mips_multipass_dfa_lookahead): Likewise.
2079 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
2080 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
2081 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
2082 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
2083 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
2084 * config/mips/mips.md: Include gs464e.md.
2085 (processor): Add gs464e.
2086 * doc/invoke.texi: Add gs464e to supported architectures.
2088 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2090 * config/mips/loongson3a.md: Rename to ...
2091 * config/mips/gs464.md: ... here.
2092 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
2093 as an alias of gs464 processor.
2094 * config/mips/mips-tables.opt: Regenerate.
2095 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
2096 instead of PROCESSOR_LOONGSON_3A.
2097 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
2099 (mips_option_override): Enable MMI and EXT for gs464.
2100 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
2101 Rename TUNE_LOONGSON_3A to TUNE_GS464.
2102 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
2103 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
2104 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
2106 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
2107 (processor): Add gs464;
2108 * doc/invoke.texi: Add gs464 to supported architectures.
2110 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2112 * config/mips/mips-protos.h
2113 (mips_loongson_ext2_prefetch_cookie): New prototype.
2114 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
2115 (mips_option_override): Enable TARGET_LOONGSON_EXT when
2116 TARGET_LOONGSON_EXT2 is true.
2117 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
2118 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
2119 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
2120 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
2121 TARGET_LOONGSON_EXT2.
2122 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
2123 (define_insn "ctz<mode>2"): New insn pattern.
2124 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
2125 (define_insn "prefetch_indexed_<mode>"): Include
2126 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
2127 * config/mips/mips.opt (-mloongson-ext2): Add option.
2128 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
2130 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2132 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
2133 __mips_loongson_ext.
2134 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
2135 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
2137 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
2138 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
2139 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
2140 instead of TARGET_LOONGSON_3A.
2141 * config/mips/mips.opt (-mloongson-ext): Add option.
2142 * gcc/doc/invoke.texi (-mloongson-ext): Document.
2144 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2146 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
2147 * config/mips/loongson.md: Move to ...
2148 * config/mips/loongson-mmi.md: here; Adjustment.
2149 * config/mips/loongson.h: Move to ...
2150 State as deprecated. Include loongson-mmiintrin.h for back
2151 compatibility and warning.
2152 * config/mips/loongson-mmiintrin.h: ... here.
2153 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
2154 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
2155 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2156 (mips_option_override): Make sure MMI use hard float;
2157 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
2158 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
2159 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
2160 TARGET_LOONGSON_VECTORS.
2161 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
2162 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
2163 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
2164 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2166 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2167 TARGET_LOONGSON_VECTORS.
2168 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2169 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2170 (Loongson MMI patterns): Include loongson-mmi.md instead of
2172 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
2173 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
2175 2018-11-07 Richard Biener <rguenther@suse.de>
2178 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
2179 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2181 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
2183 PR rtl-optimization/87874
2184 * lra.c (lra_substitute_pseudo): Do not create a subreg for
2187 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
2189 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
2190 if not in indexed or indirect form.
2191 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
2192 (bswap<mode>2_store): Ditto.
2194 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
2196 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
2199 2018-11-06 Richard Biener <rguenther@suse.de>
2201 PR tree-optimization/86850
2202 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
2203 instead of src.m_vec.
2205 2018-11-06 Jan Hubicka <jh@suse.cz>
2207 * tree.c (fld_simplified_type_name): Break out form ...
2208 (free_lang_data_in_type): ... here.
2209 (fld_type_variant_equal_p): Use it.
2211 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2213 * config/default-d.c: Include memmodel.h.
2215 * config/sol2-d.c: New file.
2216 * config/t-sol2 (sol2-d.o): New rule.
2217 * config.gcc <*-*-solaris2*>: Set d_target_objs,
2218 target_has_targetdm.
2220 2018-11-06 Jan Hubicka <jh@suse.cz>
2222 * tree.c (fld_type_variant): Also copy alignment; be sure that
2223 new variant is equal.
2225 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
2228 * config/s390/s390.md: Add relative_long attribute.
2230 2018-11-06 Jan Hubicka <jh@suse.cz>
2232 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2233 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2234 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2235 stream TYPE_NEEDS_CONSTRUCTING.
2236 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2237 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2239 2018-11-06 Richard Biener <rguenther@suse.de>
2241 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2243 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2245 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2247 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2248 REG_CLASS_CONTENTS[GEN_REGS].
2249 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2251 2018-11-06 Jan Hubicka <jh@suse.cz>
2253 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2255 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2258 * config/sol2.h (ASAN_CC1_SPEC): Define.
2259 (LD_WHOLE_ARCHIVE_OPTION): Define.
2260 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2261 (ASAN_REJECT_SPEC): Provide default.
2262 (LIBASAN_EARLY_SPEC): Define.
2263 (LIBTSAN_EARLY_SPEC): Define.
2264 (LIBLSAN_EARLY_SPEC): Define.
2265 * config/i386/sol2.h (CC1_SPEC): Redefine.
2266 (ASAN_REJECT_SPEC): Define.
2268 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2269 (TARGET_ASAN_SHADOW_OFFSET): Define.
2270 (sparc_asan_shadow_offset): New function.
2271 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2272 (ASAN_REJECT_SPEC): Define.
2274 2018-11-06 Jan Hubicka <jh@suse.cz>
2276 * tree.c (fld_type_variant): Copy canonical type.
2277 (fld_incomplete_type_of): Check that canonical types looks sane;
2278 copy canonical type.
2279 (verify_type): Accept when incomplete type has complete canonical type.
2281 2018-11-06 Jan Hubicka <jh@suse.cz>
2283 * tree.c (free_lang_data): Reset overwite_assembler_name,
2284 print_xnode, print_decl, print_type and print_identifier of
2287 2018-11-06 Richard Biener <rguenther@suse.de>
2289 PR tree-optimization/87889
2290 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2291 Do nothing if old and new arg are the same
2293 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
2296 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2297 attributes for operands 3 and 4.
2299 2018-11-06 Richard Biener <rguenther@suse.de>
2302 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2303 matching bitfield insertion.
2305 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
2307 * auto-inc-dec.c: Include valtrack.h. Improve comments.
2308 (reg_next_debug_use): New.
2309 (attempt_change): Propagate adjusted expression into affected
2311 (merge_in_block): Track uses in debug insns.
2312 (pass_inc_dec::execute): Allocate and release
2315 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2317 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2318 (_mm512_fixupimm_round_pd): Update parameters and builtin.
2319 (_mm512_maskz_fixupimm_round_pd): Ditto.
2320 (_mm512_fixupimm_round_ps): Ditto.
2321 (_mm512_maskz_fixupimm_round_ps): Ditto.
2322 (_mm_fixupimm_round_sd): Ditto.
2323 (_mm_maskz_fixupimm_round_sd): Ditto.
2324 (_mm_fixupimm_round_ss): Ditto.
2325 (_mm_maskz_fixupimm_round_ss): Ditto.
2326 (_mm512_fixupimm_pd): Ditto.
2327 (_mm512_maskz_fixupimm_pd): Ditto.
2328 (_mm512_fixupimm_ps): Ditto.
2329 (_mm512_maskz_fixupimm_ps): Ditto.
2330 (_mm_fixupimm_sd): Ditto.
2331 (_mm_maskz_fixupimm_sd): Ditto.
2332 (_mm_fixupimm_ss): Ditto.
2333 (_mm_maskz_fixupimm_ss): Ditto.
2334 (_mm512_mask_fixupimm_round_pd): Update builtin.
2335 (_mm512_mask_fixupimm_round_ps): Ditto.
2336 (_mm_mask_fixupimm_round_sd): Ditto.
2337 (_mm_mask_fixupimm_round_ss): Ditto.
2338 (_mm512_mask_fixupimm_pd): Ditto.
2339 (_mm512_mask_fixupimm_ps): Ditto.
2340 (_mm_mask_fixupimm_sd): Ditto.
2341 (_mm_mask_fixupimm_ss): Ditto.
2342 * config/i386/avx512vlintrin.h:
2343 (_mm256_fixupimm_pd): Update parameters and builtin.
2344 (_mm256_maskz_fixupimm_pd): Ditto.
2345 (_mm256_fixupimm_ps): Ditto.
2346 (_mm256_maskz_fixupimm_ps): Ditto.
2347 (_mm_fixupimm_pd): Ditto.
2348 (_mm_maskz_fixupimm_pd): Ditto.
2349 (_mm_fixupimm_ps): Ditto.
2350 (_mm_maskz_fixupimm_ps): Ditto.
2351 (_mm256_mask_fixupimm_pd): Update builtin.
2352 (_mm256_mask_fixupimm_ps): Ditto.
2353 (_mm_mask_fixupimm_pd): Ditto.
2354 (_mm_mask_fixupimm_ps): Ditto.
2355 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2356 * config/i386/i386-builtin.def: Update builtin definitions.
2357 * config/i386/i386.c: Handle new builtin types and remove useless ones.
2358 * config/i386/sse.md: Update VFIXUPIMM* patterns.
2359 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2360 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2361 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2362 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2363 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2364 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2365 * config/i386/subst.md:
2366 (round_saeonly_sd_mask_operand4): Add new subst_attr.
2367 (round_saeonly_sd_mask_op4): Ditto.
2368 (round_saeonly_expand_operand5): Ditto.
2369 (round_saeonly_expand): Update.
2371 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2373 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2375 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
2377 PR rtl-optimization/87871
2378 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2380 2018-11-05 Paul Koning <ni1d@arrl.net>
2382 * doc/sourcebuild.texi (target attributes): Document new "inf"
2383 effective target keyword.
2385 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2387 * config/s390/s390.c (s390_register_move_cost): Increase costs for
2388 moves involving the CC reg.
2390 2018-11-05 Richard Biener <rguenther@suse.de>
2392 PR tree-optimization/87873
2393 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2395 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2396 * tree-vect-loop.c (vect_transform_loop): When splitting the
2397 loop exit also create forwarder PHIs for constants.
2398 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2399 Handle constant to_arg, add extra checking we match up the correct
2402 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2404 * config/s390/s390.md: QImode and HImode for load on condition.
2406 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
2408 * config/s390/predicates.md: Fix typo.
2409 * config/s390/s390.md: Allow immediates for load on condition.
2411 2018-11-05 Martin Liska <mliska@suse.cz>
2413 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2414 * bitmap.h (struct bitmap_usage): Likewise.
2415 * ggc-common.c (SCALE): Remove.
2417 (struct ggc_usage): Use SIZE_AMOUNT. And update
2419 * ggc-page.c (SCALE): Remove.
2420 (STAT_LABEL): Remove.
2421 (ggc_print_statistics): Use SIZE_AMOUNT.
2422 * gimple.h (SCALE): Remove.
2424 * input.c (ONE_K): Remove.
2427 (STAT_LABEL): Likewise.
2428 (FORMAT_AMOUNT): Likewise.
2429 (dump_line_table_statistics): Use SIZE_AMOUNT.
2430 * mem-stats.h (struct mem_usage): Likewise.
2431 * rtl.c (dump_rtx_statistics): Likewise.
2432 (rtx_alloc_counts): Change type to size_t.
2433 (rtx_alloc_sizes): Likewise.
2434 (rtx_count_cmp): New.
2435 (dump_rtx_statistics): Sort first based on counts.
2436 * tree.c (tree_nodes_cmp): New.
2437 (tree_codes_cmp): New.
2438 (dump_tree_statistics): Sort first based on counts.
2439 * system.h (ONE_K): New.
2441 (SIZE_SCALE): Likewise.
2442 (SIZE_LABEL): Likewise.
2443 (SIZE_AMOUNT): Likewise.
2444 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2445 * tree-dfa.c (dump_dfa_stats): Likewise.
2446 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2447 * tree-ssanames.c (ssanames_print_statistics): Likewise.
2448 * tree.c (dump_tree_statistics): Likewise.
2449 * vec.c (struct vec_usage): Likewise.
2450 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2451 trigger a -Werror=format-overflow with
2452 --enable-gather-detailed-stats.
2454 2018-11-05 Martin Liska <mliska@suse.cz>
2456 * mem-stats.h (mem_alloc_description::release_instance_overhead):
2458 * vec.c (struct vec_usage): Register m_element_size.
2459 (vec_prefix::register_overhead): New arguments: elements and
2461 (vec_prefix::release_overhead): Subtract elements.
2462 * vec.h (struct vec_prefix): Change signature.
2463 (va_heap::reserve): Pass proper arguments.
2464 (va_heap::release): Likewise.
2466 2018-11-05 Martin Liska <mliska@suse.cz>
2468 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2472 2018-11-05 Richard Biener <rguenther@suse.de>
2474 * tree-scalar-evolution.h (final_value_replacement_loop): Update
2476 * tree-scalar-evolution.c (final_value_replacement_loop): Return
2477 whether anything was done.
2478 (scev_const_prop): Remove constant propagation part, fold
2480 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2481 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2484 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2486 PR tree-optimization/87859
2487 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2488 only_constants and first_nonmergeable_order members.
2489 (merged_store_group::merged_store_group): Initialize them.
2490 (merged_store_group::do_merge): Clear only_constants member if
2491 adding something other than INTEGER_CST store.
2492 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2493 stores with order >= first_nonmergeable_order. Use
2494 merged_store->only_constants instead of always recomputing it.
2495 Set merged_store->first_nonmergeable_order if we've skipped any
2496 stores. Attempt to merge overlapping INTEGER_CST stores that
2497 we would otherwise skip.
2500 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2502 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2505 * config/i386/emmintrin.h (__v16qs): New to cope with option
2507 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2508 (_mm_cmplt_epi8): Likewise.
2509 (_mm_cmpgt_epi8): Likewise.
2511 2018-11-05 Richard Biener <rguenther@suse.de>
2513 PR rtl-optimization/87852
2514 * fwprop.c (use_killed_between): Only consider single-defs of the
2515 use whose definition statement dominates the use.
2517 2018-11-05 Martin Liska <mliska@suse.cz>
2520 * doc/invoke.texi: Remove options that are
2521 not disabled with -Os.
2523 2018-11-05 Martin Liska <mliska@suse.cz>
2526 * doc/extend.texi: Update constrain about the last argument
2527 of __builtin_expect_with_probability.
2529 2018-11-05 Martin Liska <mliska@suse.cz>
2532 * predict.c (expr_expected_value_1): Verify
2533 that last argument is a real constants and emit
2536 2018-11-05 Martin Liska <mliska@suse.cz>
2538 PR gcov-profile/77698
2539 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2542 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2544 PR tree-optimization/86572
2545 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2547 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2549 PR tree-optimization/87672
2550 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2551 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2553 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2556 * cfgexpand.c (pass_expand::execute): Move the call to
2557 finish_eh_generation in front of the call to expand_stack_alignment.
2559 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2561 * common/config/i386/i386-common.c (processor_alias_table): Add
2563 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2564 (case ${target}): Add znver2.
2565 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2566 -march=native recognize znver2 processors.
2567 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2568 * config/i386/i386.c (m_znver2): New definition.
2569 (m_ZNVER): New definition.
2570 (m_AMD_MULTIPLE): Includes m_znver2.
2571 (processor_cost_table): Add znver2 entry.
2572 (processor_target_table): Add znver2 entry.
2573 (get_builtin_code_for_version): Set priority for
2575 (processor_model): Add M_AMDFAM17H_ZNVER2.
2576 (arch_names_table): Ditto.
2577 (ix86_reassociation_width): Include znver2.
2578 * config/i386/i386.h (TARGET_znver2): New definition.
2579 (struct ix86_size_cost): Add TARGET_ZNVER2.
2580 (enum processor_type): Add PROCESSOR_ZNVER2.
2581 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2582 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2583 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2584 (ix86_adjust_cost): Add znver2.
2585 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2586 * gcc/doc/extend.texi: Add details about znver2.
2587 * gcc/doc/invoke.texi: Add details about znver2.
2589 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2593 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2596 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2598 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2599 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2601 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
2603 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2604 shrink-wrapping when -mtrack-speculation.
2606 2018-11-02 Richard Biener <rguenther@suse.de>
2608 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2609 (pop_cost_one_pair): Do not free pair.
2610 (pop_best_coalesce): Likewise.
2611 (create_coalesce_list): Initialize obstack.
2612 (delete_coalesce_list): Free obstack.
2613 (find_coalesce_pair): Obstack-allocate coalesce pairs.
2614 (add_cost_one_coalesce): Likewise.
2615 (struct live_track): Remove bitmap pointer indirections.
2616 (new_live_track): Adjust.
2617 (delete_live_track): Likewise.
2618 (live_track_remove_partition): Likewise.
2619 (live_track_add_partition): Likewise.
2620 (live_track_live_p): Likewise.
2621 (live_track_process_def): Likewise.
2622 (live_track_clear_base_vars): Likewise.
2624 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2626 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2627 * configure: Regenerate.
2628 * config.in: Regenerate.
2629 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2630 HAVE_AS_REGISTER_PSEUDO_OP guard.
2631 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2632 !HAVE_AS_REGISTER_PSEUDO_OP support.
2633 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2636 2018-11-02 Richard Biener <rguenther@suse.de>
2638 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2641 2018-11-02 Richard Biener <rguenther@suse.de>
2643 PR tree-optimization/87776
2644 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2645 executable when iterating but running into rpo-vn-max-loop-depth
2646 and not eliding the iteration.
2648 2018-11-30 Jan Hubicka <jh@suse.cz>
2650 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2653 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
2655 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2657 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2658 Combine with rs6000_address_for_fpconvert.
2659 (rs6000_address_for_fpconvert): Combine with
2660 rs6000_force_indexed_or_indirect_mem.
2661 (rs6000_expand_vector_init): Change function call from
2662 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2663 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2664 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2665 (floatsi<mode>2_lfiwax_mem): Ditto.
2666 (floatunssi<mode>2_lfiwzx): Ditto.
2667 (floatunssi<mode>2_lfiwzx_mem): Ditto.
2668 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2669 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2670 (fix_trunc<mode>si2_stfiwx): Ditto.
2671 (fixuns_trunc<mode>si2_stfiwx): Ditto.
2672 (float_<mode>si2_hw): Ditto.
2673 (floatuns_<mode>si2_hw): Ditto.
2674 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2675 (vsx_splat_<mode>): Ditto.
2677 2018-11-01 Joseph Myers <joseph@codesourcery.com>
2679 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2680 at end of assembler input text.
2681 * configure: Regenerate.
2683 2018-11-01 Jakub Jelinek <jakub@redhat.com>
2685 PR tree-optimization/87826
2686 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2687 negative or larger or equal to type's precision.
2689 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
2691 * opts.c (default_options_table): Do not enable
2692 OPT_fdelayed_branch at -Og.
2693 * doc/invoke.texi (-fdelayed-branch): Document it.
2695 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2697 * optabs-libfuncs.c (build_libfunc_function_visibility):
2698 New, split out from...
2699 (build_libfunc_function): ... here.
2700 (init_one_libfunc_visibility): New, split out from ...
2701 (init_one_libfunc): ... here.
2703 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2704 scratch register need not be early-clobber. Document the reason
2705 why we cannot use ST<OP>.
2707 2018-10-31 Joseph Myers <joseph@codesourcery.com>
2710 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
2711 line for second argument of AC_DEFINE_UNQUOTED.
2712 * doc/install.texi (Tools/packages necessary for modifying GCC):
2713 Update to autoconf 2.69 and automake 1.15.1.
2714 * aclocal.m4, config.in, configure: Regenerate.
2716 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
2718 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2721 2018-10-31 Martin Liska <mliska@suse.cz>
2724 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2725 Add new argument invalid_extension.
2726 (aarch64_get_all_extension_candidates): New function.
2727 (aarch64_rewrite_selected_cpu): Add NULL to function call.
2728 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2730 (aarch64_get_all_extension_candidates): New function.
2731 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2732 argument invalid_extension.
2733 (aarch64_parse_cpu): Likewise.
2734 (aarch64_print_hint_for_extensions): New function.
2735 (aarch64_validate_mcpu): Provide hint about invalid extension.
2736 (aarch64_validate_march): Likewise.
2737 (aarch64_handle_attr_arch): Pass new argument.
2738 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2739 (aarch64_handle_attr_isa_flags): Likewise.
2741 2018-10-31 Richard Biener <rguenther@suse.de>
2745 * tree-outof-ssa.c (insert_backedge_copies): Restrict
2746 copy generation to useful cases. Place the copy before
2747 the definition of the backedge value when possible.
2749 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2751 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2752 * config/arc/arc.c (arc_active_insn): New function.
2753 (check_store_cacheline_hazard): Likewise.
2754 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2755 (arc_override_options): Disable delay slot scheduler for older
2757 (arc_store_addr_hazard_p): New implementation, old one renamed to
2759 (arc_store_addr_hazard_internal_p): Renamed.
2760 (arc_reorg): Don't combine into brcc instructions which are part
2761 of hardware hazard solution.
2762 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2763 (tune_arc700): Likewise.
2764 * config/arc/arc.opt (arc7xx): New tune value.
2765 * config/arc/arc700.md: Improve A7 scheduler.
2767 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2769 * config/arc/arc.c (arc_override_options): Remove
2770 TARGET_COMPACT_CASESI.
2771 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2772 (CASE_VECTOR_MODE): Likewise.
2773 (CASE_VECTOR_PC_RELATIVE): Likewise.
2774 (CASE_VECTOR_SHORTEN_MODE): Likewise.
2775 (CASE_VECTOR_SHORTEN_MODE1): Delete.
2776 (ADDR_VEC_ALIGN): Update.
2777 (ASM_OUTPUT_CASE_LABEL): Undefine.
2778 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2779 (TARGET_BI_BIH): Define.
2780 (DEFAULT_BRANCH_INDEX): Likewise.
2781 * config/arc/arc.md (casesi): Rework to accept BI/BIH
2782 instructions, remove compact_casesi use case.
2783 (casesi_compact_jump): Remove.
2784 (casesi_dispatch): New pattern.
2785 * config/arc/arc.opt: Add mbranch-index option. Deprecate
2786 compact_casesi option.
2787 * doc/invoke.texi: Document mbranch-index option.
2789 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2791 * config/arc/arc.c (arc_get_tp): Remove function.
2792 (arc_emit_call_tls_get_addr): Likewise.
2793 (arc_call_tls_get_addr): New function.
2794 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2795 * config/arc/arc.md (tls_load_tp_soft): Remove.
2796 (tls_gd_get_addr): Likewise.
2798 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2800 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2801 (mulsi3_600_lib): Remove pattern.
2802 (umulsi3_highpart_600_lib_le): Likewise.
2803 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2804 (umulsidi3): Remove call to umulsidi3_600_lib.
2805 (umulsidi3_600_lib): Remove pattern.
2806 (peephole2): Remove peephole using the above deprecated patterns.
2808 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2811 * config/arm/arm.c (arm_option_check_internal): Disable the combined
2812 use of -mslow-flash-data and -mword-relocations.
2813 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2814 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2816 * doc/invoke.texi (-mword-relocations): Mention conflict with
2818 (-mslow-flash-data): Reciprocally.
2820 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2822 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2823 16-byte modes held in GP registers to use an even regno.
2825 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2826 (aarch64_atomic_ldop_supported_p): Remove.
2827 (aarch64_gen_atomic_ldop): Remove.
2828 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2829 Fully expand LSE operations here.
2830 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2831 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2832 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2833 and use ATOMIC_LDOP instead; use register_operand for the input;
2834 drop the split and emit insns directly.
2835 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2836 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2837 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2839 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2840 (aarch64_gen_atomic_ldop): Don't call it.
2841 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2842 Use aarch64_reg_or_zero.
2843 (aarch64_atomic_exchange<ALLI>): Likewise.
2844 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2845 operand 0; use aarch64_reg_or_zero for input; merge ...
2846 (@aarch64_atomic_swp<ALLI>): ... this and remove.
2848 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2849 (aarch64_split_compare_and_swap): Use it.
2850 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
2851 test oldval against the proper predicate.
2852 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2853 Use nonmemory_operand for expected.
2854 (cas_short_expected_pred): New.
2855 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2856 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2857 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2858 (aarch64_plushi_operand): New.
2860 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2861 Force oldval into the rval register for TARGET_LSE; emit the compare
2862 during initial expansion so that it may be deleted if unused.
2863 (aarch64_gen_atomic_cas): Remove.
2864 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2865 Change =&r to +r for operand 0; use match_dup for operand 2;
2866 remove is_weak and mod_f operands as unused. Drop the split
2868 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2869 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2870 (@aarch64_atomic_cas<GPI>): Similarly.
2872 2018-10-31 Richard Biener <rguenther@suse.de>
2874 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2877 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2879 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2880 * config/aarch64/aarch64.md: Include saphira.md
2881 * config/aarch64/saphira.md: New file for pipeline description.
2883 2018-10-30 Martin Sebor <msebor@redhat.com>
2886 * gimple-ssa-sprintf.c (format_directive): Use %G to include
2888 (sprintf_dom_walker::compute_format_length):
2889 Avoid setting POSUNDER4K here.
2890 (get_destination_size): Handle null argument values.
2891 (get_user_idx_format): New function.
2892 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2893 functions, including user-defined with attribute format printf.
2894 Use %G to include inlining context.
2895 Set POSUNDER4K here.
2897 2018-10-30 Jan Hubicka <jh@suse.cz>
2899 * params.def (lto-partitions): Bump from 32 to 128.
2901 2018-10-30 Jan Hubicka <jh@suse.cz>
2904 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2906 (free_lang_data_in_type): Forward declare.
2907 (fld_type_variant_equal_p): New function.
2908 (fld_type_variant): New function
2909 (fld_incomplete_types): New hash.
2910 (fld_incomplete_type_of): New function
2911 (fld_simplfied-type): New function.
2912 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2913 (free_lang_data): Allocate and free fld_incomplete_type; update call
2914 of free_lang_data_in_decl.
2916 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
2918 * gcov.c (output_lines): Remove duplicate line.
2920 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2922 * config/rs6000/rs6000.md (bswapdi2): Force address into register
2923 if not in indexed or indirect form.
2924 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2925 (bswapdi2_store): Ditto.
2926 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2928 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2929 Prototype for helper function.
2931 2018-10-30 Martin Sebor <msebor@redhat.com>
2933 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2934 (target, pragma GCC optimize, pragma GCC target): Ditto.
2936 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
2938 * doc/extend.texi: Fix prototype and description of
2939 __builtin_expect_with_probability.
2941 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2943 * cgraph.h (clone_function_name_1): Replaced by new
2944 clone_function_name_numbered that takes name as string; for
2945 privatize_symbol_name_1 use only.
2946 (clone_function_name): Renamed to
2947 clone_function_name_numbered to be explicit about numbering.
2948 (clone_function_name): New two-argument function that does
2949 not number its output.
2950 (clone_function_name): New three-argument function that
2951 takes a number to append to its output.
2952 * cgraphclones.c (duplicate_thunk_for_node):
2953 (clone_function_name_1): Renamed.
2954 (clone_function_name_numbered): Two new functions.
2955 (clone_function_name): Improved documentation.
2956 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2957 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2958 * final.c (final_scan_insn_1): Use the new clone_function_name
2960 * multiple_target.c (create_dispatcher_calls): Ditto.
2961 (create_target_clone): Ditto.
2962 * omp-expand.c (grid_expand_target_grid_body): Ditto.
2963 * omp-low.c (create_omp_child_function_name): Ditto.
2964 * omp-simd-clone.c (simd_clone_create): Ditto.
2965 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2966 new clone_function_name without numbering.
2968 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
2970 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2971 Assert that the allocation size is not zero.
2973 2018-10-30 Richard Biener <rguenther@suse.de>
2975 PR tree-optimization/87800
2976 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2977 non-induction or reduction PHIs.
2979 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2981 * config/aarch64/falkor-tag-collision-avoidance.c
2982 (execute_tag_collision_avoidance): Call df_note_add_problem.
2984 2018-10-30 Martin Liska <mliska@suse.cz>
2986 * doc/extend.texi: Fix typo in documentation
2987 of __builtin_expect_with_probability.
2989 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2992 * input.c (get_substring_ranges_for_loc): Detect if
2993 linemap_resolve_location gives us a NULL map, and reject
2996 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
2998 * config.gcc (xstormy16-*-elf): Set tm_d_file.
3000 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3001 Martin Sebor <msebor@redhat.com>
3002 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3004 * doc/ux.texi (Quoting): New subsection, adapted from material at
3005 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
3006 MartinSebor and ManuelLopezIbanez.
3007 (Fix-it hints): Note that fix-it hints shouldn't be marked for
3010 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
3013 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
3016 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3018 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
3020 2018-10-29 Paul Koning <ni1d@arrl.net>
3022 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
3024 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
3026 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
3027 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
3028 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
3029 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
3030 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
3031 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
3032 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
3033 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
3034 Change 'vector' to '__vector'.
3035 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
3036 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
3037 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
3038 _mm_avg_pu16): Likewise. And, whitespace corrections.
3040 2018-10-29 Richard Biener <rguenther@suse.de>
3042 PR tree-optimization/87785
3043 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
3046 2018-10-29 Olivier Hainque <hainque@adacore.com>
3048 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
3050 2018-10-29 Olivier Hainque <hainque@adacore.com>
3052 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
3053 ports configuration macro, defaults to "gnu".
3054 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
3055 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
3057 2018-10-29 Olivier Hainque <hainque@adacore.com>
3059 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
3061 2018-10-29 Richard Biener <rguenther@suse.de>
3063 PR tree-optimization/87790
3064 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
3065 (vect_make_slp_decision): Adjust.
3066 (vect_slp_analyze_bb_1): Likewise.
3067 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
3070 2018-10-29 Richard Biener <rguenther@suse.de>
3072 PR tree-optimization/87785
3073 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
3075 (vect_build_slp_tree): Likewise.
3076 (vect_gather_slp_loads): New function.
3077 (vect_analyze_slp_instance): Gather loads separately from the
3080 2018-10-29 Martin Liska <mliska@suse.cz>
3082 * Makefile.in: Make dependency to json.o.
3083 * doc/gcov.texi: Document new JSON format, remove
3084 old intermediate format documentation.
3085 * gcov.c (struct function_info): Come up with m_name and
3087 (function_info::function_info): Initialize it.
3088 (function_info::~function_info): Release it.
3089 (main): Rename flag_intermediate_format to flag_json_format.
3090 (print_usage): Describe --json-format.
3091 (process_args): Set flag_json_format.
3092 (output_intermediate_line): Remove.
3093 (output_intermediate_json_line): Likewise.
3094 (get_gcov_intermediate_filename): Return new extension
3096 (output_intermediate_file): Implement JSON emission.
3097 (output_json_intermediate_file): Implement JSON emission.
3098 (generate_results): Use ::get_name for function name.
3099 Handle JSON output file.
3100 (read_graph_file): Use ::get_name instead of cplus_demangle.
3101 (read_count_file): Likewise.
3102 (solve_flow_graph): Likewise.
3103 (add_line_counts): Likewise.
3104 (accumulate_line_counts): Use new flag_json_format.
3105 (output_function_details): Use ::get_name instead of cplus_demangle.
3106 (output_lines): Likewise.
3107 * json.cc (test_writing_literals): Add new tests.
3108 * json.h (class literal): Add new boolean constructor.
3110 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
3112 PR rtl-optimization/87701
3113 PR rtl-optimization/87780
3114 * combine.c (make_more_copies): Rewrite.
3116 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
3118 * doc/generic.texi (ABSU_EXPR): Document.
3119 * match.pd (absu(x)*absu(x) -> x*x): Handle.
3120 (absu(absu(X)) -> absu(X)): Likewise.
3121 (absu(-X) -> absu(X)): Likewise.
3122 (absu(X) where X is nonnegative -> X): Likewise.
3124 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
3126 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
3127 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
3128 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
3129 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
3130 (s-tm-texi): Also check timestamp on d-target.def.
3131 (generated_files): Add TM_D_H and d-target-hooks-def.h.
3132 (build/genhooks.o): Also depend on D_TARGET_DEF.
3133 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
3135 * config/aarch64/aarch64-d.c: New file.
3136 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
3138 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
3140 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
3141 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
3142 * config/arm/arm-d.c: New file.
3143 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
3144 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
3145 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3146 * config/arm/t-arm (arm-d.o): New rule.
3147 * config/default-d.c: New file.
3148 * config/glibc-d.c: New file.
3149 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3150 * config/i386/i386-d.c: New file.
3151 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
3152 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
3153 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3154 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
3155 * config/i386/t-i386 (i386-d.o): New rule.
3156 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3157 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3158 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
3159 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3160 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3161 * config/mips/mips-d.c: New file.
3162 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
3163 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
3164 * config/mips/t-mips (mips-d.o): New rule.
3165 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3166 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3167 * config/powerpcspe/powerpcspe-d.c: New file.
3168 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3170 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3171 Support GNU D by using 0 as the language type.
3172 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
3173 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
3174 * config/riscv/riscv-d.c: New file.
3175 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
3177 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
3178 * config/riscv/t-riscv (riscv-d.o): New rule.
3179 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3180 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3181 * config/rs6000/rs6000-d.c: New file.
3182 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
3184 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3185 Support GNU D by using 0 as the language type.
3186 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
3187 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
3188 * config/s390/s390-d.c: New file.
3189 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
3190 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
3191 * config/s390/t-s390 (s390-d.o): New rule.
3192 * config/sparc/sparc-d.c: New file.
3193 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
3195 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
3196 * config/sparc/t-sparc (sparc-d.o): New rule.
3197 * config/t-glibc (glibc-d.o): New rule.
3198 * configure: Regenerated.
3199 * configure.ac (tm_d_file): New variable.
3200 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
3201 * doc/contrib.texi (Contributors): Add self for the D frontend.
3202 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
3203 * doc/install.texi (Configuration): Mention libphobos as an option for
3204 --enable-shared. Mention d as an option for --enable-languages.
3205 (Testing): Mention check-d as a target.
3206 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3207 name suffixes. Mention d as a -x option.
3208 * doc/sourcebuild.texi (Top Level): Mention libphobos.
3209 * doc/standards.texi (Standards): Add section on D language.
3210 * doc/tm.texi: Regenerated.
3211 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3212 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3213 * dwarf2out.c (is_dlang): New function.
3214 (gen_compile_unit_die): Use DW_LANG_D for D.
3215 (declare_in_namespace): Return module die for D, instead of adding
3216 extra declarations into the namespace.
3217 (gen_namespace_die): Generate DW_TAG_module for D.
3218 (gen_decl_die): Handle CONST_DECLSs for D.
3219 (dwarf2out_decl): Likewise.
3220 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3221 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3222 kinds of aggregates.
3223 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3224 * genhooks.c: Include d/d-target.def.
3226 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
3229 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3230 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3231 (STACK_DYNAMIC_OFFSET): Likewise.
3233 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
3236 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3239 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3241 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3242 return type and other typos.
3244 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3246 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3247 a shorter sequence with fewer branches.
3248 (emit_final_str_compare_gpr): Ditto.
3250 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3252 * config/rs6000/tmmintrin.h: New file.
3253 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3255 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3257 * config/rs6000/mmintrin.h: Enable 32bit compilation.
3258 * config/rs6000/xmmintrin.h: Likewise.
3260 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
3262 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3264 2018-10-26 Richard Biener <rguenther@suse.de>
3266 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3268 (vect_mark_slp_stmts_relevant): Likewise.
3269 (vect_detect_hybrid_slp_stmts): Likewise.
3270 (vect_bb_slp_scalar_cost): Likewise.
3271 (vect_remove_slp_scalar_calls): Likewise.
3273 2018-10-26 Jan Hubicka <jh@suse.cz>
3275 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3276 (warn_types_mismatch): Fix walk of DECL_NAME.
3277 (odr_types_equivalent_p): Fix overactive assert.
3279 2018-10-26 Richard Biener <rguenther@suse.de>
3281 PR tree-optimization/87105
3282 * tree-vectorizer.h (_slp_tree::refcnt): New member.
3283 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3285 (vect_create_new_slp_node): Initialize refcnt to one.
3287 (scalar_stmts_set_t, bst_fail): Remove.
3288 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3289 (vect_build_slp_tree): Add bst_map argument and lookup
3290 already created SLP nodes.
3291 (vect_print_slp_tree): Handle a SLP graph, print SLP node
3293 (vect_slp_rearrange_stmts): Handle a SLP graph.
3294 (vect_analyze_slp_instance): Adjust and free SLP nodes from
3295 the CSE map. Fix indenting.
3296 (vect_schedule_slp_instance): Add short-cut.
3298 2018-10-26 Martin Liska <mliska@suse.cz>
3301 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3302 addr_expr and not with pointers.
3304 2018-10-26 Jan Hubicka <jh@suse.cz>
3306 * tree.c (free_lang_data_in_type): Only check main variants.
3307 * ipa-devirt.c (warn_odr): Make static.
3308 (types_same_for_odr): Drop strict variant.
3309 (types_odr_comparable): Likewise.
3310 (odr_or_derived_type_p): Look for main variants.
3311 (odr_name_hasher::equal): Cleanup comment.
3312 (odr_subtypes_equivalent): Add warn and warned arguments; check main
3314 (type_variants_equivalent_p): break out from ...
3315 (odr_types_equivalent): ... here; go for main variants where needed.
3316 (warn_odr): ... here; turn static.
3317 (warn_types_mismatch): Compare mangled names of main variants.
3318 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3319 (type_with_linkage_p): Sanity check that we look at main variant.
3320 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3321 * tree.h (types_same_for_odr): Drop strict argument.
3323 2018-10-26 Richard Biener <rguenther@suse.de>
3325 PR tree-optimization/87746
3326 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3327 Simplify and fix WRT strided store groups with size not
3328 equal to step in element count.
3329 (vect_analyze_group_access_1): Dump the whole group.
3331 2018-10-25 Carl Love <cel@us.ibm.com>
3333 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3334 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3335 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
3336 precicion entry for each overloaded builtin.
3337 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3338 VSCEDPUO): Rename overloaded name.
3339 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3340 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3341 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3342 define_expand for xscmpexqp instruction.
3343 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3345 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3346 Jinsong Ji <jji@us.ibm.com>
3348 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3349 function with vec_sl.
3350 (_mm_slli_epi32): Likewise.
3351 (_mm_slli_epi64): Likewise.
3352 (_mm_srai_epi16): Replace deprecated function with vec_sra.
3353 (_mm_srai_epi32): Likewise.
3354 (_mm_srli_epi16): Replace deprecated function with vec_sr.
3355 (_mm_srli_epi32): Likewise.
3356 (_mm_srli_epi64): Likewise.
3357 (_mm_sll_epi16): Replace deprecated function with vec_sl.
3358 (_mm_sll_epi32): Likewise.
3359 (_mm_sll_epi64): Likewise.
3360 (_mm_sra_epi16): Replace deprecated function with vec_sra.
3361 (_mm_sra_epi32): Likewise.
3362 (_mm_srl_epi16): Replace deprecated function with vec_sr.
3363 (_mm_srl_epi32): Likewise.
3364 (_mm_srl_epi64): Likewise.
3366 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3367 Jinsong Ji <jji@us.ibm.com>
3369 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3370 comparison operators with vec_cmp* for compatibility due to
3371 unfortunate history; clean up formatting and use types more
3373 (_mm_sll_epi32): Likewise.
3374 (_mm_sll_epi64): Likewise.
3375 (_mm_srl_epi16): Likewise.
3376 (_mm_srl_epi32): Likewise.
3377 (_mm_srl_epi64): Likewise.
3379 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
3380 Jinsong Ji <jji@us.ibm.com>
3382 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3383 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3384 __vector __bool int. Use vec_cmpgt in preference to deprecated
3385 function vec_vcmpgtfp.
3386 (_mm_max_ps): Likewise.
3388 2018-10-25 Jeff Law <law@redhat.com>
3390 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3393 2018-10-25 Martin Sebor <msebor@redhat.com>
3395 * doc/extend.texi (aligned): Expand attribute description.
3396 (Alignment): Rename section. Discuss function arguments.
3398 2018-10-25 Jan Hubicka <jh@suse.cz>
3400 * ipa-devirt.c (main_odr_variant): Remove.
3401 (hash_odr_name, types_same_for_odr, types_odr_comparable,
3402 odr_name_hasher::equal, odr_subtypes_equivalent_p):
3403 Drop use of main_odr_variant.
3404 (add_type_duplicate): Silence confused warnings on integer types.
3405 (get_odr_type): Always look for main variant.
3406 (register_odr_type): Simplify.
3408 2018-10-25 Richard Biener <rguenther@suse.de>
3410 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3411 Initialize ng to silence error with release checking bootstrap.
3413 2018-10-25 Richard Biener <rguenther@suse.de>
3415 * tree-if-conv.c: Include tree-ssa-sccvn.h.
3416 (tree_if_conversion): Run CSE on the if-converted loop body.
3418 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3420 * config/s390/constraints.md (ZL): New constraint.
3421 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3423 * config/s390/s390.md (movdi_larl): Remove.
3424 (movdi_64): Add the LARL alternative.
3426 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3429 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3430 (RTX_CODE_HWINT_P): New macro.
3431 (rtx_code_size): Use RTX_CODE_HWINT_P ().
3433 2018-10-25 Jan Hubicka <jh@suse.cz>
3435 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3438 2018-10-25 Richard Biener <rguenther@suse.de>
3440 PR tree-optimization/87665
3441 PR tree-optimization/87745
3442 * tree-vectorizer.h (get_earlier_stmt): Remove.
3443 (get_later_stmt): Pick up UID from the original non-pattern stmt.
3445 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
3447 * options.texi (Deprecated): Move list to Var section.
3449 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
3450 Jinsong Ji <jji@us.ibm.com>
3452 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3453 __vector long to __vector long long.
3454 (_mm_cvtpd_ps): Likewise.
3455 (_mm_cvttpd_epi32): Likewise.
3456 (_mm_cvtpi32_pd): Likewise.
3457 (_mm_unpackhi_epi64): Likewise.
3458 (_mm_unpacklo_epi64): Likewise.
3460 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
3462 PR rtl-optimization/87720
3463 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3465 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
3467 * gimple-ssa-isolate-paths.c
3468 (find_implicit_erroneous_behavior): Do not change code if the
3469 pass is running for warnings only.
3470 (find_explicit_erroneous_behavior): Likewise.
3472 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
3474 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3475 Define as rs6000_mangle_decl_assembler_name.
3476 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3477 long double to IEEE long double, switch the names of the long
3478 double built-in functions to be <func>f128 instead of <func>l.
3480 2018-10-24 Martin Sebor <msebor@redhat.com>
3482 * doc/extend.texi (nonnull): List no-argument form. Reference
3483 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3485 2018-10-24 Richard Biener <rguenther@suse.de>
3487 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3489 2018-10-24 Martin Liska <mliska@suse.cz>
3491 PR tree-optimization/84436
3492 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3494 (switch_conversion::contains_linear_function_p): New.
3495 (switch_conversion::build_one_array): Support linear
3496 transformation on input.
3497 * tree-switch-conversion.h (struct switch_conversion): Add
3498 contains_linear_function_p declaration.
3500 2018-10-24 Richard Biener <rguenther@suse.de>
3502 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3503 if its argument is CONSTANT_CLASS_P.
3505 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3507 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3508 it is wrong for forward declarations.
3510 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3512 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3513 SYMBOL_REF_P () check.
3515 2018-10-24 Richard Biener <rguenther@suse.de>
3517 PR tree-optimization/87105
3518 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3519 dump classification.
3520 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3521 stores by splitting the affected group after the fact.
3522 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3523 fail the SLP build because of size constraints.
3525 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3527 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3528 * configure: Regenerate.
3529 * config.in: Regenerate.
3530 * varasm.c (mergeable_string_section): Use readonly_data_section
3531 if linker doesn't support SHF_MERGE with alignment > 8.
3532 (mergeable_constant_section): Likewise.
3534 2018-10-24 Richard Biener <rguenther@suse.de>
3536 PR tree-optimization/84013
3537 * tree-ssa-structalias.c (struct msdi_data): New struct for
3538 marshalling data to walk_stmt_load_store_ops.
3539 (maybe_set_dependence_info): Refactor as callback for
3540 walk_stmt_load_store_ops.
3541 (compute_dependence_clique): Set restrict info on all stmt kinds.
3543 2018-10-24 Martin Liska <mliska@suse.cz>
3545 * cgraph.c (cgraph_node::dump):
3546 Remove reduntant dumps and make tp_first_run dump more compact.
3548 2018-10-24 Richard Biener <rguenther@suse.de>
3550 PR tree-optimization/87665
3551 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3554 2018-10-12 Jeff Law <law@redhat.com>
3556 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3559 2018-10-23 Richard Biener <rguenther@suse.de>
3561 * tree-vrp.c (add_assert_info): Guard dump_printf with
3563 * gimple-ssa-evrp-analyze.c
3564 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3565 Use value_range::ignore_equivs_equal_p.
3567 2018-10-23 Richard Biener <rguenther@suse.de>
3569 PR tree-optimization/87105
3570 PR tree-optimization/87608
3571 * passes.def (pass_all_early_optimizations): Add early phi-opt
3573 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3574 addition to debug stmts.
3575 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3576 and abs replacement early.
3577 * tree-cfg.c (gimple_empty_block_p): Likewise.
3579 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3582 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3583 specified to configure.
3584 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3586 2018-10-23 Richard Biener <rguenther@suse.de>
3588 PR tree-optimization/87700
3589 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3591 2018-10-23 Jakub Jelinek <jakub@redhat.com>
3594 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3595 second argument from __mmask16 to __mmask8.
3596 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3597 _mm_mask_packs_epi32): Likewise.
3598 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3600 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
3602 2018-10-23 Richard Biener <rguenther@suse.de>
3604 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3606 2018-10-23 Richard Biener <rguenther@suse.de>
3608 PR tree-optimization/86144
3609 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3610 over simd attribute.
3612 2018-10-23 Richard Biener <rguenther@suse.de>
3614 PR tree-optimization/87693
3615 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3616 the case we do not find the taken edge.
3618 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
3619 Jinsong Ji <jji@us.ibm.com>
3621 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3622 (_mm_store_pd): Use unaligned vector type for pointer cast.
3623 (_mm_maskmoveu_si128): Likewise.
3624 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3625 (_mm_store_ps): Use unaligned vector type for pointer cast.
3627 2018-10-22 Paul Koning <ni1d@arrl.net>
3629 * symtab.c (symtab_node::increase_alignment): Correct max
3632 2018-10-22 Yury Gribov <tetra2005@gmail.com>
3634 PR tree-optimization/87633
3635 * match.pd: Do not generate unordered integer comparisons.
3637 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3639 PR rtl-optimization/87600
3640 * combine.c: Add include of expr.h.
3641 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3642 register to a pseudo.
3643 (make_more_copies): New function, add a copy to a new pseudo after
3644 the moves from hard registers into pseudos.
3645 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3646 later. Call make_more_copies.
3648 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
3650 * lra-constraints.c (process_alt_operands): New local array,
3651 matching_early_clobber. Check matching_early_clobber before
3652 decrementing reject, and set matching_early_clobber after.
3654 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3657 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3658 call output_addr_const and hope for the best.
3660 2018-10-22 Richard Biener <rguenther@suse.de>
3662 * gimple-ssa-evrp-analyze.c
3663 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3664 smarter about what ranges to use.
3665 * tree-vrp.c (add_assert_info): Dump here.
3666 (register_edge_assert_for_2): Instead of here at multiple but
3669 * gcc.dg/tree-ssa/evrp12.c: New testcase.
3670 * gcc.dg/predict-6.c: Adjust.
3671 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3672 * gcc.dg/tree-ssa/vrp02.c: Likewise.
3673 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3675 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
3676 Richard Biener <rguenther@suse.de>
3678 * bitmap.h: Update data structure documentation, including a
3679 description of bitmap views as either linked-lists or splay trees.
3680 (struct bitmap_element_def): Update comments for splay tree bitmaps.
3681 (struct bitmap_head_def): Likewise.
3682 (bitmap_list_view, bitmap_tree_view): New prototypes.
3683 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3685 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3686 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3687 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3688 released bitmap element here.
3689 (bitmap_element_free): Remove.
3690 (bitmap_elt_clear_from): Work on splay tree bitmaps.
3691 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
3692 this function similar ones such that linked-list bitmap implementation
3693 functions are grouped.
3694 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3695 and moved for grouping.
3696 (bitmap_list_insert_element_after): Renamed from
3697 bitmap_elt_insert_after, and moved for grouping.
3698 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3699 (bitmap_tree_link_left, bitmap_tree_link_right,
3700 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3701 bitmap_tree_link_element, bitmap_tree_unlink_element,
3702 bitmap_tree_find_element): New functions for splay-tree bitmap
3704 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3705 Renamed and moved, see above entries.
3706 (bitmap_tree_listify_from): New function to convert part of a splay
3707 tree bitmap to a linked-list bitmap.
3708 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3709 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3710 (bitmap_find_bit): Remove.
3711 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3712 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3713 Handle splay tree bitmaps.
3714 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3715 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3716 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3717 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3718 bitmap_intersect_compl_p, bitmap_ior_and_compl,
3719 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3720 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
3721 corresponding changes to use linked-list specific bitmap_element
3722 manipulation functions as applicable for efficiency.
3723 (bitmap_tree_to_vec): New function.
3724 (debug_bitmap_elt_file): New function split out from ...
3725 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
3726 (bitmap_print): Likewise.
3728 PR tree-optimization/63155
3729 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3731 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3734 2018-10-22 Martin Liska <mliska@suse.cz>
3736 PR tree-optimization/87686
3738 2018-08-29 Martin Liska <mliska@suse.cz>
3740 * tree-switch-conversion.c (switch_conversion::expand):
3741 Strenghten assumption about gswitch statements.
3743 2018-10-22 Martin Liska <mliska@suse.cz>
3745 * ipa-icf.c (sem_item::compare_attributes): Remove.
3746 (sem_item::compare_referenced_symbol_properties): Use
3747 attribute_list_equal instead.
3748 (sem_function::equals_wpa): Likewise.
3749 * ipa-icf.h: Remove compare_attributes.
3751 2018-10-22 Richard Biener <rguenther@suse.de>
3754 * mem-stats.h (mem_usage::operator==): Fix pasto.
3756 2018-10-22 Richard Biener <rguenther@suse.de>
3758 PR tree-optimization/87640
3759 * tree-vrp.c (set_value_range_with_overflow): Decompose
3761 (extract_range_from_binary_expr_1): Adjust.
3763 2018-10-22 Martin Jambor <mjambor@suse.cz>
3765 * tree-eh.h (stmt_could_throw_p): Add function parameter.
3766 (stmt_can_throw_external): Likewise.
3767 (stmt_can_throw_internal): Likewise.
3768 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3769 (lower_eh_constructs_2): Likewise.
3770 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3771 (stmt_can_throw_external): Likewise.
3772 (stmt_can_throw_internal): Likewise.
3773 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3774 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3775 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3776 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3777 (pass_lower_eh_dispatch::execute): Pass cfun to
3778 stmt_can_throw_external.
3779 (cleanup_empty_eh): Likewise.
3780 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3781 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3782 stmt_can_throw_external instead of pushing it to cfun.
3783 (symbol_table::create_edge): Likewise.
3784 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3785 stmt_can_throw_internal.
3786 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3787 to stmt_could_throw_p.
3788 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3789 stmt_can_throw_internal.
3790 (pass_store_merging::execute): Likewise.
3791 * gimple-ssa-strength-reduction.c
3792 (find_candidates_dom_walker::before_dom_children): Pass cfun to
3794 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3795 stmt_can_throw_internal.
3796 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3797 to stmt_can_throw_external.
3798 (check_stmt): Pass cfun to stmt_could_throw_p.
3799 (check_stmt): Pass cfun to stmt_can_throw_external.
3800 (pass_nothrow::execute): Likewise.
3801 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3802 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3803 stmt_can_throw_internal.
3804 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3805 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3806 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3807 * tree-complex.c (expand_complex_libcall): Pass cfun to
3808 stmt_could_throw_p and to stmt_can_throw_internal.
3809 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3810 * tree-inline.c (copy_edges_for_bb): Likewise.
3811 (maybe_move_debug_stmts_to_successors): Likewise.
3812 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3814 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3815 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3816 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3817 stmt_can_throw_internal.
3818 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3819 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3821 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3822 stmt_can_throw_internal.
3823 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3824 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3826 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3827 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3828 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3829 (convert_mult_to_fma_1): Likewise.
3830 (convert_to_divmod): Likewise.
3831 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3832 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3833 * tree-ssa-propagate.c
3834 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3835 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3836 (maybe_optimize_range_tests): Likewise.
3837 (linearize_expr_tree): Likewise.
3838 (reassociate_bb): Likewise.
3839 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3840 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3841 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3842 (handle_char_store): Likewise.
3843 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3844 stmt_can_throw_internal.
3845 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3847 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3848 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3849 (vectorizable_simd_clone_call): Likewise.
3850 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3851 (gimple_stringop_fixed_value): Likewise.
3853 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
3855 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3856 literal pool references.
3857 (s390_check_qrst_address): Adapt to the new behavior of
3858 s390_loadrelative_operand_p ().
3860 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3863 * config/i386/sse.md (*andnot<mode>3_bcst): New.
3865 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3868 * config/i386/sse.md (*<code><mode>3_bcst): New.
3870 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3873 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3874 V4DI, V16SI and V8DI.
3875 (*sub<mode>3<mask_name>_bcst): New.
3876 (*add<mode>3<mask_name>_bcst): Likewise.
3878 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
3879 Jinsong Ji <jji@us.ibm.com>
3881 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3882 __m64 with __vector unsigned long long for compatibility.
3883 (_mm_movemask_epi8): Likewise.
3884 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3885 (_mm_cvttps_pi32): Likewise.
3886 (_mm_cvtpi32_ps): Likewise.
3887 (_mm_cvtps_pi16): Likewise.
3888 (_mm_loadh_pi): Likewise.
3889 (_mm_storeh_pi): Likewise.
3890 (_mm_movehl_ps): Likewise.
3891 (_mm_movelh_ps): Likewise.
3892 (_mm_loadl_pi): Likewise.
3893 (_mm_storel_pi): Likewise.
3894 (_mm_movemask_ps): Likewise.
3895 (_mm_shuffle_pi16): Likewise.
3897 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3900 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3901 __builtin_ia32_vfnmsubpd512_mask.
3902 (_mm512_mask_fnmsub_round_pd): Likewise.
3903 (_mm512_fnmsub_pd): Likewise.
3904 (_mm512_mask_fnmsub_pd): Likewise.
3905 (_mm512_maskz_fnmsub_round_pd): Use
3906 __builtin_ia32_vfnmsubpd512_maskz.
3907 (_mm512_maskz_fnmsub_pd): Likewise.
3908 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3909 (_mm512_mask_fnmsub_round_ps): Likewise.
3910 (_mm512_fnmsub_ps): Likewise.
3911 (_mm512_mask_fnmsub_ps): Likewise.
3912 (_mm512_maskz_fnmsub_round_ps): Use
3913 __builtin_ia32_vfnmsubps512_maskz.
3914 (_mm512_maskz_fnmsub_ps): Likewise.
3915 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3916 __builtin_ia32_vfnmsubpd256_mask.
3917 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3918 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3919 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3920 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3921 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3922 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3923 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3924 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3925 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3926 __builtin_ia32_vfnmsubpd.
3927 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3928 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3929 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3930 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3931 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3932 * config/i386/i386-builtin.def: Add
3933 __builtin_ia32_vfnmsubpd256_mask,
3934 __builtin_ia32_vfnmsubpd256_maskz,
3935 __builtin_ia32_vfnmsubpd128_mask,
3936 __builtin_ia32_vfnmsubpd128_maskz,
3937 __builtin_ia32_vfnmsubps256_mask,
3938 __builtin_ia32_vfnmsubps256_maskz,
3939 __builtin_ia32_vfnmsubps128_mask,
3940 __builtin_ia32_vfnmsubps128_maskz,
3941 __builtin_ia32_vfnmsubpd512_mask,
3942 __builtin_ia32_vfnmsubpd512_maskz,
3943 __builtin_ia32_vfnmsubps512_mask,
3944 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3945 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3946 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3947 __builtin_ia32_vfnmsubpd256.
3948 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3949 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3950 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3952 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3954 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3956 (fmai_vmfnmsub_<mode><round_name>): Likewise.
3958 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3961 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3962 __builtin_ia32_vfnmaddpd512_mask.
3963 (_mm512_mask_fnmadd_round_pd): Likewise.
3964 (_mm512_fnmadd_pd): Likewise.
3965 (_mm512_mask_fnmadd_pd): Likewise.
3966 (_mm512_maskz_fnmadd_round_pd): Use
3967 __builtin_ia32_vfnmaddpd512_maskz.
3968 (_mm512_maskz_fnmadd_pd): Likewise.
3969 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3970 (_mm512_mask_fnmadd_round_ps): Likewise.
3971 (_mm512_fnmadd_ps): Likewise.
3972 (_mm512_mask_fnmadd_ps): Likewise.
3973 (_mm512_maskz_fnmadd_round_ps): Use
3974 __builtin_ia32_vfnmaddps512_maskz.
3975 (_mm512_maskz_fnmadd_ps): Likewise.
3976 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3977 __builtin_ia32_vfnmaddpd256_mask.
3978 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3979 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3980 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3981 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3982 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3983 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3984 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3985 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3986 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3987 __builtin_ia32_vfnmaddpd.
3988 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3989 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3990 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3991 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3992 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3993 * config/i386/i386-builtin.def: Add
3994 __builtin_ia32_vfnmaddpd256_mask,
3995 __builtin_ia32_vfnmaddpd256_maskz,
3996 __builtin_ia32_vfnmaddpd128_mask,
3997 __builtin_ia32_vfnmaddpd128_maskz,
3998 __builtin_ia32_vfnmaddps256_mask,
3999 __builtin_ia32_vfnmaddps256_maskz,
4000 __builtin_ia32_vfnmaddps128_mask,
4001 __builtin_ia32_vfnmaddps128_maskz,
4002 __builtin_ia32_vfnmaddpd512_mask,
4003 __builtin_ia32_vfnmaddpd512_maskz,
4004 __builtin_ia32_vfnmaddps512_mask,
4005 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
4006 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
4007 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
4008 __builtin_ia32_vfnmaddpd256.
4009 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
4010 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
4011 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
4013 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
4015 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
4017 (fmai_vmfnmadd_<mode><round_name>): Likewise.
4019 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4022 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
4023 __builtin_ia32_vfmsubpd512_mask.
4024 (_mm512_mask_fmsub_round_pd): Likewise.
4025 (_mm512_fmsub_pd): Likewise.
4026 (_mm512_mask_fmsub_pd): Likewise.
4027 (_mm512_maskz_fmsub_round_pd): Use
4028 __builtin_ia32_vfmsubpd512_maskz.
4029 (_mm512_maskz_fmsub_pd): Likewise.
4030 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
4031 (_mm512_mask_fmsub_round_ps): Likewise.
4032 (_mm512_fmsub_ps): Likewise.
4033 (_mm512_mask_fmsub_ps): Likewise.
4034 (_mm512_maskz_fmsub_round_ps): Use
4035 __builtin_ia32_vfmsubps512_maskz.
4036 (_mm512_maskz_fmsub_ps): Likewise.
4037 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
4038 __builtin_ia32_vfmsubpd256_mask.
4039 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
4040 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4041 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
4042 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4043 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4044 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
4045 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
4046 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
4047 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
4048 __builtin_ia32_vfmsubpd.
4049 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
4050 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
4051 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
4052 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
4053 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
4054 * config/i386/i386-builtin.def: Add
4055 __builtin_ia32_vfmsubpd256_mask,
4056 __builtin_ia32_vfmsubpd256_maskz,
4057 __builtin_ia32_vfmsubpd128_mask,
4058 __builtin_ia32_vfmsubpd128_maskz,
4059 __builtin_ia32_vfmsubps256_mask,
4060 __builtin_ia32_vfmsubps256_maskz,
4061 __builtin_ia32_vfmsubps128_mask,
4062 __builtin_ia32_vfmsubps128_maskz,
4063 __builtin_ia32_vfmsubpd512_mask,
4064 __builtin_ia32_vfmsubpd512_maskz,
4065 __builtin_ia32_vfmsubps512_mask,
4066 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
4067 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
4068 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
4069 __builtin_ia32_vfmsubpd256.
4070 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
4071 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
4072 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
4074 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
4076 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
4078 (fmai_vmfmsub_<mode><round_name>): Likewise.
4080 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4082 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
4083 Remove plus. Renamed to ...
4084 (*sub<mode>3<mask_name>_bcst): This.
4085 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
4086 (*add<mode>3<mask_name>_bcst): This.
4088 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4091 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
4093 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
4096 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
4097 (_mm_or_epi32): Likewise.
4098 (_mm256_xor_epi32): Likewise.
4099 (_mm_xor_epi32): Likewise.
4100 (_mm256_or_epi64): Likewise.
4101 (_mm_or_epi64): Likewise.
4102 (_mm256_xor_epi64): Likewise.
4103 (_mm_xor_epi64): Likewise.
4105 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
4108 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
4110 2018-10-20 Jakub Jelinek <jakub@redhat.com>
4113 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
4115 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
4117 * doc/ux.texi: Move @section directly after @node.
4119 2018-10-19 Jakub Jelinek <jakub@redhat.com>
4123 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
4124 depend closely nested inside of loop with ordered clause with
4127 2018-10-19 David Malcolm <dmalcolm@redhat.com>
4129 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
4130 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
4131 * doc/ux.texi: New file.
4133 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
4135 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
4136 be the first CR field allocated.
4138 2018-10-19 Richard Biener <rguenther@suse.de>
4141 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
4142 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
4144 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4147 * config/i386/sse.md
4148 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
4149 (*add<mode>3<mask_name>_bcst_2): Likewise.
4151 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
4153 * config/i386/sse.md
4154 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4155 Replace nonimmediate_operand with register_operand.
4156 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4158 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4161 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
4163 PR rtl-optimization/87596
4164 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
4165 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4166 for instructions in FROM..TO range.
4168 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
4170 * cfgexpand.c (expand_one_var): Use specific wording in error message
4171 for non-local frame variables.
4172 * stor-layout.c (layout_decl): Do not issue a warning for them.
4174 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
4176 * haifa-sched.c (priority): Add force_recompute parameter.
4177 (apply_replacement): Call priority () with force_recompute = true.
4178 (restore_pattern): Likewise.
4180 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4182 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
4183 HOST_BITS_PER_WIDE_INT.
4184 (test_vector_ops_duplicate): Likewise.
4186 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4189 * config/i386/sse.md (VF_AVX512): New.
4190 (avx512bcst): Likewise.
4191 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4193 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4195 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4198 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
4200 * doc/invoke.texi (-dumpversion): Improve grammar.
4201 (-dumpfullversion): Make more consistent with -dumpversion.
4203 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
4205 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4206 Set JUMP_LABEL to the jump insn.
4207 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4208 Predict emitted jump and add label to jump insn.
4210 2018-10-18 David Malcolm <dmalcolm@redhat.com>
4212 PR tree-optimization/87562
4213 * input.c (get_substring_ranges_for_loc): Use
4214 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4215 getting the linemap for the endpoint. Verify that it's either
4216 in the same linemap as the start point's spelling location, or
4217 at least in the same file.
4219 2018-10-18 Richard Biener <rguenther@suse.de>
4221 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4222 feed width-specific load/store costs through ix86_vec_cost.
4223 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4224 (k8_cost): Likewise.
4225 (bdver_cost): Likewise.
4226 (znver1_cost): Likewise.
4227 (btver1_cost): Likewise.
4228 (btver2_cost): Likewise.
4230 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4232 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4233 to simplify subreg of vec_merge.
4235 2018-10-18 Richard Biener <rguenther@suse.de>
4237 * config/i386/i386.c: Fix costing of vector FMA.
4239 2018-10-18 Richard Biener <rguenther@suse.de>
4241 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4243 (ix86_builtin_vectorization_cost): For vec_construct properly
4244 cost insertion into SSE regs.
4245 (...): Adjust calls to ix86_vec_cost.
4247 2018-10-18 Richard Biener <rguenther@suse.de>
4251 2018-02-07 Richard Biener <rguenther@suse.de>
4253 PR tree-optimization/84204
4254 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4257 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
4260 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4262 (test_vector_ops_duplicate): Add test for a scalar subreg of a
4263 VEC_MERGE of a VEC_DUPLICATE.
4265 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4267 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4268 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4269 * doc/standards.texi (C Language): Document C2X.
4270 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4271 (rl78_option_override): Handle "GNU C2X" language name.
4273 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4275 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4276 Document C17 as published in 2018.
4278 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
4281 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4282 bail out if both sides do not have the same storage order.
4284 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4286 * bitmap.c (bitmap_head::dump): New.
4287 * bitmap.h (bitmap_head): Add dump().
4288 * gimple-ssa-evrp-analyze.c
4289 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4290 (evrp_range_analyzer::set_ssa_range_info): Same.
4291 (evrp_range_analyzer::record_ranges_from_phis): Same.
4292 (evrp_range_analyzer::record_ranges_from_stmt): Same.
4293 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4294 * gimple-ssa-sprintf.c (get_int_range): Same.
4295 (format_integer): Same.
4296 (sprintf_dom_walker::handle_gimple_call): Same.
4297 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4298 (ipcp_vr_lattice::top_p): Same.
4299 (ipcp_vr_lattice::bottom_p): Same.
4300 (ipcp_vr_lattice::set_to_bottom): Same.
4301 (ipa_vr_operation_and_type_effects): Same.
4302 (propagate_vr_across_jump_function): Same.
4303 (ipcp_store_vr_results): Same.
4304 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4305 (ipa_print_node_jump_functions_for_edge): Same.
4306 (ipa_get_value_range): Same.
4307 (ipa_compute_jump_functions_for_edge): Same.
4308 (ipa_write_jump_function): Same.
4309 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4310 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4312 * vr-values.c (set_value_range_to_nonnegative): Same.
4313 (set_value_range_to_truthvalue): Same.
4314 (vr_values::get_value_range): Same.
4315 (vr_values::set_defs_to_varying): Same.
4316 (vr_values::update_value_range): Same.
4317 (symbolic_range_based_on_p): Same.
4318 (vr_values::op_with_boolean_value_range_p): Same.
4319 (vr_values::extract_range_for_var_from_comparison_expr): Same.
4320 (vr_values::extract_range_from_ssa_name): Same.
4321 (vr_values::extract_range_from_binary_expr): Same.
4322 (vr_values::extract_range_from_unary_expr): Same.
4323 (vr_values::extract_range_from_cond_expr): Same.
4324 (vr_values::extract_range_from_comparison): Same.
4325 (vr_values::check_for_binary_op_overflow): Same.
4326 (vr_values::extract_range_basic): Same.
4327 (vr_values::extract_range_from_assignment): Same.
4328 (compare_ranges): Same.
4329 (compare_range_with_value): Same.
4330 (vr_values::adjust_range_with_scev): Same.
4331 (vrp_valueize): Same.
4332 (vrp_valueize_1): Same.
4333 (vr_values::get_vr_for_comparison): Same.
4334 (vr_values::compare_name_with_value): Same.
4335 (vr_values::compare_names): Same.
4336 (vr_values::vrp_evaluate_conditional): Same.
4337 (find_case_label_ranges): Same.
4338 (vr_values::vrp_visit_switch_stmt): Same.
4339 (vr_values::extract_range_from_phi_node): Same.
4340 (vr_values::simplify_div_or_mod_using_ranges): Same.
4341 (vr_values::simplify_bit_ops_using_ranges): Same.
4342 (test_for_singularity): Same.
4343 (range_fits_type_p): Same.
4344 (vr_values::simplify_cond_using_ranges_1): Same.
4345 (vr_values::simplify_switch_using_ranges): Same.
4346 (vr_values::simplify_float_conversion_using_ranges): Same.
4347 (vr_values::two_valued_val_range_p): Same.
4348 (vr_values::add_equivalence): Move to value_range::equiv_add.
4349 * vr-values.h (vr_values::add_equivalence): Remove.
4350 (VR_INITIALIZER): Remove.
4351 * tree-vrp.c (value_range::set): New.
4352 (value_range::equiv_add): New.
4353 (value_range::value_range): New.
4354 (value_range::deep_copy): New.
4355 (value_range::check): New.
4356 (value_range::equal_p): New.
4357 (value_range::ignore_equivs_equal_p): New.
4358 (value_range::operator==): New.
4359 (value_range::operator!=): New.
4360 (value_range::symbolic_p): New.
4361 (value_range::numeric_p): New.
4362 (value_range::set_undefined): New.
4363 (value_range::set_varying): New.
4364 (value_range::may_contain_p): New.
4365 (value_range::equiv_clear): New.
4366 (value_range::singleton_p): New.
4367 (value_range::intersect): New.
4368 (value_range::dump): New.
4369 (value_range::set_and_canonicalize): New.
4370 (set_value_range): Adjust for value_range API.
4371 (set_value_range_to_undefined): Same.
4372 (set_value_range_to_varying): Same.
4373 (set_and_canonicalize_value_range): Same.
4374 (set_value_range_to_nonnull): Same.
4375 (set_value_range_to_null): Same.
4376 (range_is_null): Same.
4377 (range_is_nonnull): Same.
4378 (range_int_cst_p): Same.
4379 (range_int_cst_singleton_p): Same.
4380 (symbolic_range_p): Same.
4381 (range_includes_zero_p): Same.
4382 (value_range_constant_singleton): Same.
4383 (vrp_set_zero_nonzero_bits): Same.
4384 (ranges_from_anti_range): Same.
4385 (extract_range_into_wide_ints): Same.
4386 (extract_range_from_multiplicative_op): Same.
4387 (set_value_range_with_overflow): Same.
4388 (extract_range_from_binary_expr_1): Same.
4389 (extract_range_from_unary_expr): Same.
4390 (dump_value_range): Same.
4391 (debug_value_range): Same.
4392 (vrp_prop::check_array_ref): Same.
4393 (vrp_prop::check_mem_ref): Same.
4394 (vrp_prop::vrp_initialize): Same.
4395 (vrp_prop::visit_stmt): Same.
4396 (intersect_ranges): Same.
4397 (vrp_prop::visit_phi): Same.
4398 (vrp_prop::vrp_finalize): Same.
4399 (determine_value_range_1): Same.
4400 (determine_value_range): Same.
4401 (vrp_intersect_ranges_1): Rename to...
4402 (vrp_intersect_1): this.
4403 (vrp_intersect_ranges): Rename to...
4404 (value_range::intersect_helper): ...this.
4405 (vrp_meet_1): Rename to...
4406 (value_range::union_helper): ...this.
4407 (vrp_meet): Rename to...
4408 (value_range::union_): ...this.
4409 (copy_value_range): Remove.
4410 * tree-vrp.h (struct value_range): Rewrite into a proper class.
4411 (value_range::vrtype): New.
4412 (value_range::type): New.
4413 (value_range::equiv): New.
4414 (value_range::min): New.
4415 (value_range::max): New.
4416 (value_range::varying_p): New.
4417 (value_range::undefined_p): New.
4418 (value_range::null_p): New.
4419 (value_range::equiv_add): New.
4420 (copy_value_range): Remove.
4422 2018-10-17 David Malcolm <dmalcolm@redhat.com>
4424 * Makefile.in (SELFTEST_TARGETS): New.
4425 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4426 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4427 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4429 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4430 (selftest-c++-gdb, selftest-c++-valgrind): Move to
4432 * configure: Regenerate.
4433 * configure.ac (selftest_languages): New.
4435 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4437 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4438 overflow wraps argument.
4439 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4440 wide_int_range_multiplicative_op.
4441 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4442 overflow wraps argument.
4443 (wide_int_range_multiplicative_op): Same.
4444 (wide_int_range_lshift): Same.
4445 (wide_int_range_div): Same.
4446 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4447 (wide_int_range_lshift): Same.
4448 (wide_int_range_div): Same.
4450 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4452 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4453 use sign as argument.
4454 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4455 wide_int_range_shift_undefined_p.
4457 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4459 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4461 (@despeculate_copy<ALLI_TI:mode>): ... This.
4462 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4465 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4467 * config.gcc: Obsolete *-*-solaris2.10*.
4468 * doc/install.texi (Specific, *-*-solaris2*): Document it.
4470 2018-10-12 Jeff Law <law@redhat.com>
4472 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4473 reg + sym +- const_int addressing modes.
4475 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4477 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4478 * diagnostic-show-locus.c (layout::layout): Apply the minimum
4480 (layout::start_annotation_line): Only print up to 3 of the
4481 margin character, to avoid touching the left-hand side.
4482 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4483 minimum margin width, as set by test_diagnostic_context's ctor.
4484 (selftest::test_fixit_insert_containing_newline): Likewise.
4485 (selftest::test_fixit_insert_containing_newline_2): Likewise.
4486 (selftest::test_line_numbers_multiline_range): Clear
4487 dc.min_margin_width.
4488 * diagnostic.c (diagnostic_initialize): Initialize
4490 * diagnostic.h (struct diagnostic_context): Add field
4492 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4493 * opts.c (common_handle_option): Handle
4494 OPT_fdiagnostics_minimum_margin_width_.
4495 * selftest-diagnostic.c
4496 (selftest::test_diagnostic_context::test_diagnostic_context):
4497 Initialize min_margin_width to 6.
4498 * toplev.c (general_init): Initialize global_dc->min_margin_width.
4500 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4502 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4503 Fix usage of "error_at_rich_loc" in the comment.
4505 2018-10-15 Renlin Li <renlin.li@arm.com>
4508 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4509 if-conversioned loop when it contains ifn with types not
4510 supported by backend.
4511 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4512 (direct_internal_fn_supported_p): New helper function.
4513 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4515 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4518 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4519 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4520 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4522 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4524 PR tree-optimization/87022
4525 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4526 bits in dist vector rather than the first one.
4528 2018-10-15 Richard Biener <rguenther@suse.de>
4531 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4532 (visit_loadstore): When a used restrict tag escaped verify that
4533 the points-to solution of "other" pointers do not include
4535 (compute_dependence_clique): If a used restrict tag escaped
4536 communicated that down to visit_loadstore.
4538 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4540 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4541 into reg if it isn't a general operand.
4543 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4546 * config/i386/sse.md (*vec_dupv2di): Add register source to
4549 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4552 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4553 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4554 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4555 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4557 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4559 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4560 (notice_args_size): Set it in the current trace if no insn that can
4561 throw internally has been seen yet.
4562 (connect_traces): When connecting args_size between traces, allow the
4563 incoming values not to match if there is an insn setting it before the
4564 first insn that can throw internally; in that case, force the creation
4565 of a CFI note on this latter insn.
4567 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4569 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4570 the base class, because using the injected-class-name was not clearly
4571 specified until DR 176.
4573 2018-10-12 Paul Koning <ni1d@arrl.net>
4575 * config/pdp11/pdp11.md (doloop_end): New expander.
4576 (doloop_end_insn): renamed from "doloop_end".
4577 (addqi3): New pattern.
4578 (subqi3): New pattern.
4579 * config/pdp11/predicates.md (incdec_operand): New predicate.
4581 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4584 * real.c (format_helper::can_represent_integral_type_p): New function
4585 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4586 * match.pd: New pattern.
4588 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4590 * configure.ac: Introduce --enable-large-address-aware
4591 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4592 * doc/install.texi: Document it.
4593 * configure, config.in: Rebuilt.
4594 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4595 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4596 (LINK_SPEC): Insert it.
4597 * config/i386/mingw-w64.h: Likewise.
4599 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4601 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
4603 PR rtl-optimization/87600
4604 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4606 2018-10-12 Paul Koning <ni1d@arrl.net>
4608 * doc/md.texi (doloop_end): Document that the pattern code may
4609 need to check operand mode.
4611 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
4613 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4614 to zero-extend between int and floating-point registers.
4615 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4616 ldp into floating-point registers. Add type and arch attributes.
4617 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4618 Use f_loads for type attribute.
4620 2018-10-11 Martin Sebor <msebor@redhat.com>
4622 * doc/extend.texi (attribute packed): Correct typos.
4624 2018-10-11 Martin Sebor <msebor@redhat.com>
4626 * doc/extend.texi (attribute flatten): Mention interaction with
4629 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4632 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4633 Set new_decl virtual flag to zero.
4635 2018-10-11 Martin Sebor <msebor@redhat.com>
4638 * doc/extend.texi (attribute format_arg): Discuss using multiple
4639 attributes on a single function.
4641 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
4643 PR tree-optimization/86829
4644 * match.pd (sin (atan (x))): New simplification rules.
4645 (cos (atan (x))): Likewise.
4646 * real.c (build_sinatan_real): New function.
4647 * real.h (build_sinatan_real): Prototype.
4649 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
4651 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4653 (fold_mergeeo_helper): New helper function.
4654 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4655 intrinsics. Correct some whitespace indentation issues.
4657 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
4660 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4661 Use HOST_WIDE_INT_1U for shift.
4663 2018-10-11 Doug Rupp <rupp@adacore.com>
4664 Olivier Hainque <hainque@adacore.com>
4666 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4667 Pass --relax to the linker for RTPs.
4668 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4670 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
4671 Jan Hubicka <jh@suse.cz>
4672 Martin Jambor <mjambor@suse.cz>
4674 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4675 the same elements are repeated rather than printing all of them.
4676 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4677 "repeated" elements.
4678 * read-rtl-function.c (test_loading_repeat): New function.
4679 (read_rtl_function_c_tests): Call test_loading_repeat.
4680 * rtl-tests.c (test_dumping_repeat): New function.
4681 (rtl_tests_c_tests): Call test_dumping_repeat.
4683 2018-10-11 Richard Biener <rguenther@suse.de>
4685 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4686 bdver?_cost): Unify to ...
4687 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4688 * config/i386/i386.c (processor_cost_table): Adjust.
4690 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
4693 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4694 the thunk when expanding to GIMPLE.
4696 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
4698 * varasm.c (mergeable_string_section): Don't try to move zero-length
4699 strings to the merge section.
4701 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
4704 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4706 2018-10-10 Jakub Jelinek <jakub@redhat.com>
4709 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4710 to special_args set.
4712 2018-10-10 Richard Biener <rguenther@suse.de>
4714 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4715 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4716 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4717 and recursing and pattern terminating the recursion on SSE
4718 vector width using ix86_expand_reduc.
4719 (reduc_sminmax_scal_<mode>): Split into part reducing to half
4720 width and recursing and SSE2 vector variant doing the final
4721 reduction with ix86_expand_reduc.
4722 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4723 with terminating the recursion at AVX level, splitting that
4726 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4728 * genmatch.c (error_cb): Rename to...
4729 (diagnostic_cb): ...this, converting int params to enums.
4730 (fatal_at): Update for renaming.
4731 (warning_at): Likewise.
4733 * input.c (selftest::ebcdic_execution_charset::apply):
4734 Update for renaming of...
4735 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4737 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4738 converting level and reason to enums.
4739 (class selftest::lexer_error_sink): Rename to...
4740 (class selftest::lexer_test_options): ...this, renaming field
4741 "m_errors" to "m_diagnostics".
4742 (selftest::lexer_test_options::apply): Update for renaming of...
4743 (selftest::lexer_test_options::on_error): ...this, renaming to...
4744 (selftest::lexer_test_options::on_diagnostic): ...this
4745 converting level and reason to enums.
4746 (selftest::test_lexer_string_locations_raw_string_unterminated):
4747 Update for renamings.
4748 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4751 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
4753 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4754 * config/rs6000/pmmintrin.h: New file.
4756 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
4758 PR tree-optimization/86659
4759 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4761 2018-10-09 Richard Biener <rguenther@suse.de>
4763 PR tree-optimization/63155
4764 * tree-ssa-structalias.c: Include tree-ssa.h.
4765 (get_constraint_for_ssa_var): For undefs return nothing_id.
4766 (find_func_aliases): Cleanup PHI handling.
4768 2018-10-09 Richard Biener <rguenther@suse.de>
4770 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4773 2018-10-09 Martin Liska <mliska@suse.cz>
4775 * asan.c (asan_emit_stack_protection): If a stack variable
4776 is located in a same file as current function, then emit
4777 line info into variable definition string.
4779 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4781 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4784 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4786 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4789 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4791 PR tree-optimization/86659
4792 * gimple-match.h (struct gimple_match_op): Add reverse field.
4793 (gimple_match_op::set_op): New overloaded method.
4794 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4795 the REF_REVERSE_STORAGE_ORDER flag on the value.
4796 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4797 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4799 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4802 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4803 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4805 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
4808 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4809 Defined with __builtin_ia32_vfmaddsubpd512_mask.
4811 2018-10-08 Richard Biener <rguenther@suse.de>
4813 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4814 cost the same as AVX128 ones.
4816 2018-10-08 Paul Koning <ni1d@arrl.net>
4818 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4819 (expand_block_move): New function.
4820 * config/pdp11/pdp11.c (output_block_move): Remove.
4821 (expand_block_move): New function.
4822 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4823 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4824 (*movmemhi1): Remove.
4826 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
4828 * config/s390/2827.md: Increase latencies for some FP instructions.
4830 2018-10-08 Richard Biener <rguenther@suse.de>
4832 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4834 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4835 * tree-vectorizer.h (dump_stmt_cost): Adjust.
4836 (add_stmt_cost): Dump return value of the hook.
4838 2018-10-08 Richard Biener <rguenther@suse.de>
4840 PR tree-optimization/63155
4841 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4842 (ssa_propagation_engine::ssa_propagate): Remove redundant
4843 bitmap bit clearing.
4845 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
4847 PR rtl-optimization/86939
4848 PR rtl-optimization/87479
4849 * ira.h (non_conflicting_reg_copy_p): New prototype.
4850 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4851 (make_hard_regno_dead): Don't add conflicts for register
4852 ignore_reg_for_conflicts.
4853 (make_object_dead): Likewise.
4854 (non_conflicting_reg_copy_p): New function.
4855 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4856 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4857 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4858 (make_hard_regno_dead): Don't add conflicts for register
4859 ignore_reg_for_conflicts. Remove special conflict handling of
4860 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
4861 check_pic_pseudo_p and update callers.
4862 (mark_pseudo_dead): Don't add conflicts for register
4863 ignore_reg_for_conflicts.
4864 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4866 2018-10-05 Andrew Waterman <andrew@sifive.com>
4867 Jim Wilson <jimw@sifive.com>
4869 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4870 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
4871 new pattern using HONOR_SNANS that emits one extra instruction.
4873 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4875 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4876 patterns): Merge SI and DI patterns to a GPR pattern.
4877 (unnamed define_insn and define_split for record form of that): Merge
4878 to a single define_insn_and_split pattern.
4880 2018-10-05 David Malcolm <dmalcolm@redhat.com>
4883 * input.c (expand_location_to_spelling_point): Add param "aspect"
4884 and use rather than hardcoding LOCATION_ASPECT_CARET.
4885 (get_substring_ranges_for_loc): Handle the case of a single token
4886 within a macro expansion.
4887 * input.h (expand_location_to_spelling_point): Add "aspect" param,
4888 defaulting to LOCATION_ASPECT_CARET.
4890 2018-10-05 Paul Koning <ni1d@arrl.net>
4892 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4893 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4894 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4895 (pdp11_guard_type): New function.
4897 2018-10-05 Paul Koning <ni1d@arrl.net>
4899 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4900 * config/pdp11/pdp11.opt (mfloat32): Remove.
4902 * doc/invoke.texi (pdp11 -mfloat32): Remove:
4903 (pdp11 -mfloat64): Remove.
4905 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4907 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4908 (*cmp<mode>_cc_i387): Ditto.
4909 (*cmpu<mode>_cc_i387): Ditto.
4910 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4911 * config/i386/i386.c (ix86_expand_fp_compare): Remove
4913 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4914 Emit x86_sahf_1 pattern.
4915 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4916 (ix86_expand_carry_flag_compare): Ditto.
4918 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4920 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4921 to reg_or_0_operand. Add "C" constraint.
4922 (*cmpxf_cc_i387): Ditto.
4923 (*cmp<mode>_i387): Change operand 2 predicate
4924 to nonimm_or_0_operand. Add "C" constraint.
4925 (*cmp<mode>_cc_i387): Ditto.
4926 (*cmp<mode>_0_i387): Remove insn pattern.
4927 (*cmp<mode>_0_cc_i387): Ditto.
4929 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4931 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4932 * config/i386/predicates.md (nonimm_or_0_operand): Rename
4933 from vector_move_operand. Update all uses.
4935 2018-10-05 Martin Sebor <msebor@redhat.com>
4937 PR tree-optimization/87490
4938 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4941 2018-10-05 Richard Biener <rguenther@suse.de>
4943 PR tree-optimization/63155
4944 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4945 vertical space in dumpfiles.
4946 * tree-ssa-propagate.h
4947 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4948 * tree-ssa-propagate.c (cfg_blocks_back): New global.
4949 (ssa_edge_worklist_back): Likewise.
4950 (curr_order): Likewise.
4951 (cfg_blocks_get): Remove abstraction.
4952 (cfg_blocks_add): Likewise.
4953 (cfg_blocks_empty_p): Likewise.
4954 (add_ssa_edge): Add to current or next worklist based on
4956 (add_control_edge): Likewise.
4957 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4959 (ssa_propagation_engine::ssa_propagate): ... here. Unify
4960 iteration from CFG and SSA edge worklist so we process
4961 everything in RPO order, prioritizing forward progress
4963 (ssa_prop_init): Allocate new worklists, do not dump
4965 (ssa_prop_fini): Free new worklists.
4967 2018-10-05 Richard Biener <rguenther@suse.de>
4969 * tree-core.h (tree_block::abstract_flag): Remove.
4970 (tree_block::block_num): Make full 32bits.
4971 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4972 * tree.h (BLOCK_ABSTRACT): Remove.
4973 * dwarf2out.c (gen_lexical_block_die): Remove dead code
4974 resulting from BLOCK_ABSTRACT being always false.
4975 (gen_inlined_subroutine_die): Likewise.
4976 (gen_block_die): Likewise.
4977 * tree.c (block_ultimate_origin): Likewise.
4978 * tree-pretty-print.c (dump_block_node): Remove code dealing
4979 with BLOCK_ABSTRACT.
4980 * tree-ssa-live.c (dump_scope_block): Likewise.
4981 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4982 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4984 2018-10-05 Richard Biener <rguenther@suse.de>
4986 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4987 is asked for initialize mode to the component mode of the
4990 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
4993 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4994 assembler for -mavx.
4995 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4997 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
5000 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
5002 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
5003 to be DImode. When using mffscrn, force the operand to a register.
5005 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
5007 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
5008 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
5009 X87MODEF mode iterator.
5010 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
5011 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
5012 X87MODEF mode iterator.
5014 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
5016 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
5017 -Wno-prio-ctor-dtor.
5019 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5021 * Makefile.in (OBJS): Add opt-problem.o.
5022 * dump-context.h: Include "selftest.h.
5023 (selftest::temp_dump_context): New forward decl.
5024 (class dump_context): Make friend of class
5025 selftest::temp_dump_context.
5026 (dump_context::dump_loc_immediate): New decl.
5027 (class dump_pretty_printer): Move here from dumpfile.c.
5028 (class temp_dump_context): Move to namespace selftest.
5029 (temp_dump_context::temp_dump_context): Add param
5030 "forcibly_enable_dumping".
5031 (selftest::verify_dumped_text):
5032 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
5033 (selftest::verify_item):
5034 (ASSERT_IS_TEXT): Move here from dumpfile.c.
5035 (ASSERT_IS_TREE): Likewise.
5036 (ASSERT_IS_GIMPLE): Likewise.
5037 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
5039 (dump_context::dump_loc_immediate): ...this new function.
5040 (class dump_pretty_printer): Move to dump-context.h.
5041 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
5042 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
5043 (temp_dump_context::temp_dump_context): Move to "selftest"
5044 namespace. Add param "forcibly_enable_dumping", and use it to
5045 conditionalize the use of m_pp;
5046 (selftest::verify_dumped_text): Make non-static.
5047 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
5048 (selftest::verify_item): Make non-static.
5049 (ASSERT_IS_TEXT): Move to dump-context.h.
5050 (ASSERT_IS_TREE): Likewise.
5051 (ASSERT_IS_GIMPLE): Likewise.
5052 (selftest::test_capture_of_dump_calls): Pass "true" for new
5053 param of temp_dump_context.
5054 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
5055 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
5057 * opt-problem.cc: New file.
5058 * opt-problem.h: New file.
5059 * optinfo-emit-json.cc
5060 (selftest::test_building_json_from_dump_calls): Pass "true" for
5061 new param of temp_dump_context.
5062 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
5063 (optinfo::emit_for_opt_problem): New function.
5064 (optinfo::emit): Clarity which emit_item is used.
5065 * optinfo.h (optinfo::get_dump_location): New accessor.
5066 (optinfo::emit_for_opt_problem): New decl.
5067 (optinfo::emit): Make const.
5068 * selftest-run-tests.c (selftest::run_tests): Call
5069 selftest::opt_problem_cc_tests.
5070 * selftest.h (selftest::opt_problem_cc_tests): New decl.
5071 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
5072 bool to opt_result, converting fprintf messages to
5073 opt_result::failure_at calls. Add "stmt" param for use by the
5075 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
5076 (runtime_alias_check_p): Convert return type from bool to
5077 opt_result, converting dump_printf calls to
5078 opt_result::failure_at, using the statement DDR_A for their
5080 (find_data_references_in_stmt): Convert return type from bool to
5081 opt_result, converting "return false" to opt_result::failure_at
5083 * tree-data-ref.h: Include "opt-problem.h".
5084 (dr_analyze_innermost): Convert return type from bool to opt_result,
5085 and add a const gimple * param.
5086 (find_data_references_in_stmt): Convert return type from bool to
5088 (runtime_alias_check_p): Likewise.
5089 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
5090 dr_analyze_innermost.
5091 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
5092 Convert return type from bool to opt_result, adding a message for
5093 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
5094 (vect_analyze_data_ref_dependence): Convert return type from bool
5095 to opt_result. Change sense of return type from "false"
5096 effectively meaning "no problems" to "false" meaning a problem,
5097 so that "return false" becomes "return opt_result::success".
5098 Convert "return true" calls to opt_result::failure_at, using
5099 the location of statement A rather than vect_location.
5100 (vect_analyze_data_ref_dependences): Convert return type from bool
5102 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
5103 calls to opt_result::failure_at, using the stmt location rather
5105 (vect_verify_datarefs_alignment): Convert return type from bool
5107 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
5108 into multiple more-tightly-scoped copies.
5109 (vect_analyze_data_refs_alignment): Convert return type from bool
5111 (vect_analyze_data_ref_accesses): Likewise, converting a
5112 "return false" to a "return opt_result::failure_at", adding a
5114 (vect_prune_runtime_alias_test_list): Convert return type from
5115 bool to opt_result, converting dump_printf_loc to
5116 opt_result::failure_at. Add a %G to show the pertinent statement,
5117 and use the stmt's location rather than vect_location.
5118 (vect_find_stmt_data_reference): Convert return type from
5119 bool to opt_result, converting dump_printf_loc to
5120 opt_result::failure_at, using stmt's location.
5121 (vect_analyze_data_refs): Convert return type from bool to
5122 opt_result. Convert "return false" to "return
5123 opt_result::failure_at", adding messages as needed.
5124 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
5125 type from bool to opt_result.
5126 (vect_determine_vf_for_stmt): Likewise.
5127 (vect_determine_vectorization_factor): Likewise, converting
5128 dump_printf_loc to opt_result::failure_at, using location of phi
5129 rather than vect_location.
5130 (vect_analyze_loop_form_1): Convert return type from bool to
5131 opt_result, converting dump_printf_loc calls, retaining the use of
5133 (vect_analyze_loop_form): Convert return type from loop_vec_info
5134 to opt_loop_vec_info.
5135 (vect_analyze_loop_operations): Convert return type from bool to
5136 opt_result, converting dump_printf_loc calls, using the location
5137 of phi/stmt rather than vect_location where available. Convert
5138 various "return false" to "return opt_result::failure_at" with
5139 "unsupported phi" messages.
5140 (vect_get_datarefs_in_loop): Convert return type from bool to
5141 opt_result. Add a message for the
5142 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
5143 (vect_analyze_loop_2): Convert return type from bool to
5144 opt_result. Ensure "ok" is set to a opt_result::failure_at before
5145 each "goto again;", adding new messages where needed.
5146 Add "unsupported grouped {store|load}" messages.
5147 (vect_analyze_loop): Convert return type from loop_vec_info to
5149 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
5151 * tree-vect-stmts.c (process_use): Likewise, converting
5152 dump_printf_loc call and using stmt location, rather than
5154 (vect_mark_stmts_to_be_vectorized): Likeise.
5155 (vect_analyze_stmt): Likewise, adding a %G.
5156 (vect_get_vector_types_for_stmt): Convert return type from bool to
5157 opt_result, converting dump_printf_loc calls and using stmt
5158 location, rather than vect_location.
5159 (vect_get_mask_type_for_stmt): Convert return type from tree to
5160 opt_tree, converting dump_printf_loc calls and using stmt location.
5161 * tree-vectorizer.c: Include "opt-problem.h.
5162 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
5163 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
5164 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
5165 enabled, use it to report at the top level "couldn't vectorize
5166 loop" followed by the problem.
5167 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5168 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5170 (vect_analyze_stmt): Likewise.
5171 (vect_get_vector_types_for_stmt): Likewise.
5172 (tree vect_get_mask_type_for_stmt): Likewise.
5173 (vect_analyze_data_ref_dependences): Likewise.
5174 (vect_enhance_data_refs_alignment): Likewise.
5175 (vect_analyze_data_refs_alignment): Likewise.
5176 (vect_verify_datarefs_alignment): Likewise.
5177 (vect_analyze_data_ref_accesses): Likewise.
5178 (vect_prune_runtime_alias_test_list): Likewise.
5179 (vect_find_stmt_data_reference): Likewise.
5180 (vect_analyze_data_refs): Likewise.
5181 (vect_analyze_loop): Convert return type from loop_vec_info to
5183 (vect_analyze_loop_form): Likewise.
5184 (vect_analyze_slp): Convert return type from bool to opt_result.
5186 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5188 * doc/invoke.texi (-fopt-info): Document new "internals"
5190 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
5191 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
5193 (optinfo_verbosity_options): Add "internals".
5194 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
5195 (dump_context::apply_dump_filter_p): New member function.
5196 (dump_context::dump_loc): Use apply_dump_filter_p rather than
5197 explicitly masking the dump_kind.
5198 (dump_context::begin_scope): Increment the scope depth first. Use
5199 apply_dump_filter_p rather than explicitly masking the dump_kind.
5200 (dump_context::emit_item): Use apply_dump_filter_p rather than
5201 explicitly masking the dump_kind.
5202 (dump_dec): Likewise.
5203 (dump_hex): Likewise.
5204 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
5205 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
5206 (opt_info_switch_p): Update handling of default
5207 MSG_OPTIMIZED_LOCATIONS to cope with default of
5208 MSG_PRIORITY_USER_FACING.
5209 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5210 masking the dump_kind.
5211 (selftest::test_capture_of_dump_calls): Update test_dump_context
5212 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5213 than MSG_ALL. Generalize scope test to be run at all four
5214 combinations of with/without MSG_PRIORITY_USER_FACING and
5215 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5216 for each of the two values.
5217 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5218 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
5219 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5220 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5221 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5222 with MSG_PRIORITY_*.
5223 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5224 dump messages as MSG_PRIORITY_USER_FACING.
5225 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5226 about the interaction with MSG_PRIORITY_*.
5228 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
5230 * varasm.c (output_constant): Add new parameter merge_strings.
5231 Make strings properly zero terminated in merge string sections.
5232 (mergeable_string_section): Don't fail if the last char is non-zero.
5233 (assemble_variable_contents): Handle merge string sections.
5234 (assemble_variable): Likewise.
5235 (assemble_constant_contents): Likewise.
5236 (output_constant_def_contents): Likewise.
5237 (output_constructor_array_range,
5238 output_constructor_regular_field): Adjust call to output_constant.
5239 (output_object_block): Adjust call to assemble_constant_contents
5240 and assemble_variable_contents.
5242 2018-10-04 Martin Liska <mliska@suse.cz>
5245 * cgraphunit.c (process_function_and_variable_attributes):
5246 Warn about a function with alias attribute and a body.
5248 2018-10-04 Martin Liska <mliska@suse.cz>
5251 * multiple_target.c (redirect_to_specific_clone): New function.
5252 (ipa_target_clone): Use it.
5253 * tree-inline.c: Fix comment.
5255 2018-10-04 David Malcolm <dmalcolm@redhat.com>
5257 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5259 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5260 (gcc::dump_manager::register_pass): New member function, adapted
5261 from loop body in gcc::pass_manager::register_pass, adding a
5262 call to update_dfi_for_opt_info.
5263 (gcc::dump_manager::opt_info_enable_passes): Store the
5264 -fopt-info options into the new fields. Move the loop
5266 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5268 * dumpfile.h (struct opt_pass): New forward decl.
5269 (gcc::dump_manager::register_pass): New decl.
5270 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5271 (class gcc::dump_manager): Add fields "m_optgroup_flags",
5272 "m_optinfo_flags", and "m_optinfo_filename".
5273 * passes.c (gcc::pass_manager::register_pass): Move all of the
5274 dump-handling code to gcc::dump_manager::register_pass.
5276 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
5278 PR rtl-optimization/87466
5279 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5280 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5281 * doc/tm.texi: Regenerate.
5282 * ira-lives.c (process_bb_node_lives): Use the new target hook.
5283 * lra-lives.c (process_bb_lives): Likewise.
5284 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5287 2018-10-04 Tamar Christina <tamar.christina@arm.com>
5289 * params.c (add_params): Fix initialization.
5291 2018-10-04 Martin Liska <mliska@suse.cz>
5293 PR gcov-profile/84107
5294 * tree-profile.c (init_ic_make_global_vars):
5295 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5296 Come up with new ic_tuple* variables. Emit
5297 __gcov_indirect_call{,_topn} variables.
5298 (gimple_gen_ic_profiler): Access the variable
5300 (gimple_gen_ic_func_profiler): Access
5301 __gcov_indirect_call.callee field.
5302 (gimple_init_gcov_profiler): Use ptr_type_node.
5303 * value-prof.c (gimple_ic): Use ptr_type_node.
5305 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5307 PR tree-optimization/85787
5308 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5309 malloc_candidate_p into this function and add support for
5310 detecting multiple phis.
5311 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5313 2018-10-04 Martin Liska <mliska@suse.cz>
5316 * ipa-inline.c (inline_to_all_callers_1):
5317 Call ultimate_alias_target for node being inlined.
5319 2018-10-03 Jeff Law <law@redhat.com>
5321 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5323 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5324 * tree.h (get_typenode_from_name): Prototype.
5326 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5328 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5329 Change operand 2 predicate to nonimmediate_operand.
5330 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5332 2018-10-03 Martin Sebor <msebor@redhat.com>
5333 Jeff Law <law@redhat.com>
5335 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5337 (get_string_length): Detect unterminated arrays.
5338 (format_string): Same.
5339 (format_directive): Warn about unterminated arrays.
5340 (handle_gimple_call): Mark statements with no_warning as needed.
5342 2018-10-03 Jim Wilson <jimw@sifive.com>
5344 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5345 also define __riscv_abi_rve. Delete trailing white space.
5347 2018-10-03 Paul Koning <ni1d@arrl.net>
5349 Enable LRA register allocator for PDP11.
5350 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5353 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5354 * config/pdp11/pdp11.opt (-mlra): New option.
5355 * doc/invoke.texi (PDP-11 Options): Document -mlra.
5357 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
5359 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5360 (*<absneg:code>extend<mode>xf2): Ditto.
5362 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5364 PR tree-optimization/87415
5365 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5368 2018-10-02 Jeff Law <law@redhat.com>
5370 * gimple-fold.c (get_range_strlen): Only set *nonstr when
5371 an unterminated string is discovered. Bubble up range
5372 even for unterminated strings.
5373 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5374 indicates the string was not terminated via NONSTR.
5376 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
5378 * tree-vrp.c (extract_range_from_unary_expr): Special case all
5379 pointer conversions.
5380 Do not do anything special for anti-ranges.
5382 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
5384 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5385 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5387 2018-10-03 Martin Liska <mliska@suse.cz>
5389 PR gcov-profile/86109
5390 * coverage.c (coverage_begin_function): Do not
5391 mark lambdas as artificial.
5392 * tree-core.h (struct GTY): Remove tm_clone_flag
5393 and introduce new lambda_function.
5394 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5396 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5399 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5400 P8_VECTOR and VSX are enabled.
5402 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5404 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5405 0x3907 as CPU model number.
5407 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
5409 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5410 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5411 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5412 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5413 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5414 * config/s390/s390.md: Likewise. Rename also the cpu attribute
5415 value from arch12 to z14.
5417 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5419 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5421 (isinf<mode>2): Ditto.
5423 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
5425 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5426 before emitting fxam. Perform calculations in XFmode.
5428 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5430 * match.pd (((X /[ex] A) +- B) * A): New transformation.
5432 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5435 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5436 * tree.c (signed_or_unsigned_type_for): Handle complex.
5438 2018-10-02 Jeff Law <law@redhat.com>
5440 * gimple-fold.c (get_range_strlen): Remove dead code.
5442 2018-10-02 Martin Sebor <msebor@redhat.com>
5443 Jeff Law <law@redhat.com>
5445 * builtins.c (unterminated_array): Add new arguments.
5446 If argument is not terminated, bubble up size and exact
5448 (expand_builtin_strnlen): Detect, avoid expanding
5449 and diagnose unterminated arrays.
5450 (c_strlen): Fill in offset of start of unterminated strings.
5451 * builtins.h (unterminated_array): Update prototype.
5453 2018-10-02 Richard Biener <rguenther@suse.de>
5455 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5456 of haddv4df, first reduce to SSE width and exploit the fact
5457 that we only need element zero with the reduction result.
5458 (reduc_plus_scal_v2df): Likewise.
5460 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5462 * dojump.h (do_jump): Delete.
5463 (do_jump_1): Likewise.
5464 (split_comparison): Move around.
5465 * dojump.c (do_jump): Make static.
5466 (do_jump_1): Likewise.
5467 (jumpifnot): Move around.
5468 (jumpifnot_1): Likewise.
5470 (jumpif_1): Likewise.
5471 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5473 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5475 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5476 insns in the delay slot and add_insn_after for the jump insn.
5478 2018-10-02 Richard Biener <rguenther@suse.de>
5480 * tree-inline.c (expand_call_inline): Use the location of
5481 the callee declaration for the inline-entry marker.
5482 * final.c (notice_source_line): Remove special-casing of
5483 NOTE_INSN_INLINE_ENTRY.
5485 2018-10-01 Carl Love <cel@us.ibm.com>
5488 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5489 (__builtin_mtfsb0): New.
5490 (__builtin_mtfsb1): New.
5491 ( __builtin_set_fpscr_rn): New.
5492 (__builtin_set_fpscr_drn): New.
5493 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5494 (rs6000_expand_set_fpscr_rn_builtin): Add.
5495 (rs6000_expand_set_fpscr_drn_builtin): Add.
5496 (rs6000_expand_builtin): Add case statement entries for
5497 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5498 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5499 RS6000_BUILTIN_MFFSL.
5500 (rs6000_init_builtins): Add ftype initialization and def_builtin
5501 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5502 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5503 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5504 rs6000_mffscdrn): Add define_insn.
5505 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5506 * doc/extend.texi: Add documentation for the builtins.
5508 2018-10-01 Richard Biener <rguenther@suse.de>
5510 PR tree-optimization/87465
5511 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5512 causing branch miscounts.
5514 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5516 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5517 aarch64_option_default_param): New.
5518 (params.h): Include.
5519 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5520 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5521 stack-clash protection validation code.
5523 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5525 * params.c (validate_param): New.
5526 (add_params): Use it.
5527 (set_param_value): Refactor param validation into validate_param.
5528 (diagnostic.h): Include.
5529 * diagnostic.h (diagnostic_ready_p): New.
5531 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5533 * params.c (set_param_value):
5534 Add index of parameter being validated.
5535 * common/common-target.def (option_validate_param): New.
5536 * common/common-targhooks.h (default_option_validate_param): New.
5537 * common/common-targhooks.c (default_option_validate_param): New.
5538 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5539 * doc/tm.texi: Regenerate.
5541 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5544 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5545 Add validation for stack-clash parameters and set defaults.
5547 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5550 * configure.ac: Add stack-clash-protection-guard-size.
5551 * doc/install.texi: Document it.
5552 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5553 * params.def: Update comment for guard-size.
5554 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5555 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5556 * configure: Regenerate.
5558 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5561 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5562 STACK_DYNAMIC_OFFSET): New.
5563 * config/aarch64/aarch64.c (aarch64_layout_frame):
5564 Update outgoing args size.
5565 (aarch64_stack_clash_protection_alloca_probe_range,
5566 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5568 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5571 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5573 * target.def (stack_clash_protection_alloca_probe_range): New.
5574 (stack_clash_protection_final_dynamic_probe): Remove.
5575 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5576 (default_stack_clash_protection_final_dynamic_probe): Remove.
5577 * targhooks.c: Likewise.
5578 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5579 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5580 * doc/tm.texi: Regenerate.
5582 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5585 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5586 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5587 aarch64_clamp_to_uimm12_shift): New.
5588 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5589 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5591 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5594 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5596 2018-10-01 Jeff Law <law@redhat.com>
5597 Richard Sandiford <richard.sandiford@linaro.org>
5598 Tamar Christina <tamar.christina@arm.com>
5601 * config/aarch64/aarch64.md
5602 (probe_stack_range): Add k (SP) constraint.
5603 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5604 STACK_CLASH_MAX_UNROLL_PAGES): New.
5605 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5606 stack probes for stack clash.
5607 (aarch64_allocate_and_probe_stack_space): New.
5608 (aarch64_expand_prologue): Use it.
5609 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5610 (aarch64_sub_sp): Add emit_move_imm optional param.
5612 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
5614 PR tree-optimization/87261
5615 * match.pd: Remove trailing whitespace.
5616 Add (x & y) | ~(x | y) -> ~(x ^ y),
5617 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5619 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5621 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5623 (ashlsi3_insn): Update instruction constraints.
5624 (ashrsi3_insn): Likewise.
5625 (rotrsi3): Likewise.
5626 (add_shift): Likewise.
5627 * config/arc/constraints.md (Csz): New 32 bit constraint. It
5628 avoids placing in the limm field small constants which, otherwise,
5629 could end into a small instruction.
5631 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5633 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5634 destination register is not odd-even.
5635 (umaddsidi4_split): Likewise.
5637 2018-10-01 Richard Biener <rguenther@suse.de>
5639 * tree-inline.c (expand_call_inline): Store origin of fn
5640 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5641 * tree.c (block_ultimate_origin): Simplify and do some
5644 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
5646 * config/i386/mmx.md (EMMS): New int iterator.
5647 (emms): New int attribute.
5648 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5649 EMMS int iterator. Explicitly declare clobbers.
5650 (mmx_emms): Remove expander.
5652 * config/i386/predicates.md (emms_operation): Remove predicate.
5653 (vzeroall_pattern): New predicate.
5654 (vzeroupper_pattern): Rename from vzeroupper_operation.
5655 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5656 vzeroupper_pattern and vzeroall_pattern predicates.
5658 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
5660 PR rtl-optimization/86939
5661 * ira-lives.c (make_hard_regno_born): Rename from this...
5662 (make_hard_regno_live): ... to this. Remove update to conflict
5663 information. Update function comment.
5664 (make_hard_regno_dead): Add conflict information update. Update
5666 (make_object_born): Rename from this...
5667 (make_object_live): ... to this. Remove update to conflict information.
5668 Update function comment.
5669 (make_object_dead): Add conflict information update. Update function
5671 (mark_pseudo_regno_live): Call make_object_live.
5672 (mark_pseudo_regno_subword_live): Likewise.
5673 (mark_hard_reg_dead): Update function comment.
5674 (mark_hard_reg_live): Call make_hard_regno_live.
5675 (process_bb_node_lives): Likewise.
5676 * lra-lives.c (make_hard_regno_born): Rename from this...
5677 (make_hard_regno_live): ... to this. Remove update to conflict
5678 information. Remove now uneeded check_pic_pseudo_p argument.
5679 Update function comment.
5680 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5681 to conflict information. Update function comment.
5682 (mark_pseudo_live): Remove update to conflict information. Update
5684 (mark_pseudo_dead): Add conflict information update.
5685 (mark_regno_live): Call make_hard_regno_live.
5686 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5687 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5689 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
5692 * config/i386/i386.c (construct_container): Use TImode for
5693 BLKmode values in 2 integer registers.
5695 2018-09-29 Jeff Law <law@redhat.com>
5697 * builtins.c (unterminated_array): Pass in c_strlen_data * to
5698 c_strlen rather than just a tree *.
5699 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5700 Update recursive calls appropriately. If caller did not provide a
5701 suitable data pointer, create a local one. When a non-terminated
5702 string is discovered, bubble up information about the string via the
5703 c_strlen_data object.
5704 * builtins.h (c_strlen): Update prototype.
5705 (c_strlen_data): New structure.
5706 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5707 For a type 2 call, if c_strlen indicates a non-terminated string
5708 use the length of the non-terminated string.
5709 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5711 2018-09-29 Jakub Jelinek <jakub@redhat.com>
5714 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5715 __m512d type for __A argument rather than __m512.
5717 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
5719 * match.pd (simple_comparison): Don't optimize if either operand is
5720 a function pointer when target needs function pointer canonicalization.
5722 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5724 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5725 power5 .. power9 to remove indirection.
5726 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5727 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5728 ASM_CPU_476_SPEC): Delete.
5729 (ASM_CPU_SPEC): Adjust.
5730 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5731 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5733 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5735 * config.in: Delete HAVE_AS_DCI.
5736 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5737 * config/rs6000/rs6000.h: Ditto.
5738 * configure.ac: Delete HAVE_AS_DCI.
5739 * configure: Regenerate.
5741 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5743 * config.in (HAVE_AS_LWSYNC): Delete.
5744 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5745 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5747 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5748 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5750 * configure.ac: Delete HAVE_AS_LWSYNC.
5751 * configure: Regenerate.
5753 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5754 Pierre-Marie de Rodat <derodat@adacore.com>
5756 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5757 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5758 (cgraph_node::create_thunk): Add indirect_offset parameter.
5759 (thunk_adjust): Likewise.
5760 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5761 and initialize the corresponding field with it.
5762 (cgraph_node::dump): Dump indirect_offset field.
5763 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5764 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5765 (thunk_adjust): Add indirect_offset parameter and deal with it.
5766 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5767 pass it to thunk_adjust. Do not call the target hook if it's non-zero
5768 or if the thunk is external or local. Fix formatting. Do not chain
5769 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
5770 if any, in the GIMPLE representation.
5771 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5772 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5773 (input_node): Read indirect_offset field.
5774 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5775 call to thunk_adjust.
5776 * tree-nested.c (struct nesting_info): Add thunk_p field.
5777 (create_nesting_tree): Set it.
5778 (convert_all_function_calls): Copy static chain from targets to thunks.
5779 (finalize_nesting_tree_1): Return early for thunks.
5780 (unnest_nesting_tree_1): Do not finalize thunks.
5781 (gimplify_all_functions): Do not gimplify thunks.
5783 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5785 * opt-suggestions.c (option_proposer::build_option_suggestions):
5786 Release "option_values".
5788 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5790 * coverage.c (get_coverage_counts): Convert problem-reporting dump
5791 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5792 * dumpfile.c (kind_as_string): New function.
5793 (dump_loc): Rather than a hardcoded prefix of "note: ", use
5794 kind_as_string to vary the prefix based on dump_kind.
5795 (selftest::test_capture_of_dump_calls): Update for above.
5797 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5799 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5800 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
5802 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5804 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5805 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5806 INVALID_REGNUM instead of FPSR_REG.
5807 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5808 * config/i386/i386.md: Update comment of FP compares.
5809 (fldenv): Do not clobber FPSR_REG.
5811 2018-09-28 Richard Biener <rguenther@suse.de>
5813 * tree.h (BLOCK_ORIGIN): New.
5814 * omp-expand.c (grid_expand_target_grid_body): Assign
5815 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5816 * tree-inline.c (remap_block): Likewise.
5817 * auto-profile.c (get_function_decl_from_block): Simplify
5818 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5819 * langhooks.c (lhd_print_error_function): Likewise.
5820 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5822 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5823 * tree.c (block_nonartificial_location): Likewise.
5824 (block_ultimate_origin): Likewise.
5825 * tree-pretty-print.c (percent_K_format): Likewise. Remove
5826 no longer needed LTO case.
5828 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
5829 Jan Hubicka <jh@suse.cz>
5830 Martin Jambor <mjambor@suse.cz>
5832 * simplify-rtx.c (simplify_merge_mask): New function.
5833 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5834 same masks are used in op1 or op2.
5835 (test_vec_merge): New function.
5836 (test_vector_ops): Call test_vec_merge.
5838 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5840 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5841 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5842 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5843 (cypress_costs): Set it.
5844 (supersparc_costs): Likewise.
5845 (hypersparc_costs): Likewise.
5846 (leon_cost): Likewise.
5847 (leon3_costs): Likewise.
5848 (sparclet_costs): Likewise.
5849 (ultrasparc_costs): Likewise.
5850 (ultrasparc_costs): Likewise.
5851 (niagara_costs): Likewise.
5852 (niagara2_costs): Likewise.
5853 (niagara3_costs): Likewise.
5854 (niagara4_costs): Likewise.
5855 (niagara7_costs): Likewise.
5856 (m8_costs): Likewise.
5857 (TARGET_CAN_FOLLOW_JUMP): Define.
5858 (pass_work_around_errata::gate): Minor tweak.
5859 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5860 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5861 Automaitcally clear MASK_FSMULD mask for V7 processors.
5862 (sparc_can_follow_jump): New static function.
5863 (output_ubranch): Deal with CROSSING_JUMP_P.
5864 (sparc_use_sched_lookahead): Rewrite using switch statement.
5865 (sparc_issue_rate): Reorder.
5866 (sparc_branch_cost): New function.
5868 2018-09-27 Martin Sebor <msebor@redhat.com>
5870 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5871 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5872 (int_fits_type_p): Same.
5874 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
5876 * config/i386/i386.md (FPCR_REG): Remove.
5877 (UNSPEC_FLDCW): Remove.
5878 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5879 (x86_fldcw_1): Remove insn pattern.
5880 (fnstenv): Do not clobber FPCR_REG.
5882 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5883 (CALL_USED_REGISTERS): Ditto.
5884 (REG_ALLOC_ORDER): Ditto.
5885 (REG_CLASS_CONTENTS): Ditto.
5886 (HI_REGISTER_NAMES): Ditto.
5887 (ADDITIONAL_REGISTER_NAMES): Use defines instead
5888 of numerical constants.
5889 * config/i386/i386.c (regclass_map): Remove fpsr register.
5890 (dbx_register_map): Ditto.
5891 (dbx64_register_map): Ditto.
5892 (svr4_dbx_register_map): Ditto.
5893 (print_reg): Do not handle FPCR_REG.
5895 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
5898 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5899 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5900 Delete, always treat as true.
5901 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5902 Ditto. Simplify remaining code.
5903 * config/powerpcspe/powerpcspe.h: Ditto.
5904 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5905 Simplify remaining code.
5906 (rs6000_expand_builtin): Ditto.
5907 * config/rs6000/rs6000.h: Ditto.
5908 * configure.ac: Ditto.
5909 * configure: Regenerate.
5911 2018-09-27 Martin Liska <mliska@suse.cz>
5913 * coverage.c (get_coverage_counts): Revert the formatting
5914 of missing profile opt info.
5916 2018-09-27 Richard Biener <rguenther@suse.de>
5920 * dwarf2out.c (set_block_origin_self): Do not mark outermost
5921 block as we do not output that.
5922 (gen_inlined_subroutine_die): Elide the originally outermost
5923 block, matching what we do for concrete instances.
5924 (decls_for_scope): Add parameter specifying whether to recurse
5927 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
5928 Tom de Vries <tom@codesourcery.com>
5932 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5933 STORE_FLAG_VALUE == 1.
5935 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
5937 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5938 constant definitions.
5939 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5940 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5941 ("speculation_barrier"): New expander definition.
5943 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
5945 PR gcov-profile/86957
5946 * common.opt: New warning option -Wmissing-profile.
5947 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5948 * doc/invoke.texi: Document -Wmissing-profile.
5950 2018-09-26 Jim Wilson <jimw@sifive.com>
5952 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5953 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5955 2018-09-26 Martin Sebor <msebor@redhat.com>
5957 * tree.c (zerop): Change return type to bool.
5958 (integer_zerop, integer_onep, integer_each_onep): Same.
5959 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5960 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5961 (real_onep, real_minus_onep, chain_index): Same.
5962 (print_type_hash_statistics, type_list_equal): Same.
5963 * tree.h (zerop): Same.
5964 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5965 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5966 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5967 (real_onep, real_minus_onep, chain_index): Same.
5968 (print_type_hash_statistics, type_list_equal): Same.
5970 2018-09-26 Jim Wilson <jimw@sifive.com>
5972 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5974 2018-09-26 Jakub Jelinek <jakub@redhat.com>
5977 * config/i386/i386.c: Include debug.h and dwarf2out.h.
5978 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5981 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
5983 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5985 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5987 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5988 and FP_SECOND_SSE_REGS.
5989 (REG_CLASS_NAMES): Ditto.
5990 (REG_CLASS_CONTENTS): Ditto.
5991 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5992 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5993 (ix86_preferred_output_reload_class): Ditto.
5994 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5995 clobber constraint to "=&f".
5996 (fix_truncdi_i387): Ditto.
5997 (lrintxfdi2): Ditto.
5998 (fistdi2_<rounding>): Ditto.
5999 (fpremxf4_i387): Change "=u" constraint to "=f".
6000 (fprem1xf4_i387): Ditto.
6002 (fptanxf4_i387): Ditto.
6003 (fxtractxf3_i387): Ditto.
6004 (fscalexf4_i387): Ditto.
6005 (atan2xf3): Change "u" constraint to "f".
6006 (fyl2xxf3_i387): Ditto.
6007 (fyl2xp1xf3_i387): Ditto.
6009 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
6012 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
6013 for removed I387_MASK_PM entity.
6016 2018-09-26 Jeff Law <law@redhat.com>
6018 2018-09-26 Alexey Neyman <stilor@att.net>
6020 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6021 headers are no longer pulled in by <isl/val.h>.
6023 2018-09-26 Richard Biener <rguenther@suse.de>
6026 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
6027 or concrete instance DIE to the tree. Create abstract origin
6028 attributes also for concrete instances.
6030 2018-09-26 Alexey Neyman <stilor@att.net>
6032 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6033 headers are no longer pulled in by <isl/val.h>.
6035 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
6037 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
6038 Use new helper functions.
6039 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
6040 Use new helper functions.
6041 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
6042 aarch_mm_needs_release): New declarations.
6043 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
6044 aarch_mm_needs_release): New.
6046 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
6048 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
6049 (arm32_output_mi_thunk): Deal with long calls.
6051 2018-09-26 Richard Biener <rguenther@suse.de>
6055 * tree-inline.c (expand_call_inline): When the location
6056 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
6057 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
6058 the inserted BLOCK to make inlined_function_outer_scope_p
6060 * dwarf2out.c (add_call_src_coords_attributes): Do not add
6061 coords for reserved locations.
6063 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6065 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
6066 (*call_indirect_nonlocal_sysv<mode>): Ditto.
6067 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
6068 (*sibcall_nonlocal_sysv<mode>): Ditto.
6069 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
6070 (<bd>_<mode>): Ditto.
6071 (<bd>tf_<mode>): Ditto.
6073 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6075 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
6076 control string as a list of templates instead of as C code.
6077 (*altivec_movti): Ditto.
6078 * config/rs6000/darwin.md (movdf_low_di): Ditto.
6080 2018-09-25 Jim Wilson <jimw@sifive.com>
6082 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
6083 when target symbol is weak.
6085 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6088 * builtins.c (unterminated_array): Simplify.
6089 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
6090 where pointer arithmetic is safe.
6092 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
6095 * config/rs6000/altivec.md (altivec_vspltb): Use
6096 const_0_to_15_operand instead of u5bit_cint_operand.
6097 (*altivec_vspltb_internal): Ditto.
6098 (altivec_vspltb_direct): Ditto.
6099 (altivec_vsplth): Use const_0_to_7_operand instead of
6101 (*altivec_vsplth_internal): Ditto.
6102 (altivec_vsplth_direct): Ditto.
6103 (altivec_vspltw): Use const_0_to_3_operand instead of
6105 (*altivec_vspltw_internal): Ditto.
6106 (altivec_vspltw_direct): Ditto.
6107 (altivec_vspltsf): Ditto.
6108 (*altivec_vspltsf_internal): Ditto.
6109 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
6110 various splats with the proper size immediate. Reorder the various
6111 cases by ascending size of immediate, and put all such together.
6113 2018-09-25 Richard Biener <rguenther@suse.de>
6116 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
6118 (maybe_create_die_with_external_ref): Do not create
6119 DW_TAG_imported_unit here.
6120 (add_abstract_origin_attribute): Handle external BLOCK refs.
6121 (dwarf2out_abstract_function): Simplify LTO case.
6122 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
6123 rather than using maybe_create_die_with_external_ref.
6125 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
6128 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
6129 (frndintxf2_mask_pm_i387): Ditto.
6130 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
6131 Enable for !flag_trapping_math.
6132 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
6133 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
6134 Change operand 1 predicate to nonimmediate_operand.
6135 (attr "i387_cw"): Remove mask_pm.
6136 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
6137 (enum ix86_entity): Remove I387_MASK_PM.
6138 * config/i386/i386.c (ix86_i387_mode_needed): Do not
6139 handle I387_MASK_PM.
6140 (ix86_mode_needed): Ditto.
6141 (ix86_mode_after): Ditto.
6142 (ix86_mode_entry): Ditto.
6143 (ix86_mode_exit): Ditto.
6144 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
6146 2018-09-25 Jakub Jelinek <jakub@redhat.com>
6148 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
6149 to_update_switch_stmts to vNULL instead of calling create on them
6152 2018-09-25 Richard Biener <rguenther@suse.de>
6154 PR tree-optimization/87402
6155 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
6156 (visit_phi): Re-instantiate handling of supposed to be VARYING
6157 but non-VARYING backedge value.
6159 2018-09-25 Richard Biener <rguenther@suse.de>
6162 * dwarf2out.c (struct sym_off_pair): New.
6163 (external_die_map): New global.
6164 (lookup_decl_die): When in LTO create DIEs lazily from the
6166 (lookup_block_die): New function, create DIEs lazily in LTO.
6167 (equate_block_to_die): New function.
6168 (dwarf2out_die_ref_for_decl): During WPA get the association
6169 from the external DIE map.
6170 (dwarf2out_register_external_die): Record mapping into the
6172 (maybe_create_die_with_external_ref): New function split out from
6173 DIE generation part of old dwarf2out_register_external_die.
6174 (add_abstract_origin_attribute): Do not return the DIE. When
6175 in LTO reference externals directly.
6176 (dwarf2out_abstract_function): When in LTO ignore calls for
6177 decls with external DIEs (already present abstract instances).
6178 (gen_call_site_die): Adjust.
6179 (add_high_low_attributes): Likewise.
6180 (gen_lexical_block_die): Likewise.
6181 (gen_inlined_subroutine_die): Likewie.
6182 (gen_block_die): Likewise.
6183 (dwarf2out_inline_entry): Likewise.
6184 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
6187 2018-09-25 Martin Liska <mliska@suse.cz>
6189 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
6190 integers and not by a float value.
6192 2018-09-25 Martin Liska <mliska@suse.cz>
6195 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
6197 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
6198 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
6199 * godump.c (go_format_type): Remove extra parenthesis.
6201 2018-09-25 Martin Liska <mliska@suse.cz>
6203 * alias.c (set_dest_equal_p): Remove unused function.
6204 * config/i386/i386.c (def_builtin_pure2): Likewise.
6205 * diagnostic-show-locus.c (class layout): Remove
6207 (layout::layout): Likewise here.
6208 * dump-context.h (class temp_dump_context): Likewise.
6209 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6210 (add_AT_loclistsptr): Likewise.
6211 (add_AT_offset): Likewise.
6212 (get_AT_hi_pc): Likewise.
6213 (is_comdat_die): Likewise.
6214 (type_is_enum): Likewise.
6215 (ceiling): Likewise.
6216 (add_AT_vms_delta): Likewise.
6217 (is_class_die): Likewise.
6218 * edit-context.c (class line_event): Remove unused field.
6219 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6221 * ipa-cp.c (ipa_get_vr_lat): Likewise.
6222 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6223 (ok_for_base_p_nonstrict): Likewise.
6224 * tree-chrec.c (is_not_constant_evolution): Likewise.
6225 (chrec_fold_poly_cst): Likewise.
6226 * tree-if-conv.c (has_pred_critical_p): Likewise.
6227 * tree-ssa-coalesce.c (print_exprs): Likewise.
6228 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6229 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6230 * tree-vrp.c (value_ranges_intersect_p): Likewise.
6231 (value_range_nonnegative_p): Likewise.
6233 2018-09-25 Martin Liska <mliska@suse.cz>
6235 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6236 Do not handle "GNU Pascal".
6237 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6239 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6240 from documentation. Likewise.
6241 * dbxout.c (dbxout_range_type): Likewise.
6242 * doc/cpp.texi: Likewise.
6243 * doc/extend.texi: Likewise.
6244 * doc/frontends.texi: Likewise.
6245 * doc/invoke.texi: Remove Pascal entry.
6246 * tree.def (CLEANUP_POINT_EXPR): Likewise.
6247 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6249 2018-09-25 Martin Liska <mliska@suse.cz>
6252 * doc/invoke.texi: Document all parameters and remove default
6255 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
6258 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6259 contains HOST_WIDE_INTs when computing its size.
6261 2018-09-24 Jim Wilson <jimw@sifive.com>
6264 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6266 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6268 2018-09-24 Andrew Pinski <apinski@marvell.com>
6270 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6271 access prev before checking it for NULLness in the
6272 AARCH64_FUSE_CMP_BRANCH case.
6274 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
6277 * config/i386/i386.c (rest_of_insert_endbranch): Set
6278 endbr_queued_at_entrance to true and don't insert ENDBR if
6279 x86_function_profiler will be called.
6280 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6282 * config/i386/i386.h (machine_function): Add
6283 endbr_queued_at_entrance.
6285 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6287 * genattrtab.c (mk_attr_alt): Use alternative_mask.
6288 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6290 (check_attr_test): Use alternative_mask.
6291 (get_attr_value): Likewise.
6292 (compute_alternative_mask): Use alternative_mask and XWINT.
6293 (make_alternative_compare): Use alternative_mask.
6294 (attr_alt_subset_p): Use XWINT.
6295 (attr_alt_subset_of_compl_p): Likewise.
6296 (attr_alt_intersection): Use alternative_mask and XWINT.
6297 (attr_alt_union): Likewise.
6298 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6299 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6300 (simplify_test_exp): Use alternative_mask and XWINT.
6301 (write_test_expr): Use alternative_mask and XWINT, adjust bit
6302 number calculation to support 64 bits. Generate code that
6303 checks 64-bit masks.
6304 (main): Use alternative_mask.
6305 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6307 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
6310 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6311 RETURN+USE when returning via %r14.
6313 2018-09-24 Martin Liska <mliska@suse.cz>
6315 * gcov.c (output_lines): Print colorization legend
6316 for both flag_use_colors and flag_use_hotness_colors.
6319 2018-09-24 Martin Liska <mliska@suse.cz>
6321 * coverage.c (get_coverage_counts): Use warning_at
6322 with current_function_decl location. Use %qD in warning
6325 2018-09-24 Martin Liska <mliska@suse.cz>
6327 * memory-block.h (memory_block_pool::release): Annotate with
6328 valgrind that the memory is not accessible.
6330 2018-09-24 Martin Liska <mliska@suse.cz>
6333 * asan.c: Make asan_handled_variables extern.
6335 * cfgexpand.c (expand_stack_vars): Make sure
6336 a representative is unpoison if another
6337 variable in the partition is handled by
6338 use-after-scope sanitization.
6340 2018-09-24 Richard Biener <rguenther@suse.de>
6342 PR tree-optimization/63155
6343 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6344 the worklist when the edge of the respective argument isn't
6347 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6349 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6350 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6351 (MASK_CLASS_P): Update for rename.
6352 (MAYBE_MASK_CLASS_P): Ditto.
6353 (REG_CLASS_NAMES): Update.
6354 (REG_CLASS_CONTENT): Update.
6355 * config/i386/i386.c (regclass_map): Update for MASK_REG
6356 and ALL_MASK_REGS rename.
6357 * config/i386/constraints.md (Yk): Update for rename.
6360 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6362 * config/i386/i386.h (enum reg_class): Remove
6363 EVEX_SSE_REGS and MOD4_SSE_REGS.
6364 (REG_CLASS_NAMES): Update.
6365 (REG_CLASS_CONTENT): Update.
6366 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6367 registers as ALL_SSE_REGS.
6368 (ix86_additional_allocno_class_p): Remove.
6369 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6370 (ix86_register_priority): Lower priority of EVEX SSE registers.
6371 Use IN_RANGE macro where appropriate.
6372 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6373 AVX-5124VNNIW checks.
6374 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6375 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6376 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6377 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6378 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6379 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6380 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6381 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6382 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6383 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6384 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6385 * config/i386/constraints.md (Yh): Remove.
6387 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
6389 * config/i386/i386.c (regclass_map): Declare integer REX registers
6392 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
6394 * doc/service.texi (Service): Switch the fsf.org link to https.
6396 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
6399 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6400 Define to speculation_safe_value_not_needed.
6402 2018-09-21 Florian Weimer <fweimer@redhat.com>
6405 * doc/extend.texi (Common Function Attributes): Mention that
6406 noreturn suppresses tail call optimization.
6408 2018-09-21 Jeff Law <law@redhat.com>
6410 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6411 vr_values::cleanup_edges_and_switches.
6412 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6414 (identify_jump_threads): Remove EDGE_IGNORE handling.
6415 (execute_vrp): Move handling of to_remove_edges and
6416 to_update_switch_stmts into vr_values class member functions.
6417 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6418 (to_update_switch_stmts): Likewise.
6419 * vr-values.c: Include cfghooks.h.
6420 (vr_values::vr_values): Initialize to_remove_edges and
6421 to_update_switch_stmts.
6422 (vr_values::~vr_values): Verify to_remove_edges and
6423 to_update_switch_stmts are empty.
6424 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6425 (vr_values::cleanup_edges_and_switches): New member function.
6426 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6427 function. Add new data members.
6429 2018-09-21 David Malcolm <dmalcolm@redhat.com>
6431 PR tree-optimization/87309
6432 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6433 calls with pflags and alt_flags.
6434 (selftest::test_capture_of_dump_calls): Add test of interaction of
6435 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6437 2018-09-21 Olivier Hainque <hainque@adacore.com>
6439 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6441 2018-09-21 Olivier Hainque <hainque@adacore.com>
6443 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6445 2018-09-21 Olivier Hainque <hainque@adacore.com>
6447 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6448 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6449 (VXWORKS_LIBS_RTP): Minor reordering.
6451 2018-09-21 Olivier Hainque <hainque@adacore.com>
6453 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6454 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6456 2018-09-21 Olivier Hainque <hainque@adacore.com>
6458 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6459 (PTRDIFF_TYPE): Likewise.
6461 2018-09-21 Olivier Hainque <hainque@adacore.com>
6463 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6464 triplet, similar to support for VxWorks7.
6465 * config/vxworks-dummy.h: Provide a default definition
6466 of TARGET_VXWORKS64 to 0.
6468 2018-09-21 Olivier Hainque <hainque@adacore.com>
6470 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6471 * config/vxworks-dummy.h: here.
6473 2018-09-21 Olivier Hainque <hainque@adacore.com>
6475 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6477 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
6478 Bo Zhou <zbo.zhou@hisilicon.com>
6480 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6481 * config/aarch64/aarch64-tune.md: Regenerated.
6482 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6483 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6484 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6486 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
6487 Julian Brown <julian@codesourcery.com>
6489 * builtins.c (get_builtin_sync_mem): Handle address spaces.
6491 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6493 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6494 if the call takes a static chain.
6496 2018-09-21 Martin Liska <mliska@suse.cz>
6498 * auto-profile.c (autofdo_source_profile::read): Do not
6500 (read_profile): Do not add working sets.
6501 (read_autofdo_file): Remove sum_all.
6502 (afdo_callsite_hot_enough_for_early_inline): Remove const
6504 * coverage.c (struct counts_entry): Remove gcov_summary.
6505 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6506 do not support GCOV_TAG_PROGRAM_SUMMARY.
6507 (get_coverage_counts): Remove summary and expected
6509 * coverage.h (get_coverage_counts): Likewise.
6510 * doc/gcov-dump.texi: Remove -w option.
6511 * gcov-dump.c (dump_working_sets): Remove.
6512 (main): Do not support '-w' option.
6513 (print_usage): Likewise.
6514 (tag_summary): Likewise.
6515 * gcov-io.c (gcov_write_summary): Do not dump
6517 (gcov_read_summary): Likewise.
6518 (gcov_histo_index): Remove.
6519 (gcov_histogram_merge): Likewise.
6520 (compute_working_sets): Likewise.
6521 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6523 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6524 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6525 (GCOV_HISTOGRAM_SIZE): Remove.
6526 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6527 (struct gcov_summary): Simplify rapidly just
6528 to runs and sum_max fields.
6529 (gcov_histo_index): Remove.
6530 (NUM_GCOV_WORKING_SETS): Likewise.
6531 (compute_working_sets): Likewise.
6532 * gcov-tool.c (print_overlap_usage_message): Remove
6533 trailing empty line.
6534 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6535 (output_lines): Remove program related line.
6536 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6537 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6539 (input_profile_summary): Do not read it.
6540 (merge_profile_summaries): And do not merge it.
6541 (input_symtab): Do not call removed function.
6542 * modulo-sched.c (sms_schedule): Do not print sum_max.
6543 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6544 removed when histogram method was invented.
6545 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6547 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6549 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6550 and dump selected value.
6551 * profile.c (add_working_set): Remove.
6552 (get_working_sets): Likewise.
6553 (find_working_set): Likewise.
6554 (get_exec_counts): Do not work with working sets.
6555 (read_profile_edge_counts): Do not inform as sum_max is removed.
6556 (compute_branch_probabilities): Likewise.
6557 (compute_value_histograms): Remove argument for call of
6558 get_coverage_counts.
6559 * profile.h: Do not make gcov_summary const.
6561 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6563 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6565 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6567 PR tree-optimization/86990
6568 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6569 Check that the entire merged store group is made of constants only for
6572 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6574 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6575 (VTABLE_VERIFICATION_SPEC): Likewise.
6576 (SANITIZER_EARLY_SPEC): Likewise.
6577 (SANITIZER_SPEC): Likewise.
6578 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6579 * doc/invoke.texi (Link Options): Document -r.
6581 2018-09-20 Richard Biener <rguenther@suse.de>
6584 * gimplify.c (gimplify_expr): Retain alignment of
6585 addressable lvalue in dereference.
6587 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6590 * configure.ac: Check for .loc is_stmt support.
6591 * configure, config.in: Rebuilt.
6592 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6595 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6597 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6598 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6601 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6603 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6605 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6608 2018-09-20 Marek Polacek <polacek@redhat.com>
6610 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6612 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6614 PR tree-optimization/87288
6615 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6616 into account when determining PEELING_FOR_NITERS.
6618 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6620 PR tree-optimization/86877
6621 * tree-vect-loop.c (vect_analyze_loop_2): Call
6622 vect_verify_datarefs_alignment.
6624 2018-09-19 Marek Polacek <polacek@redhat.com>
6626 * doc/invoke.texi: Document -Wclass-conversion.
6628 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
6630 * config/pa/pa.c (pa_adjust_priority): Delete.
6631 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6633 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6634 (atomic_storehi): Likewise.
6635 (atomic_storesi): Likewise.
6636 (atomic_loaddi): Restore compare and swap exchange loop code.
6638 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
6640 PR rtl-optimization/86902
6641 * combine.c (try_combine): When changing the CC mode used, don't change
6642 an unrelated mode in other_insn to that new CC mode.
6644 2018-09-19 David Malcolm <dmalcolm@redhat.com>
6646 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6647 with %T in place of calls to dump_generic_expr.
6648 (prune_runtime_alias_test_list): Likewise.
6649 (create_runtime_alias_checks): Likewise.
6650 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6651 (vect_analyze_data_ref_dependence): Likewise.
6652 (vect_slp_analyze_data_ref_dependence): Likewise.
6653 (vect_record_base_alignment): Likewise. Use %G in place of call
6654 to dump_gimple_stmt.
6655 (vect_compute_data_ref_alignment): Likewise.
6656 (verify_data_ref_alignment): Likewise.
6657 (vect_find_same_alignment_drs): Likewise.
6658 (vect_analyze_group_access_1): Likewise.
6659 (vect_analyze_data_ref_accesses): Likewise.
6660 (dependence_distance_ge_vf): Likewise.
6661 (dump_lower_bound): Likewise.
6662 (vect_prune_runtime_alias_test_list): Likewise.
6663 (vect_find_stmt_data_reference): Likewise.
6664 (vect_analyze_data_refs): Likewise.
6665 (vect_create_addr_base_for_vector_ref): Likewise.
6666 (vect_create_data_ref_ptr): Likewise.
6667 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6668 (vect_can_advance_ivs_p): Likewise.
6669 (vect_update_ivs_after_vectorizer): Likewise.
6670 (vect_gen_prolog_loop_niters): Likewise.
6671 (vect_prepare_for_masked_peels): Likewise.
6672 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6673 (vect_determine_vectorization_factor): Likewise.
6674 (vect_is_simple_iv_evolution): Likewise.
6675 (vect_analyze_scalar_cycles_1): Likewise.
6676 (vect_analyze_loop_operations): Likewise.
6677 (report_vect_op): Likewise.
6678 (vect_is_slp_reduction): Likewise.
6679 (check_reduction_path): Likewise.
6680 (vect_is_simple_reduction): Likewise.
6681 (vect_create_epilog_for_reduction): Likewise.
6682 (vect_finalize_reduction:): Likewise.
6683 (vectorizable_induction): Likewise.
6684 (vect_transform_loop_stmt): Likewise.
6685 (vect_transform_loop): Likewise.
6686 (optimize_mask_stores): Likewise.
6687 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6688 (vect_split_statement): Likewise.
6689 (vect_recog_over_widening_pattern): Likewise.
6690 (vect_recog_average_pattern): Likewise.
6691 (vect_determine_min_output_precision_1): Likewise.
6692 (vect_determine_precisions_from_range): Likewise.
6693 (vect_determine_precisions_from_users): Likewise.
6694 (vect_mark_pattern_stmts): Likewise.
6695 (vect_pattern_recog_1): Likewise.
6696 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6697 (vect_record_max_nunits): Likewise.
6698 (vect_build_slp_tree_1): Likewise.
6699 (vect_build_slp_tree_2): Likewise.
6700 (vect_print_slp_tree): Likewise.
6701 (vect_analyze_slp_instance): Likewise.
6702 (vect_detect_hybrid_slp_stmts): Likewise.
6703 (vect_detect_hybrid_slp_1): Likewise.
6704 (vect_slp_analyze_operations): Likewise.
6705 (vect_slp_analyze_bb_1): Likewise.
6706 (vect_transform_slp_perm_load): Likewise.
6707 (vect_schedule_slp_instance): Likewise.
6708 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6709 (vect_mark_stmts_to_be_vectorized): Likewise.
6710 (vect_init_vector_1): Likewise.
6711 (vect_get_vec_def_for_operand): Likewise.
6712 (vect_finish_stmt_generation_1): Likewise.
6713 (vect_check_load_store_mask): Likewise.
6714 (vectorizable_call): Likewise.
6715 (vectorizable_conversion): Likewise.
6716 (vectorizable_operation): Likewise.
6717 (vectorizable_load): Likewise.
6718 (vect_analyze_stmt): Likewise.
6719 (vect_is_simple_use): Likewise.
6720 (vect_get_vector_types_for_stmt): Likewise.
6721 (vect_get_mask_type_for_stmt): Likewise.
6722 * tree-vectorizer.c (increase_alignment): Likewise.
6724 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
6726 * doc/rtl.texi: Adjust vec_select description.
6727 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6728 non-constant selectors.
6730 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
6732 * config/aarch64/aarch64-protos.h
6733 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6734 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6735 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6736 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6737 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6738 (AARCH64_FL_PROFILE): Move index so flags are ordered.
6739 (AARCH64_ISA_RCPC8_4): New flag.
6740 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6741 to aarch64_offset_9bit_signed_unscaled_p.
6742 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6744 * config/aarch64/constraints.md (Ust): New constraint.
6745 * config/aarch64/predicates.md.
6746 (aarch64_9bit_offset_memory_operand): New predicate.
6747 (aarch64_rcpc_memory_operand): New predicate.
6749 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
6751 PR rtl-optimization/87361
6752 * rtlanal.c (nonzero_bits1): Revert accidental change.
6754 2018-09-19 Richard Biener <rguenther@suse.de>
6756 PR tree-optimization/87349
6757 PR tree-optimization/87342
6758 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6760 2018-09-18 Marek Polacek <polacek@redhat.com>
6762 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6763 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6765 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6767 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6769 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6771 PR rtl-optimization/86882
6772 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6774 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
6776 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6777 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6779 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
6782 * doc/invoke.texi (Link Options): Fix formatting and grammar.
6784 2018-09-18 Richard Biener <rguenther@suse.de>
6787 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6788 (compute_samebase_partition_bases): Likewise.
6789 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6790 (gimple_can_coalesce_p): Simplify.
6792 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
6794 Handle a library implementation of ffs calling __builtin_ffs.
6795 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6796 (mmix_init_libfuncs): New function: make __builtin_ffs expand
6799 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6801 * diagnostic-show-locus.c (class layout_range): Add field
6803 (layout_range::layout_range): Add "original_idx" param and use it
6804 to initialize new field.
6805 (make_range): Use 0 for original_idx.
6806 (layout::layout): Pass in index to calls to
6807 maybe_add_location_range.
6808 (layout::maybe_add_location_range): Add param "original_idx" and
6809 pass it on to layout_range.
6810 (layout::print_any_labels): Pass on range->m_original_idx to
6812 (gcc_rich_location::add_location_if_nearby): Use 0 for
6814 * gcc-rich-location.h (text_range_label::get_text): Update for new
6816 (range_label_for_type_mismatch::get_text): Likewise.
6818 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6820 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6822 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6824 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6825 format_string_diagnostic_t.
6826 (fmtwarn_n): Likewise.
6827 * substring-locations.c
6828 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6829 (format_warning_n_va): Convert to...
6830 (format_string_diagnostic_t::emit_warning_n_va): ...this.
6831 (format_warning_va): Convert to...
6832 (format_string_diagnostic_t::emit_warning_va): ...this.
6833 (format_warning_at_substring): Convert to...
6834 (format_string_diagnostic_t::emit_warning): ...this.
6835 (format_warning_at_substring_n): Convert to...
6836 (format_string_diagnostic_t::emit_warning_n): ...this.
6837 * substring-locations.h (class format_string_diagnostic_t): New
6839 (format_warning_va): Convert to
6840 format_string_diagnostic_t::emit_warning_va.
6841 (format_warning_n_va): Convert to
6842 format_string_diagnostic_t::emit_warning_n_va.
6843 (format_warning_at_substring): Convert to
6844 format_string_diagnostic_t::emit_warning.
6845 (format_warning_at_substring_n): Convert to
6846 format_string_diagnostic_t::emit_warning_n.
6848 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
6849 Bernd Schmidt <bernds_cb1@t-online.de>
6851 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6854 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6856 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6857 operand 0 predicate to nonimmediate operand.
6858 (rint<mode>2_frndint): Remove insn pattern.
6859 (rint<mode>2): Change operand 1 predicate to general_operand.
6860 Extend operand 1 to XFmode and generate rintxf2 insn.
6861 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6862 Do not use X87MODEF mode macro.
6863 (frndintxf2_<rounding>_i387): Rename from
6864 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
6865 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6866 to XFmode and generate significandxf3 insn.
6868 2018-09-17 Richard Biener <rguenther@suse.de>
6870 PR tree-optimization/87328
6871 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6872 visiting unexecutable backedges when not iterating.
6873 (do_rpo_vn): Mark all edges not executable even when not
6876 2018-09-17 Martin Jambor <mjambor@suse.cz>
6879 * doc/invoke.texi (Warning Options): Likewise.
6881 2018-09-17 Richard Biener <rguenther@suse.de>
6883 PR tree-optimization/87301
6884 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6885 clean EH info from leftover copy assignments.
6887 2018-09-17 Martin Liska <mliska@suse.cz>
6889 PR gcov-profile/85871
6890 * gcov.c (output_intermediate_file): Fix out of bounds
6893 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
6895 * config/arc/arc.c: Object attributes for core4 not reflected
6897 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6900 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
6902 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6904 2018-09-17 Martin Liska <mliska@suse.cz>
6906 * doc/gcov.texi: Document new option --use-hotness-colors.
6907 * gcov.c (struct source_info): Declare new field.
6908 (source_info::source_info): Set default for maximum_count.
6909 (print_usage): Add new -q option.
6910 (process_args): Process it.
6911 (accumulate_line_info): Save src->maximum_count.
6912 (output_line_beginning): Make color line number if
6913 flag_use_hotness_colors is set.
6914 (output_line_details): Pass default argument value.
6915 (output_lines): Pass src->maximum_count.
6917 2018-09-17 Martin Liska <mliska@suse.cz>
6919 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6920 Use processor_names table.
6921 * config/i386/i386.c (ix86_default_align): Use
6922 processor_cost_table for alignment values.
6923 (ix86_option_override_internal): Use processor_names.
6924 (ix86_function_specific_print): Likewise.
6925 * config/i386/i386.h (struct processor_costs):
6926 Add alignment values.
6927 (struct ptt): Remove and replace with const char *.
6928 * config/i386/x86-tune-costs.h (struct processor_costs):
6929 Declare default alignments for all costs.
6931 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
6933 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6934 symbolics or VR_VARYING ranges for ABS_EXPR.
6935 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6936 when range will wrap.
6938 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
6941 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6942 before and after a JUMP_TABLE_DATA.
6944 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
6947 * dojump.c (do_compare_and_jump): Canonicalize function pointers
6948 when one operand is a function pointer. Use POINTER_TYPE_P and
6949 FUNC_OR_METHOD_TYPE_P.
6950 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6951 * fold-const.c (build_range_check): Likewise.
6952 * match.pd (simple_comparison): Likewise.
6954 2018-09-14 David Malcolm <dmalcolm@redhat.com>
6957 * spellcheck.c (get_edit_distance_cutoff): New function.
6958 (selftest::test_edit_distance_unit_test_oneway): Rename to...
6959 (selftest::test_get_edit_distance_one_way): ...this.
6960 (selftest::test_get_edit_distance_unit): Rename to...
6961 (selftest::test_get_edit_distance_both_ways): ...this.
6962 (selftest::test_edit_distances): Move tests to this new function,
6963 and test some more pairs of strings. Update for above renaming.
6964 (selftest::get_old_cutoff): New function.
6965 (selftest::test_get_edit_distance_cutoff): New function.
6966 (selftest::assert_suggested_for): New function.
6967 (ASSERT_SUGGESTED_FOR): New macro.
6968 (selftest::assert_not_suggested_for): New function.
6969 (ASSERT_NOT_SUGGESTED_FOR): New macro.
6970 (selftest::test_suggestions): New function.
6971 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6972 tests to selftest::test_edit_distances and call it. Add calls to
6973 selftest::test_get_edit_distance_cutoff and
6974 selftest::test_suggestions.
6975 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6976 (best_match::consider): Replace hard-coded cutoff calculation with
6978 (best_match::get_cutoff): New declaration.
6979 (best_match::get_best_meaningful_candidate): Likewise.
6981 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6983 * builtins.c (fold_builtin_strlen): Remove TODO comment.
6985 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6988 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6990 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6991 terminated string literal.
6993 2018-09-14 Martin Sebor <msebor@redhat.com>
6995 * builtins.c (unterminated_array): Handle ARRAY_REF.
6996 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6997 * builtins.h (unterminated_array): Declare extern.
6998 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
7000 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
7003 2018-09-14 Martin Sebor <msebor@redhat.com>
7004 Jeff Law <law@redhat.com>
7006 * builtins.c (unterminated_array): New.
7007 (expand_builtin_strcpy): Adjust.
7008 (expand_builtin_strcpy_args): Detect unterminated arrays.
7009 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
7010 unterminated arrays.
7011 * gimple-fold.h (get_maxval_strlen): Add argument.
7012 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
7014 * gimple-fold.c (get_range_strlen): Add argument.
7015 (get_maxval_strlen): Adjust.
7016 * gimple-fold.h (get_range_strlen): Add argument.
7018 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
7020 * config/i386/movdirintrin.h: Fix copyright year.
7022 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
7024 * reg-stack.c: Include regs.h.
7025 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
7026 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
7027 FIRST_STACK_REG, not DFmode.
7028 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
7029 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
7030 (change stack): Default register mode to the reg_raw_mode of
7031 FIRST_STACK_REG, not DFmode.
7032 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
7033 (*swapxf): Rename from swapxf.
7035 2018-09-14 Carl Love <cel@us.ibm.com>
7037 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
7038 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
7040 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
7043 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
7046 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
7049 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
7051 2018-09-14 Jason Merrill <jason@redhat.com>
7053 Fix --enable-gather-detailed-mem-stats.
7054 * hash-table.c (hash_table_usage): Change from variable to function.
7055 * hash-table.h: Adjust.
7056 * Makefile.in: Add missing dependencies on hash-table.h.
7058 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7060 PR tree-optimization/87259
7062 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
7063 execute_cse_reciprocals_1 has tried transforming.
7065 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
7067 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
7068 VR_VARYING for PLUS/MINUS_EXPR.
7070 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
7072 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
7075 2018-09-14 Richard Biener <rguenther@suse.de>
7078 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
7079 bits for the merged partition.
7081 2018-09-13 Martin Sebor <msebor@redhat.com>
7082 Bernd Edlinger <bernd.edlinger@hotmail.de>
7084 * builtins.h (c_srlen): Add argument.
7085 * builtins.c (warn_string_no_nul): New function.
7086 (c_strlen): Add argument and use it. Update recursive calls.
7087 Pass DECL argument to string_constant to get info on non
7088 terminated strings. Update *NONSTR as needed.
7089 (fold_builtin_strlen): Add argument to calls to c_strlen.
7090 Warn for unterminated arrays.
7091 (warn_string_no_null): Add prototype.
7092 * expr.c (string_constant): Update arguments. Update recursive
7093 calls appropriately. Detect missing NUL terminator and outermost
7094 declaration its missing in.
7095 Improve checks for arrays with nonzero lower bound or elements
7096 that are not a single byte. Simplify offset computation.
7097 Simplify checks for non-NUL terminated strings.
7098 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
7099 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
7101 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
7103 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
7105 * fold-const.c (c_getstr): Fix function comment. Remove unused third
7106 argument. Fix range checks.
7107 * fold-const.h (c_getstr): Adjust protoype.
7108 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
7109 string is constant but contains no NUL byte.
7111 * expr.c (string_constant): Adjust function comment.
7112 Remove bogus check for zero termination.
7114 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
7116 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
7117 (get_constant_size): Don't make STRING_CSTs larger than they are.
7118 (check_string_literal): New check function for STRING_CSTs.
7119 (output_constant): Use it.
7121 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
7124 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
7126 2018-09-13 Richard Biener <rguenther@suse.de>
7128 PR tree-optimization/87263
7129 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
7130 (struct unwind_state): Add max_rpo field.
7131 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
7132 Compute max_rpo, the max RPO number a block can be backwards reached
7133 from. Re-write non-iterating mode to a RPO ordered worklist approach,
7134 separating it from the iterating mode.
7136 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7138 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
7139 (rfs_decision): New scheduling decision.
7141 2018-09-13 Richard Biener <rguenther@suse.de>
7144 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
7145 (vn_nary_op_insert_pieces_predicated): Do not write useless
7146 valid_dominated_by_p entry outside of the allocated storage.
7148 2018-09-13 Omar Sandoval <osandov@osandov.com>
7149 Tom de Vries <tdevries@suse.de>
7152 * dwarf2out.c (is_c): New function.
7153 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
7155 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
7158 * config/aarch64/aarch64.md (*aarch64_bfxil):
7160 * config/aarch64/constraints.md (Ulc): Define.
7161 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
7163 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7166 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
7168 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7169 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7170 aarch64_layout_frame call.
7171 (aarch64_expand_epilogue): Likewise.
7172 (aarch64_initial_elimination_offset): Likewise.
7173 (aarch64_get_separate_components): Likewise.
7174 (aarch64_use_return_insn_p): Likewise.
7175 (aarch64_layout_frame): Remove unneeded check.
7177 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7179 * configure.ac: Only append
7180 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
7181 gcc_config_arguments if it was never reconfigured or last reconfigure
7182 was with different arguments.
7183 * configure: Regenerated.
7185 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7186 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7189 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
7190 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
7192 2018-09-13 Jakub Jelinek <jakub@redhat.com>
7194 PR tree-optimization/87287
7195 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
7196 X % C == 0 to X % (unsigned) C == 0 optimization to ...
7197 * match.pd (X % C == 0): ... here. New optimization.
7199 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7202 * expr.h (maybe_optimize_mod_cmp): Declare.
7203 * expr.c (mod_inv): New function.
7204 (maybe_optimize_mod_cmp): New function.
7205 (do_store_flag): Use it.
7206 * cfgexpand.c (expand_gimple_cond): Likewise.
7208 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
7209 Julian Brown <julian@codesourcery.com>
7212 * gimplify.c (gimplify_scan_omp_clauses): Set
7213 target_firstprivatize_array_bases in OpenACC parallel and kernels
7214 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7215 OpenACC data regions.
7217 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
7219 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7220 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7222 2018-09-12 Richard Biener <rguenther@suse.de>
7224 PR tree-optimization/87280
7225 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7226 edge but unreachable target.
7227 (do_rpo_vn): For conservatively handling a PHI only mark
7228 the backedge executable but not the block reachable.
7230 2018-09-12 Richard Biener <rguenther@suse.de>
7232 PR tree-optimization/87266
7233 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7236 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
7238 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7240 ("trunc<BFP:mode><DFP_ALL:mode>2")
7241 ("trunc<DFP_ALL:mode><BFP:mode>2")
7242 ("extend<BFP:mode><DFP_ALL:mode>2")
7243 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7244 according to the target operand type.
7246 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7247 Andreas Krebbel <krebbel@linux.ibm.com>
7249 PR tree-optimization/86844
7250 * gimple-ssa-store-merging.c
7251 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7252 there are any overlapping stores in between them, make sure they are
7253 also coalesced or we give up completely.
7255 2018-09-12 Jakub Jelinek <jakub@redhat.com>
7258 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7259 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
7261 2018-09-12 Tom de Vries <tdevries@suse.de>
7263 * common.opt (gdescribe-dies): Add option.
7264 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7265 attribute for artifical and nameless decls.
7266 (dwarf2out_register_external_die): Add description attribute to
7267 external reference die.
7268 (add_desc_attribute): New functions.
7269 (gen_subprogram_die): Add description attribute to
7270 DW_TAG_call_site_parameter.
7271 * tree-pretty-print.c (print_generic_expr_to_str): New function.
7272 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7273 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7275 (@item -gdescribe-dies): Add.
7277 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7279 * tree-vrp.c (vrp_shift_undefined_p): Remove.
7280 (extract_range_from_binary_expr_1: Call
7281 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7282 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7285 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
7287 * gimple-ssa-warn-alloca.c
7288 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7289 field for ALLOCA_BOUND_*_LARGE.
7291 2018-09-11 Nathan Sidwell <nathan@acm.org>
7293 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7295 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7297 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7298 for clobbers. Remove obsolete comment.
7300 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7302 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7303 mpxchk, mpxld and mpxst types.
7304 (define_attr length_immediate): Remove all processing of mpx types.
7305 (define_attr prefix_0f): Ditto.
7306 (define_attr memory): Ditto.
7308 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
7310 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7311 (log<mode>2): Change operand 1 predicate to general_operand.
7312 Extend operand 1 to XFmode and generate logxf3 insn.
7313 (log10<mode>2): Change operand 1 predicate to general_operand.
7314 Extend operand 1 to XFmode and generate log10xf3 insn.
7315 (log2<mode>2): Change operand 1 predicate to general_operand.
7316 Extend operand 1 to XFmode and generate log2xf3 insn.
7317 (fyl2xp1_extend<mode>xf3_i387): Remove.
7318 (log1p<mode>2): Change operand 1 predicate to general_operand.
7319 Extend operand 1 to XFmode and generate log1pxf3 insn.
7320 (fxtract_extend<mode>xf3_i387): Remove.
7321 (logb<mode>2): Change operand 1 predicate to general_operand.
7322 Extend operand 1 to XFmode and generate logbxf3 insn.
7323 (ilogb<mode>2): Change operand 1 predicate to general_operand.
7324 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7325 (significand<mode>2): Change operand 1 predicate to general_operand.
7326 Extend operand 1 to XFmode and generate significandxf3 insn.
7328 2018-09-11 Nathan Sidwell <nathan@acm.org>
7330 * gcc.c (perror_with_name, pfatal_with_name): Delete.
7331 (load_specs): Use fatal_error.
7332 (DELETE_IF_ORDINARY, process_command): Use error.
7333 (execute, run_attempt): Use fatal_error.
7335 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
7337 * diagnostic-core.h (sorry_at): New prototype.
7338 * diagnostic.c (sorry_at): New function.
7340 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
7342 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7343 by zero as VR_UNDEFINED.
7345 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7347 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7348 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7349 (<sincos>mode2): New expander.
7350 (sincos_extend<mode>xf3_i387): Remove insn pattern.
7351 (sincos -> sin, cos splitters): Remove splitter patterns.
7352 (sincos<mode>3): Change operand 2 predicate to general_operand.
7353 Extend operand 2 to XFmode and generate sincosxf3 insn.
7354 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7355 Change operand 3 predicate to const1_operand.
7356 (fptan_extend<mode>xf4_i387): Remove insn pattern.
7357 (tanxf2): Update operands in the call to fptanxf4_i387.
7358 (tan<mode>2): Change operand 1 predicate to general_operand.
7359 Extend operand 1 to XFmode and generate tanxf3 insn.
7360 (atan2xf3): Rename from *fpatanxf3_i387.
7361 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7362 (atan2xf3): Remove expander.
7363 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
7364 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7365 (atan<mode>2): Change operand 1 predicate to general_operand.
7366 Extend operand 1 to XFmode and generate atanxf3 insn.
7368 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
7370 * config/i386/i386.md (x87/SSE constant load splitter): Use
7371 memory_operand instead of nonimmediate_operand for input operand
7374 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
7376 * config/i386/i386.md (float partial SSE register stall splitter): Move
7377 splitter near its instruction pattern.
7378 (float_extend partial SSE register stall splitter): Ditto.
7379 (float_truncate partial SSE register stall splitter): Ditto.
7381 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
7384 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7385 to speculation_safe_value_not_needed.
7388 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7389 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7390 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7391 leaf_function_p, instead use has_hard_reg_initial_val.
7393 2018-09-09 Nathan Sidwell <nathan@acm.org>
7395 * gcc.h (pfatal_with_name): Don't declare here.
7396 * gcc.c (pfatal_with_name): Make static.
7398 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
7400 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7403 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
7405 PR rtl-optimization/85458
7406 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7407 priority hook to reduce the priority of EXPR.
7409 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
7411 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7412 DImode for x87 on 32bit targets. Conditionally disable x87 modes
7413 with X87_ENABLE_FLOAT. Remove preparation code.
7414 (*float<SWI48:mode><MODEF:mode>2): Rename from
7415 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
7416 math using "enabled" attribute.
7417 (*floatdi<MODEF:mode>2_i387): Rename from
7418 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
7419 enable for 32bit targets only.
7420 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7422 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7423 as operand 1 predicate. Rewrite as define_insn_and_split.
7424 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7426 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7428 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7429 to fallthru to FLOAT case.
7431 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7434 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7435 around folding of vec_sl to handle out of range shift values.
7437 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7439 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7440 Update callers to gen_fix_trunc<mode>_i387_fisttp
7441 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7442 nonimmediate_operand.
7443 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7444 and corresponding splitters.
7445 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7446 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7447 (fix_truncdi_i387_with_temp): Remove insn pattern
7448 and corresponding splitters.
7449 (fix_trunc<mode>_i387): Change operand 0 predicate to
7450 nonimmediate_operand.
7451 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7452 and corresponding splitters.
7453 (*fistdi2_1): Remove.
7455 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7456 (lrintxfdi2): Remove expander. Reimplement as define_insn.
7457 (*fist<mode>2_1): Remove.
7458 (fist<mode>2): Ditto.
7459 (fist<mode>2_with_temp): Remove insn pattern and corresponding
7461 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
7462 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7463 (fistdi2_<rounding>): Change operand 0 predicate to
7464 nonimmediate_operand.
7465 (fistdi2_<rounding>_with_temp): Remove insn pattern
7466 and corresponding splitters.
7467 (fist<mode>2_<rounding>): Change operand 0 predicate to
7468 nonimmediate_operand.
7469 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7470 and corresponding splitters.
7472 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7474 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
7476 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7479 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7481 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7482 early gimple folding of vec_splat().
7483 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7484 * gimple-fold.h: Add an extern define for tree_vec_extract().
7486 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7488 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7489 wrappers around TREE_TYPE comparisons.
7491 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7494 * config/s390/predicates.md: Add nonsym_memory_operand.
7495 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7496 contains a SYMBOL_REF, load it into an intermediate pseudo.
7497 (s390_emit_compare_and_swap): Legitimize operand.
7498 * config/s390/s390.md: Use the new nonsym_memory_operand
7499 with UNSPECV_CAS patterns.
7501 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7504 * config/s390/s390-passes.def: New file.
7505 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7507 (make_pass_s390_early_mach): Add declaration.
7508 * config/s390/s390.c (make_pass_s390_early_mach):
7509 (s390_option_override): Remove dynamic registration.
7510 * config/s390/t-s390: Add s390-passes.def.
7512 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7514 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7515 Remove UNSPEC_LTREL_BASE check.
7516 (annotate_constant_pool_refs): Likewise.
7517 (find_constant_pool_ref): Likewise.
7518 (find_ltrel_base): Removed.
7519 (replace_ltrel_base): Removed.
7520 (s390_mainpool_finish): Remove replace_ltrel_base call.
7521 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7522 (s390_chunkify_finish): Remove replace_ltrel_base call.
7523 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7525 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7528 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7529 to speculation_safe_value_not_needed.
7531 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7532 Bernd Schmidt <bernds_cb1@t-online.de>
7534 * config/nvptx/nvptx-opts.h: New file.
7535 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7536 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7538 (TARGET_SM35): New macro.
7539 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7541 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7543 (misa=): New option.
7544 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7546 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7548 * config/i386/i386.md (truncdfsf2): Remove expander.
7549 (truncdfsf2_with_temp): Ditto.
7550 (truncxf<mode>2): Ditto.
7551 (*truncdfsf_fast_mixed): Remove insn pattern.
7552 (*truncdfsf_fast_i387): Ditto.
7553 (*truncdfsf_mixed): Ditto.
7554 (*truncdfsf_i387): Ditto.
7555 (*truncdfsf2_i387_1): Ditto.
7556 (*truncxfsf2_mixed): Ditto.
7557 (*truncxfdf2_mixed): Ditto.
7558 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7559 to call gen_truncxf<mode>2 instead.
7560 (*truncxf<mode>2_i387): Remove.
7561 (reg->reg splitters): Remove splitter pattern.
7562 (reg->mem splitters): Ditto.
7564 (truncdfsf2): New insn pattern.
7565 (truncxf<mode>2): Ditto.
7567 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7569 * tree-ssa-math-opts.c (is_mult_by): New function.
7570 (is_square_of): Use the above.
7571 (optimize_recip_sqrt): New function.
7572 (pass_cse_reciprocals::execute): Use the above.
7574 2018-09-05 Richard Biener <rguenther@suse.de>
7577 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7578 to zero-init the emplaced vec.
7580 2018-09-05 Martin Liska <mliska@suse.cz>
7582 PR tree-optimization/87205
7583 * tree-switch-conversion.c (pass_lower_switch::execute):
7584 Group cases for switch statements.
7586 2018-09-05 Richard Biener <rguenther@suse.de>
7588 PR tree-optimization/87217
7589 * tree-ssa-sccvn.c (vuse_valueize): New.
7590 (vn_reference_lookup_pieces): Use it.
7591 (vn_reference_lookup): Likewise.
7593 2018-09-05 Nathan Sidwell <nathan@acm.org>
7596 * stor-layout.c (place_field): Scan forwards to check last
7597 bitfield when ms_bitfield_placement is in effect.
7599 2018-09-05 Richard Biener <rguenther@suse.de>
7602 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7605 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
7606 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7608 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7609 * config.gcc (extra_objs): Build it.
7610 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7612 * config/aarch64/aarch64-passes.def
7613 (pass_tag_collision_avoidance): New pass.
7614 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7615 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7616 (aarch64_classify_address): Remove static qualifier.
7617 (aarch64_address_info, aarch64_address_type): Move to...
7618 * config/aarch64/aarch64-protos.h: ... here.
7619 (make_pass_tag_collision_avoidance): New function.
7620 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7623 2018-09-05 Martin Liska <mliska@suse.cz>
7625 * doc/gcov.texi: Update documentation of humar
7627 * gcov.c (format_count): Print one decimal place, it provides
7628 more fine number of situations like '1G' vs. '1.4G'.
7630 2018-09-05 Martin Liska <mliska@suse.cz>
7633 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7634 * optc-gen.awk: Allow 'Var' for Deprecated options in order
7635 to generate a MASK value.
7637 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
7640 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7641 if frame pointer isn't used.
7642 (compute_frame_pointer_to_fb_displacement): Likewise.
7644 2018-09-04 Jakub Jelinek <jakub@redhat.com>
7647 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7648 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7649 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7650 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7651 and OPTION_MASK_ISA_XSAVEC_UNSET.
7653 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
7655 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7656 XOR operations in NAND case.
7658 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7660 * wide-int-range.cc (wide_int_range_convert): New.
7661 * wide-int-range.h (wide_int_range_convert): New.
7662 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7663 code into wide_int_range_convert.
7664 (extract_range_into_wide_ints): Do not munge anti range constants
7665 into the entire domain. Just return the range back.
7667 2018-09-04 Martin Liska <mliska@suse.cz>
7669 * genmatch.c (output_line_directive): Add new argument
7671 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7673 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7675 * doc/invoke.texi (Option Summary): Add whitespace.
7677 * doc/invoke.texi (Option Summary): Add -Waligned-new.
7679 2018-09-04 Richard Biener <rguenther@suse.de>
7681 PR tree-optimization/87211
7682 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7683 backedge value we're supposed to treat as VARYING also number
7684 the PHI to VARYING in case it got a different value-number already.
7686 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7688 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7689 (extract_range_from_binary_expr_1): Do not call
7690 vrp_can_optimize_bit_op.
7691 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7693 (wide_int_range_get_mask_and_bounds): New.
7694 (wide_int_range_optimize_bit_op): New.
7695 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7696 (wide_int_range_bit_and): Same.
7697 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7698 (wide_int_range_optimize_bit_op): New.
7699 (wide_int_range_get_mask_and_bounds): New.
7701 2018-09-04 Richard Biener <rguenther@suse.de>
7703 PR tree-optimization/87176
7704 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7705 variable. When value-numbering a virtual PHI node make sure
7706 to not value-number to the backedge value.
7708 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7710 * doc/extend.texi (Long Long, Hex Floats): Document support for
7711 long long and hex floats in more recent versions of ISO C++.
7713 2018-09-03 Richard Biener <rguenther@suse.de>
7715 PR tree-optimization/87177
7716 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7719 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7721 * bb-reorder.c (edge_order): Convert to C-qsort-style
7722 tri-state comparator.
7723 (reorder_basic_blocks_simple): Change std::stable_sort to
7726 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7728 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7729 tri-state comparator.
7730 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7732 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7734 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
7735 (mergesort): ... here as maximum count for using netsort.
7736 (gcc_qsort): Set nlim to 3 if stable sort is requested.
7737 (gcc_stablesort): New.
7738 * system.h (gcc_stablesort): Declare.
7740 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7742 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7743 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
7744 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
7746 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
7748 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7749 lxsdx and stxsdx alternatives.
7750 (*mov<mode>_hardfloat64): Ditto.
7751 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7753 2018-09-03 Richard Biener <rguenther@suse.de>
7755 PR tree-optimization/87200
7756 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7759 2018-09-03 Martin Liska <mliska@suse.cz>
7761 PR tree-optimization/87201
7762 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7763 Fix parenthesis in an expression.
7765 2018-09-03 Richard Biener <rguenther@suse.de>
7767 PR tree-optimization/87197
7768 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7769 visited. CSE the VN_INFO hashtable lookup.
7771 PR tree-optimization/87169
7772 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7773 iterating make sure there's no extra backedges from irreducible
7774 regions feeding the header. Mark the destination block
7777 2018-09-03 Martin Liska <mliska@suse.cz>
7780 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7781 * common/common-targhooks.c (default_get_valid_option_values):
7783 * common/common-targhooks.h (default_get_valid_option_values):
7785 * common/config/i386/i386-common.c: Move processor_target_table
7787 (ix86_get_valid_option_values): New function.
7788 (TARGET_GET_VALID_OPTION_VALUES): New macro.
7789 * config/i386/i386.c (struct ptt): Move to i386-common.c.
7790 (PTA_*): Move all defined masks into i386-common.c.
7791 (ix86_function_specific_restore): Use new processor_cost_table.
7792 * config/i386/i386.h (struct ptt): Moved from i386.c.
7793 (struct pta): Likewise.
7794 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7795 * doc/tm.texi.in: Likewise.
7796 * opt-suggestions.c (option_proposer::suggest_option):
7797 Pass prefix to build_option_suggestions.
7798 (option_proposer::get_completions): Likewise.
7799 (option_proposer::build_option_suggestions): Use the new target
7801 * opts.c (struct option_help_tuple): New struct.
7802 (print_filtered_help): Use the new target hook.
7804 2018-09-03 Martin Liska <mliska@suse.cz>
7807 * predict.c (set_even_probabilities): Add likely_edges
7808 argument and handle cases where we have precisely one
7810 (combine_predictions_for_bb): Catch also likely_edges.
7811 (tree_predict_by_opcode): Handle gswitch statements.
7812 * tree-cfg.h (find_case_label_for_value): New declaration.
7813 (find_taken_edge_switch_expr): Likewise.
7814 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7815 Find pivot in decision tree based on probabily, not by number of
7818 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
7820 * doc/standards.texi (Standards): Update Objective-C reference.
7822 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7824 * doc/install.texi (Prerequisites): Update link for MPC.
7826 2018-09-01 Michael Matz <matz@suse.de>
7828 PR tree-optimization/87074
7829 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7830 PHIs for outer-loop uses.
7832 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7834 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7835 * doc/invoke.texi (C Dialect Options): Ditto.
7837 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7839 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7841 2018-08-31 Richard Biener <rguenther@suse.de>
7843 PR tree-optimization/87168
7844 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7845 (rpo_elim::eliminate_avail): When OP was not visited it must
7848 2018-08-31 David Malcolm <dmalcolm@redhat.com>
7850 * tree-vrp.c (copy_value_range): Convert param "from" from
7851 "value_range *" to "const value_range *".
7852 (range_is_null): Likewise for param "vr".
7853 (range_int_cst_p): Likewise.
7854 (range_int_cst_singleton_p): Likewise.
7855 (symbolic_range_p): Likewise.
7856 (value_ranges_intersect_p): Likewise for both params.
7857 (value_range_nonnegative_p): Likewise for param "vr".
7858 (value_range_constant_singleton): Likewise.
7859 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7860 (extract_range_into_wide_ints): Likewise for param "vr".
7861 (extract_range_from_multiplicative_op): Likewise for params "vr0"
7863 (vrp_can_optimize_bit_op): Likewise.
7864 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7866 (extract_range_from_unary_expr): Likewise.
7867 (debug_value_range): Likewise for param "vr".
7868 (value_range::dump): Add "const" qualifier.
7869 (vrp_prop::check_array_ref): Convert local "vr" from
7870 "value_range *" to "const value_range *".
7871 (vrp_prop::check_mem_ref): Likewise.
7872 (vrp_prop::visit_stmt): Likewise for local "old_vr".
7873 (vrp_intersect_ranges_1): Likewise for param "vr_1".
7874 (vrp_intersect_ranges): Likewise.
7875 (simplify_stmt_for_jump_threading): Likewise for local "vr".
7876 (vrp_prop::vrp_finalize): Likewise.
7877 * tree-vrp.h (value_range::dump): Add "const" qualifier.
7878 (vrp_intersect_ranges): Add "const" qualifier to params as above.
7879 (extract_range_from_unary_expr): Likewise.
7880 (value_range_constant_singleton): Likewise.
7881 (symbolic_range_p): Likewise.
7882 (copy_value_range): Likewise.
7883 (extract_range_from_binary_expr_1): Likewise.
7884 (range_int_cst_p): Likewise.
7885 (vrp_set_zero_nonzero_bits): Likewise.
7886 (range_int_cst_singleton_p): Likewise.
7888 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
7890 * config/aarch64/arm_neon.h (vabsd_s64): New.
7891 (vnegd_s64): Likewise.
7893 2018-08-31 Martin Jambor <mjambor@suse.cz>
7895 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7897 2018-08-31 Martin Liska <mliska@suse.cz>
7899 * ipa-icf.c (sem_item::add_type): Use
7900 sem_item::m_type_hash_cache.
7901 * ipa-icf.h: Move the cache from sem_item_optimizer
7904 2018-08-31 Nathan Sidwell <nathan@acm.org>
7906 * doc/extend.texi (Backwards Compatibility): Remove implicit
7907 extern C leeway of () being (...).
7909 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7911 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7913 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
7917 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7919 2018-08-31 Jakub Jelinek <jakub@redhat.com>
7922 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7923 gen_int_mode. Formatting fixes.
7925 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
7927 * target.def (custom_function_descriptors): Improve documentation.
7928 * doc/tm.texi.in (Trampolines): Expand discussion of function
7929 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7930 beginning of the section.
7931 * doc/tm.texi: Regenerated.
7933 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
7935 * cfg.h (class auto_edge_flag): Spell out the template-id of the
7936 base class in the initializer list. This is a workaround for
7937 building with older GCC.
7938 (class auto_bb_flag): Likewise.
7940 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
7942 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7943 (altivec_vcmpequ<VI_char>_p): Remove star.
7944 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7946 (expand_strncmp_vec_sequence): New function.
7947 (emit_final_str_compare_vec): New function.
7948 (expand_strn_compare): Add support for vector strncmp.
7949 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7950 length specification to bytes.
7951 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7952 (vcmpnezb_p): New pattern.
7953 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7954 for option -mstring-compare-inline-limit.
7956 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
7958 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7959 (PTA_SKYLAKE): Add PTA_AES.
7960 (PTA_GOLDMONT): Likewise.
7962 2018-08-29 Jan Hubicka <jh@suse.cz>
7965 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7966 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7968 2018-08-29 Jan Hubicka <jh@suse.cz>
7970 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7972 (hash_tree): Do not visit TYPE_STUB_DECL.
7973 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7974 stream TYPE_STUB_DECL.
7975 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7976 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7977 after free_lang_data.
7978 (type_in_anonymous_namespace_p): Likewise.
7980 2018-08-29 Jan Hubicka <jh@suse.cz>
7982 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7983 comment that it has to be even number.
7984 (class sreal): Change m_sig type to int32_t.
7985 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7986 int64_t for temporary calculations.
7987 (sreal_verify_basics): Drop one bit from minimum and maximum.
7989 2018-08-30 Richard Biener <rguenther@suse.de>
7991 PR tree-optimization/87147
7992 * tree-ssa-sccvn.c (SSA_VISITED): New function.
7993 (visit_phi): When the degenerate result is from the backedge and
7994 we didn't visit its definition yet drop to VARYING.
7995 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7997 2018-08-29 Jan Hubicka <jh@suse.cz>
7999 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
8001 (hash_tree): Likewise.
8003 2018-08-29 Jan Hubicka <jh@suse.cz>
8005 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
8006 and TYPE_NEXT_REF_TO.
8008 2018-08-29 Jan Hubicka <jh@suse.cz>
8010 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8011 comment that it has to be even number.
8012 (class sreal): Change m_sig type to int32_t.
8013 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8014 int64_t for temporary calculations.
8015 (sreal_verify_basics): Drop one bit from minimum and maximum.
8017 2018-08-30 Tamar Christina <tamar.christina@arm.com>
8019 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
8021 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
8024 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
8025 if to_add is negative.
8027 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
8030 * builtins.c (c_strlen): Improve range checks.
8032 2018-08-29 Martin Sebor <msebor@redhat.com>
8033 Jeff Law <law@redhat.com>
8035 PR tree-optimization/86714
8036 PR tree-optimization/86711
8037 * builtins.c (c_strlen): Add arguments to call to string_constant.
8038 * expr.c (string_constant): Add argument. Detect missing nul
8039 terminator and outermost declaration it's missing in.
8040 * expr.h (string_constant): Add argument.
8041 * fold-const.c (read_from_constant_string): Add arguments to call to
8043 (c_getstr): Likewise.
8044 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8046 * tree-ssa-strlen.c (get_stridx): Likewise.
8048 2018-08-29 Jan Hubicka <jh@suse.cz>
8050 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
8051 Do not stream DECL_VINDEX.
8052 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
8053 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
8054 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
8056 2018-08-29 Richard Biener <rguenther@suse.de>
8058 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
8059 virtual operands that are not default defs to honor region
8061 (rpo_vn_valueize): Remove ineffective code here.
8063 2018-08-29 Richard Biener <rguenther@suse.de>
8065 PR tree-optimization/87132
8066 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
8067 when skipping defs reachable over backedges.
8069 2018-08-29 Richard Biener <rguenther@suse.de>
8071 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
8072 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
8073 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
8074 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
8075 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
8076 (vn_reference_lookup_3): Remove use of const_parms.
8077 (free_rpo_vn): Do not free const_parms.
8078 (do_rpo_vn): Do not call init_const_parms.
8079 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
8080 SSA_NAME_POINTS_TO_READONLY_MEMORY.
8081 (call_may_clobber_ref_p_1): Likewise.
8083 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
8086 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
8088 (-ftree-scev-cprop): Document.
8090 2018-08-29 Jan Hubicka <jh@suse.cz>
8092 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
8094 (sreal constructor): Update.
8095 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
8096 sreal:operator/): Update.
8098 2018-08-29 Martin Liska <mliska@suse.cz>
8100 * tree-switch-conversion.c (switch_conversion::expand):
8101 Strenghten assumption about gswitch statements.
8103 2018-08-29 Richard Biener <rguenther@suse.de>
8105 PR tree-optimization/87117
8106 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
8107 re-value-number released SSA VDEFs.
8109 2018-08-29 Richard Biener <rguenther@suse.de>
8111 PR tree-optimization/87126
8112 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
8114 2018-08-28 Jim Wilson <jimw@sifive.com>
8116 * config/riscv/pic.md: Rewrite.
8117 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
8119 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
8120 (SOFTF, default_load, softload, softstore): New.
8122 2018-08-28 Jeff Law <law@redhat.com>
8124 * fold-const.c (fold_binary_loc): Remove recently added assert.
8126 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
8128 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8129 to OP parmeter of generated function.
8131 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
8133 PR tree-optimization/87009
8134 * match.pd: Add boolean optimizations.
8136 2018-08-28 Martin Sebor <msebor@redhat.com>
8139 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
8140 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
8141 (pass_walloca::gate): Use it.
8142 (alloca_call_type): Same.
8143 (pass_walloca::execute): Same.
8144 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
8146 2018-08-28 David Malcolm <dmalcolm@redhat.com>
8148 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
8149 GCC_VERSION for usage of "__gcc_dump_printf__" format from
8152 2018-08-28 Richard Biener <rguenther@suse.de>
8154 PR tree-optimization/87124
8155 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
8156 constants before looking up avail.
8158 2018-08-28 Jakub Jelinek <jakub@redhat.com>
8161 * calls.c (maybe_warn_nonstring_arg): Punt early if
8162 warn_stringop_overflow is zero. Don't call get_range_strlen
8163 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
8164 Swap comparison operands to have constants on rhs. Only use
8165 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
8166 increment lenrng[0].
8168 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
8170 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8171 use of tree_to_shwi. Remove duplicated test for the size being
8172 a whole number of bytes.
8174 2018-08-28 Richard Biener <rguenther@suse.de>
8176 PR tree-optimization/87117
8177 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
8178 Handle removed stmt without LHS (GIMPLE_NOP).
8180 2018-08-28 Richard Biener <rguenther@suse.de>
8182 PR tree-optimization/87117
8183 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
8184 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
8186 2018-08-28 Richard Biener <rguenther@suse.de>
8188 PR tree-optimization/87117
8189 * tree-ssa-pre.c (compute_avail): Do not make expressions
8190 with predicated values available.
8191 (get_expr_value_id): Assert we do not run into predicated value
8194 2018-08-28 Richard Biener <rguenther@suse.de>
8196 PR tree-optimization/87117
8197 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
8198 get virtual operands.
8199 (get_expr_operands): Handle STRING_CST like other decls.
8201 2018-08-28 Martin Liska <mliska@suse.cz>
8203 * tree.h: Update documentation of fndecl_built_in_p
8207 2018-08-27 Jeff Law <law@redhat.com>
8208 PR tree-optimization/87110
8209 * tree-ssa-dse.c (compute_trims): Handle non-constant
8212 2018-08-27 Martin Sebor <msebor@redhat.com>
8214 PR tree-optimization/86914
8215 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8217 2018-08-27 Martin Sebor <msebor@redhat.com>
8219 PR tree-optimization/87112
8220 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8221 the type of the bound argument.
8223 2018-08-27 Jeff Law <law@redhat.com>
8225 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8226 type does not have a TYPE_SIZE_UNIT.
8228 2018-08-27 Steve Ellcey <sellcey@cavium.com>
8230 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8231 with include of backend.h.
8233 2018-08-27 Richard Biener <rguenther@suse.de>
8235 PR tree-optimization/86927
8236 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8237 use const cond reduction code.
8239 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
8241 PR tree-optimization/85758
8242 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8244 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8247 * diagnostic-show-locus.c (class layout_range): Update for
8248 conversion of show_caret_p to a tri-state.
8249 (layout_range::layout_range): Likewise.
8250 (make_range): Likewise.
8251 (layout::maybe_add_location_range): Likewise.
8252 (layout::should_print_annotation_line_p): Don't show annotation
8253 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8254 (layout::get_state_at_point): Update for conversion of
8255 show_caret_p to a tri-state. Bail out early for
8256 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8257 underlining or source colorization.
8258 (gcc_rich_location::add_location_if_nearby): Update for conversion
8259 of show_caret_p to a tri-state.
8260 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8261 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8263 (selftest::test_one_liner_labels): Likewise.
8264 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8265 conversion of show_caret_p to a tri-state.
8266 * pretty-print.c (text_info::set_location): Likewise.
8267 * pretty-print.h (text_info::set_location): Likewise.
8268 * substring-locations.c (format_warning_n_va): Likewise.
8269 * tree-diagnostic.c (default_tree_printer): Likewise.
8270 * tree-pretty-print.c (newline_and_indent): Likewise.
8272 2018-08-27 David Malcolm <dmalcolm@redhat.com>
8275 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8276 line above for line-insertion fix-it hints.
8277 (selftest::test_fixit_insert_containing_newline): Update the
8278 expected results, and add a test with line-numbering enabled.
8280 2018-08-27 Martin Liska <mliska@suse.cz>
8283 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8284 params with DECL_HAS_VALUE_EXPR_P.
8286 2018-08-27 Martin Liska <mliska@suse.cz>
8288 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8289 selected expansion strategy.
8291 2018-08-27 Martin Liska <mliska@suse.cz>
8293 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8294 * builtins.c (is_builtin_fn): Likewise.
8295 * attribs.c (diag_attr_exclusions): Use new function
8296 fndecl_built_in_p and remove check for FUNCTION_DECL if
8298 (builtin_mathfn_code): Likewise.
8299 (fold_builtin_expect): Likewise.
8300 (fold_call_expr): Likewise.
8301 (fold_builtin_call_array): Likewise.
8302 (fold_call_stmt): Likewise.
8303 (set_builtin_user_assembler_name): Likewise.
8304 (is_simple_builtin): Likewise.
8305 * calls.c (gimple_alloca_call_p): Likewise.
8306 (maybe_warn_nonstring_arg): Likewise.
8307 * cfgexpand.c (expand_call_stmt): Likewise.
8308 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8309 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8310 (cgraph_node::verify_node): Likewise.
8311 * cgraphclones.c (build_function_decl_skip_args): Likewise.
8312 (cgraph_node::create_clone): Likewise.
8313 * config/arm/arm.c (arm_insert_attributes): Likewise.
8314 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8315 * dse.c (scan_insn): Likewise.
8316 * expr.c (expand_expr_real_1): Likewise.
8317 * fold-const.c (operand_equal_p): Likewise.
8318 (fold_binary_loc): Likewise.
8319 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8320 * gimple-low.c (lower_stmt): Likewise.
8321 * gimple-pretty-print.c (dump_gimple_call): Likewise.
8322 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8324 * gimple.c (gimple_build_call_from_tree): Likewise.
8325 (gimple_call_builtin_p): Likewise.
8326 (gimple_call_combined_fn): Likewise.
8327 * gimplify.c (gimplify_call_expr): Likewise.
8328 (gimple_boolify): Likewise.
8329 (gimplify_modify_expr): Likewise.
8330 (gimplify_addr_expr): Likewise.
8331 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8332 * ipa-cp.c (determine_versionability): Likewise.
8333 * ipa-fnsummary.c (compute_fn_summary): Likewise.
8334 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8335 * ipa-split.c (visit_bb): Likewise.
8336 (split_function): Likewise.
8337 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8338 * lto-cgraph.c (input_node): Likewise.
8339 * lto-streamer-out.c (write_symbol): Likewise.
8340 * omp-low.c (setjmp_or_longjmp_p): Likewise.
8341 (lower_omp_1): Likewise.
8342 * predict.c (strip_predict_hints): Likewise.
8343 * print-tree.c (print_node): Likewise.
8344 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8345 * trans-mem.c (is_tm_irrevocable): Likewise.
8346 (is_tm_load): Likewise.
8347 (is_tm_simple_load): Likewise.
8348 (is_tm_store): Likewise.
8349 (is_tm_simple_store): Likewise.
8350 (is_tm_abort): Likewise.
8351 (tm_region_init_1): Likewise.
8352 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8353 * tree-cfg.c (verify_gimple_call): Likewise.
8354 (move_stmt_r): Likewise.
8355 (stmt_can_terminate_bb_p): Likewise.
8356 * tree-eh.c (lower_eh_constructs_2): Likewise.
8357 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8358 * tree-inline.c (remap_gimple_stmt): Likewise.
8359 (copy_bb): Likewise.
8360 (estimate_num_insns): Likewise.
8361 (fold_marked_statements): Likewise.
8362 * tree-sra.c (scan_function): Likewise.
8363 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8364 (optimize_stack_restore): Likewise.
8365 (pass_fold_builtins::execute): Likewise.
8366 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8367 (mark_all_reaching_defs_necessary_1): Likewise.
8368 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8369 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8370 (pass_forwprop::execute): Likewise.
8371 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8372 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8373 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8374 * tree-ssa-strlen.c (get_string_length): Likewise.
8375 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8376 (find_func_aliases_for_call): Likewise.
8377 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8378 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8379 * tree-tailcall.c (find_tail_calls): Likewise.
8380 * tree.c (need_assembler_name_p): Likewise.
8381 (free_lang_data_in_decl): Likewise.
8382 (get_call_combined_fn): Likewise.
8383 * ubsan.c (is_ubsan_builtin_p): Likewise.
8384 * varasm.c (incorporeal_function_p): Likewise.
8385 * tree.h (DECL_BUILT_IN): Remove and replace with
8387 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8388 (fndecl_built_in_p): New.
8390 2018-08-27 Martin Liska <mliska@suse.cz>
8392 PR tree-optimization/86847
8393 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8394 Dump also subtree probability.
8395 (switch_decision_tree::do_jump_if_equal): New function.
8396 (switch_decision_tree::emit_case_nodes): Handle special
8397 situations in balanced tree that can be emitted much simpler.
8398 Fix calculation of probabilities that happen in tree expansion.
8399 * tree-switch-conversion.h (struct cluster): Add
8401 (struct simple_cluster): Likewise.
8402 (struct case_tree_node): Add new function has_child.
8403 (do_jump_if_equal): New.
8405 2018-08-27 Martin Liska <mliska@suse.cz>
8407 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8408 Add new argument to bit_test_cluster constructor.
8409 (bit_test_cluster::emit): Set bits really number of values
8411 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8412 probability argument.
8413 * tree-switch-conversion.h (struct bit_test_cluster):
8414 Add m_handles_entire_switch.
8416 2018-08-27 Martin Liska <mliska@suse.cz>
8418 PR tree-optimization/86702
8419 * tree-switch-conversion.c (jump_table_cluster::emit):
8420 Make probabilities even for values in jump table
8421 according to number of cases handled.
8422 (switch_decision_tree::compute_cases_per_edge): Pass
8423 argument to reset_out_edges_aux function.
8424 (switch_decision_tree::analyze_switch_statement): Likewise.
8425 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8428 2018-08-27 Martin Liska <mliska@suse.cz>
8430 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8431 cfun argument explicitly.
8432 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8433 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8434 function gimple_switch_default_bb.
8435 (convert_switch_statements):
8437 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8438 * stmt.c (label_to_block_fn): Use label_to_block and pass
8439 cfun argument explicitly and use gimple_switch_label_bb.
8440 (expand_case): Likewise.
8441 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8442 cfun argument explicitly. Likewise.
8443 (make_edges_bb): Likewise.
8444 (make_cond_expr_edges): Likewise.
8445 (get_cases_for_edge): Likewise.
8446 (make_gimple_switch_edges): Likewise.
8447 (label_to_block_fn): Likewise.
8448 (label_to_block): Likewise.
8449 (make_goto_expr_edges): Likewise.
8450 (make_gimple_asm_edges): Likewise.
8451 (main_block_label): Likewise.
8452 (group_case_labels_stmt): Likewise.
8453 (find_taken_edge_computed_goto): Likewise.
8454 (find_taken_edge_switch_expr): Likewise.
8455 (gimple_verify_flow_info): Likewise.
8456 (gimple_redirect_edge_and_branch): Likewise.
8457 (gimple_switch_label_bb): New function.
8458 (gimple_switch_default_bb): Likewise.
8459 (gimple_switch_edge): Likewise.
8460 (gimple_switch_default_edge): Likewise.
8461 * tree-cfg.h (label_to_block_fn): Remove and replace ...
8462 (label_to_block): ... with this.
8463 (gimple_switch_label_bb): New.
8464 (gimple_switch_default_bb): Likewise.
8465 (gimple_switch_edge): Likewise.
8466 (gimple_switch_default_edge): Likewise.
8467 * tree-cfgcleanup.c (convert_single_case_switch): Use
8468 new gimple functions and pass new argument to label_to_block.
8469 (cleanup_control_flow_bb):
8470 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8471 cfun argument explicitly.
8472 (make_eh_edges): Likewise.
8473 (redirect_eh_dispatch_edge): Likewise.
8474 (lower_resx): Likewise.
8475 (lower_eh_dispatch): Likewise.
8476 (maybe_remove_unreachable_handlers): Likewise.
8477 (unsplit_eh): Likewise.
8478 (cleanup_empty_eh): Likewise.
8479 (verify_eh_edges): Likewise.
8480 (verify_eh_dispatch_edge): Likewise.
8481 * tree-ssa-dom.c (record_edge_info): Likewise.
8482 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8483 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8484 (thread_through_normal_block): Likewise.
8485 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8486 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8487 * tree-switch-conversion.c (switch_conversion::collect): Use new
8489 (switch_conversion::check_final_bb): Likewise.
8490 (switch_conversion::gather_default_values): Pass new argument
8492 (switch_conversion::build_constructors): Likewise.
8493 (switch_decision_tree::compute_cases_per_edge): Use new
8494 gimple_switch_edge function.
8495 (switch_decision_tree::analyze_switch_statement): Pass new argument
8497 (switch_decision_tree::try_switch_expansion): Use
8498 gimple_switch_default_edge.
8499 * tree-vrp.c (find_switch_asserts): Pass new argument
8501 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8502 (vr_values::simplify_switch_using_ranges): Likewise.
8504 2018-08-27 Richard Biener <rguenther@suse.de>
8506 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8507 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8509 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8510 (struct vn_nary_op_s): Add unwind_to member. Add
8511 predicated_values flag and put result into a union together
8512 with a linked list of vn_pval.
8513 (struct vn_ssa_aux): Add name member to make maintaining
8514 a map of SSA name to vn_ssa_aux possible. Remove no longer
8515 needed info, dfsnum, low, visited, on_sccstack, use_processed
8516 and range_info_anti_range_p members.
8517 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8518 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8520 (vn_valueize): New global.
8521 (vn_context_bb): Likewise.
8522 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8523 VN_INFO_PTR_INFO): Remove.
8524 * tree-ssa-sccvn.c: ... (rewrite)
8525 (pass_fre::execute): For -O2+ initialize loops and run
8526 RPO VN in optimistic mode (iterating). For -O1 and -Og
8527 run RPO VN in non-optimistic mode.
8528 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8529 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8530 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8531 (rpo-vn-max-loop-depth): Document.
8532 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8533 when valuezing the VUSE signals we walked out of the region.
8534 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8535 (phi_translate): Set VN context block to use for availability
8537 (compute_avail): Likewise.
8538 (pre_valueize): New function.
8539 (pass_pre::execute): Adjust to the RPO VN API.
8541 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8542 (propagate_constants_for_unrolling): Remove.
8543 (tree_unroll_loops_completely): Perform value-numbering
8544 on the unrolled bodies loop parent.
8546 2018-08-27 Richard Biener <rguenther@suse.de>
8548 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8549 for partial antic compute.
8551 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8553 PR rtl-optimization/87065
8554 * combine.c (simplify_if_then_else): Formatting fix.
8555 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8557 (known_cond): Don't return const_true_rtx for vector modes. Use
8558 CONST0_RTX instead of const0_rtx. Formatting fixes.
8560 2018-08-27 Martin Liska <mliska@suse.cz>
8562 PR gcov-profile/87069
8563 * gcov.c (process_file): Record files already processed
8564 and warn about a file being processed multiple times.
8566 2018-08-27 Martin Liska <mliska@suse.cz>
8569 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8570 Set default values for x_aarch64_*_string strings.
8571 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8572 prefix. For -mabi do not print '=ABI' in help and use
8573 <option_value> format for -msve-vector-bits and -moverride
8576 2018-08-26 Jeff Law <law@redhat.com>
8578 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8581 2018-08-26 Marek Polacek <polacek@redhat.com>
8583 PR c++/87029, Implement -Wredundant-move.
8584 * doc/invoke.texi: Document -Wredundant-move.
8586 2018-08-25 Martin Sebor <msebor@redhat.com>
8588 PR tree-optimization/87059
8589 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8590 to the same type as the other.
8591 * fold-const.c (fold_binary_loc): Assert expectation.
8593 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
8595 * config/darwin.c (machopic_legitimize_pic_address): Clean up
8596 extraneous parentheses, dead code section and formatting.
8598 2018-08-24 David Malcolm <dmalcolm@redhat.com>
8601 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8602 wide enough for jumps in the line-numbering to be visible.
8603 (layout::print_gap_in_line_numbering): New member function.
8604 (layout::calculate_line_spans): When using line numbering, merge
8605 line spans that are only 1 line apart.
8606 (diagnostic_show_locus): When printing line numbers, show gaps in
8607 line numbering directly, rather than printing headers.
8608 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8609 line-numbering with multiple line spans.
8610 (selftest::test_fixit_insert_containing_newline_2): Add test of
8611 line-numbering, in which the spans are close enough to be merged.
8613 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8615 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8616 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
8617 * tree-vrp.c (range_is_nonnull): Remove.
8618 (range_includes_zero_p): Accept value_range instead of min/max.
8619 (extract_range_from_binary_expr_1): Do not early bail on
8621 Use range_includes_zero_p instead of range_is_nonnull.
8622 (extract_range_from_unary_expr): Use range_includes_zero_p instead
8623 of range_is_nonnull.
8624 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
8625 special case VR_ANTI_RANGE.
8626 (vrp_finalize): Same.
8627 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8629 (range_is_nonnull): Remove.
8630 * vr-values.c (vrp_stmt_computes_nonzero): Use
8631 range_includes_zero_p instead of range_is_nonnull.
8632 (extract_range_basic): Pass value_range to range_includes_zero_p
8633 instead of range_is_nonnull.
8635 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
8637 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8638 * emit-rtl.h (rtl_data): Remove return_bnd.
8639 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8640 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8641 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8642 (POINTER_BOUNDS_MODE): Remove definition.
8643 (make_pointer_bounds_mode): Remove.
8644 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8645 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8646 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8647 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8648 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8649 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8650 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8652 * config/i386/i386-modes.def (BND32, BND64): Remove.
8653 * config/i386/i386.c (dbx_register_map): Remove bound registers.
8654 (dbx64_register_map): Ditto.
8655 (svr4_dbx_register_map): Ditto.
8656 (indirect_thunk_bnd_needed): Remove.
8657 (indirect_thunks_bnd_used): Ditto.
8658 (indirect_return_bnd_needed): Ditto.
8659 (indirect_return_via_cx_bnd): Ditto.
8660 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8661 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8662 (output_indirect_thunk): Ditto. Remove need_prefix argument.
8663 (output_indirect_thunk_function): Remove handling of
8664 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8665 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8666 (ix86_save_reg): Remove handling of crtl->return_bnd.
8667 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8668 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8669 and UNSPEC_BNDLX_ADDR.
8670 (ix86_output_indirect_branch_via_reg): Remove handling of
8671 indirect_thunk_prefix_bnd.
8672 (ix86_output_indirect_branch_via_push): Ditto.
8673 (ix86_output_function_return): Ditto.
8674 (ix86_output_indirect_function_return): Ditto.
8675 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8676 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8677 (CALL_USED_REGISTERS): Ditto.
8678 (REG_ALLOC_ORDER): Update for removal of bound registers.
8679 (HI_REGISTER_NAMES): Ditto.
8680 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8681 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8682 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8683 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8684 (FIRST_PSEUDO_REG): Update.
8685 (BND): Remove mode iterator.
8686 * config/i386/predicates.md (bnd_mem_operator): Remove.
8688 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8690 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8693 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8695 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8696 the case in which the permute needs only a single element and
8697 repeats for every vector of the result. Extend that case to
8698 handle variable-length vectors.
8699 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8701 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
8704 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8705 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8707 2018-08-24 Richard Biener <rguenther@suse.de>
8709 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8710 bb_flags_allocated members.
8711 (auto_flag): New RAII class for allocating flags.
8712 (auto_edge_flag): New RAII class for allocating edge flags.
8713 (auto_bb_flag): New RAII class for allocating bb flags.
8714 * cfgloop.c (verify_loop_structure): Allocate temporary edge
8716 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8717 in favor of temporarily allocated BB flag.
8718 * hsa-brig.c: Re-order includes.
8719 * hsa-dump.c: Likewise.
8720 * hsa-regalloc.c: Likewise.
8721 * print-rtl.c: Likewise.
8722 * profile-count.c: Likewise.
8724 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
8727 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8730 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8733 * wide-int-range.cc (wide_int_range_div): Do not ignore result
8734 from wide_int_range_multiplicative_op.
8736 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8738 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8741 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
8743 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8746 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
8748 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8749 full GENERIC expression used for replacement.
8751 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
8753 * tree-vrp.c (abs_extent_range): Remove.
8754 (extract_range_into_wide_ints): Pass wide ints by reference.
8755 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8756 Pass wide ints by reference in all calls to
8757 extract_range_into_wide_ints.
8758 * wide-int-range.cc (wide_int_range_div): New.
8759 * wide-int-range.h (wide_int_range_div): New.
8760 (wide_int_range_includes_zero_p): New.
8761 (wide_int_range_zero_p): New.
8763 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
8765 * config/aarch64/aarch64.md (arches): New enum.
8766 (arch): New enum attr.
8767 (arch_enabled): New attr.
8768 (enabled): Now uses arch_enabled only.
8769 (simd, sve, fp16): Removed attribute.
8770 (fp): Attr now defined in terms of 'arch'.
8771 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8772 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8773 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8774 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8775 attributes into 'arch'.
8776 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8777 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8778 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8779 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8780 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8781 'simd' attribute into 'arch'.
8782 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8783 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8784 Convert use of 'fp' attribute to 'arch'.
8785 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8786 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8788 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8789 (different modes) Merge 'fp' and 'simd' into 'arch'.
8790 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8793 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
8795 PR rtl-optimization/87026
8796 * expmed.c (canonicalize_comparison): If we can no longer create
8797 pseudoregisters, don't.
8799 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
8802 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8804 * config/arm/arm.c (speculation_barrier_libfunc): New static
8806 (arm_init_libfuncs): Initialize it.
8807 (arm_emit_speculation_barrier): New function.
8808 * config/arm/arm.md (speculation_barrier): Call
8809 arm_emit_speculation_barrier for architectures that do not have
8811 (speculation_barrier_insn): Only match on Armv7 or later.
8813 2018-08-23 Richard Biener <rguenther@suse.de>
8816 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8819 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8821 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8822 of single-vector TBLs.
8823 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8826 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8829 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8830 aarch64_evpc_tbl guard.
8832 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
8834 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8837 2018-08-22 Martin Sebor <msebor@redhat.com>
8840 * tree-pretty-print.c (pretty_print_string): Add argument.
8841 (dump_generic_node): Call to pretty_print_string with string size.
8843 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
8845 PR rtl-optimization/86771
8846 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8847 of two SETs into those two SETs, one to be placed at i2, if that SETs
8848 destination is modified between i2 and i3.
8850 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8852 PR tree-optimization/86725
8853 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8855 (vect_analyze_scalar_cycles_1): Check it.
8857 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8859 PR tree-optimization/86725
8860 * tree-vect-loop.c (vect_is_simple_reduction): When treating
8861 an outer loop phi as a double reduction, make sure that the
8862 single user of the phi result is an inner loop phi.
8864 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8866 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8867 grouped stores with gaps to a strided group.
8869 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8871 * tree-vect-stmts.c (get_group_load_store_type)
8872 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8873 first statement in a group.
8875 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8877 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8878 the sequence used in gcc/gcc.c.
8880 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8883 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8886 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8888 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8889 Darwin10-specific unwinder-shim.
8890 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8891 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8892 New to cater for Darwin10 Rosetta.
8894 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8896 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8897 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8899 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8904 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8905 (dwarf2out_switch_text_section): Generate a local label for the
8906 second function sub-section and apply it as the second FDE start
8908 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8909 second sub-section start.
8911 2018-08-22 Richard Biener <rguenther@suse.de>
8913 PR tree-optimization/86988
8914 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8916 2018-08-22 Richard Biener <rguenther@suse.de>
8918 PR tree-optimization/86945
8919 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8921 2018-08-22 Alexandre Oliva <oliva@adacore.com>
8923 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8924 a comment about how uses of r2 for .sdata2 come about.
8926 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8928 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8930 2018-08-21 Marek Polacek <polacek@redhat.com>
8932 PR c++/86981, Implement -Wpessimizing-move.
8933 * doc/invoke.texi: Document -Wpessimizing-move.
8935 2018-08-21 Jan Hubicka <jh@suse.cz>
8937 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8938 * tree.h (is_redundant_typedef): Remove.
8939 * dwarf2out.c (is_redundant_typedef): Turn into static function.
8941 2018-08-21 Jan Hubicka <jh@suse.cz>
8943 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8946 2018-08-21 Tamar Christina <tamar.christina@arm.com>
8948 * expmed.c (extract_low_bits): Reject invalid subregs early.
8950 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8953 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8956 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8958 * config/vxworks.h: Guard vxworks_asm_out_constructor and
8959 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8960 * config/vxworks.c: Likewise.
8962 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8964 * config/vxworks.c: Set targetm.have_ctors_dtors
8965 if HAVE_INITFINI_ARRAY_SUPPORT.
8966 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8967 if HAVE_INITFINI_ARRAY_SUPPORT.
8969 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8971 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8972 default search path for VxWorks < 7.
8974 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8976 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8977 (get_format_string): Refer to c_getstr.
8979 2018-08-21 Tom de Vries <tdevries@suse.de>
8981 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8982 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8983 (debuginfo_early_stop): Declare.
8984 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8985 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8986 (debuginfo_early_stop): New function.
8987 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8988 and debuginfo_early_stop.
8989 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8990 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8991 (general_init): Call debuginfo_early_init.
8992 (finalize): Call debuginfo_fini.
8993 (do_compile): Call debuginfo_init.
8994 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8996 (@item -fdump-debug, @item -fdump-earlydebug): Add.
8998 2018-08-21 Tom de Vries <tdevries@suse.de>
9000 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
9001 flag_dump_noaddr and flag_dump_unnumbered.
9003 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
9005 * wide-int-range.cc (wide_int_range_abs): New.
9006 (wide_int_range_order_set): Rename from wide_int_range_min_max.
9007 * wide-int-range.h (wide_int_range_abs): New.
9008 (wide_int_range_min_max): New.
9009 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
9010 case to call wide_int_range_abs.
9011 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
9012 (extract_range_from_abs_expr): Delete.
9014 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
9017 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
9018 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
9021 2018-08-20 Nathan Sidwell <nathan@acm.org>
9022 Jeff Law <law@redhat.com>
9024 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
9025 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
9027 2018-08-20 David Malcolm <dmalcolm@redhat.com>
9030 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
9031 (decl_attributes): Likewise.
9032 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
9034 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9035 * diagnostic-core.h (class auto_diagnostic_group): New class.
9036 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
9037 (diagnostic_report_diagnostic): Handle the first diagnostics within
9039 (emit_diagnostic): Add auto_diagnostic_group instance.
9041 (inform_n): Likewise.
9042 (warning): Likewise.
9043 (warning_at): Likewise.
9044 (warning_n): Likewise.
9045 (pedwarn): Likewise.
9046 (permerror): Likewise.
9048 (error_n): Likewise.
9049 (error_at): Likewise.
9051 (fatal_error): Likewise.
9052 (internal_error): Likewise.
9053 (internal_error_no_backtrace): Likewise.
9054 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
9055 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
9056 * diagnostic.h (struct diagnostic_context): Add fields
9057 "diagnostic_group_nesting_depth",
9058 "diagnostic_group_emission_count", "begin_group_cb",
9060 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
9061 Add auto_diagnostic_group instance(s).
9062 (find_explicit_erroneous_behavior): Likewise.
9063 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
9064 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
9065 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
9066 (gimplify_va_arg_expr): Likewise.
9067 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
9068 (HSA_SORRY_AT): Likewise.
9069 * ipa-devirt.c (compare_virtual_tables): Likewise.
9070 (warn_odr): Likewise.
9071 * multiple_target.c (expand_target_clones): Likewise.
9072 * opts-common.c (cmdline_handle_error): Likewise.
9073 * reginfo.c (globalize_reg): Likewise.
9074 * substring-locations.c (format_warning_n_va): Likewise.
9075 * tree-inline.c (expand_call_inline): Likewise.
9076 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
9077 * tree-ssa-loop-niter.c
9078 (do_warn_aggressive_loop_optimizations): Likewise.
9079 * tree-ssa-uninit.c (warn_uninit): Likewise.
9080 * tree.c (warn_deprecated_use): Likewise.
9082 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
9085 * config/i386/i386.md (eh_return): Always update EH return
9086 address in word_mode.
9088 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
9090 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
9091 TARGET_SPLIT_COMPLEX_ARG is defined.
9093 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9095 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
9097 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
9100 * expr.c (expand_assignment): Assert that bitpos is positive.
9101 (store_field): Likewise
9102 (expand_expr_real_1): Make sure that bitpos is positive.
9103 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
9106 2018-08-20 Nathan Sidwell <nathan@acm.org>
9108 * Makefile.in (CPP_ID_DATA_H): Delete.
9109 (CPP_INTERNAL_H): Don't add it.
9110 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
9111 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
9113 2018-08-20 Richard Biener <rguenther@suse.de>
9115 PR tree-optimization/78655
9116 * tree-vrp.c (extract_range_from_binary_expr_1): Make
9117 pointer + offset nonnull if either operand is nonnull work.
9119 2018-08-20 Tom de Vries <tdevries@suse.de>
9121 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
9122 unless the referenced die describes the added property using
9123 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
9124 Otherwise, add a DW_AT_location to the referenced die.
9126 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
9129 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
9130 register_operand when calling ix86_set_reg_reg_cost.
9131 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
9132 Set *total to 0 for operands that satisfy x86_64_immediate_operand
9133 predicate and to 1 otherwise.
9135 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
9137 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
9138 emit a diagnostic that it is not supported and reset the option.
9139 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
9140 supported and consume the option. (ASM_FINAL_SPEC): New.
9142 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9144 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
9147 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
9149 C-SKY port: Documentation
9151 * doc/extend.texi (C-SKY Function Attributes): New section.
9152 * doc/invoke.texi (Option Summary): Add C-SKY options.
9153 (C-SKY Options): New section.
9154 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
9156 2018-08-17 Jojo <jijie_rong@c-sky.com>
9157 Huibin Wang <huibin_wang@c-sky.com>
9158 Sandra Loosemore <sandra@codesourcery.com>
9159 Chung-Lin Tang <cltang@codesourcery.com>
9161 C-SKY port: Backend implementation
9163 * config/csky/*: New.
9164 * common/config/csky/*: New.
9166 2018-08-17 Jojo <jijie_rong@c-sky.com>
9167 Huibin Wang <huibin_wang@c-sky.com>
9168 Sandra Loosemore <sandra@codesourcery.com>
9169 Chung-Lin Tang <cltang@codesourcery.com>
9170 Andrew Jenner <andrew@codesourcery.com>
9172 C-SKY port: Configury
9174 * config.gcc (csky-*-*): New.
9175 * configure.ac: Add csky to targets for dwarf2 debug_line support.
9176 * configure: Regenerated.
9178 2018-08-17 David Malcolm <dmalcolm@redhat.com>
9180 * dump-context.h: Include "dumpfile.h".
9181 (dump_context::dump_printf_va): Convert final param from va_list
9182 to va_list *. Convert from ATTRIBUTE_PRINTF to
9183 ATTRIBUTE_GCC_DUMP_PRINTF.
9184 (dump_context::dump_printf_loc_va): Likewise.
9185 * dumpfile.c: Include "stringpool.h".
9186 (make_item_for_dump_printf_va): Delete.
9187 (make_item_for_dump_printf): Delete.
9188 (class dump_pretty_printer): New class.
9189 (dump_pretty_printer::dump_pretty_printer): New ctor.
9190 (dump_pretty_printer::emit_items): New member function.
9191 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
9193 (dump_pretty_printer::emit_item): New member function.
9194 (dump_pretty_printer::stash_item): New member function.
9195 (dump_pretty_printer::format_decoder_cb): New member function.
9196 (dump_pretty_printer::decode_format): New member function.
9197 (dump_context::dump_printf_va): Reimplement in terms of
9198 dump_pretty_printer.
9199 (dump_context::dump_printf_loc_va): Convert final param from va_list
9201 (dump_context::begin_scope): Reimplement call to
9202 make_item_for_dump_printf.
9203 (dump_printf): Update for change to dump_printf_va.
9204 (dump_printf_loc): Likewise.
9205 (selftest::test_capture_of_dump_calls): Convert "stmt" from
9206 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
9207 with %T, %E, and %G.
9208 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9209 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9210 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9211 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9212 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9213 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9214 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9215 within a dump_printf_loc call to "%wu".
9216 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9217 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
9218 missing space after "=".
9219 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9220 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9221 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9222 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9223 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
9224 duplicate "vectorized" from message.
9226 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
9228 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9229 polyNxK_t element's TYPE_STRING_FLAG.
9231 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
9233 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9234 (they were unnamed before). Fix comments.
9236 2018-08-17 Nathan Sidwell <nathan@acm.org>
9238 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9240 2018-08-17 Richard Biener <rguenther@suse.de>
9242 PR tree-optimization/86841
9243 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9245 2018-08-17 Martin Liska <mliska@suse.cz>
9247 * common.opt: Remove Warn, Init and Report for options with
9248 Ignore/Deprecated flag. Warning is done automatically for
9250 * config/i386/i386.opt: Likewise.
9251 * config/ia64/ia64.opt: Likewise.
9252 * config/rs6000/rs6000.opt: Likewise.
9253 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9254 Remove usage of flag_check_pointer_bounds.
9255 * lto-wrapper.c (merge_and_complain): Do not handle
9256 OPT_fcheck_pointer_bounds.
9257 (append_compiler_options): Likewise.
9258 * opt-functions.awk: Do not handle Deprecated.
9259 * optc-gen.awk: Check that Var, Report and Init are not
9260 used for an option with Ignore/Deprecated flag.
9261 * opts-common.c (decode_cmdline_option): Do not report
9263 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9265 * opts.h (struct cl_option): Remove cl_deprecated flag.
9266 (CL_ERR_DEPRECATED): Remove error enum value.
9268 2018-08-17 Richard Biener <rguenther@suse.de>
9271 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9272 across a va-arg-pack using call adjust its return value accordingly.
9274 2018-08-16 Martin Sebor <msebor@redhat.com>
9276 PR tree-optimization/86853
9277 * gimple-ssa-sprintf.c (struct format_result): Rename member.
9278 (struct fmtresult): Add member and initialize it in ctors.
9279 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
9280 (format_string): Handle %S the same as %ls. Set MAYFAIL.
9281 (format_directive): Set POSUNDER4K when MAYFAIL is set.
9282 (parse_directive): Handle %C same as %c.
9283 (sprintf_dom_walker::compute_format_length): Adjust.
9284 (is_call_safe): Adjust.
9286 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9288 * builtins.c (c_strlen): Add new parameter eltsize. Use it
9289 for determining how to count the elements.
9290 * builtins.h (c_strlen): Adjust prototype.
9291 * expr.c (string_constant): Add new parameter mem_size.
9292 Set *mem_size appropriately.
9293 * expr.h (string_constant): Adjust protoype.
9294 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9295 * gimple-fold.h (get_range_strlen): Adjust prototype.
9296 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9297 (format_string): Call get_string_length with eltsize.
9299 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9301 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9302 to emit the span, rather than setting it as the prefix.
9304 2018-08-16 David Malcolm <dmalcolm@redhat.com>
9306 * diagnostic-show-locus.c (layout::start_annotation_line): Add
9307 "margin_char" parameter, defaulting to space. Use it in place
9308 of pp_space for the initial part of the margin.
9309 (layout::print_leading_fixits): Use '+' when filling the margin
9310 of line-insertion fix-it hints.
9312 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9314 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9317 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9319 * config/rs6000/altivec.md: Don't set length attribute to the default
9321 * config/rs6000/darwin.md: Ditto.
9322 * config/rs6000/dfp.md: Ditto.
9323 * config/rs6000/htm.md: Ditto.
9324 * config/rs6000/rs6000.md: Ditto.
9325 * config/rs6000/sync.md: Ditto.
9326 * config/rs6000/vsx.md: Ditto.
9328 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9330 * config/rs6000/altivec.md: Don't set length attribute to the default
9331 value, for branch instructions.
9332 * config/rs6000/darwin.md: Ditto.
9333 * config/rs6000/rs6000.md: Ditto.
9335 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
9337 * config/rs6000/rs6000.md (length): Always define as const_int 4.
9338 (unnamed conditional branch define_insn): Set length to 4 or 8
9339 depending on offset.
9340 (<bd>_<mode>): Similar, for alternative 0.
9341 (<bd>tf_<mode>): Ditto.
9343 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9345 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9347 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
9349 * doc/rtl.texi: Replace old RTX class names with new names.
9352 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
9354 * expmed.h (canonicalize_comparison): New declaration.
9355 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9356 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9357 * optabs.c (prepare_cmp_insn): Likewise.
9358 * rtl.h (unsigned_condition_p): New function which checks if a
9359 comparison operator is unsigned.
9361 2018-08-16 Nathan Sidwell <nathan@acm.org>
9363 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9364 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9366 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9369 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9370 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9371 (mov<mov>): ..this and enable unconditionally.
9373 2018-08-16 Tamar Christina <tamar.christina@arm.com>
9375 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9377 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
9379 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9380 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9381 "Common" with "Target".
9383 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9385 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9386 * doc/invoke.texi (mmitigate-rop): Remove.
9387 * config/i386/i386.c: Do not include "regrename.h".
9388 (ix86_rop_should_change_byte_p, reg_encoded_number)
9389 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9391 (ix86_reorg): Remove call to ix86_mitigate_rop.
9392 * config/i386/i386.md (attr "modrm_class"): Remove.
9393 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9394 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9395 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9397 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
9399 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9400 allow folding of mergeh() and mergel() for the float and double types.
9401 (fold_mergehl_helper): Rework to handle building a permute tree
9404 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
9406 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9409 2018-08-15 David Malcolm <dmalcolm@redhat.com>
9411 * common.opt (fdiagnostics-show-labels): New option.
9412 * diagnostic-show-locus.c (class layout_range): Add field
9414 (class layout): Add field "m_show_labels_p".
9415 (layout_range::layout_range): Add param "label" and use it to
9417 (make_range): Pass in NULL for new "label" param of layout_range's
9419 (layout::layout): Initialize m_show_labels_p.
9420 (layout::maybe_add_location_range): Pass in loc_range->m_label
9421 when constructing layout_range instances.
9422 (struct line_label): New struct.
9423 (layout::print_any_labels): New member function.
9424 (layout::print_line): Call it if label-printing is enabled.
9425 (selftest::test_one_liner_labels): New test.
9426 (selftest::test_diagnostic_show_locus_one_liner): Call it.
9427 * diagnostic.c (diagnostic_initialize): Initialize
9428 context->show_labels_p.
9429 * diagnostic.h (struct diagnostic_context): Add field
9431 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9432 -fno-diagnostics-show-labels.
9433 * dwarf2out.c (gen_producer_string): Add
9434 OPT_fdiagnostics_show_labels to the ignored options.
9435 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9437 (gcc_rich_location::maybe_add_expr): Likewise.
9438 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9439 label" param, defaulting to NULL.
9440 (gcc_rich_location::add_expr): Add "label" param.
9441 (gcc_rich_location::maybe_add_expr): Likewise.
9442 (class text_range_label): New class.
9443 (class range_label_for_type_mismatch): New class.
9444 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9445 of format_warning_va.
9446 (fmtwarn_n): Likewise for new params of format_warning_n_va.
9447 * lto-wrapper.c (merge_and_complain): Add
9448 OPT_fdiagnostics_show_labels to the "pick one setting" options.
9449 (append_compiler_options): Likewise to the dropped options.
9450 (append_diag_options): Likewise to the passed-on options.
9451 * opts.c (common_handle_option): Handle the new option.
9452 * selftest-diagnostic.c
9453 (test_diagnostic_context::test_diagnostic_context): Enable
9455 * substring-locations.c: Include "gcc-rich-location.h".
9456 (format_warning_n_va): Add "fmt_label" and "param_label" params
9457 and use them as appropriate.
9458 (format_warning_va): Add "fmt_label" and "param_label" params,
9459 passing them on to format_warning_n_va.
9460 (format_warning_at_substring): Likewise.
9461 (format_warning_at_substring_n): Likewise.
9462 * substring-locations.h (format_warning_va): Add "fmt_label" and
9463 "param_label" params.
9464 (format_warning_n_va): Likewise.
9465 (format_warning_at_substring): Likewise.
9466 (format_warning_at_substring_n): Likewise.
9467 * toplev.c (general_init): Initialize global_dc->show_labels_p.
9469 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
9472 * builtins.c (expand_builtin_memcmp): Do not expand the call
9473 when overflow is detected.
9475 2018-08-15 Martin Sebor <msebor@redhat.com>
9477 PR tree-optimization/71625
9478 * config/aarch64/aarch64-builtins.c
9479 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9481 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
9483 * config/s390/s390.c (s390_reorg): Remove loop.
9485 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9488 (darwin_function_switched_text_sections): Delete.
9489 * gcc/config/darwin.h
9490 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9492 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9495 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9496 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
9497 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9499 2018-08-15 Martin Liska <mliska@suse.cz>
9501 PR tree-optimization/86925
9502 * predict.c (expr_expected_value_1): When taking
9503 later predictor, assign also probability.
9504 Use fold_build2_initializer_loc in order to fold
9505 the expression in -frounding-math.
9507 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9509 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9511 (expand_vec_perm_1): Try the new method.
9513 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9516 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9517 Check whether lra_live_max_point is 0 before dividing.
9519 2018-08-14 Martin Sebor <msebor@redhat.com>
9521 PR tree-optimization/86650
9522 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9523 (vrp_prop::check_mem_ref): Same.
9525 2018-08-13 Liu Hao <lh_mouse@126.com>
9527 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9528 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9529 and clear it thereafter, as it only works for DBCS.
9531 2018-08-13 Liu Hao <lh_mouse@126.com>
9533 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9534 handle returned by _get_osf_handle().
9536 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9538 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9539 for folding vec_perm.
9541 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9543 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9544 Add support for gimple-folding of vec_pack() and vec_unpack()
9547 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9549 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9550 vec_xst variants to the list.
9551 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9552 vector loads and stores.
9554 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9556 * config.gcc (rs6000-ibm-aix4.x): Delete.
9557 (rs6000-ibm-aix5.1): Delete.
9558 (rs6000-ibm-aix5.2): Delete.
9559 (rs6000-ibm-aix5.3): Delete.
9560 * config/rs6000/aix43.h: Delete.
9561 * config/rs6000/aix51.h: Delete.
9562 * config/rs6000/aix52.h: Delete.
9563 * config/rs6000/t-aix43: Delete.
9565 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9567 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9569 (s390_decompose_address): Factor out constant pool ref
9572 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9574 * config/nds32/nds32-predicates.c
9575 (nds32_can_use_bclr_p): Change return type as bool.
9576 (nds32_can_use_bset_p): Ditto.
9577 (nds32_can_use_btgl_p): Ditto.
9578 (nds32_can_use_bitci_p): Ditto.
9579 * config/nds32/nds32-protos.h
9580 (nds32_can_use_bclr_p): Change declaration.
9581 (nds32_can_use_bset_p): Ditto.
9582 (nds32_can_use_btgl_p): Ditto.
9583 (nds32_can_use_bitci_p): Ditto.
9585 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9587 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9588 Support -msched-prolog-epilog option.
9589 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9591 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9593 * common/config/nds32/nds32-common.c
9594 (nds32_option_optimization_table): Enalbe -malways-align.
9596 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9598 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9600 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9601 OPT_misr_secure_ case.
9602 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9603 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9604 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9606 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9607 (nds32_isr_info): New field security_level.
9608 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9609 * config/nds32/nds32.md (return_internal): Consider critical attribute.
9610 * config/nds32/nds32.opt (misr-secure): New option.
9611 * config/nds32/nds32_init.inc: New file.
9612 * config/nds32/nds32_isr.h: New file.
9614 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
9616 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9617 Update comment for atomic instructions.
9618 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9619 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9621 (atomic_loaddi): Revise fence expansion to only emit fence prior to
9622 load for __ATOMIC_SEQ_CST model.
9623 (atomic_loaddi_1): Remove float register target.
9624 (atomic_storedi): Handle CONST_INT values.
9625 (atomic_storedi_1): Remove float register source. Add special case
9627 (memory_barrier): New expander and insn.
9629 2018-08-11 Jakub Jelinek <jakub@redhat.com>
9631 PR tree-optimization/86835
9632 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9633 new_stmt after def_gsi, make sure to insert new_square_stmt after
9634 that stmt, not 2 stmts before it.
9636 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
9639 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9642 2018-08-10 Martin Liska <mliska@suse.cz>
9645 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9647 * builtins.c (expand_builtin_expect_with_probability):
9649 (expand_builtin_expect_with_probability): New function.
9650 (build_builtin_expect_predicate): Add new argumnet probability
9651 for BUILT_IN_EXPECT_WITH_PROBABILITY.
9652 (fold_builtin_expect):
9655 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9656 * builtins.h (fold_builtin_expect): Set new argument.
9657 * doc/extend.texi: Document __builtin_expect_with_probability.
9658 * doc/invoke.texi: Likewise.
9659 * gimple-fold.c (gimple_fold_call): Pass new argument.
9660 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9661 also BUILT_IN_EXPECT_WITH_PROBABILITY.
9662 * predict.c (get_predictor_value): New function.
9663 (expr_expected_value): Add new argument probability. Assume
9664 that predictor and probability are always non-null.
9665 (expr_expected_value_1): Likewise. For __builtin_expect and
9666 __builtin_expect_with_probability set probability. Handle
9667 combination in binary expressions.
9668 (tree_predict_by_opcode): Simplify code by simply calling
9669 get_predictor_value.
9670 (pass_strip_predict_hints::execute): Add handling of
9671 BUILT_IN_EXPECT_WITH_PROBABILITY.
9672 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9674 * tree.h (DECL_BUILT_IN_P): New function.
9676 2018-08-10 Martin Liska <mliska@suse.cz>
9678 PR tree-optimization/85799
9679 * passes.def: Add argument for pass_strip_predict_hints.
9680 * predict.c (class pass_strip_predict_hints): Add new argument
9682 (strip_predictor_early): New function.
9683 (pass_strip_predict_hints::execute): Call the function to
9685 (strip_predict_hints): New function.
9686 * predict.def: Fix comment.
9688 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
9690 * Makefile.in: Clarify which tm.texi to copy over to assert the
9691 right to grant a GFDL license for all.
9693 2018-08-09 Jeff Law <law@redhat.com>
9695 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9698 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
9700 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9703 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9705 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9706 reductions for variable-length vectors.
9708 2018-08-09 David Malcolm <dmalcolm@redhat.com>
9711 * common.opt (fdiagnostics-show-line-numbers): New option.
9712 * diagnostic-show-locus.c (class layout): Add fields
9713 "m_show_line_numbers_p" and "m_linenum_width";
9714 (num_digits): New function.
9715 (test_num_digits): New function.
9716 (layout::layout): Initialize new fields. Update m_x_offset
9717 logic to handle any left margin.
9718 (layout::print_source_line): Print line number when requested.
9719 (layout::start_annotation_line): New member function.
9720 (layout::print_annotation_line): Call it.
9721 (layout::print_leading_fixits): Likewise.
9722 (layout::print_trailing_fixits): Likewise. Update calls to
9723 move_to_column for new parameter.
9724 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9725 it to potentially call start_annotation_line.
9726 (layout::show_ruler): Call start_annotation_line.
9727 (selftest::test_line_numbers_multiline_range): New selftest.
9728 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9729 and selftest::test_line_numbers_multiline_range.
9730 * diagnostic.c (diagnostic_initialize): Initialize
9731 show_line_numbers_p.
9732 * diagnostic.h (struct diagnostic_context): Add field
9733 "show_line_numbers_p".
9734 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9735 -fno-diagnostics-show-line-numbers.
9736 * dwarf2out.c (gen_producer_string): Add
9737 OPT_fdiagnostics_show_line_numbers to the ignored options.
9738 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9739 one setting" options.
9740 (append_compiler_options): Likewise to the dropped options.
9741 (append_diag_options): Likewise to the passed-on options.
9742 * opts.c (common_handle_option): Handle the new option.
9743 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9745 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
9747 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9748 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
9749 third argument of type "const signed char" to descriptions of
9750 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9751 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9752 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9753 __builtin_bcdsub_ov functions.
9755 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9757 PR tree-optimization/86858
9758 * tree-vect-loop.c (vect_is_simple_reduction): Restore
9759 flow_bb_inside_loop_p calls.
9761 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9763 PR tree-optimization/86871
9764 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9765 instead of gimple_assign_lhs.
9767 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
9770 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9771 register constraint to operand 0.
9772 (add<mode>3_carryinC): Likewise.
9773 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9775 2018-08-09 Martin Liska <mliska@suse.cz>
9778 * common.opt: Remove extra line.
9780 2018-08-09 Martin Liska <mliska@suse.cz>
9782 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9783 at the end of a line, make first letter capital and end up
9784 a sentence with a dot.
9785 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9786 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9787 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9788 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9789 (PARAM_MAX_ISL_OPERATIONS): Likewise.
9790 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9791 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9792 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9793 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9794 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9795 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9796 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9797 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9798 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9799 (PARAM_TREE_REASSOC_WIDTH): Likewise.
9800 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9801 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9802 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9804 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
9807 * config/s390/s390.c (s390_option_override_internal): Reduce the
9808 stack-clash-protection-probe-interval param if it would be too big
9811 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
9814 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9815 * config/m68k/m68k.c (handle_move_double): Don't call
9816 m68k_final_prescan_insn.
9817 (m68k_adjust_decorated_operand): Renamed from
9818 m68k_final_prescan_insn, remove first and third operand and
9820 (print_operand): Call it.
9821 (print_operand_address): Call it.
9823 2018-08-08 Nathan Sidwell <nathan@acm.org>
9825 * diagnostic.c (diagnostic_report_current_module): Use
9826 linemap_included_from & linemap_included_from_linemap.
9828 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
9830 * config/aarch64/aarch64-cores.def: Add phecda core.
9831 * config/aarch64/aarch64-tune.md: Regenerate.
9832 * doc/invoke.texi: Add phecda core.
9834 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9837 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9839 * config/s390/s390.md ("movti"): Add more alternatives for
9840 constant to GPR copies.
9842 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9844 * config/s390/s390.c: Fix whitespace damage throughout the file.
9845 * config/s390/s390.h: Likewise.
9846 * config/s390/tpf.h: Likewise.
9848 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9850 * config/s390/s390.c (s390_loadrelative_operand_p):
9851 Remove TARGET_CPU_ZARCH usages.
9852 (s390_rtx_costs): Likewise.
9853 (s390_legitimate_constant_p): Likewise.
9854 (s390_cannot_force_const_mem): Likewise.
9855 (legitimate_reload_constant_p): Likewise.
9856 (s390_preferred_reload_class): Likewise.
9857 (legitimize_pic_address): Likewise.
9858 (legitimize_tls_address): Likewise.
9859 (s390_split_branches): Removed.
9860 (s390_add_execute): Removed.
9861 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9862 (s390_mainpool_start): Likewise.
9863 (s390_mainpool_finish): Likewise.
9864 (s390_mainpool_cancel): Removed.
9865 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9866 (s390_chunkify_cancel): Likewise.
9867 (s390_return_addr_rtx): Likewise.
9868 (s390_register_info): Remove split_branches_pending_p uages.
9869 (s390_optimize_register_info): Likewise.
9870 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9871 split_branches_pending_p usages.
9872 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9873 (s390_load_got): Likewise.
9874 (s390_expand_split_stack_prologue): Likewise.
9875 (output_asm_nops): Likewise.
9876 (s390_function_profiler): Likewise.
9877 (s390_emit_call): Likewise.
9878 (s390_conditional_register_usage): Likewise.
9879 (s390_optimize_prologue): Likewise.
9880 (s390_reorg): Remove TARGET_CPU_ZARCH and
9881 split_branches_pending_p usages.
9882 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9884 (s390_output_indirect_thunk_function): Likewise.
9885 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9886 (TARGET_CPU_ZARCH_P): Removed.
9887 (struct machine_function): Remove split_branches_pending_p.
9888 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9890 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9892 * common/config/s390/s390-common.c (processor_flags_table):
9894 * config.gcc: Remove with_arch/with_tune support.
9895 * config/s390/2064.md: Remove cpu attribute comparisons.
9896 * config/s390/driver-native.c (s390_host_detect_local_cpu):
9898 * config/s390/linux.h (ASM_SPEC):
9899 Remove -march support.
9900 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9901 Use a table to get an arch level.
9902 * config/s390/s390-opts.h (enum processor_type):
9904 * config/s390/s390.c
9905 (processor_table): Remove entries, add arch_level values.
9906 (s390_issue_rate): Remove cases.
9907 (s390_option_override): Adjust
9908 s390_option_override_internal() call.
9909 (s390_option_override_internal): Remove deprecation warning.
9910 (s390_valid_target_attribute_tree): Adjust
9911 s390_option_override_internal() call.
9912 * config/s390/s390.h (struct s390_processor):
9913 Share with s390-c.c, add arch_level field.
9914 * config/s390/s390.md:
9915 Remove occurrences in cpu attribute.
9916 * config/s390/s390.opt: Remove -march/-mtune support.
9917 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9918 * doc/invoke.texi: Remove deprecation warning.
9920 2018-08-08 Luis Machado <luis.machado@linaro.org>
9922 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9924 (qdf24xx_tunings): Set vector cost structure to
9925 qdf24xx_vector_cost.
9927 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9928 <register_sextend>: Set to 3.
9930 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
9933 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9934 * config/aarch64/aarch64-simd.md
9935 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9936 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9937 (aarch64_frecpx<mode>): ...this new pattern.
9938 * config/aarch64/aarch64-simd-builtins.def: Remove comment
9939 about aarch64_frecp<FRECP:frecp_suffix><mode>.
9941 2018-08-07 Martin Liska <mliska@suse.cz>
9944 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9945 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9946 * predict.def (PRED_MALLOC_NONNULL): New predictor.
9947 * doc/extend.texi: Document that malloc attribute adds
9950 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
9953 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9954 Define to speculation_safe_value_not_needed.
9956 2018-08-06 Jeff Law <law@redhat.com>
9958 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9959 the vr_values instance to cprop_into_stmt.
9960 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9961 (cprop_operand): Also query EVRP to determine if OP is a constant.
9963 2018-08-06 Nathan Sidwell <nathan@acm.org>
9965 * diagnostic.c (diagnostic_report_current_module): Reroll
9966 included-at loop. Translate text.
9968 2018-08-06 David Malcolm <dmalcolm@redhat.com>
9970 * function-tests.c (selftest::test_expansion_to_rtl): Call
9971 free_after_compilation.
9973 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9975 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9977 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
9979 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9980 loops with memory block operations from getting unrolled.
9982 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
9985 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9986 Define to speculation_safe_value_not_needed.
9988 2018-08-06 Jeff Law <law@redhat.com>
9990 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9993 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9996 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9997 with all enabled __intN types.
9999 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
10001 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10003 * alias.c (record_set): Check for clobber high.
10004 * cfgexpand.c (expand_gimple_stmt): Likewise.
10005 * combine-stack-adj.c (single_set_for_csa): Likewise.
10006 * combine.c (find_single_use_1): Likewise.
10007 (set_nonzero_bits_and_sign_copies): Likewise.
10008 (get_combine_src_dest): Likewise.
10009 (is_parallel_of_n_reg_sets): Likewise.
10010 (try_combine): Likewise.
10011 (record_dead_and_set_regs_1): Likewise.
10012 (reg_dead_at_p_1): Likewise.
10013 (reg_dead_at_p): Likewise.
10014 * dce.c (deletable_insn_p): Likewise.
10015 (mark_nonreg_stores_1): Likewise.
10016 (mark_nonreg_stores_2): Likewise.
10017 * df-scan.c (df_find_hard_reg_defs): Likewise.
10018 (df_uses_record): Likewise.
10019 (df_get_call_refs): Likewise.
10020 * dwarf2out.c (mem_loc_descriptor): Likewise.
10021 * haifa-sched.c (haifa_classify_rtx): Likewise.
10022 * ira-build.c (create_insn_allocnos): Likewise.
10023 * ira-costs.c (scan_one_insn): Likewise.
10024 * ira.c (equiv_init_movable_p): Likewise.
10025 (rtx_moveable_p): Likewise.
10026 (interesting_dest_for_shprep): Likewise.
10027 * jump.c (mark_jump_label_1): Likewise.
10028 * postreload-gcse.c (record_opr_changes): Likewise.
10029 * postreload.c (reload_cse_simplify): Likewise.
10030 (struct reg_use): Add source expr.
10031 (reload_combine): Check for clobber high.
10032 (reload_combine_note_use): Likewise.
10033 (reload_cse_move2add): Likewise.
10034 (move2add_note_store): Likewise.
10035 * print-rtl.c (print_pattern): Likewise.
10036 * recog.c (decode_asm_operands): Likewise.
10037 (store_data_bypass_p): Likewise.
10038 (if_test_bypass_p): Likewise.
10039 * regcprop.c (kill_clobbered_value): Likewise.
10040 (kill_set_value): Likewise.
10041 * reginfo.c (reg_scan_mark_refs): Likewise.
10042 * reload1.c (maybe_fix_stack_asms): Likewise.
10043 (eliminate_regs_1): Likewise.
10044 (elimination_effects): Likewise.
10045 (mark_not_eliminable): Likewise.
10046 (scan_paradoxical_subregs): Likewise.
10047 (forget_old_reloads_1): Likewise.
10048 * reorg.c (find_end_label): Likewise.
10049 (try_merge_delay_insns): Likewise.
10050 (redundant_insn): Likewise.
10051 (own_thread_p): Likewise.
10052 (fill_simple_delay_slots): Likewise.
10053 (fill_slots_from_thread): Likewise.
10054 (dbr_schedule): Likewise.
10055 * resource.c (update_live_status): Likewise.
10056 (mark_referenced_resources): Likewise.
10057 (mark_set_resources): Likewise.
10058 * rtl.c (copy_rtx): Likewise.
10059 * rtlanal.c (reg_referenced_p): Likewise.
10060 (single_set_2): Likewise.
10061 (noop_move_p): Likewise.
10062 (note_stores): Likewise.
10063 * sched-deps.c (sched_analyze_reg): Likewise.
10064 (sched_analyze_insn): Likewise.
10066 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10068 * cse.c (invalidate_reg): New function extracted from...
10069 (invalidate): ...here.
10070 (canonicalize_insn): Check for clobber high.
10071 (invalidate_from_clobbers): invalidate clobber highs.
10072 (invalidate_from_sets_and_clobbers): Likewise.
10073 (count_reg_usage): Check for clobber high.
10074 (insn_live_p): Likewise.
10075 * cselib.c (cselib_expand_value_rtx_1):Likewise.
10076 (cselib_invalidate_regno): Check for clobber in setter.
10077 (cselib_invalidate_rtx): Pass through setter.
10078 (cselib_invalidate_rtx_note_stores):
10079 (cselib_process_insn): Check for clobber high.
10080 * cselib.h (cselib_invalidate_rtx): Add operand.
10082 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10084 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
10085 (mark_not_eliminable): Likewise.
10086 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
10087 * lra-lives.c (process_bb_lives): Check for clobber high.
10088 * lra.c (new_insn_reg): Remember clobber highs.
10089 (collect_non_operand_hard_regs): Check for clobber high.
10090 (lra_set_insn_recog_data): Likewise.
10091 (add_regs_to_insn_regno_info): Likewise.
10092 (lra_update_insn_regno_info): Likewise.
10094 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10096 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
10097 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
10099 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10101 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
10102 (copy_insn_1): Likewise.
10103 (gen_hard_reg_clobber_high): New gen function.
10104 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
10105 * genemit.c (gen_exp): Likewise.
10106 (gen_emit_seq): Pass through info.
10107 (gen_insn): Check for CLOBBER_HIGH.
10108 (gen_expand): Pass through info.
10109 (gen_split): Likewise.
10110 (output_add_clobbers): Likewise.
10111 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
10112 (remove_clobbers): Likewise.
10113 * rtl.h (gen_hard_reg_clobber_high): New declaration.
10115 2018-08-06 Alan Hayward <alan.hayward@arm.com>
10117 * doc/rtl.texi (clobber_high): Add.
10118 (parallel): Add in clobber high
10119 * rtl.c (rtl_check_failed_code3): Add function.
10120 * rtl.def (CLOBBER_HIGH): Add expression.
10121 * rtl.h (RTL_CHECKC3): Add macro.
10122 (rtl_check_failed_code3): Add declaration.
10123 (XC3EXP): Add macro.
10125 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
10128 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
10129 cfun->machine->max_used_stack_alignment if needed.
10131 2018-08-04 Martin Sebor <msebor@redhat.com>
10133 PR tree-optimization/86571
10134 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
10137 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
10140 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10143 2018-08-03 Jeff Law <law@redhat.com>
10146 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10147 Define to speculation_safe_value_not_needed.
10149 2018-08-03 David Malcolm <dmalcolm@redhat.com>
10151 * doc/gcov.texi (-x): Remove duplicate "to".
10152 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
10153 (-Wif-not-aligned): Remove duplicate "is".
10154 (-flto): Remove duplicate "the".
10155 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
10156 duplicate "v5.00.b".
10157 (MSP430 Options): Remove duplicate "and" from the description
10158 of "-mgprel-sec=regexp".
10159 (x86 Options): Remove duplicate copies of "vmldLog102" and
10160 vmlsLog104 from description of "-mveclibabi=type".
10162 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
10164 * internal-fn.h (first_commutative_argument): Declare.
10165 * internal-fn.c (first_commutative_argument): New function.
10166 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10167 restrictions for pattern statements. Use first_commutative_argument
10168 to look for commutative operands in calls to internal functions.
10170 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
10172 * Makefile.in (wide-int-range.o): New.
10173 * tree-vrp.c: Move all the wide_int_* functions to...
10174 * wide-int-range.cc: ...here.
10175 * tree-vrp.h: Move all the wide_int_* prototypes to...
10176 * wide-int-range.h: ...here.
10178 2018-08-03 Tom de Vries <tdevries@suse.de>
10180 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
10182 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
10183 * except.c (output_function_exception_table): Do early exit if
10184 targetm_common.except_unwind_info (&global_options) == UI_NONE.
10186 2018-08-03 Martin Liska <mliska@suse.cz>
10188 * predict.c (dump_prediction): Change to 2 digits
10191 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
10193 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
10195 (falkor_am_1_gtov_gtov): ... a new insn reservation.
10197 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
10199 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
10200 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
10201 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
10202 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
10203 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
10205 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10207 * diagnostic-show-locus.c (diagnostic_show_locus): Use
10208 pp_take_prefix when saving the existing prefix.
10209 * diagnostic.c (diagnostic_append_note): Likewise.
10210 * langhooks.c (lhd_print_error_function): Likewise.
10211 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10212 param's type. Free the existing prefix.
10213 (pp_take_prefix): New function.
10214 (pretty_printer::pretty_printer): Drop the prefix parameter.
10215 Rename the length parameter to match the comment.
10216 (pretty_printer::~pretty_printer): Free the prefix.
10217 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10219 (struct pretty_printer): Drop the "const" from "prefix" field's
10220 type and clarify memory management.
10221 (pp_set_prefix): Drop the "const" from the 2nd param.
10222 (pp_take_prefix): New decl.
10224 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
10226 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10227 for word_mode_ok here instead of passing as argument.
10228 (expand_block_compare): Change select_block_compare_mode() call.
10229 (expand_strncmp_gpr_sequence): New function.
10230 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10232 2018-08-02 Jeff Law <law@redhat.com>
10235 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10236 Define to speculation_safe_value_not_needed.
10239 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10240 Define to speculation_safe_value_not_needed.
10242 2018-08-02 Tom de Vries <tdevries@suse.de>
10245 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10246 function. Return UI_TARGET unconditionally.
10247 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10248 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10250 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10252 * genemit.c (print_overload_test): Fix typo.
10254 2018-08-02 Richard Biener <rguenther@suse.de>
10256 PR tree-optimization/86816
10257 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10258 which checks for value availability before querying it.
10259 (gvn_uses_equal): Use it.
10260 (same_succ_hash): Likewise.
10261 (gimple_equal_p): Likewise.
10263 2018-08-02 Nick Clifton <nickc@redhat.com>
10266 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10267 Define to speculation_safe_value_not_needed.
10270 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10271 Define to speculation_safe_value_not_needed.
10274 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10275 Define to speculation_safe_value_not_needed.
10278 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10279 Define to speculation_safe_value_not_needed.
10282 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10283 Define to speculation_safe_value_not_needed.
10286 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10287 Define to speculation_safe_value_not_needed.
10290 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10291 Define to speculation_safe_value_not_needed.
10294 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10295 Define to speculation_safe_value_not_needed.
10298 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10299 speculation_safe_value_not_needed.
10302 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10303 to speculation_safe_value_not_needed.
10305 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10307 * doc/md.texi: Expand the documentation of instruction names
10308 to mention port-local uses. Document '@' in pattern names.
10309 * read-md.h (overloaded_instance, overloaded_name): New structs.
10310 (mapping): Declare.
10311 (md_reader::handle_overloaded_name): New member function.
10312 (md_reader::get_overloads): Likewise.
10313 (md_reader::m_first_overload): New member variable.
10314 (md_reader::m_next_overload_ptr): Likewise.
10315 (md_reader::m_overloads_htab): Likewise.
10316 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10317 m_next_overload_ptr and m_overloads_htab.
10318 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10319 (get_mode_token, get_code_token, get_int_token): New functions.
10320 (map_attr_string): Add an optional argument that passes back
10321 the associated iterator.
10322 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10323 (md_reader::handle_overloaded_name, add_overload_instance): New
10325 (apply_iterators): Handle '@' names. Report an error if '@'
10326 is used without iterators.
10327 (initialize_iterators): Initialize the new iterator_group fields.
10328 * genopinit.c (handle_overloaded_code_for)
10329 (handle_overloaded_gen): New functions.
10330 (main): Use them to print declarations of maybe_code_for_* and
10331 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10332 * genemit.c (print_overload_arguments, print_overload_test)
10333 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10334 (main): Use it to print definitions of maybe_code_for_* and
10335 maybe_gen_* functions.
10336 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10337 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10338 instead of explicit mode checks.
10339 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10340 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10341 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10342 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10343 (aarch64_expand_compare_and_swap): Likewise
10344 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10345 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10346 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10347 (aarch64_constant_pool_reload_icode): Delete.
10348 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10349 instead of aarch64_constant_pool_reload_icode. Use
10350 code_for_aarch64_reload_mov instead of explicit mode checks.
10351 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10352 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10353 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10354 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10355 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10356 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10357 (aarch64_atomic_load_op_code): Delete.
10358 (aarch64_emit_atomic_load_op): Likewise.
10359 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10360 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
10361 instead of aarch64_emit_atomic_load_op.
10362 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10363 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10364 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10365 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10366 character before the pattern name.
10367 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10368 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10369 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10370 (aarch64_frecps<mode>): Likewise.
10371 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10372 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10373 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10374 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10375 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10377 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10379 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10380 Allow HFmode constants if TARGET_FP_F16INST.
10382 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
10385 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10386 No longer check last store for clobber of address register.
10388 2018-08-02 Martin Liska <mliska@suse.cz>
10390 PR gcov-profile/86817
10391 * gcov.c (process_all_functions): New function.
10393 (process_file): Move functions processing to
10394 process_all_functions.
10396 2018-08-02 David Malcolm <dmalcolm@redhat.com>
10398 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10399 "const" to the "gimple *" and "rtx_insn *" parameters.
10400 * dumpfile.h (dump_user_location_t::dump_user_location_t):
10402 (dump_location_t::dump_location_t): Likewise.
10404 2018-08-01 Martin Sebor <msebor@redhat.com>
10406 PR tree-optimization/86650
10407 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10408 rather than a "gcall *". Directly pass the data of interest
10409 to percent_K_format, rather than building a temporary CALL_EXPR
10411 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10412 (gimple_fold_builtin_strncat): Adjust.
10413 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10414 gcall* argument with gimple*.
10415 * gimple-ssa-warn-restrict.c (check_call): Same.
10416 (wrestrict_dom_walker::before_dom_children): Same.
10417 (builtin_access::builtin_access): Same.
10418 (check_bounds_or_overlap): Same
10419 (maybe_diag_overlap): Same.
10420 (maybe_diag_offset_bounds): Same.
10421 * tree-diagnostic.c (default_tree_printer): Move usage of
10422 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10424 * tree-pretty-print.c (percent_K_format): Add argument.
10425 * tree-pretty-print.h: Add argument.
10426 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10427 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10428 (maybe_diag_stxncpy_trunc): Same.
10429 (handle_builtin_stxncpy): Same.
10430 (handle_builtin_strcat): Same.
10432 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10434 * match.pd: Optimise pointer range checks.
10436 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10438 PR tree-optimization/86758
10439 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10440 to remove pattern statements.
10442 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10444 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10445 result of dfs_enumerate_from when constructing stmt_vec_infos,
10446 instead of additionally calling get_loop_body.
10448 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10450 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10452 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10453 When creating an iv, assert that the step is not known to be zero.
10454 (vect_setup_realignment): Update call accordingly.
10455 * tree-vect-stmts.c (vectorizable_store): Likewise.
10456 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
10458 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10460 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10461 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10462 (vectorizable_reduction): Likewise.
10463 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10464 (vect_detect_hybrid_slp_stmts): Likewise.
10465 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10467 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
10469 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10470 (wide_int_set_zero_nonzero_bits): ...this.
10471 (zero_nonzero_bits_from_vr): Rename to...
10472 (vrp_set_zero_nonzero_bits): ...this.
10473 (extract_range_from_multiplicative_op_1): Abstract wide int
10475 (wide_int_range_multiplicative_op): ...here.
10476 (extract_range_from_binary_expr_1): Extract wide int binary
10477 operations into their own functions.
10478 (wide_int_range_lshift): New.
10479 (wide_int_range_can_optimize_bit_op): New.
10480 (wide_int_range_shift_undefined_p): New.
10481 (wide_int_range_bit_xor): New.
10482 (wide_int_range_bit_ior): New.
10483 (wide_int_range_bit_and): New.
10484 (wide_int_range_trunc_mod): New.
10485 (extract_range_into_wide_ints): New.
10486 (vrp_shift_undefined_p): New.
10487 (extract_range_from_multiplicative_op): New.
10488 (vrp_can_optimize_bit_op): New.
10489 * tree-vrp.h (value_range::dump): New.
10490 (wide_int_range_multiplicative_op): New.
10491 (wide_int_range_lshift):New.
10492 (wide_int_range_shift_undefined_p): New.
10493 (wide_int_range_bit_xor): New.
10494 (wide_int_range_bit_ior): New.
10495 (wide_int_range_bit_and): New.
10496 (wide_int_range_trunc_mod): New.
10497 (zero_nonzero_bits_from_bounds): Rename to...
10498 (wide_int_set_zero_nonzero_bits): ...this.
10499 (zero_nonzero_bits_from_vr): Rename to...
10500 (vrp_set_zero_nonzero_bits): ...this.
10501 (range_easy_mask_min_max): Rename to...
10502 (wide_int_range_can_optimize_bit_op): this.
10503 * vr-values.c (simplify_bit_ops_using_ranges): Rename
10504 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10506 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10508 * tree-vectorizer.h (vect_orig_stmt): New function.
10509 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10510 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10511 (vect_create_epilog_for_reduction): Likewise.
10512 (vectorizable_live_operation): Likewise.
10513 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10514 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10515 * tree-vect-stmts.c (vectorizable_call): Likewise.
10516 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10518 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10520 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10522 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10523 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10524 (vect_transform_loop): Likewise.
10525 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10527 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10529 * tree-vectorizer.h (vect_schedule_slp): Return void.
10530 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10531 (vect_schedule_slp): Likewise.
10533 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10535 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10537 (vect_transform_loop): Update calls accordingly. Schedule SLP
10538 instances before the main loop, if any exist.
10540 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10542 PR tree-optimization/86749
10543 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10544 If the lhs is used in a COND_EXPR, check that it is being used
10545 as the "then" or "else" value.
10547 2018-08-01 Tom de Vries <tdevries@suse.de>
10550 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10551 speculation_safe_value_not_needed.
10553 2018-08-01 Richard Biener <rguenther@suse.de>
10555 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10556 as base and offset.
10558 2018-08-01 Martin Liska <mliska@suse.cz>
10560 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10561 format how successful transformation is dumped.
10562 (gimple_mod_pow2_value_transform): Likewise.
10563 (gimple_mod_subtract_transform): Likewise.
10564 (gimple_stringops_transform): Likewise.
10566 2018-08-01 Martin Liska <mliska@suse.cz>
10568 PR value-prof/35543
10569 * value-prof.c (interesting_stringop_to_profile_p):
10570 Simplify the code and add BUILT_IN_MEMMOVE.
10571 (gimple_stringops_transform): Likewise.
10573 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10575 * config/aarch64/aarch64-simd.md
10576 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10577 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10578 use GPI iterator instead of SI mode.
10580 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10582 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10583 rs6000_speculation_barrier.
10584 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10585 new barrier pattern name.
10587 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10589 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10590 (speculation_barrier): New insn.
10592 2018-08-01 Richard Biener <rguenther@suse.de>
10595 * graphite.h: Include isl/id.h and isl/space.h to allow build
10598 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
10601 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10602 mode for COFF targets.
10603 * defaults.h (TARGET_COFF): Define.
10604 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10605 TARGET_COFF): Define.
10606 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10607 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10608 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10610 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10612 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10613 * gimple-streamer-out.c (output_bb): Save it.
10614 * lto-streamer-in.c (input_struct_function_base): Restore
10615 instance discriminator if available. Create map on demand.
10616 * lto-streamer-out.c (output_struct_function_base): Save it if
10618 * final.c (decl_to_instance_map): Document LTO strategy.
10620 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10621 Olivier Hainque <hainque@adacore.com>
10623 * debug.h (decl_to_instance_map_t): New type.
10624 (decl_to_instance_map): Declare.
10625 (maybe_create_decl_to_instance_map): New inline function.
10626 * final.c (bb_discriminator, last_bb_discriminator): New statics,
10627 to track basic block discriminators.
10628 (final_start_function_1): Initialize them.
10629 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10631 (decl_to_instance_map): New variable.
10632 (map_decl_to_instance, maybe_set_discriminator): New functions.
10633 (notice_source_line): Set discriminator.
10635 2018-07-31 Ian Lance Taylor <iant@golang.org>
10637 * targhooks.c (default_have_speculation_safe_value): Add
10640 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10642 * dump-context.h: Include "pretty-print.h".
10643 (dump_context::refresh_dumps_are_enabled): New decl.
10644 (dump_context::emit_item): New decl.
10645 (class dump_context): Add fields "m_test_pp" and
10647 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10648 (temp_dump_context::get_dumped_text): New decl.
10649 (class temp_dump_context): Add field "m_pp".
10650 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10651 (dump_context::refresh_dumps_are_enabled): ...and add a test for
10653 (set_dump_file): Update for above change.
10654 (set_alt_dump_file): Likewise.
10655 (dump_loc): New overload, taking a pretty_printer *.
10656 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
10657 to any test pretty-printer.
10658 (make_item_for_dump_gimple_stmt): New function, adapted from
10659 optinfo::add_gimple_stmt.
10660 (dump_context::dump_gimple_stmt): Call it, and use the result,
10661 eliminating the direct usage of dump_file and alt_dump_file in
10662 favor of indirectly using them via emit_item.
10663 (make_item_for_dump_gimple_expr): New function, adapted from
10664 optinfo::add_gimple_expr.
10665 (dump_context::dump_gimple_expr): Call it, and use the result,
10666 eliminating the direct usage of dump_file and alt_dump_file in
10667 favor of indirectly using them via emit_item.
10668 (make_item_for_dump_generic_expr): New function, adapted from
10670 (dump_context::dump_generic_expr): Call it, and use the result,
10671 eliminating the direct usage of dump_file and alt_dump_file in
10672 favor of indirectly using them via emit_item.
10673 (make_item_for_dump_printf_va): New function, adapted from
10674 optinfo::add_printf_va.
10675 (make_item_for_dump_printf): New function.
10676 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10677 and use the result, eliminating the direct usage of dump_file and
10678 alt_dump_file in favor of indirectly using them via emit_item.
10679 (make_item_for_dump_dec): New function.
10680 (dump_context::dump_dec): Call it, and use the result,
10681 eliminating the direct usage of dump_file and alt_dump_file in
10682 favor of indirectly using them via emit_item.
10683 (make_item_for_dump_symtab_node): New function, adapted from
10684 optinfo::add_symtab_node.
10685 (dump_context::dump_symtab_node): Call it, and use the result,
10686 eliminating the direct usage of dump_file and alt_dump_file in
10687 favor of indirectly using them via emit_item.
10688 (dump_context::begin_scope): Reimplement, avoiding direct usage
10689 of dump_file and alt_dump_file in favor of indirectly using them
10691 (dump_context::emit_item): New member function.
10692 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10693 Set up test pretty-printer on the underlying context. Call
10694 refresh_dumps_are_enabled.
10695 (temp_dump_context::~temp_dump_context): Call
10696 refresh_dumps_are_enabled.
10697 (temp_dump_context::get_dumped_text): New member function.
10698 (selftest::verify_dumped_text): New function.
10699 (ASSERT_DUMPED_TEXT_EQ): New macro.
10700 (selftest::test_capture_of_dump_calls): Run all tests twice, with
10701 and then without optinfo enabled. Add uses of
10702 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
10703 * dumpfile.h: Update comment for the dump_* API.
10704 * optinfo-emit-json.cc
10705 (selftest::test_building_json_from_dump_calls): Update for new
10706 param for temp_dump_context ctor.
10707 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10708 and "m_owned" field.
10709 (optinfo_item::~optinfo_item): Likewise.
10710 (optinfo::add_item): New member function.
10711 (optinfo::emit): Update comment.
10712 (optinfo::add_string): Delete.
10713 (optinfo::add_printf): Delete.
10714 (optinfo::add_printf_va): Delete.
10715 (optinfo::add_gimple_stmt): Delete.
10716 (optinfo::add_gimple_expr): Delete.
10717 (optinfo::add_tree): Delete.
10718 (optinfo::add_symtab_node): Delete.
10719 (optinfo::add_dec): Delete.
10720 * optinfo.h (class dump_context): New forward decl.
10721 (optinfo::add_item): New decl.
10722 (optinfo::add_string): Delete.
10723 (optinfo::add_printf): Delete.
10724 (optinfo::add_printf_va): Delete.
10725 (optinfo::add_gimple_stmt): Delete.
10726 (optinfo::add_gimple_expr): Delete.
10727 (optinfo::add_tree): Delete.
10728 (optinfo::add_symtab_node): Delete.
10729 (optinfo::add_dec): Delete.
10730 (optinfo::add_poly_int): Delete.
10731 (optinfo_item::optinfo_item): Remove "owned" param.
10732 (class optinfo_item): Remove field "m_owned".
10734 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10736 PR middle-end/86705
10737 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10738 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10739 requested variable alignment.
10740 (expand_one_ssa_partition): Likewise.
10741 (expand_one_var): Likewise.
10743 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10745 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10746 to speculation_safe_value_not_needed.
10748 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10750 * targhooks.h (speculation_safe_value_not_needed): New prototype.
10751 * targhooks.c (speculation_safe_value_not_needed): New function.
10752 * target.def (have_speculation_safe_value): Update documentation.
10753 * doc/tm.texi: Regenerated.
10755 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10757 * config/aarch64/iterators.md (ALLI_TI): New iterator.
10758 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10760 (despeculate_copy<ALLI:mode>_insn): New insn.
10761 (despeculate_copyti_insn): New insn.
10762 (despeculate_simple<ALLI:mode>): New insn
10763 (despeculate_simpleti): New insn.
10764 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10766 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10767 aarch64_speculation_safe_value.
10768 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10770 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10772 * config/aarch64/aarch64-speculation.cc: New file.
10773 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10774 before pass_reorder_blocks.
10775 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10777 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10778 X14 and X15 when tracking speculation.
10779 * config/aarch64/aarch64.md (register name constants): Add
10780 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10781 (unspec): Add UNSPEC_SPECULATION_TRACKER.
10782 (speculation_barrier): New insn attribute.
10783 (cmp<mode>): Allow SP in comparisons.
10784 (speculation_tracker): New insn.
10785 (speculation_barrier): Add speculation_barrier attribute.
10786 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10787 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10788 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10790 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10792 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10793 aarch64_track_speculation is true.
10794 (tb<optab><mode>1): Likewise.
10795 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10796 generate CB[N]Z when tracking speculation.
10797 (aarch64_split_compare_and_swap): Likewise.
10798 (aarch64_split_atomic_op): Likewise.
10800 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10802 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10804 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10806 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10807 (speculation_barrier): New insn.
10809 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10811 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10812 * config/arm/arm.md (speculation_barrier): New expand.
10813 (speculation_barrier_insn): New pattern.
10815 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10817 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10818 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10819 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10820 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10822 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10823 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10824 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10825 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10826 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10827 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10828 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10829 * builtins.c (expand_speculation_safe_value): New function.
10830 (expand_builtin): Call it.
10831 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10832 * doc/extend.texi: Document __builtin_speculation_safe_value.
10833 * doc/md.texi: Document "speculation_barrier" pattern.
10834 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10835 TARGET_HAVE_SPECULATION_SAFE_VALUE.
10836 * doc/tm.texi: Regenerated.
10837 * target.def (have_speculation_safe_value, speculation_safe_value): New
10839 * targhooks.c (default_have_speculation_safe_value): New function.
10840 (default_speculation_safe_value): New function.
10841 * targhooks.h (default_have_speculation_safe_value): Add prototype.
10842 (default_speculation_safe_value): Add prototype.
10844 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10846 * dump-context.h (dump_context::dump_loc): New decl.
10847 * dumpfile.c (dump_context::dump_loc): New member function.
10848 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10849 and dump_gimple_stmt.
10850 (dump_context::dump_gimple_expr_loc): Likewise, using
10852 (dump_context::dump_generic_expr_loc): Likewise, using
10854 (dump_context::dump_printf_loc_va): Likewise, using
10856 (dump_context::begin_scope): Explicitly using the global function
10857 "dump_loc", rather than the member function.
10859 2018-07-31 Martin Sebor <msebor@redhat.com>
10861 PR tree-optimization/86741
10862 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10864 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
10866 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10867 depend on whether prefetch instructions will be emitted or not.
10868 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10869 will be emitted or not.
10870 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10871 (TARGET_SETMEM_PFD): New macros.
10873 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10875 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10876 (NULL_STMT_VEC_INFO): Delete.
10877 (stmt_vec_info::operator*): Likewise.
10878 (stmt_vec_info::operator gimple *): Likewise.
10879 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10880 of NULL_STMT_VEC_INFO.
10881 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10882 (vect_reassociating_reduction_p): Likewise.
10883 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10884 (vectorizable_store): Likewise.
10885 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10886 (vec_info::free_stmt_vec_infos): Likewise.
10888 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10890 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10891 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10893 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10895 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10896 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10897 (vec_info::free_stmt_vec_info): New private member functions.
10898 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10899 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10900 * tree-parloops.c (gather_scalar_reductions): Remove calls to
10901 set_stmt_vec_info_vec and free_stmt_vec_infos.
10902 * tree-vect-loop.c (_loop_vec_info): Remove call to
10903 set_stmt_vec_info_vec.
10904 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10905 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10906 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10907 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10908 (vec_info::free_stmt_vec_info): ...these new functions. Remove
10909 assignments in {vec_info::,}new_stmt_vec_info that are redundant
10910 with the clearing in the xcalloc.
10911 (stmt_vec_info_vec): Delete.
10912 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10913 (vectorize_loops): Likewise.
10914 (vec_info::~vec_info): Remove argument from call to
10915 free_stmt_vec_infos.
10916 (vec_info::add_stmt): Remove vinfo argument from call to
10919 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10921 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10922 rather than a gimple stmt.
10923 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
10924 information for pattern statements when passed the original
10925 statement; instead wait to be passed the pattern statement itself.
10926 Don't call set_vinfo_for_stmt here.
10927 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10928 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10929 stmt_vec_infos here.
10930 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10931 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10932 stmt_vec_infos entry.
10934 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10936 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10937 * tree-vectorizer.c (vec_info::replace_stmt): New function.
10938 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10939 * tree-vect-stmts.c (vectorizable_call): Likewise.
10940 (vectorizable_simd_clone_call): Likewise.
10942 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10944 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10945 * tree-vectorizer.c (vec_info::remove_stmt): New function.
10946 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10947 * tree-vect-loop.c (vect_transform_loop): Likewise.
10948 * tree-vect-slp.c (vect_schedule_slp): Likewise.
10949 * tree-vect-stmts.c (vect_remove_stores): Likewise.
10951 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10953 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10954 (vect_dr_stmt): Delete.
10955 * tree-vectorizer.c (vec_info::lookup_dr): New function.
10956 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10958 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10959 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10960 (vect_verify_datarefs_alignment, vect_peeling_supportable)
10961 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10962 (vect_analyze_data_refs): Likewise.
10963 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
10965 (vect_find_same_alignment_drs): Likewise.
10966 (vect_slp_analyze_node_dependences): Update calls accordingly.
10967 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10968 instead of DR_VECT_AUX.
10969 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10970 of a vector data references. Use vec_info::lookup_dr instead of
10972 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10973 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10974 instead of DR_VECT_AUX.
10976 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10978 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10980 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10982 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10983 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10984 (vect_gen_prolog_loop_niters): Likewise.
10986 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10988 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10989 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10990 (vect_known_alignment_in_bytes, vect_dr_behavior)
10991 (vect_get_scalar_dr_size): Take references as dr_vec_infos
10992 instead of data_references. Update calls to other routines for
10993 which the same change has been made.
10994 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10995 dr_vec_infos instead of stmt_vec_infos.
10996 (vect_analyze_data_ref_dependence): Update call accordingly.
10997 (vect_slp_analyze_data_ref_dependence)
10998 (vect_record_base_alignments): Use DR_VECT_AUX.
10999 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
11000 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
11001 (vector_alignment_reachable_p, vect_get_data_access_cost)
11002 (vect_peeling_supportable, vect_analyze_group_access_1)
11003 (vect_analyze_group_access, vect_analyze_data_ref_access)
11004 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
11005 (vect_compile_time_alias, vect_small_gap_p)
11006 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
11007 (vect_supportable_dr_alignment): Take references as dr_vec_infos
11008 instead of data_references. Update calls to other routines for
11009 which the same change has been made.
11010 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
11011 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11012 (vect_slp_analyze_and_verify_node_alignment)
11013 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11014 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11015 (vect_setup_realignment): Use dr_vec_infos. Update calls after
11017 (_vect_peel_info::dr): Replace with...
11018 (_vect_peel_info::dr_info): ...this new field.
11019 (vect_peeling_hash_get_most_frequent)
11020 (vect_peeling_hash_choose_best_peeling): Update accordingly.
11021 (vect_peeling_hash_get_lowest_cost):
11022 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
11023 routines for which the same change has been made.
11024 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
11026 * tree-vect-loop-manip.c (get_misalign_in_elems)
11027 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
11029 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11030 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
11031 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
11032 (get_group_load_store_type, get_negative_load_store_type)
11033 (vect_get_data_ptr_increment, vectorizable_store)
11034 (vectorizable_load): Likewise.
11035 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
11036 Update calls to other routines for which the same change has been made.
11038 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11040 * tree-vectorizer.h (vec_info::move_dr): New member function.
11041 (dataref_aux): Rename to...
11042 (dr_vec_info): ...this and add "dr" and "stmt" fields.
11043 (_stmt_vec_info::dr_aux): Update accordingly.
11044 (_stmt_vec_info::data_ref_info): Delete.
11045 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
11046 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
11047 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
11048 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
11050 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
11051 (STMT_VINFO_DR_INFO): New macro.
11052 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
11053 (set_dr_misalignment): Update after rename of dataref_aux.
11054 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
11055 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
11056 initialization of STMT_VINFO_DATA_REF.
11057 * tree-vectorizer.c (vec_info::move_dr): New function.
11058 * tree-vect-patterns.c (vect_recog_bool_pattern)
11059 (vect_recog_mask_conversion_pattern)
11060 (vect_recog_gather_scatter_pattern): Use it.
11061 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
11062 the "dr" and "stmt" fields of dr_vec_info instead of
11063 STMT_VINFO_DATA_REF.
11065 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11067 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
11068 (is_pattern_stmt_p): Use it.
11069 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
11070 on pattern statements.
11072 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11074 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
11075 original stmt as a stmt_vec_info rather than a gimple stmt.
11076 (vect_pattern_recog_1): Take the statement directly as a
11077 stmt_vec_info, rather than via a gimple_stmt_iterator.
11078 Update call to vect_mark_pattern_stmts.
11079 (vect_pattern_recog): Update calls accordingly.
11081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11083 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
11084 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
11085 a vect_def_type for the first argument.
11086 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
11087 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
11088 operand if it isn't defined by a vectorized statement.
11089 (vect_build_gather_load_calls): Remove the mask_dt argument and
11090 update calls to vect_get_vec_def_for_stmt_copy.
11091 (vectorizable_bswap): Likewise the dt argument.
11092 (vectorizable_call): Update calls to vectorizable_bswap and
11093 vect_get_vec_def_for_stmt_copy.
11094 (vectorizable_simd_clone_call, vectorizable_assignment)
11095 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
11096 (vectorizable_comparison): Update calls to
11097 vect_get_vec_def_for_stmt_copy.
11098 (vectorizable_store): Likewise. Remove now-unnecessary calls to
11099 vect_is_simple_use.
11100 (vect_get_loop_based_defs): Remove dt argument and update call
11101 to vect_get_vec_def_for_stmt_copy.
11102 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
11103 and vect_get_vec_def_for_stmt_copy.
11104 (vectorizable_load): Update calls to vect_build_gather_load_calls
11105 and vect_get_vec_def_for_stmt_copy.
11106 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11107 (vectorizable_reduction, vectorizable_live_operation): Update calls
11108 to vect_get_vec_def_for_stmt_copy.
11110 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11112 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
11113 and gimple stmt arguments with a stmt_vec_info.
11114 (vect_record_base_alignments): Update calls accordingly.
11115 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
11116 and gimple stmt arguments with a stmt_vec_info.
11117 (vect_build_slp_tree_1): Remove vinfo argument and update call
11118 to vect_record_max_nunits.
11119 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11120 and vect_record_max_nunits.
11122 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11124 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
11125 file and take a stmt_vec_info instead of a gimple stmt.
11126 (supportable_widening_operation, vect_finish_replace_stmt)
11127 (vect_finish_stmt_generation, vect_get_store_rhs)
11128 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
11129 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
11130 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
11131 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
11132 (vect_create_data_ref_ptr, bump_vector_ptr)
11133 (vect_permute_store_chain, vect_setup_realignment)
11134 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
11135 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
11136 (vectorizable_reduction, vectorizable_induction)
11137 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
11138 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
11139 than gimple stmts as arguments.
11140 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
11141 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
11142 (can_group_stmts_p, vect_check_gather_scatter)
11143 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11144 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
11145 (vect_permute_load_chain, vect_shift_permute_load_chain)
11146 (vect_transform_grouped_load)
11147 (vect_record_grouped_load_vectors): Likewise.
11148 * tree-vect-loop.c (vect_fixup_reduc_chain)
11149 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
11150 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
11151 (vectorizable_reduction, vectorizable_induction)
11152 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
11153 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
11154 (vect_get_load_store_mask): Likewise.
11155 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
11156 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
11157 * tree-vect-stmts.c (vect_mark_relevant)
11158 (is_simple_and_all_uses_invariant)
11159 (exist_non_indexing_operands_for_use_p, process_use)
11160 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
11161 (vect_get_vec_def_for_operand, vect_get_vec_defs)
11162 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
11163 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
11164 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
11165 (get_negative_load_store_type, get_load_store_type)
11166 (vect_check_load_store_mask, vect_check_store_rhs)
11167 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11168 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11169 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11170 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11171 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11172 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
11173 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
11174 (supportable_widening_operation): Likewise.
11176 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11178 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
11179 a stmt_vec_info instead of a gcall.
11180 (vect_check_gather_scatter): Update call accordingly.
11181 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
11183 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
11184 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
11185 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
11186 instead of a gimple stmt.
11187 (vect_transform_loop): Update calls accordingly.
11188 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
11189 stmt_vec_infos instead of gimple stmts.
11190 (vect_analyze_slp_instance): Update use accordingly.
11191 * tree-vect-stmts.c (read_vector_array, write_vector_array)
11192 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
11193 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
11194 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
11195 (vect_gen_widened_results_half, vect_get_loop_based_defs)
11196 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
11197 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
11198 down to subroutines.
11200 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11202 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
11203 of the worklist from a vector of gimple stmts to a vector of
11205 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11206 (vect_mark_stmts_to_be_vectorized): Likewise
11208 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11210 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11211 statement before passing it to vect_analyze_stmt.
11212 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11213 the chain of phi vector definitions. Track the exit phi via its
11215 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11216 STMT_VINFO_REDUC_DEF.
11217 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11218 stmt_vec_infos to handle the statement chains.
11219 (vect_get_slp_defs): Record the first statement in the node
11220 using a stmt_vec_info.
11221 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11222 statements here and pass their stmt_vec_info down to subroutines.
11223 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11224 down to vect_finish_stmt_generation.
11225 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11226 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11227 stmt_vec_infos to subroutines.
11228 (vect_remove_stores): Use stmt_vec_infos to handle the statement
11231 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11233 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11234 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11235 (vect_permute_store_chain, vect_setup_realignment)
11236 (vect_permute_load_chain, vect_shift_permute_load_chain)
11237 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11238 stmts internally, and when passing values to other vectorizer routines.
11239 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11240 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11241 (vect_analyze_loop_operations, get_initial_def_for_reduction)
11242 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11243 (vectorizable_reduction, vectorizable_induction)
11244 (vectorizable_live_operation, vect_transform_loop_stmt)
11245 (vect_transform_loop): Likewise.
11246 * tree-vect-patterns.c (vect_reassociating_reduction_p)
11247 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11248 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11249 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11250 (vect_slp_analyze_node_operations_1): Likewise.
11251 * tree-vect-stmts.c (vect_mark_relevant, process_use)
11252 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11253 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11254 (vect_finish_stmt_generation_1, get_group_load_store_type)
11255 (get_load_store_type, vect_build_gather_load_calls)
11256 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11257 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11258 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11259 (vectorizable_store, vectorizable_load, vectorizable_condition)
11260 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11261 (supportable_widening_operation): Likewise.
11262 (vect_get_vector_types_for_stmt): Likewise.
11263 * tree-vectorizer.h (vect_dr_behavior): Likewise.
11265 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11267 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11268 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11269 (vect_permute_store_chain, vect_permute_load_chain)
11270 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11271 repeated stmt_vec_info lookups.
11272 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11273 (vect_update_ivs_after_vectorizer): Likewise.
11274 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11275 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11276 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11277 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11278 (vect_bb_slp_scalar_cost): Likewise.
11279 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11281 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11283 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11284 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11285 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11286 to get gassigns and gcalls, rather than operating on generc gimple
11288 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11289 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11290 (vectorizable_load, vect_analyze_stmt): Likewise.
11291 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11293 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11295 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11296 return stmt_vec_infos rather than gimple stmts. Do not accept
11298 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11300 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11301 Update use of get_later_stmt.
11302 (vect_get_constant_vectors): Update call accordingly.
11303 (vect_schedule_slp_instance): Likewise
11304 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11305 (vect_slp_analyze_instance_dependence): Likewise.
11306 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11310 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11311 (stmt_info_for_cost::stmt_info): ...this new field.
11312 (add_stmt_costs): Update accordingly.
11313 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11314 (vect_get_known_peeling_cost): Likewise.
11315 (vect_estimate_min_profitable_iters): Likewise.
11316 * tree-vect-stmts.c (record_stmt_cost): Likewise.
11318 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11320 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11321 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11322 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11324 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11326 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11328 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11329 a gimple stmt to a stmt_vec_info.
11330 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11332 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11334 * tree-vectorizer.h (vec_info::grouped_stores): Change from
11335 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11336 (_loop_vec_info::reduction_chains): Likewise.
11337 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11339 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11341 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11343 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11344 a gimple stmt to a stmt_vec_info.
11345 (_stmt_vec_info::next_element): Likewise.
11346 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11347 (vect_slp_analyze_and_verify_node_alignment)
11348 (vect_analyze_group_access_1, vect_analyze_group_access)
11349 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11350 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11351 (vect_supportable_dr_alignment): Update accordingly.
11352 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11353 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11354 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11355 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11356 * tree-vect-slp.c (vect_build_slp_tree_1)
11357 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11358 (vect_split_slp_store_group, vect_analyze_slp_instance)
11359 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11360 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11361 (get_group_load_store_type, get_load_store_type)
11362 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11363 (vect_transform_stmt, vect_remove_stores): Likewise.
11365 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11367 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11368 than a gimple stmt.
11369 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11370 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11371 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11372 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11373 (vector_alignment_reachable_p, vect_get_data_access_cost)
11374 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11375 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11376 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11377 (vect_analyze_group_access_1, vect_analyze_group_access)
11378 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11379 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11380 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11381 result of vect_dr_stmt and use the stmt_vec_info instead of
11382 the associated gimple stmt.
11383 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11384 (vect_gen_prolog_loop_niters): Likewise.
11385 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11387 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11389 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11390 to a vec<stmt_vec_info>.
11391 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11392 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11393 vec<stmt_vec_info>.
11394 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11395 to a vec<stmt_vec_info>.
11396 (bst_traits::value_type, bst_traits::value_type): Likewise.
11397 (bst_traits::hash): Update accordingly.
11398 (vect_get_and_check_slp_defs): Change the stmts parameter from
11399 a vec<gimple *> to a vec<stmt_vec_info>.
11400 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11401 (vect_build_slp_tree): Likewise.
11402 (vect_build_slp_tree_2): Likewise. Update uses of
11403 SLP_TREE_SCALAR_STMTS.
11404 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11405 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11406 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11407 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11408 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11409 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11410 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11411 (vect_get_constant_vectors, vect_get_slp_defs)
11412 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11413 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11414 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11415 instead of gimple stmts.
11416 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11417 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11418 (vect_slp_analyze_instance_dependence): Update uses of
11419 SLP_TREE_SCALAR_STMTS.
11420 (vect_slp_analyze_and_verify_node_alignment): Likewise.
11421 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11422 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11423 (get_initial_defs_for_reduction): Likewise.
11424 (vect_create_epilog_for_reduction): Likewise.
11425 (vectorize_fold_left_reduction): Likewise.
11426 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11427 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11428 (can_vectorize_live_stmts): Likewise.
11430 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11432 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11433 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11434 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11436 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11438 (gather_scalar_reductions): Update after above interface changes.
11439 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11440 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11442 (vect_force_simple_reduction): Likewise.
11443 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11444 LOOP_VINFO_REDUCTIONS.
11445 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11447 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11449 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11450 a gimple stmt to a stmt_vec_info.
11451 * tree-vect-loop.c (vect_active_double_reduction_p)
11452 (vect_force_simple_reduction, vectorizable_reduction): Update
11455 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11457 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11458 vec<gimple *> to a vec<stmt_vec_info>.
11459 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11460 the reduction_phis argument from a vec<gimple *> to a
11461 vec<stmt_vec_info>.
11462 (vectorizable_reduction): Likewise the phis local variable that
11463 is passed to vect_create_epilog_for_reduction. Update for new type
11464 of SLP_TREE_VEC_STMTS.
11465 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11466 (vectorizable_live_operation): Likewise.
11467 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11468 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11470 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11472 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11473 a gimple stmt to a stmt_vec_info.
11474 (vectorizable_condition, vectorizable_live_operation)
11475 (vectorizable_reduction, vectorizable_induction): Pass back the
11476 vectorized statement as a stmt_vec_info.
11477 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11478 use of STMT_VINFO_VEC_STMT.
11479 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11480 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11481 as stmt_vec_infos rather than gimple stmts.
11482 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11483 to a stmt_vec_info.
11484 (vectorizable_live_operation): Likewise.
11485 (vectorizable_reduction, vectorizable_induction): Likewise,
11486 updating use of STMT_VINFO_VEC_STMT.
11487 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11488 of STMT_VINFO_VEC_STMT.
11489 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11490 (vectorizable_simd_clone_call, vectorizable_conversion)
11491 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11492 (vectorizable_store, vectorizable_load, vectorizable_condition)
11493 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11494 from a gimple stmt to a stmt_vec_info.
11495 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
11496 pointer to a stmt_vec_info to the vectorizable_* routines.
11498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11500 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11501 a gimple stmt to a stmt_vec_info.
11502 (is_pattern_stmt_p): Update accordingly.
11503 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11504 (vect_record_grouped_load_vectors): Likewise.
11505 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11506 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11507 (vect_model_reduction_cost): Likewise.
11508 (vect_create_epilog_for_reduction): Likewise.
11509 (vectorizable_reduction, vectorizable_induction): Likewise.
11510 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11511 Return the stmt_vec_info for the pattern statement.
11512 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11513 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11514 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11515 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11516 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11517 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11518 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11519 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11521 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11523 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11524 (vect_finish_stmt_generation): Likewise.
11525 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11526 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11527 (vect_build_gather_load_calls): Use the return value of the above
11528 functions instead of a separate call to vinfo_for_stmt. Use narrow
11529 scopes for the input gimple stmt and wider scopes for the associated
11530 stmt_vec_info. Use vec_info::lookup_def when setting these
11531 stmt_vec_infos from an SSA_NAME definition.
11532 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11533 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11534 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11535 (vectorizable_store, vectorizable_load, vectorizable_condition)
11536 (vectorizable_comparison): Likewise.
11537 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11538 (vectorizable_reduction): Likewise.
11540 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11542 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11543 stmt_vec_info * parameter before the optional gimple **.
11544 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11545 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11546 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11547 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11548 (vectorizable_live_operation): Likewise.
11549 * tree-vect-patterns.c (type_conversion_p): Likewise.
11550 (vect_look_through_possible_promotion): Likewise.
11551 (vect_recog_rotate_pattern): Likewise.
11552 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11556 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11557 a typedef to a wrapper class.
11558 (NULL_STMT_VEC_INFO): New macro.
11559 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11560 (stmt_vec_info::operator*): New function.
11561 (stmt_vec_info::operator gimple *): Likewise.
11562 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11563 (add_stmt_costs): Likewise.
11564 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11565 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11566 (vect_get_known_peeling_cost): Likewise.
11567 (vect_estimate_min_profitable_iters): Likewise.
11568 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11569 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11570 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11571 (vectorizable_store, free_stmt_vec_infos): Likewise.
11572 (new_stmt_vec_info): Change return type of xcalloc to
11575 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11577 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11578 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11579 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11580 a single_imm_use-based sequence.
11581 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11583 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11585 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11586 * tree-vectorizer.c (vec_info::lookup_def): New function.
11587 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11588 (vect_widened_op_tree): Likewise.
11589 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11590 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11591 (vectorizable_reduction): Likewise.
11592 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11594 (vect_is_slp_reduction): Update calls accordingly. Use
11595 vec_info::lookup_def.
11596 (vect_is_simple_reduction): Likewise
11597 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11599 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11601 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11602 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11603 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11605 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11606 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11607 (vect_update_vf_for_slp, vect_analyze_loop_operations)
11608 (vect_is_slp_reduction, vectorizable_induction)
11609 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11610 * tree-vect-patterns.c (vect_init_pattern_stmt):
11611 (vect_determine_min_output_precision_1, vect_determine_precisions)
11612 (vect_pattern_recog): Likewise.
11613 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11614 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11615 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11616 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11617 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11618 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
11619 info field from a loop to a loop_vec_info.
11621 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11623 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11624 (vec_info::add_stmt): Declare.
11625 * tree-vectorizer.c (vec_info::add_stmt): New function.
11626 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11627 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11628 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11629 (vectorizable_induction): Likewise.
11630 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11631 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11632 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11633 (vectorizable_load): Likewise.
11634 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11635 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11636 (vect_recog_gather_scatter_pattern): Likewise.
11637 (append_pattern_def_seq): Likewise. Remove a check that is
11638 performed by add_stmt itself.
11640 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11642 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11643 which make_ssa_name was called with new_stmt before new_stmt
11646 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11648 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11650 (vect_is_slp_reduction): ...here...
11651 (vect_is_simple_reduction): ...and here. Remove repetition of tests
11652 that are already known to be false.
11654 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11656 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11657 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
11658 STMT_VINFO_NUM_SLP_USES when it's true.
11659 (vect_free_slp_instance): Add a final_p parameter and pass it to
11660 vect_free_slp_tree.
11661 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11662 (vect_analyze_slp_instance): Likewise.
11663 (vect_slp_analyze_operations): Likewise.
11664 (vect_slp_analyze_bb_1): Likewise.
11665 * tree-vectorizer.c (vec_info): Likewise.
11666 * tree-vect-loop.c (vect_transform_loop): Likewise.
11668 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11670 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11671 function is not called for second and subsequent members of
11674 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11676 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11677 cases for nested loops from here to ...
11678 (vect_create_epilog_for_reduction): ...here. Only call
11679 vect_is_simple_use for inner-loop reductions.
11681 2018-07-31 Martin Liska <mliska@suse.cz>
11683 PR gcov-profile/85338
11684 PR gcov-profile/85350
11685 PR gcov-profile/85372
11686 * profile.c (struct location_triplet): New.
11687 (struct location_triplet_hash): Likewise.
11688 (output_location): Do not output a BB that
11689 is already recorded for a line.
11690 (branch_prob): Use streamed_locations.
11692 2018-07-31 Martin Liska <mliska@suse.cz>
11694 PR gcov-profile/85370
11695 * coverage.c (coverage_begin_function): Do not mark target
11696 clones as artificial functions.
11698 2018-07-31 Martin Liska <mliska@suse.cz>
11700 PR gcov-profile/83813
11701 PR gcov-profile/84758
11702 PR gcov-profile/85217
11703 PR gcov-profile/85332
11704 * profile.c (branch_prob): Do not record GOTO expressions
11705 for GIMPLE statements which locations are already streamed.
11707 2018-07-31 Olivier Hainque <hainque@adacore.com>
11709 * gcc.c (handle_spec_function): Accept a soft_matched_part
11710 argument, as do_spec_1. Pass it down to ...
11711 (eval_spec_function): Accept a soft_matched_part argument,
11712 and pass it down to ...
11713 (do_spec_2): Accept a soft_matched_part argument, and pass
11714 it down to do_spec_1.
11715 (do_spec_1): Pass soft_matched_part to handle_spec_function.
11716 (handle_braces): Update call to handle_spec_function.
11717 (driver::set_up_specs): Update calls to do_spec_2.
11718 (compare_debug_dump_opt_spec_function): Likewise.
11719 (compare_debug_self_opt_spec_function): Likewise.
11721 2018-07-31 Olivier Hainque <hainque@adacore.com>
11723 * common.opt (nolibc): New option.
11724 * doc/invoke.texi (Link Options): Document it.
11725 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11726 * config/alpha/linux.h: Likewise.
11727 * config/arc/elf.h: Likewise.
11728 * config/arm/uclinux-elf.h: Likewise.
11729 * config/arm/unknown-elf.h: Likewise.
11730 * config/avr/avrlibc.h: Likewise.
11731 * config/bfin/bfin.h: Likewise.
11732 * config/bfin/linux.h: Likewise.
11733 * config/bfin/uclinux.h: Likewise.
11734 * config/darwin.h: Likewise.
11735 * config/darwin10.h: Likewise.
11736 * config/darwin12.h: Likewise.
11737 * config/gnu-user.h: Likewise.
11738 * config/lm32/uclinux-elf.h: Likewise.
11739 * config/pa/pa-hpux11.h: Likewise.
11740 * config/pa/pa64-hpux.h: Likewise.
11741 * config/sparc/sparc.h: Likewise.
11743 2018-07-31 Olivier Hainque <hainque@adacore.com>
11745 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11746 undefined variables.
11748 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11751 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11752 instead of GEN_INT.
11754 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11756 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11757 terminated string literal.
11759 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11761 PR rtl-optimization/85160
11762 * combine.c (is_just_move): New function.
11763 (try_combine): Allow combining two instructions into two if neither of
11764 the original instructions was a move.
11766 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
11769 * doc/extend.texi (Global Register Variables): Discourage use of type
11771 (Local Register Variables): Likewise.
11773 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
11775 PR tree-optimization/86506
11776 * hwint.h (ceil_log2): Resync with hwint.c implementation.
11778 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
11781 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11782 hard_regno, make sure no insn between `from` and `to` clobbers it.
11784 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
11785 Tom de Vries <tdevries@suse.de>
11787 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11788 (PTX_DEFAULT_RUNTIME_DIM): ... this.
11789 (nvptx_goacc_validate_dims): Set default worker and gang dims to
11790 PTX_DEFAULT_RUNTIME_DIM.
11791 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11793 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
11795 * config/pa/pa.c (pa_output_addr_vec): Align address table.
11796 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11797 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11799 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
11801 * config/rs6000/constraints.md (wG constraint): Delete, no longer
11803 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11804 predicate to reflect toc fusion has been deleted.
11805 (toc_fusion_mem_raw): Delete, no longer used.
11806 (toc_fusion_mem_wrapped): Likewise.
11807 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11809 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11810 Delete, no longer used.
11811 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11812 meant to be used for toc fusion.
11813 (rs6000_debug_print_mode): Delete toc fusion debugging.
11814 (rs6000_debug_reg_global): Likewise.
11815 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11816 fusion and secondary reload support that were never used.
11817 (rs6000_option_override_internal): Delete TOC fusion, that was only
11818 partially defined, and it did not work unless you also used the
11820 (rs6000_legitimate_address_p): Delete TOC fusion support.
11821 (rs6000_opt_masks): Likewise.
11822 (fusion_wrap_memory_address): Delete function, no longer used.
11823 (fusion_split_address); Delete TOC fusion support.
11824 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11825 longer used with toc fusion being deleted.
11826 (TARGET_TOC_FUSION_FP): Likewise.
11827 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11829 (toc fusion spliter): Delete TOC fusion support.
11830 (toc_fusionload_<mode>): Likewise.
11831 (toc_fusionload_di): Likewise.
11832 (fusion_gpr_load_<mode>): Delete generator function, this insn no
11833 longer needs to be named. Rename predicate to delete TOC fusion.
11834 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11835 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11836 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11837 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11838 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11840 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
11842 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11843 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
11844 __int128 in built-in function prototypes.
11845 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11846 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11848 2018-07-27 Martin Sebor <msebor@redhat.com>
11850 PR tree-optimization/86696
11851 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11852 types, including enums.
11853 (handle_char_store): Be prepared for the above function to fail.
11855 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
11857 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11858 when optimization level is lower than 2 or optimize for size.
11860 2018-07-26 Martin Sebor <msebor@redhat.com>
11862 PR tree-optimization/86043
11863 PR tree-optimization/86042
11864 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11865 (get_string_cst_length): Rename...
11866 (get_min_string_length): ...to this. Add argument.
11867 (handle_char_store): Extend to handle multi-character stores by
11869 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
11870 * tree.h (initializer_zerop): Add argument.
11872 2018-07-26 Jakub Jelinek <jakub@redhat.com>
11874 PR middle-end/86660
11875 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11876 declare target to variables if they have always,{to,from,tofrom} map
11879 2018-07-26 Martin Liska <mliska@suse.cz>
11882 * lto-wrapper.c: Add linker_output as prefix
11883 for ltrans_output_file.
11885 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
11887 PR rtl-optimization/85805
11888 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11889 value for hard registers if that was written in the same mode.
11891 2018-07-26 Martin Liska <mliska@suse.cz>
11893 PR gcov-profile/86536
11894 * gcov.c (format_gcov): Use printf format %.*f directly
11895 and do not handle special values.
11897 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11899 * common/config/arc/arc-common.c (arc_option_optimization_table):
11900 Update default optimizations for size.
11902 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11904 * config/arc/arc.md (movsf_insn): Add short instruction selection.
11905 * config/arc/constraints.md (CfZ): New constraint.
11906 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11907 (subsf3_fpu): Likewise.
11908 (cmpsf_fpu): Likewise.
11909 (cmpsf_fpu_uneq): Likewise.
11911 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11913 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11915 (arc_is_uncached_mem_p): uncached applies to both the variable and
11918 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11920 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11923 2018-07-25 David Malcolm <dmalcolm@redhat.com>
11925 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11926 field "m_scopes" from vec to auto_vec.
11928 2018-07-25 Martin Liska <mliska@suse.cz>
11930 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11933 2018-07-25 Richard Biener <rguenther@suse.de>
11936 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11937 special wrt context_die late.
11938 (gen_subprogram_die): Re-use DIEs in local scope.
11940 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
11942 PR tree-optimization/86644
11943 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
11945 2018-07-25 Martin Liska <mliska@suse.cz>
11947 PR middle-end/86645
11948 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11949 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11951 2018-07-25 Martin Liska <mliska@suse.cz>
11954 * params.def: Explain ASan abbreviation and provide
11955 a documentation link.
11957 2018-07-24 Martin Sebor <msebor@redhat.com>
11959 PR tree-optimization/86622
11960 PR tree-optimization/86532
11961 * builtins.h (string_length): Declare.
11962 * builtins.c (c_strlen): Correct handling of non-constant offsets.
11963 (check_access): Be prepared for non-constant length ranges.
11964 (string_length): Make extern.
11965 * expr.c (string_constant): Only handle the minor non-constant
11966 array index. Use string_constant to compute the length of
11967 a generic string constant.
11969 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
11971 PR tree-optimization/86618
11972 * tree-vect-stmts.c (vectorizable_call): Don't take the address
11973 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11975 2018-07-24 David Malcolm <dmalcolm@redhat.com>
11977 PR tree-optimization/86636
11978 * json.cc (json::object::set): Fix comment. Add assertions.
11979 (json::array::append): Move here from json.h. Add comment and an
11981 (json::string::string): Likewise.
11982 * json.h (json::array::append): Move to json.cc.
11983 (json::string::string): Likewise.
11984 * optinfo-emit-json.cc
11985 (optrecord_json_writer::impl_location_to_json): Assert that we
11986 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11987 wrapper around it. Expand the location once, rather than three
11989 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11990 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11992 (optrecord_json_writer::optinfo_to_json): Likewise, in four
11993 places. Fix some overlong lines.
11995 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
11997 * config/aarch64/aarch64-simd.md
11998 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11999 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
12000 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
12001 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
12002 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
12003 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
12004 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
12005 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
12006 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
12008 2018-07-24 Jakub Jelinek <jakub@redhat.com>
12010 PR middle-end/86627
12011 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
12012 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
12013 and abs_d == d, do the power of two handling if profitable.
12015 2018-07-24 Richard Biener <rguenther@suse.de>
12017 * match.pd: Add BIT_FIELD_REF canonicalizations.
12019 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12022 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
12024 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12026 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
12027 terminated STRING_CST object.
12029 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
12031 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
12033 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12035 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
12036 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
12037 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
12038 the elements into a register.
12039 (rs6000_split_v4si_init_di_reg): Delete.
12040 (rs6000_split_v4si_init): Delete.
12041 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
12042 (vsx_init_v4si): Rewrite as a define_expand.
12044 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
12046 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
12047 zero_extend argument from memory): New.
12049 2018-07-22 Martin Sebor <msebor@redhat.com>
12052 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
12053 diagnosing calls with unknown arguments unless -Walloca-larger-than
12054 is restricted to less than PTRDIFF_MAX bytes.
12056 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
12058 * doc/gcov.texi (Invoking Gcov): Editorial changes.
12060 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12062 * pretty-print.c (text_info::set_location): Remove redundant
12063 "line_table" parameter from call to rich_location::set_range.
12065 2018-07-20 Martin Sebor <msebor@redhat.com>
12067 PR middle-end/82063
12068 * builtins.c (expand_builtin_alloca): Adjust.
12069 * calls.c (alloc_max_size): Simplify.
12070 * cgraphunit.c (cgraph_node::expand): Adjust.
12071 * common.opt (larger_than_size, warn_frame_larger_than): Remove
12073 (frame_larger_than_size): Same.
12074 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
12075 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12077 * doc/invoke.texi (GCC Command Options): Document option arguments.
12078 Explain byte-size arguments and suffixes.
12079 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
12080 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
12081 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
12082 * doc/options.texi (UInteger): Expand.
12083 (Host_Wide_Int, ByteSize): Document new properties.
12084 * final.c (final_start_function_1): Include sizes in an error message.
12085 * function.c (frame_offset_overflow): Same.
12086 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
12087 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
12088 Diagnose unbounded alloca calls only for limits of less than
12090 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
12091 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
12093 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
12094 only for limits of less than PTRDIFF_MAX.
12095 * langhooks-def.h (lhd_handle_option): Change function argument
12097 * langhooks.c (lhd_handle_option): Same.
12098 * langhooks.h (handle_option): Same.
12099 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
12101 (var_type, var_type_struct): Same.
12102 (var_set): Handle ByteSize flag.
12103 * optc-gen.awk: Add comments to output to ease debugging. Make
12104 use of HOST_WIDE_INT where appropriate.
12105 * opts-gen-save.awk: Use %lx to format unsigned long.
12106 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
12107 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
12108 arguments. Parse bytes-size suffixes.
12109 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
12110 (enum_value_to_arg): Same.
12111 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
12112 (handle_option): Adjust.
12113 (generate_option): Change function argument to HOST_WIDE_INT.
12114 (cmdline_handle_error): Adjust.
12115 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
12116 (set_option): Change function argument to HOST_WIDE_INT.
12117 (option_enabled): Handle cl_host_wide_int.
12118 (get_option_state): Handle CLVC_SIZE.
12119 (control_warning_option): Same.
12120 * opts.c (common_handle_option): Change function argument to
12121 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
12122 OPT_Wvla_larger_than_.
12123 * opts.h (enum cl_var_type): Add an enumerator.
12124 * stor-layout.c (layout_decl): Print a more meaningful warning.
12125 * toplev.c (output_stack_usage): Adjust.
12127 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
12129 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
12130 call to inline_expand_builtin_string_cmp.
12131 (expand_builtin_strcmp): Likewise.
12132 (expand_builtin_strncmp): Likewise.
12133 (inline_string_cmp): Delete the last parameter, change char_type_node
12134 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
12136 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
12137 the inlining expansion on target where the type of the call has same or
12138 narrower precision than unsigned char.
12140 2018-07-20 David Malcolm <dmalcolm@redhat.com>
12142 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
12143 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
12144 * common.opt (fsave-optimization-record): New option.
12145 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
12146 * doc/invoke.texi (-fsave-optimization-record): New option.
12147 * dumpfile.c: Include "optinfo-emit-json.h".
12148 (struct kv_pair): Move to coretypes.h.
12149 (optgroup_options): Make non-static.
12150 (dump_context::end_scope): Call
12151 optimization_records_maybe_pop_dump_scope.
12152 * dumpfile.h (optgroup_options): New decl.
12153 * json.cc: New file.
12154 * json.h: New file.
12155 * optinfo-emit-json.cc: New file.
12156 * optinfo-emit-json.h: New file.
12157 * optinfo.cc: Include "optinfo-emit-json.h".
12158 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
12159 (optinfo_enabled_p): Check optimization_records_enabled_p.
12160 (optinfo_wants_inlining_info_p): Likewise.
12161 * optinfo.h: Update comment.
12162 * profile-count.c (profile_quality_as_string): New function.
12163 * profile-count.h (profile_quality_as_string): New decl.
12164 (profile_count::quality): New accessor.
12165 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12166 and optinfo_emit_json_cc_tests.
12167 * selftest.h (selftest::json_cc_tests): New decl.
12168 (selftest::optinfo_emit_json_cc_tests): New decl.
12169 * toplev.c: Include "optinfo-emit-json.h".
12170 (compile_file): Call optimization_records_finish.
12171 (do_compile): Call optimization_records_start.
12172 * tree-ssa-live.c: Include optinfo.h.
12173 (remove_unused_scope_block_p): Retain inlining information if
12174 optinfo_wants_inlining_info_p returns true.
12176 2018-07-20 Richard Biener <rguenther@suse.de>
12179 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
12180 to cover -flto-partition=none.
12182 2018-07-20 Martin Liska <mliska@suse.cz>
12184 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
12185 (get_decl_source_range): Remove unused function.
12187 2018-07-20 Richard Biener <rguenther@suse.de>
12189 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
12190 (struct vn_phi_s): Likewise.
12191 (struct vn_reference_s): Likewise.
12192 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
12193 for searching the slot of an entry known to be in the hash itself.
12194 (vn_phi_hasher::equal): Likewise.
12195 (vn_reference_hasher::equal): Likewise.
12196 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
12198 (optimistic_info, current_info): Remove, keeping only valid_info.
12199 (vn_reference_lookup_1): Remove fallback lookup.
12200 (vn_reference_lookup_2): Likewise.
12201 (vn_nary_op_lookup_1): Likewise.
12202 (vn_phi_lookup): Likewise.
12203 (vn_nary_build_or_lookup_1): Make sure to not chain the built
12205 (vn_reference_insert): Adjust, chain the inserted hash element
12206 at last_inserted_ref.
12207 (vn_reference_insert_pieces): Likewise.
12208 (visit_reference_op_call): Likewise.
12209 (vn_nary_op_insert_into): Chain the inserted hash element at
12210 last_inserted_nary.
12211 (vn_nary_op_insert_pieces): Adjust.
12212 (vn_nary_op_insert): Likewise.
12213 (vn_nary_op_insert_stmt): Likewise.
12214 (vn_phi_insert): Adjust, chain the inserted hash element at
12216 (process_scc): Remove clearing and copying the optimistic
12217 table. Instead remove elements inserted during an optimistic
12218 iteration from the single table we maintain.
12219 (init_scc_vn): Adjust.
12220 (free_scc_vn): Likewise.
12221 (sccvn_dom_walker::record_cond): Likewise.
12222 (sccvn_dom_walker::after_dom_children): Likewise.
12224 2018-07-19 Martin Sebor <msebor@redhat.com>
12226 PR tree-optimization/84047
12227 PR tree-optimization/83776
12228 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12229 (check_array_bounds): Call it.
12231 2018-07-19 Martin Sebor <msebor@redhat.com>
12233 * align.h (align_flags): Use member initialization.
12235 2018-07-19 David Malcolm <dmalcolm@redhat.com>
12237 * Makefile.in (OBJS): Add optinfo.o.
12238 * coretypes.h (class symtab_node): New forward decl.
12239 (struct cgraph_node): New forward decl.
12240 (class varpool_node): New forward decl.
12241 * dump-context.h: New file.
12242 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12244 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12245 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12246 (set_alt_dump_file): Likewise.
12247 (dump_context::~dump_context): New dtor.
12248 (dump_gimple_stmt): Move implementation to...
12249 (dump_context::dump_gimple_stmt): ...this new member function.
12250 Add the stmt to any pending optinfo, creating one if need be.
12251 (dump_gimple_stmt_loc): Move implementation to...
12252 (dump_context::dump_gimple_stmt_loc): ...this new member function.
12253 Start a new optinfo and add the stmt to it.
12254 (dump_gimple_expr): Move implementation to...
12255 (dump_context::dump_gimple_expr): ...this new member function.
12256 Add the stmt to any pending optinfo, creating one if need be.
12257 (dump_gimple_expr_loc): Move implementation to...
12258 (dump_context::dump_gimple_expr_loc): ...this new member function.
12259 Start a new optinfo and add the stmt to it.
12260 (dump_generic_expr): Move implementation to...
12261 (dump_context::dump_generic_expr): ...this new member function.
12262 Add the tree to any pending optinfo, creating one if need be.
12263 (dump_generic_expr_loc): Move implementation to...
12264 (dump_context::dump_generic_expr_loc): ...this new member
12265 function. Add the tree to any pending optinfo, creating one if
12267 (dump_printf): Move implementation to...
12268 (dump_context::dump_printf_va): ...this new member function. Add
12269 the text to any pending optinfo, creating one if need be.
12270 (dump_printf_loc): Move implementation to...
12271 (dump_context::dump_printf_loc_va): ...this new member function.
12272 Start a new optinfo and add the stmt to it.
12273 (dump_dec): Move implementation to...
12274 (dump_context::dump_dec): ...this new member function. Add the
12275 value to any pending optinfo, creating one if need be.
12276 (dump_context::dump_symtab_node): New member function.
12277 (dump_context::get_scope_depth): New member function.
12278 (dump_context::begin_scope): New member function.
12279 (dump_context::end_scope): New member function.
12280 (dump_context::ensure_pending_optinfo): New member function.
12281 (dump_context::begin_next_optinfo): New member function.
12282 (dump_context::end_any_optinfo): New member function.
12283 (dump_context::s_current): New global.
12284 (dump_context::s_default): New global.
12285 (dump_scope_depth): Delete global.
12286 (dumpfile_ensure_any_optinfo_are_flushed): New function.
12287 (dump_symtab_node): New function.
12288 (get_dump_scope_depth): Reimplement in terms of dump_context.
12289 (dump_begin_scope): Likewise.
12290 (dump_end_scope): Likewise.
12291 (selftest::temp_dump_context::temp_dump_context): New ctor.
12292 (selftest::temp_dump_context::~temp_dump_context): New dtor.
12293 (selftest::verify_item): New function.
12294 (ASSERT_IS_TEXT): New macro.
12295 (ASSERT_IS_TREE): New macro.
12296 (ASSERT_IS_GIMPLE): New macro.
12297 (selftest::test_capture_of_dump_calls): New test.
12298 (selftest::dumpfile_c_tests): Call it.
12299 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12300 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12301 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12302 descriptive comment.
12303 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12304 (dump_node, dump_bb): Move these unrelated decls.
12305 (class dump_manager): Add leading comment.
12306 * optinfo.cc: New file.
12307 * optinfo.h: New file.
12309 2018-07-19 Michael Collison <michael.collison@arm.com>
12310 Richard Henderson <rth@redhat.com>
12312 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12313 (subti): Handle op1 zero.
12314 (subvti4, usub4ti4): New.
12315 (*sub<GPI>3_compare1_imm): New.
12316 (sub<GPI>3_carryinCV): New.
12317 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12318 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12320 2018-07-19 Michael Collison <michael.collison@arm.com>
12321 Richard Henderson <rth@redhat.com>
12323 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12324 (addti3): Create simpler code if low part is already known to be 0.
12325 (addvti4, uaddvti4): New.
12326 (*add<GPI>3_compareC_cconly_imm): New.
12327 (*add<GPI>3_compareC_cconly): New.
12328 (*add<GPI>3_compareC_imm): New.
12329 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12330 handle constants within this pattern..
12331 (*add<GPI>3_compareV_cconly_imm): New.
12332 (*add<GPI>3_compareV_cconly): New.
12333 (*add<GPI>3_compareV_imm): New.
12334 (add<GPI>3_compareV): New.
12335 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12336 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12337 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12338 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12339 with 'comparison' operator.
12340 (*add<GPI>3_compareV_cconly_imm): Ditto.
12341 (*add<GPI>3_compareV_cconly): Ditto.
12342 (*add<GPI>3_compareV_imm): Ditto.
12343 (add<GPI>3_compareV): Ditto.
12344 (add<mode>3_carryinC): Ditto.
12345 (*add<mode>3_carryinC_zero): Ditto.
12346 (*add<mode>3_carryinC): Ditto.
12347 (add<mode>3_carryinV): Ditto.
12348 (*add<mode>3_carryinV_zero): Ditto.
12349 (*add<mode>3_carryinV): Ditto.
12351 2018-07-19 Michael Collison <michael.collison@arm.com>
12352 Richard Henderson <rth@redhat.com>
12354 * config/aarch64/aarch64-modes.def (CC_V): New.
12355 * config/aarch64/aarch64-protos.h
12356 (aarch64_addti_scratch_regs): Declare
12357 (aarch64_subvti_scratch_regs): Declare.
12358 (aarch64_expand_subvti): Declare.
12359 (aarch64_gen_unlikely_cbranch): Declare
12360 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12361 for signed overflow using CC_Vmode.
12362 (aarch64_get_condition_code_1): Handle CC_Vmode.
12363 (aarch64_gen_unlikely_cbranch): New function.
12364 (aarch64_addti_scratch_regs): New function.
12365 (aarch64_subvti_scratch_regs): New function.
12366 (aarch64_expand_subvti): New function.
12368 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12370 * config/aarch64/aarch64-option-extensions.def: New entry for profile
12372 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12373 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12376 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12379 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12380 address check not strict.
12382 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
12384 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12386 (store_pair_lanes<mode>): Likewise.
12387 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12388 enum value 'ADDR_QUERY_LDP_STP_N'.
12389 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12390 (aarch64_print_address_internal): Add declaration.
12391 (aarch64_print_ldpstp_address): Remove.
12392 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12393 (aarch64_print_operand): Change printing of 'y'.
12394 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12395 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12396 'true' rather than '1'.
12397 * config/aarch64/constraints.md (Uml): Likewise.
12398 (Uml): Rename to Umn.
12401 2018-07-19 Richard Biener <rguenther@suse.de>
12403 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12405 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12406 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12407 (vn_reference_hasher): Likewise.
12408 (struct vn_tables_s): Remove obstack and alloc-pool members.
12409 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12410 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12411 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12412 (vn_reference_insert_pieces): Likewise.
12413 (alloc_vn_nary_op_noinit): Adjust.
12414 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12415 (vn_phi_eq): Adjust.
12416 (shared_lookup_phiargs): Remove.
12417 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12418 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12419 (visit_reference_op_call): Likewise.
12420 (copy_nary, copy_phi, copy_reference): Remove.
12421 (process_scc): Rewind the obstack when iterating. Do not
12422 copy the elements to valid_info but just move them from one
12423 hashtable to the other.
12424 (allocate_vn_table): Adjust.
12425 (free_vn_table): Likewise.
12426 (init_scc_vn): Likewise.
12427 (free_scc_vn): Likewise.
12429 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
12432 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12433 indirect_return as function type attribute.
12434 (ix86_attribute_table): Change indirect_return to function
12436 * doc/extend.texi: Update indirect_return attribute.
12438 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
12440 * wide-int.h (widest2_int): New.
12441 * gimple-fold.c (arith_overflowed_p): Use it.
12442 * tree.h (widest2_int_cst): New.
12443 * tree-vrp.c (wide_int_binop_overflow): Rename from
12444 vrp_int_const_binop.
12445 Rewrite to work on trees.
12446 (extract_range_from_multiplicative_op_1): Abstract code to...
12447 (wide_int_range_min_max): ...here.
12448 (wide_int_range_cross_product): ...and here.
12449 (extract_range_from_binary_expr_1): Abstract overflow code to...
12450 (wide_int_range_mult_wrapping): ...here.
12451 * tree-vrp.h (wide_int_range_cross_product): New.
12452 (wide_int_range_mult_wrapping): New.
12454 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
12455 Julia Koval <julia.koval@intel.com>
12457 * config/i386/x86-tune-costs.h (skylake_memcpy,
12458 skylake_memset): Replace rep_prefix with unrolling for size 512.
12460 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
12462 PR middle-end/86544
12463 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12464 comparision with EQ_EXPR in last stmt.
12466 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
12468 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12469 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12470 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12471 previously known as "PowerPC AltiVec Built-in Functions". Move
12472 some material to new subsubsections "PowerPC AltiVec Built-in
12473 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12475 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12476 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12477 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12478 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12480 2018-07-18 Richard Biener <rguenther@suse.de>
12482 PR tree-optimization/86557
12483 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12486 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
12488 * config/s390/s390.c (s390_function_profiler): Generate CFI.
12490 2018-07-17 Jeff Law <law@redhat.com>
12492 * config/arm/arm.c (get_label_padding): Update for recent
12493 changes to label_to_alignment.
12495 PR tree-optimization/86010
12496 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12498 * config/mips/mips.c (vr4130_align_insns): Update for recent
12499 changes to label_to_alignment.
12501 * config/frv/frv.c (frv_label_align): Update for recent changes
12502 to label_to_alignment.
12504 * config/nios2/nios2.c (nios2_label_align): Update for recent
12505 changes which dropped ALIGN_LABELS_LOG.
12507 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12509 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12510 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12512 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12514 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12515 deprecated align_labels_log.
12517 2018-07-17 Richard Biener <rguenther@suse.de>
12520 * dwarf2out.c (init_sections_and_labels): Always generate
12521 a debug_line_str_section for early LTO debug.
12522 (dwarf2out_finish): Reset debug_line_str_hash output early.
12523 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12525 (dwarf2out_early_finish): Output debug_line_str.
12527 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12529 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12530 index register on z196 or later.
12532 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12534 * config/s390/s390.c (s390_default_align): Set default function
12536 (s390_override_options_after_change): Call s390_default align.
12537 (s390_option_override_internal): Call s390_default_align.
12538 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12540 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12542 PR middle-end/86542
12543 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12544 to _looptemp_ clauses, other than the first two.
12546 2018-07-17 Martin Liska <mliska@suse.cz>
12548 * opts.c: Do not enable OPT_falign_* for -Os.
12550 2018-07-17 Martin Liska <mliska@suse.cz>
12552 * align.h (MAX_CODE_ALIGN): New.
12553 (MAX_CODE_ALIGN_VALUE): New.
12554 * common/config/i386/i386-common.c (ix86_handle_option):
12555 (MAX_CODE_ALIGN): Moved to align.h.
12556 * final.c (MAX_CODE_ALIGN): Likewise.
12557 * opts.c (parse_and_check_align_values):
12558 (MAX_CODE_ALIGN): Likewise.
12559 (MAX_CODE_ALIGN_VALUE): Likewise.
12561 2018-07-17 Martin Liska <mliska@suse.cz>
12563 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12564 in order to fulfil coding style.
12565 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12566 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12567 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12568 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12569 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12570 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12571 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12572 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12573 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12575 2018-07-17 Martin Liska <mliska@suse.cz>
12577 * align.h: New file.
12578 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12580 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12581 align_flags of label_to_alignment.
12582 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12584 * config/m68k/m68k.c: Do not use removed align_labels_value and
12586 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12587 (LOOP_ALIGN): Likewise.
12588 (LABEL_ALIGN): Likewise.
12589 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12590 Remove not used macro.
12591 (rs6000_loop_align): Change return type to align_flags.
12592 (rs6000_loop_align_max_skip): Remove.
12593 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12594 Change return type to align_flags.
12595 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12596 Remove not used macro.
12597 (rs6000_loop_align): Change return type to align_flags.
12598 (rs6000_loop_align_max_skip): Remove.
12599 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12600 * config/rx/rx-protos.h (rx_align_for_label): Make it
12602 * config/rx/rx.c (rx_align_for_label): Change return type
12604 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12606 into align_flags class.
12607 (LABEL_ALIGN): Likewise.
12608 (LOOP_ALIGN): Likewise.
12609 * config/s390/s390.c (s390_label_align): Use align_flags
12611 (s390_asm_output_function_label): Likewise.
12612 * config/sh/sh.c (sh_override_options_after_change):
12613 Use align_flags class directly without macros.
12614 (find_barrier): Likewise.
12615 (barrier_align): Likewise.
12616 (sh_loop_align): Likewise.
12617 * config/spu/spu.c (spu_option_override):
12618 Use align_flags_tuple::get_value instead of removed macros.
12619 (spu_sched_init): Likewise.
12620 * config/spu/spu.h (GTY): Likewise.
12621 * config/visium/visium.c (visium_option_override):
12622 Set "8" as default secondary alignment.
12623 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12624 in order to guarantee secondary alignment of 8.
12625 * coretypes.h: Include align.h header file.
12626 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12627 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12628 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12629 * doc/tm.texi.in: Likewise.
12630 * final.c (struct label_alignment): Remove not used structure.
12631 (LABEL_ALIGN): Change type to align_flags.
12632 (LOOP_ALIGN): Likewise.
12633 (JUMP_ALIGN): Likewise.
12634 (default_loop_align_max_skip): Remove.
12635 (default_label_align_max_skip): Likewise.
12636 (default_jump_align_max_skip): Likewise.
12637 (default_label_align_after_barrier_max_skip):
12638 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12639 (LABEL_TO_MAX_SKIP): Remove.
12640 (label_to_alignment): Return align_flags type instead of integer.
12641 (label_to_max_skip): Remove.
12642 (align_fuzz): Use align_flags type.
12643 (compute_alignments): Use align_flags type and use align_flags::max
12644 to combine multiple alignments.
12645 (grow_label_align): Grow vec instead of C array.
12646 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12647 (shorten_branches): Use align_flags type and use align_flags::max
12648 to combine multiple alignments.
12649 (final_scan_insn_1): Remove usage of secondary alignment that comes
12650 from label alignment, but instead use proper secondary alignment
12651 which is computed in grow_label_align.
12652 * flags.h (struct align_flags_tuple): Move to align.h.
12653 (struct align_flags): Likewise.
12654 (state_align_loops): Rename to align_loops.
12655 (state_align_jumps): Rename to align_jumps.
12656 (state_align_labels): Rename to align_labels.
12657 (state_align_functions): Rename to align_functions.
12658 (align_loops_log): Remove.
12659 (align_jumps_log): Remove.
12660 (align_labels_log): Remove.
12661 (align_functions_log): Remove.
12662 (align_loops_max_skip): Remove.
12663 (align_jumps_max_skip): Remove.
12664 (align_labels_max_skip): Remove.
12665 (align_functions_max_skip): Remove.
12666 (align_loops_value): Remove.
12667 (align_jumps_value): Remove.
12668 (align_labels_value): Remove.
12669 (align_functions_value): Remove.
12670 * output.h (label_to_alignment): Change return type to align_flags.
12671 (label_to_max_skip): Remove.
12672 * target.def: Remove loop_align_max_skip, label_align_max_skip,
12673 jump_align_max_skip macros.
12674 * targhooks.h (default_loop_align_max_skip): Remove.
12675 (default_label_align_max_skip): Likewise.
12676 (default_jump_align_max_skip): Likewise.
12677 (default_label_align_after_barrier_max_skip): Remove.
12678 * toplev.c (read_log_maxskip): Use ::normalize function.
12679 (parse_N_M): Remove not used argument and also call ::normalize.
12680 (parse_alignment_opts): Do not pass unused arguments.
12681 * varasm.c (assemble_start_function): Use directly align_functions
12682 instead of removed macros.
12683 * system.h: Do not poison removed macros.
12685 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12687 PR middle-end/86539
12688 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12689 and cond temporaries don't have reference type if iterator has
12690 pointer type. For init use &for_pre_body instead of pre_p if
12691 for_pre_body is non-empty.
12693 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12695 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12696 double-double modes to SFmode directly directly.
12697 (trunc<mode>sf2_fprs): Delete.
12699 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12701 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12702 for conversions between IFmode and the decimal floating point modes.
12703 (init_float128_ieee): Use the correct names for conversions between
12704 KFmode and the decimal floating point modes.
12706 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12708 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12709 for the conversions between TDmode and IFmode.
12710 (init_float128_ieee): Use more correct names for the conversions
12711 between TDmode and KFmode.
12713 2018-07-16 Jakub Jelinek <jakub@redhat.com>
12715 PR tree-optimization/86526
12716 * builtins.c (expand_builtin_memcmp): Formatting fixes.
12717 (inline_expand_builtin_string_cmp): Likewise.
12718 (inline_string_cmp): Likewise. Use c_readstr instead of
12719 builtin_memcpy_read_str. Add unit_mode temporary.
12721 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12723 PR middle-end/86528
12724 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12725 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12727 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
12729 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12730 Alphabetize prototypes of built-in functions, separating out
12731 built-in functions that are listed in this section but should be
12732 described elsewhere.
12734 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
12737 * expmed.c (emit_store_flag): Do not emit setcc followed by a
12738 conditional move when trapping comparison was split to a
12739 non-trapping one (and vice versa).
12741 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12743 * config/s390/s390.c (s390_function_profiler): Generate nops
12744 instead of profiler call sequences.
12745 * config/s390/s390.opt: Add the new option.
12747 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12749 * config/s390/s390.c (s390_function_profiler): Generate
12750 __mcount_loc section.
12751 * config/s390/s390.opt: Add the new option.
12753 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12755 * common.opt: Add the new warning.
12756 * config/s390/s390.c (s390_function_profiler): Emit "brasl
12757 %r0,__fentry__" when -mfentry is specified.
12758 (s390_option_override_internal): Disallow -mfentry for 31-bit
12760 * config/s390/s390.opt: Add the new option.
12762 2018-07-16 Richard Biener <rguenther@suse.de>
12765 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12766 for function-local FUNCTION_DECL and RESULT_DECL immediately.
12768 2018-07-16 Martin Liska <mliska@suse.cz>
12771 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12774 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12776 * config/arc/arcHS.md: Update ARCHS scheduling rules.
12778 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12780 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12782 * config/arc/arc-cpus.def (hs4x): New cpu.
12784 * config/arc/arc-tables.opt: Regenerate.
12785 * config/arc/arc.c (arc_sched_issue_rate): New function.
12786 (TARGET_SCHED_ISSUE_RATE): Define.
12787 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12788 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12790 (attr tune): Add ARCHS4x tune values.
12791 (attr tune_dspmpy): Define.
12792 (*tst): Correct instruction type.
12793 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12794 * config/arc/arcHS4x.md: New file.
12795 * config/arc/fpu.md: Update instruction type attributes.
12796 * config/arc/t-multilib: Regenerate.
12798 2018-07-16 Tom de Vries <tdevries@suse.de>
12801 * var-tracking.c (vt_initialize): Fix pre_dec handling.
12803 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12805 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12808 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
12810 PR tree-optimization/86514
12811 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12812 conversion to a boolean type from a type with greater precision.
12814 2018-07-16 Tom de Vries <tdevries@suse.de>
12816 * var-tracking.c (vt_initialize): Print adjusted insn slim if
12817 dump_flags request TDF_SLIM.
12819 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
12821 * fold-const.c (int_const_binop_1): Abstract...
12822 (wide_int_binop): ...wide int code here.
12823 (poly_int_binop): ...poly int code here.
12824 Abstract the rest of int_const_binop_1 into int_const_binop.
12825 * fold-const.h (wide_int_binop): New.
12826 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12827 Remove useless PLUS/MINUS_EXPR case.
12828 (zero_nonzero_bits_from_vr): Move wide int code...
12829 (zero_nonzero_bits_from_bounds): ...here.
12830 (extract_range_from_binary_expr_1): Move mask optimization code...
12831 (range_easy_mask_min_max): ...here.
12832 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12833 (range_easy_mask_min_max): New.
12835 2018-07-15 Jeff Law <law@redhat.com>
12838 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12841 2018-07-14 Jim Wilson <jimw@sifive.com>
12843 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12845 2018-07-14 Paul Koning <ni1d@arrl.net>
12847 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12849 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
12851 * lto-streamer-out.c (copy_function_or_variable): Dump info about
12854 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
12855 Steve Munroe <munroesj52@gmail.com>
12857 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12858 (_mm_andnot_si128): Likewise.
12859 (_mm_or_si128): Likewise.
12860 (_mm_xor_si128): Likewise.
12862 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
12864 PR middle-end/78809
12865 * builtins.c (expand_builtin_memcmp): Inline the calls first
12866 when result_eq is false.
12867 (expand_builtin_strcmp): Inline the calls first.
12868 (expand_builtin_strncmp): Likewise.
12869 (inline_string_cmp): New routine. Expand a string compare
12870 call by using a sequence of char comparison.
12871 (inline_expand_builtin_string_cmp): New routine. Inline expansion
12872 a call to str(n)cmp/memcmp.
12873 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12875 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12877 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
12879 * config/arm/driver-arm.c: Include arm-native.h.
12880 (host_detect_local_cpu): Use auto-generated data tables.
12881 (vendors, arm_cpu_table): Delete. Move part information to ...
12882 * config/arm/arm-cpus.in: ... here.
12883 * config/arm/parsecpu.awk (gen_native): New function.
12884 (vendor, part): New CPU fields.
12885 (END): Add support for building the native CPU detection tables.
12886 * config/arm/t-arm (arm-native.h): Add build rule.
12887 (driver-arm.o): Add dependency on arm-native.h.
12889 2018-07-13 Richard Biener <rguenther@suse.de>
12891 PR middle-end/85974
12892 * match.pd (addr1 - addr2): Allow either of the operand to
12895 2018-07-13 Tom de Vries <tdevries@suse.de>
12897 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12900 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
12902 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12903 arrays instead of numbered variables.
12905 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
12907 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12908 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12910 2018-07-13 Richard Biener <rguenther@suse.de>
12913 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12914 instead of get_context_die.
12916 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
12917 Richard Biener <rguenther@suse.de>
12919 PR middle-end/86489
12920 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12921 that the loop latch destination where phi is defined.
12923 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
12925 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12926 (riscv_expand_epilogue): Add assertion to check interrupt mode.
12927 (riscv_set_current_function): Extract getting interrupt type to new
12929 (riscv_get_interrupt_type): New function.
12930 (riscv_merge_decl_attributes): New function, checking interrupt type is
12932 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12934 2018-07-12 Paul Koning <ni1d@arrl.net>
12936 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12939 2018-07-12 Paul Koning <ni1d@arrl.net>
12941 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12942 zero reference, add doloop_end instead.
12943 * doc/md.texi (decrement_and_branch_until_zero): Remove.
12944 (Looping patterns): Remove decrement_and_branch_until_zero. Add
12945 detail for doloop_end.
12947 2018-07-12 Martin Sebor <msebor@redhat.com>
12950 * attribs.c (decl_attributes): Reject conflicting attributes before
12951 calling attribute handlers.
12953 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12955 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12957 (gcc::dump_manager::get_dump_file_name): likewise.
12958 (dump_begin): Likewise.
12959 * dumpfile.h (dump_begin): Update prototype.
12960 (gcc::dump_manager::get_dump_file_name,
12961 gcc::dump_manager::get_dump_file_name): Update prototype.
12963 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12965 * internal-fn.h (vectorizable_internal_fn_p): New function.
12966 * tree-vect-slp.c (compatible_calls_p): Likewise.
12967 (vect_build_slp_tree_1): Remove nops argument. Handle calls
12968 to internal functions.
12969 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12971 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12973 * fold-const.h (inverse_conditions_p): Declare.
12974 * fold-const.c (inverse_conditions_p): New function.
12975 * match.pd: Use inverse_conditions_p. Add folds of view_converts
12976 that test the inverse condition of a conditional internal function.
12977 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12978 * internal-fn.c (internal_fn_mask_index): Handle conditional
12979 internal functions.
12980 (vectorized_internal_fn_supported_p): New function.
12981 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12982 (any_pred_load_store): Replace with...
12983 (need_to_predicate): ...this new variable.
12984 (redundant_ssa_names): New variable.
12985 (ifcvt_can_use_mask_load_store): Move initial checks to...
12986 (ifcvt_can_predicate): ...this new function. Handle tree codes
12987 for which a conditional internal function exists.
12988 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12989 instead of ifcvt_can_use_mask_load_store. Update after variable
12991 (predicate_load_or_store): New function, split out from
12992 predicate_mem_writes.
12993 (check_redundant_cond_expr): New function.
12994 (value_available_p): Likewise.
12995 (predicate_rhs_code): Likewise.
12996 (predicate_mem_writes): Rename to...
12997 (predicate_statements): ...this. Use predicate_load_or_store
12998 and predicate_rhs_code.
12999 (combine_blocks, tree_if_conversion): Update after above name changes.
13000 (ifcvt_local_dce): Handle redundant_ssa_names.
13001 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
13002 general conditional functions.
13003 * tree-vect-stmts.c (vectorizable_call): Likewise.
13005 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13006 Alan Hayward <alan.hayward@arm.com>
13007 David Sherwood <david.sherwood@arm.com>
13009 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
13010 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
13011 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
13012 plus and minus and convert them into IFN_COND_FMA-based sequences.
13013 (convert_mult_to_fma): Handle conditional plus and minus.
13015 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13017 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
13018 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
13019 (cond_fnms_optab): New optabs.
13020 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
13021 internal functions.
13022 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
13023 * internal-fn.h (get_conditional_internal_fn): Declare.
13024 (get_unconditional_internal_fn): Likewise.
13025 * internal-fn.c (cond_ternary_direct): New macro.
13026 (expand_cond_ternary_optab_fn): Likewise.
13027 (direct_cond_ternary_optab_supported_p): Likewise.
13028 (FOR_EACH_COND_FN_PAIR): Likewise.
13029 (get_conditional_internal_fn): New function.
13030 (get_unconditional_internal_fn): Likewise.
13031 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
13032 (gimple_match_op::gimple_match_op): Add a new overload for 5
13034 (gimple_match_op::set_op): Likewise.
13035 (gimple_resimplify5): Declare.
13036 * genmatch.c (decision_tree::gen): Generate simplifications for
13038 * gimple-match-head.c (gimple_simplify): Define an overload for
13039 5 operands. Handle calls with 5 arguments in the top-level overload.
13040 (convert_conditional_op): Handle conversions from unconditional
13041 internal functions to conditional ones.
13042 (gimple_resimplify5): New function.
13043 (build_call_internal): Pass a fifth operand.
13044 (maybe_push_res_to_seq): Likewise.
13045 (try_conditional_simplification): Try converting conditional
13046 internal functions to unconditional internal functions.
13047 Handle 3-operand unconditional forms.
13048 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
13049 Define ternary equivalents of the current rules for binary conditional
13050 internal functions.
13051 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
13052 ternary operations.
13053 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
13054 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
13055 (optab): Handle them.
13056 (SVE_COND_FP_TERNARY): New int iterator.
13057 (sve_fmla_op, sve_fmad_op): New int attributes.
13058 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
13059 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
13060 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
13062 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
13064 * target.def (preferred_else_value): New target hook.
13065 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
13066 * doc/tm.texi: Regenerate.
13067 * targhooks.h (default_preferred_else_value): Declare.
13068 * targhooks.c (default_preferred_else_value): New function.
13069 * internal-fn.h (conditional_internal_fn_code): Declare.
13070 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
13071 (get_conditional_internal_fn): Use it.
13072 (conditional_internal_fn_code): New function.
13073 * gimple-match.h (gimple_match_cond): New struct.
13074 (gimple_match_op): Add a cond member function.
13075 (gimple_match_op::gimple_match_op): Update all forms to take a
13077 * genmatch.c (expr::gen_transform): Use the same condition as res_op
13078 for the suboperation, but don't specify a particular else_value.
13079 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
13080 (visit_nary_op, visit_reference_op_load): Pass
13081 gimple_match_cond::UNCOND to the gimple_match_op constructor.
13082 * gimple-match-head.c: Include tree-eh.h
13083 (convert_conditional_op): New function.
13084 (maybe_resimplify_conditional_op): Likewise.
13085 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
13086 (gimple_resimplify2): Likewise.
13087 (gimple_resimplify3): Likewise.
13088 (gimple_resimplify4): Likewise.
13089 (maybe_push_res_to_seq): Return null for conditional operations.
13090 (try_conditional_simplification): New function.
13091 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
13093 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
13095 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
13097 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
13099 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
13101 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13103 (hash_tree): Do not hash DECL_FCONTEXT
13104 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
13105 Do not stream DECL_FCONTEXT.
13106 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
13107 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
13109 2018-07-12 Richard Biener <rguenther@suse.de>
13112 * dwarf2out.c (gen_block_die): Only output blocks when they have
13113 at least one !DECL_IGNORED_P variable.
13115 2018-07-12 Richard Biener <rguenther@suse.de>
13118 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
13119 Remove -mieee-fp handling.
13121 2018-07-12 Richard Biener <rguenther@suse.de>
13123 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
13124 left-over from last patch.
13126 2018-07-12 Jakub Jelinek <jakub@redhat.com>
13128 PR tree-optimization/86492
13129 * gimple-ssa-store-merging.c
13130 (imm_store_chain_info::coalesce_immediate_stores): Call
13131 check_no_overlap even for the merge_overlapping case. Formatting fix.
13133 2018-07-12 Richard Biener <rguenther@suse.de>
13135 PR middle-end/86479
13136 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
13137 move possibly trapping operations into the conditional.
13139 2018-07-12 Richard Biener <rguenther@suse.de>
13141 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
13142 (vn_lookup_simplify_result): Remove recursion limit applied
13144 (vn_nary_build_or_lookup_1): Adjust.
13145 (try_to_simplify): Likewise.
13146 * gimple-match-head.c (gimple_resimplify1): Instead apply one
13148 (gimple_resimplify2): Likewise.
13149 (gimple_resimplify3): Likewise.
13150 (gimple_resimplify4): Likewise.
13152 2018-07-11 Jakub Jelinek <jakub@redhat.com>
13154 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
13155 Use __mmask64 type instead of __mmask8 for __M argument.
13156 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
13157 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
13159 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
13160 __mmask16 for __M argument.
13161 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
13162 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
13163 to __mmask16 instead of __mmask8.
13164 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
13165 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13166 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13167 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13168 instead of __mmask16 for __U argument.
13169 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13170 __mmask16 instead of __mmask8 for __U argument.
13171 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13173 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
13175 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
13177 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
13179 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
13181 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
13183 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
13185 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
13187 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
13189 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
13191 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
13192 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
13193 return type as well as __M argument type and all casts from __mmask8
13195 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
13196 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
13197 return type as well as __M argument type and all casts from __mmask8
13199 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
13200 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
13201 return type as well as __M argument type and all casts from __mmask8
13203 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
13204 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
13205 return type as well as __M argument type and all casts from __mmask8
13207 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13208 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13211 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
13213 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13214 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13217 2018-07-11 Paul Koning <ni1d@arrl.net>
13219 * doc/md.texi (define_subst): Document how multiple occurrences of
13220 the same argument in the replacement pattern are handled.
13222 2018-07-11 Paul Koning <ni1d@arrl.net>
13224 * doc/extend.texi (Common Variable Attributes): Move "mode" into
13225 alphabetical order.
13226 (Common Type Attributes): Add "mode" attribute.
13228 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
13230 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13231 stream DECL_ORIGINAL_TYPE.
13232 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13233 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13234 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13235 Do not walk original type.
13236 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13238 (write_ts_decl_non_common_tree_pointers): Do not stream
13240 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13241 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13243 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13245 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13246 thread twice from the same starting edge.
13248 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
13250 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13251 * gimple.c (gimple_call_nonnull_result_p): ...here...
13252 (gimple_call_nonnull_arg): ...and here.
13253 * gimple.h (gimple_call_nonnull_result_p): New.
13254 (gimple_call_nonnull_arg): New.
13256 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
13258 * config/arm/arm-cpus.in: Move information from fpu field of each
13259 cpu definition to the isa field.
13260 * config/arm/parsecpu.awk (fpu): Delete match rule.
13261 (gen_comm_data): Don't add bits from the CPU's FPU entry.
13263 2018-07-11 Richard Biener <rguenther@suse.de>
13266 * dwarf2out.c (init_sections_and_labels): Use
13267 output_asm_line_debug_info consistently.
13268 (dwarf2out_early_finish): Likewise.
13269 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13272 2018-07-11 Richard Biener <rguenther@suse.de>
13274 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13275 Rework father_bb setting in a way to avoid propagating constants
13276 multiple times on a loop body.
13278 2018-07-10 Mark Wielaard <mark@klomp.org>
13281 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13283 2018-07-10 Richard Biener <rguenther@suse.de>
13285 * hash-map.h (hash_map::iterator::operator*): Return
13286 references to key and value.
13288 2018-07-10 Jakub Jelinek <jakub@redhat.com>
13291 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13292 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13293 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13294 (gimplify_omp_for): For composite loops, move outer
13295 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13296 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
13297 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
13298 TREE_LIST for both the original class iterator and the "last" helper
13299 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
13300 loop, remember has_decl_expr from outer composite loops for the
13301 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13303 2018-07-09 Martin Sebor <msebor@redhat.com>
13305 PR middle-end/77357
13306 PR middle-end/86428
13307 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13308 accessing implicitly initialized array elements.
13309 * expr.c (string_constant): Handle string initializers of
13310 character arrays within aggregates.
13311 * gimple-fold.c (fold_array_ctor_reference): Add argument.
13312 Store element offset. As a special case, handle zero size.
13313 (fold_nonarray_ctor_reference): Same.
13314 (fold_ctor_reference): Add argument. Store subobject offset.
13315 * gimple-fold.h (fold_ctor_reference): Add argument.
13317 2018-07-09 Paul Koning <ni1d@arrl.net>
13319 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13320 (pdp11_insn_cost): New function.
13321 (pdp11_md_asm_adjust): New function.
13322 (TARGET_INVALID_WITHIN_DOLOOP): Define.
13323 (pdp11_rtx_costs): Update to match machine better.
13324 (output_addr_const_pdp11): Correct format mismatch warnings.
13325 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13326 * config/pdp11/pdp11.md: General change to add base_cost and/or
13327 length attributes for use by new pdp11_insn_cost function.
13328 (MIN_BRANCH): Correct definition.
13330 (doloop_end): Use standard pattern name for looping pattern.
13331 (doloop_end_nocc): New.
13332 (movsf): Add another constraint alternative.
13333 (zero_extendqihi2): Add constraint alternatives for not in place
13335 (zero_extendhisi2): Remove.
13336 (shift patterns): Add CC handling variants.
13340 (define_peephole2): New peephole to recognize mov that sets CC for
13343 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13345 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13346 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13349 2018-07-09 Jakub Jelinek <jakub@redhat.com>
13352 * real.c (real_nextafter): Return true if result is denormal.
13354 2018-07-09 Martin Liska <mliska@suse.cz>
13356 * common.opt: Add back wrongly removed attribute.
13358 2018-07-09 Richard Biener <rguenther@suse.de>
13361 * dwarf2out.c (gen_block_die): For an early generated DIE
13362 always output high/low PC attributes.
13364 2018-07-09 Tom de Vries <tdevries@suse.de>
13366 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13367 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13368 onto VAR_DECL with abstract origin.
13370 2018-07-07 Jim Wilson <jimw@sifive.com>
13372 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13374 2018-07-07 Tom de Vries <tdevries@suse.de>
13376 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13378 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
13380 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13382 (combine_bound): Use wide-int overflow calculation instead of
13384 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13386 * fold-const.c (int_const_binop_2): Same.
13387 (extract_muldiv_1): Same.
13388 (fold_div_compare): Same.
13389 (fold_abs_const): Same.
13391 * poly-int.h (add): Same.
13395 * predict.c (predict_iv_comparison): Same.
13396 * profile-count.c (slow_safe_scale_64bit): Same.
13397 * simplify-rtx.c (simplify_const_binary_operation): Same.
13398 * tree-chrec.c (tree_fold_binomial): Same.
13399 * tree-data-ref.c (split_constant_offset_1): Same.
13400 * tree-if-conv.c (idx_within_array_bound): Same.
13401 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13402 * tree-ssa-phiopt.c (minmax_replacement): Same.
13403 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13404 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13405 * vr-values.c (vr_values::adjust_range_with_scev): Same.
13406 * wide-int.cc (wi::add_large): Same.
13407 (wi::mul_internal): Same.
13408 (wi::sub_large): Same.
13409 (wi::divmod_internal): Same.
13410 * wide-int.h: Change overflow type to overflow_type for neg, add,
13411 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13412 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13413 mul_internal, divmod_internal.
13414 (overflow_type): New enum.
13415 (accumulate_overflow): New.
13417 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
13419 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13420 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13422 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13424 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13425 argument is checked for zero before entering loop, avoid checking again.
13427 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13429 * gimplify.h (generic_expr_could_trap_p): Set as global function.
13430 * gimplify.h (generic_expr_could_trap_p): Likwise.
13431 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13433 2018-07-06 Jakub Jelinek <jakub@redhat.com>
13435 PR tree-optimization/86401
13436 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13437 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13438 (fold_bit_and_mask): ... here. New helper function for match.pd.
13439 * fold-const.h (fold_bit_and_mask): Declare.
13440 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13442 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
13445 * target.def (translate_mode_attribute): New hook.
13446 * targhooks.h (default_translate_mode_attribute): Declare.
13447 * targhooks.c (default_translate_mode_attribute): New function.
13448 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13449 * doc/tm.texi: Regenerate.
13450 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13451 (rs6000_translate_mode_attribute): New function.
13453 2018-07-06 Paul Koning <ni1d@arrl.net>
13455 * doc/md.texi (define_split): Document DONE and FAIL.
13456 (define_peephole2): Ditto.
13458 2018-07-05 Jeff Law <law@redhat.com>
13460 PR tree-optimization/86010
13461 * tree-ssa-dse.c (compute_trims): More aggressively trim at
13462 both the head and tail of mem* and str* calls.
13464 2018-07-05 Jim Wilson <jimw@sifive.com>
13466 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13468 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
13470 * config/aarch64/aarch64-simd.md: correct flags text for
13471 MIN_EXPR replacement.
13473 2018-07-05 James Clarke <jrtc27@jrtc27.com>
13475 * configure: Regenerated.
13477 2018-07-05 Carl Love <cel@us.ibm.com>
13479 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13480 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13481 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13482 VSX_BUILTIN_DOUBLEL_V4SF.
13484 2018-07-05 Martin Sebor <msebor@redhat.com>
13487 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13488 than its domain to compute its the upper bound of a char array.
13490 2018-07-05 Nathan Sidwell <nathan@acm.org>
13492 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13493 * doc/cpp.texi: Update comment.
13494 * doc/tm.texi: Rebuilt.
13495 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13496 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13497 * doc/extend.texi (Backwards Compatibility): Clarify it is system
13498 headers affected by extern "C".
13499 * system.h: Poison NO_IMPLICIT_EXTERN_C.
13500 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13501 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13502 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13503 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13504 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13505 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13506 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13507 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13508 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13509 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13510 config/sparc/sp64-elf.h, config/spu/spu.h,
13511 config/stormy16/stormy16.h, config/v850/v850.h,
13512 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13513 define NO_IMPLICIT_EXTERN_C.
13514 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13516 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13519 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13520 instead of GET_MODE_SIZE when comparing Units.
13522 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13525 * rtlanal.c (set_noop_p): Constrain on mode change,
13526 include hard-reg-set.h
13528 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13530 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13532 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13535 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13538 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13540 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13542 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13545 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13547 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13549 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13551 PR middle-end/86380
13552 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13554 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13556 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13557 neg_*_op* variables.
13559 2018-07-04 Martin Liska <mliska@suse.cz>
13561 * tree-switch-conversion.c: Define
13562 max_ratio_for_speed and max_ratio_for_size constants.
13564 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13565 Martin Liska <mliska@suse.cz>
13567 PR middle-end/66240
13570 * common.opt: Rename align options with 'str_' prefix.
13571 * common/config/i386/i386-common.c (set_malign_value): New
13573 (ix86_handle_option): Use it to set -falign-* options/
13574 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13575 type from int to string.
13576 * config/aarch64/aarch64.c: Update default values from int
13578 * config/alpha/alpha.c (alpha_override_options_after_change):
13580 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13581 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13582 max skip conditionally.
13583 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13584 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13585 max skip conditionally.
13586 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13587 max skip conditionally.
13588 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13589 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13590 max skip conditionally.
13591 * config/i386/i386.c (struct ptt): Change type from int to
13593 (ix86_default_align): Set default values.
13594 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13595 max skip conditionally.
13596 * config/i386/iamcu.h (SUBALIGN_LOG): New.
13597 (ASM_OUTPUT_MAX_SKIP_ALIGN):
13598 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13599 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13600 max skip conditionally.
13601 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13602 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13603 * config/i386/x86-64.h (SUBALIGN_LOG): New.
13604 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13605 max skip conditionally.
13606 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13607 * config/ia64/ia64.c (ia64_option_override): Set default values
13608 for alignment options.
13609 * config/m68k/m68k.c: Handle new str_align_* options.
13610 * config/mips/mips.c (mips_set_compression_mode): Change
13612 (mips_option_override): Set default values for options.
13613 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13615 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13617 * config/rx/rx.c (rx_option_override): Likewise.
13618 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13619 (LABEL_ALIGN): Use align_labels_log.
13620 (LOOP_ALIGN): Use align_loops_align.
13621 * config/s390/s390.c (s390_asm_output_function_label): Use new
13623 * config/sh/sh.c (sh_override_options_after_change):
13624 Change type of constants.
13625 * config/spu/spu.c (spu_sched_init): Likewise.
13626 * config/sparc/sparc.c (sparc_option_override): Set default
13627 values for options.
13628 * config/visium/visium.c (visium_option_override): Likewise.
13629 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13630 emit p2align format with last argument if it's not needed.
13631 * doc/invoke.texi: Document extended format of -falign-*.
13632 * final.c: Use align_labels alignment.
13633 * flags.h (struct target_flag_state): Change type to use
13635 (struct align_flags_tuple): New.
13636 (struct align_flags): Likewise.
13637 (align_loops_log): Redefine macro to use new types.
13638 (align_loops_max_skip): Redefine macro to use new types.
13639 (align_jumps_log): Redefine macro to use new types.
13640 (align_jumps_max_skip): Redefine macro to use new types.
13641 (align_labels_log): Redefine macro to use new types.
13642 (align_labels_max_skip): Redefine macro to use new types.
13643 (align_functions_log): Redefine macro to use new types.
13644 (align_loops): Redefine macro to use new types.
13645 (align_jumps): Redefine macro to use new types.
13646 (align_labels): Redefine macro to use new types.
13647 (align_functions): Redefine macro to use new types.
13648 (align_functions_max_skip): Redefine macro to use new types.
13649 (align_loops_value): New macro.
13650 (align_jumps_value): New macro.
13651 (align_labels_value): New macro.
13652 (align_functions_value): New macro.
13653 * function.c (invoke_set_current_function_hook): Propagate
13654 alignment values from flags to global variables default in
13656 * ipa-icf.c (sem_function::equals_wpa): Use
13657 cl_optimization_option_eq instead of memcmp.
13658 * lto-streamer.h (cl_optimization_stream_out): Support streaming
13660 (cl_optimization_stream_in): Likewise.
13661 * optc-save-gen.awk: Support strings in cl_optimization.
13662 * opth-gen.awk: Likewise.
13663 * opts.c (finish_options): Remove error checking of invalid
13665 (MAX_CODE_ALIGN): Remove.
13666 (MAX_CODE_ALIGN_VALUE): Likewise.
13667 (parse_and_check_align_values): New function.
13668 (check_alignment_argument): Likewise.
13669 (common_handle_option): Use check_alignment_argument.
13670 * opts.h (parse_and_check_align_values): Declare.
13671 * toplev.c (init_alignments): Remove.
13672 (read_log_maxskip): New.
13673 (parse_N_M): Likewise.
13674 (parse_alignment_opts): Likewise.
13675 (backend_init_target): Remove usage of init_alignments.
13676 * toplev.h (parse_alignment_opts): Declare.
13677 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13679 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13680 * tree.c (cl_option_hasher::equal): New.
13681 * varasm.c: Use new global macros.
13683 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13685 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13686 Use a simpler align directive also if MAXSKIP = ALIGN-1.
13687 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13688 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13689 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13690 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13691 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13692 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13693 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13694 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13695 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13696 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13697 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13699 2018-07-04 Martin Liska <mliska@suse.cz>
13700 Jonathan Wakely <jwakely@redhat.com>
13702 * coverage.c: Use correct type.
13703 * doc/invoke.texi: Language correction.
13705 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
13708 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13709 ENDBRANCH for non-tail call which may return via indirect branch.
13710 * doc/extend.texi: Document indirect_return attribute.
13712 2018-07-03 Martin Sebor <msebor@redhat.com>
13714 PR tree-optimization/86274
13715 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13717 (format_floating): Correct handling of infinities and NaNs.
13719 2018-07-03 Martin Sebor <msebor@redhat.com>
13721 * print-tree.c (print_real_cst): New function.
13722 (print_node_brief): Call it.
13723 (print_node): Ditto.
13725 2018-07-03 Jeff Law <law@redhat.com>
13727 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13728 into a single pattern.
13730 * config/h8300/h8300.md (ors code_iterator): New.
13731 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13732 a single pattern and single splitter.
13733 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13734 (iorqi3_1, xorqi3_1): Likewise.
13735 (iorqi3, xorqi3 expanders): Similarly.
13737 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13738 (movmd_internal) into a single pattern using the P mode iterator.
13739 (movmd splitters): Similarly.
13740 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13741 (movsd splitters): Similarly.
13743 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13744 ADDB, ADDW and ADDL into a single ADD attribute which selects the
13745 right table based on the size of the operand.
13746 * config/h8300/h8300.md (length_table): Corresponding changes. All
13747 references to "addb", "addw" and "addl" changed to "add".
13748 (btst patterns): Merge two variants into a single pattern.
13749 (tstqi, tsthi): Likewise.
13750 (addhi3_incdec, addsi3_incdec): Likewise.
13751 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13752 (mulhi3, mulsi3): Likewise.
13753 (udivhi3, udivsi3): Likewise.
13754 (divhi3, divsi3): Likewise.
13755 (andorqi3, andorhi3, andorsi3): Likewise.
13757 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
13760 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13761 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13763 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13765 PR tree-optimization/85694
13766 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13767 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13769 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13770 (<u>avg<mode>3_ceil): New patterns.
13772 2018-07-03 David Malcolm <dmalcolm@redhat.com>
13774 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13775 scan-tree-dump directive.
13776 * gcc.dg/vect/slp-perm-2.c: Likewise.
13777 * gcc.dg/vect/slp-perm-3.c: Likewise.
13778 * gcc.dg/vect/slp-perm-5.c: Likewise.
13779 * gcc.dg/vect/slp-perm-6.c: Likewise.
13780 * gcc.dg/vect/slp-perm-7.c: Likewise.
13781 * gcc.dg/vect/slp-perm-8.c: Likewise.
13783 2018-07-03 Marek Polacek <polacek@redhat.com>
13785 PR middle-end/86202
13786 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13788 2018-07-03 Richard Biener <rguenther@suse.de>
13791 * tree-ssa-structalias.c (find_func_clobbers): Properly
13792 handle indirect calls.
13794 2018-07-03 Jeff Law <law@redhat.com>
13796 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13797 (shifts): New code iterator.
13798 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13799 expander. Fix HImode handling on H8/SX.
13800 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13801 (subqi3, subhi3, subsi3 expanders): Likewise.
13802 (andqi3, andhi3, andsi3 expanders): Likewise.
13803 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13804 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13805 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13806 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13807 (zero_extendqihi2, zero_extendqisi2): Likewise.
13808 (extendqihi2, extendqisi2): Likewise.
13809 (rotlqi3, rotlhi3, rotlsi3): Likewise.
13810 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13811 (rotlqi3_1, rotlhi3_1): Likewise.
13812 (logicalhi3_sn, logicalsi3_sn): Likewise.
13813 (logicalhi3, logicalsi3): Likewise.
13815 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13817 * tree-vect-patterns.c (vect_recog_rotate_pattern)
13818 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13819 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13820 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13821 type to append_pattern_def_seq instead of creating a stmt_vec_info
13823 (build_mask_conversion): Likewise. Remove vinfo argument.
13824 (vect_add_conversion_to_patterm): Likewise, renaming to...
13825 (vect_add_conversion_to_pattern): ...this.
13826 (vect_recog_mask_conversion_pattern): Update call to
13827 build_mask_conversion. Pass the vector type to
13828 append_pattern_def_seq here too.
13829 (vect_recog_gather_scatter_pattern): Update call to
13830 vect_add_conversion_to_pattern.
13832 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13834 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13835 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13836 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13837 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13838 STMT_VINFO_PATTERN_DEF_SEQ to null here.
13839 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13840 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13841 append_pattern_def_seq instead of new_pattern_def_seq.
13842 (vect_recog_divmod_pattern): Do both of the above.
13843 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13846 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13848 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13849 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13850 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13851 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13852 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13853 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13854 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13855 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13856 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13857 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13858 parameter with a single stmt_vec_info.
13859 (vect_recog_func_ptr): Likewise.
13860 (vect_recog_gather_scatter_pattern): Likewise, folding in...
13861 (vect_try_gather_scatter_pattern): ...this.
13862 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13863 the stmt_vec_info of the statement to be matched. Don't clear
13864 STMT_VINFO_RELATED_STMT.
13865 (vect_pattern_recog): Update call accordingly.
13867 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13869 PR tree-optimization/85694
13870 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13871 (uavgM3_ceil): Document new optabs.
13872 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13873 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13875 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13876 (savg_ceil_optab): New optabs.
13877 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13878 (vect_vect_recog_func_ptrs): Add it.
13879 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13880 constant directly from the associated lhs.
13882 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13884 * tree-vect-patterns.c (vect_split_statement): New function.
13885 (vect_convert_input): Use it to try to split an existing cast.
13887 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13889 * poly-int.h (print_hex): New function.
13890 * dumpfile.h (dump_dec, dump_hex): Declare.
13891 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13892 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13893 min_input_precision, operation_precision and operation_sign.
13894 * tree-vect-patterns.c (vect_get_range_info): New function.
13895 (vect_same_loop_or_bb_p, vect_single_imm_use)
13896 (vect_operation_fits_smaller_type): Delete.
13897 (vect_look_through_possible_promotion): Add an optional
13898 single_use_p parameter.
13899 (vect_recog_over_widening_pattern): Rewrite to use new
13900 stmt_vec_info infomration. Handle one operation at a time.
13901 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13902 (vect_truncatable_operation_p, vect_set_operation_type)
13903 (vect_set_min_input_precision): New functions.
13904 (vect_determine_min_output_precision_1): Likewise.
13905 (vect_determine_min_output_precision): Likewise.
13906 (vect_determine_precisions_from_range): Likewise.
13907 (vect_determine_precisions_from_users): Likewise.
13908 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13909 (vect_vect_recog_func_ptrs): Put over_widening first.
13911 (vect_pattern_recog): Call vect_determine_precisions.
13913 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13915 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13916 statements that have been replaced by further pattern statements.
13917 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13919 2018-07-03 Richard Biener <rguenther@suse.de>
13921 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13922 always set *dt. Dump vectype in vectype overload.
13923 * dumpfile.h (dump_gimple_expr): New function.
13924 (dump_gimple_expr_loc): Likewise.
13925 * dumpfile.c (dump_gimple_expr): New function.
13926 (dump_gimple_expr_loc): Likewise.
13928 2018-07-02 Jeff Law <law@redhat.com>
13930 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13931 the H8/300, H8/300H and H8/S variants into a single pattern.
13932 (movhi_h8300, movqi_h8300hs): Similarly.
13933 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13934 (QHI mode iterator): New.
13936 * config/h8300/h8300.md: Remove trailing whitespace.
13938 2018-07-02 Jim Wilson <jimw@sifive.com>
13940 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13941 instead of emit_insn for interrupt returns.
13942 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13943 (riscv_sret, riscv_uret): Likewise.
13945 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13947 * pretty-print.c (selftest::test_pp_format): Move save and restore
13948 of quotes to class auto_fix_quotes, and add an instance.
13949 * selftest.c: Include "intl.h".
13950 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13951 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13952 * selftest.h (selftest::auto_fix_quotes): New class.
13954 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
13956 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13957 (aarch64_sve_prepare_conditional_op): Remove.
13958 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13959 Allow aarch64_simd_reg_or_zero as select operand; remove
13960 the aarch64_sve_prepare_conditional_op call.
13961 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13962 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13963 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13964 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13965 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13966 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13967 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13968 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13969 and a splitters to match all of the *_any patterns.
13970 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13972 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13973 (SVE_COND_FP_BINARY_REV): Remove.
13974 (sve_int_op_rev, sve_fp_op_rev): New.
13975 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13976 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13977 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13978 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13979 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13980 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13981 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13982 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13983 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13985 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13986 Remove match_dup 1 from the inner unspec.
13987 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13989 * config/aarch64/aarch64.md (movprfx): New attr.
13990 (length): Default movprfx to 8.
13991 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13992 (*madd<SVE_I>, *msub<SVE_I): Likewise.
13993 (*<su>mul<SVE_I>3_highpart): Likewise.
13994 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13995 (*v<ASHIFT><SVE_I>3): Likewise.
13996 (*<su><MAXMIN><SVE_I>3): Likewise.
13997 (*<su><MAXMIN><SVE_F>3): Likewise.
13998 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13999 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
14000 (*div<SVE_F>4): Likewise.
14002 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
14004 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
14007 2018-07-02 Richard Biener <rguenther@suse.de>
14009 PR tree-optimization/86363
14010 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
14011 memset argument refers to a non-variable address.
14013 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14015 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
14016 {PLUS,MINUS}_EXPR code to...
14017 (adjust_symbolic_bound): ...here,
14018 (combine_bound): ...here,
14019 (set_value_range_with_overflow): ...and here.
14021 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
14023 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
14025 (extract_range_from_abs_expr): ...here.
14027 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
14029 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
14030 -fno-omit-frame-pointer when not optimizing.
14032 2018-07-02 Martin Liska <mliska@suse.cz>
14035 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
14036 (propagate_nothrow): Likewise.
14038 2018-07-02 Martin Liska <mliska@suse.cz>
14041 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
14043 2018-07-02 David Malcolm <dmalcolm@redhat.com>
14045 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
14046 function in r262149, changing "loc" param from source_location to
14047 const dump_location_t &.
14048 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
14049 declaration, as above.
14051 2018-07-01 Paul Koning <ni1d@arrl.net>
14053 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14054 -munit-asm, -mgnu-asm, -mdec-asm.
14055 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
14056 (pdp11_output_labelref): New.
14057 (pdp11_output_def): New.
14058 (pdp11_output_addr_vec_elt): New.
14059 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
14060 %# and %@ format codes.
14061 (pdp11_option_override): New.
14062 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
14063 (pdp11_output_ident): New.
14064 (pdp11_asm_named_section): New.
14065 (pdp11_asm_init_sections): New.
14066 (pdp11_file_start): New.
14067 (pdp11_file_end): New.
14068 (output_ascii): Use .ascii/.asciz for -mdec-asm.
14069 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
14070 %o, like %c but octal.
14071 (pdp11_option_override): New.
14072 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
14074 (DATA_SECTION_ASM_OP): Ditto.
14075 (READONLY_DATA_SECTION_ASM_OP): New.
14076 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
14077 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
14078 (ASM_OUTPUT_LABELREF): Ditto.
14079 (ASM_OUTPUT_DEF): Ditto.
14080 (ASM_OUTPUT_EXTERNAL): New.
14081 (ASM_OUTPUT_SOURCE_FILENAME): New.
14082 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
14083 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
14084 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
14085 %# and %@ format codes.
14086 * config/pdp11/pdp11.opt (mgnu-asm): New.
14087 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
14088 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
14089 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
14091 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
14093 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
14094 dereferencing path[] beyond its length.
14096 (debug_all_paths): New.
14097 (rewire_first_differing_edge): New.
14098 (adjust_paths_after_duplication): New.
14099 (duplicate_thread_path): Call adjust_paths_after_duplication.
14101 (thread_through_all_blocks): Add new argument to
14102 duplicate_thread_path.
14104 2018-06-30 Jim Wilson <jimw@sifive.com>
14106 * config/riscv/predicates.md (p2m1_shift_operand): New.
14107 (high_mask_shift_operand): New.
14108 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
14109 pattern using p2m1_shift_operand.
14110 (lshsi3_zero_extend_3+2): New combiner pattern using
14111 high_mask_shift_operand.
14113 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14115 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
14117 (vect_recog_rotate_pattern): ...here.
14118 (vect_convert_input): Try to insert casts of invariants in the
14120 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
14121 preheader to be empty.
14123 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14125 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
14126 vector type. If given, install it in the new statement's
14127 STMT_VINFO_VECTYPE.
14128 (vect_element_precision): New function.
14129 (vect_unpromoted_value): New struct.
14130 (vect_unpromoted_value::vect_unpromoted_value): New function.
14131 (vect_unpromoted_value::set_op): Likewise.
14132 (vect_look_through_possible_promotion): Likewise.
14133 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
14134 (vect_widened_op_tree, vect_convert_input): Likewise.
14135 (vect_convert_inputs, vect_convert_output): Likewise.
14136 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
14137 to handle the optional cast of the multiplication result and
14138 vect_widened_op_tree to detect the widened multiplication itself.
14139 Do not require the input and output of promotion casts to have
14140 the same sign, but base the signedness of the operation on the
14141 input rather than the result. If the pattern includes two
14142 promotions, check that those promotions have the same sign.
14143 Do not restrict the MULT_EXPR handling to a double-width result;
14144 handle quadruple-width results and wider. Use vect_convert_inputs
14145 to convert the inputs to the common type.
14146 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
14147 to handle the optional cast of the ABS result. Also allow a sign
14148 change or a sign extension between the ABS and MINUS.
14149 Use vect_widened_op_tree to detect the widened subtraction and use
14150 vect_convert_inputs to convert the inputs to the common type.
14151 (vect_handle_widen_op_by_const): Delete.
14152 (vect_recog_widen_op_pattern): New function.
14153 (vect_recog_widen_mult_pattern): Use it.
14154 (vect_recog_widen_shift_pattern): Likewise.
14155 (vect_recog_widen_sum_pattern): Use
14156 vect_look_through_possible_promotion to handle the promoted
14159 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14161 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
14162 the containing gimple_seq *.
14163 * gimple-iterator.h (gsi_for_stmt): Declare it.
14164 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
14165 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14166 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14167 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14168 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14170 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14172 (vect_mark_pattern_stmts): ...here. Handle cases in which the
14173 statement being replaced is part of an existing pattern
14174 definition sequence, inserting the new pattern statements before
14176 (vect_pattern_recog_1): Don't return a bool. If the statement
14177 is already part of a pattern, instead apply pattern matching
14178 to the pattern definition statements. Don't clear the
14179 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
14180 (vect_pattern_recog): Don't break after the first match;
14181 continue processing the pattern definition statements instead.
14182 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
14184 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14186 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14187 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14188 (vect_recog_widen_sum_pattern): Use it.
14190 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14192 * tree-vect-loop.c (vectorizable_reduction): Assert that the
14193 phi is not a pattern statement and has not been replaced by
14194 a pattern statement.
14195 * tree-vect-patterns.c (type_conversion_p): Don't check
14196 STMT_VINFO_IN_PATTERN_P.
14197 (vect_recog_vector_vector_shift_pattern): Likewise.
14198 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
14199 the pattern statement rather than the original statement; check
14200 directly for a WIDEN_MULT_EXPR here.
14201 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
14202 vect_is_simple_use to return the pattern statement rather
14203 than the original statement; use is_pattern_stmt_p to check
14204 for such a pattern statement.
14205 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
14206 to return the pattern statement rather than the original statement;
14207 don't do the same transformation here.
14208 (vect_is_simple_use): If the defining statement has been replaced
14209 by a pattern statement, return the pattern statement instead.
14210 Remove the corresponding (local) transformation from the vectype
14213 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
14215 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14216 end and default to null.
14217 * tree-vect-loop.c (vect_create_epilog_for_reduction)
14218 (vectorizable_reduction): Update calls accordingly, dropping the
14219 gimple ** argument if the passed-back statement isn't needed.
14220 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14221 (vect_recog_rotate_pattern): Likewise.
14222 (vect_recog_mask_conversion_pattern): Likewise.
14223 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14224 (vect_mask_constant_operand_p): Likewise.
14225 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14226 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14227 (get_group_load_store_type, get_load_store_type): Likewise.
14228 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14229 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14230 (vectorizable_conversion, vectorizable_assignment): Likewise.
14231 (vectorizable_shift, vectorizable_operation): Likewise.
14232 (vectorizable_store, vect_is_simple_cond): Likewise.
14233 (vectorizable_condition, vectorizable_comparison): Likewise.
14234 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14235 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14236 and move it to the end. Cope with null def_stmt_outs.
14238 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
14240 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14242 2018-06-29 Jeff Law <law@redhat.com>
14244 * config/v850/v850.c (v850_legitimate_address_p): Handle large
14245 displacements for TARGET_V850E2V3 and newer.
14246 (TARGET_LRA_P): Remove. Defaults to LRA now.
14247 * config/v850/v850.md (sign23byte_load): Remove.
14248 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14249 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14251 2018-06-29 Martin Liska <mliska@suse.cz>
14254 * coverage.c (coverage_init): Mangle full path name.
14255 * doc/invoke.texi: Document the change.
14256 * gcov-io.c (mangle_path): New.
14257 * gcov-io.h (mangle_path): Likewise.
14258 * gcov.c (mangle_name): Use mangle_path for path mangling.
14260 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14262 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14263 if starting source register is not even.
14265 2018-06-29 Martin Liska <mliska@suse.cz>
14267 PR tree-optimization/86263
14268 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14269 Make edge redirection.
14271 2018-06-29 David Malcolm <dmalcolm@redhat.com>
14273 * dumpfile.c (dump_loc): Add indentation based on scope depth.
14274 (dump_scope_depth): New variable.
14275 (get_dump_scope_depth): New function.
14276 (dump_begin_scope): New function.
14277 (dump_end_scope): New function.
14278 * dumpfile.h (get_dump_scope_depth): New declaration.
14279 (dump_begin_scope): New declaration.
14280 (dump_end_scope): New declaration.
14281 (class auto_dump_scope): New class.
14282 (AUTO_DUMP_SCOPE): New macro.
14283 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14286 2018-06-29 Richard Biener <rguenther@suse.de>
14288 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14289 compute_all_dependences succeeds.
14290 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14291 exceed --param loop-max-datarefs-for-datadeps.
14293 2018-06-29 Jakub Jelinek <jakub@redhat.com>
14295 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14297 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
14300 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14301 alternative 0 in preferred_for_speed attribute.
14303 2018-06-28 Paul Koning <ni1d@arrl.net>
14305 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14306 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14307 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14308 * config/pdp11/pdp11.md: Correct "length" attribute calculation
14309 for shift insn patterns.
14311 2018-06-28 David Malcolm <dmalcolm@redhat.com>
14313 * cgraph.c (cgraph_node::get_body): Replace assignments to
14314 "dump_file" with calls to set_dump_file.
14315 * dumpfile.c (alt_dump_file): Make static, and group with...
14316 (alt_flags): ...this definition.
14317 (dumps_are_enabled): New variable.
14318 (refresh_dumps_are_enabled): New function.
14319 (set_dump_file): New function.
14320 (set_alt_dump_file): New function.
14321 (gcc::dump_manager::dump_start): Replace assignments to
14322 "dump_file" and "alt_dump_file" with calls to set_dump_file and
14324 (gcc::dump_manager::dump_finish): Likewise.
14325 * dumpfile.h (alt_dump_file): Delete decl.
14326 (dumps_are_enabled): New variable decl.
14327 (set_dump_file): New function decl.
14328 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14330 * tree-nested.c (lower_nested_functions): Replace assignments to
14331 "dump_file" with calls to set_dump_file.
14333 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14335 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14336 goto_locus of each outgoing edge of each basic block.
14338 2018-06-28 Richard Biener <rguenther@suse.de>
14340 * dwarf2out.c (decl_scope_table): Remove.
14341 (push_decl_scope): Likewise.
14342 (pop_decl_scope): Likewise.
14343 (gen_type_die_for_member): Do not call push/pop_decl_scope.
14344 (gen_struct_or_union_type_die): Likewise.
14345 (gen_tagged_type_die): Likewise.
14346 (dwarf2out_init): Do not initialize decl_scope_table.
14347 (dwarf2out_c_finalize): Do not free it.
14349 2018-06-28 Richard Biener <rguenther@suse.de>
14351 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14352 deciding whether to not re-use a DIE.
14354 2018-06-28 Richard Biener <rguenther@suse.de>
14356 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14357 DW_AT_abstract_origin attribute.
14359 2018-06-28 Martin Liska <mliska@suse.cz>
14361 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14362 Use newly introduced constants.
14363 * tree-switch-conversion.h (struct jump_table_cluster):
14364 Define max_ratio_for_size and max_ratio_for_speed.
14366 2018-06-28 Martin Liska <mliska@suse.cz>
14368 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14369 Add new checking assert to catch invalid state.
14370 (jump_table_cluster::can_be_handled): Handle single case
14372 (jump_table_cluster::is_beneficial): Bail out for such case.
14373 (bit_test_cluster::find_bit_tests):
14374 Add new checking assert to catch invalid state.
14375 (bit_test_cluster::can_be_handled): Handle single case
14377 (bit_test_cluster::is_beneficial): Bail out for such case.
14378 (switch_decision_tree::analyze_switch_statement):
14381 2018-06-28 Martin Liska <mliska@suse.cz>
14383 * common.opt: Introduce -completion option.
14384 * gcc.c (driver_handle_option): Handle it.
14385 (driver::main): Print completions if completion
14387 * opt-suggestions.c (option_proposer::get_completions):
14389 (option_proposer::suggest_completion): Likewise.
14390 (option_proposer::find_param_completions): Likewise.
14391 (verify_autocompletions): Likewise.
14392 (test_completion_valid_options): Likewise.
14393 (test_completion_valid_params): Likewise.
14394 (in_completion_p): Likewise.
14395 (empty_completion_p): Likewise.
14396 (test_completion_partial_match): Likewise.
14397 (test_completion_garbage): Likewise.
14398 (opt_proposer_c_tests): Likewise.
14399 * opt-suggestions.h: Declare new functions.
14400 * opts.c (common_handle_option): Handle OPT__completion_.
14401 * selftest-run-tests.c (selftest::run_tests): Add
14402 opt_proposer_c_tests.
14403 * selftest.c (assert_str_startswith): New.
14404 * selftest.h (assert_str_startswith): Likewise.
14405 (opt_proposer_c_tests): New.
14406 (ASSERT_STR_STARTSWITH): Likewise.
14408 2018-06-28 Martin Liska <mliska@suse.cz>
14410 * Makefile.in: Add opt-suggestions.o.
14411 * gcc-main.c: Include opt-suggestions.h.
14412 * gcc.c (driver::driver): Likewise.
14413 (driver::~driver): Remove m_option_suggestions.
14414 (driver::build_option_suggestions): Moved to option_proposer.
14415 (driver::suggest_option): Likewise.
14416 (driver::handle_unrecognized_options): Use option_proposer.
14417 * gcc.h (class driver): Add new memver m_option_proposer.
14418 * opt-suggestions.c: New file.
14419 * opt-suggestions.h: New file.
14421 2018-06-28 Martin Liska <mliska@suse.cz>
14423 * vec.h (class auto_string_vec): New (moved from auto_argvec).
14424 (auto_string_vec::~auto_string_vec): Likewise.
14426 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14428 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14429 prevent_decl_creation_for_types fields up and add reset_location field.
14430 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14431 statement if id->reset_location is true.
14432 (copy_edges_for_bb): Do not set goto_locus on the new edges if
14433 id->reset_location is true.
14434 (copy_phis_for_bb): Force input_location on the arguments if
14435 id->reset_location is true.
14436 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14437 is set on the function to be inlined.
14439 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
14441 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14443 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
14445 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14446 registers for Pmode.
14447 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14448 hard registers for the clobbered pseudo.
14450 2018-06-27 Paul Koning <ni1d@arrl.net>
14452 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14453 mutually exclusive options.
14454 * config/pdp11/constraints.md (h): New constraint.
14455 (O): Update definition to match shift code generation.
14456 (D): New constraint.
14457 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14459 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14461 (output_jump): Change arguments.
14462 (pdp11_fixed_cc_regs): New function.
14463 (pdp11_cc_mode): Ditto.
14464 (pdp11_expand_shift): Ditto.
14465 (pdp11_assemble_shift): Ditto.
14466 (pdp11_small_shift): Ditto.
14467 (pdp11_branch_cost): Remove.
14468 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14470 (pdp11_register_move_cost): Update for CC registers.
14471 (pdp11_rtx_costs): Add case for LSHIFTRT.
14472 (pdp11_output_jump): Add CCNZ mode conditional branches.
14473 (notice_update_cc_on_set): Remove.
14474 (pdp11_cc_mode): New function.
14475 (simple_memory_operand): Correct pre/post decrement case.
14476 (no_side_effect_operand): New function.
14477 (pdp11_regno_reg_class): Add CC_REGS class.
14478 (pdp11_fixed_cc_regs): New function.
14479 (pdp11_small_shift): New function.
14480 (pdp11_expand_shift): New function to expand shift insns.
14481 (pdp11_assemble_shift): New function to output shifts.
14482 (pdp11_branch_cost): Remove.
14483 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14484 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14485 (WCHAR_TYPE): Ditto.
14486 (PTRDIFF_TYPE): Ditto.
14487 (ADJUST_INSN_LENGTH): New macro.
14488 (FIXED_REGISTERS): Add CC registers.
14489 (CALL_USED_REGISTERS): Ditto.
14490 (reg_class): Ditto.
14491 (REG_CLASS_NAMES): Ditto.
14492 (REG_CLASS_CONTENTS): Ditto.
14493 (SELECT_CC_MODE): Use new function.
14494 (TARGET_FLAGS_REGNUM): New macro.
14495 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14496 (cc0_reg_rtx): Remove.
14497 (CC_STATUS_MDEP): Remove.
14498 (CC_STATUS_MDEFP_INIT): Remove.
14499 (CC_IN_FPU): Remove.
14500 (NOTICE_UPDATE_CC): Remove.
14501 (REGISTER_NAMES): Add CC registers.
14502 (BRANCH_COST): Change to constant 1.
14503 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14505 * config/pdp11/pdp11.opt (mbcopy): Remove.
14506 (mbcopy-builtin): Remove.
14507 (mbranch-cheap): Remove.
14508 (mbranch-expensive): Remove.
14509 * config/pdp11/predicates.md (expand_shift_operand): Update to
14510 match shift code generation.
14511 (ccnz_operator): New predicate.
14512 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14513 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14514 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14516 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14517 description of O constraint.
14519 2018-06-27 Jeff Law <law@redhat.com>
14520 Austin Law <austinklaw@gmail.com>
14522 * config/v850/v850.md (addsi3_set_flags): New pattern.
14523 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14524 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14525 (zero_extendhisi2_v850_set_flags): Likewise.
14526 (zero_extendqisi2_v850_set_flags): Likewise.
14527 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14528 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14529 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14531 * config/v850/v850-protos.h (notice_update_cc): Remove.
14532 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14533 (v850_print_operand): Handle 'D' and "d".
14534 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14535 Add handling of arithmetic/logical operations compared against zero.
14536 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14537 Do not look at v850_compare_op, instead get mode from last argument.
14538 (v850_gen_compare): Remove
14539 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14540 after reload for prologue insns.
14541 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14543 (construct_save_jarl): Likewise.
14544 (TARGET_FLAGS_REGNUM): Define.
14545 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14546 (NOTICE_UPDATE_CC): Remove.
14547 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14548 than cc0. Conditionalize on reload_completed.
14549 (cmpsi_insn, setfcc_insn): Likewise.
14550 (tst1 splitter): Turn into define_and_split which sets the flags
14552 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14553 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14554 (cstoresf4, cstoredf4): Clobber the flags.
14555 (cmpsi, cmpsf, cmpdf): Remove expanders.
14556 (setf_insn): Remove pattern.
14557 (addsi3): Turn into define_and_split which clobbers the flags after
14558 reload and a suitable pattern (addsi3_clobber_flags) for use after
14560 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14561 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14562 (ashrsi3, ashrsi3_v850e2): Likewise.
14563 (bins): Clobber the flags.
14564 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14565 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14566 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14567 (call_value_internal_short, call_value_internal_long): Likewise.
14568 (callt_save_interrupt, callt_return_interrupt): Likewise.
14569 (save_interrupt, return_interrupt): Likewise.
14570 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14571 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14572 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14573 (All FP comparisons): Only allow after reload has completed.
14575 (divh, divhu): Tweak output template.
14576 (branch_z_normal, branch_z_invert): Remove
14577 (branch_nz_normal, branch_nz_invert): Likewise.
14578 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14580 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14581 * config/v850/v850.c (notice_update_cc): Remove.
14582 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14583 (CC_NO_CARRY): Likewise.
14584 (NOTICE_UPDATE_CC): Define to nothing.
14585 * config/v850/v850.md: Remove block comment on cc0 handling
14586 Remove "cc" attribute from all patterns. Remove cc_status handling
14587 from all patterns. Minor formatting fixes.
14589 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14591 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14592 (cortex-a76.cortex-a55): Likewise.
14593 * config/aarch64/aarch64-tune.md: Regenerate.
14594 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14595 cortex-a76.cortex-a55.
14597 2018-06-27 Jeff Law <law@redhat.com>
14599 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14600 (MULTILIB_DIRNAMES): Similarly.
14602 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
14604 * gimple.h (gimple_return_retbnd): Delete.
14605 (gimple_return_set_retbnd): Likewise.
14606 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14607 gimple_return_set_retbnd.
14608 * gimple-pretty-print.c (dump_gimple_return): Remove call to
14609 gimple_return_retbnd and adjust.
14610 * tree-inline.h (struct copy_body_data): Remove retbnd field.
14611 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14612 Explicitly return NULL in a couple more cases. Move assertion
14613 on debug statements and remove unreachable code.
14614 (reset_debug_binding): Do not test id->retbnd.
14615 (expand_call_inline): Do not set it.
14617 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
14619 * configure.ac: Add --disable-gcov option.
14620 * configure: Regenerate.
14621 * Makefile.in: Honour @enable_gcov@.
14622 * doc/install.texi: Document --disable-gcov.
14624 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14626 * config/arm/arm-cpus.in (cortex-a76): New entry.
14627 (cortex-a76.cortex-a55): Likewise.
14628 * config/arm/arm-tables.opt: Regenerate.
14629 * config/arm/arm-tune.md: Likewise.
14630 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14631 * doc/invoke.texi (ARM Options): Document cortex-a76 and
14632 cortex-a76.cortex-a55.
14634 2018-06-27 Tamar Christina <tamar.christina@arm.com>
14637 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14639 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
14641 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14643 (EPILOGUE_USES): Likewise.
14645 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
14647 * tree-inline.c (remap_location): New function extracted from...
14648 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
14649 (copy_phis_for_bb): ...here. Call remap_location.
14650 (copy_cfg_body): Adjust call to copy_edges_for_bb.
14652 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
14654 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14655 unaligned vsx for 16B memset.
14657 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
14660 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14661 ieee128_float_type_node to long_double_type_node unless
14662 TARGET_LONG_DOUBLE_128 is set.
14664 2018-06-26 David Malcolm <dmalcolm@redhat.com>
14666 * cfgloop.c (get_loop_location): Convert return type from
14667 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14668 by implicit construction from rtx_insn *, and using
14669 dump_user_location_t::from_function_decl for the fallback case.
14670 * cfgloop.h (get_loop_location): Convert return type from
14671 location_t to dump_user_location_t.
14672 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14673 dump_printf_loc to pass in a dump_location_t rather than a
14674 location_t, via the gimple stmt.
14675 * coverage.c (get_coverage_counts): Update calls to
14676 dump_printf_loc to pass in dump_location_t rather than a
14678 * doc/optinfo.texi (Dump types): Convert example of
14679 dump_printf_loc from taking "locus" to taking "insn". Update
14680 description of the "_loc" calls to cover dump_location_t.
14681 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14683 (dump_user_location_t::dump_user_location_t): New constructors,
14684 from gimple *stmt and rtx_insn *.
14685 (dump_user_location_t::from_function_decl): New function.
14686 (dump_loc): Make static.
14687 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14688 const dump_location_t &.
14689 (dump_generic_expr_loc): Delete.
14690 (dump_printf_loc): Convert param "loc" from location_t to
14691 const dump_location_t &.
14692 (selftest::test_impl_location): New function.
14693 (selftest::dumpfile_c_tests): New function.
14694 * dumpfile.h: Include "profile-count.h".
14695 (class dump_user_location_t): New class.
14696 (struct dump_impl_location_t): New struct.
14697 (class dump_location_t): New class.
14698 (dump_printf_loc): Convert 2nd param from source_location to
14699 const dump_location_t &.
14700 (dump_generic_expr_loc): Delete.
14701 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14702 const dump_location_t &.
14703 * gimple-fold.c (fold_gimple_assign): Update call to
14704 dump_printf_loc to pass in a dump_location_t rather than a
14705 location_t, via the gimple stmt.
14706 (gimple_fold_call): Likewise.
14707 * gimple-loop-interchange.cc
14708 (loop_cand::analyze_iloop_reduction_var): Update for change to
14709 check_reduction_path.
14710 (tree_loop_interchange::interchange): Update for change to
14711 find_loop_location.
14712 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14713 change in return-type of find_loop_location.
14714 (graphite_regenerate_ast_isl): Likewise.
14715 * graphite-optimize-isl.c (optimize_isl): Likewise.
14716 * graphite.c (graphite_transform_loops): Likewise.
14717 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14718 pass in a dump_location_t rather than a location_t, via the
14720 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14721 * ipa.c (walk_polymorphic_call_targets): Likewise.
14722 * loop-unroll.c (report_unroll): Convert "locus" param from
14723 location_t to dump_location_t.
14724 (decide_unrolling): Update for change to get_loop_location's
14726 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14727 location_t to dump_user_location_t.
14728 (grid_find_single_omp_among_assignments_1): Updates calls to
14729 dump_printf_loc to pass in a dump_location_t rather than a
14730 location_t, via the gimple stmt.
14731 (grid_parallel_clauses_gridifiable): Convert "tloc" from
14732 location_t to dump_location_t. Updates calls to dump_printf_loc
14733 to pass in a dump_location_t rather than a location_t, via the
14735 (grid_inner_loop_gridifiable_p): Likewise.
14736 (grid_dist_follows_simple_pattern): Likewise.
14737 (grid_gfor_follows_tiling_pattern): Likewise.
14738 (grid_target_follows_gridifiable_pattern): Likewise.
14739 (grid_attempt_target_gridification): Convert initialization
14740 of local "grid" from memset to zero-initialization; FIXME: does
14741 this require C++11? Update call to dump_printf_loc to pass in a
14742 optinfo_location rather than a location_t, via the gimple stmt.
14743 * profile.c (read_profile_edge_counts): Updates call to
14744 dump_printf_loc to pass in a dump_location_t rather than a
14746 (compute_branch_probabilities): Likewise.
14747 * selftest-run-tests.c (selftest::run_tests): Call
14749 * selftest.h (dumpfile_c_tests): New decl.
14750 * tree-loop-distribution.c (pass_loop_distribution::execute):
14751 Update for change in return type of find_loop_location.
14752 * tree-parloops.c (parallelize_loops): Likewise.
14753 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14754 "locus" from location_t to dump_user_location_t.
14755 (canonicalize_loop_induction_variables): Likewise.
14756 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14757 for change in return type of find_loop_location.
14758 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14759 to dump_printf_loc to pass in a dump_location_t rather than a
14760 location_t, via the stmt.
14761 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14763 * tree-vect-loop-manip.c (find_loop_location): Convert return
14764 type from source_location to dump_user_location_t.
14765 (vect_do_peeling): Update for above change.
14766 (vect_loop_versioning): Update for change in type of
14768 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14769 from location_t to dump_user_location_t.
14770 (vect_estimate_min_profitable_iters): Update for change in type
14772 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14773 location_t to dump_location_t.
14774 (vect_slp_bb): Update for change in type of vect_location.
14775 * tree-vectorizer.c (vect_location): Convert from source_location
14776 to dump_user_location_t.
14777 (try_vectorize_loop_1): Update for change in vect_location's type.
14778 (vectorize_loops): Likewise.
14779 (increase_alignment): Likewise.
14780 * tree-vectorizer.h (vect_location): Convert from source_location
14781 to dump_user_location_t.
14782 (find_loop_location): Convert return type from source_location to
14783 dump_user_location_t.
14784 (check_reduction_path): Convert 1st param from location_t to
14785 dump_user_location_t.
14786 * value-prof.c (check_counter): Update call to dump_printf_loc to
14787 pass in a dump_user_location_t rather than a location_t; update
14788 call to error_at for change in type of "locus".
14789 (check_ic_target): Update call to dump_printf_loc to
14790 pass in a dump_user_location_t rather than a location_t, via the
14793 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
14795 * config/s390/s390.h (enum processor_flags): Do not use
14796 default tune parameter when -march was specified.
14798 2018-06-26 Jakub Jelinek <jakub@redhat.com>
14801 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14802 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14805 2018-06-26 Richard Biener <rguenther@suse.de>
14807 PR tree-optimization/86287
14809 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14810 (vect_analyze_loop): Initialize n_stmts.
14812 2018-06-26 Richard Biener <rguenther@suse.de>
14814 PR middle-end/86271
14815 * fold-const.c (fold_convertible_p): Pointer extension
14818 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
14821 * dwarf2out.c (loc_list_has_views): Adjust comments.
14822 (dw_loc_list): Split single cross-partition range with
14825 2018-06-25 Jeff Law <law@redhat.com>
14827 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14828 on -mbig-switch by default.
14830 * config/v850/predicates.md (const_float_1_operand): Fix match_code
14832 (const_float_0_operand): Remove unused predicate.
14833 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14834 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14835 (recipsf2): New expander. Original pattern now called
14837 (recipdf2, recipdf2_insn): Similarly.
14838 (rsqrtsf2, rsqrtsf2_insn): Similarly
14839 (rsqrtdf2, rsqrtdf2_insn): Similarly
14841 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
14843 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14844 Simplify logic for FreeBSD (twice).
14846 2018-06-25 Martin Sebor <msebor@redhat.com>
14848 PR tree-optimization/86204
14849 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14850 a strnlen result if it's less than the length of the string.
14852 2018-06-25 Martin Sebor <msebor@redhat.com>
14854 PR tree-optimization/85700
14855 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14856 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14857 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14859 2018-06-25 Martin Sebor <msebor@redhat.com>
14861 * doc/extend.texi (Zero-length arrays): Update and clarify.
14863 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
14865 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14866 added IEEE/IBM long double multilib support on PowerPC little
14867 endian Linux systems.
14868 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14869 (MULTILIB_DEFAULTS): Likewise.
14870 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14872 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14873 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14874 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14876 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
14878 PR middle-end/86311
14879 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14880 (REORDER_45): Likewise.
14882 2018-06-25 Jeff Law <law@redhat.com>
14884 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14885 dividend to 32 bits. Adjust length.
14886 (udivmodhi4): Cleanup output template. Fix length.
14888 2018-06-25 Carl Love <cel@us.ibm.com>
14890 * config/rs6000/vsx.md: Change word selector to prefered location.
14892 2018-06-25 Richard Biener <rguenther@suse.de>
14894 PR tree-optimization/86304
14895 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14896 epilogue-if-converted loops as well.
14898 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
14900 * lto-section-out.c (lto_begin_section): Do not print section
14901 name for noaddr and unnumbered dumps.
14903 2018-06-25 Richard Biener <rguenther@suse.de>
14905 * tree-vectorizer.h (struct vec_info_shared): New structure
14906 with parts split out from struct vec_info and loop_nest from
14907 struct _loop_vec_info.
14908 (struct vec_info): Adjust accordingly.
14909 (struct _loop_vec_info): Likewise.
14910 (LOOP_VINFO_LOOP_NEST): Adjust.
14911 (LOOP_VINFO_DATAREFS): Likewise.
14912 (LOOP_VINFO_DDRS): Likewise.
14913 (struct _bb_vec_info): Likewise.
14914 (BB_VINFO_DATAREFS): Likewise.
14915 (BB_VINFO_DDRS): Likewise.
14916 (struct _stmt_vec_info): Add dr_aux member.
14917 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14918 (DR_MISALIGNMENT_UNINITIALIZED): New.
14919 (set_dr_misalignment): Adjust.
14920 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14921 (vect_analyze_loop): Adjust prototype.
14922 (vect_analyze_loop_form): Likewise.
14923 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14924 Compute dependences lazily.
14925 (vect_record_base_alignments): Use shared datarefs/ddrs.
14926 (vect_verify_datarefs_alignment): Likewise.
14927 (vect_analyze_data_refs_alignment): Likewise.
14928 (vect_analyze_data_ref_accesses): Likewise.
14929 (vect_analyze_data_refs): Likewise.
14930 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14931 constructor parameter for shared part.
14932 (vect_analyze_loop_form): Pass in shared part and adjust.
14933 (vect_analyze_loop_2): Pass in storage for the number of
14934 stmts. Move loop nest finding to the caller. Compute
14936 (vect_analyze_loop): Pass in shared part.
14937 (vect_transform_loop): Verify shared datarefs are unchanged.
14938 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14939 constructor parameter for shared part.
14940 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14941 (vect_slp_bb): Verify shared datarefs are unchanged before
14943 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14945 (new_stmt_vec_info): Initialize DR_AUX misalignment to
14946 DR_MISALIGNMENT_UNINITIALIZED.
14947 * tree-vectorizer.c (vec_info::vec_info): Add constructor
14948 parameter for shared part.
14949 (vec_info::~vec_info): Adjust.
14950 (vec_info_shared::vec_info_shared): New.
14951 (vec_info_shared::~vec_info_shared): Likewise.
14952 (vec_info_shared::save_datarefs): Likewise.
14953 (vec_info_shared::check_datarefs): Likewise.
14954 (try_vectorize_loop_1): Construct shared part live for analyses
14955 of a single loop for multiple vector sizes.
14956 * tree-parloops.c (gather_scalar_reductions): Adjust.
14958 2018-06-25 Richard Biener <rguenther@suse.de>
14960 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14961 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14962 (vect_analyze_data_refs): Remove similar code from here and
14963 simplify accordingly.
14965 2018-06-25 Richard Biener <rguenther@suse.de>
14967 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14968 for reverse storage order accesses rather than asserting
14969 they cannot happen here.
14971 2018-06-25 Tom de Vries <tdevries@suse.de>
14974 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14975 Use data16 instead of .byte for insn prefix.
14977 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
14980 * parser.c (make_char_string_pack): Pass this literal chars
14981 through cpp_interpret_string.
14982 (cp_parser_userdef_numeric_literal): Check the result of
14983 make_char_string_pack.
14985 2018-06-24 Maya Rashish <coypu@sdf.org>
14987 * ginclude/stddef.h: Simplify conditions around avoiding
14988 re-definition of __size_t.
14990 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14992 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14993 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14995 2018-06-22 Maya Rashish <coypu@sdf.org>
14997 * doc/invoke.texi (mno-fancy-math-387): Update for changes
14998 made to OpenBSD and NetBSD through the years.
15000 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
15002 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15003 behavior of vec_pack (vector double, vector double) to match
15004 behavior of vec_float2 (vector double, vector double).
15006 2018-06-22 Olivier Hainque <hainque@adacore.com>
15008 * gimplify.c (gimplify_function_tree): Prevent creation
15009 of a trampoline for the address of the current function
15010 passed to entry/exit instrumentation hooks.
15012 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
15015 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
15018 2018-06-22 Martin Liska <mliska@suse.cz>
15020 PR tree-optimization/86263
15021 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15022 Bail out if is_enabled is false.
15023 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
15025 (jump_table_cluster::is_enabled): New function.
15027 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15029 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15030 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
15031 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
15032 (lto_input_ts_binfo_tree_pointers): Likewise.
15033 * tree-streamer-out.c (streamer_write_tree_bitfields,
15034 write_ts_binfo_tree_pointers): Likewise.
15035 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
15037 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
15039 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
15041 2018-06-22 Martin Liska <mliska@suse.cz>
15043 * symbol-summary.h (get): Make it pure and inline move
15044 functionality from ::get function.
15045 (get): Remove and inline into ::get and ::get_create.
15046 (get_create): Move code from ::get function.
15048 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15051 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
15052 -x assembler-with-cpp.
15054 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15056 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
15057 _FILE_OFFSET_BITS=64 for C++.
15059 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
15061 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
15062 conversion insn that shows up when pr85657-3.c is compiled using
15063 IEEE 128-bit long double.
15064 (neg<mode>2_internal): Use the correct mode to check whether the
15065 mode is IBM extended.
15066 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
15067 multiply and divide external functions from being created more
15070 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15072 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
15074 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
15075 the edge can be forwarded.
15076 (cfg_layout_merge_blocks): Likewise.
15078 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15080 * except.c (finish_eh_generation): Commit edge insertions only after
15081 the EH edges have been redirected from post-landing to landing pads.
15083 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15085 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
15086 create_tmp_var_for to create the FRAME decl.
15087 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
15089 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
15091 * tree-inline.c (copy_edges_for_bb): Minor tweak.
15092 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
15093 debug statement when resetting its value.
15094 (expand_call_inline): Copy the locus of the call onto the assignment
15095 of the return value, if any. Use local variable in more cases.
15097 2018-06-21 Martin Liska <mliska@suse.cz>
15099 * ipa-pure-const.c (propagate_nothrow): Use
15100 funct_state_summaries->get.
15101 (dump_malloc_lattice): Likewise.
15102 (propagate_malloc): Likewise.
15104 2018-06-21 Richard Biener <rguenther@suse.de>
15106 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
15107 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
15108 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
15110 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
15111 BLOCK_ABSTRACT_ORIGIN unconditionally.
15113 2018-06-21 David Malcolm <dmalcolm@redhat.com>
15115 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
15117 * ipa-reference.c (ipa_reference_c_finalize): Delete
15118 ipa_ref_opt_sum_summaries and set it to NULL.
15120 2018-06-21 Tom de Vries <tdevries@suse.de>
15122 PR tree-optimization/85859
15123 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
15124 test with comment from bb_no_side_effects_p.
15126 2018-06-21 Richard Biener <rguenther@suse.de>
15128 PR tree-optimization/86232
15129 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
15130 max for constant niter.
15132 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15134 * config/aarch64/aarch64-simd.md
15135 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
15137 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
15139 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
15140 Make opernads of the unspec commutative.
15142 2018-06-21 Richard Biener <rguenther@suse.de>
15144 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
15145 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15146 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
15147 (vect_analyze_data_ref_dependence): Re-order checks to deal with
15149 (vect_record_base_alignments): Do not record base alignment
15150 for gathers or scatters.
15151 (vect_compute_data_ref_alignment): Drop return value that is always
15152 true. Bail out early for gathers or scatters.
15153 (vect_enhance_data_refs_alignment): Bail out early for gathers
15155 (vect_find_same_alignment_drs): Likewise.
15156 (vect_analyze_data_refs_alignment): Remove dead code.
15157 (vect_slp_analyze_and_verify_node_alignment): Likewise.
15158 (vect_analyze_data_refs): For possible gathers or scatters do
15159 not create an alternate DR, just check their possible validity
15160 and mark them. Adjust DECL_NONALIASED handling to not rely
15161 on DR_BASE_ADDRESS.
15162 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
15163 update inits of gathers or scatters.
15164 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
15165 Also copy gather/scatter flag to pattern vinfo.
15167 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
15169 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15170 behavior of vec_packsu (vector unsigned long long, vector unsigned
15171 long long) to match behavior of vec_packs with same signature.
15173 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
15174 Thomas Schwinge <thomas@codesourcery.com>
15175 Cesar Philippidis <cesar@codesourcery.com>
15177 * gimplify.c (gimplify_scan_omp_clauses): Add support for
15178 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15179 (gimplify_adjust_omp_clauses): Likewise.
15180 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
15181 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
15182 (gimplify_omp_target_update): Update handling of acc update and
15184 * omp-low.c (install_var_field): Remove unused parameter
15185 base_pointers_restrict.
15186 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
15187 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
15189 (omp_target_base_pointers_restrict_p): Delete.
15190 (scan_omp_target): Update call to scan_sharing_clauses.
15191 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
15193 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
15194 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15195 (convert_local_omp_clauses): Likewise.
15196 * tree-pretty-print.c (dump_omp_clause): Likewise.
15197 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
15199 (omp_clause_code_name): Likewise.
15201 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15204 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
15207 PR tree-optimization/86231
15208 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
15209 anti-range don't overwrite *vr0min before using it to compute *vr0max.
15211 2018-06-20 Tom de Vries <tdevries@suse.de>
15213 PR tree-optimization/86097
15214 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15215 iv type if signedness of iv type is not the same as that of *nit.
15217 2018-06-20 Jakub Jelinek <jakub@redhat.com>
15219 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
15220 EDGE_EH edges, verify they are all EDGE_EH.
15222 2018-06-20 Maya Rashish <coypu@sdf.org>
15224 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15226 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15228 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15229 * config/aarch64/aarch64.c (xgene1_tunings): Add
15230 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15231 (aarch64_mode_valid_for_sched_fusion_p):
15232 Allow 16-byte modes.
15233 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15234 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15236 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15238 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15239 * config/aarch64/iterators.md (VQ2): New mode iterator.
15241 2018-06-20 Martin Liska <mliska@suse.cz>
15243 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15244 Change default ratio from 10 to 8.
15246 2018-06-20 Martin Liska <mliska@suse.cz>
15248 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15250 (bit_test_cluster::find_bit_tests): Likewise.
15251 (switch_decision_tree::analyze_switch_statement): Find clusters.
15252 * tree-switch-conversion.h (struct jump_table_cluster): Document
15255 2018-06-20 Martin Liska <mliska@suse.cz>
15257 * tree-switch-conversion.c (switch_conversion::collect):
15258 Record m_uniq property.
15259 (switch_conversion::expand): Bail out for special conditions.
15260 (group_cluster::~group_cluster): New.
15261 (group_cluster::group_cluster): Likewise.
15262 (group_cluster::dump): Likewise.
15263 (jump_table_cluster::emit): New.
15264 (switch_decision_tree::fix_phi_operands_for_edges): New.
15265 (struct case_node): Remove struct.
15266 (jump_table_cluster::can_be_handled): New.
15267 (case_values_threshold): Moved to header.
15268 (reset_out_edges_aux): Likewise.
15269 (jump_table_cluster::is_beneficial): New.
15270 (bit_test_cluster::can_be_handled): Likewise.
15271 (add_case_node): Remove.
15272 (bit_test_cluster::is_beneficial): New.
15273 (case_bit_test::cmp): New.
15274 (bit_test_cluster::emit): New.
15275 (expand_switch_as_decision_tree_p): Remove.
15276 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15277 (fix_phi_operands_for_edge): Likewise.
15278 (switch_decision_tree::analyze_switch_statement): New.
15279 (compute_cases_per_edge): Move ...
15280 (switch_decision_tree::compute_cases_per_edge): ... here.
15281 (try_switch_expansion): Likewise.
15282 (switch_decision_tree::try_switch_expansion): Likewise.
15283 (record_phi_operand_mapping): Likewise.
15284 (switch_decision_tree::record_phi_operand_mapping): Likewise.
15285 (emit_case_decision_tree): Likewise.
15286 (switch_decision_tree::emit): Likewise.
15287 (balance_case_nodes): Likewise.
15288 (switch_decision_tree::balance_case_nodes): Likewise.
15289 (dump_case_nodes): Likewise.
15290 (switch_decision_tree::dump_case_nodes): Likewise.
15291 (emit_jump): Likewise.
15292 (switch_decision_tree::emit_jump): Likewise.
15293 (emit_cmp_and_jump_insns): Likewise.
15294 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15295 (emit_case_nodes): Likewise.
15296 (switch_decision_tree::emit_case_nodes): Likewise.
15297 (conditional_probability): Remove.
15298 * tree-switch-conversion.h (enum cluster_type): New.
15300 (struct cluster): Likewise.
15301 (cluster::cluster): Likewise.
15302 (struct simple_cluster): Likewise.
15303 (simple_cluster::simple_cluster): Likewise.
15304 (struct group_cluster): Likewise.
15305 (struct jump_table_cluster): Likewise.
15306 (struct bit_test_cluster): Likewise.
15307 (struct min_cluster_item): Likewise.
15308 (struct case_tree_node): Likewise.
15309 (case_tree_node::case_tree_node): Likewise.
15310 (jump_table_cluster::case_values_threshold): Likewise.
15311 (struct case_bit_test): Likewise.
15312 (struct switch_decision_tree): Likewise.
15313 (struct switch_conversion): Likewise.
15314 (switch_decision_tree::reset_out_edges_aux): Likewise.
15316 2018-06-20 Martin Liska <mliska@suse.cz>
15318 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15319 (hoist_edge_and_branch_if_true): Likewise.
15320 (expand_switch_using_bit_tests_p): Likewise.
15321 (struct case_bit_test): Likewise.
15322 (case_bit_test_cmp): Likewise.
15323 (emit_case_bit_tests): Likewise.
15324 (switch_conversion::switch_conversion): New class.
15325 (struct switch_conv_info): Remove old struct.
15326 (collect_switch_conv_info): More to ...
15327 (switch_conversion::collect): ... this.
15328 (check_range): Likewise.
15329 (switch_conversion::check_range): Likewise.
15330 (check_all_empty_except_final): Likewise.
15331 (switch_conversion::check_all_empty_except_final): Likewise.
15332 (check_final_bb): Likewise.
15333 (switch_conversion::check_final_bb): Likewise.
15334 (create_temp_arrays): Likewise.
15335 (switch_conversion::create_temp_arrays): Likewise.
15336 (free_temp_arrays): Likewise.
15337 (gather_default_values): Likewise.
15338 (switch_conversion::gather_default_values): Likewise.
15339 (build_constructors): Likewise.
15340 (switch_conversion::build_constructors): Likewise.
15341 (constructor_contains_same_values_p): Likewise.
15342 (switch_conversion::contains_same_values_p): Likewise.
15343 (array_value_type): Likewise.
15344 (switch_conversion::array_value_type): Likewise.
15345 (build_one_array): Likewise.
15346 (switch_conversion::build_one_array): Likewise.
15347 (build_arrays): Likewise.
15348 (switch_conversion::build_arrays): Likewise.
15349 (gen_def_assigns): Likewise.
15350 (switch_conversion::gen_def_assigns): Likewise.
15351 (prune_bbs): Likewise.
15352 (switch_conversion::prune_bbs): Likewise.
15353 (fix_phi_nodes): Likewise.
15354 (switch_conversion::fix_phi_nodes): Likewise.
15355 (gen_inbound_check): Likewise.
15356 (switch_conversion::gen_inbound_check): Likewise.
15357 (process_switch): Use the newly created class.
15358 (switch_conversion::expand): New.
15359 (switch_conversion::~switch_conversion): New.
15360 * tree-switch-conversion.h: New file.
15362 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15364 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15365 tree-vect-patterns.c.
15366 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15367 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
15368 (vect_recog_sad_pattern): Likewise.
15369 (vect_recog_widen_sum_pattern): Likewise.
15370 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
15371 (vect_recog_widen_shift_pattern): Remove the type_in argument.
15372 (vect_recog_rotate_pattern): Likewise.
15373 (vect_recog_mult_pattern): Likewise.
15374 (vect_recog_vector_vector_shift_pattern): Likewise.
15375 (vect_recog_divmod_pattern): Likewise.
15376 (vect_recog_mixed_size_cond_pattern): Likewise.
15377 (vect_recog_bool_pattern): Likewise.
15378 (vect_recog_mask_conversion_pattern): Likewise.
15379 (vect_try_gather_scatter_pattern): Likewise.
15380 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
15381 (vect_recog_over_widening_pattern): Likewise.
15382 (vect_recog_gather_scatter_pattern): Likewise.
15383 (vect_recog_func_ptr): Move from tree-vectorizer.h
15384 (vect_vect_recog_func_ptrs): Move further down the file.
15385 (vect_recog_func): Likewise. Remove the third argument.
15386 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15387 (vect_pattern_recog_1): Expect the pattern function to do any
15388 necessary target tests. Also expect it to provide a vector type.
15389 Remove the type_in handling.
15391 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15393 * tree-vect-patterns.c (vect_pattern_detected): New function.
15394 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15395 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15396 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15397 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15398 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15399 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15400 (vect_recog_mask_conversion_pattern)
15401 (vect_try_gather_scatter_pattern): Likewise.
15403 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15405 * tree-vect-patterns.c (vect_get_internal_def): New function.
15406 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15407 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15408 (search_type_for_mask_1): Use it.
15410 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15412 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15413 redundant WIDEN_SUM_EXPR handling.
15414 (vect_recog_sad_pattern): Likewise.
15416 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15418 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15419 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15420 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15421 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15422 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15424 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15426 * tree-vect-stmts.c (vectorizable_call): Make sure that we
15427 use the stmt_vec_info of the original bb statement for the
15428 new zero assignment, even if the call is part of a pattern.
15430 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15432 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15433 that the sequence is attached to the original statement rather
15434 than the pattern statement.
15435 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15436 PATTERN_DEF_SEQ from the original statement rather than
15437 the main pattern statement.
15438 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15439 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15440 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15442 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15444 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15445 definition statements before the early exit for statements that aren't
15447 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15449 (vect_transform_loop): ...here. Process pattern definition
15450 statements without first checking whether the main pattern
15451 statement is live or relevant.
15453 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15455 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15456 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15458 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
15460 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15461 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15462 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15463 (expand_block_compare): Change select_block_compare_mode call.
15464 (expand_strncmp_align_check): Use new functions, fix comment.
15465 (emit_final_str_compare_gpr): New function.
15466 (expand_strn_compare): Refactor and clean up code.
15467 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15469 2018-06-19 Tony Reix <tony.reix@atos.com>
15470 Damien Bergamini <damien.bergamini@atos.com>
15471 David Edelsohn <dje.gcc@gmail.com>
15473 * collect2.c (static_obj): New variable.
15474 (static_libs): New variable.
15475 (is_in_list): Uncomment declaration.
15476 (main): Track AIX libraries linked statically.
15477 (is_in_list): Uncomment definition.
15478 (scan_prog_file): Don't add AIX shared libraries initializer
15479 to constructor list if linking statically.
15481 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
15483 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15485 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15487 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
15489 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15492 2018-06-19 Martin Liska <mliska@suse.cz>
15494 * config/i386/i386.c (ix86_can_inline_p): Do not use
15495 ipa_fn_summaries::get_create.
15496 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15498 (devirtualization_time_bonus): Likewise.
15499 (ipcp_propagate_stage): Likewise.
15500 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15501 (edge_set_predicate): Likewise.
15502 (evaluate_conditions_for_known_args): Likewise.
15503 (evaluate_properties_for_edge): Likewise.
15504 (ipa_call_summary::reset): Tranform to ...
15505 (ipa_call_summary::~ipa_call_summary): ... this.
15506 (ipa_fn_summary::reset): Transform to ...
15507 (ipa_fn_summary::~ipa_fn_summary): ... this.
15508 (ipa_fn_summary_t::remove): Rename to ...
15509 (ipa_fn_summary_t::remove_callees): ... this.
15510 (ipa_fn_summary_t::duplicate): Use placement new
15511 instead of memory copy.
15512 (ipa_call_summary_t::duplicate): Likewise.
15513 (ipa_call_summary_t::remove): Remove.
15514 (dump_ipa_call_summary): Change get_create to get.
15515 (ipa_dump_fn_summary): Dump only when summary exists.
15516 (analyze_function_body): Use symbol_summary::get instead
15518 (compute_fn_summary): Likewise.
15519 (estimate_edge_devirt_benefit): Likewise.
15520 (estimate_edge_size_and_time): Likewise.
15521 (inline_update_callee_summaries): Likewise.
15522 (remap_edge_change_prob): Likewise.
15523 (remap_edge_summaries): Likewise.
15524 (ipa_merge_fn_summary_after_inlining): Likewise.
15525 (write_ipa_call_summary): Likewise.
15526 (ipa_fn_summary_write): Likewise.
15527 (ipa_free_fn_summary): Likewise.
15528 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15529 (struct ipa_call_summary): Likewise.
15530 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15532 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15533 (estimate_size_after_inlining): Likewise.
15534 (estimate_growth): Likewise.
15535 (growth_likely_positive): Likewise.
15536 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15537 (inline_call): Likewise.
15538 * ipa-inline.c (caller_growth_limits): Likewise.
15539 (can_inline_edge_p): Likewise.
15540 (can_inline_edge_by_limits_p): Likewise.
15541 (compute_uninlined_call_time): Likewise.
15542 (compute_inlined_call_time): Likewise.
15543 (want_inline_small_function_p): Likewise.
15544 (edge_badness): Likewise.
15545 (update_caller_keys): Likewise.
15546 (update_callee_keys): Likewise.
15547 (inline_small_functions): Likewise.
15548 (inline_to_all_callers_1): Likewise.
15549 (dump_overall_stats): Likewise.
15550 (early_inline_small_functions): Likewise.
15551 (early_inliner): Likewise.
15552 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15553 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15554 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15555 * ipa-split.c (execute_split_functions): Likewise.
15556 * symbol-summary.h: Likewise.
15557 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15559 2018-06-19 Richard Biener <rguenther@suse.de>
15561 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15562 (vectorize_loops): ... here. Fix dbgcnt handling.
15563 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15565 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15568 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15569 ieee128 argument takes up only one (vector) register, not two (floating
15572 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15574 * gimplify.c (gimplify_init_constructor): Really never clear for an
15575 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15577 2018-06-19 Richard Biener <rguenther@suse.de>
15579 PR tree-optimization/86179
15580 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15581 after failed recognition.
15583 2018-06-18 Martin Sebor <msebor@redhat.com>
15585 PR middle-end/85602
15586 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15587 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15588 Handle integer subtraction.
15589 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15590 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15592 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15594 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15595 param from rtx to rtx_insn *.
15596 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15598 (frv_ifcvt_modify_insn): Likwise.
15599 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15600 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
15601 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15602 as_a <rtx_insn *> cast to local "unprotected_region" once
15603 it's been established that it's not NULL or pc_rtx.
15604 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15605 param "sethi" from rtx to rtx_insn *.
15606 (nds32_group_float_insns): Likewise for param "insn".
15607 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15609 (vax_output_int_subtract): Likewise.
15610 * config/vax/vax.c (vax_output_int_add): Likewise for param
15612 (vax_output_int_subtract): Likewise.
15613 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15614 (emit_pattern_after): Likewise for param "after".
15615 (emit_insn_after): Likewise.
15616 (emit_jump_insn_after): Likewise.
15617 (emit_call_insn_after): Likewise.
15618 (emit_debug_insn_after): Likewise.
15619 (emit_pattern_before): Likewise for param "before".
15620 (emit_insn_before): Likewise.
15621 (emit_jump_insn_before): Likewise.
15622 * final.c (get_insn_template): Likewise for param "insn", removing
15624 * output.h (get_insn_template): Likewise for 2nd param.
15625 * rtl.h (emit_insn_before): Likewise.
15626 (emit_jump_insn_before): Likewise.
15627 (emit_debug_insn_before_noloc): Likewise.
15628 (emit_insn_after): Likewise.
15629 (emit_jump_insn_after): Likewise.
15630 (emit_call_insn_after): Likewise.
15631 (emit_debug_insn_after): Likewise.
15632 (set_insn_deleted): Likewise for param.
15634 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
15637 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15638 floating point modes, so that IFmode is numerically greater than
15639 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15640 to declare the ordering. This prevents IFmode from being
15641 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15642 machine. Include rs6000-modes.h to share the fractional values
15643 between genmodes* and the rest of the compiler.
15644 (IFmode): Likewise.
15645 (KFmode): Likewise.
15646 (TFmode): Likewise.
15647 * config/rs6000/rs6000-modes.h: New file.
15648 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15649 meaning of rs6000_long_double_size so that 126..128 selects an
15650 appropriate 128-bit floating point type.
15651 (rs6000_option_override_internal): Likewise.
15652 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15653 (TARGET_LONG_DOUBLE_128): Change the meaning of
15654 rs6000_long_double_size so that 126..128 selects an appropriate
15655 128-bit floating point type.
15656 (LONG_DOUBLE_TYPE_SIZE): Update comment.
15657 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15658 source and destination to match the standard usage.
15659 (truncifkf2): Likewise.
15660 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15661 ISA 2.07 to use an explicit clobber, instead of passing in a
15663 (copysign<mode>3_soft): Likewise.
15665 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15667 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15668 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15669 (vect_slp_analyze_instance_dependence): Likewise.
15670 (vect_enhance_data_refs_alignment): Likewise.
15671 (vect_analyze_data_refs_alignment): Likewise.
15672 (vect_slp_analyze_and_verify_instance_alignment
15673 (vect_analyze_data_ref_accesses): Likewise.
15674 (vect_prune_runtime_alias_test_list): Likewise.
15675 (vect_analyze_data_refs): Likewise.
15676 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15677 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15678 (vect_analyze_scalar_cycles_1): Likewise.
15679 (vect_get_loop_niters): Likewise.
15680 (vect_analyze_loop_form_1): Likewise.
15681 (vect_update_vf_for_slp): Likewise.
15682 (vect_analyze_loop_operations): Likewise.
15683 (vect_analyze_loop): Likewise.
15684 (vectorizable_induction): Likewise.
15685 (vect_transform_loop): Likewise.
15686 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15687 * tree-vect-slp.c (vect_analyze_slp): Likewise.
15688 (vect_make_slp_decision): Likewise.
15689 (vect_detect_hybrid_slp): Likewise.
15690 (vect_slp_analyze_operations): Likewise.
15691 (vect_slp_bb): Likewise.
15692 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15693 (vectorizable_bswap): Likewise.
15694 (vectorizable_call): Likewise.
15695 (vectorizable_simd_clone_call): Likewise.
15696 (vectorizable_conversion): Likewise.
15697 (vectorizable_assignment): Likewise.
15698 (vectorizable_shift): Likewise.
15699 (vectorizable_operation): Likewise.
15700 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15702 2018-06-18 Martin Sebor <msebor@redhat.com>
15704 PR tree-optimization/81384
15705 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15706 * builtins.c (expand_builtin_strnlen): New function.
15707 (expand_builtin): Call it.
15708 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15709 * builtins.def (BUILT_IN_STRNLEN): New.
15710 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15711 Warn for bounds in excess of maximum object size.
15712 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15713 single-value ranges. Handle strnlen.
15714 (handle_builtin_strlen): Handle strnlen.
15715 (strlen_check_and_optimize_stmt): Same.
15716 * doc/extend.texi (Other Builtins): Document strnlen.
15718 2018-06-18 Maya Rashish <coypu@sdf.org>
15720 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15721 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15722 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15724 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15726 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15728 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15730 * tree.c (escaped_string::escape): Replace cast to char * by
15731 const_cast<char *> (unescaped).
15733 2018-06-18 Nick Clifton <nickc@redhat.com>
15736 * tree.c (escaped_string): New class. Converts an unescaped
15737 string into its escaped equivalent.
15738 (warn_deprecated_use): Use the new class to convert the
15739 deprecation message, if present.
15740 (test_escaped_strings): New self test.
15741 (test_c_tests): Add test_escaped_strings.
15742 * doc/extend.texi (deprecated): Add a note that the
15743 deprecation message is affected by the -fmessage-length
15744 option, and that control characters will be escaped.
15745 (#pragma GCC error): Document this pragma.
15746 (#pragma GCC warning): Likewise.
15747 * doc/invoke.texi (-fmessage-length): Document this option's
15748 effect on the #warning and #error preprocessor directives and
15749 the deprecated attribute.
15751 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
15753 * tree.c (decl_value_expr_lookup): Revert latest change.
15754 (decl_value_expr_insert): Likewise.
15756 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
15758 * gimplify.c (nonlocal_vlas): Delete.
15759 (nonlocal_vla_vars): Likewise.
15760 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15762 (gimplify_body): Do not create and destroy nonlocal_vlas.
15763 * tree-nested.c: Include diagnostic.h.
15764 (use_pointer_in_frame): Tweak.
15765 (lookup_field_for_decl): Add assertion and declare the transformation.
15766 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15767 internal error when the reference is in a wrong context. Do not
15768 create a debug decl by default.
15769 (note_nonlocal_block_vlas): Delete.
15770 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15771 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
15772 create a debug decl by default.
15773 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15774 call is in a wrong context.
15775 (fixup_vla_decls): New function.
15776 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
15777 debug variables were created.
15778 * tree.c (decl_value_expr_lookup): Add checking assertion.
15779 (decl_value_expr_insert): Likewise.
15781 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15783 PR middle-end/82479
15784 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15785 * tree-scalar-evolution.c (interpret_expr): Likewise.
15786 (expression_expensive_p): Likewise.
15787 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15788 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15789 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15790 (ssa_defined_by_minus_one_stmt_p): New.
15792 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15794 PR middle-end/64946
15795 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15796 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15797 * dojump.c (do_jump): Likewise.
15798 * expr.c (expand_expr_real_2): Check operand type's sign.
15799 * fold-const.c (const_unop): Handle ABSU_EXPR.
15800 (fold_abs_const): Likewise.
15801 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15802 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15803 (strip_sign_op_1): Likesise.
15804 * match.pd: Add new pattern to generate ABSU_EXPR.
15805 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15806 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15807 * tree-eh.c (operation_could_trap_helper_p): Likewise.
15808 * tree-inline.c (estimate_operator_cost): Likewise.
15809 * tree-pretty-print.c (dump_generic_node): Likewise.
15810 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15811 * tree.def (ABSU_EXPR): New.
15813 2018-06-16 Jakub Jelinek <jakub@redhat.com>
15815 PR middle-end/86095
15816 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15817 documented as preserved for backward compatibility only.
15818 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15820 PR rtl-optimization/86108
15821 * bb-reorder.c (create_forwarder_block): Renamed to ...
15822 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
15823 jump from new landing pad to the second part.
15824 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15827 2018-06-15 Jakub Jelinek <jakub@redhat.com>
15829 PR middle-end/85878
15830 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15831 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15832 Only call store_expr for halves if the mode is the same.
15834 PR middle-end/86123
15835 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15836 Fix up comment formatting.
15838 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
15840 * typed-splay-tree.h (typed_splay_tree::remove): New function.
15841 (typed_splay_tree::closure,
15842 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15843 (typed_splay_tree::typed_splay_tree,
15844 typed_splay_tree::operator =): Declared private.
15845 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15846 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15847 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15848 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15849 typed_splay_tree::splay_tree_splay,
15850 typed_splay_tree::splay_tree_foreach_helper,
15851 typed_splay_tree::splay_tree_insert,
15852 typed_splay_tree::splay_tree_remove,
15853 typed_splay_tree::splay_tree_lookup,
15854 typed_splay_tree::splay_tree_predecessor,
15855 typed_splay_tree::splay_tree_successor,
15856 typed_splay_tree::splay_tree_min,
15857 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15858 (typed_splay_tree::root, typed_splay_tree::comp,
15859 typed_splay_tree::delete_key,
15860 typed_splay_tree::delete_value): New data members.
15861 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15862 typed_splay_tree::remove.
15864 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
15866 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15867 -mginv and -mno-ginv to the assembler.
15868 * config/mips/mips.opt (-mcrc): New option.
15869 (-mginv): Likewise.
15870 * doc/invoke.text (-mcrc): Document.
15871 (-mginv): Likewise.
15873 2018-06-15 Nick Clifton <nickc@redhat.com>
15876 * tree.c (escaped_string): New class. Converts an unescaped
15877 string into its escaped equivalent.
15878 (warn_deprecated_use): Use the new class to convert the
15879 deprecation message, if present.
15880 (test_escaped_strings): New self test.
15881 (test_c_tests): Add test_escaped_strings.
15882 * doc/extend.texi (deprecated): Add a note that the
15883 deprecation message is affected by the -fmessage-length
15884 option, and that control characters will be escaped.
15885 (#pragma GCC error): Document this pragma.
15886 (#pragma GCC warning): Likewise.
15887 * doc/invoke.texi (-fmessage-length): Document this option's
15888 effect on the #warning and #error preprocessor directives and
15889 the deprecated attribute.
15891 2018-06-15 Richard Biener <rguenther@suse.de>
15893 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15894 here, also noting vector size used.
15895 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
15896 size used in MSG_OPTIMIZED_LOCATIONS dump.
15897 (pass_slp_vectorize::execute): Adjust.
15899 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
15902 * config/arc/arc.c (arc_return_address_register): Fix
15905 2018-06-15 Richard Biener <rguenther@suse.de>
15907 PR middle-end/86159
15908 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15909 leave useless conversion stripping to force_gimple_operand_gsi.
15910 (gimplify_build2): Likewise.
15911 (gimplify_build1): Likewise.
15913 2018-06-15 Richard Biener <rguenther@suse.de>
15915 PR middle-end/86076
15916 * tree-cfg.c (move_stmt_op): unshare invariant addresses
15917 before adjusting their block.
15919 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
15921 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15922 multilibs for *-*-rtems*.
15923 * config/riscv/t-rtems: New file.
15925 2018-06-14 Jakub Jelinek <jakub@redhat.com>
15927 PR middle-end/86122
15928 * match.pd ((A +- CST1) +- CST2): Punt if last resort
15929 unsigned_type_for returns NULL.
15932 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15933 subregs of multi-word pseudos unless the float mode has word size.
15935 2018-06-14 Richard Biener <rguenther@suse.de>
15937 PR middle-end/86139
15938 * tree-vect-generic.c (build_word_mode_vector_type): Remove
15939 duplicate and harmful type_hash_canon.
15940 * tree.c (type_hash_canon): Assert we didn't find ourselves.
15942 2018-06-14 Richard Biener <rguenther@suse.de>
15945 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15948 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
15950 * config/rtems.h (STDINT_LONG32): Define.
15952 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
15953 Prachi Godbole <prachi.godbole@imgtec.com>
15955 * config/mips/mips-cpus.def: Define P6600.
15956 * config/mips/mips-tables.opt: Regenerate.
15957 * config/mips/mips.c (mips_ucbranch_type): New enum.
15958 (mips_rtx_cost_data): Add support for P6600.
15959 (mips_issue_rate): Likewise.
15960 (mips_multipass_dfa_lookahead): Likewise.
15961 (mips_avoid_hazard): Likewise.
15962 (mips_reorg_process_insns): Likewise.
15963 (mips_classify_branch_p6600): New function.
15964 * config/mips/mips.h (TUNE_P6600): New define.
15965 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15966 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15967 * config/mips/mips.md: Include p6600.md.
15968 (processor): Add p6600.
15969 * config/mips/p6600.md: New file.
15970 * doc/invoke.texi: Add p6600 to supported architectures.
15972 2018-06-13 Martin Sebor <msebor@redhat.com>
15974 PR tree-optimization/86114
15975 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15977 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15979 2018-06-13 Richard Biener <rguenther@suse.de>
15981 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15982 Properly set vector type of the intermediate stmt.
15983 * tree-vect-stmts.c (vectorizable_operation): The destination
15984 var always has vectype_out type.
15986 2018-06-13 Jeff Law <law@redhat.com>
15988 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15989 integer 0 for argument to print_rtl_with_bb.
15990 (rl78_reorg): Likewise.
15992 2018-06-13 David Malcolm <dmalcolm@redhat.com>
15994 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15995 from rtx to rtx_insn *.
15996 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15998 (add_sched_insns_for_speculation): Likewise for local "target",
15999 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16000 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
16001 from rtx_insn ** to rtx_code_label **.
16002 (reorg_emit_nops): Likewise.
16003 (c6x_reorg): Likewise for local "call_labels".
16004 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
16006 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
16007 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
16008 the loops over LABEL_REFS.
16009 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
16011 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16012 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
16013 (split_branches): Strengthen local "olabel" from rtx to
16014 rtx_insn *, adding a safe_as_a cast.
16015 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
16017 (add_insn_after): Likewise for first two params.
16018 (add_insn_before): Likewise.
16019 (remove_insn): Likewise for param.
16020 (emit_pattern_before_noloc): Likewise for second and third params.
16021 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
16022 (emit_call_insn_before_noloc): Likewise.
16023 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
16025 (emit_barrier_before): Likewise.
16026 (emit_label_before): Strengthen "label" param from "rtx" to
16027 "rtx_code_label *". Strengthen "before" param from "rtx" to
16029 (emit_insn_after_1): Strengthen "after" param from "rtx" to
16031 (emit_pattern_after_noloc): Likewise.
16032 (emit_insn_after_noloc): Likewise.
16033 (emit_jump_insn_after_noloc): Likewise.
16034 (emit_call_insn_after_noloc): Likewise.
16035 (emit_debug_insn_after_noloc): Likewise.
16036 (emit_barrier_after): Likewise.
16037 (emit_label_after): Likewise for both params.
16038 (emit_pattern_after_setloc): Likewise for "after" param. Convert
16039 "loc" param from "int" to "location_t".
16040 (emit_insn_after_setloc): Likewise.
16041 (emit_jump_insn_after_setloc): Likewise.
16042 (emit_call_insn_after_setloc): Likewise.
16043 (emit_debug_insn_after_setloc): Likewise.
16044 (emit_pattern_before_setloc): Likewise for "before" param. Convert
16045 "loc" param from "int" to "location_t".
16046 (emit_pattern_before): Convert NULL_RTX to NULL.
16047 (emit_insn_before_setloc): Convert "loc" param from "int" to
16049 (emit_jump_insn_before_setloc): Likewise.
16050 (emit_call_insn_before_setloc): Likewise.
16051 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
16052 rtx_insn *. Convert "loc" param from "int" to "location_t".
16053 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
16054 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
16055 Convert 3rd param from "int" to "location_t".
16056 (emit_barrier_before, emit_barrier_after, next_real_insn):
16057 Strengthen param from rtx to rtx_insn *.
16058 (emit_label_before): Strengthen 1st param from "rtx" to
16059 "rtx_code_label *". Strengthen 2nd param from "rtx" to
16061 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
16062 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
16063 Strengthen 2nd param from "rtx" to "rtx_insn *".
16064 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
16065 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
16066 Likewise. Convert 3rd param from "int" to "location_t".
16067 (emit_label_after): Strengthen 1st param from "rtx" to
16068 "rtx_code_label *".
16069 (next_real_insn, remove_insn): Strengthen param from "rtx" to
16071 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
16072 from "rtx" to "rtx_insn *".
16074 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
16076 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
16077 bodies streamed in with -Q.
16078 * dumpfile.c (dump_files): Add lto-stream-out dump file.
16079 * dumpfile.h (tree_dump_index): Add lto_stream_out.
16080 * gimple-streamer-out.c: Include gimple-pretty-print.h
16081 (output_bb): Dump stmts streamed.
16082 * lto-section-out.c: Include print-tree.h
16083 (lto_begin_section): Dump sections created.
16084 (lto_output_decl_index): Dump decl encoded.
16085 * lto-streamer-out.c: Include print-tree.h
16086 (create_output_block): Dump output block created.
16087 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
16088 (output_function): Dump function output.
16089 (output_constructor): Dump constructor streamed.
16090 (write_global_stream): Output indexes encoded.
16091 (produce_asm_for_decls): Dump streams encoded.
16092 * lto-streamer.c (streamer_dump_file): New global var.
16093 * lto-streamer.h (streamer_dump_file): Declare.
16094 * passes.c (ipa_write_summaries): Initialize streamer dump.
16095 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
16098 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
16101 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
16102 offsets for register save directives. Emit a second batch of save
16103 directives, if need be, when the function accesses prior frames.
16105 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16107 * config/arc/fpu.md (fmasf4): Force operand to register.
16108 (fnmasf4): Likewise.
16110 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16112 * config/arc/arc-protos.h (arc_pad_return): Remove.
16113 * config/arc/arc.c (machine_function): Remove force_short_suffix
16115 (arc_print_operand): Adjust printing of '&'.
16116 (arc_verify_short): Remove conditional printing of short suffix.
16117 (arc_final_prescan_insn): Remove reference to size_reason.
16118 (pad_return): New function.
16119 (arc_reorg): Call pad_return.
16120 (arc_pad_return): Remove.
16121 (arc_init_machine_status): Remove reference to force_short_suffix.
16122 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
16123 (attr length): When attribute iscompact is true force to 2
16124 regardless; in the case of maybe check if we want to force the
16125 instruction to have 4 bytes length.
16126 (nopv): Change it to generate 4 byte long nop as well.
16127 (blockage): New pattern.
16128 (simple_return): Remove call to arc_pad_return.
16129 (p_return_i): Likewise.
16131 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16133 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
16135 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16137 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
16140 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16142 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
16143 for ARC700 and ARCv2.
16145 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
16148 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
16149 operands[2] instead of operands[1].
16152 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16154 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
16155 case, check whether the outer register overlaps an unallocatable
16156 register, not just whether it fits the required class.
16158 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
16160 * poly-int.h (can_div_trunc_p): Add new overload in which all values
16162 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
16163 (memrefs_conflict_p): Likewise.
16164 (init_alias_analysis): Likewise.
16165 * cfgexpand.c (expand_debug_expr): Likewise.
16166 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16167 * cse.c (fold_rtx): Likewise.
16168 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16169 * expr.c (emit_block_move_hints): Likewise.
16170 (clear_storage_hints, push_block, emit_push_insn): Likewise.
16171 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16172 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
16173 (emit_group_store): Likewise.
16174 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
16175 to read the PRE/POST_MODIFY increment.
16176 * calls.c (store_one_arg): Use strip_offset.
16177 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
16179 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
16181 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
16182 (simplify_binary_operation_1): Extend CONST_INT handling to
16184 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
16185 than a HOST_WIDE_INT.
16186 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
16188 (adjust_mems, add_stores): Update accodingly.
16189 (vt_canonicalize_addr): Track polynomial offsets.
16190 (emit_note_insn_var_location): Likewise.
16191 (vt_add_function_parameter): Likewise.
16192 (vt_initialize): Likewise.
16194 2018-06-12 Jeff Law <law@redhat.com>
16196 * config.gcc (alpha*-*-freebsd*): Remove.
16197 * config/alpha/freebsd.h: Remove.
16199 2018-06-12 David Malcolm <dmalcolm@redhat.com>
16202 * spellcheck-tree.c (levenshtein_distance): Rename to...
16203 (get_edit_distance): ...this, and update for underlying renaming.
16204 * spellcheck-tree.h (levenshtein_distance): Rename to...
16205 (get_edit_distance): ...this.
16206 * spellcheck.c (levenshtein_distance): Rename to...
16207 (get_edit_distance): ...this. Convert from Levenshtein distance
16208 to Damerau-Levenshtein distance by supporting transpositions of
16209 adjacent characters. Rename "v1" to "v_next" and "v0" to
16211 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16212 (selftest::test_edit_distance_unit_test_oneway): ...this, and
16213 update for underlying renaming.
16214 (selftest::levenshtein_distance_unit_test): Rename to...
16215 (selftest::test_get_edit_distance_unit): ...this, and update for
16216 underlying renaming.
16217 (selftest::test_find_closest_string): Add example from PR 69968
16218 where transposition helps
16219 (selftest::test_metric_conditions): Update for renaming.
16220 (selftest::test_metric_conditions): Likewise.
16221 (selftest::spellcheck_c_tests): Likewise.
16222 * spellcheck.h (levenshtein_distance): Rename both overloads to...
16223 (get_edit_distance): ...this.
16224 (best_match::consider): Update for renaming.
16226 2018-06-12 Martin Sebor <msebor@redhat.com>
16228 PR tree-optimization/85259
16229 * builtins.c (compute_objsize): Handle constant offsets.
16230 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16231 true iff a warning has been issued.
16232 * gimple.h (gimple_nonartificial_location): New function.
16233 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16234 gimple_nonartificial_location and handle -Wno-system-headers.
16235 (handle_builtin_stxncpy): Same.
16237 2018-06-12 Martin Sebor <msebor@redhat.com>
16240 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16242 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
16244 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16245 BUILTIN_VEC_XST entries for pointer to double and long long.
16247 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
16250 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16252 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16255 2018-06-12 Martin Liska <mliska@suse.cz>
16257 * doc/options.texi: Document IntegerRange.
16259 2018-06-12 Martin Liska <mliska@suse.cz>
16261 * config/i386/i386.opt: Make MPX-related options as Deprecated.
16262 * opt-functions.awk: Handle Deprecated flag.
16263 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16265 (read_cmdline_option): Report warning for a deprecated option.
16266 * opts.h (struct cl_option): Add new field cl_deprecated.
16267 (CL_ERR_DEPRECATED): New.
16269 2018-06-12 Martin Liska <mliska@suse.cz>
16271 * doc/options.texi: Document Deprecated option flag.
16273 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16275 * config/arc/arc-arch.h (arc_extras): New enum.
16276 (arc_cpu_t):Add field extra.
16277 (arc_cpu_types): Consider the extras.
16278 * config/arc/arc-cpus.def: Add extras info.
16279 * config/arc/arc-opts.h (processor_type): Consider extra field.
16280 * config/arc/arc.c (arc_override_options): Handle extra field.
16282 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
16284 * config/arc/arc-arch.h: Update ARC_OPTX macro.
16285 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16287 * config/arc/arc.c (arc_init): Update pic warning.
16288 (irq_range): Update irq range parsing warnings.
16289 (arc_override_options): Update various warning messages.
16290 (arc_handle_aux_attribute): Likewise.
16292 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
16294 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16296 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16298 * doc/sourcebuild.texi: Document usage of line number 0 in verify
16299 compiler messages directives.
16301 2018-06-12 Matthew Fortune <mfortune@gmail.com>
16303 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16304 * config/mips/mips-tables.opt: Regenerate.
16305 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16307 * doc/invoke.texi: Document -march=i6500.
16309 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
16311 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16312 (i6400_gpmul): Add cpu_unit.
16313 (i6400_gpdiv): Likewise.
16314 (i6400_msa_add_d): Update reservations.
16315 (i6400_msa_int_add) Likewise.
16316 (i6400_msa_short_logic3) Likewise.
16317 (i6400_msa_short_logic2) Likewise.
16318 (i6400_msa_short_logic) Likewise.
16319 (i6400_msa_move) Likewise.
16320 (i6400_msa_cmp) Likewise.
16321 (i6400_msa_short_float2) Likewise.
16322 (i6400_msa_div_d) Likewise.
16323 (i6400_msa_long_logic1) Likewise.
16324 (i6400_msa_long_logic2) Likewise.
16325 (i6400_msa_mult) Likewise.
16326 (i6400_msa_long_float2) Likewise.
16327 (i6400_msa_long_float4) Likewise.
16328 (i6400_msa_long_float5) Likewise.
16329 (i6400_msa_long_float8) Likewise.
16330 (i6400_fpu_fadd): Include frint type.
16331 (i6400_fpu_store): New define_insn_reservation.
16332 (i6400_fpu_load): Likewise.
16333 (i6400_fpu_move): Likewise.
16334 (i6400_fpu_fcmp): Likewise.
16335 (i6400_fpu_fmadd): Likewise.
16336 (i6400_int_mult): Include imul3nc type and update reservation.
16337 (i6400_int_div): Include idiv3 type and update reservation.
16338 (i6400_int_load): Update to check type not move_type.
16339 (i6400_int_store): Likewise.
16340 (i6400_int_prefetch): Set zero latency.
16342 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
16344 * gcc.c: Document new %@{...} sequence.
16345 (LINK_COMMAND_SPEC): Use it for the -L switches.
16346 (cpp_unique_options): Use it for the -I switches.
16347 (at_file_argbuf): New global variable.
16348 (in_at_file): Likewise.
16349 (alloc_args): Create at_file_argbuf.
16350 (clear_args): Truncate at_file_argbuf.
16351 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16352 (open_at_file): New function.
16353 (close_at_file): Likewise.
16354 (create_at_file): Delete.
16355 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16358 (validate_switches_from_spec): Deal with %@{...} sequence.
16359 (validate_switches): Likewise.
16360 (driver::finalize): Call clear_args.
16362 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
16364 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16366 2018-06-11 Martin Sebor <msebor@redhat.com>
16368 * doc/invoke.texi (-Wall): List -Wc++17-compat.
16369 (Wno-class-memaccess): Add @opindex.
16370 (Wno-templates, Wno-multiple-inheritance): Same.
16371 (Wno-virtual-inheritance, Wno-namespaces): Same.
16372 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16373 (Wno-format-overflow, Wno-format-truncation): Same.
16374 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16375 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16376 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16377 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16378 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16379 (Wno-misspelled-isr): Same.
16381 2018-06-11 Martin Sebor <msebor@redhat.com>
16383 * PR tree-optimization/86083
16384 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16386 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
16388 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16390 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
16393 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16394 on the correct operand.
16395 (*movdi_internal64): Ditto.
16397 2018-06-11 Martin Liska <mliska@suse.cz>
16399 PR tree-optimization/86089
16400 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16402 2018-06-11 Julia Koval <julia.koval@intel.com>
16404 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16405 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16406 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16408 2018-06-11 Olivier Hainque <hainque@adacore.com>
16410 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16411 for Ada with strict dwarf2.
16413 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
16416 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16419 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
16421 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16423 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
16425 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16428 2018-06-08 Martin Liska <mliska@suse.cz>
16430 * tree-cfg.h (debug_function): Fix argument type to match
16433 2018-06-08 Martin Liska <mliska@suse.cz>
16435 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16436 Remove usage of MPX-related (and removed) fields.
16437 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16439 2018-06-08 David Malcolm <dmalcolm@redhat.com>
16441 * cfg.c (debug): Use TDF_NONE rather than 0.
16442 * cfghooks.c (debug): Likewise.
16443 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16444 (struct dump_option_value_info): Convert to...
16445 (struct kv_pair): ...this template type.
16446 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16448 (optinfo_verbosity_options): Likewise.
16449 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16451 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16452 than int for "optgroup_flags" param.
16453 (dump_generic_expr_loc): Use dump_flags_t rather than int for
16455 (dump_dec): Likewise.
16456 (dump_finish): Use TDF_NONE rather than 0.
16457 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16458 rather than int for "optgroup_flags" param. Use TDF_NONE rather
16459 than 0. Update for change to option_ptr.
16460 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16461 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
16462 0. Update for changes to optinfo_verbosity_options and
16464 (opt_info_switch_p): Convert optgroup_flags from int to
16466 (dump_basic_block): Use dump_flags_t rather than int
16467 for "dump_kind" param.
16468 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16469 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16470 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16471 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16472 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16473 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16474 TDF_NONE): Convert from macros to...
16475 (enum dump_flag): ...this new enum.
16476 (dump_flags_t): Update to use enum.
16477 (operator|, operator&, operator~, operator|=, operator&=):
16478 Implement for dump_flags_t.
16479 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16480 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16481 Convert from macros to...
16482 (enum optgroup_flag): ...this new enum.
16483 (optgroup_flags_t): New typedef.
16484 (operator|, operator|=): Implement for optgroup_flags_t.
16485 (struct dump_file_info): Convert field "alt_flags" to
16486 dump_flags_t. Convert field "optgroup_flags" to
16488 (dump_basic_block): Use dump_flags_t rather than int for param.
16489 (dump_generic_expr_loc): Likewise.
16490 (dump_dec): Likewise.
16491 (dump_register): Convert param "optgroup_flags" to
16493 (opt_info_enable_passes): Likewise.
16494 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16496 * gimple-pretty-print.c (debug): Likewise.
16497 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16498 (merged_store_group::apply_stores): Likewise.
16499 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16500 * gimple.c (verify_gimple_pp): Likewise.
16501 * graphite-poly.c (print_pbb_body): Likewise.
16502 * passes.c (pass_manager::register_one_dump_file): Convert
16503 local "optgroup_flags" to optgroup_flags_t.
16504 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16506 (debug_body): Likewise.
16507 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16508 to optgroup_flags_t.
16509 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16511 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16512 (convert_mult_to_fma): Likewise.
16513 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16514 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16515 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16516 "dump_kind" to dump_flags_t.
16518 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16520 * config/rs6000/rs6000.c (min, max): Delete.
16522 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16524 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16525 -mabi=spe and -mabi=no-spe.
16527 2018-06-08 Martin Liska <mliska@suse.cz>
16529 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16530 where we expect an existing summary.
16532 2018-06-08 Martin Liska <mliska@suse.cz>
16534 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16535 * ipa-inline.h (estimate_edge_growth): Likewise.
16537 2018-06-08 Martin Liska <mliska@suse.cz>
16539 * cgraph.c (function_version_hasher::hash): Use
16540 cgraph_node::get_uid ().
16541 (function_version_hasher::equal):
16542 * cgraph.h (cgraph_node::get_uid): New method.
16543 * ipa-inline.c (update_caller_keys): Use
16544 cgraph_node::get_uid ().
16545 (update_callee_keys): Likewise.
16546 * ipa-utils.c (searchc): Likewise.
16547 (ipa_reduced_postorder): Likewise.
16548 * lto-cgraph.c (input_node): Likewise.
16549 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16550 * symbol-summary.h (symtab_insertion): Likewise.
16551 (symtab_removal): Likewise.
16552 (symtab_duplication): Likewise.
16553 * tree-pretty-print.c (dump_function_header): Likewise.
16554 * tree-sra.c (convert_callers_for_node): Likewise.
16556 2018-06-08 Martin Liska <mliska@suse.cz>
16558 * cgraph.c (symbol_table::create_edge): Always assign a new
16560 (symbol_table::free_edge): Do not recycle numbers.
16561 * cgraph.h (cgraph_edge::get): New method.
16562 * symbol-summary.h (symtab_removal): Use it.
16563 (symtab_duplication): Likewise.
16564 (call_summary::hashable_uid): Remove.
16566 2018-06-08 Martin Liska <mliska@suse.cz>
16568 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16569 (initialize_growth_caches): Remove.
16570 (free_growth_caches): Likewise.
16571 (do_estimate_edge_time): Use edge_growth_cache.
16572 (do_estimate_edge_size): Likewise.
16573 (do_estimate_edge_hints): Likewise.
16574 * ipa-inline.c (reset_edge_caches): Likewise.
16575 (recursive_inlining): Likewise.
16576 (inline_small_functions): Likewise.
16577 * ipa-inline.h (initialize_growth_caches): Remove.
16578 (estimate_edge_size): Likewise.
16579 (estimate_edge_time): Likewise.
16580 (estimate_edge_hints): Likewise.
16581 (reset_edge_growth_cache): Likewise.
16582 * symbol-summary.h (call_summary::remove): New method.
16584 2018-06-08 Martin Liska <mliska@suse.cz>
16586 * ipa-cp.c (class edge_clone_summary): New summary.
16587 (grow_edge_clone_vectors): Remove.
16588 (ipcp_edge_duplication_hook): Remove.
16589 (class edge_clone_summary_t): New call_summary class.
16590 (ipcp_edge_removal_hook): Remove.
16591 (edge_clone_summary_t::duplicate): New function.
16592 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16593 (create_specialized_node): Likewise.
16594 (ipcp_driver): Initialize edge_clone_summaries and do not
16597 2018-06-08 Martin Liska <mliska@suse.cz>
16599 * symbol-summary.h (get): New function.
16600 (call_summary::m_initialize_when_cloning): New class member.
16602 2018-06-08 Martin Liska <mliska@suse.cz>
16604 * cgraph.c (cgraph_node::remove): Do not recycle uid.
16605 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16606 (symbol_table::allocate_cgraph_symbol): Do not set uid.
16607 * passes.c (uid_hash_t): Record removed_nodes by their uids.
16608 (remove_cgraph_node_from_order): Use the removed_nodes set.
16609 (do_per_function_toporder): Likwise.
16610 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16611 instead of summary_uid.
16612 (symtab_removal): Likewise.
16613 (symtab_duplication): Likewise.
16615 2018-06-08 Martin Liska <mliska@suse.cz>
16617 * ipa-cp.c (ipcp_store_bits_results): Use
16618 ipcp_transformation_sum.
16619 (ipcp_store_vr_results): Likewise.
16620 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16622 (ipcp_transformation_initialize): ... this.
16623 (ipa_set_node_agg_value_chain):
16624 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16625 (write_ipcp_transformation_info): Likewise.
16626 (read_ipcp_transformation_info): Likewise.
16627 (ipcp_update_bits): Likewise.
16628 (ipcp_update_vr): Likewise.
16629 (ipcp_transform_function): Likewise.
16630 * ipa-prop.h: Rename ipcp_transformation_summary to
16631 ipcp_transformation.
16632 (class ipcp_transformation_t): New function summary.
16633 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16634 (ipa_get_agg_replacements_for_node): Likewise.
16636 2018-06-08 Martin Liska <mliska@suse.cz>
16638 * ipa-pure-const.c (struct funct_state_d): Do it class instead
16640 (class funct_state_summary_t): New function_summary class.
16641 (has_function_state): Remove.
16642 (get_function_state): Likewise.
16643 (set_function_state): Likewise.
16644 (add_new_function): Likewise.
16645 (funct_state_summary_t::insert): New function.
16646 (duplicate_node_data): Remove.
16647 (remove_node_data): Remove.
16648 (funct_state_summary_t::duplicate): New function.
16649 (register_hooks): Create new funct_state_summaries.
16650 (pure_const_generate_summary): Use it.
16651 (pure_const_write_summary): Likewise.
16652 (pure_const_read_summary): Likewise.
16653 (propagate_pure_const): Likewise.
16654 (propagate_nothrow): Likewise.
16655 (dump_malloc_lattice): Likewise.
16656 (propagate_malloc): Likewise.
16657 (execute): Do not register hooks, just remove summary
16659 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16662 2018-06-08 Martin Liska <mliska@suse.cz>
16664 * ipa-reference.c (remove_node_data): Remove.
16665 (duplicate_node_data): Likewise.
16666 (class ipa_ref_var_info_summary_t): New class.
16667 (class ipa_ref_opt_summary_t): Likewise.
16668 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16669 (get_reference_optimization_summary): Use
16670 ipa_ref_opt_sum_summaries.
16671 (set_reference_vars_info): Remove.
16672 (set_reference_optimization_summary): Likewise.
16673 (ipa_init): Create summaries.
16674 (init_function_info): Use function summary.
16675 (ipa_ref_opt_summary_t::duplicate): New function.
16676 (ipa_ref_opt_summary_t::remove): New function.
16677 (get_read_write_all_from_node): Fix GNU coding style.
16678 (propagate): Use function summary.
16679 (write_node_summary_p): Fix GNU coding style.
16680 (stream_out_bitmap): Likewise.
16681 (ipa_reference_read_optimization_summary): Use function summary.
16682 (ipa_reference_c_finalize): Do not release hooks.
16684 2018-06-08 Martin Liska <mliska@suse.cz>
16686 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16687 (analyze_function_body): Extract multiple calls of get_create.
16688 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16689 * ipa-inline.c (recursive_inlining): Use ::get method.
16690 * ipa-inline.h (estimate_edge_growth): Likewise.
16692 2018-06-08 Martin Liska <mliska@suse.cz>
16694 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16696 (hsa_function_summary::hsa_function_summary): Use the new enum
16698 (hsa_gpu_implementation_p): Use hsa_summaries::get.
16699 * hsa-gen.c (hsa_get_host_function): Likewise.
16700 (get_brig_function_name): Likewise.
16701 * ipa-hsa.c (process_hsa_functions): Likewise.
16702 (ipa_hsa_write_summary): Likewise.
16703 * symbol-summary.h (symtab_duplication): Use ::get function/
16704 (get): New function.
16706 2018-06-08 Martin Liska <mliska@suse.cz>
16708 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16710 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16711 (hsa_register_kernel): Likewise.
16712 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16713 * hsa-gen.c (hsa_get_host_function): Likewise.
16714 (get_brig_function_name): Likewise.
16715 (generate_hsa): Likewise.
16716 (pass_gen_hsail::execute): Likewise.
16717 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16718 (devirtualization_time_bonus): Likewise.
16719 (ipcp_propagate_stage): Likewise.
16720 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16721 (edge_set_predicate): Likewise.
16722 (evaluate_conditions_for_known_args): Likewise.
16723 (evaluate_properties_for_edge): Likewise.
16724 (ipa_fn_summary::reset): Likewise.
16725 (ipa_fn_summary_t::duplicate): Likewise.
16726 (dump_ipa_call_summary): Likewise.
16727 (ipa_dump_fn_summary): Likewise.
16728 (analyze_function_body): Likewise.
16729 (compute_fn_summary): Likewise.
16730 (estimate_edge_devirt_benefit): Likewise.
16731 (estimate_edge_size_and_time): Likewise.
16732 (estimate_calls_size_and_time): Likewise.
16733 (estimate_node_size_and_time): Likewise.
16734 (inline_update_callee_summaries): Likewise.
16735 (remap_edge_change_prob): Likewise.
16736 (remap_edge_summaries): Likewise.
16737 (ipa_merge_fn_summary_after_inlining): Likewise.
16738 (ipa_update_overall_fn_summary): Likewise.
16739 (read_ipa_call_summary): Likewise.
16740 (inline_read_section): Likewise.
16741 (write_ipa_call_summary): Likewise.
16742 (ipa_fn_summary_write): Likewise.
16743 (ipa_free_fn_summary): Likewise.
16744 * ipa-hsa.c (process_hsa_functions): Likewise.
16745 (ipa_hsa_write_summary): Likewise.
16746 (ipa_hsa_read_section): Likewise.
16747 * ipa-icf.c (sem_function::merge): Likewise.
16748 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16749 (do_estimate_edge_time): Likewise.
16750 (estimate_size_after_inlining): Likewise.
16751 (estimate_growth): Likewise.
16752 (growth_likely_positive): Likewise.
16753 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16754 (inline_call): Likewise.
16755 * ipa-inline.c (caller_growth_limits): Likewise.
16756 (can_inline_edge_p): Likewise.
16757 (can_inline_edge_by_limits_p): Likewise.
16758 (compute_uninlined_call_time): Likewise.
16759 (compute_inlined_call_time): Likewise.
16760 (want_inline_small_function_p): Likewise.
16761 (edge_badness): Likewise.
16762 (update_caller_keys): Likewise.
16763 (update_callee_keys): Likewise.
16764 (recursive_inlining): Likewise.
16765 (inline_small_functions): Likewise.
16766 (inline_to_all_callers_1): Likewise.
16767 (dump_overall_stats): Likewise.
16768 (early_inline_small_functions): Likewise.
16769 (early_inliner): Likewise.
16770 * ipa-inline.h (estimate_edge_growth): Likewise.
16771 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16772 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16773 * ipa-prop.h (IPA_NODE_REF): Likewise.
16774 (IPA_EDGE_REF): Likewise.
16775 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16776 (propagate_malloc): Likewise.
16777 * ipa-split.c (execute_split_functions): Likewise.
16778 * symbol-summary.h: Rename get to get_create.
16780 (get_create): Likewise.
16781 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16783 2018-06-08 Martin Liska <mliska@suse.cz>
16785 * symbol-summary.h (release): Move definition out of class
16787 (symtab_removal): Likewise.
16788 (symtab_duplication): Likewise.
16790 2018-06-08 Martin Liska <mliska@suse.cz>
16792 * symbol-summary.h (function_summary): Move constructor
16793 implementation out of class declaration.
16794 (release): Likewise.
16795 (symtab_insertion): Likewise.
16796 (symtab_removal): Likewise.
16797 (symtab_duplication): Likewise.
16800 2018-06-08 Martin Liska <mliska@suse.cz>
16802 * Makefile.in: Remove support for MPX (macros, related functions,
16803 fields in cgraph_node, ...).
16804 * builtin-types.def (BT_BND): Likewise.
16805 (BT_FN_BND_CONST_PTR): Likewise.
16806 (BT_FN_CONST_PTR_BND): Likewise.
16807 (BT_FN_VOID_PTR_BND): Likewise.
16808 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16809 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16810 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16811 (expand_builtin_mempcpy_with_bounds): Likewise.
16812 (expand_builtin_memset_with_bounds): Likewise.
16813 (expand_builtin_memset_args): Likewise.
16814 (std_expand_builtin_va_start): Likewise.
16815 (expand_builtin): Likewise.
16816 (expand_builtin_with_bounds): Likewise.
16817 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16818 (DEF_LIB_BUILTIN_CHKP): Likewise.
16819 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16820 (DEF_CHKP_BUILTIN): Likewise.
16821 (BUILT_IN_MEMCPY): Likewise.
16822 (BUILT_IN_MEMMOVE): Likewise.
16823 (BUILT_IN_MEMPCPY): Likewise.
16824 (BUILT_IN_MEMSET): Likewise.
16825 (BUILT_IN_STPCPY): Likewise.
16826 (BUILT_IN_STRCAT): Likewise.
16827 (BUILT_IN_STRCHR): Likewise.
16828 (BUILT_IN_STRCPY): Likewise.
16829 (BUILT_IN_STRLEN): Likewise.
16830 (BUILT_IN_MEMCPY_CHK): Likewise.
16831 (BUILT_IN_MEMMOVE_CHK): Likewise.
16832 (BUILT_IN_MEMPCPY_CHK): Likewise.
16833 (BUILT_IN_MEMSET_CHK): Likewise.
16834 (BUILT_IN_STPCPY_CHK): Likewise.
16835 (BUILT_IN_STRCAT_CHK): Likewise.
16836 (BUILT_IN_STRCPY_CHK): Likewise.
16837 * calls.c (store_bounds): Likewise.
16838 (emit_call_1): Likewise.
16839 (special_function_p): Likewise.
16840 (maybe_warn_nonstring_arg): Likewise.
16841 (initialize_argument_information): Likewise.
16842 (finalize_must_preallocate): Likewise.
16843 (compute_argument_addresses): Likewise.
16844 (expand_call): Likewise.
16845 * cfgexpand.c (expand_call_stmt): Likewise.
16846 (expand_return): Likewise.
16847 (expand_gimple_stmt_1): Likewise.
16848 (pass_expand::execute): Likewise.
16849 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16850 (cgraph_node::remove): Likewise.
16851 (cgraph_node::dump): Likewise.
16852 (cgraph_node::verify_node): Likewise.
16853 * cgraph.h (chkp_function_instrumented_p): Likewise.
16854 (symtab_node::get_alias_target): Likewise.
16855 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16856 (cgraph_local_p): Likewise.
16857 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16858 (cgraph_edge::rebuild_references): Likewise.
16859 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16860 (walk_polymorphic_call_targets): Likewise.
16861 (cgraph_node::expand_thunk): Likewise.
16862 (symbol_table::output_weakrefs): Likewise.
16863 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16864 (ix86_handle_option): Likewise.
16865 * config/i386/constraints.md: Likewise.
16866 * config/i386/i386-builtin-types.def (BND): Likewise.
16870 * config/i386/i386-builtin.def (BDESC_END): Likewise.
16871 (BDESC_FIRST): Likewise.
16873 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16874 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16875 * config/i386/i386.c (enum reg_class): Likewise.
16876 (ix86_target_string): Likewise.
16877 (ix86_option_override_internal): Likewise.
16878 (ix86_conditional_register_usage): Likewise.
16879 (ix86_valid_target_attribute_inner_p): Likewise.
16880 (ix86_set_indirect_branch_type): Likewise.
16881 (ix86_set_current_function): Likewise.
16882 (ix86_function_arg_regno_p): Likewise.
16883 (init_cumulative_args): Likewise.
16884 (ix86_function_arg_advance): Likewise.
16885 (ix86_function_arg): Likewise.
16886 (ix86_pass_by_reference): Likewise.
16887 (ix86_function_value_regno_p): Likewise.
16888 (ix86_function_value_1): Likewise.
16889 (ix86_function_value_bounds): Likewise.
16890 (ix86_return_in_memory): Likewise.
16891 (ix86_setup_incoming_vararg_bounds): Likewise.
16892 (ix86_va_start): Likewise.
16893 (indirect_thunk_need_prefix): Likewise.
16894 (print_reg): Likewise.
16895 (ix86_print_operand): Likewise.
16896 (ix86_expand_call): Likewise.
16897 (ix86_output_function_return): Likewise.
16898 (reg_encoded_number): Likewise.
16899 (BDESC_VERIFYS): Likewise.
16900 (ix86_init_mpx_builtins): Likewise.
16901 (ix86_init_builtins): Likewise.
16902 (ix86_emit_cmove): Likewise.
16903 (ix86_emit_move_max): Likewise.
16904 (ix86_expand_builtin): Likewise.
16905 (ix86_builtin_mpx_function): Likewise.
16906 (ix86_get_arg_address_for_bt): Likewise.
16907 (ix86_load_bounds): Likewise.
16908 (ix86_store_bounds): Likewise.
16909 (ix86_load_returned_bounds): Likewise.
16910 (ix86_store_returned_bounds): Likewise.
16911 (ix86_class_likely_spilled_p): Likewise.
16912 (ix86_hard_regno_mode_ok): Likewise.
16913 (x86_order_regs_for_local_alloc): Likewise.
16914 (ix86_mitigate_rop): Likewise.
16915 (ix86_bnd_prefixed_insn_p): Likewise.
16916 (ix86_mpx_bound_mode): Likewise.
16917 (ix86_make_bounds_constant): Likewise.
16918 (ix86_initialize_bounds): Likewise.
16919 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16920 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16921 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16922 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16923 (TARGET_CHKP_BOUND_MODE): Likewise.
16924 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16925 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16926 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16927 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16928 * config/i386/i386.h (TARGET_MPX): Likewise.
16929 (TARGET_MPX_P): Likewise.
16930 (VALID_BND_REG_MODE): Likewise.
16931 (FIRST_BND_REG): Likewise.
16932 (LAST_BND_REG): Likewise.
16933 (enum reg_class): Likewise.
16934 (BND_REG_P): Likewise.
16935 (BND_REGNO_P): Likewise.
16936 (BNDmode): Likewise.
16937 (ADJUST_INSN_LENGTH): Likewise.
16938 * config/i386/i386.md: Likewise.
16939 * config/i386/i386.opt: Likewise.
16940 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16941 (defined): Likewise.
16942 (LINK_MPX): Likewise.
16943 (MPX_SPEC): Likewise.
16944 (LIBMPX_SPEC): Likewise.
16945 (LIBMPXWRAPPERS_SPEC): Likewise.
16946 (CHKP_SPEC): Likewise.
16947 * config/i386/predicates.md: Likewise.
16948 * dbxout.c (dbxout_type): Likewise.
16949 * doc/extend.texi: Likewise.
16950 * doc/invoke.texi: Likewise.
16951 * doc/md.texi: Likewise.
16952 * doc/tm.texi: Likewise.
16953 * doc/tm.texi.in: Likewise.
16954 * dwarf2out.c (is_base_type): Likewise.
16955 (gen_formal_types_die): Likewise.
16956 (gen_subprogram_die): Likewise.
16957 (gen_type_die_with_usage): Likewise.
16958 (gen_decl_die): Likewise.
16959 (dwarf2out_late_global_decl): Likewise.
16960 * expr.c (expand_assignment): Likewise.
16961 (emit_storent_insn): Likewise.
16962 (store_expr_with_bounds): Likewise.
16963 (store_expr): Likewise.
16964 (expand_expr_real_1): Likewise.
16965 * expr.h (store_expr_with_bounds): Likewise.
16966 * function.c (use_register_for_decl): Likewise.
16967 (struct bounds_parm_data): Likewise.
16968 (assign_parms_augmented_arg_list): Likewise.
16969 (assign_parm_find_entry_rtl): Likewise.
16970 (assign_parm_is_stack_parm): Likewise.
16971 (assign_parm_load_bounds): Likewise.
16972 (assign_bounds): Likewise.
16973 (assign_parms): Likewise.
16974 (expand_function_start): Likewise.
16975 * gcc.c (CHKP_SPEC): Likewise.
16976 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16977 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16978 (wrestrict_dom_walker::check_call): Likewise.
16979 * gimple.c (gimple_build_call_from_tree): Likewise.
16980 * gimple.h (enum gf_mask): Likewise.
16981 (gimple_call_with_bounds_p): Likewise.
16982 (gimple_call_set_with_bounds): Likewise.
16983 * gimplify.c (gimplify_init_constructor): Likewise.
16984 * ipa-cp.c (initialize_node_lattices): Likewise.
16985 (propagate_constants_across_call): Likewise.
16986 (find_more_scalar_values_for_callers_subset): Likewise.
16987 * ipa-hsa.c (process_hsa_functions): Likewise.
16988 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16989 * ipa-icf.c (sem_function::merge): Likewise.
16990 * ipa-inline.c (early_inliner): Likewise.
16991 * ipa-pure-const.c (warn_function_noreturn): Likewise.
16992 (warn_function_cold): Likewise.
16993 (propagate_pure_const): Likewise.
16994 * ipa-ref.h (enum GTY): Likewise.
16995 * ipa-split.c (find_retbnd): Likewise.
16996 (consider_split): Likewise.
16997 (split_function): Likewise.
16998 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16999 * ipa.c (walk_polymorphic_call_targets): Likewise.
17000 (symbol_table::remove_unreachable_nodes): Likewise.
17001 (process_references): Likewise.
17002 (cgraph_build_static_cdtor_1): Likewise.
17003 * lto-cgraph.c (lto_output_node): Likewise.
17004 (output_refs): Likewise.
17005 (compute_ltrans_boundary): Likewise.
17006 (input_overwrite_node): Likewise.
17007 (input_node): Likewise.
17008 (input_cgraph_1): Likewise.
17009 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
17010 * passes.c (pass_manager::execute_early_local_passes): Likewise.
17011 (class pass_chkp_instrumentation_passes): Likewise.
17012 (make_pass_chkp_instrumentation_passes): Likewise.
17013 * passes.def: Likewise.
17014 * rtl.h (struct GTY): Likewise.
17015 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
17016 * stor-layout.c (layout_type): Likewise.
17017 * symtab.c: Likewise.
17018 * target.def: Likewise.
17019 * targhooks.c (default_chkp_bound_type): Likewise.
17020 (default_chkp_bound_mode): Likewise.
17021 (default_builtin_chkp_function): Likewise.
17022 (default_chkp_function_value_bounds): Likewise.
17023 (default_chkp_make_bounds_constant): Likewise.
17024 (default_chkp_initialize_bounds): Likewise.
17025 * targhooks.h (default_chkp_bound_type): Likewise.
17026 (default_chkp_bound_mode): Likewise.
17027 (default_builtin_chkp_function): Likewise.
17028 (default_chkp_function_value_bounds): Likewise.
17029 (default_chkp_make_bounds_constant): Likewise.
17030 (default_chkp_initialize_bounds): Likewise.
17031 * toplev.c (compile_file): Likewise.
17032 (process_options): Likewise.
17033 * tree-core.h (DEF_BUILTIN): Likewise.
17034 (DEF_BUILTIN_CHKP): Likewise.
17035 * tree-inline.c (declare_return_variable): Likewise.
17036 (remap_gimple_stmt): Likewise.
17037 (copy_bb): Likewise.
17038 (initialize_inlined_parameters): Likewise.
17039 (expand_call_inline): Likewise.
17040 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
17041 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
17042 (make_pass_ipa_chkp_produce_thunks): Likewise.
17043 (make_pass_chkp): Likewise.
17044 (make_pass_chkp_opt): Likewise.
17045 (make_pass_chkp_instrumentation_passes): Likewise.
17046 * tree-pretty-print.c (dump_generic_node): Likewise.
17047 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
17048 * tree-ssa-dce.c (propagate_necessity): Likewise.
17049 (eliminate_unnecessary_stmts): Likewise.
17050 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
17051 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
17052 * tree-ssa-sccvn.h: Likewise.
17053 * tree-ssa-strlen.c (get_string_length): Likewise.
17054 (valid_builtin_call): Likewise.
17055 (adjust_last_stmt): Likewise.
17056 (handle_builtin_strchr): Likewise.
17057 (handle_builtin_strcpy): Likewise.
17058 (handle_builtin_stxncpy): Likewise.
17059 (handle_builtin_memcpy): Likewise.
17060 (handle_builtin_strcat): Likewise.
17061 (strlen_check_and_optimize_stmt): Likewise.
17062 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
17063 * tree-streamer-in.c: Likewise.
17064 * tree-streamer.c (record_common_node): Likewise.
17065 * tree.c (tree_code_size): Likewise.
17066 (wide_int_to_tree_1): Likewise.
17067 (type_contains_placeholder_1): Likewise.
17068 (build_common_tree_nodes): Likewise.
17069 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
17070 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
17071 (POINTER_BOUNDS_P): Likewise.
17072 (BOUNDED_TYPE_P): Likewise.
17073 (BOUNDED_P): Likewise.
17074 (CALL_WITH_BOUNDS_P): Likewise.
17075 (pointer_bounds_type_node): Likewise.
17076 * value-prof.c (gimple_ic): Likewise.
17077 * var-tracking.c (vt_add_function_parameters): Likewise.
17078 * varasm.c (make_decl_rtl): Likewise.
17079 (assemble_start_function): Likewise.
17080 (output_constant): Likewise.
17081 (maybe_assemble_visibility): Likewise.
17082 * varpool.c (ctor_for_folding): Likewise.
17083 * chkp-builtins.def: Remove.
17084 * ipa-chkp.c: Remove.
17085 * ipa-chkp.h: Remove.
17086 * rtl-chkp.c: Remove.
17087 * rtl-chkp.h: Remove.
17088 * tree-chkp-opt.c: Remove.
17089 * tree-chkp.c: Remove.
17090 * tree-chkp.h: Remove.
17092 2018-06-07 Carl Love <cel@us.ibm.com>
17094 * config/rs6000/vsx.md (vextract_fp_from_shorth,
17095 vextract_fp_from_shortl): Add BE support.
17097 2018-06-07 Paul Koning <ni1d@arrl.net>
17099 * compare-elim.c (try_merge_compare): Don't merge compare if
17100 address contains a side effect.
17101 (try_eliminate_compare): Likewise.
17103 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
17105 * config.gcc: Support "tremont".
17106 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
17107 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17109 * config/i386/i386.c (m_TREMONT): Define.
17110 (processor_target_table): Add "tremont".
17111 (PTA_TREMONT): Define.
17112 (ix86_lea_outperforms): Add TARGET_TREMONT.
17113 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
17114 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
17115 and M_INTEL_GOLDMONT_PLUS.
17116 (fold_builtin_cpu): Add "tremont".
17117 (ix86_add_stmt_cost): Add TARGET_TREMONT.
17118 (ix86_option_override_internal): Add "tremont".
17119 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
17120 (processor_type): Add PROCESSOR_TREMONT.
17121 * config/i386/x86-tune.def: Add m_TREMONT.
17122 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
17124 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17126 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
17127 symbol defined for msp430i* devices to be lower case.
17129 2018-06-07 Richard Biener <rguenther@suse.de>
17131 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
17132 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
17133 Properly wrap signed arithmetic if overflow wraps.
17135 2018-06-07 Jakub Jelinek <jakub@redhat.com>
17137 PR tree-optimization/69615
17138 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
17139 of a cast from a same precision integral SSA_NAME in a bb dominated
17140 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
17141 cast to utype if rhs2 has already a compatible type.
17143 2018-06-07 Richard Biener <rguenther@suse.de>
17145 PR tree-optimization/85935
17146 * graphite-scop-detection.c (find_params_in_bb): Analyze
17147 condition operands with respect to the correct loop. Assert
17148 the analysis doesn't fail.
17150 2018-06-04 Carl Love <cel@us.ibm.com>
17152 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
17153 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
17154 as it is slightly cheaper.
17155 (first_match_or_eos_index_<mode>):
17156 Calculate index using natural element order.
17157 (first_match_index_<mode>):
17158 Calculate index using natural element order.
17159 (first_match_or_eos_index_<mode>):
17160 Calculate index using natural order.
17161 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
17162 for BE and LE modes.
17163 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
17164 P9V_BUILTIN_VCLZLSBB_V16QI.
17165 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17168 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17170 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17171 indentation and line wrap for many prototypes. Add missing
17172 @smallexample directives around block of prototypes for vec_xl and
17175 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
17177 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
17178 track if we pass or return IEEE 128-bit floating point.
17179 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
17180 C++ mangling that is compatible with GCC 8.1.
17181 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
17182 (init_cumulative_args): Note if we pass or return IEEE 128-bit
17183 floating point types.
17184 (rs6000_function_arg_advance_1): Likewise.
17185 (rs6000_mangle_type): Optionally generate mangled names that match
17186 what GCC 8.1 generated for IEEE 128-bit floating point types.
17187 (rs6000_globalize_decl_name): If we have an external function that
17188 passes or returns IEEE 128-bit types, generate a weak reference
17189 from the mangled name used in GCC 8.1 to the current mangled
17191 (rs6000_init_builtins): Make __ibm128 use the long double type if
17192 long double is IBM extended double. Make __float128 use the long
17193 double type if long double is IEEE 128-bit.
17196 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
17197 macro for __ibm128 built-in functions.
17198 (PACK_IF): Add __ibm128 pack/unpack functions.
17199 (UNPACK_IF): Likewise.
17200 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
17201 enable long double built-in functions if long double is IEEE
17202 128-bit floating point.
17203 (rs6000_invalid_builtin): Update long double built-in function
17205 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
17206 functions, adjust the built-in function to use the long double
17207 built-in function if __ibm128 and long double are the same type.
17208 * doc/extend.texi (PowerPC builtins): Update documention for
17209 __builtin_{,un}pack_longdouble. Add documentation for
17210 __builtin_{,un}pack_ibm128.
17212 2018-06-06 Jim Wilson <jimw@sifive.com>
17214 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17215 (struct machine_function): New field interrupt_mode.
17216 (riscv_handle_type_attribute): New function. Add forward declaration.
17217 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17218 (riscv_expand_epilogue): Check interrupt_mode field.
17219 (riscv_set_current_function): Check interrupt attribute args and
17220 set interrupt_mode field.
17221 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17222 (riscv_sret, riscv_uret): New.
17223 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17224 new arguments to interrupt attribute.
17226 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
17229 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17230 Don't handle -mcpu=power8 if -mpower9-vector is also used.
17232 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
17234 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17235 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17236 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17237 several redundant entries.
17239 2018-06-06 David Malcolm <dmalcolm@redhat.com>
17241 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17242 type from "rtx" to "rtx_insn *".
17243 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17244 for local "call_insn", removing cast.
17245 (ix86_expand_call): Likewise, introducing a "call_insn" local.
17247 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
17249 PR tree-optimization/86066
17250 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17251 for BIT_INSERT_EXPR stores.
17253 2018-06-06 Richard Biener <rguenther@suse.de>
17255 PR tree-optimization/86062
17256 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17257 component refs ontop
17258 of to be offsetted base.
17260 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17262 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17263 to be static and remove check on interrupt attribute name.
17265 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
17267 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17268 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17270 2018-06-05 Steve Ellcey <sellcey@cavium.com>
17273 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17275 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17276 Remove second argument, change how error is called.
17277 (aarch64_layout_arg): Remove second argument from
17278 aarch64_err_no_fpadvsimd call.
17279 (aarch64_init_cumulative_args): Ditto.
17280 (aarch64_gimplify_va_arg_expr): Ditto.
17281 * config/aarch64/aarch64.md (mov<mode>): Ditto.
17283 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
17285 * config/i386/i386.md (simple_return_indirect_internal): New expander.
17286 (*simple_return_indirect_internal<mode>): Rename from
17287 simple_return_indirect_internal. Use W mode iterator.
17288 (rstorssp): New expander.
17289 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
17290 (clrssbsy): New expander.
17291 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
17293 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
17295 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17297 (cmse_check_pointed_object): Likewise.
17299 2018-06-05 Martin Liska <mliska@suse.cz>
17301 PR gcov-profile/47618
17302 * doc/invoke.texi: Document how -fprofile-dir format
17305 2018-06-05 Richard Biener <rguenther@suse.de>
17307 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17308 removal pretend DOM info isn't available so we do not update
17309 it and only remove edges, not dominated blocks. Actually free
17310 DOM info in case we removed something. Remove unreachable blocks.
17311 (mfb_keep_latches): Work with either DOM info or marked backedges.
17312 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17313 first. Mark backedges if DOM info isn't available.
17314 (Re-)compute DOM info after cleanup_control_flow_pre.
17316 2018-06-05 Richard Biener <rguenther@suse.de>
17318 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17319 (locus_discrim_hasher::hash): Adjust.
17320 (locus_discrim_hasher::equal): Likewise.
17321 (next_discriminator_for_locus): Work on line directly.
17322 (same_line_p): Pass in expanded locus1 as well.
17323 (assign_discriminators): Avoid redundant location expansions.
17325 2018-06-05 Richard Biener <rguenther@suse.de>
17327 PR tree-optimization/86046
17328 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17329 if required after clearing TREE_ADDRESSABLE.
17331 2018-06-05 Richard Biener <rguenther@suse.de>
17333 PR tree-optimization/86047
17334 * tree-ssa-loop.c (for_each_index): Glob handling of all
17335 decls and constants and really handle all of them.
17337 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17340 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17341 qualifier_void_pointer and qualifier_const_void_pointer.
17342 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17343 (arm_init_builtins): Handle the above.
17344 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17345 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17346 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17349 2018-06-05 Martin Liska <mliska@suse.cz>
17351 * auto-profile.c (read_autofdo_file): Do not use
17352 gcov_ctr_summary struct.
17353 (afdo_callsite_hot_enough_for_early_inline): Likewise.
17354 * coverage.c (struct counts_entry): Likewise.
17355 (read_counts_file): Read just single summary entry.
17356 (get_coverage_counts): Use gcov_summary struct.
17357 * coverage.h (get_coverage_counts): Likewise.
17358 * gcov-dump.c (dump_working_sets): Likewise.
17359 (tag_summary): Dump just single summary.
17360 * gcov-io.c (gcov_write_summary): Write just histogram
17362 (gcov_read_summary): Read just single summary.
17363 (compute_working_sets): Use gcov_summary struct.
17364 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17365 of GCOV_COUNTERS_SUMMABLE.
17366 (GCOV_COUNTERS_SUMMABLE): Remove.
17367 (GCOV_FIRST_VALUE_COUNTER): Replace with
17368 GCOV_COUNTER_V_INTERVAL.
17369 (struct gcov_ctr_summary): Remove.
17370 (struct gcov_summary): Directly use fields of former
17372 (compute_working_sets): Use gcov_summary struct.
17373 * gcov.c (read_count_file): Do not use ctrs fields.
17374 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17376 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17378 * profile.c: Likewise.
17379 * profile.h: Likewise.
17381 2018-06-05 Martin Liska <mliska@suse.cz>
17383 PR gcov-profile/84846
17384 * gcov.c (output_lines): Print working directory only
17385 in intermediate format.
17387 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
17389 * config/s390/s390-builtin-types.def: Add void function type.
17390 * config/s390/s390-builtins.def: Use the function type for the
17393 2018-06-04 Jim Wilson <jimw@sifive.com>
17395 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17397 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17398 and maybe_eh_return. Change regno to unsigned int. Use new args to
17399 handle EH_RETURN_DATA_REGNO registers properly.
17400 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17401 (riscv_expand_epilogue): Update comment. Change argument name and
17402 type. Update code to use new name and type. Pass new args to
17403 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
17405 * config/riscv/riscv.md (NORMAL_RETURN): New.
17406 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17407 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17408 (eh_return): Call gen_eh_return_internal and emit barrier.
17409 (eh_return_internal): Call riscv_expand_epilogue.
17411 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
17413 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17414 bit_insertion field and declare can_be_merged_into method.
17415 (merged_store_group::can_be_merged_into): New method.
17416 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17417 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
17418 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17420 2018-06-04 Richard Biener <rguenther@suse.de>
17422 PR tree-optimization/85955
17423 * builtins.c (fold_builtin_sincos): Convert pointers to
17424 destination to appropriate type before dereferencing.
17426 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
17428 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17430 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
17432 * expr.c (expand_expr_real_1): Force the operand into memory if
17433 its TYPE_MODE is BLKmode and if there is no integer mode for
17434 the number of bits being extracted.
17436 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17440 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17441 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17443 2018-06-04 Richard Biener <rguenther@suse.de>
17445 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17446 (cleanup_tree_cfg_noloop): ... single caller. Do
17447 start_recording_case_labels later.
17449 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
17451 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17452 to _IMMINTRIN_H_INCLUDED.
17453 * config/i386/pconfigintrin.h: Ditto.
17454 * config/i386/waitpkgintrin.h: Ditto.
17455 * config/i386/immintrin.h: Add includes for sgxintrin.h,
17456 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17457 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17458 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17459 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17460 waitpkgintrin.h and cldemoteintrin.h.
17462 2018-06-04 Richard Biener <rguenther@suse.de>
17464 PR tree-optimization/86038
17465 * tracer.c (find_best_successor): Check probability for
17466 being initialized, bail out if not.
17468 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
17471 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17472 of bits to ignore when comparing architectures.
17474 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17476 PR tree-optimization/69615
17477 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17478 maximum or minimum of the type, try to merge it also as if
17479 range1 is + [-, x - 1] or + [x + 1, -].
17482 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17484 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
17486 PR tree-optimization/86034
17487 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17488 the unsigned bitfield type in a bit insertion sequence if it does not
17489 have a larger precision than the bitfield size.
17490 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17492 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
17494 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17496 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17498 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17499 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17500 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17501 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17503 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17505 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17506 Disable -fdelete-null-pointer-checks for ELF toolchain.
17508 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17509 Kito Cheng <kito.cheng@gmail.com>
17511 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17512 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17513 (nds32*-*-*): Add glibc and uclibc conditions.
17514 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17515 (TARGET_EXCEPT_UNWIND_INFO): Define.
17516 * config/nds32/elf.h: New file.
17517 * config/nds32/linux.h: New file.
17518 * config/nds32/nds32-elf.opt: New file.
17519 * config/nds32/nds32-linux.opt: New file.
17520 * config/nds32/nds32-fp-as-gp.c
17521 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17522 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17524 (nds32_asm_file_end): Ditto.
17525 (nds32_print_operand): Ditto.
17526 (nds32_insert_attributes): Ditto.
17527 (nds32_init_libfuncs): New function.
17528 (TARGET_HAVE_TLS): Define.
17529 (TARGET_INIT_LIBFUNCS): Define.
17530 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17532 (TARGET_ELF): Apply different mcmodel setting.
17533 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17534 been migrated into elf.h and linux.h files.
17535 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17536 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17537 (mcmodel): The content has been migrated into nds32-elf.opt and
17538 nds32-linux.opt files.
17539 * config/nds32/t-elf: New file.
17540 * config/nds32/t-linux: New file.
17542 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17543 Shiva Chen <shiva0217@gmail.com>
17545 * config/nds32/constants.md (unspec_volatile_element): Add
17546 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17547 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17549 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17550 (make_pass_nds32_fp_as_gp): Declare.
17551 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17553 (nds32_asm_function_end_prologue): Remove unused asm output.
17554 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17555 (nds32_asm_file_start): Output necessary fp_as_gp information.
17556 (nds32_option_override): Adjust register usage.
17557 (nds32_expand_prologue): Consider fp_as_gp situation.
17558 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17559 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17562 (simple_return): Ditto.
17563 (omit_fp_begin): Output special directive for fp_as_gp.
17564 (omit_fp_end): Output special directive for fp_as_gp.
17565 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17566 mforbid-fp-as-gp): New options.
17568 2018-06-01 Mark Wielaard <mark@klomp.org>
17570 * dwarf2out.c (dwarf2out_finish): Remove generation of
17571 DW_AT_loclists_base.
17573 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17575 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17576 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17577 (struct merged_store_group): Add bit_insertion field.
17578 (dump_char_array): Use standard hexadecimal format.
17579 (merged_store_group::merged_store_group): Set bit_insertion to false.
17580 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17581 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17582 also print the mask in the dump file.
17583 (pass_store_merging::gate): Minor tweak.
17584 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17585 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17586 stores with INTEGER_CST stores.
17587 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17588 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17589 and use it throughout. Generate bit insertion sequences if need be.
17590 (pass_store_merging::process_store): Remove redundant condition.
17591 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17593 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
17595 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17596 the 128-bit floating point types. Fix function comment.
17598 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17600 * config/aarch64/aarch64-simd.md
17601 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17603 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17606 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17608 PR tree-optimization/85989
17609 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17611 (backprop::intersect_uses): Check it when deciding whether this
17612 is a backedge reference.
17613 (backprop::process_block): Add each phi to m_visited_phis
17614 after visiting it, then clear it at the end.
17616 2018-06-01 Richard Biener <rguenther@suse.de>
17618 * tree-vectorizer.h (vect_dr_stmt): New function.
17619 (vect_get_load_cost): Adjust.
17620 (vect_get_store_cost): Likewise.
17621 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17622 Use vect_dr_stmt instead of DR_SMTT.
17623 (vect_record_base_alignments): Likewise.
17624 (vect_calculate_target_alignment): Likewise.
17625 (vect_compute_data_ref_alignment): Likewise and make static.
17626 (vect_update_misalignment_for_peel): Likewise.
17627 (vect_verify_datarefs_alignment): Likewise.
17628 (vector_alignment_reachable_p): Likewise.
17629 (vect_get_data_access_cost): Likewise. Pass down
17630 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17631 (vect_get_peeling_costs_all_drs): Likewise.
17632 (vect_peeling_hash_get_lowest_cost): Likewise.
17633 (vect_enhance_data_refs_alignment): Likewise.
17634 (vect_find_same_alignment_drs): Likewise.
17635 (vect_analyze_data_refs_alignment): Likewise.
17636 (vect_analyze_group_access_1): Likewise.
17637 (vect_analyze_group_access): Likewise.
17638 (vect_analyze_data_ref_access): Likewise.
17639 (vect_analyze_data_ref_accesses): Likewise.
17640 (vect_vfa_segment_size): Likewise.
17641 (vect_small_gap_p): Likewise.
17642 (vectorizable_with_step_bound_p): Likewise.
17643 (vect_prune_runtime_alias_test_list): Likewise.
17644 (vect_analyze_data_refs): Likewise.
17645 (vect_supportable_dr_alignment): Likewise.
17646 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17647 (vect_gen_prolog_loop_niters): Likewise.
17648 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17649 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17651 (vect_recog_mask_conversion_pattern): Likewise.
17652 (vect_try_gather_scatter_pattern): Likewise.
17653 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17654 to vect_get_store_cost.
17655 (vect_get_store_cost): Get stmt_info instead of DR.
17656 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17657 (vect_get_load_cost): Get stmt_info instead of DR.
17659 2018-06-01 Richard Biener <rguenther@suse.de>
17661 PR middle-end/86017
17662 * gimple-fold.c (var_decl_component_p): Also allow offsetted
17663 vars wrapped in MEM_REFs.
17665 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17667 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17668 Fix subreg tests so that we only return a choice between
17669 GENERAL_REGS and FP_REGS if the original classes included both.
17671 2018-06-01 Richard Biener <rguenther@suse.de>
17674 * tree-ssa-structalias.c (get_function_part_constraint):
17675 Handle NULL fi->decl.
17676 (find_func_aliases_for_call): Properly handle indirect
17677 fi from direct call.
17678 (find_func_clobbers): Likewise.
17679 (ipa_pta_execute): Likewise.
17680 (create_variable_info_for): For functions that are ifunc_resolver
17681 resolve to a varinfo that contains the result of the resolver call.
17682 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17685 2018-05-31 Michael Collison <michael.collison@arm.com>
17687 * config/aarch64/aarch64.md:
17688 (*fix_to_zero_extenddfdi2): New pattern.
17689 * gcc.target/aarch64/fix_extend1.c: New testcase.
17691 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
17693 PR middle-end/78809
17694 PR middle-end/83026
17695 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17696 and BUILT_IN_STRNCMP_EQ.
17697 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17698 BUILT_IN_STRNCMP_EQ.
17699 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17700 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17701 (gimple_fold_builtin): Likewise.
17702 * tree-ssa-strlen.c (compute_string_length): New function.
17703 (determine_min_obsize): New function.
17704 (handle_builtin_string_cmp): New function to handle calls to
17705 string compare functions.
17706 (strlen_optimize_stmt): Add handling to builtin string compare
17708 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17709 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17710 * tree.c (build_common_builtin_nodes): Add new defines of
17711 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17713 2018-05-31 Jakub Jelinek <jakub@redhat.com>
17716 * bb-reorder.c (pass_partition_blocks::gate): Return false for
17717 functions with naked attribute.
17719 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
17721 * config/i386/sse.md (avx_vec_concat<mode>):
17722 Substitute concat_tg_mode mode attribute with xtg_mode.
17723 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17724 (concat_tg_mode): Remove mode attribute.
17726 2018-05-31 Martin Sebor <msebor@redhat.com>
17729 * calls.c (alloc_max_size): Correct a logic error/typo.
17730 Treat excessive arguments as infinite. Warn for invalid arguments.
17731 * doc/invoke.texi (-Walloc-size-larger-than): Update.
17733 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
17736 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17737 and movx for Haswell.
17739 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
17740 Cesar Philippidis <cesar@codesourcery.com>
17742 PR middle-end/85879
17743 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17744 when emitting error on private/firstprivate reductions.
17745 * omp-low.c (lower_omp_target): Avoid reference-type processing
17746 on pointers for firstprivate clause.
17748 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17750 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17753 * config/aarch64/aarch64-simd.md
17754 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17755 (aarch64_ld1_x3_<mode>): Likewise
17756 (aarch64_st1x2<VALLDIF:mode>): Likewise
17757 (aarch64_st1_x2_<mode>): Likewise
17758 (aarch64_st1x3<VALLDIF:mode>): Likewise
17759 (aarch64_st1_x3_<mode>): Likewise
17760 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17761 (vld1_s8_x3): Likewise.
17762 (vld1_u16_x3): Likewise.
17763 (vld1_s16_x3): Likewise.
17764 (vld1_u32_x3): Likewise.
17765 (vld1_s32_x3): Likewise.
17766 (vld1_u64_x3): Likewise.
17767 (vld1_s64_x3): Likewise.
17768 (vld1_f16_x3): Likewise.
17769 (vld1_f32_x3): Likewise.
17770 (vld1_f64_x3): Likewise.
17771 (vld1_p8_x3): Likewise.
17772 (vld1_p16_x3): Likewise.
17773 (vld1_p64_x3): Likewise.
17774 (vld1q_u8_x3): Likewise.
17775 (vld1q_s8_x3): Likewise.
17776 (vld1q_u16_x3): Likewise.
17777 (vld1q_s16_x3): Likewise.
17778 (vld1q_u32_x3): Likewise.
17779 (vld1q_s32_x3): Likewise.
17780 (vld1q_u64_x3): Likewise.
17781 (vld1q_s64_x3): Likewise.
17782 (vld1q_f16_x3): Likewise.
17783 (vld1q_f32_x3): Likewise.
17784 (vld1q_f64_x3): Likewise.
17785 (vld1q_p8_x3): Likewise.
17786 (vld1q_p16_x3): Likewise.
17787 (vld1q_p64_x3): Likewise.
17788 (vst1_s64_x2): Likewise.
17789 (vst1_u64_x2): Likewise.
17790 (vst1_f64_x2): Likewise.
17791 (vst1_s8_x2): Likewise.
17792 (vst1_p8_x2): Likewise.
17793 (vst1_s16_x2): Likewise.
17794 (vst1_p16_x2): Likewise.
17795 (vst1_s32_x2): Likewise.
17796 (vst1_u8_x2): Likewise.
17797 (vst1_u16_x2): Likewise.
17798 (vst1_u32_x2): Likewise.
17799 (vst1_f16_x2): Likewise.
17800 (vst1_f32_x2): Likewise.
17801 (vst1_p64_x2): Likewise.
17802 (vst1q_s8_x2): Likewise.
17803 (vst1q_p8_x2): Likewise.
17804 (vst1q_s16_x2): Likewise.
17805 (vst1q_p16_x2): Likewise.
17806 (vst1q_s32_x2): Likewise.
17807 (vst1q_s64_x2): Likewise.
17808 (vst1q_u8_x2): Likewise.
17809 (vst1q_u16_x2): Likewise.
17810 (vst1q_u32_x2): Likewise.
17811 (vst1q_u64_x2): Likewise.
17812 (vst1q_f16_x2): Likewise.
17813 (vst1q_f32_x2): Likewise.
17814 (vst1q_f64_x2): Likewise.
17815 (vst1q_p64_x2): Likewise.
17816 (vst1_s64_x3): Likewise.
17817 (vst1_u64_x3): Likewise.
17818 (vst1_f64_x3): Likewise.
17819 (vst1_s8_x3): Likewise.
17820 (vst1_p8_x3): Likewise.
17821 (vst1_s16_x3): Likewise.
17822 (vst1_p16_x3): Likewise.
17823 (vst1_s32_x3): Likewise.
17824 (vst1_u8_x3): Likewise.
17825 (vst1_u16_x3): Likewise.
17826 (vst1_u32_x3): Likewise.
17827 (vst1_f16_x3): Likewise.
17828 (vst1_f32_x3): Likewise.
17829 (vst1_p64_x3): Likewise.
17830 (vst1q_s8_x3): Likewise.
17831 (vst1q_p8_x3): Likewise.
17832 (vst1q_s16_x3): Likewise.
17833 (vst1q_p16_x3): Likewise.
17834 (vst1q_s32_x3): Likewise.
17835 (vst1q_s64_x3): Likewise.
17836 (vst1q_u8_x3): Likewise.
17837 (vst1q_u16_x3): Likewise.
17838 (vst1q_u32_x3): Likewise.
17839 (vst1q_u64_x3): Likewise.
17840 (vst1q_f16_x3): Likewise.
17841 (vst1q_f32_x3): Likewise.
17842 (vst1q_f64_x3): Likewise.
17843 (vst1q_p64_x3): Likewise.
17845 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17847 * config/msp430/msp430.c (msp430_output_labelref): Prepend
17848 user_label_prefix to name.
17850 * tree-core.h: Update comment about the format of NAME string
17851 passed to handler in attribute_spec.
17853 * config/msp430/msp430.md: Remove erroneous subreg expression from
17854 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17855 zero_extend{q,h}isi2.
17857 2018-05-30 Borislav Petkov <bp@suse.de>
17859 * doc/extend.texi: Document some architecture specific
17860 constraints and sort entries.
17862 2018-05-30 Martin Sebor <msebor@redhat.com>
17864 PR middle-end/85369
17865 * builtins.c (expand_builtin_stpcpy_1): New function.
17866 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17867 only if the former succeeds.
17869 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17871 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17874 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17876 * doc/invoke.texi (-flinker-output): Document
17878 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17880 * passes.c (ipa_write_summaries): Only modify statements if body
17882 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17883 incrementally linking.
17884 (ipa_passes): Likewise.
17885 * lto-cgraph.c (lto_output_node): When incrementally linking do not
17886 pass down resolution info.
17887 * common.opt (flag_incremental_link): Update info.
17888 * gcc.c (plugin specs): Turn flinker-output=* to
17889 -plugin-opt=-linker-output-known
17890 * toplev.c (compile_file): Also cut compilation when doing incremental
17892 * flag-types. (enum lto_partition_model): Add
17893 LTO_LINKER_OUTPUT_NOLTOREL.
17894 (invoke.texi): Add -flinker-output docs.
17895 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17896 link same way as WPA; do not stream in dead initializers.
17898 * dwarf2out.c (dwarf2out_die_ref_for_decl,
17899 darf2out_register_external_decl): Support incremental link.
17901 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17903 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17905 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17907 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17908 it down to simple_object_copy_lto_debug_sections.
17909 (run_gcc): Determine incremental LTO link time and configure
17910 lto1 into non-wpa mode, disable renaming of debug sections.
17912 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
17914 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17915 descriptions of various incorrectly documented functions.
17917 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
17920 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17921 address check not strict.
17923 2018-05-30 Richard Biener <rguenther@suse.de>
17925 PR tree-optimization/85964
17926 * tracer.c (better_p): Drop initialized count check, we only
17927 call the function with initialized counts now.
17928 (find_best_successor): Do find a best edge if one
17929 has uninitialized count.
17930 (find_best_predecessor): Likewise. Do BB frequency check only
17931 if count is initialized.
17933 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
17935 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17936 (aarch64_ldrstr_offset_compare): New.
17937 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17938 load/store orderings.
17939 (aarch64_gen_adjusted_ldpstp): Likewise.
17941 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
17943 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17944 Check for subset of GENERAL_REGS and FP_REGS.
17945 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17948 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
17950 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17951 and wi::to_poly_offset. Add the current offset and then check
17952 whether the sum fits, rather than using an unchecked addition of
17953 a checked term. Check for a shwi rather than a uhwi.
17954 * expr.c (get_bit_range): Use tree_to_poly_uint64.
17955 (store_constructor): Use poly_int_tree_p.
17956 (expand_expr_real_1): Likewise.
17957 * function.c (assign_temp): Likewise.
17958 * fold-const.c (const_binop): Use poly_int_tree_p and
17959 wi::to_poly_offset.
17960 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
17962 * ipa-icf-gimple.c (func_checker::compare_operand): Use
17963 to_poly_offset for MEM offsets.
17964 * ipa-icf.c (sem_variable::equals): Likewise.
17965 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17966 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17967 wi::to_poly_offset for BIT_FIELD_REF offsets.
17968 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17969 wi::to_poly_offset.
17970 * var-tracking.c (emit_note_insn_var_location): Use
17971 tree_to_poly_uint64.
17973 2018-05-29 Jim Wilson <jimw@sifive.com>
17975 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17977 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
17980 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17981 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17983 (sse4_1_round<mode>2): Use nonimmediate_operand
17984 for operand 1 predicate.
17986 2018-05-29 Martin Sebor <msebor@redhat.com>
17987 Richard Biener <rguenther@suse.de>
17990 * calls.c (get_size_range): Call determine_value_range instead
17991 of get_value_range..
17992 * tree-vrp.h (determine_value_range): Declared new function.
17993 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17995 2018-05-29 Richard Biener <rguenther@suse.de>
17997 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17998 sure to use non-pattern stmts for get_earlier_stmt arguments.
17999 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
18000 called on pattern stmts.
18001 (get_later_stmt): Likewise.
18003 2018-05-29 Martin Liska <mliska@suse.cz>
18005 PR gcov-profile/85759
18006 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
18009 2018-05-29 Jakub Jelinek <jakub@redhat.com>
18011 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
18013 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
18017 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18018 VEC_PACK_FLOAT_EXPR): New tree codes.
18019 * tree-pretty-print.c (op_code_prio): Handle
18020 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18021 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18022 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18023 * tree-inline.c (estimate_operator_cost): Likewise.
18024 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
18025 * fold-const.c (const_binop): Likewise.
18026 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
18027 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18028 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18029 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
18030 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18031 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18032 * expr.c (expand_expr_real_2): Likewise.
18033 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
18034 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
18035 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
18037 * optabs.c (expand_widen_pattern_expr): For
18038 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
18039 sign from result type rather than operand's type.
18040 (expand_binop_directly): For vec_packu_float_optab and
18041 vec_packs_float_optab allow result type to be different from operand's
18043 * optabs-tree.c (optab_for_tree_code): Handle
18044 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18045 VEC_PACK_FLOAT_EXPR. Formatting fixes.
18046 * tree-vect-generic.c (expand_vector_operations_1): Handle
18047 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18048 VEC_PACK_FLOAT_EXPR.
18049 * tree-vect-stmts.c (supportable_widening_operation): Handle
18051 (supportable_narrowing_operation): Handle FLOAT_EXPR.
18052 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
18053 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
18054 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
18055 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
18057 (vec_pack<floatprefix>_float_<mode>): New expander.
18058 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
18060 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
18061 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
18062 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
18063 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
18064 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
18066 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
18067 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
18068 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18069 VEC_PACK_FLOAT_EXPR): Document.
18071 2018-05-29 Richard Biener <rguenther@suse.de>
18073 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
18075 (stmt_vec_info_vec): Make pointer.
18076 (init_stmt_vec_info_vec): Remove.
18077 (free_stmt_vec_info_vec): Likewise.
18078 (set_stmt_vec_info_vec): New function.
18079 (free_stmt_vec_infos): Likewise.
18080 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
18081 (set_vinfo_for_stmt): Likewise.
18082 (get_earlier_stmt): Likewise.
18083 (get_later_stmt): Likewise.
18084 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
18085 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
18086 (vec_info::~vec_info): Free stmt_vec_infos.
18087 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
18088 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
18089 (pass_slp_vectorize::execute): Likewise.
18090 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
18091 (free_stmt_vec_info_vec): Likewise.
18092 (set_stmt_vec_info_vec): New function.
18093 (free_stmt_vec_infos): Likewise.
18094 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
18095 the global stmt_vec_info_vec.
18096 * tree-parloops.c (gather_scalar_reductions): Use
18097 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
18100 2018-05-29 Richard Biener <rguenther@suse.de>
18102 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
18104 2018-05-29 Martin Liska <mliska@suse.cz>
18105 David Malcolm <dmalcolm@redhat.com>
18107 * vec.c (test_reverse): New.
18108 (vec_c_tests): Add new test.
18109 * vec.h (vl_ptr>::reverse): New function.
18111 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
18113 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
18115 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
18118 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
18120 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
18122 2018-05-28 Richard Biener <rguenther@suse.de>
18124 PR tree-optimization/85933
18125 * tree-vect-data-refs.c (vect_record_base_alignments): Only
18126 look at stmts marked as vectorizable.
18128 2018-05-28 Richard Biener <rguenther@suse.de>
18130 PR tree-optimization/85934
18131 * tree-vect-generic.c (expand_vector_operations_1): Hoist
18132 vector boolean check before scalar optimization.
18134 2018-05-28 Jakub Jelinek <jakub@redhat.com>
18136 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
18139 2018-05-28 Mark Wielaard <mark@klomp.org>
18141 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
18142 if it is an expression containing a minus sign.
18144 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
18146 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
18148 2018-05-27 Paul Koning <ni1d@arrl.net>
18150 * config/pdp11/pdp11.md (truncsihi2): Remove.
18152 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
18153 Chung-Ju Wu <jasonwucj@gmail.com>
18155 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
18157 (unaligned_store_dw): Ditto.
18158 * config/nds32/nds32-memory-manipulation.c
18159 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
18160 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
18161 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
18162 (emit_setmem_word_loop): Rename to ...
18163 (emit_setmem_doubleword_loop): ... this.
18164 (nds32_gen_dup_4_byte_to_word_value): New function.
18165 (nds32_gen_dup_8_byte_to_double_word_value): New function.
18166 (nds32_expand_setmem_loop): Refine implementation.
18167 (nds32_expand_setmem_loop_v3m): Ditto.
18168 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18171 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18173 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
18175 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
18177 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
18178 (nds32_init_machine_status): Initialize machine->attr_naked_p and
18179 machine->attr_no_prologue_p.
18180 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
18181 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
18182 (nds32_expand_epilogue): Consider attr_naked_p.
18183 (nds32_expand_epilogue_v3pop): Likewise.
18184 (nds32_can_use_return_insn): Likewise.
18185 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
18186 attr_no_prologue_p fields.
18187 * config/nds32/nds32.opt (mret-in-naked-func): New option.
18189 2018-05-27 Jakub Jelinek <jakub@redhat.com>
18192 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
18194 * config/i386/sse.md
18195 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
18197 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
18199 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
18201 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
18203 (*<floatsuffix>floatv2div2sf2): Rename to ...
18204 (*float<floatunssuffix>v2div2sf2): ... this.
18205 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
18206 (float<floatunssuffix>v2div2sf2_mask): ... this.
18207 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18208 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18209 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18211 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18213 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18215 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18217 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18219 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18221 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18222 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18223 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18224 gen_ufix_truncv8dfv8si2.
18225 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18226 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18227 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18228 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18229 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18230 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18231 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18232 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18234 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18238 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18240 2018-05-25 Jim Wilson <jimw@sifive.com>
18242 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18243 * config/riscv/riscv.c (struct machine_function): Add
18244 interrupt_handler_p and attribute_checked_p fields.
18245 (riscv_attribute_table): Add interrupt.
18246 (riscv_interrupt_type_p): New.
18247 (riscv_save_reg_p): Save extra regs for interrupt handler.
18248 (riscv_use_save_libcall): Return false for interrupt handler.
18249 (riscv_first_stack_step): Add forward declaration.
18250 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
18251 for interrupt handler with large frame. Use it for saved reg list.
18252 (riscv_expand_prologue): Move flag_stack_usage_info support to
18253 eliminate duplication.
18254 (riscv_expand_epilogue): Generate mret for interrupt handler.
18255 (riscv_epilogue_uses): New.
18256 (riscv_can_use_return_insn): Return false for interrupt handler.
18257 (riscv_function_ok_for_sibcall): Likewise.
18258 (riscv_set_current_function): Add interrupt handler support.
18259 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18260 * config/riscv/riscv.md (UNSPECV_MRET): New.
18262 (riscv_frflags, riscv_fsflags): Use tab after opcode.
18264 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18266 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
18268 PR tree-optimization/85712
18269 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18270 this candidate has already been replaced in-situ by a copy.
18272 2018-05-25 Jason Merrill <jason@redhat.com>
18274 PR c++/80485 - inline function non-zero address.
18275 * symtab.c (nonzero_address): Check DECL_COMDAT.
18277 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
18280 * config/alpha/alpha.md (ashlsi3): New insn pattern.
18281 (*ashlsi_se): Rename from *ashldi_se. Define as sign
18282 extension of SImode operation. Use const123_operand predicate.
18283 (*saddsi_1): Remove.
18284 (*saddl_se_1): Ditto.
18285 (*ssubsi_1): Ditto.
18286 (*ssubl_se_1): Ditto.
18287 * config/alpha/predicates.md (const123_operand): New predicate.
18288 * config/alpha/constraints.md (P): Use IN_RANGE.
18290 2018-05-25 Richard Biener <rguenther@suse.de>
18292 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18294 (ref_maybe_used_by_stmt_p): Likewise.
18295 (stmt_may_clobber_ref_p): Likewise.
18296 (stmt_may_clobber_ref_p_1): Likewise.
18297 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18299 (ref_maybe_used_by_stmt_p): Likewise.
18300 (stmt_may_clobber_ref_p): Likewise.
18301 (stmt_may_clobber_ref_p_1): Likewise.
18302 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18303 the alias oracle to disambiguate DRs with stmts DR analysis
18305 (vect_analyze_data_refs): Do not give up on not analyzable
18306 DRs for BB vectorization. Remove code truncating the dataref
18309 2018-05-25 Jakub Jelinek <jakub@redhat.com>
18312 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18313 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
18314 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18316 2018-05-25 Richard Biener <rguenther@suse.de>
18318 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18319 function, combining stmt data ref gathering and fatal analysis
18321 (vect_analyze_data_refs): Remove now redudnant code and simplify.
18322 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18323 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18324 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18325 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18327 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18329 PR tree-optimization/85720
18330 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18331 SCC if all partitions are builtins.
18332 (version_loop_by_alias_check): New parameter. Generate cancelable
18333 runtime alias check if all partitions are builtins.
18334 (distribute_loop): Update call to above function.
18336 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18338 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18339 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18340 (parm_default_def_partition_arg): Ditto.
18341 (set_parm_default_def_partition): Ditto.
18342 (get_parm_default_def_partitions): Ditto and make it static.
18343 (get_undefined_value_partitions): Ditto and make it static.
18344 (remove_ssa_form): Refactor call to init_var_map here.
18345 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18346 computation for loop region.
18347 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18348 (register_default_def): Delete.
18349 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18350 (parm_default_def_partition_arg): Ditto.
18351 (set_parm_default_def_partition): Ditto.
18352 (get_parm_default_def_partitions): Ditto and make it static.
18353 (get_undefined_value_partitions): Ditto and make it static.
18354 (coalesce_with_default, coalesce_with_default): Update comment.
18355 (create_coalesce_list_for_region): New func factored out from
18356 create_outofssa_var_map.
18357 (populate_coalesce_list_for_outofssa): New func factored out from
18358 create_outofssa_var_map and coalesce_ssa_name.
18359 (create_outofssa_var_map): Delete.
18360 (coalesce_ssa_name): Refactor to support live range computation.
18361 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18362 (get_parm_default_def_partitions): Delete.
18363 (get_undefined_value_partitions): Ditto.
18364 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18365 computation for loop region.
18366 (new_tree_live_info, loe_visit_block): Ditto.
18367 (live_worklist, set_var_live_on_entry): Ditto.
18368 (calculate_live_on_exit, verify_live_on_entry): Ditto.
18369 * tree-ssa-live.h (struct _var_map): New fields.
18370 (init_var_map): Change decl.
18371 (region_contains_p): New.
18373 2018-05-25 Bin Cheng <bin.cheng@arm.com>
18375 * tree-ssa-live.h (live_merge_and_clear): Delete.
18377 2018-05-25 Richard Biener <rguenther@suse.de>
18380 * tree-dump.c (dequeue_and_dump): Remove access to removed
18381 operand 2 of a SWITCH_EXPR.
18383 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18385 * doc/sourcebuild.texi (vect_double_cond_arith): Include
18386 multiplication and division.
18387 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18388 (cond_udiv@var{m}, cond_umod@var{m}): Document.
18389 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18390 (cond_udiv_optab, cond_umod_optab): New optabs.
18391 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18392 (IFN_COND_RDIV): New internal functions.
18393 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18394 TRUNC_MOD_EXPR and RDIV_EXPR.
18395 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18396 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18398 (SVE_INT_BINARY): Include mult.
18399 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18400 (optab, sve_int_op): Handle mult.
18401 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18403 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18404 for SVE_INT_BINARY_SD.
18406 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18408 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18409 (optab, sve_int_op): Handle div and udiv.
18410 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18411 for SVE_INT_BINARY_SD.
18412 (*<optab><mode>3): New insn for the same.
18414 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18416 * tree-vect-patterns.c: Include predict.h.
18417 (vect_recog_divmod_pattern): Restrict check for division support
18418 to when optimizing for size.
18420 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18422 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18423 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18424 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18425 (gimple_match_op::set_op): Likewise.
18426 (gimple_resimplify4): Declare.
18427 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18428 (expr::gen_transform): Likewise.
18429 (decision_tree::gen): Generate a simplification routine for 4 operands.
18430 * gimple-match-head.c (gimple_simplify): Add an overload for
18431 4 operands. In the top-level function, handle up to 4 call
18432 arguments and call gimple_resimplify4.
18433 (gimple_resimplify4): New function.
18434 (build_call_internal): Pass a fourth operand.
18435 (maybe_push_to_seq): Likewise.
18436 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18437 Fold VEC_COND_EXPRs of an operation and a default value into
18438 an IFN_COND_* function if possible.
18439 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18441 (SVE_COND_FP_BINARY): Include them.
18442 (optab, sve_fp_op): Handle them.
18443 (SVE_INT_BINARY_REV): New code iterator.
18444 (SVE_COND_FP_BINARY_REV): New int iterator.
18445 (commutative): New int attribute.
18446 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18448 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18450 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18451 (*cond_<optab><mode>): New patterns for reversed operands.
18453 2018-05-25 Richard Biener <rguenther@suse.de>
18455 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18456 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18457 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18458 (STMT_VINFO_GROUPED_ACCESS): Adjust.
18459 * tree-vect-data-refs.c (everywhere): Adjust users.
18460 * tree-vect-loop.c (everywhere): Likewise.
18461 * tree-vect-slp.c (everywhere): Likewise.
18462 * tree-vect-stmts.c (everywhere): Likewise.
18463 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18465 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18467 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18469 (gcc_cv_as_section_exclude): ... this.
18470 Try Solaris as #exclude syntax.
18471 * configure: Regenerate.
18472 * config.in: Regenerate.
18473 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18475 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18476 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18478 * varasm.c (default_elf_asm_named_section): Don't check if
18479 HAVE_GAS_SECTION_EXCLUDE is defined.
18481 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18483 * doc/md.texi: Update the documentation of the cond_* optabs
18484 to mention the new final operand. Fix GET_MODE_NUNITS call.
18485 Describe the scalar case too.
18486 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18487 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18489 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18490 (get_conditional_internal_fn): Update comment.
18491 * tree-vect-loop.c (vectorizable_reduction): Pass the original
18492 accumulator value as a final argument to conditional functions.
18493 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18494 a define_expand and add an "else" operand. Assert for now that
18495 the else operand is equal to operand 2. Use SVE_INT_BINARY and
18496 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18497 (*cond_<optab><mode>): New patterns.
18498 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18499 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18500 (UNSPEC_COND_EOR): Delete.
18501 (optab): Remove associated mappings.
18502 (SVE_INT_BINARY): New code iterator.
18503 (sve_int_op): Remove int attribute and add "minus" to the code
18505 (SVE_COND_INT_OP): Delete.
18506 (SVE_COND_FP_OP): Rename to...
18507 (SVE_COND_FP_BINARY): ...this.
18509 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18511 * optabs.c (can_reuse_operands_p): New function.
18512 (maybe_legitimize_operands): Try to reuse the results for
18515 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18517 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18518 Add {q} suffix to insn mnemonic.
18520 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18522 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18523 (msp430_warn_func_return): New.
18525 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18527 * fold-const.c (tree_nonzero_bits): New function.
18528 * fold-const.h (tree_nonzero_bits): Likewise.
18529 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18530 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18532 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18536 * varasm.c (assemble_alias): Check ifunc_resolver only on
18539 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18542 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18543 when memory input operand is handled.
18545 2018-05-24 Luis Machado <luis.machado@linaro.org>
18547 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18549 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18551 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18553 * match.pd: Delay FMA folds until after vectorization.
18555 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18558 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18559 address check not strict.
18561 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18563 * gimple-match.h (gimple_match_op): New class.
18564 (mprts_hook): Replace parameters with a gimple_match_op *.
18565 (maybe_build_generic_op): Likewise.
18566 (gimple_simplified_result_is_gimple_val): Replace parameters with
18567 a const gimple_match_op *.
18568 (gimple_simplify): Replace code_helper * and tree * parameters with
18569 a gimple_match_op * parameter.
18570 (gimple_resimplify1): Replace code_helper *, tree and tree *
18571 parameters with a gimple_match_op * parameter.
18572 (gimple_resimplify2): Likewise.
18573 (gimple_resimplify3): Likewise.
18574 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18575 parameters with a gimple_match_op * parameter.
18576 * gimple-match-head.c (gimple_simplify): Change prototypes of
18577 auto-generated functions to take a gimple_match_op * instead of
18578 separate code_helper * and tree * parameters. Make the same
18579 change in the top-level overload and update calls to the
18580 gimple_resimplify routines. Update calls to the auto-generated
18581 functions and to maybe_push_res_to_seq in the publicly-facing
18582 operation-specific gimple_simplify overloads.
18583 (gimple_match_op::MAX_NUM_OPS): Define.
18584 (gimple_resimplify1): Replace rcode and ops with a single res_op
18585 parameter. Update call to gimple_simplify.
18586 (gimple_resimplify2): Likewise.
18587 (gimple_resimplify3): Likewise.
18588 (mprts_hook): Replace parameters with a gimple_match_op *.
18589 (maybe_build_generic_op): Likewise.
18590 (build_call_internal): Replace type, nargs and ops with
18591 a gimple_match_op *.
18592 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18593 with a single gimple_match_op *. Update calls to mprts_hook,
18594 build_call_internal and gimple_simplified_result_is_gimple_val.
18595 Factor out code that is common to the tree_code and combined_fn cases.
18596 * genmatch.c (expr::gen_transform): Replace tem_code and
18597 tem_ops with a gimple_match_op called tem_op. Update calls
18598 to the gimple_resimplify functions and maybe_push_res_to_seq.
18599 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18600 res_ops. Update call to the gimple_resimplify functions.
18601 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18602 (decision_tree::gen): Make the functions take a gimple_match_op *
18603 called res_op instead of separate res_code and res_ops parameters.
18604 Update call accordingly.
18605 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18606 and ops with a single res_op parameter. Update calls to
18607 maybe_build_generic_op and maybe_push_res_to_seq.
18608 (fold_stmt_1): Update calls to gimple_simplify and
18609 replace_stmt_with_simplification.
18610 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18611 and gimple_simplified_result_is_gimple_val.
18612 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18614 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18615 with a gimple_match_op *.
18616 (vn_nary_build_or_lookup): Likewise. Update call to
18617 vn_nary_build_or_lookup_1.
18618 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18619 gimple_match_op *. Update calls to the gimple_resimplify routines
18620 and to gimple_simplified_result_is_gimple_val.
18621 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18622 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18623 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18624 (visit_nary_op): Likewise.
18625 (visit_reference_op_load): Likewise.
18627 2018-05-23 Luis Machado <luis.machado@linaro.org>
18629 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18630 modifier for printing the step amount.
18632 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
18635 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18638 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
18640 * doc/sourcebuild.texi (Endianness): New subsubsection.
18642 2018-05-23 Luis Machado <luis.machado@linaro.org>
18644 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18645 <prefetch_dynamic_strides>: New const bool field.
18646 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18647 prefetch_dynamic_strides.
18648 (exynosm1_prefetch_tune): Likewise.
18649 (thunderxt88_prefetch_tune): Likewise.
18650 (thunderx_prefetch_tune): Likewise.
18651 (thunderx2t99_prefetch_tune): Likewise.
18652 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18654 (aarch64_override_options_internal): Update to set
18655 PARAM_PREFETCH_DYNAMIC_STRIDES.
18656 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18657 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18658 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18659 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18660 prefetch-dynamic-strides setting.
18662 2018-05-23 Luis Machado <luis.machado@linaro.org>
18664 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18665 <minimum_stride>: New const int field.
18666 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18667 minimum_stride field defaulting to -1.
18668 (exynosm1_prefetch_tune): Likewise.
18669 (thunderxt88_prefetch_tune): Likewise.
18670 (thunderx_prefetch_tune): Likewise.
18671 (thunderx2t99_prefetch_tune): Likewise.
18672 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18673 <default_opt_level>: Set to 3.
18674 (aarch64_override_options_internal): Update to set
18675 PARAM_PREFETCH_MINIMUM_STRIDE.
18676 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18677 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18678 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18679 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18680 stride is constant and is below the minimum stride threshold.
18682 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18684 * config/arm/arm-cpus.in (mode26): Delete.
18685 (armv4): Delete mode26 reference.
18686 * config/arm/arm.c (arm_configure_build_target): Delete use of
18689 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18691 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18693 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18694 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
18696 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
18697 (floatunsdidf2): Ditto.
18699 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18701 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18702 (fixuns_trunc<mode>si2_avx512f): Ditto.
18703 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18704 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18705 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18707 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18709 PR rtl-optimization/79985
18710 * df-scan.c (df_insn_refs_collect): Remove special case for
18711 global registers and asm statements.
18713 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18715 * extend.texi (Global Register Variables): Rewrite the bullet list.
18716 Note that the register is available for allocation. Note that access
18717 via inline asm must use constraints. Add note about async-signal
18718 handlers. Remove paragraph about automagic register selection.
18720 2018-05-23 Richard Biener <rguenther@suse.de>
18722 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18723 of fixed offset from memset VN.
18725 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
18727 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18728 first_interp field.
18729 (alloc_cand_and_find_basis): Initialize first_interp field.
18730 (slsr_process_mul): Modify first_interp field.
18731 (slsr_process_add): Likewise.
18732 (slsr_process_cast): Modify first_interp field for each new
18734 (slsr_process_copy): Likewise.
18735 (dump_candidate): Dump first_interp field.
18736 (replace_mult_candidate): Process all interpretations, not just
18738 (replace_rhs_if_not_dup): Likewise.
18739 (replace_one_candidate): Likewise.
18741 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
18743 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18745 (aarch64_needs_frame_chain): New function.
18746 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18748 2018-05-23 Sudakshina Das <sudi.das@arm.com>
18751 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18752 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18753 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18754 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18755 as true for strict-align.
18756 (aarch64_can_inline_p): Perform checks even when callee has no
18757 attributes to check for strict alignment.
18758 * doc/extend.texi (AArch64 Function Attributes): Document
18760 * doc/invoke.texi: (AArch64 Options): Likewise.
18762 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
18764 PR tree-optimization/85853
18765 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18766 the handling of the root of the node to...
18767 (vect_slp_analyze_node_operations_1): ...this new function,
18768 and run the whole thing with the child nodes' def types
18769 set according to their SLP node's def type.
18771 2018-05-23 Richard Biener <rguenther@suse.de>
18773 PR middle-end/85874
18774 * tree-data-ref.c (create_runtime_alias_checks): Defer
18775 and ignore overflow warnings.
18777 2018-05-23 Yury Gribov <tetra2005@gmail.com>
18779 PR tree-optimization/85822
18780 * tree-vrp.c (is_masked_range_test): Fix handling of negative
18783 2018-05-23 Richard Biener <rguenther@suse.de>
18785 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18786 memset constants via native_interpret_expr.
18788 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
18791 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18793 (cgraph_node::create_alias): Likewise.
18794 (cgraph_node::get_availability): Check ifunc_resolver instead
18795 of looking up ifunc attribute.
18796 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18797 * varasm.c (do_assemble_alias): Likewise.
18798 (assemble_alias): Likewise.
18799 (default_binds_local_p_3): Likewise.
18800 * cgraph.h (cgraph_node): Add ifunc_resolver.
18801 (cgraph_node::only_called_directly_or_aliased_p): Return false
18802 for IFUNC resolver.
18803 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18805 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18806 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18807 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18808 instead of looking up ifunc attribute.
18810 2018-05-22 Luis Machado <luis.machado@linaro.org>
18812 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18814 2018-05-22 Martin Sebor <msebor@redhat.com>
18816 PR middle-end/85359
18817 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18818 only when expasion succeeds.
18819 (expand_builtin_strcmp): Same.
18820 (expand_builtin_strncmp): Same.
18822 2018-05-22 Martin Sebor <msebor@redhat.com>
18824 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18826 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18827 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18829 * config/aarch64/aarch64-ldpstp.md: Replace uses of
18830 aarch64_mem_pair_operand with memory_operand and delete operand swapping
18832 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18833 Add check for legitimate_address.
18834 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18835 (aarch64_swap_ldrstr_operands): New.
18836 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18839 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18840 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18842 * config/aarch64/aarch64.md: New patterns to generate stp
18844 (store_pair_sw, store_pair_dw): New patterns to generate stp for
18845 single words and double words.
18846 (load_pair_sw, load_pair_dw): Likewise.
18847 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18849 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18851 * config/aarch64/aarch64-ldpstp.md: Modify peephole
18852 for different mode ldpstp and add peephole for merged zero stores.
18853 Likewise for loads.
18854 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18856 (aarch64_gen_store_pair): Rename calls to match new patterns.
18857 (aarch64_gen_load_pair): Rename calls to match new patterns.
18858 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18859 (load_pair<DREG:mode><DREG2:mode>): ... This.
18860 (store_pair<mode>): Rename to...
18861 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18862 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18863 New mode iterators.
18864 (V_INT_EQUIV): Handle SImode.
18865 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18868 2018-05-22 Martin Sebor <msebor@redhat.com>
18871 * calls.c (maybe_warn_nonstring_arg): Use string length to set
18872 or ajust the presumed bound on an operation to avoid unnecessary
18875 2018-05-22 Martin Sebor <msebor@redhat.com>
18877 PR tree-optimization/85826
18878 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18879 assuming that a DECL necesarily has a constant size.
18881 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
18883 PR middle-end/85862
18884 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18886 2018-05-22 Richard Biener <rguenther@suse.de>
18888 PR tree-optimization/85834
18889 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18890 non-constant and non-zero memset arguments.
18892 2018-05-22 Martin Liska <mliska@suse.cz>
18895 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18897 2018-05-22 Richard Biener <rguenther@suse.de>
18899 PR tree-optimization/85863
18900 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18901 comparisons when vectype is specified.
18902 (vectorizable_condition): Do not specify vectype for
18903 vect_is_simple_cond when SLP vectorizing.
18905 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
18908 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18909 define __ibm128 as long double.
18910 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18911 as a distinct type when IEEE 128-bit support is enabled.
18912 (init_float128_ieee): Fix up conversions between IFmode and IEEE
18913 128-bit types to use the correct functions.
18914 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18915 convert between 128-bit floating point types that have different
18916 modes but the same representation, instead of using gen_lowpart to
18918 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18920 (IFKF_reg): New attributes to give the register constraints for
18922 (extend<mode>tf2_internal): New insns to mark an explicit
18923 conversion between 128-bit floating point types that have a
18924 different mode but share the same representation.
18926 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
18928 PR tree-optimization/85814
18929 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18930 a null return from get_strinfo when unsharing the next
18931 strinfo in the chain.
18933 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18936 * varasm.c (weak_finish): Clean up weak_decls.
18938 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18940 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18941 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18942 UNSPEC_UADALP values.
18943 * config/aarch64/iterators.md (ABAL): New int iterator.
18946 (sur): Add mappings for the above.
18947 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18949 (aarch64_<sur>abal<mode>_4): Likewise.
18950 (aarch64_<sur>adalp<mode>_3): Likewise.
18951 (<sur>sadv16qi): New define_expand.
18953 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
18955 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18956 (*movdf_internal): Ditto.
18957 (*rcpsf2_sse): Ditto.
18958 (*rsqrtsf2_sse): Ditto.
18959 (*sqrt<mode>2_sse): Ditto.
18961 2018-05-21 Tamar Christina <tamar.christina@arm.com>
18963 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18965 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18966 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18967 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18968 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18970 * config/aarch64/arm_neon.h: Likewise.
18971 * config/aarch64/iterators.md (VQ_I): New.
18973 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
18975 * config.gcc: Add arc/t-multilib-linux to tmake_file for
18977 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18980 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18982 * config/nds32/constraints.md (S): New constraint.
18983 * config/nds32/nds32.md (call_internal): Use constraint S.
18984 (call_value_internal): Likewise.
18985 (sibcall_internal): Likewise.
18986 (sibcall_value_internal): Likewise.
18988 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18989 Chung-Ju Wu <jasonwucj@gmail.com>
18991 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18992 into consideration.
18994 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18995 Chung-Ju Wu <jasonwucj@gmail.com>
18997 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18998 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18999 (nds32_rtx_costs_impl): Simplify.
19000 (nds32_address_cost_impl): Simplify.
19001 (nds32_init_rtx_costs): New function.
19002 (nds32_rtx_costs_speed_prefer): Likewise.
19003 (nds32_rtx_costs_size_prefer): Likewise.
19004 (nds32_address_cost_speed_prefer): Likewise.
19005 (nds32_address_cost_speed_fwprop): Likewise.
19006 (nds32_address_cost_size_prefer): Likewise.
19007 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
19008 * config/nds32/nds32.c (nds32_option_override): Use
19009 nds32_init_rtx_costs function.
19011 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
19013 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
19014 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
19015 (TARGET_PIPELINE_N8): Likewise.
19016 (TARGET_PIPELINE_N10): Likewise.
19017 (TARGET_PIPELINE_N13): Likewise.
19018 (TARGET_PIPELINE_GRAYWOLF): Likewise.
19020 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
19022 * config/nds32/nds32-fpu.md: Update copyright year.
19024 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19026 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
19028 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19030 * config/nds32/nds32.c
19031 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
19032 * config/nds32/nds32.opt (minline-asm-r15): New option.
19034 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19036 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
19038 * config/nds32/nds32.md (abssi2): New pattern.
19040 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
19042 * config/i386/i386.md (rex64namesuffix): New mode attribute.
19043 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
19044 Merge insn pattern from sse_cvtsi2ss<round_name> and
19045 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
19046 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
19047 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
19048 using SWI48 mode iterator.
19049 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
19050 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
19051 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
19052 pattern from sse_cvttss2si<round_saeonly_name>
19053 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
19054 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
19055 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
19056 using SWI48 mode iterator.
19057 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
19058 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
19059 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
19060 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
19061 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
19062 using SWI48 mode iterator.
19063 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
19064 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
19065 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
19066 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
19067 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
19068 SWI48 mode iterator.
19069 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
19070 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
19071 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
19072 pattern from sse_cvttsd2si<round_saeonly_name>
19073 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
19075 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19077 * config/nds32/nds32-md-auxiliary.c
19078 (nds32_valid_smw_lwm_base_p): Refine.
19079 (nds32_output_smw_single_word): Refine.
19080 (nds32_output_smw_double_word): New.
19081 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
19083 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19085 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
19086 (nds32_output_stack_pop): Refine.
19087 (nds32_expand_unaligned_load): Refine.
19088 (nds32_expand_unaligned_store): Refine.
19090 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19091 Chung-Ju Wu <jasonwucj@gmail.com>
19093 * config/nds32/constants.md: Add TP_REGNUM constant.
19094 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
19095 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
19097 * config/nds32/nds32-doubleword.md: Consider flag_pic.
19098 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
19099 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
19100 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
19101 and PIC code generation.
19102 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
19104 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
19106 * config/nds32/nds32.md: Support TLS and PIC.
19107 * config/nds32/nds32.c: Support TLS and PIC.
19108 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
19109 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
19112 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
19114 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
19115 mode with E_ prefix.
19117 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19118 Chung-Ju Wu <jasonwucj@gmail.com>
19120 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
19121 * config/nds32/nds32-md-auxiliary.c
19122 (symbolic_reference_mentioned_p): New.
19123 (nds32_legitimize_ict_address): New.
19124 (nds32_expand_ict_move): New.
19125 (nds32_indirect_call_referenced_p): New.
19126 (nds32_symbol_binds_local_p): Delete.
19127 (nds32_long_call_p): Modify.
19128 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
19129 * config/nds32/nds32-protos.h
19130 (symbolic_reference_mentioned_p): Declare.
19131 (nds32_legitimize_ict_address): Declare.
19132 (nds32_expand_ict_move): Declare.
19133 (nds32_indirect_call_referenced_p): Declare.
19134 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
19135 (nds32_relax_group): Use nds32_ict_const_p as condition.
19136 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
19137 (nds32_asm_file_start): Output ict_model directive in asm code.
19138 (nds32_legitimate_address_p): Consider indirect call.
19139 (nds32_print_operand): Consider indirect call.
19140 (nds32_print_operand_address): Consider indirect call.
19141 (nds32_insert_attributes): Handle "indirect_call" attribute.
19142 (TARGET_LEGITIMATE_ADDRESS_P): Define.
19143 (TARGET_LEGITIMATE_CONSTANT_P): Define.
19144 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
19145 (TARGET_DELEGITIMIZE_ADDRESS): Define.
19146 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
19147 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
19148 (TARGET_ICT_MODEL_SMALL): Define.
19149 (TARGET_ICT_MODEL_LARGE): Define.
19150 * config/nds32/nds32.md (movsi): Consider ict model.
19151 (call, call_value): Consider ict model.
19152 (sibcall, sibcall_value): Consider ict model.
19153 * config/nds32/nds32.opt (mict-model): New option.
19154 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
19157 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
19158 Monk Chiang <sh.chiang04@gmail.com>
19159 Jim Wilson <jimw@sifive.com>
19161 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
19162 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
19163 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
19164 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
19165 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
19166 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19167 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19168 compute save_libcall_adjustment properly.
19169 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19170 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19171 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19172 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
19173 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
19174 (ABI_SPEC): Handle mabi=ilp32e.
19175 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
19176 (RVE): Add RVE mask.
19177 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
19178 <-march>: Add rv32e as an example.
19180 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
19183 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
19184 (intra_create_variable_infos): Handle C++ constructors.
19186 2018-05-18 Martin Liska <mliska@suse.cz>
19188 * passes.def: Remove a redundant pass.
19190 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
19193 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
19195 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19197 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
19199 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
19201 (armv2, armv2a, armv3, armv3m): Delete architectures.
19202 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
19203 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
19204 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
19206 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19207 (*mulsidi3adddi): Likewise.
19208 (mulsidi3): Likewise.
19209 (*mulsidi3_nov6): Likewise.
19210 (umulsidi3): Likewise.
19211 (umulsidi3_nov6): Likewise.
19212 (umaddsidi4): Likewise.
19213 (*umulsidi3adddi): Likewise.
19214 (smulsi3_highpart): Likewise.
19215 (*smulsi3_highpart_nov6): Likewise.
19216 (umulsi3_highpart): Likewise.
19217 (*umulsi3_highpart_nov6): Likewise.
19218 * config/arm/arm.h (arm_arch3m): Delete.
19219 * config/arm/arm.c (arm_arch3m): Delete.
19220 (arm_option_override_internal): Update armv3-related comment.
19221 (arm_configure_build_target): Delete use of isa_bit_mode32.
19222 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19223 (arm_rtx_costs_internal): Delete check of arm_arch3m.
19224 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19225 (mulsa3): Likewise.
19226 (mulusa3): Likewise.
19227 * config/arm/arm-protos.h (arm_arch3m): Delete.
19228 * config/arm/arm-tables.opt: Regenerate.
19229 * config/arm/arm-tune.md: Likewise.
19230 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19231 deleted architectures.
19233 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19235 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19236 (armv5t, armv5te): New features.
19237 (ARMv5, ARMv5e): Delete fgroups.
19238 (ARMv5t, ARMv5te): Adjust for above changes.
19239 (ARMv6m): Likewise.
19240 (armv5, armv5e): Delete arches.
19241 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19243 (*call_reg_arm): Likewise.
19244 (*call_value_reg_armv5): Likewise.
19245 (*call_value_reg_arm): Likewise.
19246 (*call_symbol): Likewise.
19247 (*call_value_symbol): Likewise.
19248 (*sibcall_insn): Likewise.
19249 (*sibcall_value_insn): Likewise.
19250 (clzsi2): Likewise.
19251 (prefetch): Likewise.
19252 (define_split and define_peephole2 dependent on arm_arch5):
19254 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19256 (TARGET_ARM_QBIT): Likewise.
19257 (TARGET_DSP_MULTIPLY): Likewise.
19258 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19259 (arm_arch5, arm_arch5e): Delete.
19260 (arm_arch5t, arm_arch5te): Declare.
19261 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19262 (arm_arch5t): Declare.
19263 (arm_option_reconfigure_globals): Update for the above.
19264 (arm_options_perform_arch_sanity_checks): Update comment, replace
19265 use of arm_arch5 with arm_arch5t.
19266 (use_return_insn): Likewise.
19267 (arm_emit_call_insn): Likewise.
19268 (output_return_instruction): Likewise.
19269 (arm_final_prescan_insn): Likewise.
19270 (arm_coproc_builtin_available): Likewise.
19271 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19272 arm_arch5e with arm_arch5t and arm_arch5te.
19273 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19274 (arm_arch5t, arm_arch5te): Declare.
19275 * config/arm/arm-tables.opt: Regenerate.
19276 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19277 * config/arm/t-multilib: Likewise.
19278 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19279 instead of arm_arch5.
19280 (*call_reg_thumb1): Likewise.
19281 (*call_value_reg_thumb1_v5): Likewise.
19282 (*call_value_reg_thumb1): Likewise.
19283 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19285 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19287 2018-05-18 Martin Liska <mliska@suse.cz>
19289 PR gcov-profile/84846
19290 * doc/gcov.texi: Document -t option of gcov tool.
19292 2018-05-18 Martin Liska <mliska@suse.cz>
19294 PR gcov-profile/84846
19295 * gcov.c (print_usage): Add new -t option.
19296 (process_args): Handle the option.
19297 (generate_results): Use stdout as output when requested by
19300 2018-05-18 Martin Liska <mliska@suse.cz>
19302 PR gcov-profile/84846
19303 * coverage.c (coverage_init): Write PWD to .gcno file.
19304 * doc/gcov.texi: Document how working directory is printed.
19305 * gcov-dump.c (dump_gcov_file): Print PWD.
19306 * gcov.c (output_intermediate_file): Likewise.
19307 (read_graph_file): Read PWD string.
19308 (output_lines): Print PWD.
19310 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19312 PR middle-end/85817
19313 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19314 for retval and return false if all args to phi are zero.
19316 2018-05-18 Richard Biener <rguenther@suse.de>
19318 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19320 (evrp_dom_walker::before_dom_children): Call it.
19322 2018-05-18 Richard Biener <rguenther@suse.de>
19324 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19325 results when processing array refs with variable index.
19327 2018-05-18 Toon Moene <toon@moene.org>
19329 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19330 directly after that of -floop-interchange. Indicate that both
19331 options are enabled by default when specifying -O3.
19333 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19335 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19336 iterator. Delete separate integer-mode vec_set<mode> expander.
19337 (aarch64_simd_vec_setv2di): Delete.
19338 (vec_setv2di): Delete.
19339 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19340 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
19341 the "w, r" alternative.
19343 2018-05-18 Martin Liska <mliska@suse.cz>
19345 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19346 * tree-pass.h (make_pass_lower_switch_O0): New function.
19347 * tree-switch-conversion.c (node_has_low_bound): Remove.
19348 (node_has_high_bound): Likewise.
19349 (node_is_bounded): Likewise.
19350 (class pass_lower_switch): Make it a template type and create
19352 (pass_lower_switch::execute): Add template argument.
19353 (make_pass_lower_switch): New function.
19354 (make_pass_lower_switch_O0): New function.
19355 (do_jump_if_equal): Remove.
19356 (emit_case_nodes): Simplify to just handle all 3 cases and leave
19357 all the hard work to tree optimization passes.
19359 2018-05-18 Martin Liska <mliska@suse.cz>
19361 * dbgcnt.c (limit_low): Renamed from limit.
19362 (limit_high): New variable.
19363 (dbg_cnt_is_enabled): Check for upper limit.
19364 (dbg_cnt): Adjust dumping.
19365 (dbg_cnt_set_limit_by_index): Add new argument for high
19367 (dbg_cnt_set_limit_by_name): Likewise.
19368 (dbg_cnt_process_single_pair): Parse new format.
19369 (dbg_cnt_process_opt): Use strtok.
19370 (dbg_cnt_list_all_counters): Remove 'value' and add
19372 * doc/invoke.texi: Document changes.
19374 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
19376 * doc/sourcebuild.texi (scalar_all_fma): Document.
19377 * tree.def (FMA_EXPR): Delete.
19378 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19379 * internal-fn.c (ternary_direct): New macro.
19380 (expand_ternary_optab_fn): Likewise.
19381 (direct_ternary_optab_supported_p): Likewise.
19382 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19383 * builtins.c (fold_builtin_fma): Delete.
19384 (fold_builtin_3): Don't call it.
19385 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19386 * expr.c (expand_expr_real_2): Likewise.
19387 * fold-const.c (operand_equal_p): Likewise.
19388 (fold_ternary_loc): Likewise.
19389 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19390 * gimple.c (DEFTREECODE): Likewise.
19391 * gimplify.c (gimplify_expr): Likewise.
19392 * optabs-tree.c (optab_for_tree_code): Likewise.
19393 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19394 * tree-eh.c (operation_could_trap_p): Likewise.
19395 (stmt_could_throw_1_p): Likewise.
19396 * tree-inline.c (estimate_operator_cost): Likewise.
19397 * tree-pretty-print.c (dump_generic_node): Likewise.
19398 (op_code_prio): Likewise.
19399 * tree-ssa-loop-im.c (stmt_cost): Likewise.
19400 * tree-ssa-operands.c (get_expr_operands): Likewise.
19401 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19402 * fold-const-call.h (fold_fma): Delete.
19403 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19404 CFN_FNMA and CFN_FNMS.
19405 (fold_fma): Delete.
19406 * genmatch.c (combined_fn): New enum.
19407 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19408 (commutative_op): New function.
19409 (commutate): Use it. Handle more than 2 operands.
19410 (dt_operand::gen_gimple_expr): Use commutative_op.
19411 (parser::parse_expr): Allow :c to be used with non-binary
19412 operators if the commutative operand is known.
19413 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19414 CFN_FMS, CFN_FNMA and CFN_FNMS.
19415 (backprop::process_assign_use): Remove FMA_EXPR handling.
19416 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19417 (gen_hsa_fma): New function.
19418 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19419 IFN_FNMA and IFN_FNMS.
19420 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19421 * gimple-fold.h (follow_all_ssa_edges): Declare.
19422 * gimple-fold.c (follow_all_ssa_edges): New function.
19423 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19424 gimple_build interface and use follow_all_ssa_edges to fold the result.
19425 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19426 instead of checking for optabs directly.
19427 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19428 rather than FMA_EXPRs.
19429 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19430 call to IFN_FMA instead of an FMA_EXPR.
19432 2018-05-17 Jim Wilson <jimw@sifive.com>
19434 * expr.c (do_tablejump): When converting index to Pmode, if we have a
19435 sign extended promoted subreg, and the range does not have the sign bit
19436 set, then do a sign extend.
19438 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19439 test, check for sign extended subreg and/or constant operands, and
19440 do a sign extend in that case.
19442 2018-05-17 Steve Ellcey <sellcey@cavium.com>
19444 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19445 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19447 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19448 Change logics_shift_reg to logics_shift_imm.
19449 (thunderx2t99_fp_loadpair_basic): Delete.
19450 (thunderx2t99_fp_storepair_basic): Delete.
19451 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19452 (thunderx2t99_asimd_polynomial): Delete.
19453 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19454 and neon_fp_mul_d_scalar_q.
19455 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19456 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19457 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19458 (thunderx2t99_asimd_lut): Add missing tbl types.
19459 (thunderx2t99_asimd_ext): Delete.
19460 (thunderx2t99_asimd_load1_1_mult): Delete.
19461 (thunderx2t99_asimd_load1_2_mult): Delete.
19462 (thunderx2t99_asimd_load1_ldp): New.
19463 (thunderx2t99_asimd_load1): New.
19464 (thunderx2t99_asimd_load2): Add missing *load2* types.
19465 (thunderx2t99_asimd_load3): New.
19466 (thunderx2t99_asimd_load4): New.
19467 (thunderx2t99_asimd_store1_1_mult): Delete.
19468 (thunderx2t99_asimd_store1_2_mult): Delete.
19469 (thunderx2t99_asimd_store2_mult): Delete.
19470 (thunderx2t99_asimd_store2_onelane): Delete.
19471 (thunderx2t99_asimd_store_stp): New.
19472 (thunderx2t99_asimd_store1): New.
19473 (thunderx2t99_asimd_store2): New.
19474 (thunderx2t99_asimd_store3): New.
19475 (thunderx2t99_asimd_store4): New.
19477 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
19479 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19480 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
19482 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
19483 Segher Boessenkool <segher@kernel.crashing.org>
19486 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19489 2018-05-17 Richard Biener <rguenther@suse.de>
19491 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19492 for pruning loop and prune defs feeding only already visited PHIs.
19494 2018-05-17 Richard Biener <rguenther@suse.de>
19496 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19498 2018-05-17 Bin Cheng <bin.cheng@arm.com>
19499 Richard Biener <rguenther@suse.de>
19501 PR tree-optimization/85793
19502 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19503 for VMAT_ELEMENTWISE.
19505 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19507 * internal-fn.h (lookup_internal_fn): Declare
19508 * internal-fn.c (lookup_internal_fn): New function.
19509 * gimple.c (gimple_build_call_from_tree): Handle calls to
19510 internal functions.
19511 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19512 internal function names.
19513 * tree-pretty-print.c (dump_generic_node): Likewise.
19514 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19516 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19518 * gimple-fold.h (gimple_build): Make the function forms take
19519 combined_fn rather than built_in_function.
19520 (gimple_simplify): Likewise.
19521 * gimple-match-head.c (gimple_simplify): Likewise.
19522 * gimple-fold.c (gimple_build): Likewise.
19523 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19524 rather than gimple_build_call_internal.
19525 (get_initial_defs_for_reduction): Likewise.
19526 (vect_create_epilog_for_reduction): Likewise.
19527 (vectorizable_live_operation): Likewise.
19529 2018-05-17 Martin Liska <mliska@suse.cz>
19531 * gimple-ssa-sprintf.c (format_directive): Do not use
19532 space in between 'G_' and '('.
19534 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19537 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19538 even if the mask is not all ones.
19541 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19543 (ix86_gimple_fold_builtin): Likewise.
19546 * config/i386/i386.c: Include tree-vector-builder.h.
19547 (ix86_vector_shift_count): New function.
19548 (ix86_fold_builtin): Fold shift builtins by scalar count.
19549 (ix86_gimple_fold_builtin): Likewise.
19551 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19552 _mm512_setzero): New intrinsics.
19554 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19555 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19557 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19558 code generation for cases where splatting a value is not useful.
19559 * simplify-rtx.c (simplify_ternary_operation): Simplify
19560 vec_merge across a vec_duplicate and a paradoxical subreg forming
19561 a vector mode to a vec_concat.
19563 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19565 * config.gcc: Support "goldmont-plus".
19566 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19568 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19569 PROCESSOR_GOLDMONT_PLUS.
19570 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19571 (processor_target_table): Add "goldmont-plus".
19572 (PTA_GOLDMONT_PLUS): Define.
19573 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19574 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19575 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19576 (fold_builtin_cpu): Add "goldmont-plus".
19577 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19578 (ix86_option_override_internal): Add "goldmont-plus".
19579 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19580 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19581 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19582 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19584 2018-05-17 Richard Biener <rguenther@suse.de>
19586 PR tree-optimization/85757
19587 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19588 remove defs that only feed that PHI from further processing.
19590 2018-05-16 Jim Wilson <jimw@sifive.com>
19592 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19594 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19596 2018-05-16 Mark Wielaard <mark@klomp.org>
19598 * dwarf2out.c (count_index_strings): New function.
19599 (output_indirect_strings): Call count_index_strings and generate
19600 header for dwarf_version >= 5.
19602 2018-05-16 Mark Wielaard <mark@klomp.org>
19604 * dwarf2out.c (dwarf_FORM): New function.
19605 (set_indirect_string): Use dwarf_FORM.
19606 (reset_indirect_string): Likewise.
19607 (size_of_die): Likewise.
19608 (value_format): Likewise.
19609 (output_die): Likewise.
19610 (add_skeleton_AT_string): Likewise.
19611 (output_macinfo_op): Likewise.
19612 (index_string): Likewise.
19613 (output_index_string_offset): Likewise.
19614 (output_index_string): Likewise.
19615 (count_index_strings): Likewise.
19617 2018-05-16 Carl Love <cel@us.ibm.com>
19619 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19620 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19622 2018-05-16 Martin Jambor <mjambor@suse.cz>
19624 * ipa-prop.c (ipa_free_all_edge_args): Remove.
19625 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19627 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
19629 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19630 (fnma<mode>4): Likewise.
19631 (fms<mode>4): Likewise.
19632 (fnms<mode>4): Likewise.
19633 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19634 (aarch64_fnma<mode>4): Likewise.
19635 (aarch64_fms<mode>4): Likewise.
19636 (aarch64_fnms<mode>4): Likewise.
19637 (aarch64_fnmadd<mode>4): Likewise.
19639 2018-05-16 Jason Merrill <jason@redhat.com>
19641 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
19643 2018-05-16 Richard Biener <rguenther@suse.de>
19645 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19646 (dump_stmt_cost): Declare.
19647 (add_stmt_cost): Dump cost we add.
19648 (add_stmt_costs): New function.
19649 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19650 No longer exported.
19651 (vect_analyze_stmt): Adjust prototype.
19652 (vectorizable_condition): Likewise.
19653 (vectorizable_live_operation): Likewise.
19654 (vectorizable_reduction): Likewise.
19655 (vectorizable_induction): Likewise.
19656 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19657 cost vector to pass to vectorizable_ and record afterwards.
19658 (vect_model_reduction_cost): Take cost vector argument and adjust.
19659 (vect_model_induction_cost): Likewise.
19660 (vectorizable_reduction): Likewise.
19661 (vectorizable_induction): Likewise.
19662 (vectorizable_live_operation): Likewise.
19663 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19664 SLP_TREE_NUMBER_OF_VEC_STMTS.
19665 (vect_analyze_slp_cost_1): Remove.
19666 (vect_analyze_slp_cost): Likewise.
19667 (vect_slp_analyze_node_operations): Take visited args and
19668 a target cost vector. Avoid processing already visited stmt sets.
19669 (vect_slp_analyze_operations): Use a local cost vector to gather
19670 costs and register those of non-discarded instances.
19671 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19672 (vect_schedule_slp_instance): Remove copying of
19673 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
19675 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19676 adding cost. Record cost entry location.
19677 (vect_prologue_cost_for_slp_op): Function to compute cost of
19678 a constant or invariant generated for SLP vect in the prologue,
19679 split out from vect_analyze_slp_cost_1.
19680 (vect_model_simple_cost): Make static. Adjust for SLP costing.
19681 (vect_model_promotion_demotion_cost): Likewise.
19682 (vect_model_store_cost): Likewise, make static.
19683 (vect_model_load_cost): Likewise.
19684 (vectorizable_bswap): Add cost vector arg and adjust.
19685 (vectorizable_call): Likewise.
19686 (vectorizable_simd_clone_call): Likewise.
19687 (vectorizable_conversion): Likewise.
19688 (vectorizable_assignment): Likewise.
19689 (vectorizable_shift): Likewise.
19690 (vectorizable_operation): Likewise.
19691 (vectorizable_store): Likewise.
19692 (vectorizable_load): Likewise.
19693 (vectorizable_condition): Likewise.
19694 (vectorizable_comparison): Likewise.
19695 (can_vectorize_live_stmts): Likewise.
19696 (vect_analyze_stmt): Likewise.
19697 (vect_transform_stmt): Adjust calls to vectorizable_*.
19698 * tree-vectorizer.c: Include gimple-pretty-print.h.
19699 (dump_stmt_cost): New function.
19701 2018-05-16 Richard Biener <rguenther@suse.de>
19703 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19704 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19705 * tree-ssa-dse.c: Include tree-ssa-loop.h.
19706 (check_name): New callback.
19707 (dse_classify_store): Track cycles via a visited bitmap of PHI
19708 defs and simplify handling of in-loop and across loop dead stores
19709 and properly fail for loop-variant refs. Handle byte-tracking with
19710 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19713 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
19715 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19716 (vect_get_mask_type_for_stmt): Likewise.
19717 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19719 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
19720 to determine the statement's vector type and the vector type that
19721 should be used for calculating nunits. Deal with cases in which
19722 the type has to be deferred.
19723 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19724 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19725 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19726 (vect_determine_vf_for_stmt): New functions, split out from...
19727 (vect_determine_vectorization_factor): ...here.
19728 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19729 (vect_get_mask_type_for_stmt): New functions, split out from
19730 vect_determine_vectorization_factor.
19732 2018-05-16 Richard Biener <rguenther@suse.de>
19734 * tree-cfg.c (verify_gimple_assign_ternary): Properly
19735 verify the [VEC_]COND_EXPR embedded comparison.
19737 2018-05-15 Martin Sebor <msebor@redhat.com>
19739 PR tree-optimization/85753
19740 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19741 RECORD_TYPE in addition to ARRAY_TYPE.
19743 2018-05-15 Martin Sebor <msebor@redhat.com>
19745 PR middle-end/85643
19746 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19748 2018-05-15 Richard Biener <rguenther@suse.de>
19750 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19751 add by_clobber_p one. Change algorithm to collect all defs
19752 representing uses we need to walk and try reducing them to
19753 a single one before failing.
19754 (dse_dom_walker::dse_optimize_stmt): Adjust.
19756 2018-05-13 Mark Wielaard <mark@klomp.org>
19758 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19759 (size_of_loc_descr): Likewise.
19760 (output_loc_operands): Likewise.
19761 (output_loc_operands_raw): Likewise.
19762 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19763 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19764 (hash_loc_operands): Likewise.
19765 (compare_loc_operands): Likewise.
19767 2018-05-14 Mark Wielaard <mark@klomp.org>
19769 * dwarf2out.c (count_index_addrs): New function.
19770 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19772 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19774 PR tree-optimization/83648
19775 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19776 return value as malloc candidate.
19778 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19781 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19782 param as true in call to suggest_attribute.
19784 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
19786 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19787 -mreadonly-in-sdata.
19789 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19791 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19793 (aarch64_crypto_aesd_fused): Likewise.
19795 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
19797 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19798 (movsi_aarch64): Likewise.
19799 (load_pairsi): Likewise.
19800 (load_pairdi): Likewise.
19801 (store_pairsi): Likewise.
19802 (store_pairdi): Likewise.
19803 (load_pairsf): Likewise.
19804 (load_pairdf): Likewise.
19805 (store_pairsf): Likewise.
19806 (store_pairdf): Likewise.
19807 (zero_extend): Likewise.
19808 (trunc): Swap alternatives.
19809 (fcvt_target): Add '?' to prefer w over r.
19811 2018-05-14 Jakub Jelinek <jakub@redhat.com>
19814 * config/i386/i386.md: Disallow non-commutative arithmetics in
19815 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19816 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
19817 in the peephole2 before it.
19819 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
19821 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19822 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19823 (ix86_handle_option): Handle -mcldemote.
19824 * config.gcc: New header.
19825 * config/i386/cldemoteintrin.h: New file.
19826 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19827 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19829 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19830 OPTION_MASK_ISA_CLDEMOTE.
19831 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19832 (ix86_valid_target_attribute_inner_p): Ditto.
19833 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19834 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19835 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19836 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19837 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19839 * config/i386/i386.opt: Add -mcldemote.
19840 * config/i386/x86intrin.h: New header.
19841 * doc/invoke.texi: Add -mcldemote.
19843 2018-05-14 Richard Biener <rguenther@suse.de>
19845 * doc/match-and-simplify.texi: Adjust :s documentation.
19847 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
19849 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19850 intended memcpy size.
19851 (REORDER_45): Likewise.
19853 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
19855 * sort.cc: New file.
19856 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19857 * vec.c (qsort_chk): Use gcc_qsort.
19858 * Makefile.in (OBJS-libcommon): Add sort.o.
19859 (build/sort.o): New target. Use it...
19860 (BUILD_RTL): ... here, and...
19861 (build/gencfn-macros): ... here, and...
19862 (build/genmatch): ... here.
19864 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19865 Chung-Ju Wu <jasonwucj@gmail.com>
19867 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19868 * config/nds32/nds32-graywolf.md: New file.
19869 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19870 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19872 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19873 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19874 * config/nds32/nds32.md (pipeline_model): Add graywolf.
19875 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19876 * config/nds32/pipelines.md: Include n15 settings.
19878 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19879 Chung-Ju Wu <jasonwucj@gmail.com>
19881 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19882 * config/nds32/nds32-n13.md: New file.
19883 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19884 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19886 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19887 * config/nds32/nds32.md (pipeline_model): Add n13.
19888 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19889 * config/nds32/pipelines.md: Include n13 settings.
19891 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19892 Chung-Ju Wu <jasonwucj@gmail.com>
19894 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19895 * config/nds32/nds32-n10.md: New file.
19896 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19897 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19899 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19900 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19901 * config/nds32/nds32.md (pipeline_model): Add n10.
19902 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19903 * config/nds32/pipelines.md: Include n10 settings.
19905 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
19906 Kito Cheng <kito.cheng@gmail.com>
19907 Chung-Ju Wu <jasonwucj@gmail.com>
19909 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19910 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19911 Add enum values for DSP extension instructions.
19912 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19914 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19915 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19916 New code iterators.
19917 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19918 * config/nds32/nds32-dspext.md: New file for DSP implementation.
19919 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19920 * config/nds32/nds32-intrinsic.md: Likewise.
19921 * config/nds32/nds32_intrinsic.h: Likewise.
19922 * config/nds32/nds32-md-auxiliary.c: Likewise.
19923 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19924 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19925 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19926 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19927 * config/nds32/nds32-protos.h: New declarations for DSP extension.
19928 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19929 TYPE_DMAC in switch statement.
19930 * config/nds32/nds32.c: New checking and implementation for DSP
19931 extension instructions.
19932 * config/nds32/nds32.h: Likewise.
19933 * config/nds32/nds32.md: Likewise.
19934 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19935 * config/nds32/predicates.md: Implement new predicates for DSP
19938 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19940 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19941 Reformat alternatives and attributes so it is easier to identify
19942 which constraints/attributes go with which instruction.
19943 (mov<mode>_hardfloat32, FMOVE64): Likewise.
19944 (mov<mode>_softfloat32, FMOVE64): Likewise.
19945 (mov<mode>_hardfloat64, FMOVE64): Likewise.
19946 (mov<mode>_softfloat64, FMOVE64): Likewise.
19948 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
19950 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19952 (Basic PowerPC Built-in Functions): The new name of the
19953 subsection previously known as "PowerPC Built-in Functions".
19954 (Basic PowerPC Built-in Functions Available on all Configurations):
19956 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19957 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19958 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19959 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19961 2018-05-11 Martin Jambor <mjambor@suse.cz>
19964 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19967 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19970 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19972 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
19974 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19975 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19976 (ix86_handle_option): Handle -mwaitpkg.
19977 * config.gcc: New header.
19978 * config/i386/cpuid.h (bit_WAITPKG): New bit.
19979 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19980 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19982 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19983 OPTION_MASK_ISA_WAITPKG.
19984 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19985 (ix86_option_override_internal): Add PTA_WAITPKG.
19986 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19987 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19988 IX86_BUILTIN_TPAUSE.
19989 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19990 __builtin_ia32_umwait and __builtin_ia32_tpause.
19991 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19992 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19993 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19994 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19995 UNSPECV_TPAUSE): New.
19996 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19997 * config/i386/i386.opt: Add -mwaitpkg.
19998 * config/i386/waitpkgintrin.h: New file.
19999 * config/i386/x86intrin.h: New header.
20000 * doc/invoke.texi: Add -mwaitpkg.
20002 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
20005 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
20007 (cortex-m0): Use armv6s-m isa.
20008 (cortex-m0plus): Likewise.
20009 (cortex-m1): Likewise.
20010 (cortex-m0.small-multiply): Likewise.
20011 (cortex-m0plus.small-multiply): Likewise.
20012 (cortex-m1.small-multiply): Likewise.
20014 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
20015 Jakub Jelinek <jakub@redhat.com>
20017 PR tree-optimization/85692
20018 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
20019 source permute as well.
20021 2018-05-11 Martin Liska <mliska@suse.cz>
20024 * doc/extend.texi: Document LLVM style format for no_sanitize
20027 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20029 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
20030 mode_supports_vsx_dform_quad to mode_supports_dq_form.
20031 (mode_supports_vsx_dform_quad): Likewise.
20032 (mode_supports_vmx_dform): Move these functions to be next to the
20033 other mode_supports functions.
20034 (mode_supports_dq_form): Likewise.
20035 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
20036 mode_supports_dq_form.
20037 (reg_offset_addressing_ok_p): Likewise.
20038 (offsettable_ok_by_alignment): Likewise.
20039 (rs6000_legitimate_offset_address_p): Likewise.
20040 (legitimate_lo_sum_address_p): Likewise.
20041 (rs6000_legitimize_address): Likewise.
20042 (rs6000_legitimize_reload_address): Likewise.
20043 (rs6000_secondary_reload_inner): Likewise.
20044 (rs6000_preferred_reload_class): Likewise.
20045 (rs6000_output_move_128bit): Likewise.
20047 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20049 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
20050 Generate SImode target register for null target.
20051 <case IX86_BUILTIN_XGETBV>: Ditto.
20052 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
20053 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
20055 2018-05-10 Carl Love <cel@us.ibm.com>
20057 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20058 dcbtt and dcbtstt if operands[2] is 0.
20060 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
20063 * config/i386/sse.md (usadv64qi): New expander.
20065 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
20067 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
20068 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
20069 -maltivec=be support.
20070 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
20071 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
20072 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20073 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
20074 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
20075 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
20076 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
20077 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
20078 altivec_vsumsws): Adjust.
20079 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
20080 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
20081 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
20083 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
20084 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
20085 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
20086 (altivec_lve<VI_char>x): Delete expand.
20087 (*altivec_lve<VI_char>x_internal): Rename to...
20088 (altivec_lve<VI_char>x): ... this.
20089 (altivec_lvxl_<mode>): Delete expand.
20090 (*altivec_lvxl_<mode>_internal): Rename to ...
20091 (altivec_lvxl_<mode>): ... this.
20092 (altivec_stvxl_<mode>): Delete expand.
20093 (*altivec_stvxl_<mode>_internal): Rename to ...
20094 (altivec_stvxl_<mode>): ... this.
20095 (altivec_stve<VI_char>x): Delete expand.
20096 (*altivec_stve<VI_char>x_internal): Rename to ...
20097 (altivec_stve<VI_char>x): ... this.
20098 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
20099 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
20100 reduc_plus_scal_<mode>): Adjust.
20101 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
20103 (rs6000_cpu_cpp_builtins): Adjust.
20104 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
20105 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
20106 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
20107 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
20108 -maltivec=be support.
20109 (rs6000_split_vec_extract_var): Adjust.
20110 (rs6000_split_v4si_init): Adjust.
20111 (swap_selector_for_mode): Delete.
20112 (altivec_expand_lvx_be, altivec_expand_stvx_be,
20113 altivec_expand_stvex_be): Delete.
20114 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
20115 -maltivec=be support.
20116 (rs6000_gimple_fold_builtin): Ditto.
20117 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
20119 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
20120 (TARGET_DIRECT_MOVE_64BIT): Adjust.
20121 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
20122 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
20123 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
20124 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
20125 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
20126 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
20127 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
20128 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
20129 anonymous split): Adjust.
20130 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
20131 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
20133 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
20135 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
20136 when --with-gxx-include-dir is also specified.
20137 * configure: Regenerate.
20139 2018-05-09 Jim Wilson <jimw@sifive.com>
20142 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
20143 * config/riscv/t-withmultilib: New.
20144 * config/riscv/withmultilib.h: New.
20145 * doc/install.texi: Document RISC-V --with-multilib-list support.
20147 2018-05-09 Richard Biener <rguenther@suse.de>
20149 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
20151 (vect_bb_vectorization_profitable_p): Adjust. Compute
20152 actual scalar cost using the cost vector and the add_stmt_cost
20155 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20157 PR rtl-optimization/85645
20158 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
20159 in the REG_CFA_REGISTER note for LR, don't leave it empty.
20161 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20163 PR rtl-optimization/85645
20164 * shrink-wrap.c (spread_components): Return a boolean saying if
20165 anything was changed.
20166 (try_shrink_wrapping_separate): Iterate spread_components until
20167 nothing changes anymore.
20169 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20171 PR rtl-optimization/85645
20172 * regrename.c (build_def_use): Also kill the chains that include the
20173 destination of a REG_CFA_REGISTER note.
20175 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
20177 PR rtl-optimization/85645
20178 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
20179 insn that has a REG_CFA_REGISTER note.
20181 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
20183 * cfgexpand.c (expand_clobber): New function.
20184 (expand_gimple_stmt_1): Use it.
20185 * tree-vect-stmts.c (vect_clobber_variable): New function,
20187 (vectorizable_simd_clone_call): ...here.
20188 (vectorizable_store): Emit a clobber either side of an
20189 IFN_STORE_LANES sequence.
20190 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
20192 2018-05-09 Tom de Vries <tom@codesourcery.com>
20195 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
20196 (define_insn "trap_if_false"): Add exit after trap.
20198 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
20200 PR rtl-optimization/85638
20201 * bb-reorder.c: Include common/common-target.h.
20202 (create_forwarder_block): New function extracted from...
20203 (fix_up_crossing_landing_pad): ...here. Rename into...
20204 (dw2_fix_up_crossing_landing_pad): ...this.
20205 (sjlj_fix_up_crossing_landing_pad): New function.
20206 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20207 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20208 from both partitions and exit the loop after one iteration.
20210 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20213 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20215 (Basic PowerPC Built-in Functions): The new name of the
20216 subsection previously known as "PowerPC Built-in Functions".
20217 (Basic PowerPC Built-in Functions Available on all Configurations):
20219 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20221 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20223 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20225 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20228 2018-05-08 Jim Wilson <jimw@sifive.com>
20230 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20231 (LD_EMUL_SUFFIX): New.
20232 (LINK_SPEC): Use it.
20234 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
20236 * doc/extend.texi (PowerPC Built-in Functions): Rename this
20238 (Basic PowerPC Built-in Functions): The new name of the
20239 subsection previously known as "PowerPC Built-in Functions".
20240 (Basic PowerPC Built-in Functions Available on all Configurations):
20242 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20244 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20246 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20248 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20251 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20254 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20255 after cmpelim optimization.
20257 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
20259 * config.gcc: Support "goldmont".
20260 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20261 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20262 PROCESSOR_GOLDMONT.
20263 * config/i386/i386.c (m_GOLDMONT): Define.
20264 (processor_target_table): Add "goldmont".
20265 (PTA_GOLDMONT): Define.
20266 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20267 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20268 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20269 (fold_builtin_cpu): Add "goldmont".
20270 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20271 (ix86_option_override_internal): Add "goldmont".
20272 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20273 (processor_type): Add PROCESSOR_GOLDMONT.
20274 * config/i386/i386.md: Add CPU "glm".
20275 * config/i386/glm.md: New file.
20276 * config/i386/x86-tune.def: Add m_GOLDMONT.
20277 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20279 2018-05-08 Jakub Jelinek <jakub@redhat.com>
20282 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20284 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20285 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
20286 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
20289 * config/i386/i386.c (ix86_fold_builtin): Handle
20290 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20293 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20294 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20296 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
20299 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20300 (check_arch): Likewise.
20301 (check_fpu): Return the result rather than printing it.
20302 (end arch): Fix operator precedence.
20303 (end cpu): Likewise.
20304 (END): Print the result from check_fpu.
20306 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20307 Alan Hayward <alan.hayward@arm.com>
20308 David Sherwood <david.sherwood@arm.com>
20310 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20311 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20312 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20313 (*fcmuo<mode>_and): New patterns.
20315 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
20317 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20318 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20319 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20320 (cmp_op, sve_imm_con): New code attributes.
20321 (SVE_COND_INT_CMP, imm_con): Delete.
20322 (cmp_op): Remove above unspecs from int attribute.
20323 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20325 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
20326 comparison-specific unspecs.
20327 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20328 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20329 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20330 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20331 (*vec_fcm<cmp_op><mode>): Rename to...
20332 (*fcm<cmp_op><mode>): ...this and adjust likewise.
20333 (*vec_fcmuo<mode>): Rename to...
20334 (*fcmuo<mode>): ...this and adjust likewise.
20335 (*pred_fcm<cmp_op><mode>): New pattern.
20336 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20337 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20339 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20341 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20342 (aarch64_emit_sve_predicated_cond): New function.
20343 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20344 (aarch64_emit_unspec_cond_or): Replace with...
20345 (aarch64_emit_sve_or_conds): ...this new function. Use
20346 aarch64_emit_sve_ptrue_op for the individual comparisons and
20347 aarch64_emit_binop to OR them together.
20348 (aarch64_emit_inverted_unspec_cond): Replace with...
20349 (aarch64_emit_sve_inverted_cond): ...this new function. Use
20350 aarch64_emit_sve_ptrue_op for the comparison and
20351 aarch64_emit_unop to invert the result.
20352 (aarch64_expand_sve_vec_cmp_float): Update after the above
20353 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
20355 2018-05-07 Nathan Sidwell <nathan@acm.org>
20357 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20358 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20359 (Backwards Compatibility): Likewise.
20361 2018-05-07 Luis Machado <luis.machado@linaro.org>
20365 2018-05-07 Luis Machado <luis.machado@linaro.org>
20367 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20368 <prefetch_dynamic_strides>: New const bool field.
20369 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20370 prefetch_dynamic_strides.
20371 (exynosm1_prefetch_tune): Likewise.
20372 (thunderxt88_prefetch_tune): Likewise.
20373 (thunderx_prefetch_tune): Likewise.
20374 (thunderx2t99_prefetch_tune): Likewise.
20375 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20377 (aarch64_override_options_internal): Update to set
20378 PARAM_PREFETCH_DYNAMIC_STRIDES.
20379 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20380 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20381 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20382 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20383 prefetch-dynamic-strides setting.
20385 2018-05-07 Luis Machado <luis.machado@linaro.org>
20387 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20388 <minimum_stride>: New const int field.
20389 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20390 minimum_stride field.
20391 (exynosm1_prefetch_tune): Likewise.
20392 (thunderxt88_prefetch_tune): Likewise.
20393 (thunderx_prefetch_tune): Likewise.
20394 (thunderx2t99_prefetch_tune): Likewise.
20395 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20396 (aarch64_override_options_internal): Update to set
20397 PARAM_PREFETCH_MINIMUM_STRIDE.
20398 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20399 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20400 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20401 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20402 stride is constant and is below the minimum stride threshold.
20404 2018-05-07 Luis Machado <luis.machado@linaro.org>
20406 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20409 2018-05-07 Luis Machado <luis.machado@linaro.org>
20411 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20412 <prefetch_dynamic_strides>: New const bool field.
20413 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20414 prefetch_dynamic_strides.
20415 (exynosm1_prefetch_tune): Likewise.
20416 (thunderxt88_prefetch_tune): Likewise.
20417 (thunderx_prefetch_tune): Likewise.
20418 (thunderx2t99_prefetch_tune): Likewise.
20419 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20421 (aarch64_override_options_internal): Update to set
20422 PARAM_PREFETCH_DYNAMIC_STRIDES.
20423 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20424 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20425 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20426 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20427 prefetch-dynamic-strides setting.
20429 2018-05-07 Luis Machado <luis.machado@linaro.org>
20431 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20432 <minimum_stride>: New const int field.
20433 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20434 minimum_stride field.
20435 (exynosm1_prefetch_tune): Likewise.
20436 (thunderxt88_prefetch_tune): Likewise.
20437 (thunderx_prefetch_tune): Likewise.
20438 (thunderx2t99_prefetch_tune): Likewise.
20439 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20440 (aarch64_override_options_internal): Update to set
20441 PARAM_PREFETCH_MINIMUM_STRIDE.
20442 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20443 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20444 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20445 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20446 stride is constant and is below the minimum stride threshold.
20448 2018-05-06 Jakub Jelinek <jakub@redhat.com>
20451 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20452 the type is addressable. Don't force op into register if it has
20455 2018-05-05 Roland McGrath <mcgrathr@google.com>
20458 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20459 any section for which we don't know a specific type it should have,
20460 regardless of name. Previously this was done only for the exact
20461 names ".init_array", ".fini_array", and ".preinit_array".
20462 (default_elf_asm_named_section): Add comment about
20463 relationship with default_section_type_flags and SECTION_NOTYPE.
20464 (get_section): Don't consider it a type conflict if one side has
20465 SECTION_NOTYPE and the other doesn't, as long as neither has the
20466 SECTION_BSS et al used in the default_section_type_flags logic.
20468 2018-05-05 Tom de Vries <tom@codesourcery.com>
20471 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20472 (workaround_barsyncs): New function.
20473 (nvptx_reorg): Use workaround_barsyncs.
20474 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20475 (define_expand "nvptx_membar_cta"): New define_expand.
20476 (define_insn "*nvptx_membar_cta"): New insn.
20478 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
20480 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20481 To improve optimization opportunities.
20482 * builtin-types.def: The new needed builtin types for the above.
20484 2018-05-04 Richard Biener <rguenther@suse.de>
20486 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20487 * gimple-ssa-store-merging.c
20488 (imm_store_chain_info::output_merged_store): Remove redundant create,
20489 release split_store vector contents on failure.
20490 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20491 scalar stmt vector on cache hit.
20493 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
20495 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20497 * config.gcc (powerpc-xilinx-eabi*): Remove.
20498 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20500 (fusion_addis_mem_combo_load): Ditto.
20501 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20503 (rs6000_cpu_cpp_builtins): Ditto.
20504 * config/rs6000/rs6000-linux.c
20505 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20506 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20507 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20509 (rs6000_setup_reg_addr_masks): Ditto.
20510 (rs6000_init_hard_regno_mode_ok): Ditto.
20511 (rs6000_option_override_internal): Ditto.
20512 (legitimate_lo_sum_address_p): Ditto.
20513 (rs6000_legitimize_address): Ditto.
20514 (rs6000_legitimize_reload_address): Ditto.
20515 (rs6000_legitimate_address_p): Ditto.
20516 (abi_v4_pass_in_fpr): Ditto.
20517 (setup_incoming_varargs): Ditto.
20518 (rs6000_gimplify_va_arg): Ditto.
20519 (rs6000_split_multireg_move): Ditto.
20520 (rs6000_savres_strategy): Ditto.
20521 (rs6000_emit_prologue_components): Ditto.
20522 (rs6000_emit_epilogue_components): Ditto.
20523 (rs6000_emit_prologue): Ditto.
20524 (rs6000_emit_epilogue): Ditto.
20525 (rs6000_elf_file_end): Ditto.
20526 (rs6000_function_value): Ditto.
20527 (rs6000_libcall_value): Ditto.
20528 * config/rs6000/rs6000.h: Ditto.
20529 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20530 (TARGET_MINMAX): ... this. New.
20531 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20532 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20533 (*movsi_internal1_single): Delete.
20534 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20535 mfpu=, mxilinx-fpu): Delete.
20536 * config/rs6000/singlefp.h: Delete.
20537 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20538 * config/rs6000/t-rs6000: Ditto.
20539 * config/rs6000/t-xilinx: Delete.
20540 * config/rs6000/titan.md: Adjust for fp_type removal.
20541 * config/rs6000/vsx.md: Remove Xilinx FP support.
20542 (VStype_simple): Delete.
20543 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20544 * config/rs6000/xfpu.h: Delete.
20545 * config/rs6000/xfpu.md: Delete.
20546 * config/rs6000/xilinx.h: Delete.
20547 * config/rs6000/xilinx.opt: Delete.
20548 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20549 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20551 2018-05-04 Tom de Vries <tom@codesourcery.com>
20554 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20557 2018-05-04 Richard Biener <rguenther@suse.de>
20559 PR middle-end/85627
20560 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20561 (expand_complex_div_wide): Likewise.
20562 (expand_complex_operations_1): Likewise.
20563 (expand_complex_libcall): Preserve EH info of the original stmt.
20564 (tree_lower_complex): Handle removed blocks.
20565 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20566 on complex multiplication and division libcall builtins.
20568 2018-05-04 Richard Biener <rguenther@suse.de>
20570 PR middle-end/85574
20571 * fold-const.c (negate_expr_p): Restrict negation of operand
20572 zero of a division to when we know that can happen without
20574 (fold_negate_expr_1): Likewise.
20576 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20579 * real.h (real_nextafter): Declare.
20580 * real.c (real_nextafter): New function.
20581 * fold-const-call.c (fold_const_nextafter): New function.
20582 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20583 CASE_CFN_NEXTTOWARD.
20584 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20585 even when arg1_mode is different from arg0_mode.
20587 2018-05-03 Nathan Sidwell <nathan@acm.org>
20589 * doc/extend.texi (Deprecated Features): Remove
20590 -ffriend-injection.
20591 (Backwards Compatibility): Likewise.
20592 * doc/invoke.texi (C++ Language Options): Likewise.
20593 (C++ Dialect Options): Likewise.
20595 2018-05-03 Jakub Jelinek <jakub@redhat.com>
20598 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20599 _mm512_mask_mullox_epi64): New intrinsics.
20601 2018-05-03 Tom de Vries <tom@codesourcery.com>
20604 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20605 dump files): Add offload-tree.
20607 2018-05-03 Richard Biener <rguenther@suse.de>
20609 PR tree-optimization/85615
20610 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20611 to loops not nested in BBs loop father to avoid creating multi-entry
20614 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20616 PR tree-optimization/70291
20617 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20618 arguments. Change return type to tree. Emit libcall as a new
20619 statement rather than replacing existing one when inplace_p is true.
20620 (expand_complex_multiplication_components): New function.
20621 (expand_complex_multiplication): Expand floating-point complex
20622 multiplication using the above.
20623 (expand_complex_division): Rename inner_type parameter to type.
20624 Update expand_complex_libcall call-site.
20625 (expand_complex_operations_1): Update expand_complex_multiplication
20626 and expand_complex_division call-sites.
20628 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20631 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20632 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20633 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20634 the highest significant bit of the shift count mask is clear. In
20635 check whether and[sq]i3 is needed verify that all significant bits
20636 of the shift count other than the highest are set.
20638 2018-05-02 Tom de Vries <tom@codesourcery.com>
20641 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20642 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20643 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20644 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20645 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20646 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20647 __builtin_goacc_parlevel_size.
20649 2018-05-02 Richard Biener <rguenther@suse.de>
20651 PR tree-optimization/85597
20652 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20653 do not use split vect_get_vec_defs call but call vect_get_slp_defs
20656 2018-05-02 Tom de Vries <tom@codesourcery.com>
20659 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20660 dump files): Add ltrans-tree.
20662 2018-05-02 Tom de Vries <tom@codesourcery.com>
20665 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20666 dump files): Add wpa-ipa.
20668 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
20670 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
20671 powerpc*-*-linux*paired* target.
20672 * config/rs6000/750cl.h: Delete.
20673 * config/rs6000/paired.h: Delete.
20674 * config/rs6000/paired.md: Delete.
20675 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20677 * config/rs6000/rs6000-builtin.def: Remove paired float support.
20678 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20679 comment. Remove paired float support.
20680 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20681 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20683 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20684 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20686 * config/rs6000/rs6000.c: Remove paired float support.
20687 (paired_expand_vector_init, paired_expand_vector_move,
20688 paired_emit_vector_compare, paired_emit_vector_cond_expr,
20689 (paired_expand_lv_builtin, paired_expand_stv_builtin,
20690 paired_expand_builtin, paired_expand_predicate_builtin,
20691 paired_init_builtins): Delete.
20692 * config/rs6000/rs6000.h: Remove paired float support.
20693 * config/rs6000/rs6000.md: Remove paired float support.
20694 (move_from_CR_ov_bit): Delete.
20695 * config/rs6000/rs6000.opt (mpaired): Delete.
20696 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20697 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20699 2018-05-02 Richard Biener <rguenther@suse.de>
20701 PR middle-end/85567
20702 * gimplify.c (gimplify_save_expr): When in SSA form allow
20703 SAVE_EXPRs to compute to SSA vars.
20705 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20708 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20709 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20710 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20711 clobber operands[2], instead use a new pseudo. Formatting fixes.
20713 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
20715 PR tree-optimization/85586
20716 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20717 exit early for statements in the same group if the accesses are
20720 2018-05-02 Tom de Vries <tom@codesourcery.com>
20723 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20726 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
20728 PR tree-optimization/85143
20729 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20731 2018-05-01 Tom de Vries <tom@codesourcery.com>
20734 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20735 not found" error message.
20737 2018-05-01 Tom de Vries <tom@codesourcery.com>
20740 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20741 * vec.c (test_ordered_remove_if): New function.
20742 (vec_c_tests): Call test_ordered_remove_if.
20743 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20744 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20745 * tree-vect-patterns.c (vect_pattern_recog_1): Use
20746 VEC_ORDERED_REMOVE_IF.
20748 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20750 PR tree-optimization/82665
20751 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20752 pointer subtraction where arguments come from a memchr call.
20754 2018-05-01 Jakub Jelinek <jakub@redhat.com>
20756 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20757 --push-state --as-needed and --pop-state instead of --as-needed and
20758 --no-as-needed if ld supports it.
20759 * configure: Regenerated.
20762 * doc/install.texi2html: Replace _002d with - and _002a with * in
20763 generated html files using sed.
20765 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20768 * gcc-rich-location.c (blank_line_before_p): New function.
20769 (use_new_line): New function.
20770 (gcc_rich_location::add_fixit_insert_formatted): New function.
20771 * gcc-rich-location.h
20772 (gcc_rich_location::add_fixit_insert_formatted): New function.
20774 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20776 * selftest.c (assert_streq): Rename "expected" and "actual" to
20777 "val1" and "val2". Extend NULL-handling to cover both inputs
20778 symmetrically, while still requiring both to be non-NULL for a pass.
20779 * selftest.h (assert_streq): Rename "expected" and "actual" to
20781 (ASSERT_EQ): Likewise.
20782 (ASSERT_EQ_AT): Likewise.
20783 (ASSERT_KNOWN_EQ): Likewise.
20784 (ASSERT_KNOWN_EQ_AT): Likewise.
20785 (ASSERT_NE): Likewise.
20786 (ASSERT_MAYBE_NE): Likewise.
20787 (ASSERT_MAYBE_NE_AT): Likewise.
20788 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
20789 the assertion to pass.
20790 (ASSERT_STREQ_AT): Likewise.
20792 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20794 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20795 interaction with -pie.
20797 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20799 * selftest.h: Fix alphabetization of per-source-file selftest
20802 2018-04-30 Jason Merrill <jason@redhat.com>
20804 PR c++/61982 - dead stores to destroyed objects.
20805 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20808 2018-04-30 Jason Merrill <jason@redhat.com>
20810 * tree.c (build_clobber): New.
20811 * tree.h: Declare it.
20812 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20814 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20816 * diagnostic-show-locus.c (layout::layout): Update for
20817 location_get_source_line returning a char_span.
20818 (struct char_span): Move to input.h.
20819 (struct correction): Update for fields in char_span becoming
20821 (struct source_line): Update for location_get_source_line
20822 returning a char_span.
20823 (layout::print_line): Likewise.
20824 * edit-context.c (edited_file::print_content): Likewise.
20825 (edited_file::print_diff_hunk): Likewise.
20826 (edited_file::print_run_of_changed_lines): Likewise.
20827 (edited_file::get_num_lines): Likewise.
20828 (edited_line::edited_line): Likewise.
20829 * final.c (asm_show_source): Likewise.
20830 * input.c (location_get_source_line): Convert return type
20831 from const char * to char_span, losing the final "line_len"
20833 (dump_location_info): Update for the above.
20834 (get_substring_ranges_for_loc): Likewise. Use a char_span
20835 when handling the literal within the line.
20836 (test_reading_source_line): Update for location_get_source_line
20837 returning a char_span.
20838 * input.h (class char_span): Move here from
20839 diagnostic-show-locus.c, converting from a struct to a class.
20840 Make data members private.
20841 (char_span::operator bool): New.
20842 (char_span::length): New.
20843 (char_span::get_buffer): New.
20844 (char_span::operator[]): New.
20845 (char_span::subspan): Make const.
20846 (char_span::xstrdup): New.
20847 (location_get_source_line): Convert return type from const char *
20848 to char_span, losing the final "line_size" param.
20850 2018-04-30 Jan Hubicka <jh@suse.cz>
20852 * lto-wrapper.c (ltrans_priorities): New static var.
20853 (cmp_priority): New.
20854 (run_gcc): Read priorities and if doing parallel build order
20855 the Makefile by them.
20857 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20859 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20861 2018-04-30 Richard Biener <rguenther@suse.de>
20863 * tree-cfg.c (verify_address): Remove base argument, add
20864 flag whether to check TREE_ADDRESSABLE and do that.
20865 (verify_expr): Remove.
20866 (verify_types_in_gimple_reference): Add pieces from verify_expr.
20867 (verify_gimple_assign_single): Likewise.
20868 (verify_gimple_switch): Likewise.
20869 (verify_expr_location_1): Dereference tp once. Add (disabled)
20870 piece from verify_expr.
20871 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20873 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20875 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20877 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20879 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20880 (small_data_pattern): Likewise.
20881 (arc_rewrite_small_data): Likewise.
20882 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20883 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20884 (get_symbol_alignment): New function.
20885 (legitimate_small_data_address_p): Likewise.
20886 (legitimate_scaled_address): Update, call
20887 legitimate_small_data_address_p.
20888 (output_sdata): New static variable.
20889 (arc_print_operand): Update how we handle small data operands.
20890 (arc_print_operand_address): Likewise.
20891 (arc_legitimate_address_p): Update, use
20892 legitimate_small_data_address_p.
20893 (arc_rewrite_small_data_p): Remove.
20894 (arc_rewrite_small_data_1): Likewise.
20895 (arc_rewrite_small_data): Likewise.
20896 (small_data_pattern): Likewise.
20897 (compact_sda_memory_operand): Update to use
20898 legitimate_small_data_address_p and get_symbol_alignment.
20899 (prepare_move_operands): Don't rewite sdata pattern.
20900 (prepare_extend_operands): Remove.
20901 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20903 (zero_extendqisi2): Likewise.
20904 (zero_extendhisi2): Likewise.
20905 (extendqihi2): Likewise.
20906 (extendqisi2): Likewise.
20907 (extendhisi2): Likewise.
20908 (addsi3): Likewise.
20909 (subsi3): Likewise.
20910 (andsi3): Likewise.
20911 * config/arc/constraints.md (Usd): Change it to memory constraint.
20913 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20915 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20916 as source of std instructions.
20917 * config/arc/arc.md (movsi_insn): Update pattern predicate to
20918 allow 6-bit constants as source for store instructions.
20919 (movdi_insn): Update instruction pattern to allow 6-bit constants
20920 as source for store instructions.
20922 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20924 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20926 2018-04-30 Nathan Sidwell <nathan@acm.org>
20927 Sandra Loosemore <sandra@codesourcery.com>
20929 * dumpfile.c (dump_open): Allow '-' for stdout.
20930 * doc/invoke.texi (Developer Options): Document dump filename
20931 determination early. Document stdin/stdout selection.
20933 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
20935 Microblaze Target: PIC data text relative
20937 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20938 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20940 * config/microblaze/microblaze.h (microblaze_constant_address_p):
20941 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20942 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20943 New addressing mode for data-text relative position indepenedent code.
20944 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20945 'ADDRESS_SYMBOLIC_TXT_REL'.
20946 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20947 (microblaze_legitimate_pic_operand): Exclude function calls from
20948 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20949 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20951 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20952 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20953 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20954 for 'address + offset'.
20955 (microblaze_expand_prologue): Add new function prologue call for
20957 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20958 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20959 table in case of TARGET_PIC_DATA_TEXT_REL.
20960 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20961 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20962 Add new macros 'UNSPEC_TEXT',
20963 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20964 + exclude function calls from 'UNSPEC_PLT' in case of data text
20966 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20967 new target hook for generating address diff vector tables in case of
20969 * doc/tm.texi : Regenerate.
20970 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20971 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20972 of addr diff vector generation.
20973 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20974 target hook definition.
20975 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20976 Add default function for generate_pic_addr_diff_vec -> flag_pic.
20977 * doc/invoke.texi (Add new pic option): Add new microblaze pic
20978 option for data text relative.
20980 2018-04-30 Richard Biener <rguenther@suse.de>
20982 * tree-chrec.h (evolution_function_is_constant_p): Remove
20984 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20986 2018-04-30 Richard Biener <rguenther@suse.de>
20989 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20991 2018-04-30 Richard Biener <rguenther@suse.de>
20993 PR tree-optimization/28364
20994 PR tree-optimization/85275
20995 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20996 copying first exit test.
20998 2018-04-28 Mark Wielaard <mark@klomp.org>
21000 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
21001 dwarf_version >= 5.
21002 (dwarf_AT): Handle DW_AT_addr_base.
21003 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
21005 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
21008 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
21009 (*ashl<dwi>3_doubleword_mask_1): Ditto.
21010 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
21011 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
21013 2018-04-28 Richard Biener <rguenther@suse.de>
21015 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
21016 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
21017 to reflect use. Only add interesting stmts.
21019 2018-04-27 Martin Jambor <mjambor@suse.cz>
21022 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
21023 the jump function allows for passing through aggregate values.
21025 2018-04-27 David Malcolm <dmalcolm@redhat.com>
21027 * input.h (in_system_header_at): Convert from macro to inline
21029 (from_macro_expansion_at): Likewise.
21030 (from_macro_definition_at): Likewise.
21032 2018-04-27 Jeff Law <law@redhat.com>
21034 * config.gcc: Mark tile* targets as deprecated/obsolete.
21036 2018-04-27 Richard Biener <rguenther@suse.de>
21038 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
21041 2018-04-27 Richard Biener <rguenther@suse.de>
21043 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
21045 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
21047 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
21048 with Yd constraint. Set "preferred_for_speed" attribute from
21049 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
21050 with Yd constraint.
21051 (*movdi_internal): Ditto.
21052 (movti_interunit splitters): Remove
21053 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
21054 (movdi_interunit splitters): Ditto.
21055 * config/i386/constraints.md (Ye): Remove.
21056 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
21058 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21061 * config/aarch64/constraints.md (Usg): Limit to 31.
21062 (Usj): Limit to 63.
21064 2018-04-27 Jakub Jelinek <jakub@redhat.com>
21066 PR tree-optimization/85529
21067 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
21068 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
21069 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
21070 zero extension or masking of the MSB bit.
21071 (optimize_range_tests): Add FIRST_BB argument, pass it through
21072 to optimize_range_tests_var_bound.
21073 (maybe_optimize_range_tests, reassociate_bb): Adjust
21074 optimize_range_tests callers.
21076 2018-04-26 Richard Biener <rguenther@suse.de>
21077 Jakub Jelinek <jakub@redhat.com>
21079 * cgraph.h (symbol_table): Just declare debug method here.
21080 * symtab.c (symbol_table::debug): Define.
21082 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
21084 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
21086 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
21088 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
21089 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
21090 (*movdi_internal): Substitute Yi and Yj constraint with x
21091 and Ym and Yn constraint with y constraint. Update "isa"
21092 attribute and set "preferred_for_speed" attribute from
21093 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
21094 (*movsi_internal): Ditto.
21095 (*movdf_internal): Ditto.
21096 (*movsf_internal): Ditto.
21097 (*zero_extendsidi2): Ditto.
21098 * config/i386/sse.md (vec_set<mode>_0): Ditto.
21099 (sse2_loadld): Ditto.
21100 (*vec_extract<ssevecmodelower>_0): Ditto.
21101 (*vec_extractv4si_0_zext_sse4): Ditto.
21102 (vec_concatv2di): Ditto.
21103 (*vec_dup<mode>): Ditto.
21104 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
21105 * config/i386/constraints.md (Yi): Remove.
21110 2018-04-26 Nathan Sidwell <nathan@acm.org>
21112 * dumpfile.c (dump_open): New.
21113 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
21114 (dump_finish): Detect stdio/stderr by value not name.
21116 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
21118 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
21120 2018-04-26 Tom de Vries <tom@codesourcery.com>
21123 * config/nvptx/nvptx.c (verify_neutering_jumps)
21124 (verify_neutering_labels): New function
21125 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
21127 2018-04-26 Tom de Vries <tom@codesourcery.com>
21130 * config/nvptx/nvptx.c (needs_neutering_p): New function.
21131 (nvptx_single): Use needs_neutering_p to skip over insns that do not
21134 2018-04-26 Richard Biener <rguenther@suse.de>
21135 Tom de Vries <tom@codesourcery.com>
21138 * lto-streamer-out.c (output_function): Fixup loops if required to match
21139 discovery done in the reader.
21141 2018-04-26 Richard Biener <rguenther@suse.de>
21143 PR tree-optimization/85116
21144 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
21145 have a loop exit from the single latch predecessor. Remove
21146 case of header with just condition.
21147 (ch_base::copy_headers): Exclude infinite loops from any
21149 (pass_ch::execute): Record exits.
21151 2018-04-26 Richard Biener <rguenther@suse.de>
21153 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
21154 prologue cost vector and pass it to vect_get_load_cost.
21155 (vect_get_peeling_costs_all_drs): Likewise.
21156 (vect_peeling_hash_get_lowest_cost): Likewise.
21157 (vect_enhance_data_refs_alignment): Likewise.
21159 2018-04-26 Richard Biener <rguenther@suse.de>
21161 PR middle-end/85450
21162 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
21163 checking of integer<->pointer conversions.
21164 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
21165 sign-/zero-extending pointer types.
21166 (expand_omp_for_static_chunk): Likewise.
21168 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
21169 Jean Lee <xiaoyur347@gmail.com>
21171 * config/mips/mips.c (mips_asan_shadow_offset): New function.
21172 (TARGET_ASAN_SHADOW_OFFSET): Define.
21173 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
21174 true for -fsanitize=address.
21176 2018-04-25 Mark Wielaard <mark@klomp.org>
21178 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
21181 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21183 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
21184 than "alu", remove explicit "memory" and "imm_disp" attributes.
21185 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
21187 PR middle-end/85414
21188 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
21189 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
21190 gen_lowpart_no_emit.
21192 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
21195 * config/i386/i386.c (ix86_expand_builtin): Change memory
21196 operand to XI, extend p0 to Pmode.
21197 * config/i386/i386.md: Change unspec volatile and operand
21198 1 mode to XI, change operand 0 mode to P.
21200 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21202 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
21203 GET_MODE_MASK before any checking.
21204 (nds32_can_use_bset_p): Likewise.
21205 (nds32_can_use_btgl_p): Likewise.
21207 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21209 * config/nds32/nds32-doubleword.md: New define_split pattern for
21210 illegal register number.
21212 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21214 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21216 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
21218 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21220 2018-04-25 Richard Biener <rguenther@suse.de>
21222 * lto-streamer.h (LTO_major_version): Bump to 8.
21224 2018-04-25 Jakub Jelinek <jakub@redhat.com>
21226 * BASE-VER: Set to 9.0.0.
21228 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
21230 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21231 in __abskf2 and __powikf2.
21233 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21236 * config/aarch64/constraints.md (Usg, Usj): New constraints.
21237 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21238 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21239 Use the above on operand 2. Reindent.
21240 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21242 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21245 * common/config/i386/i386-common.c (ix86_handle_option): Don't
21247 * config/i386/i386.opt (mcet): Removed.
21248 * doc/install.texi: Remove -mcet documentation.
21249 * doc/invoke.texi: Likewise.
21251 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
21254 * doc/install.texi: Remove -mcet from bootstrap-cet.
21256 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21259 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21260 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21264 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21265 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21266 containing a CONST_VECTOR.
21268 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
21270 * doc/install.texi: Update newlib dependency for nvptx.
21272 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21275 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21276 instead of INTVAL when shifting x left.
21278 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
21280 PR tree-optimization/85478
21281 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21282 vect_grouped_store_supported for single element vectors.
21284 2018-04-24 Richard Biener <rguenther@suse.de>
21287 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21288 load cost increase to the case of non-constant step.
21290 2018-04-24 Jakub Jelinek <jakub@redhat.com>
21293 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21294 destination if any_malformed_asm.
21296 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
21298 PR middle-end/85496
21299 * expr.c (store_field): In the bitfield case, if the value comes from
21300 a function call and is returned in registers by means of a PARALLEL,
21301 do not change the mode of the temporary unless BLKmode and VOIDmode.
21303 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
21305 PR rtl-optimization/85423
21306 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21307 dependencies to debug insns when the previous insn is non-debug.
21309 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21311 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21312 enums into a single definition.
21313 (fls): Fix predicates and printing.
21316 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
21318 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21319 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21320 and short u6 immediate.
21321 (check_if_valid_sleep_operand): Remove.
21322 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21324 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21326 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21327 flag_always_save_lp condition.
21328 * config/nds32/nds32.opt (malways-save-lp): New option.
21330 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21332 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21333 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21334 * config/nds32/nds32.h
21335 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21336 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21338 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21340 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21341 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21343 2018-04-22 Shiva Chen <shiva0217@gmail.com>
21344 Chung-Ju Wu <jasonwucj@gmail.com>
21346 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21348 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21349 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21351 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21353 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21355 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21357 * config/nds32/nds32-protos.h (nds32_data_alignment,
21358 nds32_local_alignment): Declare.
21359 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21360 nds32_local_alignment): New functions.
21361 (TARGET_CONSTANT_ALIGNMENT): Define.
21362 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21364 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21366 * config/nds32/nds32.c
21367 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21368 (TARGET_MODES_TIEABLE_P): Likewise.
21370 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
21372 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21373 level Ofast and Og.
21375 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
21376 Chung-Ju Wu <jasonwucj@gmail.com>
21378 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21379 for unaligned access.
21380 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21382 * config/nds32/nds32-intrinsic.md: Likewise.
21383 * config/nds32/nds32_intrinsic.h: Likewise.
21384 * config/nds32/nds32.h (nds32_builtins): Likewise.
21385 * config/nds32/nds32.opt (munaligned-access): New option.
21386 * config/nds32/nds32.c (nds32_asm_file_start): Display
21387 flag_unaligned_access status.
21389 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21391 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21392 -mno-relax is present.
21393 * config/riscv/linux.h (LINK_SPEC): Ditto.
21395 2018-04-20 Martin Sebor <msebor@redhat.com>
21398 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21400 (gimple_fold_builtin_stxcpy_chk): Same.
21401 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21403 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
21406 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21407 __powikf2 when long double is IEEE 128-bit.
21409 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
21411 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21412 step to make sure stack always aligned.
21414 2018-04-20 Carl Love <cel@us.ibm.com>
21417 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21418 size check for arg0.
21420 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
21421 Tom de Vries <tom@codesourcery.com>
21424 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21425 Emit insns for calls too.
21426 (nvptx_find_par): Always look for worker-level predecessor insn.
21427 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
21429 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21430 (nvptx_process_pars): Propagate frames for calls.
21432 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
21435 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21437 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21438 (ix86_handle_option): Don't handle OPT_mibt.
21439 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21441 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21443 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21444 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21445 (ix86_target_macros): Define __CET__ with flag_cf_protection
21446 for -fcf-protection.
21447 * config/i386/i386.c (isa2_opts): Remove -mibt.
21448 * config/i386/i386.h (TARGET_IBT): Removed.
21449 (TARGET_IBT_P): Likewise.
21450 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21451 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21452 * config/i386/i386.opt (mcet): Update help message.
21453 (mshstk): Likewise.
21455 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
21456 -mcet as an alias for -mshstk.
21458 2018-04-20 Richard Biener <rguenther@suse.de>
21460 PR middle-end/85475
21461 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21462 complexity by forcing a single use of the multiply operand.
21464 2018-04-20 Martin Jambor <mjambor@suse.cz>
21467 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21468 recursion dependency to only apply to non-clones.
21470 2018-04-20 Martin Jambor <mjambor@suse.cz>
21473 * ipa-cp.c (create_specialized_node): Check that clones of
21474 self-recursive edges exist during IPA-CP.
21476 2018-04-19 Toon Moene <toon@moene.org>
21478 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21481 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21483 PR tree-optimization/85467
21484 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21485 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
21486 VECTOR_CST element to type.
21488 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21491 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21492 * config/i386/i386.md (builtin_setjmp_setup): Removed.
21493 (builtin_longjmp): Likewise.
21494 (save_stack_nonlocal): New pattern.
21495 (restore_stack_nonlocal): Likewise.
21497 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21500 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21501 Replace ASM_OUTPUT_LABEL with fprintf.
21503 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21506 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21507 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21508 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21509 define __IBT__ and __SHSTK__ for -fcf-protection.
21510 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21512 (ix86_trampoline_init): Likewise.
21513 (x86_output_mi_thunk): Likewise.
21514 (ix86_notrack_prefixed_insn_p): Likewise.
21515 (ix86_option_override_internal): Don't disallow -fcf-protection.
21516 * config/i386/i386.md (rdssp<mode>): Also enable for
21518 (incssp<mode>): Likewise.
21519 (nop_endbr): Likewise.
21520 * config/i386/i386.opt (mcet): Change help message to built-in
21523 (mshstk): Likewise.
21524 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21525 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21526 enable CET built-in functions.
21528 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21530 * common/config/i386/i386-common.c
21531 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21532 OPTION_MASK_ISA_MOVDIRI_UNSET,
21533 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21534 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21535 * config.gcc (movdirintrin.h): New header.
21536 * config/i386/cpuid.h (bit_MOVDIRI,
21537 bit_MOVDIR64B): New bits.
21538 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21540 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21541 (VOID, PVOID, PCVOID)): New function types.
21542 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21543 __builtin_ia32_directstoreu_u64,
21544 __builtin_ia32_movdir64b): New builtins.
21545 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21546 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21548 (ix86_valid_target_attribute_inner_p): Ditto.
21549 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21550 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21551 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21552 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21553 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21554 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21555 (movdiri<mode>, movdir64b_<mode>): New.
21556 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21557 * config/i386/immintrin.h: Include movdirintrin.h.
21558 * config/i386/movdirintrin.h: New file.
21559 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21561 2018-04-19 Richard Biener <rguenther@suse.de>
21563 PR middle-end/85455
21564 * cfg.c (clear_bb_flags): When loop state says we have
21565 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21567 2018-04-19 Richard Biener <rguenther@suse.de>
21569 PR tree-optimization/84737
21570 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21571 copying restrict info.
21572 (vect_setup_realignment): Use it.
21573 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21574 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21575 the first DR to all generated stores.
21576 (vectorizable_load): Likewise for loads.
21578 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21580 PR tree-optimization/85446
21581 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21582 the integral and pointer types to have the same precision.
21584 * doc/install.texi: Document --disable-cet being the default and
21587 2018-04-18 Martin Liska <mliska@suse.cz>
21589 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21592 2018-04-18 Martin Liska <mliska@suse.cz>
21595 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21598 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21599 arguments if they are comparable.
21601 2018-04-18 Martin Liska <mliska@suse.cz>
21604 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21607 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21610 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
21613 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21614 ENDBR after calling __morestack.
21616 2018-04-18 David Malcolm <dmalcolm@redhat.com>
21619 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21620 by using gcc_base_ver to generate a gcc_driver_version, and use
21621 it when generating GCC_DRIVER_NAME.
21622 * configure: Regenerate.
21624 2018-04-18 Jakub Jelinek <jakub@redhat.com>
21627 * config.gcc: Obsolete powerpc*-*-*spe*.
21629 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21632 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21633 (stabstr_D): Change type of unum from unsigned int to
21634 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
21637 2018-04-17 Jim Wilson <jimw@sifive.com>
21640 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21641 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21642 Set arg_pointer_offset after using pretend_args_size.
21644 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21646 PR rtl-optimization/85431
21647 * dse.c (record_store): Ignore zero width stores.
21650 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
21651 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21652 __builtin_stack_restore rather than after it.
21653 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21654 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21655 argument instead of virtual_dynamic_stack_rtx.
21657 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
21659 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21661 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21662 Add note to error message to explain internal mapping of overloaded
21663 built-in function name to non-overloaded built-in function name.
21664 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21667 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21670 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21671 where the inputs overlap with the output.
21673 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21675 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21676 (=v, v) alternative and explicit "memory" attribute.
21677 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
21678 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21680 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21681 "sselog1" type instead of "sselog".
21682 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21683 "sselog". Remove explicit "memory" attribute.
21684 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21685 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21687 (vec_extract_hi_v32hi): Merge all alternatives into one, use
21688 "sselog1" type instead of "sselog". Remove explicit "memory"
21690 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21691 use "sselog1" type instead of "sselog". Remove explicit "memory"
21693 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21694 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21696 (vec_extract_hi_v64qi): Merge all alternatives into one, use
21697 "sselog1" type instead of "sselog". Remove explicit "memory"
21699 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21700 use "sselog1" type instead of "sselog". Remove explicit "memory"
21704 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21706 PR middle-end/85414
21707 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21710 2018-04-17 Martin Jambor <mjambor@suse.cz>
21713 * ipa-cp.c (create_specialized_node): Call
21714 expand_all_artificial_thunks if necessary.
21716 2018-04-17 Martin Liska <mliska@suse.cz>
21719 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21720 in message, remote space in between '_G' and '('.
21722 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21725 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21726 avx512f_vmcmp<mode>3<round_saeonly_name>,
21727 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21728 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21729 avx512f_rndscale<mode><round_saeonly_name>,
21730 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21731 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21732 Use %<iptr>2 instead of %2 for -masm=intel.
21733 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21734 avx512f_vcvttss2usi<round_saeonly_name>,
21735 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21737 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21738 avx512f_vcvttsd2usi<round_saeonly_name>,
21739 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21740 Use %q1 instead of %1 for -masm=intel.
21741 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21742 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21743 of %3 for -masm=intel.
21744 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21746 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21748 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21750 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21751 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21753 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21755 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21756 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21757 %g1 and one with %0 and %1.
21758 (avx512er_vmrcp28<mode><round_saeonly_name>,
21759 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21760 %1 for -masm=intel.
21761 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21762 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21763 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21764 of %0 and %{%4%} for -masm=intel.
21765 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21766 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21767 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21768 order of %0 and %{%5%}%{z%} for -masm=intel.
21770 2018-04-17 Jan Hubicka <jh@suse.cz>
21773 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21775 2018-04-17 Martin Liska <mliska@suse.cz>
21778 * multiple_target.c (create_dispatcher_calls): Set apostrophes
21779 for target_clone error message. Make default implementation
21780 clone to be a local declaration.
21781 (separate_attrs): Add new argument and check for an empty
21783 (expand_target_clones): Handle it.
21784 (ipa_target_clone): Make redirection just for target_clones
21787 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
21788 Tom de Vries <tom@codesourcery.com>
21790 PR middle-end/84955
21791 * omp-expand.c (expand_oacc_for): Add dummy false branch for
21792 tiled basic blocks without omp continue statements.
21794 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
21797 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21798 vec_extract expression as having side effects to make sure it gets
21801 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
21804 * config/i386/i386.c (get_builtin_code_for_version): Check
21807 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
21810 * config.gcc: Support "skylake".
21811 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21813 * config/i386/i386.c (m_SKYLAKE): Define.
21814 (processor_target_table): Add "skylake".
21815 (ix86_option_override_internal): Add "skylake".
21816 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21817 PROCESSOR_CANNONLAKE.
21818 (get_builtin_code_for_version): Fix priority for
21819 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21820 PROCESSOR_SKYLAKE-AVX512.
21821 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21822 (processor_type): Add PROCESSOR_SKYLAKE.
21824 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
21825 Jason Merrill <jason@redhat.com>
21828 * convert.c (convert_to_integer_1): Use direct recursion for
21829 enumeral types and types with a precision less than the number
21830 of bits in their mode.
21832 2018-04-16 Julia Koval <julia.koval@intel.com>
21835 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21836 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21838 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
21841 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21842 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21843 and -mno-direct-move.
21845 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
21848 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21849 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21850 Ensure negative shifts result in {0}.
21852 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
21854 PR rtl-optimization/79916
21855 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21856 regs (if any) to define how to gnerate SD moves when LRA is in
21859 2018-04-13 Jakub Jelinek <jakub@redhat.com>
21861 PR rtl-optimization/85393
21862 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21863 * except.c (expand_dw2_landing_pad_for_region): Make static.
21864 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21865 a label and unconditional jump to old_bb, rather than
21866 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21869 PR rtl-optimization/85376
21870 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21871 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21872 instead of a specific value.
21874 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21875 Bin Cheng <bin.cheng@arm.com>
21877 PR tree-optimization/82965
21878 PR tree-optimization/83991
21879 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21880 by_profile_only parameter.
21881 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21882 information if the loop was predicted to iterate too many times.
21883 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21885 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21888 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21891 2018-04-13 Martin Liska <mliska@suse.cz>
21892 Jakub Jelinek <jakub@redhat.com>
21894 PR middle-end/81657
21895 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21896 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21897 * builtins.c (expand_builtin_memory_copy_args): Use
21898 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21899 handle dest_addr == pc_rtx.
21901 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
21904 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21905 asked to not generate direct moves.
21906 (fix_trunc<mode>si2_stfiwx): Similar.
21907 (fix_trunc<mode>si2_internal): Similar.
21909 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21912 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21913 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21914 lookup if dest in some wider mode is known to be const0_rtx and
21915 if so, record permanent equivalence for it to be ZERO_EXTEND of
21916 the narrower mode destination.
21918 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21920 * lto-streamer-out.c (output_function): Revert 259346.
21921 * omp-expand.c (expand_oacc_for): Likewise.
21923 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
21925 PR rtl-optimization/85354
21926 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21927 * sel-sched.c (sel_global_init): ... here.
21929 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
21932 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21933 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21934 mode for PE-COFF targets.
21935 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21936 (i386_pe_asm_lto_end): Likewise.
21937 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21938 (TARGET_ASM_LTO_END): Likewise.
21939 * config/i386/winnt.c (saved_debug_info_level): New static variable.
21940 (i386_pe_asm_lto_start): New function.
21941 (i386_pe_asm_lto_end): Likewise.
21943 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21944 Richard Biener <rguenther@suse.de>
21946 PR middle-end/84955
21947 * lto-streamer-out.c (output_function): Fix CFG loop state before
21949 * omp-expand.c (expand_oacc_for): Handle calls to internal
21950 functions like regular functions.
21952 2018-04-12 Richard Biener <rguenther@suse.de>
21955 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21956 for the early LTO debug to properly generate references to it
21957 during DIE emission. Do not re-use that for the skeleton for
21959 (dwarf2out_early_finish): Likewise.
21961 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21964 * config/i386/sse.md
21965 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21966 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21967 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21968 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21969 and output is a reg, avoid creating invalid lowpart subreg, but
21970 instead split into a 512-bit move. Don't split if not AVX512VL,
21971 input is xmm16+ reg and output is a mem.
21972 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21973 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21974 xmm16+ reg and output is a mem.
21976 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21978 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21979 also for flag_dwarf2_cfi_asm.
21981 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21983 PR rtl-optimization/85342
21984 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21985 a bool scalar var inside of the loop instead. Don't try to update
21986 recog_data.operand after failed apply_change_group.
21988 2018-04-12 Tom de Vries <tom@codesourcery.com>
21991 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21992 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
21993 array with flexible array member as array without given dimension.
21994 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21995 argument for undefined param to true.
21997 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
22000 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22001 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
22002 from PowerPC section.
22003 * config/rs6000/sysv4.opt (mcall-): Improve help text.
22004 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
22005 help text that is too long.
22006 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
22007 help text that is too long.
22008 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
22009 help text that is too long.
22011 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
22013 * config/alpha/alpha.md (stack_probe_internal): Rename
22014 from "probe_stack". Update all callers.
22016 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22018 PR rtl-optimization/84566
22019 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
22020 sched_macro_fuse_insns.
22022 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22025 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
22026 (compute_block_dependences): ... from here.
22028 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22030 PR tree-optimization/85331
22031 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
22032 from int to HOST_WIDE_INT.
22034 2018-04-11 Martin Jambor <mjambor@suse.cz>
22037 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
22038 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
22039 not the same as the source val.
22040 (cgraph_edge_brings_value_p): New parameter.
22041 (gather_edges_for_value): Pass destination value to
22042 cgraph_edge_brings_value_p.
22043 (perhaps_add_new_callers): Likewise.
22044 (get_info_about_necessary_edges): Likewise and exclude values brought
22045 only by self-recursive edges.
22046 (create_specialized_node): Redirect only clones of self-calling edges.
22047 (+self_recursive_pass_through_p): New function.
22048 (find_more_scalar_values_for_callers_subset): Use it.
22049 (find_aggregate_values_for_callers_subset): Likewise.
22050 (known_aggs_to_agg_replacement_list): Removed.
22051 (decide_whether_version_node): Re-calculate known constants for all
22052 remaining context clones.
22054 2018-04-11 Richard Biener <rguenther@suse.de>
22057 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
22058 from early DWARF output.
22059 (dwarf2out_early_finish): Output line info unconditionally into
22060 early DWARF and add reference to it.
22062 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22065 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
22066 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
22067 other than V2DFmode using iptr mode attribute.
22068 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
22070 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
22072 PR rtl-optimization/84659
22073 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
22075 2018-04-11 Jakub Jelinek <jakub@redhat.com>
22078 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
22080 (output_loc_list): Pass address of a dummy size variable even in the
22081 locview handling loop.
22082 (index_location_lists): Add comment on why skip_loc_list_entry can't
22085 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
22088 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
22091 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
22094 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22095 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
22096 and -mstring-compare-inline-limit.
22098 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22101 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
22102 for stack clash protection in a register whenever we need it to be in
22105 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22107 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
22108 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
22110 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
22113 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
22115 (mlong-double-): Ditto.
22116 * config/rs6000/sysv4.opt (msdata=): Ditto.
22117 (mtls-size=): Ditto.
22119 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
22121 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
22122 erroneous entries for
22123 "vector int vec_ldl (int, long int *)", and
22124 "vector unsigned int vec_ldl (int, unsigned long int *)".
22125 Add comments and entries for
22126 "vector bool char vec_ldl (int, bool char *)",
22127 "vector bool short vec_ldl (int, bool short *)",
22128 "vector bool int vec_ldl (int, bool int *)",
22129 "vector bool long long vec_ldl (int, bool long long *)",
22130 "vector pixel vec_ldl (int, pixel *)",
22131 "vector long long vec_ldl (int, long long *)",
22132 "vector unsigned long long vec_ldl (int, unsigned long long *)".
22133 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
22134 type tree bool_long_long_type_node and correct definition of
22135 bool_V2DI_type_node to make reference to this new type tree.
22136 (rs6000_mangle_type): Replace erroneous reference to
22137 bool_long_type_node with bool_long_long_type_node.
22138 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
22139 comments to emphasize sign distinctions for char and int types and
22140 replace RS6000_BTI_bool_long constant with
22141 RS6000_BTI_bool_long_long constant. Also add comment to restrict
22142 use of RS6000_BTI_pixel.
22143 (bool_long_type_node): Remove this macro definition.
22144 (bool_long_long_type_node): New macro definition
22146 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22148 PR rtl-optimization/85300
22149 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
22150 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
22151 simplify_unary_operation fails.
22153 2018-04-10 Martin Liska <mliska@suse.cz>
22155 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
22156 cgraph_edge and ipa_ref.
22158 2018-04-10 Jakub Jelinek <jakub@redhat.com>
22162 * config/i386/sse.md
22163 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
22164 computation of the VEC_MERGE selector from mask.
22165 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22166 Fix decoding of the VEC_MERGE selector into mask.
22168 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22170 PR tree-optimization/85286
22171 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
22173 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
22175 * final.c (final_1): Set insn_last_address as well as
22176 insn_current_address.
22178 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22181 * explow.c (emit_stack_probe): Call validize_mem on memory location
22182 before passing it to gen_probe_stack. Create address operand and
22183 legitimize it for the probe_stack_address case.
22185 2018-04-09 Jan Hubicka <jh@suse.cz>
22188 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
22189 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
22190 * tree.c (free_lang_data_in_type): Fix handling of binfos;
22192 (free_lang_data): Rebuild type inheritance graph.
22194 2018-04-09 Martin Sebor <msebor@redhat.com>
22196 * invoke.texi (-finline-small-functions): Mention other optimization
22198 (-findirect-inlining, -fpartial-inlining): Same.
22199 (-finline-functions-called-once): Same.
22200 (-freorder-blocks-and-partition): Same.
22202 2018-04-09 Jan Hubicka <jh@suse.cz>
22205 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
22206 jumps; choose last target that matches the criteria (i.e.
22207 no partition changes for non-crossing jumps).
22208 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22209 support for redirecting crossing jumps to non-crossing.
22211 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
22213 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22214 also for naked functions.
22216 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
22218 * config/arc/arc.md (add_shift): New pattern.
22219 (add_shift2): Likewise.
22220 (sub_shift): Likewise.
22221 (sub_shift_cmp0_noout): Likewise.
22222 (compare_si_ashiftsi): Likewise.
22223 (xbfu_cmp0_noout): New combine pattern.
22224 (xbfu_cmp0"): Likewise.
22225 (movsi_set_cc_insn): Place the predicable variant first.
22226 (commutative_binary_cmp0_noout): Remove clobber.
22227 (commutative_binary_cmp0): New pattern.
22228 (noncommutative_binary_cmp0): Likewise.
22229 (noncommutative_binary_cmp0_noout): Likewise.
22230 (noncommutative_binary_comparison_result_used): Removed.
22231 (rsub_cmp0): New pattern.
22232 (rsub_cmp0_noout): Likewise.
22233 (extzvsi): Changed, keep only meaningful variants.
22234 (SQH, SEZ): New iterators.
22235 (SQH_postfix): New mode attribute.
22236 (SEZ_prefix): New code attribute.
22237 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22238 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22239 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22240 of numerical value.
22241 (noncommutative_operator): Check the availability of barrel
22244 2018-04-09 Richard Biener <rguenther@suse.de>
22246 PR tree-optimization/85284
22247 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22248 Only use the niter constraining form of simple_iv when the exit
22249 is always executed.
22251 2018-04-09 Tom de Vries <tom@codesourcery.com>
22254 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22255 (define_expand "*memory_barrier"): New define_expand.
22256 (define_insn "memory_barrier"): New insn.
22258 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22260 PR rtl-optimization/80463
22261 PR rtl-optimization/83972
22262 PR rtl-optimization/83480
22264 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22265 correct producer for the insn.
22266 (tidy_control_flow): Fixup seqnos in case of debug insns.
22268 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22270 PR rtl-optimization/83913
22272 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22273 different sched-times when merging exprs.
22275 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22277 PR rtl-optimization/83962
22279 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22280 tidy_fallthru_edge and tidy_control_flow.
22282 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
22284 PR rtl-optimization/83530
22286 * sel-sched.c (force_next_insn): New global variable.
22287 (remove_insn_for_debug): When force_next_insn is true, also leave only
22288 next insn in the ready list.
22289 (sel_sched_region): When the region wasn't scheduled, make another pass
22290 over it with force_next_insn set to 1.
22292 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22294 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22296 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22297 for interrupt control.
22298 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22299 functions for interrupt control.
22300 * config/nds32/nds32-intrinsic.md: Likewise.
22301 * config/nds32/nds32_intrinsic.h: Likewise.
22302 * config/nds32/nds32.h (nds32_builtins): Likewise.
22304 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22306 * config/nds32/nds32.c (nds32_init_machine_status,
22307 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22308 strict_aligned_p field.
22309 (nds32_expand_to_rtl_hook): New function.
22310 (TARGET_EXPAND_TO_RTL_HOOK): Define.
22311 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22313 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22314 Chung-Ju Wu <jasonwucj@gmail.com>
22316 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22317 * config/nds32/nds32-n7.md: New file.
22318 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22319 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22321 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22322 * config/nds32/nds32.md (pipeline_model): Add n7.
22323 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22324 * config/nds32/pipelines.md: Include n7 settings.
22326 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22327 Chung-Ju Wu <jasonwucj@gmail.com>
22329 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22330 * config/nds32/nds32-e8.md: New file.
22331 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22332 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22334 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22335 * config/nds32/nds32.md (pipeline_model): Add e8.
22336 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22337 * config/nds32/pipelines.md: Include e8 settings.
22339 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22340 Chung-Ju Wu <jasonwucj@gmail.com>
22342 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22343 * config/nds32/nds32-n8.md: New file.
22344 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22345 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22347 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22348 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22349 * config/nds32/nds32.md (pipeline_model): Add n8.
22350 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22351 * config/nds32/pipelines.md: Include n8 settings.
22353 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
22354 Chung-Ju Wu <jasonwucj@gmail.com>
22356 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22357 * config/nds32/nds32-n9-2r1w.md: New file.
22358 * config/nds32/nds32-n9-3r2w.md: New file.
22359 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22360 nds32_register_ports): New or modify for cpu n9.
22361 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22363 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22364 * config/nds32/nds32-utils.c: New file.
22365 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22366 TARGET_MUL_SLOW): Define.
22367 * config/nds32/nds32.md (pipeline_model): New attribute.
22368 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22369 New options that support cpu n9.
22370 * config/nds32/pipelines.md: Include n9 settings.
22371 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22373 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
22375 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22376 information if necessary.
22377 (output_cond_branch_compare_zero): Likewise.
22378 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22379 (nds32_target_alignment): Refine for alignment.
22380 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22381 (FUNCTION_BOUNDARY): Modify.
22382 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22384 * config/nds32/nds32.opt (malways-align, malign-functions): New.
22386 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
22388 * config/nds32/constants.md (unspec_volatile_element): Add values for
22389 TLB operation and data prefetch.
22390 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22391 functions for TLB operation and data prefetch.
22392 * config/nds32/nds32-intrinsic.md: Likewise.
22393 * config/nds32/nds32_intrinsic.h: Likewise.
22394 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22395 (nds32_print_operand): Likewise.
22396 * config/nds32/nds32.h (nds32_builtins): Likewise.
22398 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
22399 Andrew Pinski <pinsika@gcc.gnu.org>
22401 PR middle-end/82976
22402 * match.pd: Use constant_boolean_node of correct type instead of
22403 boolean_true_node or boolean_false_node for simplifying
22404 pointer comparisons to zero.
22406 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22408 PR tree-optimization/80021
22409 * tree.c (verify_type_variant): Make error call in verify_variant_match
22410 translatable and remove final full stop.
22412 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22414 * config/nds32/constants.md (unspec_volatile_element): Add
22415 UNSPEC_VOLATILE_EH_RETURN.
22416 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22417 nds32_output_stack_pop): Support dwarf exception handling process.
22418 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22419 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22420 exception handling process.
22421 (nds32_compute_stack_frame): Likewise.
22422 (nds32_return_addr_rtx): Likewise.
22423 (nds32_initial_elimination_offset): Likewise.
22424 (nds32_expand_prologue): Likewise.
22425 (nds32_expand_epilogue): Likewise.
22426 (nds32_dynamic_chain_address): New function.
22427 * config/nds32/nds32.h (machine_function): Add fields for dwarf
22428 exception handling.
22429 (DYNAMIC_CHAIN_ADDRESS): Define.
22430 (EH_RETURN_DATA_REGNO): Define.
22431 (EH_RETURN_STACKADJ_RTX): Define.
22432 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22433 patterns for dwarf exception handling.
22435 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22437 * config/nds32/nds32.h: Clean up obsolete macros.
22439 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22441 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22442 Add enum values for particular instructions.
22443 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22444 particular intrinsic functions.
22445 * config/nds32/nds32-intrinsic.md: Likewise.
22446 * config/nds32/nds32_intrinsic.h: Likewise.
22447 * config/nds32/nds32.h (nds32_builtins): Likewise.
22448 * config/nds32/nds32.md (type): Add pbsad and pbsada.
22449 (btst, ave): New patterns for particular instructions.
22451 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22453 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22454 Add enum values for atomic load/store and memory sync.
22455 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22457 * config/nds32/nds32-intrinsic.md: Likewise.
22458 * config/nds32/nds32_intrinsic.h: Likewise.
22459 * config/nds32/nds32.h (nds32_builtins): Likewise.
22461 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22463 PR tree-optimization/85257
22464 * fold-const.c (native_encode_vector): If not all elts could fit
22465 and off is -1, return 0 rather than offset.
22466 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22467 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22468 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
22469 adjust buffer in native_interpret_expr call.
22471 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22473 * config/nds32/constants.md (unspec_volatile_element): Add cache
22474 control enum values.
22475 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22476 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22477 * config/nds32/nds32.c (nds32_cctl_names): New.
22478 (nds32_print_operand): Handle cache control register names.
22479 * config/nds32/nds32.h (nds32_builtins): New enum values.
22480 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22482 * config/nds32/nds32.md (type): Add mmu.
22483 * config/nds32/pipelines.md (simple_insn): Add mmu.
22485 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22487 * config/nds32/nds32.md (type): Remove call.
22488 * config/nds32/pipelines.md (simple_insn): Likewise.
22490 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22492 * config/nds32/constants.md (unspec_volatile_element): Add
22493 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22494 UNSPEC_VOLATILE_FMFCFG.
22495 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22496 description for fmfcfg and fmfcsr.
22497 (bdesc_1arg): Add fmtcsr.
22498 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22499 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22500 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22501 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22502 unspec_fmfcfg): New patterns.
22503 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22504 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22505 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22506 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22507 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22508 __nds32__fmfcfg): Define.
22510 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22512 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22513 intrinsic register names.
22514 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22515 intrinsic register enum values and macros.
22517 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22519 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22520 for load/store addressing form.
22521 (nds32_print_operand_address): Likewise.
22523 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22526 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22527 based on LABEL_REF. Remove useless assertion.
22528 (pic_address_needs_scratch): Fix formatting.
22529 (sparc_legitimize_pic_address): Minor tweaks.
22530 (sparc_delegitimize_address): Adjust assertion accordingly.
22531 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22532 into symbolic_operand.
22533 (movsi_high_pic_label_ref): Likewise.
22534 (movsi_lo_sum_pic_label_ref): Likewise.
22535 (movdi_pic_label_ref): Likewise.
22536 (movdi_high_pic_label_ref): Likewise.
22537 (movdi_lo_sum_pic_label_ref): Likewise.
22539 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22541 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22542 custom LIB_SPEC setup.
22544 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22545 Kito Cheng <kito.cheng@gmail.com>
22547 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22548 * config/riscv/freebsd.h: New.
22550 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22552 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22553 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22556 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22557 Kito Cheng <kito.cheng@gmail.com>
22559 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22560 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22561 * config/nds32/nds32-protos.h (nds32_output_call,
22562 nds32_output_return): Declare.
22563 * config/nds32/nds32.md: Refine all the call and return patterns.
22565 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22568 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22569 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22571 PR rtl-optimization/84872
22572 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22573 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22574 EDGE_CROSSING edge.
22576 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22578 * expr.c (copy_blkmode_to_reg): Revert 254862.
22579 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22581 2018-04-06 Richard Biener <rguenther@suse.de>
22583 PR middle-end/85244
22584 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22585 after seeing a component reference with an adjacent field. Treat
22586 refs to arrays at struct end of external decls similar to
22587 refs to unconstrained commons.
22589 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22592 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22593 look through SAVE_EXPRs with non-side-effects argument. Adjust
22595 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22598 2018-04-06 Richard Biener <rguenther@suse.de>
22600 PR middle-end/85180
22601 * alias.c (find_base_term): New wrapper around find_base_term
22602 unwinding CSELIB_VAL_PTR changes.
22603 (find_base_term): Do not restore CSELIB_VAL_PTR during the
22606 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22608 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22610 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22611 constant definitions.
22612 ("nop"): lr 0,0 -> nopr r0
22613 ("nop_lr0", "nop_lr1"): New insn definitions.
22615 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22617 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22618 NDS32_V3PUSH_AVAILABLE_P macro.
22620 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
22621 Chung-Ju Wu <jasonwucj@gmail.com>
22623 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22624 (nds32*-*-*): Add float and fpu_config into supported_defaults.
22625 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22626 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22627 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22628 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22629 * config/nds32/constraints.md: New constraints and checking for hard
22630 float configuration.
22631 * config/nds32/iterators.md: New mode iterator and attribute for hard
22632 float configuration.
22633 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22635 * config/nds32/nds32-fpu.md: New file.
22636 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22637 deal with hard float code generation.
22638 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22640 (abi_type, float_reg_number): New enum type.
22641 * config/nds32/nds32-predicates.c: New predicates for hard float.
22642 * config/nds32/nds32-protos.h: Declare functions for hard float.
22643 * config/nds32/nds32.c: Implementation for hard float configuration.
22644 * config/nds32/nds32.h: Definitions for hard float configuration.
22645 * config/nds32/nds32.md: Include hard float machine description and
22646 modify patterns for hard float configuration.
22647 * config/nds32/nds32.opt: New options for hard float configuration.
22648 * config/nds32/predicates.md: New predicates for hard float
22651 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22653 * common/config/nds32/nds32-common.c
22654 (nds32_option_optimization_table): Enable -mreleax-hint by default.
22656 2018-04-05 Jakub Jelinek <jakub@redhat.com>
22658 PR middle-end/85195
22659 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22660 CONSTRUCTOR_ELT (ctor, ...)->value.
22662 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
22665 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22667 2018-04-05 Tom de Vries <tom@codesourcery.com>
22670 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22673 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22674 Kito Cheng <kito.cheng@gmail.com>
22676 * config/nds32/constraints.md (U33): Fine-tune checking condition.
22677 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22678 * config/nds32/nds32.h (nds32_16bit_address_type): Add
22679 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22681 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22682 Kito Cheng <kito.cheng@gmail.com>
22684 * config/nds32/constraints.md (Ufe): New memory constraint.
22685 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22686 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22687 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22689 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22690 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22692 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22694 * config/nds32/nds32.md: Use optimize_size in the condition for
22695 alu-shift instructions.
22697 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22699 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22701 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22703 * config/nds32/nds32.md (negsi2): Refine pattern.
22705 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22706 Chung-Ju Wu <jasonwucj@gmail.com>
22708 * config/nds32/iterators.md (shift_rotate): New code iterator.
22709 (shift): New code attribute.
22710 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22711 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22712 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22713 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22714 bit-wise operations.
22715 (andsi3, *andsi3): Ditto.
22716 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22717 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22718 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22719 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22720 nds32_ior_operand, nds32_xor_operand): New predicates.
22722 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22724 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22725 (addsi3, subsi3): ... this.
22727 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22729 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22731 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22733 * config/nds32/nds32.md: Adjust indention.
22735 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22737 * config/nds32/nds32.md (feature): New attribute.
22739 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22741 * config/nds32/nds32.md (subtype): New attribute.
22743 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
22746 * config/arm/arm-builtins.c (arm_expand_builtin): Change
22747 expansion to perform a bitwise AND of the argument followed by a
22748 boolean negation of the result.
22750 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
22752 PR rtl-optimization/84878
22753 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22754 the basic block. Assert the use reference is not artificial and that
22755 it has an associated insn.
22757 2018-04-04 Michael Matz <matz@suse.de>
22759 * builtins.c (compute_objsize): Pass correct operand
22760 to array_at_struct_end_p.
22762 2018-04-04 Richard Biener <rguenther@suse.de>
22765 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22766 from contexts for DINFO_LEVEL_TERSE and below.
22768 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22770 * config/nds32/nds32-doubleword.md (move_<mode>): Require
22771 resiter_operand condition.
22772 * config/nds32/nds32.md (*move<mode>): Ditto.
22774 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22775 Monk Chiang <sh.chiang04@gmail.com>
22777 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22779 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22781 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
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_inverse_cond_code,
22787 nds32_cond_code_str, output_cond_branch,
22788 output_cond_branch_compare_zero, nds32_expand_cbranch,
22789 nds32_expand_cstore, nds32_expand_movcc,
22790 nds32_output_cbranchsi4_equality_zero,
22791 nds32_output_cbranchsi4_equality_reg,
22792 nds32_output_cbranchsi4_equality_reg_or_const_int,
22793 nds32_output_cbranchsi4_greater_less_zero: New functions.
22794 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22795 nds32_expand_cstore, nds32_expand_movcc,
22796 nds32_output_cbranchsi4_equality_zero,
22797 nds32_output_cbranchsi4_equality_reg,
22798 nds32_output_cbranchsi4_equality_reg_or_const_int,
22799 nds32_output_cbranchsi4_greater_less_zero): Declare.
22800 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22801 nds32_rimm11s_operand): New predicates.
22802 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22803 * config/nds32/nds32.md: Rewrite all the branch and conditional move
22806 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22808 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22809 * config/nds32/nds32.md: Ditto.
22810 * config/nds32/pipelines.md: Ditto.
22812 2018-04-04 Richard Biener <rguenther@suse.de>
22814 PR tree-optimization/85168
22815 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22816 propagating abnormals.
22818 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22820 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22822 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22823 Kito Cheng <kito.cheng@gmail.com>
22825 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22826 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22827 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22828 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22829 * config/nds32/nds32.md (sibcall_internal): New.
22830 (sibcall_register): Remove.
22831 (sibcall_immediate): Remove.
22832 (sibcall_value_internal): New.
22833 (sibcall_value_register): Remove.
22834 (sibcall_value_immediate): Remove.
22835 * config/nds32/predicates.md (nds32_general_register_operand): New.
22836 (nds32_call_address_operand): New.
22838 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22840 PR rtl-optimization/85167
22841 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22842 bb_defs if *split_p, instead preinitialize it to NULL.
22844 PR tree-optimization/85156
22845 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22846 evaluating the argument multiple times.
22848 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
22850 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22852 (_mm_cvtpd_ps): Likewise.
22853 (_mm_cvttpd_epi32): Likewise.
22854 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22855 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22856 vector, pixel, and bool following altivec.h include.
22858 2018-04-03 Martin Sebor <msebor@redhat.com>
22860 * doc/extend.texi (Common Function Attributes): Clarify.
22861 (const attribute): Likewise.
22862 (pure attribute): Likewise.
22864 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22867 * config/i386/i386.c (ix86_expand_vector_set): Use
22868 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
22870 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
22872 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22873 instructions when changing rounding bits to preserve precision bits
22874 in the x87 control word.
22876 2018-04-03 Martin Liska <mliska@suse.cz>
22878 PR tree-optimization/82491
22879 * rtl.h (strip_offset_and_add): Replace += suboffset with
22880 poly_uint64 () + suboffset.
22882 2018-03-29 Martin Liska <mliska@suse.cz>
22883 Martin Jambor <mjambor@suse.cz>
22886 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22887 param_type is not an integral or pointer type.
22889 2018-04-03 Richard Biener <rguenther@suse.de>
22891 * sese.h (recompute_all_dominators): Remove.
22893 2018-04-02 Martin Sebor <msebor@redhat.com>
22895 * doc/invoke.texi (-Wrestrict): Fix typos.
22897 2018-04-02 Jim Wilson <jimw@sifive.com>
22899 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22900 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22901 (<optab>di3, <optab>si3_extend): Likewise.
22902 (<optab>si3_mask, <optab>si3_mask_1): New.
22903 (<optab>di3_mask, <optab>di3_mask_1): New.
22904 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22905 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22906 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22908 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
22910 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22913 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
22915 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22916 (nds32_canonicalize_comparison): New function.
22918 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22919 Kito Cheng <kito.cheng@gmail.com>
22920 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22922 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22923 * config/nds32/constants.md (unspec_volatile_element): Add
22924 UNSPEC_VOLATILE_RELAX_GROUP.
22925 * config/nds32/nds32-relax-opt.c: New file.
22926 * config/nds32/nds32-predicates.c
22927 (nds32_symbol_load_store_p): New function.
22928 * config/nds32/nds32-protos.h
22929 (nds32_symbol_load_store_p): Declare function.
22930 (make_pass_nds32_relax_opt): Declare new rtl pass function.
22931 * config/nds32/nds32.c
22932 (nds32_register_pass): New function to register pass.
22933 (nds32_register_passes): New function to register passes.
22934 * config/nds32/nds32.md (relax_group): New pattern.
22935 * config/nds32/nds32.opt (mrelax-hint): New option.
22936 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22938 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
22940 * config/nds32/t-nds32: Modify files dependency.
22942 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22944 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22945 (PROFILE_HOOK): Define its implementation.
22947 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22949 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22950 type and 32-bit size.
22952 2018-04-01 Jakub Jelinek <jakub@redhat.com>
22954 PR middle-end/85090
22955 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22956 (V_128_256): New mode iterator.
22957 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22958 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22959 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22961 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22962 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22964 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
22967 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22968 NaN inputs correctly.
22970 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
22973 * config/rs6000/vsx.md (??r): New mode attribute.
22974 (*vsx_mov<mode>_64bit): Use it.
22975 (*vsx_mov<mode>_32bit): Likewise.
22977 2018-03-30 Martin Sebor <msebor@redhat.com>
22979 PR tree-optimization/84818
22980 * builtins.c (check_access): Use warning_n.
22982 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22985 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22987 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22990 2018-03-30 Julia Koval <julia.koval@intel.com>
22993 * x86-tune.def (movx, partial_reg_dependency): Enable for
22996 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
22998 PR inline-asm/84985
22999 * lra-constraints.c (process_alt_operands): Move setting
23000 this_alternative_matches below.
23002 2018-03-29 Martin Liska <mliska@suse.cz>
23005 * doc/invoke.texi: Document how LTO works with debug info.
23006 Describe auto-load support of binutils. Mention 'x86-64'
23007 as valid option value of -march option.
23009 2018-03-29 Jakub Jelinek <jakub@redhat.com>
23011 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
23014 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
23015 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
23016 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
23019 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23022 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
23023 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
23024 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
23025 for RS6000_BTM_POWERPC64.
23026 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
23027 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
23028 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
23031 (DIVDEU): Likewise.
23033 2018-03-28 Carl Love <cel@us.ibm.com>
23036 2017-09-27 Carl Love <cel@us.ibm.com>
23038 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
23039 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
23040 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
23043 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23045 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
23046 instead of __vector bool.
23047 (_mm_max_pu8): Likewise.
23048 (_mm_min_pi16): Likewise.
23050 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
23053 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
23054 (DIVWEUO): Likewise.
23055 (DIVDEO): Likewise.
23056 (DIVDEUO): Likewise.
23057 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
23058 DIVWEUO and DIVDEUO.
23059 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
23060 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
23061 (div_extend): Likewise.
23062 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
23064 (__builtin_divweuo): Likewise.
23065 (__builtin_divdeo): Likewise.
23066 (__builtin_divdeuo): Likewise.
23068 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23071 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
23072 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
23074 PR tree-optimization/82004
23075 * gimple-match-head.c (optimize_pow_to_exp): New function.
23076 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
23077 Don't fold to exp if optimize_pow_to_exp is false.
23079 2018-03-28 Martin Liska <mliska@suse.cz>
23082 * calls.c (initialize_argument_information): Fix trailing space.
23083 * common.opt: Fix typo and provide better explanation for
23084 -fsanitize-coverage option.
23085 * config/i386/i386.opt: Fix typo.
23087 2018-03-28 Jakub Jelinek <jakub@redhat.com>
23088 Martin Liska <mliska@suse.cz>
23091 * gimplify.c (asan_poison_variable): Don't do the check for
23092 gimplify_omp_ctxp here.
23093 (gimplify_decl_expr): Do it here.
23094 (gimplify_target_expr): Likewise.
23096 2018-03-28 Martin Liska <mliska@suse.cz>
23099 * config/i386/i386.c (ix86_function_arg_advance): Do not call
23100 chkp_type_bounds_count if MPX is not enabled.
23102 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
23104 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
23106 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
23109 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
23110 function to create the function decl for complex long double
23111 multiply and divide for -mabi=ieeelongdouble.
23112 (init_float128_ieee): Call it.
23114 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
23117 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
23118 -fcf-protection=branch -mibt.
23119 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
23121 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23124 * config/arm/arm.c (arm_valid_symbolic_address): Handle
23125 arm_word_relocations.
23127 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
23130 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
23131 extern array declarations.
23133 2018-03-27 Richard Biener <rguenther@suse.de>
23135 PR middle-end/84067
23136 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
23137 explicit single_use checks.
23139 2018-03-27 Richard Biener <rguenther@suse.de>
23141 PR tree-optimization/85082
23142 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
23145 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23147 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
23148 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
23149 Turn on fasynchronous-unwind-tables and funwind-tables.
23151 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
23154 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
23155 (*bmi_blsr_<mode>_ccz): Ditto.
23157 2018-03-26 Tom de Vries <tom@codesourcery.com>
23159 PR tree-optimization/85063
23160 * omp-general.c (offloading_function_p): New function. Factor out
23162 * omp-offload.c (pass_omp_target_link::gate): ... here.
23163 * omp-general.h (offloading_function_p): Declare.
23164 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
23165 with attribute omp declare target for offloading functions.
23167 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
23169 PR tree-optimization/84005
23170 * tree-data-ref.h (get_base_for_alignment): Declare.
23171 * tree-data-ref.c (get_base_for_alignment_1): New function.
23172 (get_base_for_alignment): Likewise.
23173 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23174 get_base_for_alignment to find a suitable base object, instead
23175 of always using drb->base_address.
23177 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23179 PR inline-asm/85022
23180 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
23181 known size by default.
23183 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
23185 PR inline-asm/85030
23186 * lra-constraints.c (process_alt_operands): Don't match BLKmode
23187 and non BLKmode operands.
23189 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23192 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
23193 Clean up attributes.
23195 2018-03-23 Richard Biener <rguenther@suse.de>
23198 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
23199 we are going to emit early debug for LTO.
23201 2018-03-23 Jakub Jelinek <jakub@redhat.com>
23203 PR inline-asm/85034
23204 * function.c (match_asm_constraints_1): Don't optimize if input
23205 doesn't satisfy general_operand predicate for output's mode.
23207 PR inline-asm/85022
23208 * alias.c (write_dependence_p): Don't require for x_canonicalized
23209 non-VOIDmode if x has VOIDmode.
23212 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23213 just don't try to optimize it rather than assert it never happens.
23215 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23217 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23218 macro expansions for definition of ST_INTERNAL_<mode> and
23219 LD_INTERNAL_<mode> builtins.
23220 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23222 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23224 (altivec_expand_st_builtin): Likewise.
23225 (altivec_expand_builtin): Remove calls to deleted functions.
23226 (rs6000_address_for_altivec): Delete this function.
23227 * config/rs6000/vector.md: Remove expands for
23228 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23230 2018-03-22 Sudakshina Das <sudi.das@arm.com>
23233 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23234 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23235 re-computing once computed.
23236 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23237 (arm_init_machine_status): Initialize
23238 machine->static_chain_stack_bytes.
23240 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
23243 * doc/extend.texi: Add four new prototypes for vec_ld.
23244 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23245 definitions for more logical presentation.
23246 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23247 entries for V1TI variants of __builtin_altivec_ld builtin.
23248 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23249 handling of V1TI variant of LVX icode pattern.
23250 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23251 (rs6000_gimple_fold_builtin): Likewise.
23252 (altivec_init_builtins): Add code to define
23253 __builtin_altivec_lvx_v1ti function.
23255 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23257 PR inline-asm/84941
23258 * function.c (match_asm_constraints_1): Don't do the optimization
23259 if input isn't a REG, SUBREG, MEM or constant.
23261 2018-03-22 Tom de Vries <tom@codesourcery.com>
23263 PR tree-optimization/84956
23264 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23265 bb_has_abnormal_pred.
23267 2018-03-22 Jakub Jelinek <jakub@redhat.com>
23270 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23271 DECL_INITIAL (decl) to decl at the end.
23272 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23273 adjust the comment.
23275 2018-03-21 Joseph Myers <joseph@codesourcery.com>
23277 * doc/extend.texi (__builtin_tgmath): Document when complex
23278 integer types are treated as _Complex _Float64.
23280 2018-03-21 Tom de Vries <tom@codesourcery.com>
23282 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23284 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23286 PR tree-optimization/84960
23287 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23288 if it is ENTRY block, move them into single succ of ENTRY in that case.
23290 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
23292 PR tree-optimization/84811
23293 * poly-int.h (poly_span_traits): Remove the T3 parameter and
23294 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23295 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23296 (known_subrange_p): Update accordingly. Cast each value involved
23297 in the size comparison, rather than casting the result of the
23300 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23302 PR tree-optimization/84982
23303 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23304 by flipping the least significant bit rather than all bits from
23305 bitpos to bitpos + bitsize - 1.
23307 2018-03-21 Nathan Sidwell <nathan@acm.org>
23309 * doc/extend.texi (Deprecated Features): Remove mention of
23310 long-deleted deprecations.
23312 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23315 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23316 * configure: Regenerate.
23318 2018-03-21 Tom de Vries <tom@codesourcery.com>
23320 PR tree-optimization/83126
23321 * tree-parloops.c (num_phis): New function.
23322 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23324 2018-03-21 Nathan Sidwell <nathan@acm.org>
23326 * doc/extend.texi (Deprecated Features): Update deprecated flags,
23327 mention anon-struct/union members and trailing attributes.
23329 2018-03-21 Bin Cheng <bin.cheng@arm.com>
23331 PR tree-optimization/84969
23332 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23333 builtin memset partitions if they set different rhs values.
23335 2018-03-21 Jakub Jelinek <jakub@redhat.com>
23337 PR rtl-optimization/84989
23338 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23339 VEC_DUPLICATE with scalar result mode.
23341 2018-03-21 Martin Liska <mliska@suse.cz>
23344 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23345 not intended return statement.
23347 2018-03-21 Martin Liska <mliska@suse.cz>
23350 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23351 (chkp_find_bound_slots_1): Limit number of iterations.
23353 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
23356 * Minor grammar fixes for x86 options.
23358 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23361 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23362 holding REG_CFA_RESTORE notes, instead turn them into a USE.
23364 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
23367 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23368 (altivec_lvx_<mode>_1op): Likewise.
23369 (altivec_stvx_<mode>_2op): Likewise.
23370 (altivec_stvx_<mode>_1op): Likewise.
23371 (altivec_lvx_<VM2:mode>): New define_expand.
23372 (altivec_stvx_<VM2:mode>): Likewise.
23373 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23374 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23375 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23376 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23377 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23378 (rs6000_gen_lvx): Likewise.
23379 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23380 (altivec_expand_stv_builtin): Likewise.
23381 (altivec_expand_builtin): Likewise.
23382 * config/rs6000/vector.md: Likewise.
23384 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23387 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23390 2018-03-20 Richard Biener <rguenther@suse.de>
23393 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23394 sign-conversions as zero, fall back to standard scalar_stmt
23397 2018-03-20 Martin Liska <mliska@suse.cz>
23400 * predict.c (rebuild_frequencies): Handle case when we have
23401 PROFILE_ABSENT, but flag_guess_branch_prob is false.
23403 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23406 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23407 flag_section_anchors.
23408 * varasm.c (use_blocks_for_decl_p): Remove hack for
23409 dw2_force_const_mem.
23412 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23414 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
23415 be created, use lowpart_subreg of operands[0] rather than operands[0]
23417 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23418 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23419 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23420 and n constraint instead of aarch64_shift_imm_di and Usd.
23421 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23422 (*aarch64_<optab>_reg_minus<mode>3): ... this.
23424 2018-03-20 Sudakshina Das <sudi.das@arm.com>
23427 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23428 to favor GPR over NEON registers.
23429 (<shift>di3_neon): Likewise.
23431 2018-03-20 Tom de Vries <tom@codesourcery.com>
23434 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23435 (nvptx_process_pars): Emit bar.sync asap and alap.
23437 2018-03-20 Tom de Vries <tom@codesourcery.com>
23440 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23441 seen_label if seen_label is already set.
23443 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23446 * config/i386/i386.c (fold_builtin_cpu): For features above 31
23447 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23448 Use 1U instead of 1. Formatting fixes.
23451 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23452 instead of TREE_TYPE (s1) for the return value.
23454 2018-03-19 Jakub Jelinek <jakub@redhat.com>
23456 PR tree-optimization/84946
23457 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23458 bitsize + bitsize in poly_uint64 rather than poly_int64.
23461 * dwarf2asm.c: Include fold-const.c.
23462 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23463 of decl rather than decl itself.
23465 PR rtl-optimization/84643
23466 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23468 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
23471 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23472 calling assemble_variable.
23474 2018-03-19 Sudakshina Das <sudi.das@arm.com>
23477 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23478 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23480 2018-03-19 Jim Wilson <jimw@sifive.com>
23483 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23484 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23485 (riscv_first_stack_step): Likewise.
23486 (riscv_option_override): Use STACK_BOUNDARY instead of
23487 MIN_STACK_BOUNDARY.
23488 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23489 MIN_STACK_BOUNDARY.
23490 (BIGGEST_ALIGNMENT): Set to 128.
23491 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23492 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23495 2018-03-19 Richard Biener <rguenther@suse.de>
23497 PR tree-optimization/84933
23498 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23499 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23501 2018-03-19 Richard Biener <rguenther@suse.de>
23503 PR tree-optimization/84859
23504 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23505 (cond_if_else_store_replacement): Perform sinking operation on
23506 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23507 Generalize what a BB with a single eligible store is.
23509 2018-03-19 Richard Biener <rguenther@suse.de>
23511 PR tree-optimization/84929
23512 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23513 chrec_is_positive against non-chrec arg.
23515 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23518 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23520 2018-03-18 Martin Liska <mliska@suse.cz>
23522 PR rtl-optimization/84635
23523 * regrename.c (build_def_use): Use matches_mode only when
23526 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23528 PR tree-optimization/84913
23529 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23530 vectorize chains of COND_EXPRs.
23532 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23534 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23536 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23538 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23540 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23542 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23544 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23545 Kito Cheng <kito.cheng@gmail.com>
23547 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23548 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23549 (nds32_adjust_reg_alloc_order): New function.
23550 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23552 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23554 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23555 nds32_print_operand, nds32_print_operand_address): Use
23556 HOST_WIDE_INT_PRINT_DEC instead.
23558 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23560 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23562 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23565 * config/i386/i386.c (initial_ix86_tune_features,
23566 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23567 unsigned long long.
23568 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23569 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23570 rather than 1u << ix86_tune. Formatting fix.
23571 (ix86_option_override_internal): Change ix86_arch_mask from
23572 unsigned int to unsigned HOST_WIDE_INT, initialize to
23573 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23574 (ix86_function_specific_restore): Likewise.
23576 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23579 * postreload.c (reload_combine_recognize_pattern): Perform
23580 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23581 truncate_int_for_mode the result for the destination's mode.
23584 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23585 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23587 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23590 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23593 * lra-assigns.c (lra_split_hard_reg_for): Don't use
23594 regno_allocno_class_array and sorted_pseudos.
23595 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23596 insns where regno is used.
23598 2018-03-16 Martin Liska <mliska@suse.cz>
23601 * multiple_target.c (create_dispatcher_calls): Redirect
23602 reference in the symbol table.
23604 2018-03-16 Martin Liska <mliska@suse.cz>
23607 * multiple_target.c (create_dispatcher_calls): Redirect also
23610 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23614 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23615 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23616 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23618 2018-03-16 Julia Koval <julia.koval@intel.com>
23620 * doc/invoke.texi (Skylake Server): Add CLWB.
23621 Cannonlake): Remove CLWB.
23623 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23625 PR tree-optimization/84841
23626 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23628 (FLOAT_ONE_CONST_TYPE): Define.
23629 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23630 (sort_by_operand_rank): Put entries with higher constant_type last
23631 rather than first to match comments.
23633 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
23635 * config/nios2/nios2.md (movsi_internal): Fix thinko in
23638 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23641 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23642 check and use address of target always.
23644 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
23647 * config/i386/i386.c (indirect_thunk_needed): Update comments.
23648 (indirect_thunk_bnd_needed): Likewise.
23649 (indirect_thunks_used): Likewise.
23650 (indirect_thunks_bnd_used): Likewise.
23651 (indirect_return_needed): New.
23652 (indirect_return_bnd_needed): Likewise.
23653 (output_indirect_thunk_function): Add a bool argument for
23655 (output_indirect_thunk_function): Don't generate alias for
23656 function return thunk.
23657 (ix86_code_end): Call output_indirect_thunk_function to generate
23658 function return thunks.
23659 (ix86_output_function_return): Set indirect_return_bnd_needed
23660 and indirect_return_needed instead of indirect_thunk_bnd_needed
23661 and indirect_thunk_needed.
23663 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
23665 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23666 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23667 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23669 2018-03-15 David Malcolm <dmalcolm@redhat.com>
23670 Paul Hua <paul.hua.gm@gmail.com>
23673 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23675 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
23677 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23678 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23679 resp. SFmode cases.
23681 2018-03-15 Tamar Christina <tamar.christina@arm.com>
23684 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23685 instead of GET_MODE_SIZE when comparing Units.
23687 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
23690 * varasm.c (hash_section): Return an unchangeble hash value
23691 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23692 Return !aarch64_can_use_per_function_literal_pools_p ().
23694 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23697 * optabs.c (emit_conditional_move): Pass address of cmode's copy
23698 rather than address of cmode as last argument to prepare_cmp_insn.
23700 2018-03-15 Julia Koval <julia.koval@intel.com>
23702 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23703 F_AVX512VNNI, F_AVX512BITALG): New.
23705 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
23708 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
23709 insn for floating-point loads and stores.
23711 2018-03-14 Carl Love <cel@us.ibm.com>
23713 * config/rs6000/rs6000-c.c: Add macro definitions for
23714 ALTIVEC_BUILTIN_VEC_PERMXOR.
23715 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23716 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23717 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23718 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23720 * config/doc/extend.texi: Add prototypes for vec_permxor.
23722 2018-03-14 David Malcolm <dmalcolm@redhat.com>
23725 * diagnostic-show-locus.c (class layout_point): Convert m_line
23726 from int to linenum_type.
23727 (line_span::comparator): Use linenum "compare" function when
23728 comparing line numbers.
23729 (test_line_span): New function.
23730 (layout_range::contains_point): Convert param "row" from int to
23732 (layout_range::intersects_line_p): Likewise.
23733 (layout::will_show_line_p): Likewise.
23734 (layout::print_source_line): Likewise.
23735 (layout::should_print_annotation_line_p): Likewise.
23736 (layout::print_annotation_line): Likewise.
23737 (layout::print_leading_fixits): Likewise.
23738 (layout::annotation_line_showed_range_p): Likewise.
23739 (struct line_corrections): Likewise for field m_row.
23740 (line_corrections::line_corrections): Likewise for param "row".
23741 (layout::print_trailing_fixits): Likewise.
23742 (layout::get_state_at_point): Likewise.
23743 (layout::get_x_bound_for_row): Likewise.
23744 (layout::print_line): Likewise.
23745 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23746 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23747 * input.c (selftest::test_linenum_comparisons): New function.
23748 (selftest::input_c_tests): Call it.
23749 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23750 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23751 * selftest.h (ASSERT_GT): New macro.
23752 (ASSERT_GT_AT): New macro.
23753 (ASSERT_LT): New macro.
23754 (ASSERT_LT_AT): New macro.
23756 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
23758 PR rtl-optimization/84780
23759 * combine.c (distribute_links): Don't make a link based on pc_rtx.
23761 2018-03-14 Martin Liska <mliska@suse.cz>
23763 * tree.c (record_node_allocation_statistics): Use
23764 get_stats_node_kind.
23765 (get_stats_node_kind): New function extracted from
23766 record_node_allocation_statistics.
23767 (free_node): Use get_stats_node_kind.
23769 2018-03-14 Richard Biener <rguenther@suse.de>
23771 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23772 that the value-set of ANTIC_IN doesn't grow.
23775 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23777 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23778 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23780 2018-03-14 Julia Koval <julia.koval@intel.com>
23782 * config.gcc (icelake-client, icelake-server): New.
23784 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23785 (initial_ix86_arch_features): Ditto.
23786 (PTA_SKYLAKE): Add SGX.
23787 (PTA_ICELAKE): Remove.
23788 (PTA_ICELAKE_CLIENT): New.
23789 (PTA_ICELAKE_SERVER): New.
23790 (ix86_option_override_internal): Split up icelake on icelake client and
23792 (get_builtin_code_for_version): Ditto.
23793 (fold_builtin_cpu): Ditto.
23794 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23795 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23796 * config/i386/i386.h (processor_type): Ditto.
23797 * doc/invoke.texi: Ditto.
23799 2018-03-14 Jakub Jelinek <jakub@redhat.com>
23802 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23803 INTEGER_CST offset, add it together with bitpos / 8 and
23804 sign extend based on POINTER_SIZE.
23808 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
23811 * config/i386/constraints.md (Yc): New register constraint.
23812 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23813 Use Yc constraint for alternative 2 of operand 0. Remove
23814 preferred_for_speed attribute.
23816 2018-03-14 Richard Biener <rguenther@suse.de>
23818 PR tree-optimization/84830
23819 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23820 with the old one to avoid oscillations.
23822 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
23825 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23827 (assign_by_spills): Return a flag of reload assignment failure.
23828 Do not process the reload assignment failures. Do not spill other
23829 reload pseudos if they has the same reg class. Update n if
23831 (lra_assign): Add a return arg. Set up from the result of
23832 assign_by_spills call.
23833 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23834 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23835 usage_insns if it is not NULL.
23836 (spill_hard_reg_in_range): New function.
23837 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23838 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23839 function prototypes.
23840 (lra_assign): Change prototype.
23841 * lra.c (lra): Add code to deal with fails by splitting hard reg
23844 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
23846 * config/riscv/riscv.opt (mrelax): New option.
23847 * config/riscv/riscv.c (riscv_file_start): Emit ".option
23848 "norelax" when riscv_mrelax is disabled.
23849 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23851 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23854 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23855 reassociation for int modes.
23857 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23859 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23860 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23862 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23863 * config/aarch64/aarch64-sve.md
23864 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23865 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23866 (*extend<mode><Vwide>2): Rename to...
23867 (aarch64_sve_extend<mode><Vwide>2): ...this.
23868 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23869 renaming the old pattern to...
23870 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
23872 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23873 define_expand, renaming the old pattern to...
23874 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23875 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23876 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23877 account when deciding which SVE instruction the optab should use.
23878 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23880 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23882 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23883 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23884 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23885 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23886 (tlsdesc_small_<mode>): Turn a define_expand and use
23887 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
23888 (tlsdesc_small_advsimd_<mode>): ...this.
23889 (tlsdesc_small_sve_<mode>): New pattern.
23891 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23893 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23894 (UNSPEC_UMUL_HIGHPART): New constants.
23895 (MUL_HIGHPART): New int iteraor.
23896 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23897 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23899 (*<su>mul<mode>3_highpart): New define_insn.
23901 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23904 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23907 2018-03-13 Martin Liska <mliska@suse.cz>
23910 * (sem_item_optimizer::sem_item_optimizer): Initialize new
23912 (sem_item_optimizer::~sem_item_optimizer): Release it.
23913 (sem_item_optimizer::merge_classes): Register variable aliases.
23914 (sem_item_optimizer::fixup_pt_set): New function.
23915 (sem_item_optimizer::fixup_points_to_sets): Likewise.
23916 * ipa-icf.h: Declare new variables and functions.
23918 2018-03-13 Jakub Jelinek <jakub@redhat.com>
23920 PR middle-end/84834
23921 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23922 integer_pow2p@2 and test integer_pow2p in condition.
23923 (A < 0 ? C : 0): Similarly for @1.
23925 PR middle-end/84831
23926 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23927 characters starting at p contain '\0' character, don't look beyond
23931 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23932 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23935 * reg-stack.c (change_stack): Change update_end var from int to
23936 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23937 also call set_block_for_insn on the newly added insns and rescan.
23940 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23941 on the last operand.
23944 * tree.c (stabilize_reference_1): Return save_expr (e) for
23945 STATEMENT_LIST even if it doesn't have side-effects.
23947 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
23949 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23951 2018-03-12 Renlin Li <renlin.li@arm.com>
23953 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23954 aarch64_output_scalar_simd_mov_immediate.
23956 2018-03-12 Martin Sebor <msebor@redhat.com>
23958 PR tree-optimization/83456
23959 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23960 for perfectly overlapping calls to memcpy.
23961 (gimple_fold_builtin_memory_chk): Same.
23962 (gimple_fold_builtin_strcpy): Handle no-warning.
23963 (gimple_fold_builtin_stxcpy_chk): Same.
23964 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23966 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23968 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23969 parameter. Use it for SFmode.
23970 (rs6000_function_arg_advance_1): Adjust.
23971 (rs6000_function_arg): Adjust.
23972 (rs6000_gimplify_va_arg): Pass false for that new parameter.
23974 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23976 PR rtl-optimization/84169
23977 PR rtl-optimization/84780
23978 * combine.c (can_combine_p): Check for a 2-insn combination whether
23979 the destination register is used between the two insns, too.
23981 2018-03-12 Richard Biener <rguenther@suse.de>
23983 PR tree-optimization/84803
23984 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23985 for refs DR analysis didn't process.
23987 2018-03-12 Richard Biener <rguenther@suse.de>
23989 PR tree-optimization/84777
23990 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23991 force-vectorize loops ignore whether we are optimizing for size.
23993 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
23995 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23996 (TARGET_MD_ASM_ADJUST): Define.
23998 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
23999 Kito Cheng <kito.cheng@gmail.com>
24000 Chung-Ju Wu <jasonwucj@gmail.com>
24002 * config/nds32/nds32.c (nds32_compute_stack_frame,
24003 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
24004 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
24005 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
24006 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
24007 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
24008 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
24009 * config/nds32/nds32.md (prologue, epilogue): Use macro
24010 NDS32_V3PUSH_AVAILABLE_P to do checking.
24012 2018-03-11 Jakub Jelinek <jakub@redhat.com>
24015 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
24016 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
24017 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
24018 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
24019 addition of most attributes on !orig_type_die or the attribute not
24020 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
24022 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24023 Chung-Ju Wu <jasonwucj@gmail.com>
24025 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
24026 __NDS32_VH__ macro.
24027 * config/nds32/nds32.opt (mvh): New option.
24029 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24030 Chung-Ju Wu <jasonwucj@gmail.com>
24032 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
24034 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
24035 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
24038 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
24039 Chung-Ju Wu <jasonwucj@gmail.com>
24041 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
24043 * config/nds32/nds32-multiple.md (strlensi): New pattern.
24044 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
24046 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
24047 Kito Cheng <kito.cheng@gmail.com>
24048 Chung-Ju Wu <jasonwucj@gmail.com>
24050 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
24051 UNSPEC_FFMISM and UNSPEC_FLMISM.
24052 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
24053 for ffb, ffmism and flmism.
24054 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
24055 (unspec_ffmism): Ditto.
24056 (unspec_flmism): Ditto.
24057 (nds32_expand_builtin_impl): Check if string extension is available.
24058 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
24059 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
24061 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
24064 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24067 * lra-assigns.c (assign_by_spills): Return a flag of reload
24068 assignment failure. Do not process the reload assignment
24069 failures. Do not spill other reload pseudos if they has the same
24071 (lra_assign): Add a return arg. Set up from the result of
24072 assign_by_spills call.
24073 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24074 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24075 usage_insns if it is not NULL.
24076 (spill_hard_reg_in_range): New function.
24077 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24078 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24079 function prototypes.
24080 (lra_assign): Change prototype.
24081 * lra.c (lra): Add code to deal with fails by splitting hard reg
24084 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
24087 * config/i386/i386.opt: Replace Enforcment with Enforcement.
24089 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
24092 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
24093 (dw_val_node): Add val_symbolic_view.
24094 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
24095 (symview_upper_bound): New.
24096 (new_line_info_table): Initialize symviews_since_reset.
24097 (dwarf2out_source_line): Count symviews_since_reset and set
24098 symview_upper_bound.
24099 (dw_val_equal_p): Handle symview.
24100 (add_AT_symview): New.
24101 (print_dw_val): Handle symview.
24102 (attr_checksum, attr_checksum_ordered): Likewise.
24103 (same_dw_val_p, size_of_die): Likewise.
24104 (value_format, output_die): Likewise.
24105 (add_high_low_attributes): Use add_AT_symview for entry_view.
24106 (dwarf2out_finish): Reset symview_upper_bound, clear
24109 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
24112 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
24113 Add strict argument and use it.
24114 (rs6000_split_multireg_move): Update for new strict argument.
24115 (mem_operand_gpr): Disallow all non-offsettable addresses.
24116 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
24118 2018-03-09 Jakub Jelinek <jakub@redhat.com>
24121 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
24122 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
24123 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
24126 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
24127 decl, use remap_type if we want to use the type.
24129 2018-03-09 Martin Sebor <msebor@redhat.com>
24131 PR tree-optimization/84526
24132 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24134 (builtin_access::generic_overlap): Be prepared to handle non-array
24137 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
24139 PR rtl-optimization/84682
24140 * lra-constraints.c (process_address_1): Check is_address flag
24141 for address constraints.
24142 (process_alt_operands): Likewise.
24143 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
24144 preprocess_constraints.
24145 * recog.h (preprocess_constraints): Add oploc parameter.
24147 * recog.c (preprocess_constraints): Test address_operand for
24148 CT_ADDRESS constraints.
24150 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
24153 * lra-assigns.c (assign_by_spills): Return a flag of reload
24154 assignment failure. Do not process the reload assignment
24155 failures. Do not spill other reload pseudos if they has the same
24157 (lra_assign): Add a return arg. Set up from the result of
24158 assign_by_spills call.
24159 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24160 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24161 usage_insns if it is not NULL.
24162 (spill_hard_reg_in_range): New function.
24163 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24164 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24165 function prototypes.
24166 (lra_assign): Change prototype.
24167 * lra.c (lra): Add code to deal with fails by splitting hard reg
24170 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24173 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
24174 Accept complain bool parameter. Only emit errors if it is true.
24175 (arm_parse_cpu_option_name): Likewise.
24176 (arm_target_thumb_only): Adjust callers of the above.
24177 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
24178 prototype to take a default true bool parameter.
24179 (arm_parse_arch_option_name): Likewise.
24181 2018-03-09 David Malcolm <dmalcolm@redhat.com>
24182 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
24186 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
24187 * configure: Regenerate.
24188 * configure.ac ("linker --version-script option"): New.
24189 ("linker soname option"): New.
24191 2018-03-09 Richard Biener <rguenther@suse.de>
24193 PR tree-optimization/84775
24194 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
24195 immediate uses of predicate stmts and mark them modified.
24198 PR tree-optimization/84178
24199 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24201 (version_loop_for_if_conversion): Delay update_ssa call.
24202 (tree_if_conversion): Delay update_ssa until after predicate
24205 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
24208 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24209 when the function accesses prior frames.
24211 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24214 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24215 gen_llsym, otherwise call maybe_gen_llsym.
24217 PR inline-asm/84742
24218 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24219 has ',' character inside of it.
24221 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24224 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24225 as clobbering CC_REGNUM.
24227 2018-03-08 Richard Biener <rguenther@suse.de>
24229 PR middle-end/84552
24230 * tree-scalar-evolution.c: Include tree-into-ssa.h.
24231 (follow_copies_to_constant): Do not follow SSA names registered
24234 2018-03-08 Richard Biener <rguenther@suse.de>
24236 PR tree-optimization/84178
24237 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24239 (version_loop_for_if_conversion): Delay update_ssa call.
24240 (tree_if_conversion): Delay update_ssa until after predicate
24243 2018-03-08 David Malcolm <dmalcolm@redhat.com>
24245 PR tree-optimization/84178
24246 * tree-if-conv.c (release_bb_predicate): Remove the
24247 the assertion that the stmts have NULL use_ops.
24248 Discard the statements, asserting that they haven't
24249 yet been added to a BB.
24251 2018-03-08 Richard Biener <rguenther@suse.de>
24253 PR tree-optimization/84746
24254 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24255 (phi_translate): Pass in destination ANTIC_OUT set.
24256 (phi_translate_1): Likewise. For a simplified result lookup
24257 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24258 (phi_translate_set): Adjust.
24259 (do_pre_regular_insertion): Likewise.
24260 (do_pre_partial_partial_insertion): Likewise.
24262 2018-03-08 Martin Liska <mliska@suse.cz>
24264 PR gcov-profile/84735
24265 * doc/gcov.texi: Document usage of profile files.
24266 * gcov-io.h: Document changes in the format.
24268 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
24272 * dwarf2out.c (struct dw_line_info_table): Update comments for
24274 (FORCE_RESET_NEXT_VIEW): New.
24275 (FORCE_RESETTING_VIEW_P): New.
24276 (RESETTING_VIEW_P): Check for -1 too.
24277 (ZERO_VIEW_P): Likewise.
24278 (new_line_info_table): Force-reset next view.
24279 (dwarf2out_begin_function): Likewise.
24280 (dwarf2out_source_line): Simplify zero_view_p initialization.
24281 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24282 view directly. Omit view when omitting .loc at line 0.
24284 2018-03-08 Jakub Jelinek <jakub@redhat.com>
24286 PR tree-optimization/84740
24287 * tree-switch-conversion.c (process_switch): Call build_constructors
24288 only if info.phi_count is non-zero.
24290 PR tree-optimization/84739
24291 * tree-tailcall.c (find_tail_calls): Check call arguments against
24292 DECL_ARGUMENTS (current_function_decl) rather than
24293 DECL_ARGUMENTS (func) when checking for tail recursion.
24295 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24297 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24298 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24299 Volker Reichelt's entry and add entries for people that perform
24300 GCC fuzzy testing and report numerous bugs.
24302 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
24305 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24306 readonly data in sdata, if that is disabled.
24307 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24308 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24309 -mreadonly-in-sdata option.
24311 2018-03-07 Martin Sebor <msebor@redhat.com>
24313 PR tree-optimization/84468
24314 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24315 basic block when looking for nul assignment.
24317 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
24320 * except.h (output_function_exception_table): Adjust prototype.
24321 * except.c (output_function_exception_table): Remove FNNAME parameter
24322 and add SECTION parameter. Ouput one part of the table at a time.
24323 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24324 the first part of the exception table and emit unwind directives.
24325 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24326 (i386_pe_seh_cold_init): Likewise.
24327 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24328 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24329 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24330 (ix86_output_call_insn): Emit a nop in one more case for SEH.
24331 * config/i386/winnt.c: Include except.h.
24332 (struct seh_frame_state): Add reg_offset, after_prologue and
24333 in_cold_section fields.
24334 (i386_pe_seh_end_prologue): Set seh->after_prologue.
24335 (i386_pe_seh_cold_init): New function.
24336 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24337 to seh->in_cold_section.
24338 (seh_emit_push): Record the offset of the push.
24339 (seh_emit_save): Record the offet of the save.
24340 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24341 Test seh->after_prologue to disregard the epilogue.
24342 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24343 (i386_pe_end_cold_function): New function.
24345 2018-03-07 Jakub Jelinek <jakub@redhat.com>
24348 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24349 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24352 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24354 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24355 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24357 PR middle-end/84723
24358 * multiple_target.c: Include tree-inline.h and intl.h.
24359 (expand_target_clones): Diagnose and fail if node->definition and
24360 !tree_versionable_function_p (node->decl).
24362 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
24364 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24366 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24367 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24368 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24370 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24373 * combine.c (try_combine): Use reg_or_subregno instead of handling
24374 just paradoxical SUBREGs and REGs.
24376 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
24378 * config/arc/arc.c (arc_finalize_pic): Remove function.
24379 (arc_must_save_register): We use single base PIC register, remove
24380 checks to save/restore the PIC register.
24381 (arc_expand_prologue): Likewise.
24382 * config/arc/arc-protos.h (arc_set_default_type_attributes):
24384 (arc_verify_short): Likewise.
24385 (arc_attr_type): Likewise.
24386 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24387 (walk_stores): Likewise.
24388 (arc_address_cost): Make it static.
24389 (arc_verify_short): Likewise.
24390 (branch_dest): Likewise.
24391 (arc_attr_type): Likewise.
24392 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24393 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24394 (arc_final_prescan_insn): Remove inserting the nops due to
24395 hardware hazards. It is done in reorg step.
24396 (insn_length_variant_t): Remove.
24397 (insn_length_parameters_t): Likewise.
24398 (arc_insn_length_parameters): Likewise.
24399 (arc_get_insn_variants): Likewise.
24400 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24402 2018-03-06 Jakub Jelinek <jakub@redhat.com>
24404 PR inline-asm/84683
24405 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24408 PR tree-optimization/84687
24409 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24411 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24413 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24415 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24416 Rename to ppc_speculation_barrier.
24417 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24418 __builtin_ppc_speculation_barrier.
24420 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24423 * combine.c (combine_simplify_rtx): Don't try to simplify if
24424 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24427 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
24429 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24430 to 32 bytes when compiling for POWER9.
24432 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24435 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24436 regparm >= 3 with no arg reg available also for calls with
24437 flag_force_indirect_call. Pass decl to ix86_function_regparm.
24440 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24442 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
24444 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
24447 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24449 2018-03-05 Richard Biener <rguenther@suse.de>
24451 PR tree-optimization/84486
24452 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24453 When inserting a __builtin_assume_aligned call set the LHS
24454 SSA name alignment info accordingly.
24456 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
24458 PR tree-optimization/84114
24459 * config/aarch64/aarch64.c (aarch64_reassociation_width)
24460 Avoid reassociation of FLOAT_MODE addition.
24462 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
24464 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24465 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24466 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24467 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24468 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24469 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24470 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24472 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24473 __builtin_ia32_wbinvd): New builtins.
24474 (SPECIAL_ARGS2): New.
24475 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24476 (SPECIAL_ARGS2): New.
24477 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24478 (ix86_valid_target_attribute_inner_p): Ditto.
24479 (ix86_init_mmx_sse_builtins): Add special_args2.
24480 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24481 TARGET_WBNOINVD_P): New.
24482 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24483 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24484 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24485 * config/i386/immintrin.h (_wbinvd): New intrinsic.
24486 * config/i386/pconfigintrin.h: New file.
24487 * config/i386/wbnoinvdintrin.h: Ditto.
24488 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24490 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24492 2018-03-05 Richard Biener <rguenther@suse.de>
24494 PR tree-optimization/84670
24495 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24497 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24498 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24499 (compute_antic_aux): Only assert the number of values in ANTIC_IN
24500 doesn't grow if all successors (recursively) were visited at least
24503 2018-03-05 Richard Biener <rguenther@suse.de>
24505 PR tree-optimization/84650
24506 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24507 if executed in the loop pipeline.
24509 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24511 * doc/configfiles.texi (Configuration Files): Move info about
24512 conditionalizing $target-protos.h to...
24513 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24514 differs from $target-protos.h.
24516 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24517 Chung-Ju Wu <jasonwucj@gmail.com>
24519 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24520 * config/nds32/nds32-multiple.md (setmemsi): Define.
24521 * config/nds32/nds32-memory-manipulation.c
24522 (nds32_gen_dup_4_byte_to_word_value): New.
24523 (emit_setmem_word_loop): New.
24524 (emit_setmem_byte_loop): New.
24525 (nds32_expand_setmem_loop): New.
24526 (nds32_expand_setmem_loop_v3m): New.
24527 (nds32_expand_setmem_unroll): New.
24528 (nds32_expand_setmem): New.
24530 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24531 Chung-Ju Wu <jasonwucj@gmail.com>
24533 * config/nds32/nds32-memory-manipulation.c
24534 (nds32_emit_load_store): New.
24535 (nds32_emit_post_inc_load_store): New.
24536 (nds32_emit_mem_move): New.
24537 (nds32_emit_mem_move_block): New.
24538 (nds32_expand_movmemsi_loop_unknown_size): New.
24539 (nds32_expand_movmemsi_loop_known_size): New.
24540 (nds32_expand_movmemsi_loop): New.
24541 (nds32_expand_movmemsi_unroll): New.
24542 (nds32_expand_movmemqi): Rename ...
24543 (nds32_expand_movmemsi): ... to this.
24544 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24545 (movmemsi): ... to this.
24546 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24547 (nds32_expand_movmemsi): ... to this.
24549 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24550 Monk Chiang <sh.chiang04@gmail.com>
24551 Chung-Ju Wu <jasonwucj@gmail.com>
24553 * config/nds32/nds32-protos.h
24554 (nds32_expand_load_multiple): New arguments.
24555 (nds32_expand_store_multiple): Ditto.
24556 (nds32_valid_multiple_load_store): Rename ...
24557 (nds32_valid_multiple_load_store_p): ... to this.
24558 * config/nds32/nds32-memory-manipulation.c
24559 (nds32_expand_load_multiple): Refine implementation.
24560 (nds32_expand_store_multiple): Ditto.
24561 * config/nds32/nds32-multiple.md
24562 (load_multiple): Update nds32_expand_load_multiple interface.
24563 (store_multiple): Update nds32_expand_store_multiple interface.
24564 * config/nds32/nds32-predicates.c
24565 (nds32_valid_multiple_load_store): Rename ...
24566 (nds32_valid_multiple_load_store_p): ... to this and refine
24568 * config/nds32/predicates.md
24569 (nds32_load_multiple_and_update_address_operation): New predicate.
24570 (nds32_store_multiple_and_update_address_operation): New predicate.
24572 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24573 Chung-Ju Wu <jasonwucj@gmail.com>
24575 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24576 (combo): New attribute.
24577 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24579 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24581 * config/nds32/nds32.opt: Change -mcmodel= default value.
24583 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24584 Monk Chiang <sh.chiang04@gmail.com>
24585 Chung-Ju Wu <jasonwucj@gmail.com>
24587 * config/nds32/constants.md (unspec_element): New enum.
24588 * config/nds32/constraints.md (Umw): New constraint.
24589 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24590 * config/nds32/nds32-intrinsic.md: Likewise.
24591 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24592 (nds32_valid_smw_lwm_base_p): New.
24593 (nds32_output_smw_single_word): New.
24594 (nds32_output_lmw_single_word): New.
24595 (nds32_expand_unaligned_load): New.
24596 (nds32_expand_unaligned_store): New.
24597 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24598 (nds32_output_smw_single_word): Declare.
24599 (nds32_output_lmw_single_word): Declare.
24600 (nds32_expand_unaligned_load): Declare.
24601 (nds32_expand_unaligned_store): Declare.
24602 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24603 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24604 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24605 NDS32_BUILTIN_UASTORE_DW.
24606 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24609 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
24610 Kito Cheng <kito.cheng@gmail.com>
24611 Chung-Ju Wu <jasonwucj@gmail.com>
24613 * config/nds32/nds32-intrinsic.c
24614 (nds32_expand_builtin_null_ftype_reg): Delete.
24615 (nds32_expand_builtin_reg_ftype_imm): Ditto.
24616 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24617 (nds32_read_argument): New.
24618 (nds32_legitimize_target): Ditto.
24619 (nds32_legitimize_argument): Ditto.
24620 (nds32_check_constant_argument): Ditto.
24621 (nds32_expand_unop_builtin): Ditto.
24622 (nds32_expand_unopimm_builtin): Ditto.
24623 (nds32_expand_binop_builtin): Ditto.
24624 (nds32_builtin_decl_impl): Ditto.
24625 (builtin_description): Ditto.
24626 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24627 (nds32_init_builtins_impl): Ditto.
24628 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24629 (nds32_builtin_decl): New.
24630 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24631 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24633 2018-03-02 Jeff Law <law@redhat.com>
24635 * reorg.c (stop_search_p): Handle DEBUG_INSN.
24636 (redundant_insn, fill_simple_delay_slots): Likewise.
24637 (fill_slots_from_thread): Likewise.
24638 * resource.c (mark_referenced_resources): Likewise.
24639 (mark_set_resources, find_dead_or_set_registers): Likewise.
24641 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24643 * substring-locations.h (format_warning_va): Formatting fix for
24644 ATTRIBUTE_GCC_DIAG.
24645 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24647 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24648 * substring-locations.c: Include intl.h.
24649 (format_warning_va): Turned into small wrapper around
24650 format_warning_n_va, renamed to ...
24651 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24652 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24654 (format_warning_at_substring_n): New function.
24655 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24656 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
24657 format_warning_at_substring with just a shorter name instead of
24658 const function pointer.
24659 (fmtwarn_n): New function.
24660 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24661 appropriate, get rid of all the fmtstr temporaries, move conditionals
24662 with G_() wrapped string literals directly into fmtwarn arguments,
24663 cast dir.len to (int), formatting fixes.
24665 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
24667 * doc/invoke.texi: Remove "Cilk Plus" references.
24669 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24670 Richard Biener <rguenther@suse.de>
24673 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24674 for error or warning attributes if CALL_FROM_THUNK_P is set.
24677 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24680 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24681 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24684 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24685 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24687 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24688 instead of -1U in last predictors element's probability member.
24690 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
24693 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24694 arguments if they are comparable.
24696 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24698 PR tree-optimization/84634
24699 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24700 masks and masked_loop_p with a single loop_masks, making sure it's
24701 null for bb vectorization.
24703 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24705 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24706 (vect_analyze_data_ref_access): Use loop->safe_len rather than
24707 loop->force_vectorize to check whether there is no alias.
24709 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24712 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24714 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24716 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24717 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24718 instead of a loop around prev_real_insn.
24719 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24722 PR inline-asm/84625
24723 * config/i386/i386.c (ix86_print_operand): Use conditional
24724 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24727 2018-03-02 Richard Biener <rguenther@suse.de>
24729 PR tree-optimization/84427
24730 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24731 (bitmap_set_subtract_values): Rewrite to handle multiple
24734 (prune_clobbered_mems): Likewise.
24735 (phi_translate): Take edge instead of pred/phiblock.
24736 (phi_translate_1): Likewise.
24737 (phi_translate_set): Likewise. Insert all translated
24738 exprs for a value into the set, keeping possibly multiple
24739 expressions per value.
24740 (compute_antic_aux): Adjust for phi_translate changes.
24741 When intersecting union the expressions and prune those
24742 not in the final value set, keeping possibly multiple
24743 expressions per value. Do not use value-insertion
24744 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24745 all expressions. Add verification that the value-sets
24746 only shrink during iteration.
24747 (compute_partial_antic_aux): Adjust for the phi_translate changes.
24748 (do_pre_regular_insertion): Likewise.
24749 (do_pre_partial_partial_insertion): Likewise.
24751 2018-03-02 Richard Biener <rguenther@suse.de>
24754 * config/darwin.c (saved_debug_info_level): New static global.
24755 (darwin_asm_lto_start): Disable debug info generation for LTO out.
24756 (darwin_asm_lto_end): Restore debug info generation settings.
24758 2018-03-01 Martin Liska <mliska@suse.cz>
24761 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24762 volatile arguments.
24764 2018-03-01 Richard Biener <rguenther@suse.de>
24767 * dwarf2out.c (gen_variable_die): Properly handle late VLA
24768 type annotation with LTO when debug was disabled at compile-time.
24770 2018-03-01 Matthew Fortune <mfortune@gmail.com>
24772 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24774 (mips_final_postscan_insn): Likewise.
24776 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
24778 PR rtl-optimization/84528
24779 * alias.c (init_alias_target): Add commentary.
24780 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24781 a unique base value if the frame pointer is not eliminated
24782 to the stack pointer.
24784 2018-03-01 Tom de Vries <tom@codesourcery.com>
24786 PR rtl-optimization/83327
24787 * lra-int.h (hard_regs_spilled_into): Declare.
24788 * lra.c (hard_regs_spilled_into): Define.
24789 (init_reg_info): Init hard_regs_spilled_into.
24790 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24791 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24792 (process_bb_lives): Handle hard_regs_spilled_into.
24793 (lra_create_live_ranges_1): Before doing liveness propagation, clear
24794 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24796 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
24798 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24799 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24800 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24801 * config/rs6000/aix72.h: New file.
24803 2018-02-28 Jakub Jelinek <jakub@redhat.com>
24805 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24806 instead of warning_at with conditional singular and plural messages
24810 * stor-layout.c (update_alignment_for_field): For
24811 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24812 && !DECL_PACKED (field), do the alignment update, just use
24813 only desired_align instead of MAX (type_align, desired_align)
24815 (place_field): Don't do known_align < desired_align handling
24816 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24817 is non-NULL, instead do it after rli->prev_field handling and
24818 only if not within a bitfield word. For DECL_PACKED (field)
24819 use type_align of BITS_PER_UNIT.
24821 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
24823 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24824 superfluous parentheses and trailing spaces.
24826 2018-02-28 Richard Biener <rguenther@suse.de>
24828 PR tree-optimization/84584
24829 * graphite-scop-detection.c (scop_detection::add_scop): Discard
24830 SCoPs with fake exit edge.
24832 2018-02-28 Martin Liska <mliska@suse.cz>
24835 * timevar.c (timer::print): Fix format to properly print 100%
24838 2018-02-28 Richard Biener <rguenther@suse.de>
24840 PR middle-end/84607
24841 * genmatch.c (capture_info::walk_match): Do not mark
24842 captured expressions without operands as expr_p given
24843 they act more like predicates and should be subject to
24844 "lost tail" side-effect preserving.
24846 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
24848 PR rtl-optimization/81611
24849 * auto-inc-dec.c (attempt_change): Move dead note from
24850 mem_insn if it's the next use of regno
24851 (find_address): Take address use of reg holding
24852 non-incremented value. Add parm to limit search to the named
24854 (merge_in_block): Attempt to use a mem insn that is the next
24855 use of the original regno.
24857 2018-02-27 Martin Sebor <msebor@redhat.com>
24860 * doc/invoke.texi (-Wmissing-attributes): New option.
24861 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24863 2018-02-27 Martin Sebor <msebor@redhat.com>
24865 PR translation/84207
24866 * diagnostic-core.h (warning_n, error_n, inform_n): Change
24867 n argument to unsigned HOST_WIDE_INT.
24868 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24869 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
24870 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24871 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24873 2018-02-27 Richard Biener <rguenther@suse.de>
24875 PR tree-optimization/84512
24876 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24877 Do not use the estimate returned from record_stmt_cost for
24878 the scalar iteration cost but sum properly using add_stmt_cost.
24880 2018-02-27 Richard Biener <rguenther@suse.de>
24882 PR tree-optimization/84466
24883 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24884 Adjust last change to less strictly validate use operands.
24886 2018-02-27 Martin Liska <mliska@suse.cz>
24888 PR gcov-profile/84548
24889 * gcov.c (process_file): Allow partial overlap and consider it
24890 also as group functions.
24891 (output_lines): Properly calculate range of lines for a group.
24893 2018-02-27 Martin Liska <mliska@suse.cz>
24895 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24896 'ggc' suffixes. Change first column width.
24897 (timer::print): Fix formatting of the column.
24899 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
24901 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24902 preserve inline entry blocks for the sake of debug inline
24903 entry point markers alone.
24904 (remove_unused_locals): Suggest in comments a better place to
24905 force the preservation of inline entry blocks that are
24906 otherwise unused, but do not preserve them.
24908 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24910 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24912 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24915 * config/i386/constraints.md (Bs): Replace
24916 ix86_indirect_branch_register with
24917 TARGET_INDIRECT_BRANCH_REGISTER.
24919 * config/i386/i386.md (indirect_jump): Likewise.
24920 (tablejump): Likewise.
24921 (*sibcall_memory): Likewise.
24922 (*sibcall_value_memory): Likewise.
24923 Peepholes of indirect call and jump via memory: Likewise.
24924 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24925 (*sibcall_value_GOT_32): Likewise.
24926 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24927 (GOT_memory_operand): Likewise.
24928 (call_insn_operand): Likewise.
24929 (sibcall_insn_operand): Likewise.
24930 (GOT32_symbol_operand): Likewise.
24931 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24933 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24935 PR rtl-optimization/83496
24936 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24937 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
24938 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24939 redundant insn, if any.
24940 (relax_delay_slots): Likewise.
24941 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24943 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
24945 PR tree-optimization/83965
24946 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24947 that grouped statements are part of a reduction chain. Return
24948 true if the statement is not marked as a reduction itself but
24949 is part of a group.
24950 (vect_recog_dot_prod_pattern): Don't check whether the statement
24951 is part of a group here.
24952 (vect_recog_sad_pattern): Likewise.
24953 (vect_recog_widen_sum_pattern): Likewise.
24955 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24958 * final.c (rest_of_clean_state): Also look for calls inside sequences.
24960 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24963 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24965 (ix86_output_indirect_function_return): New prototype.
24966 (ix86_split_simple_return_pop_internal): Likewise.
24967 * config/i386/i386.c (indirect_return_via_cx): New.
24968 (indirect_return_via_cx_bnd): Likewise.
24969 (indirect_thunk_name): Handle return va CX_REG.
24970 (output_indirect_thunk_function): Create alias for
24971 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24972 (ix86_output_indirect_jmp): Remove the bool argument.
24973 (ix86_output_indirect_function_return): New function.
24974 (ix86_split_simple_return_pop_internal): Likewise.
24975 * config/i386/i386.md (*indirect_jump): Don't pass false
24976 to ix86_output_indirect_jmp.
24977 (*tablejump_1): Likewise.
24978 (simple_return_pop_internal): Change it to define_insn_and_split.
24979 Call ix86_split_simple_return_pop_internal to split it for
24980 -mfunction-return=.
24981 (simple_return_indirect_internal): Call
24982 ix86_output_indirect_function_return instead of
24983 ix86_output_indirect_jmp.
24985 2018-02-26 Jakub Jelinek <jakub@redhat.com>
24988 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24989 memset and value initialization afterwards.
24991 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
24993 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24995 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24998 * common/config/aarch64/aarch64-common.c
24999 (aarch_option_optimization_table[]): Switch
25000 off fomit-frame-pointer
25002 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25003 Chung-Ju Wu <jasonwucj@gmail.com>
25005 * config/nds32/nds32-multiple.md (load_multiple): Disallow
25007 (store_multiple): Ditto.
25009 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
25011 * config.gcc: Add --with-cpu support for nds32 target.
25012 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
25013 * config/nds32/nds32.opt: Add -mcpu= option.
25015 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
25017 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
25018 isel=yes): Warn for these deprecated options.
25020 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
25022 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
25023 ISA_2_5_MASKS_EMBEDDED.
25025 2018-02-23 Jakub Jelinek <jakub@redhat.com>
25027 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
25028 p->max as pointers rather than using iterative_hash_expr.
25030 2018-02-23 Carl Love <cel@us.ibm.com>
25032 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
25033 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
25035 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
25036 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
25037 P8V_BUILTIN_VEC_VUNSIGNED2.
25039 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
25042 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
25043 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
25045 * lra-constraints.c (curr_insn_transform): Set up
25046 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
25048 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
25049 * lra-eliminations.c (spill_pseudos): Ditto.
25050 (process_insn_for_elimination): Ditto.
25051 * lra-lives.c (reg_early_clobber_p): Use the new macros.
25052 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
25053 LRA_NON_CLOBBERED_ALT.
25055 2018-02-22 Martin Sebor <msebor@redhat.com>
25057 PR tree-optimization/84480
25058 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
25059 to maybe_diag_stxncpy_trunc. Call it.
25060 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
25061 from gimple_fold_builtin_strcpy. Print inlining stack.
25062 (handle_builtin_stxncpy): Print inlining stack.
25063 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
25065 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
25068 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
25069 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
25070 and -fcheck-pointer-bounds are used together.
25071 (indirect_thunk_prefix): New enum.
25072 (indirect_thunk_need_prefix): New function.
25073 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
25074 "_nt" instead of "_bnd" for NOTRACK prefix.
25075 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
25076 (output_indirect_thunk_function): Likewise.
25078 (ix86_code_end): Update output_indirect_thunk_function calls.
25079 (ix86_output_indirect_branch_via_reg): Replace
25080 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
25081 (ix86_output_indirect_branch_via_push): Likewise.
25082 (ix86_output_function_return): Likewise.
25083 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
25084 incompatible with -fcf-protection=branch and
25085 -fcheck-pointer-bounds.
25087 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25090 * config/aarch64/aarch64.c (aarch64_print_address_internal):
25091 Change gcc_assert call to output_operand_lossage.
25093 2018-02-22 Steve Ellcey <sellcey@cavium.com>
25095 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
25097 2018-02-22 DJ Delorie <dj@redhat.com>
25098 Sebastian Perta <sebastian.perta@renesas.com>
25099 Oleg Endo <olegendo@gcc.gnu.org>
25101 * config/rx/rx.c (rx_rtx_costs): New function.
25102 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
25104 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
25106 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
25108 2018-02-22 Martin Liska <mliska@suse.cz>
25111 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
25112 Add "native" as a possible value.
25114 2018-02-22 Martin Liska <mliska@suse.cz>
25117 * config/i386/i386.c (ix86_option_override_internal):
25118 Add "native" as a possible value for -march and -mtune.
25120 2018-02-22 Jakub Jelinek <jakub@redhat.com>
25123 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
25124 to all type variants.
25126 PR tree-optimization/84503
25127 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
25128 width as info->bitpos + info->bitsize - start.
25129 (merged_store_group::merge_overlapping): Simplify width computation.
25130 (check_no_overlap): New function.
25131 (imm_store_chain_info::try_coalesce_bswap): Compute expected
25132 start + width and last_order of the group, fail if check_no_overlap
25134 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
25135 to group if check_no_overlap fails.
25137 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25139 * config/rs6000/altivec.md: Delete contraint arguments to
25140 define_expand, define_split, and define_peephole2, and in
25141 define_insn_and_split if always unused.
25142 * config/rs6000/darwin.md: Ditto.
25143 * config/rs6000/dfp.md: Ditto.
25144 * config/rs6000/rs6000.md: Ditto.
25145 * config/rs6000/sync.md: Ditto.
25146 * config/rs6000/vector.md: Ditto.
25147 * config/rs6000/vsx.md: Ditto.
25149 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
25151 * config/rs6000/altivec.md: Write output control strings as braced
25152 blocks instead of double-quoted strings.
25153 * config/rs6000/darwin.md: Ditto.
25154 * config/rs6000/rs6000.md: Ditto.
25155 * config/rs6000/vector.md: Ditto.
25156 * config/rs6000/vsx.md: Ditto.
25158 2018-02-21 Jason Merrill <jason@redhat.com>
25160 PR c++/84314 - ICE with templates and fastcall attribute.
25161 * attribs.c (build_type_attribute_qual_variant): Remove assert.
25163 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25165 * ipa-cp.c (determine_versionability): Fix comment typos.
25167 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
25170 * ipa-cp.c (determine_versionability): Do not version functions caling
25173 2018-02-21 Martin Liska <mliska@suse.cz>
25176 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
25177 Add "native" as a possible value.
25178 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
25179 the macro when native cpu detection is available.
25181 2018-02-21 Martin Liska <mliska@suse.cz>
25184 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
25185 Add "native" as a possible value.
25186 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
25187 when native cpu detection is available.
25189 2018-02-21 Jakub Jelinek <jakub@redhat.com>
25190 Martin Sebor <msebor@redhat.com>
25192 PR tree-optimization/84478
25193 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
25195 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
25196 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
25197 support which is conservatively correct, for 2 only stay conservative
25198 for maxlen. Formatting and comment capitalization fixes. Add STRICT
25199 argument to the 2 argument get_range_strlen, adjust 6 arg
25200 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
25202 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
25203 (gimple_fold_builtin_strlen): Pass true as last argument to
25206 2018-02-20 Martin Sebor <msebor@redhat.com>
25208 PR middle-end/84095
25209 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25210 (builtin_memref::set_base_and_offset): Same. Handle inner references.
25211 (builtin_memref::builtin_memref): Factor out parts into
25212 set_base_and_offset and call it.
25214 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25216 PR middle-end/84406
25217 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25218 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25219 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
25220 search at the associated MODE_INT.
25222 2018-02-20 Jeff Law <law@redhat.com>
25224 PR middle-end/82123
25225 PR tree-optimization/81592
25226 PR middle-end/79257
25227 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25228 for range data rather than using global data.
25229 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25230 range data rather than using global data.
25231 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25232 pass it to children as needed.
25233 (struct directive::fmtresult): Similarly.
25234 (struct directive::set_width): Similarly.
25235 (struct directive::set_precision): Similarly.
25236 (format_integer, format_directive, parse_directive): Similarly.
25237 (format_none): Accept unnamed vr_values parameter.
25238 (format_percent, format_floating, format_character): Similarly.
25239 (format_string, format_plain): Similarly.
25240 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25241 the EVRP range analyzer for range data rather than using global data.
25242 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25243 gimple-ssa-evrp-analyze.h
25244 (class sprintf_dom_walker): Add after_dom_children member function.
25245 Add evrp_range_analyzer member.
25246 (sprintf_dom_walker::before_dom_children): Call into the EVRP
25247 range analyzer as needed.
25248 (sprintf_dom_walker::after_dom_children): New member function.
25249 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25251 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25252 (evrp_range_analyzer::pop_to_marker): Likewise.
25254 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
25256 PR tree-optimization/84419
25257 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25258 with the required type if its current type is compatible but
25261 2018-02-20 Jakub Jelinek <jakub@redhat.com>
25263 PR middle-end/82004
25264 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25265 after vectorization.
25267 2018-02-20 Martin Liska <mliska@suse.cz>
25270 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25271 possible values if we don't have a hint.
25273 2018-02-20 Martin Liska <mliska@suse.cz>
25277 * final.c (shorten_branches): Build align_tab array with one
25279 * opts.c (finish_options): Add alignment option limit check.
25280 (MAX_CODE_ALIGN): Likewise.
25281 (MAX_CODE_ALIGN_VALUE): Likewise.
25282 * doc/invoke.texi: Document maximum allowed option value for
25283 all -falign-* options.
25285 2018-02-19 Jakub Jelinek <jakub@redhat.com>
25288 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25289 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25290 * var-tracking.c (emit_note_insn_var_location): Remove all references
25291 to NOTE_INSN_CALL_ARG_LOCATION.
25292 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25293 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25294 Use copy_rtx_if_shared.
25295 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25296 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25297 (dwarf2out_var_location): Remove handling of
25298 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25300 * final.c (final_scan_insn): Remove all references to
25301 NOTE_INSN_CALL_ARG_LOCATION.
25302 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
25303 before dumping final insns.
25304 * except.c (emit_note_eh_region_end): Remove all references to
25305 NOTE_INSN_CALL_ARG_LOCATION.
25306 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25307 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25308 * config/arc/arc.c (hwloop_optimize): Likewise.
25309 * config/arm/arm.c (create_fix_barrier): Likewise.
25310 * config/s390/s390.c (s390_chunkify_start): Likewise.
25311 * config/sh/sh.c (find_barrier): Likewise.
25312 * config/i386/i386.c (rest_of_insert_endbranch,
25313 ix86_seh_fixup_eh_fallthru): Likewise.
25314 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25315 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25316 * config/frv/frv.c (frv_function_prologue): Likewise.
25317 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
25319 (note_outside_basic_block_p): Remove all references to
25320 NOTE_INSN_CALL_ARG_LOCATION.
25321 * gengtype.c (adjust_field_rtx_def): Likewise.
25322 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25324 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25325 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25328 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25331 PR tree-optimization/84452
25332 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25333 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25336 2018-02-19 Martin Liska <mliska@suse.cz>
25339 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25341 2018-02-19 Martin Liska <mliska@suse.cz>
25342 Richard Sandiford <richard.sandiford@linaro.org>
25344 PR tree-optimization/82491
25345 * gimple-fold.c (get_base_constructor): Make earlier bail out
25348 2018-02-19 Carl Love <cel@us.ibm.com>
25350 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25351 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25353 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25354 P8V_BUILTIN_VEC_NEG.
25356 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
25358 * config/rl78/rl78.md (movdf): New define expand.
25360 2018-02-19 Martin Liska <mliska@suse.cz>
25363 * doc/invoke.texi: Fix typo.
25364 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25366 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
25368 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25369 handle rs6000_single_float and rs6000_double_float specially for
25372 2018-02-16 Jeff Law <law@redhat.com>
25374 * config/rx/rx.c (add_pop_cfi_notes): New function.;
25375 (pop_regs): Use it.
25377 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25380 * ipa-inline.c (inline_small_functions): Fix a typo.
25382 2018-02-16 Nathan Sidwell <nathan@acm.org>
25384 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25386 2018-02-16 Carl Love <cel@us.ibm.com>
25388 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25389 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25390 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25391 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25392 expansion to P8V_BUILTIN_VEC_FLOAT2.
25394 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
25396 PR rtl-optimization/70023
25397 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25398 src_regno into account.
25400 2018-02-16 Carl Love <cel@us.ibm.com>
25402 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25403 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25404 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25405 * config/rs6000/rs6000.c: Remove case statements for
25406 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25407 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25408 and P9V_BUILTIN_VEC_VINSERT4B.
25409 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25410 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25411 * config/rs6000/vsx.md:
25412 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25415 2018-02-16 Carl Love <cel@us.ibm.com>
25417 * config/rs6000/altivec.h: Add builtin names vec_extract4b
25419 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25421 * config/rs6000/rs6000-c.c: Add the definitions for
25422 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25423 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25424 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25425 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
25426 definition for insert4b and define insn *insert3b_internal.
25427 * doc/extend.texi: Add documentation for vec_extract4b.
25429 2018-02-16 Nathan Sidwell <nathan@acm.org>
25431 * doc/extend.texi (Backwards Compatibility): Mention friend
25432 injection. Note for-scope is deprecated.
25433 * doc/invoke.texi (-ffriend-injection): Deprecate.
25435 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
25437 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25438 that moved to I2, also allow destinations that are a paradoxical
25439 subreg (instead of a normal reg).
25441 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
25444 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25447 2018-02-16 Richard Biener <rguenther@suse.de>
25449 PR tree-optimization/84037
25450 PR tree-optimization/84016
25452 * config/i386/i386.c (ix86_builtin_vectorization_cost):
25453 Adjust vec_construct for the fact we need additional higher latency
25454 128bit inserts for AVX256 and AVX512 vector builds.
25455 (ix86_add_stmt_cost): Scale vector construction cost for
25458 2018-02-16 Richard Biener <rguenther@suse.de>
25460 PR tree-optimization/84417
25461 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25462 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25463 (non_rewritable_lvalue_p): Likewise, use poly-ints.
25465 2018-02-16 Martin Liska <mliska@suse.cz>
25468 * internal-fn.def (ASAN_CHECK): Set proper flags.
25469 (ASAN_MARK): Likewise.
25471 2018-02-16 Julia Koval <julia.koval@intel.com>
25473 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25474 from PTA_CANNONLAKE.
25476 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25479 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25480 Use ++iter rather than iter++ for std::list iterators.
25481 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
25482 defer deleting them until all nodes in the forest are processed. Do
25483 free even leaf nodes. Change to_process into auto_vec.
25486 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25487 * vec.h (vec_default_construct): Use memset instead of placement new
25488 if BROKEN_VALUE_INITIALIZATION is defined.
25489 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25490 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25493 PR rtl-optimization/83723
25494 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25495 * lra.c (lra_substitute_pseudo): Likewise. If true, use
25496 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
25498 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25500 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25502 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
25504 PR rtl-optimization/81443
25505 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25506 from inner REGs to paradoxical SUBREGs.
25508 2018-02-16 Richard Biener <rguenther@suse.de>
25510 PR tree-optimization/84399
25511 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25512 For operands we can analyze at their definition make sure we can
25513 analyze them at each use as well.
25515 2018-02-16 Richard Biener <rguenther@suse.de>
25517 PR tree-optimization/84190
25518 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25519 volatile accesses if the decl isn't volatile.
25521 2018-02-15 Jason Merrill <jason@redhat.com>
25523 PR c++/84314 - ICE with templates and fastcall attribute.
25524 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25525 TYPE_CANONICAL on an existing type.
25527 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25529 PR tree-optimization/84383
25530 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25531 dstoff nor call operand_equal_p if dstbase is NULL.
25533 PR tree-optimization/84334
25534 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25535 also a CONSTANT_CLASS_P, punt.
25537 2018-02-14 Jim Wilson <jimw@sifive.com>
25539 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25540 first SMALL_OPERAND check. New local min_second_step. Move assert
25541 to where locals are set. Add TARGET_RVC support.
25542 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25544 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25546 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25548 2018-02-14 Martin Sebor <msebor@redhat.com>
25550 PR tree-optimization/83698
25551 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25552 arrays constrain the offset range to their bounds.
25553 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25554 (builtin_access::overlap): Avoid setting the size of overlap if it's
25556 (maybe_diag_overlap): Also consider arrays when deciding what values
25557 of offsets to include in diagnostics.
25559 2018-02-14 Martin Sebor <msebor@redhat.com>
25562 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25563 that correspond to the kind of a declaration.
25565 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25568 * config/pa/pa.md: Load address of PIC label using the linkage table
25569 if the label is nonlocal.
25571 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25573 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25574 warning message if user requests -maltivec=be.
25575 * doc/invoke.texi: Document deprecation of -maltivec=be.
25577 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25580 * config/rs6000/rs6000-c.c: Update definitions for
25581 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25582 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25584 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25587 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25588 add _get_ssp intrinsics. Remove argument from
25589 __builtin_ia32_rdssp[d|q].
25590 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25591 * config/i386/i386-builtin.def: Remove argument from
25592 __builtin_ia32_rdssp[d|q].
25593 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25594 ix86_expand_special_args_builtin for _rdssp[d|q].
25595 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25596 Clear register before usage.
25597 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25598 Add documentation for new _get_ssp and _inc_ssp intrinsics.
25600 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
25602 PR tree-optimization/84357
25603 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25604 operand 1 of an ARRAY_REF too.
25606 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
25609 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25610 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25612 (set_of_reg): New struct.
25613 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25614 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25615 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25617 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25618 Split into bitclr, bitset, bitinvert patterns if appropriate.
25619 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25620 use rx_fuse_in_memory_bitop.
25621 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25622 to named insn, correct maximum insn length.
25624 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
25627 * machmode.def: Define a complex mode for PARTIAL_INT.
25628 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25630 * doc/rtl.texi: Document CSPImode.
25631 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25633 (msp430_hard_regno_nregs_with_padding): Likewise.
25635 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
25638 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25640 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
25642 PR rtl-optimization/84169
25643 * combine.c (try_combine): New variable split_i2i3. Set it to true if
25644 we generated a parallel as new i3 and we split that to new i2 and i3
25645 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
25646 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
25647 those to i2, not i1. Partially rewrite this scan code.
25649 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25652 * stor-layout.c (place_field): For variable length fields, adjust
25653 offset_align afterwards not just based on the field's alignment,
25654 but also on the size.
25656 PR middle-end/84309
25657 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25658 of exps and logs in the use_exp2 case.
25660 2018-02-13 Jeff Law <law@redhat.com>
25662 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25663 entry for "vector".
25665 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25668 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
25672 * common.opt (gas-loc-support, gas-locview-support): New.
25673 (ginline-points, ginternal-reset-location-views): New.
25674 * doc/invoke.texi: Document them. Use @itemx where intended.
25675 (gvariable-location-views): Adjust.
25676 * target.def (reset_location_view): New.
25677 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25678 (TARGET_RESET_LOCATION_VIEW): New.
25679 * doc/tm.texi: Rebuilt.
25680 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25681 (dwarf2out_default_as_locview_support): New.
25682 (output_asm_line_debug_info): Use option variables.
25683 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25684 (output_loc_list): Likewise.
25685 (add_high_low_attributes): Check option variables.
25686 Don't output entry view attribute in strict mode.
25687 (gen_inlined_subroutine_die): Check option variables.
25688 (dwarf2out_inline_entry): Likewise.
25689 (init_sections_and_labels): Likewise.
25690 (dwarf2out_early_finish): Likewise.
25691 (maybe_reset_location_view): New, from...
25692 (dwarf2out_var_location): ... here. Call it.
25693 * debug.h (dwarf2out_default_as_loc_support): Declare.
25694 (dwarf2out_default_as_locview_support): Declare.
25695 * hooks.c (hook_int_rtx_insn_0): New.
25696 * hooks.h (hook_int_rtx_insn_0): Declare.
25697 * toplev.c (process_options): Take -gas-loc-support and
25698 -gas-locview-support from dwarf2out. Enable
25699 -gvariable-location-views by default only with locview
25700 assembler support. Enable -ginternal-reset-location-views by
25701 default only if the target defines the corresponding hook.
25702 Enable -ginline-points by default if location views are
25703 enabled; force it disabled if statement frontiers are
25705 * tree-inline.c (expand_call_inline): Check option variables.
25706 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25708 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
25710 PR tree-optimization/84321
25711 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25712 handling. Also check whether the anti-range contains any values
25713 that satisfy the mask; switch to a VR_RANGE if not.
25715 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
25718 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25720 2018-02-13 Martin Jambor <mjambor@suse.cz>
25723 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25724 of call statements, also set location of a load to a temporary.
25726 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
25728 * config/rl78/rl78.c (add_vector_labels): New function.
25729 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25730 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25731 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25732 which checks that no arguments are passed.
25733 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25734 * doc/extend.texi: Documentation for the new attribute.
25736 2018-02-13 Andreas Schwab <schwab@suse.de>
25738 * config/riscv/linux.h (CPP_SPEC): Define.
25740 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25743 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25744 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25745 OPTION_MASK_ISA_AES as first argument to def_builtin_const
25746 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25747 instead of OPTION_MASK_ISA_PCLMUL as first argument to
25748 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25749 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25750 temporarily for AES and PCLMUL builtins.
25752 PR tree-optimization/84339
25753 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25754 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25757 PR middle-end/84309
25758 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25759 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25760 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25762 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25764 * omp-simd-clone.h: New file.
25765 * omp-simd-clone.c: Include omp-simd-clone.h.
25766 (expand_simd_clones): No longer static.
25767 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25768 cgraph.h and omp-simd-clone.h.
25769 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25770 (vect_recog_widen_shift_pattern): Formatting fix.
25771 (vect_pattern_recog_1): Don't check optab for calls.
25774 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25775 operands[2] into a REG before using gen_lowpart on it.
25777 2018-02-12 Jeff Law <law@redhat.com>
25780 * config/sh/sh.c (find_barrier): Consider a sibling call
25783 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25784 successfully back substituting a reg.
25786 2018-02-12 Richard Biener <rguenther@suse.de>
25788 PR tree-optimization/84037
25789 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25790 parameter, move visited init to caller.
25791 (vect_slp_analyze_operations): Separate cost from validity
25792 check, initialize visited once for all instances.
25793 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25795 * tree-vect-stmts.c (vect_model_simple_cost): Make early
25797 (vect_model_promotion_demotion_cost): Likewise.
25798 (vectorizable_bswap): Guard cost modeling with !slp_node
25799 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25801 (vectorizable_call): Likewise.
25802 (vectorizable_conversion): Likewise.
25803 (vectorizable_assignment): Likewise.
25804 (vectorizable_shift): Likewise.
25805 (vectorizable_operation): Likewise.
25806 (vectorizable_store): Likewise.
25807 (vectorizable_load): Likewise.
25808 (vectorizable_condition): Likewise.
25809 (vectorizable_comparison): Likewise.
25811 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
25814 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25815 (ASAN_MARK): Fix fnspec to account for return value, change pointer
25816 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25818 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25820 PR middle-end/83665
25821 * params.def (inline-min-speedup): Increase from 8 to 15.
25822 (max-inline-insns-auto): Decrease from 40 to 30.
25823 * ipa-split.c (consider_split): Add some buffer for function to
25824 be considered inlining candidate.
25825 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25828 2018-02-12 Richard Biener <rguenther@suse.de>
25830 PR tree-optimization/84037
25831 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25832 matched stmts if we cannot swap the non-matched ones.
25834 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25836 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25837 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25838 _mm_maskz_scalef_round_ss): New intrinsics.
25839 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25840 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25841 __builtin_ia32_scalefss_round): Remove.
25842 (__builtin_ia32_scalefsd_mask_round,
25843 __builtin_ia32_scalefss_mask_round): New intrinsics.
25844 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25845 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25846 ((match_operand:VF_128 2 "<round_nimm_predicate>"
25847 "<round_constraint>")): Changed to ...
25848 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25849 "<round_scalar_constraint>")): ... this.
25850 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25851 %0, %1, %2<round_op3>}"): Changed to ...
25852 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25853 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25854 %2<round_scalar_mask_op3>}"): ... this.
25855 * config/i386/subst.md (round_scalar_nimm_predicate): New.
25857 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25859 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25860 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25861 (_mm_maskz_sqrt_round_ss): New intrinsics.
25862 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25863 (__builtin_ia32_sqrtsd_mask_round)
25864 (__builtin_ia32_sqrtss_mask_round): New builtins.
25865 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25866 (__builtin_ia32_sqrtss_round): Remove.
25867 (__builtin_ia32_sqrtsd_mask_round)
25868 (__builtin_ia32_sqrtss_mask_round): New builtins.
25869 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25870 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25871 ((match_operand:VF_128 1 "vector_operand"
25872 "xBm,<round_constraint>")): Changed to ...
25873 ((match_operand:VF_128 1 "vector_operand"
25874 "xBm,<round_scalar_constraint>")): ... this.
25875 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25876 %0, %2, %<iptr>1<round_op3>}): Changed to ...
25877 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25878 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25879 %<iptr>1<round_scalar_mask_op3>}): ... this.
25880 ((set_attr "prefix" "<round_prefix>")): Changed to ...
25881 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25883 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
25886 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25887 Cast vec_cmpeq result to correct type.
25888 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25889 Cast vec_cmpgt result to correct type.
25891 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
25893 * final.c (final_scan_insn_1): Renamed from...
25894 (final_scan_insn): ... this. New wrapper, to recover
25895 seen from the outermost call in recursive ones.
25896 * config/sparc/sparc.c (output_return): Drop seen from call.
25897 (output_sibcall): Likewise.
25898 * config/visium/visium.c (output_branch): Likewise.
25900 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
25902 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25905 2018-02-10 Alan Modra <amodra@gmail.com>
25908 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25909 Specify LR as an input.
25911 2018-02-10 Jakub Jelinek <jakub@redhat.com>
25914 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25915 remove_member_access_dummy_vars): New functions.
25916 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25917 lower_omp_1, execute_lower_omp): Use them.
25919 PR rtl-optimization/84308
25920 * shrink-wrap.c (spread_components): Release todo vector.
25922 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
25924 PR rtl-optimization/57193
25925 * ira-color.c (struct allocno_color_data): Add member
25926 conflict_allocno_hard_prefs.
25927 (update_conflict_allocno_hard_prefs): New.
25928 (bucket_allocno_compare_func): Add a preference based on
25929 conflict_allocno_hard_prefs.
25930 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25931 (color_allocnos): Remove a dead code. Initiate
25932 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
25934 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25937 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25938 constraint from =wa to wa. Avoid a subreg on the output operand,
25939 instead use a pseudo and subreg it in a move.
25940 (p9_xxbrd_<mode>): Changed to ...
25941 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25942 (p9_xxbrd_v2df): New expander.
25943 (p9_xxbrw_<mode>): Changed to ...
25944 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25945 (p9_xxbrw_v4sf): New expander.
25947 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25949 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25951 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
25954 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25955 multiply in 32-bit mode.
25956 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25957 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25960 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25962 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25963 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25964 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25965 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25967 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
25970 * dwarf2out.c (is_trivial_indirect_ref): New function.
25971 (dwarf2out_late_global_decl): Do not generate a location
25972 attribute for variables that have a non-trivial DECL_VALUE_EXPR
25973 and that are not defined in the current unit.
25975 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25977 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25978 instead of a libcall for UNORDERED.
25980 2018-02-09 Tamar Christina <tamar.christina@arm.com>
25983 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25984 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25986 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25989 * config/s390/s390.c (s390_set_current_function): Invoke
25990 s390_indirect_branch_settings also if fndecl didn't change.
25992 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25994 * config/rs6000/rs6000.md (blockage): Set length to zero.
25996 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25998 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
26000 2018-02-09 Jakub Jelinek <jakub@redhat.com>
26003 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
26004 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
26008 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
26009 PARALLEL incoming that failed vt_get_decl_and_offset check.
26011 PR middle-end/84237
26012 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
26013 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
26015 (get_variable_section): For decls in named .bss* sections pass true as
26016 second argument to bss_initializer_p.
26018 2018-02-09 Marek Polacek <polacek@redhat.com>
26019 Jakub Jelinek <jakub@redhat.com>
26022 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
26023 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
26024 Sync some changes from cxx_fold_indirect_ref.
26026 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
26028 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
26030 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
26031 (BLOCK_INLINE_ENTRY_LABEL): New.
26032 (dwarf2out_var_location): Disregard inline entry markers.
26033 (inline_entry_data): New struct.
26034 (inline_entry_data_hasher): New hashtable type.
26035 (inline_entry_data_hasher::hash): New.
26036 (inline_entry_data_hasher::equal): New.
26037 (inline_entry_data_table): New variable.
26038 (add_high_low_attributes): Add DW_AT_entry_pc and
26039 DW_AT_GNU_entry_view attributes if a pending entry is found
26040 in inline_entry_data_table. Add old entry_pc attribute only
26041 if debug nonbinding markers are disabled.
26042 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
26043 markers are enabled.
26044 (block_within_block_p, dwarf2out_inline_entry): New.
26045 (dwarf2out_finish): Check that no entries remained in
26046 inline_entry_data_table.
26047 * final.c (reemit_insn_block_notes): Handle inline entry notes.
26048 (final_scan_insn, notice_source_line): Likewise.
26049 (rest_of_clean_state): Skip inline entry markers.
26050 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
26052 * gimple.c (gimple_build_debug_inline_entry): New.
26053 * gimple.h (enum gimple_debug_subcode): Add
26054 GIMPLE_DEBUG_INLINE_ENTRY.
26055 (gimple_build_debug_inline_entry): Declare.
26056 (gimple_debug_inline_entry_p): New.
26057 (gimple_debug_nonbind_marker_p): Adjust.
26058 * insn-notes.def (INLINE_ENTRY): New.
26059 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
26060 inline entry marker notes.
26061 (print_insn): Likewise.
26062 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
26063 (INSN_DEBUG_MARKER_KIND): Likewise.
26064 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
26065 * tree-inline.c (expand_call_inline): Build and insert
26066 debug_inline_entry stmt.
26067 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
26068 inline entry blocks early, if nonbind markers are enabled.
26069 (dump_scope_block): Dump fragment info.
26070 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
26071 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
26072 (gimple_build_debug_inline_entry): New.
26073 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
26074 Enable/disable inline entry points too.
26075 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
26076 (DEBUG_INSN): Describe inline entry markers.
26078 * common.opt (gvariable-location-views): New.
26079 (gvariable-location-views=incompat5): New.
26080 * config.in: Rebuilt.
26081 * configure: Rebuilt.
26082 * configure.ac: Test assembler for view support.
26083 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
26084 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
26085 * dwarf2out.c (var_loc_view): New typedef.
26086 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
26087 (dwarf2out_locviews_in_attribute): New.
26088 (dwarf2out_locviews_in_loclist): New.
26089 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
26090 (enum dw_line_info_opcode): Add LI_adv_address.
26091 (struct dw_line_info_table): Add view.
26092 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
26093 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
26094 (zero_view_p): New variable.
26095 (ZERO_VIEW_P): New macro.
26096 (output_asm_line_debug_info): New.
26097 (struct var_loc_node): Add view.
26098 (add_AT_view_list, AT_loc_list): New.
26099 (add_var_loc_to_decl): Add view param. Test it against last.
26100 (new_loc_list): Add view params. Record them.
26101 (AT_loc_list_ptr): Handle loc and view lists.
26102 (view_list_to_loc_list_val_node): New.
26103 (print_dw_val): Handle dw_val_class_view_list.
26104 (size_of_die): Likewise.
26105 (value_format): Likewise.
26106 (loc_list_has_views): New.
26107 (gen_llsym): Set vl_symbol too.
26108 (maybe_gen_llsym, skip_loc_list_entry): New.
26109 (dwarf2out_maybe_output_loclist_view_pair): New.
26110 (output_loc_list): Output view list or entries too.
26111 (output_view_list_offset): New.
26112 (output_die): Handle dw_val_class_view_list.
26113 (output_dwarf_version): New.
26114 (output_compilation_unit_header): Use it.
26115 (output_skeleton_debug_sections): Likewise.
26116 (output_rnglists, output_line_info): Likewise.
26117 (output_pubnames, output_aranges): Update version comments.
26118 (output_one_line_info_table): Output view numbers in asm comments.
26119 (dw_loc_list): Determine current endview, pass it to new_loc_list.
26120 Call maybe_gen_llsym.
26121 (loc_list_from_tree_1): Adjust.
26122 (add_AT_location_description): Create view list attribute if
26123 needed, check it's absent otherwise.
26124 (convert_cfa_to_fb_loc_list): Adjust.
26125 (maybe_emit_file): Call output_asm_line_debug_info for test.
26126 (dwarf2out_var_location): Reset views as needed. Precompute
26127 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
26128 attribute. Set view.
26129 (new_line_info_table): Reset next view.
26130 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
26131 (dwarf2out_source_line): Likewise. Output view resets and labels to
26132 the assembler, or select appropriate line info opcodes.
26133 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
26134 (optimize_string_length): Catch it. Adjust.
26135 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
26136 dw_val_class_view_list, and remove it if no longer needed.
26137 (hash_loc_list): Hash view numbers.
26138 (loc_list_hasher::equal): Compare them.
26139 (optimize_location_lists): Check whether a view list symbol is
26140 needed, and whether the locview attribute is present, and
26141 whether they match. Remove the locview attribute if no longer
26143 (index_location_lists): Call skip_loc_list_entry for test.
26144 (dwarf2out_finish): Call output_asm_line_debug_info for test.
26145 Use output_dwarf_version.
26146 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
26147 (struct dw_val_node): Add val_view_list.
26148 * final.c (SEEN_NEXT_VIEW): New.
26149 (set_next_view_needed): New.
26150 (clear_next_view_needed): New.
26151 (maybe_output_next_view): New.
26152 (final_start_function): Rename to...
26153 (final_start_function_1): ... this. Take pointer to FIRST,
26154 add SEEN parameter. Emit param bindings in the initial view.
26155 (final_start_function): Reintroduce SEEN-less interface.
26156 (final): Rename to...
26157 (final_1): ... this. Take SEEN parameter. Output final pending
26158 next view at the end.
26159 (final): Reintroduce seen-less interface.
26160 (final_scan_insn): Output pending next view before switching
26161 sections or ending a block. Mark the next view as needed when
26162 outputting variable locations. Notify debug backend of section
26163 changes, and of location view changes.
26164 (rest_of_handle_final): Adjust.
26165 * toplev.c (process_options): Autodetect value for debug variable
26166 location views option. Warn on incompat5 without -gdwarf-5.
26167 * doc/invoke.texi (gvariable-location-views): New.
26168 (gvariable-location-views=incompat5): New.
26169 (gno-variable-location-views): New.
26171 2018-02-08 David Malcolm <dmalcolm@redhat.com>
26173 PR tree-optimization/84136
26174 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
26175 that the result of find_edge is non-NULL.
26177 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26180 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
26181 storing integer register in SImode. Fix cost of 256 and 512
26182 byte aligned SSE register store.
26184 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
26186 * config/i386/i386.c (ix86_multiplication_cost): Fix
26187 multiplication cost for TARGET_AVX512DQ.
26189 2018-02-08 Marek Polacek <polacek@redhat.com>
26191 PR tree-optimization/84238
26192 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
26195 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26197 PR tree-optimization/84265
26198 * tree-vect-stmts.c (vectorizable_store): Don't treat
26199 VMAT_CONTIGUOUS accesses as grouped.
26200 (vectorizable_load): Likewise.
26202 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26204 PR tree-optimization/81635
26205 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
26206 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26207 (test_round_for_mask): New functions.
26208 (wide_int_cc_tests): Call test_round_for_mask.
26209 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26210 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26211 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26212 range returned by get_range_info.
26214 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26217 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26218 * symtab.c: Include builtins.h
26219 (symtab_node::output_to_lto_symbol_table_p): Move here
26220 from lto-streamer-out.c:output_symbol_p.
26221 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26222 (output_symbol_p): Move all logic to symtab.c
26223 (produce_symtab): Update.
26225 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26227 * config/s390/s390-opts.h (enum indirect_branch): Define.
26228 * config/s390/s390-protos.h (s390_return_addr_from_memory)
26229 (s390_indirect_branch_via_thunk)
26230 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26231 (enum s390_indirect_branch_type): Define.
26232 * config/s390/s390.c (struct s390_frame_layout, struct
26233 machine_function): Remove.
26234 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26235 (indirect_branch_table_label_no, indirect_branch_table_name):
26237 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26238 (enum s390_indirect_branch_option): Define.
26239 (s390_return_addr_from_memory): New function.
26240 (s390_handle_string_attribute): New function.
26241 (s390_attribute_table): Add new attribute handler.
26242 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26243 (s390_indirect_branch_via_thunk): New function.
26244 (s390_indirect_branch_via_inline_thunk): New function.
26245 (s390_function_ok_for_sibcall): When jumping via thunk disallow
26246 sibling call optimization for non z10 compiles.
26247 (s390_emit_call): Force indirect branch target to be a single
26248 register. Add r1 clobber for non-z10 compiles.
26249 (s390_emit_epilogue): Emit return jump via return_use expander.
26250 (s390_reorg): Handle JUMP_INSNs as execute targets.
26251 (s390_option_override_internal): Perform validity checks for the
26252 new command line options.
26253 (s390_indirect_branch_attrvalue): New function.
26254 (s390_indirect_branch_settings): New function.
26255 (s390_set_current_function): Invoke s390_indirect_branch_settings.
26256 (s390_output_indirect_thunk_function): New function.
26257 (s390_code_end): Implement target hook.
26258 (s390_case_values_threshold): Implement target hook.
26259 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26261 * config/s390/s390.h (struct s390_frame_layout)
26262 (struct machine_function): Move here from s390.c.
26263 (TARGET_INDIRECT_BRANCH_NOBP_RET)
26264 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26265 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26266 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26267 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26268 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26269 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26270 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26271 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26272 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26273 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26274 (mnemonic attribute): Add values which aren't recognized
26276 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26277 pattern for branch conversion. Fix mnemonic attribute.
26278 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26279 indirect branch via thunk if requested.
26280 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26281 ("*indirect_jump"): Disable for branch conversion using out of
26283 ("indirect_jump_via_thunk<mode>_z10")
26284 ("indirect_jump_via_thunk<mode>")
26285 ("indirect_jump_via_inlinethunk<mode>_z10")
26286 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26287 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26288 ("casesi_jump_via_inlinethunk<mode>_z10")
26289 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26290 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26291 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26292 ("*indirect2_jump"): Disable for branch conversion.
26293 ("casesi_jump"): Turn into expander and expand patterns for branch
26295 ("return_use"): New expander.
26296 ("*return"): Emit return via thunk and rename it to ...
26297 ("*return<mode>"): ... this one.
26298 * config/s390/s390.opt: Add new options and and enum for the
26301 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
26303 * lra-constraints.c (match_reload): Unconditionally use
26304 gen_lowpart_SUBREG, rather than selecting between that
26305 and equivalent gen_rtx_SUBREG code.
26307 2018-02-08 Richard Biener <rguenther@suse.de>
26309 PR tree-optimization/84233
26310 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26311 changed flag instead of boguously re-using phi_inserted.
26313 2018-02-08 Martin Jambor <mjambor@suse.cz>
26315 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26316 static local variables.
26318 2018-02-08 Richard Biener <rguenther@suse.de>
26320 PR tree-optimization/84278
26321 * tree-vect-stmts.c (vectorizable_store): When looking for
26322 smaller vector types to perform grouped strided loads/stores
26323 make sure the mode is supported by the target.
26324 (vectorizable_load): Likewise.
26326 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26328 * config/aarch64/aarch64.c (aarch64_components_for_bb):
26329 Increase LDP/STP opportunities by adding adjacent callee-saves.
26331 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
26333 PR rtl-optimization/84068
26334 PR rtl-optimization/83459
26335 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26337 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
26339 PR tree-optimization/84224
26340 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26341 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26342 non-zero arguments.
26344 2018-02-07 Iain Sandoe <iain@codesourcery.com>
26347 * config/rs6000/altivec.md (*restore_world): Remove LR use.
26348 * config/rs6000/predicates.md (restore_world_operation): Adjust op
26349 count, remove one USE.
26351 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
26353 * doc/install.texi (Configuration): Document the
26354 --with-long-double-format={ibm,ieee} PowerPC configuration
26358 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26359 Convert from define_expand to be define_insn_and_split. Rework
26360 float/double/_Float128 conversions to QI/HI/SImode to work with
26361 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
26362 conversions to QI/HImode types did a store and then a load to
26363 truncate the value. For conversions to VSX registers, don't split
26364 the insn, instead emit the code directly. Use the code iterator
26365 any_fix to combine signed and unsigned conversions.
26366 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26367 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26368 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26369 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26370 (fix_<mode>di2_hw): Likewise.
26371 (fixuns_<mode>di2_hw): Likewise.
26372 (fix_<mode>si2_hw): Likewise.
26373 (fixuns_<mode>si2_hw): Likewise.
26374 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26375 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26376 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26377 fix<uns>_trunc<SFDF:mode>si2_p8.
26378 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26379 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26380 (fix<uns>_<mode>_mem): Likewise.
26381 (fctiw<u>z_<mode>_mem): Likewise.
26382 (fix<uns>_<mode>_mem): Likewise.
26383 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26384 the register allocator from doing a direct move to the GPRs to do
26385 a store, and instead use the ISA 3.0 store byte/half-word from
26386 vector register instruction. For IEEE 128-bit floating point,
26387 also optimize stores of 32-bit ints.
26388 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26390 2018-02-07 Alan Hayward <alan.hayward@arm.com>
26392 * genextract.c (push_pathstr_operand): New function to support
26394 (walk_rtx): Call push_pathstr_operand.
26395 (print_path): Support [a-zA-Z].
26397 2018-02-07 Richard Biener <rguenther@suse.de>
26399 PR tree-optimization/84037
26400 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26401 (cse_and_gimplify_to_preheader): Declare.
26402 (vect_get_place_in_interleaving_chain): Likewise.
26403 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26405 (_loop_vec_info::~_loop_vec_info): Delete it.
26406 (cse_and_gimplify_to_preheader): New function.
26407 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26408 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26409 (vectorizable_load): Likewise. For grouped stores always base
26410 the IV on the first element.
26411 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26412 condition before gimplifying.
26414 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26416 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26417 *DIV_EXPR and *MOD_EXPR.
26419 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
26422 * config/i386/i386.c (ix86_option_override_internal): Mask out
26423 the CF_SET bit when checking -fcf-protection.
26425 2018-02-07 Tom de Vries <tom@codesourcery.com>
26428 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26431 2018-02-07 Richard Biener <rguenther@suse.de>
26433 PR tree-optimization/84204
26434 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26437 PR tree-optimization/84205
26438 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26439 special-case isl_ast_op_zdiv_r.
26441 PR tree-optimization/84223
26442 * graphite-scop-detection.c (gather_bbs::before_dom_children):
26443 Only add conditions from within the region.
26444 (gather_bbs::after_dom_children): Adjust.
26446 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
26449 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26450 * config/avr/avr.md: Only post-reload split REG-REG moves if
26451 either register is GENERAL_REG_P.
26453 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26455 PR tree-optimization/84235
26456 * tree-ssa-scopedtables.c
26457 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26458 if the subtraction is performed in floating point type where NaNs are
26459 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26460 build 1. Formatting fix.
26462 2018-02-06 Jakub Jelinek <jakub@redhat.com>
26465 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26466 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26467 and skip it regardless of bb boundaries. Use CALL_P macro,
26468 don't test INSN_P (insn) together with CALL_P or JUMP_P check
26469 unnecessarily, formatting fix.
26471 2018-02-06 Michael Collison <michael.collison@arm.com>
26473 * config/arm/thumb2.md:
26474 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26475 (*thumb_mov_notscc): Ditto.
26477 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
26480 * config/rs6000/rs6000.md (su code attribute): Use "u" for
26481 unsigned_fix, not "s".
26483 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26485 * configure.ac (gcc_fn_eh_frame_ro): New function.
26486 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26487 correct .eh_frame permissions.
26488 * configure: Regenerate.
26490 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
26492 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26493 irrelevant options.
26495 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26497 * config/rs6000/rs6000.c (rs6000_option_override_internal):
26498 Display warning message for -mno-speculate-indirect-jumps.
26500 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
26502 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26504 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26506 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26508 PR tree-optimization/84225
26509 * tree-eh.c (find_trapping_overflow): Only call
26510 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26512 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26515 * config/i386/i386.c: Reimplement the check of possible options
26516 -mibt/-mshstk conbination. Change error messages.
26517 * doc/invoke.texi: Fix a typo: remove extra '='.
26519 2018-02-06 Marek Polacek <polacek@redhat.com>
26521 PR tree-optimization/84228
26522 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26524 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26527 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26528 emitted arch directives.
26529 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26530 __ARM_FEATURE_COPROC before changing architectures.
26532 2018-02-06 Richard Biener <rguenther@suse.de>
26534 * config/i386/i386.c (print_reg): Fix typo.
26535 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26537 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26539 * configure: Regenerate.
26541 2018-02-05 Martin Sebor <msebor@redhat.com>
26543 PR tree-optimization/83369
26544 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26547 2018-02-05 Martin Liska <mliska@suse.cz>
26549 * doc/invoke.texi: Cherry-pick upstream r323995.
26551 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26553 * ira.c (ira_init_register_move_cost): Adjust comment.
26555 2018-02-05 Martin Liska <mliska@suse.cz>
26557 PR gcov-profile/84137
26558 * doc/gcov.texi: Fix typo in documentation.
26560 2018-02-05 Martin Liska <mliska@suse.cz>
26562 PR gcov-profile/83879
26563 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26564 using dlopen functionality.
26566 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26568 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26569 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26570 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26571 _mm_maskz_range_round_ss): New intrinsics.
26572 (__builtin_ia32_rangesd128_round)
26573 (__builtin_ia32_rangess128_round): Remove.
26574 (__builtin_ia32_rangesd128_mask_round,
26575 __builtin_ia32_rangess128_mask_round): New builtins.
26576 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26577 __builtin_ia32_rangess128_round): Remove.
26578 (__builtin_ia32_rangesd128_mask_round,
26579 __builtin_ia32_rangess128_mask_round): New builtins.
26580 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26581 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26582 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26583 "<round_saeonly_constraint>")): Changed to ...
26584 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26585 "<round_saeonly_scalar_constraint>")): ... this.
26586 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26587 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26588 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26589 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26590 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26592 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
26594 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26596 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26597 Remove all values except native, 8540 and 8548.
26599 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
26601 * config/i386/i386.c (ix86_output_function_return): Pass
26602 INVALID_REGNUM, instead of -1, as invalid register number to
26603 indirect_thunk_name and output_indirect_thunk.
26605 2018-02-02 Julia Koval <julia.koval@intel.com>
26607 * config.gcc: Add -march=icelake.
26608 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26609 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26610 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26611 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26612 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26613 (processor_target_table): Add icelake.
26614 (ix86_option_override_internal): Handle new PTAs.
26615 (get_builtin_code_for_version): Handle icelake.
26616 (M_INTEL_COREI7_ICELAKE): New.
26617 (fold_builtin_cpu): Handle icelake.
26618 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26619 * doc/invoke.texi: Add -march=icelake.
26621 2018-02-02 Julia Koval <julia.koval@intel.com>
26623 * config/i386/i386.c (ix86_option_override_internal): Change flags type
26624 to wide_int_bitmask.
26625 * wide-int-bitmask.h: New.
26627 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26630 * config/i386/i386.md: Replace Pmode with word_mode in
26631 builtin_setjmp_setup and builtin_longjmp to support x32.
26633 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
26637 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26639 (rs6000_supported_cpu_names): New static variable.
26640 (linux_cpu_translation_table): Likewise.
26641 (elf_platform) <cpu>: Define new static variable and use it.
26642 Translate kernel AT_PLATFORM name to canonical name if needed.
26643 Error if platform name is unknown.
26645 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
26648 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26650 2018-02-01 Jeff Law <law@redhat.com>
26653 * config/i386/i386.c (release_scratch_register_on_entry): Add new
26654 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
26655 the scratch if RELEASE_VIA_POP is false.
26656 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26657 If we have to save a temporary register, decrement SIZE appropriately.
26658 Pass new arguments to release_scratch_register_on_entry.
26659 (ix86_adjust_stack_and_probe): Likewise.
26660 (ix86_emit_probe_stack_range): Pass new arguments to
26661 release_scratch_register_on_entry.
26663 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
26665 PR rtl-optimization/84157
26666 * combine.c (change_zero_ext): Use REG_P predicate in
26667 front of HARD_REGISTER_P predicate.
26669 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
26671 * config/avr/avr.c (avr_option_override): Move disabling of
26672 -fdelete-null-pointer-checks to...
26673 * common/config/avr/avr-common.c (avr_option_optimization_table):
26676 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26678 PR tree-optimization/81635
26679 * tree-data-ref.c (split_constant_offset_1): For types that
26680 wrap on overflow, try to use range info to prove that wrapping
26683 2018-02-01 Renlin Li <renlin.li@arm.com>
26686 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26687 TAILCALL_ADDR_REGS.
26688 (aarch64_register_move_cost): Likewise.
26689 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26690 TAILCALL_ADDR_REGS.
26691 (REG_CLASS_NAMES): Likewise.
26692 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26693 TAILCALL_ADDR_REGS. Remove IP registers.
26694 * config/aarch64/aarch64.md (Ucs): Update register constraint.
26696 2018-02-01 Richard Biener <rguenther@suse.de>
26698 * domwalk.h (dom_walker::dom_walker): Add additional constructor
26699 for specifying RPO order and allow NULL for that.
26700 * domwalk.c (dom_walker::dom_walker): Likewise.
26701 (dom_walker::walk): Handle NULL RPO order.
26702 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26704 (rewrite_update_dom_walker): Likewise.
26705 (mark_def_dom_walker): Likewise.
26707 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26709 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26710 (aarch64_maybe_expand_sve_subreg_move): Declare.
26711 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26712 * config/aarch64/predicates.md (aarch64_any_register_operand): New
26714 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26715 that are semantically a reverse operation.
26716 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26717 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26718 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26720 (aarch64_can_change_mode_class): For big-endian, forbid changes
26721 between two SVE modes if they have different element sizes.
26723 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26725 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26726 the TImode handling for big-endian targets.
26728 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26730 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26731 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
26733 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26734 Remove BSWAP handing for big-endian targets and use the form of
26735 LD1RQ appropariate for the mode.
26737 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26739 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26740 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26741 duplicated element.
26743 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26746 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26747 check for operands that need to go through aarch64_sve_reload_be.
26749 2018-02-01 Jakub Jelinek <jakub@redhat.com>
26751 PR tree-optimization/81661
26752 PR tree-optimization/84117
26753 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26754 * tree-eh.c: Include gimplify.h.
26755 (find_trapping_overflow, replace_trapping_overflow,
26756 rewrite_to_non_trapping_overflow): New functions.
26757 * tree-vect-loop.c: Include tree-eh.h.
26758 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26759 * tree-data-ref.c: Include tree-eh.h.
26760 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26762 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
26764 PR rtl-optimization/84123
26765 * combine.c (change_zero_ext): Check if hard register satisfies
26766 can_change_dest_mode before calling gen_lowpart_SUBREG.
26768 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
26771 * ira.c (ira_init_register_move_cost): Remove assert.
26773 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26775 PR rtl-optimization/84071
26776 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26777 * doc/tm.texi: Regenerate.
26779 2018-01-31 Richard Biener <rguenther@suse.de>
26781 PR tree-optimization/84132
26782 * tree-data-ref.c (analyze_miv_subscript): Properly
26783 check whether evolution_function_is_affine_multivariate_p
26784 before calling gcd_of_steps_may_divide_p.
26786 2018-01-31 Julia Koval <julia.koval@intel.com>
26789 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26790 * config/i386/i386.md (rdpid_rex64) New.
26791 (rdpid): Make 32bit only.
26793 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
26796 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26797 an IDENTIFIER_NODE for FUNCTION_TYPE's.
26799 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26802 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26804 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26806 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26808 PR rtl-optimization/84071
26809 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26810 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26812 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26814 * config/arc/arc.c (arc_handle_aux_attribute): New function.
26815 (arc_attribute_table): Add 'aux' attribute.
26816 (arc_in_small_data_p): Consider aux like variables.
26817 (arc_is_aux_reg_p): New function.
26818 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26819 (arc_get_aux_arg): New function.
26820 (prepare_move_operands): Handle aux-register access.
26821 (arc_handle_aux_attribute): New function.
26822 * doc/extend.texi (ARC Variable attributes): Add subsection.
26824 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26826 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26827 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26828 (arc_attribute_table): Add 'uncached' attribute.
26829 (arc_print_operand): Print '.di' flag for uncached memory
26831 (arc_in_small_data_p): Do not consider for small data the uncached
26833 (arc_is_uncached_mem_p): New function.
26834 * config/arc/predicates.md (compact_store_memory_operand): Check
26835 for uncached memory accesses.
26836 (nonvol_nonimm_operand): Likewise.
26837 * doc/extend.texi (ARC Type Attribute): New subsection.
26839 2018-01-31 Jakub Jelinek <jakub@redhat.com>
26842 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26843 falign-loops=): Add Optimization flag.
26845 2018-01-30 Jeff Law <law@redhat.com>
26848 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26849 INT_REGISTERS_SAVED. Check it prior to calling
26850 get_scratch_register_on_entry.
26851 (ix86_adjust_stack_and_probe): Similarly.
26852 (ix86_emit_probe_stack_range): Similarly.
26853 (ix86_expand_prologue): Corresponding changes.
26855 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26858 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26859 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26861 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
26864 * lra-constraints.c (curr_insn_transform): Process AND in the
26867 2018-01-30 Jakub Jelinek <jakub@redhat.com>
26869 PR rtl-optimization/83986
26870 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26871 dependence against last_pending_memory_flush in addition to
26872 pending_jump_insns.
26874 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
26876 PR tree-optimization/81611
26877 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26880 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26883 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26886 2018-01-30 Richard Biener <rguenther@suse.de>
26887 Jakub Jelinek <jakub@redhat.com>
26889 PR tree-optimization/84111
26890 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26891 inner loops added during recursion, as they don't have up-to-date
26894 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26897 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26898 (can_inline_edge_by_limits_p): ... here.
26899 (can_early_inline_edge_p, check_callers,
26900 update_caller_keys, update_callee_keys, recursive_inlining,
26901 add_new_edges_to_heap, speculation_useful_p,
26902 inline_small_functions,
26903 inline_small_functions, flatten_function,
26904 inline_to_all_callers_1): Update.
26906 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26908 * profile-count.c (profile_count::combine_with_ipa_count): Handle
26911 2018-01-30 Richard Biener <rguenther@suse.de>
26913 PR tree-optimization/83008
26914 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26915 invariant and constant vector uses in stmts when they need
26916 more than one stmt.
26918 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26921 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26922 * configure: Regenerate.
26924 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26926 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26928 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26929 Use gen_rtx_REG rather than gen_lowpart.
26931 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26933 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26934 rather than 0 when creating partial subregs.
26936 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26938 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26941 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
26944 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26945 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26946 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26947 flags. This restores the settings used before the 2017-07-24.
26948 Turning off pre increment/decrement/modify allows IVOPTS to
26949 optimize DF/SF loops where the index is an int.
26951 2018-01-29 Richard Biener <rguenther@suse.de>
26952 Kelvin Nilsen <kelvin@gcc.gnu.org>
26955 * tree-vect-stmts.c (vectorizable_call): Don't call
26956 targetm.vectorize_builtin_md_vectorized_function if callee is
26959 2018-01-22 Carl Love <cel@us.ibm.com>
26961 * doc/extend.tex: Fix typo in second arg in
26962 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26964 2018-01-29 Richard Biener <rguenther@suse.de>
26966 PR tree-optimization/84086
26967 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26968 (flush_ssaname_freelist): When SSA names were released reset
26969 the SCEV hash table.
26971 2018-01-29 Richard Biener <rguenther@suse.de>
26973 PR tree-optimization/84057
26974 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26975 removed paths when removing edges.
26977 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
26979 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26980 -mfunction-return=@var{choice}.
26982 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
26984 PR diagnostic/84034
26985 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26986 Handle CR like TAB.
26987 (layout::print_source_line): Likewise.
26988 (test_get_line_width_without_trailing_whitespace): Add test cases.
26990 2018-01-27 Jakub Jelinek <jakub@redhat.com>
26992 PR middle-end/84040
26993 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26996 2018-01-26 Jim Wilson <jimw@sifive.com>
26998 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
27000 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
27003 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27005 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
27006 and CMP + SUB-immediate -> SUBS.
27008 2018-01-26 Martin Sebor <msebor@redhat.com>
27010 PR tree-optimization/83896
27011 * tree-ssa-strlen.c (get_string_len): Rename...
27012 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
27013 Avoid assuming length is constant.
27014 (handle_char_store): Use HOST_WIDE_INT for string length.
27016 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
27019 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
27020 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
27022 2018-01-26 Richard Biener <rguenther@suse.de>
27024 PR rtl-optimization/84003
27025 * dse.c (record_store): Only record redundant stores when
27026 the earlier store aliases at least all accesses the later one does.
27028 2018-01-26 Jakub Jelinek <jakub@redhat.com>
27030 PR rtl-optimization/83985
27031 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
27032 REG_CFA_RESTORE insns.
27033 (delete_unmarked_insns): Don't ignore separate shrink wrapping
27034 REG_CFA_RESTORE insns here.
27037 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
27038 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
27040 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27042 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
27043 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
27044 (arc_init): Likewise.
27045 (arc_override_options): Likewise.
27046 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
27048 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
27050 * config/arc/arc.h (TARGET_DBNZ): Define.
27051 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
27052 properly set the tune attribute.
27053 (dbnz): Use TARGET_DBNZ guard.
27054 * config/arc/arc.opt (mtune): Add core3 option.
27056 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27058 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
27059 recognize new pic like addresses.
27060 (arc_delegitimize_address): Clean up.
27062 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27064 * config/arc/arc-arches.def: Option mrf16 valid for all
27066 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
27067 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
27068 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
27069 * config/arc/arc-tables.opt: Regenerate.
27070 * config/arc/arc.c (arc_conditional_register_usage): Handle
27071 reduced register file case.
27072 (arc_file_start): Set must have build attributes.
27073 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
27074 mrf16 option value.
27075 * config/arc/arc.opt (mrf16): Add new option.
27076 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
27077 * config/arc/genmultilib.awk: Handle new mrf16 option.
27078 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
27079 * config/arc/t-multilib: Regenerate.
27080 * doc/invoke.texi (ARC Options): Document mrf16 option.
27082 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27084 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
27085 * config/arc/arc.c (arc_handle_secure_attribute): New function.
27086 (arc_attribute_table): Add 'secure_call' attribute.
27087 (arc_print_operand): Print secure call operand.
27088 (arc_function_ok_for_sibcall): Don't optimize tail calls when
27090 (arc_is_secure_call_p): New function. * config/arc/arc.md
27091 (call_i): Add support for sjli instruction.
27092 (call_value_i): Likewise.
27093 * config/arc/constraints.md (Csc): New constraint.
27095 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
27096 John Eric Martin <John.Martin@emmicro-us.com>
27098 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
27099 * config/arc/arc.c (_arc_jli_section): New struct.
27100 (arc_jli_section): New type.
27101 (rc_jli_sections): New static variable.
27102 (arc_handle_jli_attribute): New function.
27103 (arc_attribute_table): Add jli_always and jli_fixed attribute.
27104 (arc_file_end): New function.
27105 (TARGET_ASM_FILE_END): Define.
27106 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
27107 (arc_add_jli_section): New function.
27108 (jli_call_scan): Likewise.
27109 (arc_reorg): Call jli_call_scan.
27110 (arc_output_addsi): Remove 'S' from printing asm operand.
27111 (arc_is_jli_call_p): New function.
27112 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
27114 (movhi_insn): Likewise.
27115 (movsi_insn): Likewise.
27116 (movsi_set_cc_insn): Likewise.
27117 (loadqi_update): Likewise.
27118 (load_zeroextendqisi_update): Likewise.
27119 (load_signextendqisi_update): Likewise.
27120 (loadhi_update): Likewise.
27121 (load_zeroextendhisi_update): Likewise.
27122 (load_signextendhisi_update): Likewise.
27123 (loadsi_update): Likewise.
27124 (loadsf_update): Likewise.
27125 (movsicc_insn): Likewise.
27126 (bset_insn): Likewise.
27127 (bxor_insn): Likewise.
27128 (bclr_insn): Likewise.
27129 (bmsk_insn): Likewise.
27130 (bicsi3_insn): Likewise.
27131 (cmpsi_cc_c_insn): Likewise.
27132 (movsi_ne): Likewise.
27133 (movsi_cond_exec): Likewise.
27134 (clrsbsi2): Likewise.
27135 (norm_f): Likewise.
27145 (call_i): Remove 'S' asm letter, add jli instruction.
27146 (call_value_i): Likewise.
27147 * config/arc/arc.op (mjli-always): New option.
27148 * config/arc/constraints.md (Cji): New constraint.
27149 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
27151 (subsf3_fpx): Likewise.
27152 (mulsf3_fpx): Likewise.
27153 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
27155 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
27156 function attrbutes.
27157 * doc/invoke.texi (ARC): Document mjli-always option.
27159 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
27161 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
27162 avoid addition with 0 and use incw and decw where possible.
27164 2018-01-26 Richard Biener <rguenther@suse.de>
27166 PR tree-optimization/81082
27167 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27168 association if it requires casting to unsigned.
27169 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27170 from fold_plusminus_mult_expr to catch important cases late when
27171 range info is available.
27173 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27175 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
27176 * configure.ac (hidden_linkonce): New test.
27177 * configure: Regenerate.
27178 * config.in: Regenerate.
27180 2018-01-26 Julia Koval <julia.koval@intel.com>
27182 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
27183 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
27184 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
27185 _mm_mask_bitshuffle_epi64_mask): Fix type.
27186 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
27187 USI_FTYPE_V4DI_V4DI_USI): Remove.
27188 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
27189 __builtin_ia32_vpshufbitqmb256_mask,
27190 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
27191 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
27192 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
27194 2018-01-26 Alan Modra <amodra@gmail.com>
27197 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
27198 UNSPEC_VBPERMQ. Sort other unspecs.
27200 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
27202 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
27204 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
27206 PR middle-end/83055
27207 * predict.c (drop_profile): Do not push/pop cfun; update also
27209 (handle_missing_profiles): Fix logic looking for zero profiles.
27211 2018-01-25 Jakub Jelinek <jakub@redhat.com>
27213 PR middle-end/83977
27214 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27215 on functions with #pragma omp declare simd or functions with simd
27217 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27218 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27219 Remove trailing \n from warning_at calls.
27221 2018-01-25 Tom de Vries <tom@codesourcery.com>
27224 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27225 for neutered workers.
27227 2018-01-24 Joseph Myers <joseph@codesourcery.com>
27230 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27231 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27233 2018-01-24 Jeff Law <law@redhat.com>
27236 * i386.c (get_probe_interval): Move to earlier point.
27237 (ix86_compute_frame_layout): If -fstack-clash-protection and
27238 the frame is larger than the probe interval, then use pushes
27239 to save registers rather than reg->mem moves.
27240 (ix86_expand_prologue): Remove conditional for int_registers_saved
27243 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
27246 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27247 min/max for never referenced object.
27249 2018-01-24 Jakub Jelinek <jakub@redhat.com>
27251 PR middle-end/83977
27252 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27254 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27255 attributes from DECL_ATTRIBUTES (decl) without affecting
27256 DECL_ATTRIBUTES (current_function_decl).
27257 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27258 functions with non-NULL DECL_ABSTRACT_ORIGIN.
27260 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
27262 PR tree-optimization/83979
27263 * fold-const.c (fold_comparison): Use constant_boolean_node
27264 instead of boolean_{true,false}_node.
27266 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
27268 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27271 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27273 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27274 Simplify the clause that sets the length attribute.
27275 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27276 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27277 clause that sets the length attribute.
27278 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27280 2018-01-24 Tom de Vries <tom@codesourcery.com>
27283 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27284 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27285 Add strict parameter.
27286 (prevent_branch_around_nothing): Insert dummy insn between branch to
27287 label and label with no ptx insn inbetween.
27288 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27290 2018-01-24 Tom de Vries <tom@codesourcery.com>
27293 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27294 for neutered threads in warp.
27295 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27297 2018-01-24 Richard Biener <rguenther@suse.de>
27299 PR tree-optimization/83176
27300 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27303 2018-01-24 Richard Biener <rguenther@suse.de>
27305 PR tree-optimization/82819
27306 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27307 code generating pluses that are no-ops in the target precision.
27309 2018-01-24 Richard Biener <rguenther@suse.de>
27311 PR middle-end/84000
27312 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27314 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27316 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27317 to merge probabilities.
27318 * predict.c (probably_never_executed): Also mark as cold functions
27319 with global 0 profile and guessed local profile.
27320 * profile-count.c (profile_probability::combine_with_count): New
27322 * profile-count.h (profile_probability::operator*,
27323 profile_probability::operator*=, profile_probability::operator/,
27324 profile_probability::operator/=): Reduce precision to adjusted
27325 and set value to guessed on contradictory divisions.
27326 (profile_probability::combine_with_freq): Remove.
27327 (profile_probability::combine_wiht_count): Declare.
27328 (profile_count::force_nonzero):: Set to adjusted.
27329 (profile_count::probability_in):: Set quality to adjusted.
27330 * tree-ssa-tail-merge.c (replace_block_by): Use
27331 combine_with_count.
27333 2018-01-23 Andrew Waterman <andrew@sifive.com>
27334 Jim Wilson <jimw@sifive.com>
27336 * config/riscv/riscv.c (riscv_stack_boundary): New.
27337 (riscv_option_override): Set riscv_stack_boundary. Handle
27338 riscv_preferred_stack_boundary_arg.
27339 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27340 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27341 (STACK_BOUNDARY): Set to riscv_stack_boundary.
27342 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27343 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27344 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27346 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
27349 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27350 of struct ix86_frame.
27351 (ix86_expand_epilogue): Likewise. Add a local variable for
27352 the reg_save_offset field in struct ix86_frame.
27354 2018-01-23 Bin Cheng <bin.cheng@arm.com>
27356 PR tree-optimization/82604
27357 * tree-loop-distribution.c (enum partition_kind): New enum item
27358 PKIND_PARTIAL_MEMSET.
27359 (partition_builtin_p): Support above new enum item.
27360 (generate_code_for_partition): Ditto.
27361 (compute_access_range): Differentiate cases that equality can be
27362 proven at all loops, the innermost loops or no loops.
27363 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27364 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
27365 (finalize_partitions, distribute_loop): Don't fuse partition of
27366 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27367 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27368 parloop is enabled.
27370 2018-01-23 Martin Liska <mliska@suse.cz>
27372 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27373 order to ignore the predictor.
27374 (PRED_POLYMORPHIC_CALL): Likewise.
27375 (PRED_RECURSIVE_CALL): Likewise.
27377 2018-01-23 Martin Liska <mliska@suse.cz>
27379 * tree-profile.c (tree_profiling): Print function header to
27380 aware reader which function we are working on.
27381 * value-prof.c (gimple_find_values_to_profile): Do not print
27382 not interesting value histograms.
27384 2018-01-23 Martin Liska <mliska@suse.cz>
27386 * profile-count.h (enum profile_quality): Add
27387 profile_uninitialized as the first value. Do not number values
27388 as they are zero based.
27389 (profile_count::verify): Update sanity check.
27390 (profile_probability::verify): Likewise.
27392 2018-01-23 Nathan Sidwell <nathan@acm.org>
27394 * doc/invoke.texi (ffor-scope): Deprecate.
27396 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27398 PR tree-optimization/83510
27399 * domwalk.c (set_all_edges_as_executable): New function.
27400 (dom_walker::dom_walker): Convert bool param
27401 "skip_unreachable_blocks" to enum reachability. Move setup of
27402 edge flags to set_all_edges_as_executable and only do it when
27403 reachability is REACHABLE_BLOCKS.
27404 * domwalk.h (enum dom_walker::reachability): New enum.
27405 (dom_walker::dom_walker): Convert bool param
27406 "skip_unreachable_blocks" to enum reachability.
27407 (set_all_edges_as_executable): New decl.
27408 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
27409 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27411 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27412 but converting true to REACHABLE_BLOCKS.
27413 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27415 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27416 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27417 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27419 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27420 if check_all_array_refs will be called.
27422 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27424 * tree.c (selftest::test_location_wrappers): Add more test
27427 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27429 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27430 (selftest::test_bit_in_range): Likewise.
27432 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27435 * doc/sourcebuild.texi (vect_float): Say that the selector
27436 only describes the situation when -funsafe-math-optimizations is on.
27437 (vect_float_strict): Document.
27439 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27441 PR tree-optimization/83965
27442 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27443 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27444 instead of checking only for a reduction.
27445 (vect_recog_widen_sum_pattern): Likewise.
27447 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27449 * predict.c (probably_never_executed): Only use precise profile info.
27450 (compute_function_frequency): Skip after inlining hack since we now
27451 have quality checking.
27453 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27455 * profile-count.h (profile_probability::very_unlikely,
27456 profile_probability::unlikely, profile_probability::even): Set
27457 precision to guessed.
27459 2018-01-23 Richard Biener <rguenther@suse.de>
27461 PR tree-optimization/83963
27462 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27463 Properly terminate dominator walk when crossing the exit edge not
27464 when visiting its source block.
27466 2018-01-23 Jakub Jelinek <jakub@redhat.com>
27469 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27470 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27472 2018-01-22 Jakub Jelinek <jakub@redhat.com>
27474 PR tree-optimization/83957
27475 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
27476 semicolon after for body surrounded by braces.
27478 PR tree-optimization/83081
27479 * profile-count.h (profile_probability::split): New method.
27480 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27481 Use profile_probability::split.
27482 (do_compare_rtx_and_jump): Fix adjustment of probabilities
27483 when splitting a single conditional jump into 2.
27485 2018-01-22 David Malcolm <dmalcolm@redhat.com>
27487 PR tree-optimization/69452
27488 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27491 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27493 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27494 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27495 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27497 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27499 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27501 * config/rl78/rl78.md (movdi): New define_expand.
27502 * config/rl78/rl78.c (rl78_split_movdi): New function.
27504 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27507 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27509 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27510 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27511 128-bit to produce an UNSPEC move to get the double word with the
27512 signbit and then a shift directly to do signbit.
27513 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27514 implementation with a new version that just does either a direct
27515 move or a regular move. Move memory interface to separate insns.
27516 Move insns so they are next to the expander.
27517 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27518 with signbit move. Split big and little endian case.
27519 (signbit<mode>2_dm_mem_le): Likewise.
27520 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27521 (signbit<mode>2_dm2): Likewise.
27523 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27525 * config/rl78/rl78.md (anddi3): New define_expand.
27527 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27529 * config/rl78/rl78.md (umindi3): New define_expand.
27531 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27533 * config/rl78/rl78.md (smindi3): New define_expand.
27535 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27537 * config/rl78/rl78.md (smaxdi3): New define_expand.
27539 2018-01-22 Carl Love <cel@us.ibm.com>
27541 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27542 LVX_V1TI): Add macro expansion.
27543 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27544 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27545 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27546 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27547 Change check to determine if the instruction is a byte reversing
27548 entry. Fix typo in comment.
27549 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27550 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27551 Add def_builtin calls for new builtins.
27552 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27553 Add define_insn expansion.
27555 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27557 * config/rl78/rl78.md (umaxdi3): New define_expand.
27559 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27561 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27562 for non-QImode registers.
27564 2018-01-22 Richard Biener <rguenther@suse.de>
27566 PR tree-optimization/83963
27567 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27568 including the loop exit block.
27569 (scop_detection::merge_sese): Likewise.
27570 (scop_detection::add_scop): Do it here instead.
27572 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27574 * doc/sourcebuild.texi (arm_softfloat): Document.
27576 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27579 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27580 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27581 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27583 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27584 David Edelsohn <dje.gcc@gmail.com>
27587 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27588 Change "crset eq" to "crset 2".
27589 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27590 (*call_indirect_aix<mode>_nospec): Likewise.
27591 (*call_value_indirect_aix<mode>_nospec): Likewise.
27592 (*call_indirect_elfv2<mode>_nospec): Likewise.
27593 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27594 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27595 change assembly output from . to $.
27596 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27597 (indirect_jump<mode>_nospec): Change assembly output from . to $.
27598 (*tablejump<mode>_internal1_nospec): Likewise.
27600 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
27603 * config/sh/sh_optimize_sett_clrt.cc:
27604 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27606 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
27608 PR tree-optimization/83940
27609 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27610 offset_dt to vect_constant_def rather than vect_unknown_def_type.
27611 (vect_check_load_store_mask): Add a mask_dt_out parameter and
27612 use it to pass back the definition type.
27613 (vect_check_store_rhs): Likewise rhs_dt_out.
27614 (vect_build_gather_load_calls): Add a mask_dt argument and use
27615 it instead of a call to vect_is_simple_use.
27616 (vectorizable_store): Update calls to vect_check_load_store_mask
27617 and vect_check_store_rhs. Use the dt returned by the latter instead
27618 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
27619 instead of calls to vect_is_simple_use. Pass the scalar rather
27620 than the vector operand to vect_is_simple_use when handling
27621 second and subsequent copies of an rhs value.
27622 (vectorizable_load): Update calls to vect_check_load_store_mask
27623 and vect_build_gather_load_calls. Use the cached mask_dt and
27624 gs_info.offset_dt instead of calls to vect_is_simple_use.
27626 2018-01-20 Jakub Jelinek <jakub@redhat.com>
27628 PR middle-end/83945
27629 * tree-emutls.c: Include gimplify.h.
27630 (lower_emutls_2): New function.
27631 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27632 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27633 it before further processing.
27636 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27637 UINTVAL (trueop1) instead of INTVAL (op1).
27639 2018-01-19 Jakub Jelinek <jakub@redhat.com>
27643 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27644 INCOMING_FRAME_SP_OFFSET if not defined.
27645 (scan_trace): Add ENTRY argument. If true and
27646 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27647 emit a note to adjust the CFA offset.
27648 (create_cfi_notes): Adjust scan_trace callers.
27649 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27650 INCOMING_FRAME_SP_OFFSET in the CIE.
27651 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27652 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27654 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27655 * doc/tm.texi: Regenerated.
27657 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27659 PR rtl-optimization/83147
27660 * lra-constraints.c (remove_inheritance_pseudos): Use
27661 lra_substitute_pseudo_within_insn.
27663 2018-01-19 Tom de Vries <tom@codesourcery.com>
27664 Cesar Philippidis <cesar@codesourcery.com>
27667 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27669 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
27672 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27673 spaces for function labels.
27675 2018-01-19 Martin Liska <mliska@suse.cz>
27677 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27678 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27679 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27680 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27681 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27682 (PRED_CONST_RETURN): Change from 69 to 65.
27683 (PRED_NULL_RETURN): Change from 91 to 71.
27684 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27685 (PRED_LOOP_GUARD): Change from 66 to 73.
27687 2018-01-19 Martin Liska <mliska@suse.cz>
27689 * predict.c (predict_insn_def): Add new assert.
27690 (struct branch_predictor): Change type to signed integer.
27691 (test_prediction_value_range): Amend test to cover
27692 PROB_UNINITIALIZED.
27693 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27694 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27695 (PRED_LOOP_ITERATIONS_MAX): Likewise.
27696 (PRED_LOOP_IV_COMPARE): Likewise.
27697 * predict.h (PROB_UNINITIALIZED): Define new constant.
27699 2018-01-19 Martin Liska <mliska@suse.cz>
27701 * predict.c (dump_prediction): Add new format for
27702 analyze_brprob.py script which is enabled with -details
27704 * profile-count.h (precise_p): New function.
27706 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27708 PR tree-optimization/83922
27709 * tree-vect-loop.c (vect_verify_full_masking): Return false if
27710 there are no statements that need masking.
27711 (vect_active_double_reduction_p): New function.
27712 (vect_analyze_loop_operations): Use it when handling phis that
27713 are not in the loop header.
27715 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27717 PR tree-optimization/83914
27718 * tree-vect-loop.c (vectorizable_induction): Don't convert
27719 init_expr or apply the peeling adjustment for inductions
27720 that are nested within the vectorized loop.
27722 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27724 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27727 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27731 * function.h (gimplify_parameters): Add gimple_seq * argument.
27732 * function.c: Include gimple.h and options.h.
27733 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27734 for the added local temporaries if needed.
27735 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27736 if there are any parameter cleanups, wrap whole body into a
27737 try/finally with the cleanups.
27739 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
27742 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27743 Use GET_MODE_CLASS for scalar floating point.
27745 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27749 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27750 Fix call of call_cgraph_insertion_hooks.
27752 2018-01-18 Martin Sebor <msebor@redhat.com>
27754 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27756 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27759 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27762 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
27765 * common.opt: (-ffile-prefix-map): New option.
27766 * opts.c (common_handle_option): Defer it.
27767 * opts-global.c (handle_common_deferred_options): Handle it.
27768 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27769 * file-prefix-map.h: New file.
27770 (remap_debug_filename, add_debug_prefix_map): ...here.
27771 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27772 * final.c (debug_prefix_map, add_debug_prefix_map
27773 remap_debug_filename): Move to...
27774 * file-prefix-map.c: New file.
27775 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27776 generalize, get rid of alloca(), use strrchr() instead of strchr().
27777 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27778 Implement in terms of add_prefix_map().
27779 (remap_macro_filename, remap_debug_filename): Implement in term of
27781 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27782 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27783 * dbxout.c: Include file-prefix-map.h.
27784 * varasm.c: Likewise.
27785 * vmsdbgout.c: Likewise.
27786 * xcoffout.c: Likewise.
27787 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27788 * doc/cppopts.texi (-fmacro-prefix-map): Document.
27789 * doc/invoke.texi (-ffile-prefix-map): Document.
27790 (-fdebug-prefix-map): Update description.
27792 2018-01-18 Martin Liska <mliska@suse.cz>
27794 * config/i386/i386.c (indirect_thunk_name): Document that also
27796 (output_indirect_thunk): Document why both instructions
27797 (pause and lfence) are generated.
27799 2018-01-18 Richard Biener <rguenther@suse.de>
27801 PR tree-optimization/83887
27802 * graphite-scop-detection.c
27803 (scop_detection::get_nearest_dom_with_single_entry): Remove.
27804 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27805 (scop_detection::merge_sese): Re-implement with a flood-fill
27806 algorithm that properly finds a SESE region if it exists.
27808 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27811 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27812 pointer_diff optimizations use view_convert instead of convert.
27814 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27816 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27817 Generate different code for -mno-speculate-indirect-jumps.
27818 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27819 (*call_indirect_aix<mode>): Disable for
27820 -mno-speculate-indirect-jumps.
27821 (*call_indirect_aix<mode>_nospec): New define_insn.
27822 (*call_value_indirect_aix<mode>): Disable for
27823 -mno-speculate-indirect-jumps.
27824 (*call_value_indirect_aix<mode>_nospec): New define_insn.
27825 (*sibcall_nonlocal_sysv<mode>): Generate different code for
27826 -mno-speculate-indirect-jumps.
27827 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27829 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
27831 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27832 long double type, set the flags for noting the default long double
27833 type, even if we don't pass or return a long double type.
27835 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
27838 * ipa-inline.c (flatten_function): Do not overwrite final inlining
27841 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
27843 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27844 support for merge[hl].
27845 (fold_mergehl_helper): New helper function.
27846 (tree-vector-builder.h): New #include for tree_vector_builder usage.
27847 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27848 (altivec_vmrglw_direct): Add xxmrglw insn.
27850 2018-01-17 Andrew Waterman <andrew@sifive.com>
27852 * config/riscv/riscv.c (riscv_conditional_register_usage): If
27853 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27855 2018-01-17 David Malcolm <dmalcolm@redhat.com>
27858 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27859 call the lto_location_cache before reading the
27860 DECL_SOURCE_LOCATION of the types.
27862 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
27863 Richard Sandiford <richard.sandiford@linaro.org>
27865 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27866 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27867 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27868 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27869 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27871 * config/aarch64/constraints.md (aarch64_movti_operand):
27873 * config/aarch64/predicates.md (Uti): Add new constraint.
27875 2018-01-17 Carl Love <cel@us.ibm.com>
27877 * config/rs6000/vsx.md (define_expand xl_len_r,
27878 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27879 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27881 (define_expand, define_insn): Move the shift left from the
27882 define_insn to the define_expand for lxvl and stxvl instructions.
27883 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27884 and XL_LEN_R definitions to PURE.
27886 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
27888 * config/i386/i386.c (indirect_thunk_name): Declare regno
27889 as unsigned int. Compare regno with INVALID_REGNUM.
27890 (output_indirect_thunk): Ditto.
27891 (output_indirect_thunk_function): Ditto.
27892 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
27893 in the call to output_indirect_thunk_function.
27895 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
27897 PR middle-end/83884
27898 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27899 rather than the size of inner_type to determine the stack slot size
27900 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27902 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
27905 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27908 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
27910 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27911 endian Linux systems to optionally enable multilibs for selecting
27912 the long double type if the user configured an explicit type.
27913 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27914 have no long double multilibs if not defined.
27915 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27916 warn if the user used -mabi={ieee,ibm}longdouble and we built
27917 multilibs for long double.
27918 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27919 appropriate multilib option.
27920 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27922 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27923 for building long double multilibs.
27924 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27926 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
27928 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27931 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27933 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27936 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27939 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27942 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27944 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27945 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27947 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
27949 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27950 different rtl trees depending on TARGET_64BIT.
27951 (rs6000_gen_lvx): Likewise.
27953 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27955 * config/visium/visium.md (nop): Tweak comment.
27956 (hazard_nop): Likewise.
27958 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27960 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27961 -mspeculate-indirect-jumps.
27962 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27963 for -mno-speculate-indirect-jumps.
27964 (*call_indirect_elfv2<mode>_nospec): New define_insn.
27965 (*call_value_indirect_elfv2<mode>): Disable for
27966 -mno-speculate-indirect-jumps.
27967 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27968 (indirect_jump): Emit different RTL for
27969 -mno-speculate-indirect-jumps.
27970 (*indirect_jump<mode>): Disable for
27971 -mno-speculate-indirect-jumps.
27972 (*indirect_jump<mode>_nospec): New define_insn.
27973 (tablejump): Emit different RTL for
27974 -mno-speculate-indirect-jumps.
27975 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27976 (tablejumpsi_nospec): New define_expand.
27977 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27978 (tablejumpdi_nospec): New define_expand.
27979 (*tablejump<mode>_internal1): Disable for
27980 -mno-speculate-indirect-jumps.
27981 (*tablejump<mode>_internal1_nospec): New define_insn.
27982 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27985 2018-01-16 Artyom Skrobov tyomitch@gmail.com
27987 * caller-save.c (insert_save): Drop unnecessary parameter. All
27990 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27991 Richard Biener <rguenth@suse.de>
27994 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27995 return early, inline manually is_gimple_sizepos. Make sure if we
27996 call gimplify_expr we don't end up with a gimple constant.
27997 * tree.c (variably_modified_type_p): Don't return true for
27998 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
27999 * gimplify.h (is_gimple_sizepos): Remove.
28001 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28003 PR tree-optimization/83857
28004 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
28005 vectorizable_live_operation for pure SLP statements.
28006 (vectorizable_live_operation): Handle PHIs.
28008 2018-01-16 Richard Biener <rguenther@suse.de>
28010 PR tree-optimization/83867
28011 * tree-vect-stmts.c (vect_transform_stmt): Precompute
28012 nested_in_vect_loop_p since the scalar stmt may get invalidated.
28014 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28017 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
28018 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
28019 If off is not INTEGER_CST, issue a may not be aligned warning
28020 rather than isn't aligned. Use isn%'t rather than isn't.
28021 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
28023 <case MULT_EXPR>: Improve the case when bottom and one of the
28024 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
28025 operand, in that case check if the other operand is multiple of
28026 bottom divided by the INTEGER_CST operand.
28028 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28031 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
28032 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
28033 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
28034 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
28035 * config/pa/pa.c (pa_function_arg_advance): Likewise.
28036 (pa_function_arg, pa_arg_partial_bytes): Likewise.
28037 (pa_function_arg_size): New function.
28039 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28041 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
28042 in a separate statement.
28044 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
28046 PR tree-optimization/83847
28047 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
28048 group gathers and scatters.
28050 2018-01-16 Jakub Jelinek <jakub@redhat.com>
28052 PR rtl-optimization/86620
28053 * params.def (max-sched-ready-insns): Bump minimum value to 1.
28055 PR rtl-optimization/83213
28056 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
28057 to last if both are JUMP_INSNs.
28059 PR tree-optimization/83843
28060 * gimple-ssa-store-merging.c
28061 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
28062 store_immediate_info for bswap/nop orig_stores.
28064 2018-01-15 Andrew Waterman <andrew@sifive.com>
28066 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
28068 <UDIV>: Increase cost if !TARGET_DIV.
28070 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
28072 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
28073 (define_attr "cr_logical_3op"): New.
28074 (cceq_ior_compare): Adjust.
28075 (cceq_ior_compare_complement): Adjust.
28076 (*cceq_rev_compare): Adjust.
28077 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
28078 (is_cracked_insn): Adjust.
28079 (insn_must_be_first_in_group): Adjust.
28080 * config/rs6000/40x.md: Adjust.
28081 * config/rs6000/440.md: Adjust.
28082 * config/rs6000/476.md: Adjust.
28083 * config/rs6000/601.md: Adjust.
28084 * config/rs6000/603.md: Adjust.
28085 * config/rs6000/6xx.md: Adjust.
28086 * config/rs6000/7450.md: Adjust.
28087 * config/rs6000/7xx.md: Adjust.
28088 * config/rs6000/8540.md: Adjust.
28089 * config/rs6000/cell.md: Adjust.
28090 * config/rs6000/e300c2c3.md: Adjust.
28091 * config/rs6000/e500mc.md: Adjust.
28092 * config/rs6000/e500mc64.md: Adjust.
28093 * config/rs6000/e5500.md: Adjust.
28094 * config/rs6000/e6500.md: Adjust.
28095 * config/rs6000/mpc.md: Adjust.
28096 * config/rs6000/power4.md: Adjust.
28097 * config/rs6000/power5.md: Adjust.
28098 * config/rs6000/power6.md: Adjust.
28099 * config/rs6000/power7.md: Adjust.
28100 * config/rs6000/power8.md: Adjust.
28101 * config/rs6000/power9.md: Adjust.
28102 * config/rs6000/rs64.md: Adjust.
28103 * config/rs6000/titan.md: Adjust.
28105 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28107 * config/i386/predicates.md (indirect_branch_operand): Rewrite
28108 ix86_indirect_branch_register logic.
28110 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28112 * config/i386/constraints.md (Bs): Update
28113 ix86_indirect_branch_register check. Don't check
28114 ix86_indirect_branch_register with GOT_memory_operand.
28116 * config/i386/predicates.md (GOT_memory_operand): Don't check
28117 ix86_indirect_branch_register here.
28118 (GOT32_symbol_operand): Likewise.
28120 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28122 * config/i386/predicates.md (constant_call_address_operand):
28123 Rewrite ix86_indirect_branch_register logic.
28124 (sibcall_insn_operand): Likewise.
28126 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28128 * config/i386/constraints.md (Bs): Replace
28129 ix86_indirect_branch_thunk_register with
28130 ix86_indirect_branch_register.
28132 * config/i386/i386.md (indirect_jump): Likewise.
28133 (tablejump): Likewise.
28134 (*sibcall_memory): Likewise.
28135 (*sibcall_value_memory): Likewise.
28136 Peepholes of indirect call and jump via memory: Likewise.
28137 * config/i386/i386.opt: Likewise.
28138 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28139 (GOT_memory_operand): Likewise.
28140 (call_insn_operand): Likewise.
28141 (sibcall_insn_operand): Likewise.
28142 (GOT32_symbol_operand): Likewise.
28144 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28146 PR middle-end/83837
28147 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
28148 type rather than type addr's type points to.
28149 (expand_omp_atomic_mutex): Likewise.
28150 (expand_omp_atomic): Likewise.
28152 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
28155 * config/i386/i386.c (output_indirect_thunk_function): Use
28156 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
28157 for __x86_return_thunk.
28159 2018-01-15 Richard Biener <rguenther@suse.de>
28161 PR middle-end/83850
28162 * expmed.c (extract_bit_field_1): Fix typo.
28164 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28167 * config/arm/iterators.md (VF): New mode iterator.
28168 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28169 Remove integer-related logic from pattern.
28170 (neon_vabd<mode>_3): Likewise.
28172 2018-01-15 Jakub Jelinek <jakub@redhat.com>
28174 PR middle-end/82694
28175 * common.opt (fstrict-overflow): No longer an alias.
28176 (fwrapv-pointer): New option.
28177 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
28178 also for pointer types based on flag_wrapv_pointer.
28179 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
28180 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
28181 opts->x_flag_wrapv got set.
28182 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
28183 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
28184 POINTER_TYPE_OVERFLOW_UNDEFINED.
28185 * match.pd: Likewise in address comparison pattern.
28186 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
28188 2018-01-15 Richard Biener <rguenther@suse.de>
28191 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
28192 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
28193 Reset type names to their identifier if their TYPE_DECL doesn't
28194 have linkage (and thus is used for ODR and devirt).
28195 (save_debug_info_for_decl): Remove.
28196 (save_debug_info_for_type): Likewise.
28197 (add_tree_to_fld_list): Adjust.
28198 * tree-pretty-print.c (dump_generic_node): Make dumping of
28199 type names more robust.
28201 2018-01-15 Richard Biener <rguenther@suse.de>
28203 * BASE-VER: Bump to 8.0.1.
28205 2018-01-14 Martin Sebor <msebor@redhat.com>
28208 * builtins.c (check_access): Avoid warning when the no-warning bit
28211 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
28213 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28214 * ira-color (allocno_hard_regs_compare): Likewise.
28216 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
28219 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28220 Use .pushsection/.popsection.
28222 2018-01-14 Martin Sebor <msebor@redhat.com>
28225 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28227 2018-01-14 Jakub Jelinek <jakub@redhat.com>
28229 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28230 entry from extra_headers.
28231 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28232 extra_headers, make the list bitwise identical to the i?86-*-* one.
28234 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28236 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28237 -mcmodel=large with -mindirect-branch=thunk,
28238 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28239 -mfunction-return=thunk-extern.
28240 * doc/invoke.texi: Document -mcmodel=large is incompatible with
28241 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28242 -mfunction-return=thunk and -mfunction-return=thunk-extern.
28244 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28246 * config/i386/i386.c (print_reg): Print the name of the full
28247 integer register without '%'.
28248 (ix86_print_operand): Handle 'V'.
28249 * doc/extend.texi: Document 'V' modifier.
28251 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28253 * config/i386/constraints.md (Bs): Disallow memory operand for
28254 -mindirect-branch-register.
28256 * config/i386/predicates.md (indirect_branch_operand): Likewise.
28257 (GOT_memory_operand): Likewise.
28258 (call_insn_operand): Likewise.
28259 (sibcall_insn_operand): Likewise.
28260 (GOT32_symbol_operand): Likewise.
28261 * config/i386/i386.md (indirect_jump): Call convert_memory_address
28262 for -mindirect-branch-register.
28263 (tablejump): Likewise.
28264 (*sibcall_memory): Likewise.
28265 (*sibcall_value_memory): Likewise.
28266 Disallow peepholes of indirect call and jump via memory for
28267 -mindirect-branch-register.
28268 (*call_pop): Replace m with Bw.
28269 (*call_value_pop): Likewise.
28270 (*sibcall_pop_memory): Replace m with Bs.
28271 * config/i386/i386.opt (mindirect-branch-register): New option.
28272 * doc/invoke.texi: Document -mindirect-branch-register option.
28274 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28276 * config/i386/i386-protos.h (ix86_output_function_return): New.
28277 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28278 set function_return_type.
28279 (indirect_thunk_name): Add ret_p to indicate thunk for function
28281 (output_indirect_thunk_function): Pass false to
28282 indirect_thunk_name.
28283 (ix86_output_indirect_branch_via_reg): Likewise.
28284 (ix86_output_indirect_branch_via_push): Likewise.
28285 (output_indirect_thunk_function): Create alias for function
28286 return thunk if regno < 0.
28287 (ix86_output_function_return): New function.
28288 (ix86_handle_fndecl_attribute): Handle function_return.
28289 (ix86_attribute_table): Add function_return.
28290 * config/i386/i386.h (machine_function): Add
28291 function_return_type.
28292 * config/i386/i386.md (simple_return_internal): Use
28293 ix86_output_function_return.
28294 (simple_return_internal_long): Likewise.
28295 * config/i386/i386.opt (mfunction-return=): New option.
28296 (indirect_branch): Mention -mfunction-return=.
28297 * doc/extend.texi: Document function_return function attribute.
28298 * doc/invoke.texi: Document -mfunction-return= option.
28300 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
28302 * config/i386/i386-opts.h (indirect_branch): New.
28303 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28304 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28305 with local indirect jump when converting indirect call and jump.
28306 (ix86_set_indirect_branch_type): New.
28307 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28308 (indirectlabelno): New.
28309 (indirect_thunk_needed): Likewise.
28310 (indirect_thunk_bnd_needed): Likewise.
28311 (indirect_thunks_used): Likewise.
28312 (indirect_thunks_bnd_used): Likewise.
28313 (INDIRECT_LABEL): Likewise.
28314 (indirect_thunk_name): Likewise.
28315 (output_indirect_thunk): Likewise.
28316 (output_indirect_thunk_function): Likewise.
28317 (ix86_output_indirect_branch_via_reg): Likewise.
28318 (ix86_output_indirect_branch_via_push): Likewise.
28319 (ix86_output_indirect_branch): Likewise.
28320 (ix86_output_indirect_jmp): Likewise.
28321 (ix86_code_end): Call output_indirect_thunk_function if needed.
28322 (ix86_output_call_insn): Call ix86_output_indirect_branch if
28324 (ix86_handle_fndecl_attribute): Handle indirect_branch.
28325 (ix86_attribute_table): Add indirect_branch.
28326 * config/i386/i386.h (machine_function): Add indirect_branch_type
28327 and has_local_indirect_jump.
28328 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28330 (tablejump): Likewise.
28331 (*indirect_jump): Use ix86_output_indirect_jmp.
28332 (*tablejump_1): Likewise.
28333 (simple_return_indirect_internal): Likewise.
28334 * config/i386/i386.opt (mindirect-branch=): New option.
28335 (indirect_branch): New.
28338 (thunk-inline): Likewise.
28339 (thunk-extern): Likewise.
28340 * doc/extend.texi: Document indirect_branch function attribute.
28341 * doc/invoke.texi: Document -mindirect-branch= option.
28343 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
28346 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28348 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
28350 * ipa-inline.c (want_inline_small_function_p): Return false if
28351 inlining has already failed with CIF_FINAL_ERROR.
28352 (update_caller_keys): Call want_inline_small_function_p before
28354 (update_callee_keys): Likewise.
28356 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
28358 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28360 (rs6000_quadword_masked_address_p): Likewise.
28361 (quad_aligned_load_p): Likewise.
28362 (quad_aligned_store_p): Likewise.
28363 (const_load_sequence_p): Add comment to describe the outer-most loop.
28364 (mimic_memory_attributes_and_flags): New function.
28365 (rs6000_gen_stvx): Likewise.
28366 (replace_swapped_aligned_store): Likewise.
28367 (rs6000_gen_lvx): Likewise.
28368 (replace_swapped_aligned_load): Likewise.
28369 (replace_swapped_load_constant): Capitalize argument name in
28370 comment describing this function.
28371 (rs6000_analyze_swaps): Add a third pass to search for vector loads
28372 and stores that access quad-word aligned addresses and replace
28373 with stvx or lvx instructions when appropriate.
28374 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28375 New function prototype.
28376 (rs6000_quadword_masked_address_p): Likewise.
28377 (rs6000_gen_lvx): Likewise.
28378 (rs6000_gen_stvx): Likewise.
28379 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28380 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28381 when memory address is aligned.
28382 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28383 this split to select lvx instruction when memory address is aligned.
28384 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28385 instruction when memory address is aligned.
28386 (*vsx_le_perm_load_v16qi): Likewise.
28387 (four unnamed splitters): Modify to select the stvx instruction
28388 when memory is aligned.
28390 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
28392 * predict.c (determine_unlikely_bbs): Handle correctly BBs
28393 which appears in the queue multiple times.
28395 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28396 Alan Hayward <alan.hayward@arm.com>
28397 David Sherwood <david.sherwood@arm.com>
28399 * tree-vectorizer.h (vec_lower_bound): New structure.
28400 (_loop_vec_info): Add check_nonzero and lower_bounds.
28401 (LOOP_VINFO_CHECK_NONZERO): New macro.
28402 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28403 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28404 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28405 fields. Make seg_len the distance travelled, not including the
28407 (dr_direction_indicator): Declare.
28408 (dr_zero_step_indicator): Likewise.
28409 (dr_known_forward_stride_p): Likewise.
28410 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28412 (runtime_alias_check_p): Allow runtime alias checks with
28414 (operator ==): Compare access_size and align.
28415 (prune_runtime_alias_test_list): Rework for new distinction between
28416 the access_size and seg_len.
28417 (create_intersect_range_checks_index): Likewise. Cope with polynomial
28419 (get_segment_min_max): New function.
28420 (create_intersect_range_checks): Use it.
28421 (dr_step_indicator): New function.
28422 (dr_direction_indicator): Likewise.
28423 (dr_zero_step_indicator): Likewise.
28424 (dr_known_forward_stride_p): Likewise.
28425 * tree-loop-distribution.c (data_ref_segment_size): Return
28426 DR_STEP * (niters - 1).
28427 (compute_alias_check_pairs): Update call to the dr_with_seg_len
28429 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28430 (vect_preserves_scalar_order_p): New function, split out from...
28431 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
28432 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28433 (vect_vfa_access_size): New function.
28434 (vect_vfa_align): Likewise.
28435 (vect_compile_time_alias): Take access_size_a and access_b arguments.
28436 (dump_lower_bound): New function.
28437 (vect_check_lower_bound): Likewise.
28438 (vect_small_gap_p): Likewise.
28439 (vectorizable_with_step_bound_p): Likewise.
28440 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28441 depencies if the vectorization factor is 1. Convert the checks
28442 for nonzero steps into checks on the bounds of DR_STEP. Try using
28443 a bunds check for variable steps if the minimum required step is
28444 relatively small. Update calls to the dr_with_seg_len
28445 constructor and to vect_compile_time_alias.
28446 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28448 (vect_loop_versioning): Call it.
28449 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28451 (vect_estimate_min_profitable_iters): Account for any bounds checks.
28453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28454 Alan Hayward <alan.hayward@arm.com>
28455 David Sherwood <david.sherwood@arm.com>
28457 * doc/sourcebuild.texi (vect_scatter_store): Document.
28458 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28460 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28462 * genopinit.c (main): Add supports_vec_scatter_store and
28463 supports_vec_scatter_store_cached to target_optabs.
28464 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28465 IFN_MASK_SCATTER_STORE.
28466 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28468 * internal-fn.h (internal_store_fn_p): Declare.
28469 (internal_fn_stored_value_index): Likewise.
28470 * internal-fn.c (scatter_store_direct): New macro.
28471 (expand_scatter_store_optab_fn): New function.
28472 (direct_scatter_store_optab_supported_p): New macro.
28473 (internal_store_fn_p): New function.
28474 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28475 IFN_MASK_SCATTER_STORE.
28476 (internal_fn_mask_index): Likewise.
28477 (internal_fn_stored_value_index): New function.
28478 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28479 for scatter stores.
28480 * optabs-query.h (supports_vec_scatter_store_p): Declare.
28481 * optabs-query.c (supports_vec_scatter_store_p): New function.
28482 * tree-vectorizer.h (vect_get_store_rhs): Declare.
28483 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28484 true for scatter stores.
28485 (vect_gather_scatter_fn_p): Handle scatter stores too.
28486 (vect_check_gather_scatter): Consider using scatter stores if
28487 supports_vec_scatter_store_p.
28488 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28489 scatter stores too.
28490 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28491 internal_fn_stored_value_index.
28492 (check_load_store_masking): Handle scatter stores too.
28493 (vect_get_store_rhs): Make public.
28494 (vectorizable_call): Use internal_store_fn_p.
28495 (vectorizable_store): Handle scatter store internal functions.
28496 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28497 when deciding whether the end of the group has been reached.
28498 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28499 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28500 (mask_scatter_store<mode>): New insns.
28502 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28503 Alan Hayward <alan.hayward@arm.com>
28504 David Sherwood <david.sherwood@arm.com>
28506 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28507 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28508 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28510 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28511 Use vect_truncate_gather_scatter_offset if we can't treat the
28512 operation as a normal gather load or scatter store.
28513 (get_group_load_store_type): Take the gather_scatter_info
28514 as argument. Try using a gather load or scatter store for
28515 single-element groups.
28516 (get_load_store_type): Update calls to get_group_load_store_type
28517 and vect_use_strided_gather_scatters_p.
28519 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28520 Alan Hayward <alan.hayward@arm.com>
28521 David Sherwood <david.sherwood@arm.com>
28523 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28524 optional tree argument.
28525 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28527 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28528 but continue to use the current value as a fallback.
28529 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28530 to compare the updates.
28531 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28532 (get_load_store_type): Use it when handling a strided access.
28533 (vect_get_strided_load_store_ops): New function.
28534 (vect_get_data_ptr_increment): Likewise.
28535 (vectorizable_load): Handle strided gather loads. Always pass
28536 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28538 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28539 Alan Hayward <alan.hayward@arm.com>
28540 David Sherwood <david.sherwood@arm.com>
28542 * doc/md.texi (gather_load@var{m}): Document.
28543 (mask_gather_load@var{m}): Likewise.
28544 * genopinit.c (main): Add supports_vec_gather_load and
28545 supports_vec_gather_load_cached to target_optabs.
28546 * optabs-tree.c (init_tree_optimization_optabs): Use
28547 ggc_cleared_alloc to allocate target_optabs.
28548 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28549 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28551 * internal-fn.h (internal_load_fn_p): Declare.
28552 (internal_gather_scatter_fn_p): Likewise.
28553 (internal_fn_mask_index): Likewise.
28554 (internal_gather_scatter_fn_supported_p): Likewise.
28555 * internal-fn.c (gather_load_direct): New macro.
28556 (expand_gather_load_optab_fn): New function.
28557 (direct_gather_load_optab_supported_p): New macro.
28558 (direct_internal_fn_optab): New function.
28559 (internal_load_fn_p): Likewise.
28560 (internal_gather_scatter_fn_p): Likewise.
28561 (internal_fn_mask_index): Likewise.
28562 (internal_gather_scatter_fn_supported_p): Likewise.
28563 * optabs-query.c (supports_at_least_one_mode_p): New function.
28564 (supports_vec_gather_load_p): Likewise.
28565 * optabs-query.h (supports_vec_gather_load_p): Declare.
28566 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28567 and memory_type field.
28568 (NUM_PATTERNS): Bump to 15.
28569 * tree-vect-data-refs.c: Include internal-fn.h.
28570 (vect_gather_scatter_fn_p): New function.
28571 (vect_describe_gather_scatter_call): Likewise.
28572 (vect_check_gather_scatter): Try using internal functions for
28573 gather loads. Recognize existing calls to a gather load function.
28574 (vect_analyze_data_refs): Consider using gather loads if
28575 supports_vec_gather_load_p.
28576 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28577 (vect_get_gather_scatter_offset_type): Likewise.
28578 (vect_convert_mask_for_vectype): Likewise.
28579 (vect_add_conversion_to_patterm): Likewise.
28580 (vect_try_gather_scatter_pattern): Likewise.
28581 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28582 (vect_vect_recog_func_ptrs): Add it.
28583 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28584 internal_fn_mask_index and internal_gather_scatter_fn_p.
28585 (check_load_store_masking): Take the gather_scatter_info as an
28586 argument and handle gather loads.
28587 (vect_get_gather_scatter_ops): New function.
28588 (vectorizable_call): Check internal_load_fn_p.
28589 (vectorizable_load): Likewise. Handle gather load internal
28591 (vectorizable_store): Update call to check_load_store_masking.
28592 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28593 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28594 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28595 (aarch64_gather_scale_operand_d): New predicates.
28596 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28597 (mask_gather_load<mode>): New insns.
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 * optabs.def (fold_left_plus_optab): New optab.
28604 * doc/md.texi (fold_left_plus_@var{m}): Document.
28605 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28606 * internal-fn.c (fold_left_direct): Define.
28607 (expand_fold_left_optab_fn): Likewise.
28608 (direct_fold_left_optab_supported_p): Likewise.
28609 * fold-const-call.c (fold_const_fold_left): New function.
28610 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28611 * tree-parloops.c (valid_reduction_p): New function.
28612 (gather_scalar_reductions): Use it.
28613 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28614 (vect_finish_replace_stmt): Declare.
28615 * tree-vect-loop.c (fold_left_reduction_fn): New function.
28616 (needs_fold_left_reduction_p): New function, split out from...
28617 (vect_is_simple_reduction): ...here. Accept reductions that
28618 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28619 (vect_force_simple_reduction): Also store the reduction type in
28620 the assignment's STMT_VINFO_REDUC_TYPE.
28621 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28622 (merge_with_identity): New function.
28623 (vect_expand_fold_left): Likewise.
28624 (vectorize_fold_left_reduction): Likewise.
28625 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
28626 scalar phi in place for it. Check for target support and reject
28627 cases that would reassociate the operation. Defer the transform
28628 phase to vectorize_fold_left_reduction.
28629 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28630 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28631 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28633 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28635 * tree-if-conv.c (predicate_mem_writes): Remove redundant
28636 call to ifc_temp_var.
28638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28639 Alan Hayward <alan.hayward@arm.com>
28640 David Sherwood <david.sherwood@arm.com>
28642 * target.def (legitimize_address_displacement): Take the original
28643 offset as a poly_int.
28644 * targhooks.h (default_legitimize_address_displacement): Update
28646 * targhooks.c (default_legitimize_address_displacement): Likewise.
28647 * doc/tm.texi: Regenerate.
28648 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28649 as an argument, moving assert of ad->disp == ad->disp_term to...
28650 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
28651 Try calling targetm.legitimize_address_displacement before expanding
28652 the address rather than afterwards, and adjust for the new interface.
28653 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28654 Match the new hook interface. Handle SVE addresses.
28655 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28656 new hook interface.
28658 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28660 * Makefile.in (OBJS): Add early-remat.o.
28661 * target.def (select_early_remat_modes): New hook.
28662 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28663 * doc/tm.texi: Regenerate.
28664 * targhooks.h (default_select_early_remat_modes): Declare.
28665 * targhooks.c (default_select_early_remat_modes): New function.
28666 * timevar.def (TV_EARLY_REMAT): New timevar.
28667 * passes.def (pass_early_remat): New pass.
28668 * tree-pass.h (make_pass_early_remat): Declare.
28669 * early-remat.c: New file.
28670 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28672 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28674 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28675 Alan Hayward <alan.hayward@arm.com>
28676 David Sherwood <david.sherwood@arm.com>
28678 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28679 vfm1 with a bound_epilog parameter.
28680 (vect_do_peeling): Update calls accordingly, and move the prologue
28681 call earlier in the function. Treat the base bound_epilog as 0 for
28682 fully-masked loops and retain vf - 1 for other loops. Add 1 to
28683 this base when peeling for gaps.
28684 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28685 with fully-masked loops.
28686 (vect_estimate_min_profitable_iters): Handle the single peeled
28687 iteration in that case.
28689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28690 Alan Hayward <alan.hayward@arm.com>
28691 David Sherwood <david.sherwood@arm.com>
28693 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28694 single-element interleaving even if the size is not a power of 2.
28695 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28696 accesses for single-element interleaving if the group size is
28699 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28700 Alan Hayward <alan.hayward@arm.com>
28701 David Sherwood <david.sherwood@arm.com>
28703 * doc/md.texi (fold_extract_last_@var{m}): Document.
28704 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28705 * optabs.def (fold_extract_last_optab): New optab.
28706 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28707 * internal-fn.c (fold_extract_direct): New macro.
28708 (expand_fold_extract_optab_fn): Likewise.
28709 (direct_fold_extract_optab_supported_p): Likewise.
28710 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28711 * tree-vect-loop.c (vect_model_reduction_cost): Handle
28712 EXTRACT_LAST_REDUCTION.
28713 (get_initial_def_for_reduction): Do not create an initial vector
28714 for EXTRACT_LAST_REDUCTION reductions.
28715 (vectorizable_reduction): Leave the scalar phi in place for
28716 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
28717 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
28718 epilogue code for EXTRACT_LAST_REDUCTION and defer the
28719 transform phase to vectorizable_condition.
28720 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28722 (vect_finish_stmt_generation): ...here.
28723 (vect_finish_replace_stmt): New function.
28724 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28725 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28727 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28729 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28730 Alan Hayward <alan.hayward@arm.com>
28731 David Sherwood <david.sherwood@arm.com>
28733 * doc/md.texi (extract_last_@var{m}): Document.
28734 * optabs.def (extract_last_optab): New optab.
28735 * internal-fn.def (EXTRACT_LAST): New internal function.
28736 * internal-fn.c (cond_unary_direct): New macro.
28737 (expand_cond_unary_optab_fn): Likewise.
28738 (direct_cond_unary_optab_supported_p): Likewise.
28739 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28740 loops using EXTRACT_LAST.
28741 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28742 (extract_last_<mode>): ...this optab.
28743 (vec_extract<mode><Vel>): Update accordingly.
28745 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28746 Alan Hayward <alan.hayward@arm.com>
28747 David Sherwood <david.sherwood@arm.com>
28749 * target.def (empty_mask_is_expensive): New hook.
28750 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28751 * doc/tm.texi: Regenerate.
28752 * targhooks.h (default_empty_mask_is_expensive): Declare.
28753 * targhooks.c (default_empty_mask_is_expensive): New function.
28754 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28755 if the target says that empty masks are expensive.
28756 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28758 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28760 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28761 Alan Hayward <alan.hayward@arm.com>
28762 David Sherwood <david.sherwood@arm.com>
28764 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28765 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28766 (vect_use_loop_mask_for_alignment_p): New function.
28767 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28768 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28769 niters_skip argument. Make sure that the first niters_skip elements
28770 of the first iteration are inactive.
28771 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28772 Update call to vect_set_loop_masks_directly.
28773 (get_misalign_in_elems): New function, split out from...
28774 (vect_gen_prolog_loop_niters): ...here.
28775 (vect_update_init_of_dr): Take a code argument that specifies whether
28776 the adjustment should be added or subtracted.
28777 (vect_update_init_of_drs): Likewise.
28778 (vect_prepare_for_masked_peels): New function.
28779 (vect_do_peeling): Skip prologue peeling if we're using a mask
28780 instead. Update call to vect_update_inits_of_drs.
28781 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28783 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28784 alignment. Do not include the number of peeled iterations in
28785 the minimum threshold in that case.
28786 (vectorizable_induction): Adjust the start value down by
28787 LOOP_VINFO_MASK_SKIP_NITERS iterations.
28788 (vect_transform_loop): Call vect_prepare_for_masked_peels.
28789 Take the number of skipped iterations into account when calculating
28791 * tree-vect-stmts.c (vect_gen_while_not): New function.
28793 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28794 Alan Hayward <alan.hayward@arm.com>
28795 David Sherwood <david.sherwood@arm.com>
28797 * doc/sourcebuild.texi (vect_fully_masked): Document.
28798 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28799 default value to 0.
28800 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28802 (vect_analyze_loop_2): ...here. Don't check the vectorization
28803 factor against the number of loop iterations if the loop is
28806 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28807 Alan Hayward <alan.hayward@arm.com>
28808 David Sherwood <david.sherwood@arm.com>
28810 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28811 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28812 (dump_groups): Update accordingly.
28813 (iv_use::mem_type): New member variable.
28814 (address_p): New function.
28815 (record_use): Add a mem_type argument and initialize the new
28817 (record_group_use): Add a mem_type argument. Use address_p.
28818 Remove obsolete null checks of base_object. Update call to record_use.
28819 (find_interesting_uses_op): Update call to record_group_use.
28820 (find_interesting_uses_cond): Likewise.
28821 (find_interesting_uses_address): Likewise.
28822 (get_mem_type_for_internal_fn): New function.
28823 (find_address_like_use): Likewise.
28824 (find_interesting_uses_stmt): Try find_address_like_use before
28825 calling find_interesting_uses_op.
28826 (addr_offset_valid_p): Use the iv mem_type field as the type
28827 of the addressed memory.
28828 (add_autoinc_candidates): Likewise.
28829 (get_address_cost): Likewise.
28830 (split_small_address_groups_p): Use address_p.
28831 (split_address_groups): Likewise.
28832 (add_iv_candidate_for_use): Likewise.
28833 (autoinc_possible_for_pair): Likewise.
28834 (rewrite_groups): Likewise.
28835 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28836 (determine_group_iv_cost): Update after split of USE_ADDRESS.
28837 (get_alias_ptr_type_for_ptr_address): New function.
28838 (rewrite_use_address): Rewrite address uses in calls that were
28839 identified by find_address_like_use.
28841 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28842 Alan Hayward <alan.hayward@arm.com>
28843 David Sherwood <david.sherwood@arm.com>
28845 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28847 * gimple-expr.h (is_gimple_addressable: Likewise.
28848 * gimple-expr.c (is_gimple_address): Likewise.
28849 * internal-fn.c (expand_call_mem_ref): New function.
28850 (expand_mask_load_optab_fn): Use it.
28851 (expand_mask_store_optab_fn): Likewise.
28853 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28854 Alan Hayward <alan.hayward@arm.com>
28855 David Sherwood <david.sherwood@arm.com>
28857 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28858 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28859 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28860 (cond_umax@var{mode}): Document.
28861 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28862 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28863 (cond_umin_optab, cond_umax_optab): New optabs.
28864 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28865 (COND_IOR, COND_XOR): New internal functions.
28866 * internal-fn.h (get_conditional_internal_fn): Declare.
28867 * internal-fn.c (cond_binary_direct): New macro.
28868 (expand_cond_binary_optab_fn): Likewise.
28869 (direct_cond_binary_optab_supported_p): Likewise.
28870 (get_conditional_internal_fn): New function.
28871 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28872 Cope with reduction statements that are vectorized as calls rather
28874 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28875 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28876 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28877 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28878 (UNSPEC_COND_EOR): New unspecs.
28879 (optab): Add mappings for them.
28880 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28881 (sve_int_op, sve_fp_op): New int attributes.
28883 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28884 Alan Hayward <alan.hayward@arm.com>
28885 David Sherwood <david.sherwood@arm.com>
28887 * optabs.def (while_ult_optab): New optab.
28888 * doc/md.texi (while_ult@var{m}@var{n}): Document.
28889 * internal-fn.def (WHILE_ULT): New internal function.
28890 * internal-fn.h (direct_internal_fn_supported_p): New override
28891 that takes two types as argument.
28892 * internal-fn.c (while_direct): New macro.
28893 (expand_while_optab_fn): New function.
28894 (convert_optab_supported_p): Likewise.
28895 (direct_while_optab_supported_p): New macro.
28896 * wide-int.h (wi::udiv_ceil): New function.
28897 * tree-vectorizer.h (rgroup_masks): New structure.
28898 (vec_loop_masks): New typedef.
28899 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28900 and fully_masked_p.
28901 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28902 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28903 (vect_max_vf): New function.
28904 (slpeel_make_loop_iterate_ntimes): Delete.
28905 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28906 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28907 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28908 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28909 internal-fn.h, stor-layout.h and optabs-query.h.
28910 (vect_set_loop_mask): New function.
28911 (add_preheader_seq): Likewise.
28912 (add_header_seq): Likewise.
28913 (interleave_supported_p): Likewise.
28914 (vect_maybe_permute_loop_masks): Likewise.
28915 (vect_set_loop_masks_directly): Likewise.
28916 (vect_set_loop_condition_masked): Likewise.
28917 (vect_set_loop_condition_unmasked): New function, split out from
28918 slpeel_make_loop_iterate_ntimes.
28919 (slpeel_make_loop_iterate_ntimes): Rename to..
28920 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
28921 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28922 (vect_do_peeling): Update call accordingly.
28923 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28925 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28926 mask_compare_type, can_fully_mask_p and fully_masked_p.
28927 (release_vec_loop_masks): New function.
28928 (_loop_vec_info): Use it to free the loop masks.
28929 (can_produce_all_loop_masks_p): New function.
28930 (vect_get_max_nscalars_per_iter): Likewise.
28931 (vect_verify_full_masking): Likewise.
28932 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28933 retries, and free the mask rgroups before retrying. Check loop-wide
28934 reasons for disallowing fully-masked loops. Make the final decision
28935 about whether use a fully-masked loop or not.
28936 (vect_estimate_min_profitable_iters): Do not assume that peeling
28937 for the number of iterations will be needed for fully-masked loops.
28938 (vectorizable_reduction): Disable fully-masked loops.
28939 (vectorizable_live_operation): Likewise.
28940 (vect_halve_mask_nunits): New function.
28941 (vect_double_mask_nunits): Likewise.
28942 (vect_record_loop_mask): Likewise.
28943 (vect_get_loop_mask): Likewise.
28944 (vect_transform_loop): Handle the case in which the final loop
28945 iteration might handle a partial vector. Call vect_set_loop_condition
28946 instead of slpeel_make_loop_iterate_ntimes.
28947 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28948 (check_load_store_masking): New function.
28949 (prepare_load_store_mask): Likewise.
28950 (vectorizable_store): Handle fully-masked loops.
28951 (vectorizable_load): Likewise.
28952 (supportable_widening_operation): Use vect_halve_mask_nunits for
28954 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28955 (vect_gen_while): New function.
28956 * config/aarch64/aarch64.md (umax<mode>3): New expander.
28957 (aarch64_uqdec<mode>): New insn.
28959 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28960 Alan Hayward <alan.hayward@arm.com>
28961 David Sherwood <david.sherwood@arm.com>
28963 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28964 (reduc_xor_scal_optab): New optabs.
28965 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28966 (reduc_xor_scal_@var{m}): Document.
28967 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28968 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28969 internal functions.
28970 * fold-const-call.c (fold_const_call): Handle them.
28971 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28972 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28973 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28974 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28975 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28976 (UNSPEC_XORV): New unspecs.
28977 (optab): Add entries for them.
28978 (BITWISEV): New int iterator.
28979 (bit_reduc_op): New int attributes.
28981 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28982 Alan Hayward <alan.hayward@arm.com>
28983 David Sherwood <david.sherwood@arm.com>
28985 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28986 * internal-fn.def (VEC_SHL_INSERT): New internal function.
28987 * optabs.def (vec_shl_insert_optab): New optab.
28988 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28989 (duplicate_and_interleave): Likewise.
28990 * tree-vect-loop.c: Include internal-fn.h.
28991 (neutral_op_for_slp_reduction): New function, split out from
28992 get_initial_defs_for_reduction.
28993 (get_initial_def_for_reduction): Handle option 2 for variable-length
28994 vectors by loading the neutral value into a vector and then shifting
28995 the initial value into element 0.
28996 (get_initial_defs_for_reduction): Replace the code argument with
28997 the neutral value calculated by neutral_op_for_slp_reduction.
28998 Use gimple_build_vector for constant-length vectors.
28999 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
29000 but the first group_size elements have a neutral value.
29001 Use duplicate_and_interleave otherwise.
29002 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
29003 Update call to get_initial_defs_for_reduction. Handle SLP
29004 reductions for variable-length vectors by creating one vector
29005 result for each scalar result, with the elements associated
29006 with other scalar results stubbed out with the neutral value.
29007 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
29008 Require IFN_VEC_SHL_INSERT for double reductions on
29009 variable-length vectors, or SLP reductions that have
29010 a neutral value. Require can_duplicate_and_interleave_p
29011 support for variable-length unchained SLP reductions if there
29012 is no neutral value, such as for MIN/MAX reductions. Also require
29013 the number of vector elements to be a multiple of the number of
29014 SLP statements when doing variable-length unchained SLP reductions.
29015 Update call to vect_create_epilog_for_reduction.
29016 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
29017 and remove initial values.
29018 (duplicate_and_interleave): Make public.
29019 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
29020 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
29022 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29023 Alan Hayward <alan.hayward@arm.com>
29024 David Sherwood <david.sherwood@arm.com>
29026 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
29027 (can_duplicate_and_interleave_p): New function.
29028 (vect_get_and_check_slp_defs): Take the vector of statements
29029 rather than just the current one. Remove excess parentheses.
29030 Restriction rejectinon of vect_constant_def and vect_external_def
29031 for variable-length vectors to boolean types, or types for which
29032 can_duplicate_and_interleave_p is false.
29033 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
29034 (duplicate_and_interleave): New function.
29035 (vect_get_constant_vectors): Use gimple_build_vector for
29036 constant-length vectors and suitable variable-length constant
29037 vectors. Use duplicate_and_interleave for other variable-length
29038 vectors. Don't defer the update when inserting new statements.
29040 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29041 Alan Hayward <alan.hayward@arm.com>
29042 David Sherwood <david.sherwood@arm.com>
29044 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
29045 min_profitable_iters doesn't go negative.
29047 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29048 Alan Hayward <alan.hayward@arm.com>
29049 David Sherwood <david.sherwood@arm.com>
29051 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
29052 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
29053 * optabs.def (vec_mask_load_lanes_optab): New optab.
29054 (vec_mask_store_lanes_optab): Likewise.
29055 * internal-fn.def (MASK_LOAD_LANES): New internal function.
29056 (MASK_STORE_LANES): Likewise.
29057 * internal-fn.c (mask_load_lanes_direct): New macro.
29058 (mask_store_lanes_direct): Likewise.
29059 (expand_mask_load_optab_fn): Handle masked operations.
29060 (expand_mask_load_lanes_optab_fn): New macro.
29061 (expand_mask_store_optab_fn): Handle masked operations.
29062 (expand_mask_store_lanes_optab_fn): New macro.
29063 (direct_mask_load_lanes_optab_supported_p): Likewise.
29064 (direct_mask_store_lanes_optab_supported_p): Likewise.
29065 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
29067 (vect_load_lanes_supported): Likewise.
29068 * tree-vect-data-refs.c (strip_conversion): New function.
29069 (can_group_stmts_p): Likewise.
29070 (vect_analyze_data_ref_accesses): Use it instead of checking
29071 for a pair of assignments.
29072 (vect_store_lanes_supported): Take a masked_p parameter.
29073 (vect_load_lanes_supported): Likewise.
29074 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
29075 vect_store_lanes_supported and vect_load_lanes_supported.
29076 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
29077 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
29078 parameter. Don't allow gaps for masked accesses.
29079 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
29080 and vect_load_lanes_supported.
29081 (get_load_store_type): Take a masked_p parameter and update
29082 call to get_group_load_store_type.
29083 (vectorizable_store): Update call to get_load_store_type.
29084 Handle IFN_MASK_STORE_LANES.
29085 (vectorizable_load): Update call to get_load_store_type.
29086 Handle IFN_MASK_LOAD_LANES.
29088 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29089 Alan Hayward <alan.hayward@arm.com>
29090 David Sherwood <david.sherwood@arm.com>
29092 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
29094 * config/aarch64/aarch64-protos.h
29095 (aarch64_sve_struct_memory_operand_p): Declare.
29096 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
29097 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
29098 (VPRED, vpred): Handle SVE structure modes.
29099 * config/aarch64/constraints.md (Utx): New constraint.
29100 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
29101 (aarch64_sve_struct_nonimmediate_operand): New predicates.
29102 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
29103 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
29104 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
29105 structure modes. Split into pieces after RA.
29106 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
29107 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
29109 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
29110 SVE structure modes.
29111 (aarch64_classify_address): Likewise.
29112 (sizetochar): Move earlier in file.
29113 (aarch64_print_operand): Handle SVE register lists.
29114 (aarch64_array_mode): New function.
29115 (aarch64_sve_struct_memory_operand_p): Likewise.
29116 (TARGET_ARRAY_MODE): Redefine.
29118 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29119 Alan Hayward <alan.hayward@arm.com>
29120 David Sherwood <david.sherwood@arm.com>
29122 * target.def (array_mode): New target hook.
29123 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
29124 * doc/tm.texi: Regenerate.
29125 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
29126 * hooks.c (hook_optmode_mode_uhwi_none): New function.
29127 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
29128 targetm.array_mode.
29129 * stor-layout.c (mode_for_array): Likewise. Support polynomial
29132 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29133 Alan Hayward <alan.hayward@arm.com>
29134 David Sherwood <david.sherwood@arm.com>
29136 * fold-const.c (fold_binary_loc): Check the argument types
29137 rather than the result type when testing for a vector operation.
29139 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29141 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
29142 * doc/tm.texi: Regenerate.
29144 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29145 Alan Hayward <alan.hayward@arm.com>
29146 David Sherwood <david.sherwood@arm.com>
29148 * doc/invoke.texi (-msve-vector-bits=): Document new option.
29149 (sve): Document new AArch64 extension.
29150 * doc/md.texi (w): Extend the description of the AArch64
29151 constraint to include SVE vectors.
29152 (Upl, Upa): Document new AArch64 predicate constraints.
29153 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
29155 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
29156 (msve-vector-bits=): New option.
29157 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
29158 SVE when these are disabled.
29159 (sve): New extension.
29160 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
29161 modes. Adjust their number of units based on aarch64_sve_vg.
29162 (MAX_BITSIZE_MODE_ANY_MODE): Define.
29163 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
29164 aarch64_addr_query_type.
29165 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29166 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29167 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29168 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29169 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29170 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29171 (aarch64_simd_imm_zero_p): Delete.
29172 (aarch64_check_zero_based_sve_index_immediate): Declare.
29173 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29174 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29175 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29176 (aarch64_sve_float_mul_immediate_p): Likewise.
29177 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29178 rather than an rtx.
29179 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
29180 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
29181 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
29182 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
29183 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
29184 (aarch64_regmode_natural_size): Likewise.
29185 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
29186 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
29188 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
29189 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
29190 for VG and the SVE predicate registers.
29191 (V_ALIASES): Add a "z"-prefixed alias.
29192 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
29193 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
29194 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
29195 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
29196 (REG_CLASS_NAMES): Add entries for them.
29197 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
29198 and the predicate registers.
29199 (aarch64_sve_vg): Declare.
29200 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
29201 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
29202 (REGMODE_NATURAL_SIZE): Define.
29203 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
29205 * config/aarch64/aarch64.c: Include cfgrtl.h.
29206 (simd_immediate_info): Add a constructor for series vectors,
29207 and an associated step field.
29208 (aarch64_sve_vg): New variable.
29209 (aarch64_dbx_register_number): Handle VG and the predicate registers.
29210 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29211 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29212 (VEC_ANY_DATA, VEC_STRUCT): New constants.
29213 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29214 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29215 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29216 (aarch64_get_mask_mode): New functions.
29217 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29218 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29219 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
29220 predicate modes and predicate registers. Explicitly restrict
29221 GPRs to modes of 16 bytes or smaller. Only allow FP registers
29222 to store a vector mode if it is recognized by
29223 aarch64_classify_vector_mode.
29224 (aarch64_regmode_natural_size): New function.
29225 (aarch64_hard_regno_caller_save_mode): Return the original mode
29227 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29228 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29229 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29230 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29232 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
29233 does not overlap dest if the function is frame-related. Handle
29235 (aarch64_split_add_offset): New function.
29236 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29237 them aarch64_add_offset.
29238 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29239 and update call to aarch64_sub_sp.
29240 (aarch64_add_cfa_expression): New function.
29241 (aarch64_expand_prologue): Pass extra temporary registers to the
29242 functions above. Handle the case in which we need to emit new
29243 DW_CFA_expressions for registers that were originally saved
29244 relative to the stack pointer, but now have to be expressed
29245 relative to the frame pointer.
29246 (aarch64_output_mi_thunk): Pass extra temporary registers to the
29248 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
29249 IP0 and IP1 values for SVE frames.
29250 (aarch64_expand_vec_series): New function.
29251 (aarch64_expand_sve_widened_duplicate): Likewise.
29252 (aarch64_expand_sve_const_vector): Likewise.
29253 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29254 Handle SVE constants. Use emit_move_insn to move a force_const_mem
29255 into the register, rather than emitting a SET directly.
29256 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29257 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29258 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29259 (offset_9bit_signed_scaled_p): New functions.
29260 (aarch64_replicate_bitmask_imm): New function.
29261 (aarch64_bitmask_imm): Use it.
29262 (aarch64_cannot_force_const_mem): Reject expressions involving
29263 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
29264 (aarch64_classify_index): Handle SVE indices, by requiring
29265 a plain register index with a scale that matches the element size.
29266 (aarch64_classify_address): Handle SVE addresses. Assert that
29267 the mode of the address is VOIDmode or an integer mode.
29268 Update call to aarch64_classify_symbol.
29269 (aarch64_classify_symbolic_expression): Update call to
29270 aarch64_classify_symbol.
29271 (aarch64_const_vec_all_in_range_p): New function.
29272 (aarch64_print_vector_float_operand): Likewise.
29273 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
29274 "vN" for FP registers with SVE modes. Handle (const ...) vectors
29275 and the FP immediates 1.0 and 0.5.
29276 (aarch64_print_address_internal): Handle SVE addresses.
29277 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29278 (aarch64_regno_regclass): Handle predicate registers.
29279 (aarch64_secondary_reload): Handle big-endian reloads of SVE
29281 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29282 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29283 (aarch64_convert_sve_vector_bits): New function.
29284 (aarch64_override_options): Use it to handle -msve-vector-bits=.
29285 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29286 rather than an rtx.
29287 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29288 Handle SVE vector and predicate modes. Accept VL-based constants
29289 that need only one temporary register, and VL offsets that require
29290 no temporary registers.
29291 (aarch64_conditional_register_usage): Mark the predicate registers
29292 as fixed if SVE isn't available.
29293 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29294 Return true for SVE vector and predicate modes.
29295 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29296 rather than an unsigned int. Handle SVE modes.
29297 (aarch64_preferred_simd_mode): Update call accordingly. Handle
29299 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29301 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29302 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29303 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29304 (aarch64_sve_float_mul_immediate_p): New functions.
29305 (aarch64_sve_valid_immediate): New function.
29306 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29307 Explicitly reject structure modes. Check for INDEX constants.
29308 Handle PTRUE and PFALSE constants.
29309 (aarch64_check_zero_based_sve_index_immediate): New function.
29310 (aarch64_simd_imm_zero_p): Delete.
29311 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29312 vector modes. Accept constants in the range of CNT[BHWD].
29313 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29314 ask for an Advanced SIMD mode.
29315 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29316 (aarch64_simd_vector_alignment): Handle SVE predicates.
29317 (aarch64_vectorize_preferred_vector_alignment): New function.
29318 (aarch64_simd_vector_alignment_reachable): Use it instead of
29320 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29321 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29323 (MAX_VECT_LEN): Delete.
29324 (expand_vec_perm_d): Add a vec_flags field.
29325 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29326 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29327 (aarch64_evpc_ext): Don't apply a big-endian lane correction
29329 (aarch64_evpc_rev): Rename to...
29330 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
29331 (aarch64_evpc_rev_global): New function.
29332 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29333 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29335 (aarch64_evpc_sve_tbl): New function.
29336 (aarch64_expand_vec_perm_const_1): Update after rename of
29337 aarch64_evpc_rev. Handle SVE permutes too, trying
29338 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29339 than aarch64_evpc_tbl.
29340 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29341 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29342 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29343 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29344 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29345 (aarch64_expand_sve_vcond): New functions.
29346 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29347 of aarch64_vector_mode_p.
29348 (aarch64_dwarf_poly_indeterminate_value): New function.
29349 (aarch64_compute_pressure_classes): Likewise.
29350 (aarch64_can_change_mode_class): Likewise.
29351 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29352 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29353 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29354 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29355 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29356 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29357 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29358 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29360 (Dn, Dl, Dr): Accept const as well as const_vector.
29361 (Dz): Likewise. Compare against CONST0_RTX.
29362 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29363 of "vector" where appropriate.
29364 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29365 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29366 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29367 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29368 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29369 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29370 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29371 (v_int_equiv): Extend to SVE modes.
29372 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29374 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29375 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29376 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29377 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29378 (SVE_COND_FP_CMP): New int iterators.
29379 (perm_hilo): Handle the new unpack unspecs.
29380 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29382 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29383 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29384 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29385 (aarch64_equality_operator, aarch64_constant_vector_operand)
29386 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29387 (aarch64_sve_nonimmediate_operand): Likewise.
29388 (aarch64_sve_general_operand): Likewise.
29389 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29390 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29391 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29392 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29393 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29394 (aarch64_sve_float_arith_immediate): Likewise.
29395 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29396 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29397 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29398 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29399 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29400 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29401 (aarch64_sve_float_arith_operand): Likewise.
29402 (aarch64_sve_float_arith_with_sub_operand): Likewise.
29403 (aarch64_sve_float_mul_operand): Likewise.
29404 (aarch64_sve_vec_perm_operand): Likewise.
29405 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29406 (aarch64_mov_operand): Accept const_poly_int and const_vector.
29407 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29408 as well as const_vector.
29409 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29410 in file. Use CONST0_RTX and CONSTM1_RTX.
29411 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
29412 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29413 Use aarch64_simd_imm_zero.
29414 * config/aarch64/aarch64-sve.md: New file.
29415 * config/aarch64/aarch64.md: Include it.
29416 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29417 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29418 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29419 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29420 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29421 (sve): New attribute.
29422 (enabled): Disable instructions with the sve attribute unless
29424 (movqi, movhi): Pass CONST_POLY_INT operaneds through
29425 aarch64_expand_mov_immediate.
29426 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29427 CNT[BHSD] immediates.
29428 (movti): Split CONST_POLY_INT moves into two halves.
29429 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29430 Split additions that need a temporary here if the destination
29431 is the stack pointer.
29432 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29433 (*add<mode>3_poly_1): New instruction.
29434 (set_clobber_cc): New expander.
29436 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29438 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29439 parameter and use it instead of GET_MODE_SIZE (innermode). Use
29440 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29441 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29442 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
29443 Change innermode from fixed_mode_size to machine_mode.
29444 (simplify_subreg): Update call accordingly. Handle a constant-sized
29445 subreg of a variable-length CONST_VECTOR.
29447 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29448 Alan Hayward <alan.hayward@arm.com>
29449 David Sherwood <david.sherwood@arm.com>
29451 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29452 (add_offset_to_base): New function, split out from...
29453 (create_mem_ref): ...here. When handling a scale other than 1,
29454 check first whether the address is valid without the offset.
29455 Add it into the base if so, leaving the index and scale as-is.
29457 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29460 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29461 fold_for_warn before checking if arg2 is INTEGER_CST.
29463 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
29465 * config/rs6000/predicates.md (load_multiple_operation): Delete.
29466 (store_multiple_operation): Delete.
29467 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29468 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29469 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29470 guarded by TARGET_STRING.
29471 (rs6000_output_load_multiple): Delete.
29472 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29473 OPTION_MASK_STRING / TARGET_STRING handling.
29474 (print_operand) <'N', 'O'>: Add comment that these are unused now.
29475 (const rs6000_opt_masks) <"string">: Change mask to 0.
29476 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29477 (MASK_STRING): Delete.
29478 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29480 (load_multiple): Delete.
29487 (store_multiple): Delete.
29494 (movmemsi_8reg): Delete.
29495 (corresponding unnamed define_insn): Delete.
29496 (movmemsi_6reg): Delete.
29497 (corresponding unnamed define_insn): Delete.
29498 (movmemsi_4reg): Delete.
29499 (corresponding unnamed define_insn): Delete.
29500 (movmemsi_2reg): Delete.
29501 (corresponding unnamed define_insn): Delete.
29502 (movmemsi_1reg): Delete.
29503 (corresponding unnamed define_insn): Delete.
29504 * config/rs6000/rs6000.opt (mno-string): New.
29505 (mstring): Replace by deprecation warning stub.
29506 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29508 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29510 * regrename.c (regrename_do_replace): If replacing the same
29511 reg multiple times, try to reuse last created gen_raw_REG.
29514 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29515 main to workaround a bug in GDB.
29517 2018-01-12 Tom de Vries <tom@codesourcery.com>
29520 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29522 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29524 PR rtl-optimization/80481
29525 * ira-color.c (get_cap_member): New function.
29526 (allocnos_conflict_by_live_ranges_p): Use it.
29527 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29528 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29530 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29533 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29534 (*saddl_se_1): Ditto.
29535 (*ssubsi_1): Ditto.
29536 (*ssubl_se_1): Ditto.
29538 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29540 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29541 rather than wi::to_widest for DR_INITs.
29542 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29543 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29544 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29546 (vect_analyze_group_access_1): Note that here.
29548 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29550 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29551 polynomial type sizes.
29553 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29555 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29556 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29557 (gimple_add_tmp_var): Likewise.
29559 2018-01-12 Martin Liska <mliska@suse.cz>
29561 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29562 (gimple_alloc_sizes): Likewise.
29563 (dump_gimple_statistics): Use PRIu64 in printf format.
29564 * gimple.h: Change uint64_t to int.
29566 2018-01-12 Martin Liska <mliska@suse.cz>
29568 * tree-core.h: Use uint64_t instead of int.
29569 * tree.c (tree_node_counts): Likewise.
29570 (tree_node_sizes): Likewise.
29571 (dump_tree_statistics): Use PRIu64 in printf format.
29573 2018-01-12 Martin Liska <mliska@suse.cz>
29575 * Makefile.in: As qsort_chk is implemented in vec.c, add
29576 vec.o to linkage of gencfn-macros.
29577 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29578 passing the info to record_node_allocation_statistics.
29579 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29581 * ggc-common.c (struct ggc_usage): Add operator== and use
29582 it in operator< and compare function.
29583 * mem-stats.h (struct mem_usage): Likewise.
29584 * vec.c (struct vec_usage): Remove operator< and compare
29585 function. Can be simply inherited.
29587 2018-01-12 Martin Jambor <mjambor@suse.cz>
29590 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29591 * tree-ssa-math-opts.c: Include domwalk.h.
29592 (convert_mult_to_fma_1): New function.
29593 (fma_transformation_info): New type.
29594 (fma_deferring_state): Likewise.
29595 (cancel_fma_deferring): New function.
29596 (result_of_phi): Likewise.
29597 (last_fma_candidate_feeds_initial_phi): Likewise.
29598 (convert_mult_to_fma): Added deferring logic, split actual
29599 transformation to convert_mult_to_fma_1.
29600 (math_opts_dom_walker): New type.
29601 (math_opts_dom_walker::after_dom_children): New method, body moved
29602 here from pass_optimize_widening_mul::execute, added deferring logic
29604 (pass_optimize_widening_mul::execute): Moved most of code to
29605 math_opts_dom_walker::after_dom_children.
29606 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29607 * config/i386/i386.c (ix86_option_override_internal): Added
29608 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29610 2018-01-12 Richard Biener <rguenther@suse.de>
29613 * dwarf2out.c (gen_variable_die): Do not reset old_die for
29614 inline instance vars.
29616 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
29619 * config/rx/rx.c (rx_is_restricted_memory_address):
29620 Handle SUBREG case.
29622 2018-01-12 Richard Biener <rguenther@suse.de>
29624 PR tree-optimization/80846
29625 * target.def (split_reduction): New target hook.
29626 * targhooks.c (default_split_reduction): New function.
29627 * targhooks.h (default_split_reduction): Declare.
29628 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29629 target requests first reduce vectors by combining low and high
29631 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29632 (get_vectype_for_scalar_type_and_size): Export.
29633 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29634 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29635 * doc/tm.texi: Regenerate.
29636 * config/i386/i386.c (ix86_split_reduction): Implement
29637 TARGET_VECTORIZE_SPLIT_REDUCTION.
29639 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29642 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29643 in PIC mode except for TARGET_VXWORKS_RTP.
29644 * config/sparc/sparc.c: Include cfgrtl.h.
29645 (TARGET_INIT_PIC_REG): Define.
29646 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29647 (sparc_pic_register_p): New predicate.
29648 (sparc_legitimate_address_p): Use it.
29649 (sparc_legitimize_pic_address): Likewise.
29650 (sparc_delegitimize_address): Likewise.
29651 (sparc_mode_dependent_address_p): Likewise.
29652 (gen_load_pcrel_sym): Remove 4th parameter.
29653 (load_got_register): Adjust call to above. Remove obsolete stuff.
29654 (sparc_expand_prologue): Do not call load_got_register here.
29655 (sparc_flat_expand_prologue): Likewise.
29656 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29657 (sparc_use_pseudo_pic_reg): New function.
29658 (sparc_init_pic_reg): Likewise.
29659 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29660 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29662 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
29664 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29665 Add item for branch_cost.
29667 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29669 PR rtl-optimization/83565
29670 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29671 not extend the result to a larger mode for rotate operations.
29672 (num_sign_bit_copies1): Likewise.
29674 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29677 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29679 Use values-Xc.o for -pedantic.
29680 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29682 2018-01-12 Martin Liska <mliska@suse.cz>
29685 * ipa-devirt.c (final_warning_record::grow_type_warnings):
29687 (possible_polymorphic_call_targets): Use it.
29688 (ipa_devirt): Likewise.
29690 2018-01-12 Martin Liska <mliska@suse.cz>
29692 * profile-count.h (enum profile_quality): Use 0 as invalid
29693 enum value of profile_quality.
29695 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
29697 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29698 -mext-string options.
29700 2018-01-12 Richard Biener <rguenther@suse.de>
29702 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29703 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29704 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29706 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29708 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
29710 * configure.ac (--with-long-double-format): Add support for the
29711 configuration option to change the default long double format on
29713 * config.gcc (powerpc*-linux*-*): Likewise.
29714 * configure: Regenerate.
29715 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29716 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29717 used without modification.
29719 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29721 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29722 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29723 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29724 MISC_BUILTIN_SPEC_BARRIER.
29725 (rs6000_init_builtins): Likewise.
29726 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29728 (speculation_barrier): New define_insn.
29729 * doc/extend.texi: Document __builtin_speculation_barrier.
29731 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29734 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29735 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29736 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29738 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
29739 integral modes instead of "ss" and "sd".
29740 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29741 vectors with 32-bit and 64-bit elements.
29742 (vecdupssescalarmodesuffix): New mode attribute.
29743 (vec_dup<mode>): Use it.
29745 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
29748 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29749 frame if argument is passed on stack.
29751 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29754 * ree.c (combine_reaching_defs): Optimize also
29755 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29756 reg2=any_extend(exp); reg1=reg2;, formatting fix.
29758 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29760 PR middle-end/83189
29761 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29763 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29765 PR middle-end/83718
29766 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29767 after they are computed.
29769 2018-01-11 Bin Cheng <bin.cheng@arm.com>
29771 PR tree-optimization/83695
29772 * gimple-loop-linterchange.cc
29773 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29774 reset cached scev information after interchange.
29775 (pass_linterchange::execute): Remove call to scev_reset_htab.
29777 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29779 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29780 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29781 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29782 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29783 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29784 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29785 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29786 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29787 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29788 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29789 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29790 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29791 (V_lane_reg): Likewise.
29792 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29794 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29795 (vfmal_lane_low<mode>_intrinsic,
29796 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29797 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29798 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29799 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29800 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29801 vfmsl_lane_high<mode>_intrinsic): New define_insns.
29803 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29805 * config/arm/arm-cpus.in (fp16fml): New feature.
29806 (ALL_SIMD): Add fp16fml.
29807 (armv8.2-a): Add fp16fml as an option.
29808 (armv8.3-a): Likewise.
29809 (armv8.4-a): Add fp16fml as part of fp16.
29810 * config/arm/arm.h (TARGET_FP16FML): Define.
29811 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29813 * config/arm/arm-modes.def (V2HF): Define.
29814 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29815 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29816 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29817 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29818 vfmsl_low, vfmsl_high): New set of builtins.
29819 * config/arm/iterators.md (PLUSMINUS): New code iterator.
29820 (vfml_op): New code attribute.
29821 (VFMLHALVES): New int iterator.
29822 (VFML, VFMLSEL): New mode attributes.
29823 (V_reg): Define mapping for V2HF.
29824 (V_hi, V_lo): New mode attributes.
29825 (VF_constraint): Likewise.
29826 (vfml_half, vfml_half_selector): New int attributes.
29827 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29829 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29830 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29832 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29833 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29834 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29835 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
29837 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29838 Document new effective target and option set.
29840 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29842 * config/arm/arm-cpus.in (armv8_4): New feature.
29843 (ARMv8_4a): New fgroup.
29844 (armv8.4-a): New arch.
29845 * config/arm/arm-tables.opt: Regenerate.
29846 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29847 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29848 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29849 Add matching rules for -march=armv8.4-a and extensions.
29850 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29852 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
29855 * config/rx/rx.md (BW): New mode attribute.
29856 (sync_lock_test_and_setsi): Add mode suffix to insn output.
29858 2018-01-11 Richard Biener <rguenther@suse.de>
29860 PR tree-optimization/83435
29861 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29862 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29863 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29865 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29866 Alan Hayward <alan.hayward@arm.com>
29867 David Sherwood <david.sherwood@arm.com>
29869 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29871 (aarch64_classify_address): Initialize it. Track polynomial offsets.
29872 (aarch64_print_address_internal): Use it to check for a zero offset.
29874 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29875 Alan Hayward <alan.hayward@arm.com>
29876 David Sherwood <david.sherwood@arm.com>
29878 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29879 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29880 Return a poly_int64 rather than a HOST_WIDE_INT.
29881 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29882 rather than a HOST_WIDE_INT.
29883 * config/aarch64/aarch64.h (aarch64_frame): Protect with
29884 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
29885 hard_fp_offset, frame_size, initial_adjust, callee_offset and
29886 final_offset from HOST_WIDE_INT to poly_int64.
29887 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29888 to_constant when getting the number of units in an Advanced SIMD
29890 (aarch64_builtin_vectorized_function): Check for a constant number
29892 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29894 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29895 attribute instead of GET_MODE_NUNITS.
29896 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29897 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29898 GET_MODE_SIZE for fixed-size registers.
29899 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29900 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29901 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29902 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29903 (aarch64_print_operand, aarch64_print_address_internal)
29904 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29905 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29906 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29907 Handle polynomial GET_MODE_SIZE.
29908 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
29909 wider than SImode without modification.
29910 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29911 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29912 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29913 passing and returning SVE modes.
29914 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29915 rather than GEN_INT.
29916 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29917 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29918 (aarch64_allocate_and_probe_stack_space): Likewise.
29919 (aarch64_layout_frame): Cope with polynomial offsets.
29920 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29921 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
29922 polynomial offsets.
29923 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29924 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29925 poly_int64 rather than a HOST_WIDE_INT.
29926 (aarch64_get_separate_components, aarch64_process_components)
29927 (aarch64_expand_prologue, aarch64_expand_epilogue)
29928 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29929 (aarch64_anchor_offset): New function, split out from...
29930 (aarch64_legitimize_address): ...here.
29931 (aarch64_builtin_vectorization_cost): Handle polynomial
29932 TYPE_VECTOR_SUBPARTS.
29933 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29935 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29936 number of elements from the PARALLEL rather than the mode.
29937 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29938 rather than GET_MODE_BITSIZE.
29939 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29940 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29941 (aarch64_expand_vec_perm_const_1): Handle polynomial
29942 d->perm.length () and d->perm elements.
29943 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
29944 Apply to_constant to d->perm elements.
29945 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29946 polynomial CONST_VECTOR_NUNITS.
29947 (aarch64_move_pointer): Take amount as a poly_int64 rather
29949 (aarch64_progress_pointer): Avoid temporary variable.
29950 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29951 the mode attribute instead of GET_MODE.
29953 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29954 Alan Hayward <alan.hayward@arm.com>
29955 David Sherwood <david.sherwood@arm.com>
29957 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29958 x exists before using it.
29959 (aarch64_add_constant_internal): Rename to...
29960 (aarch64_add_offset_1): ...this. Replace regnum with separate
29961 src and dest rtxes. Handle the case in which they're different,
29962 including when the offset is zero. Replace scratchreg with an rtx.
29963 Use 2 additions if there is no spare register into which we can
29964 move a 16-bit constant.
29965 (aarch64_add_constant): Delete.
29966 (aarch64_add_offset): Replace reg with separate src and dest
29967 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
29968 Use aarch64_add_offset_1.
29969 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29970 an rtx rather than an int. Take the delta as a poly_int64
29971 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
29972 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29973 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29974 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29975 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29976 and aarch64_add_sp.
29977 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29978 aarch64_add_constant.
29980 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29982 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29983 Use scalar_float_mode.
29985 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29987 * config/aarch64/aarch64-simd.md
29988 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29989 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29990 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29991 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29992 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29993 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29994 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29995 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29996 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29997 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29999 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30002 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
30003 targ_options->x_arm_arch_string is non NULL.
30005 2018-01-11 Tamar Christina <tamar.christina@arm.com>
30007 * config/aarch64/aarch64.h
30008 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
30010 2018-01-11 Sudakshina Das <sudi.das@arm.com>
30013 * expmed.c (emit_store_flag_force): Swap if const op0
30014 and change VOIDmode to mode of op0.
30016 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30018 PR rtl-optimization/83761
30019 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
30020 than bytes to mode_for_size.
30022 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30024 PR middle-end/83189
30025 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
30026 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
30029 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30031 PR middle-end/83575
30032 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
30033 when in layout mode.
30034 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
30035 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
30038 2018-01-10 Michael Collison <michael.collison@arm.com>
30040 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
30041 * config/aarch64/aarch64-option-extension.def: Add
30042 AARCH64_OPT_EXTENSION of 'fp16fml'.
30043 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30044 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
30045 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
30046 * config/aarch64/constraints.md (Ui7): New constraint.
30047 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
30048 (VFMLA_SEL_W): Ditto.
30051 (VFMLA16_LOW): New int iterator.
30052 (VFMLA16_HIGH): Ditto.
30053 (UNSPEC_FMLAL): New unspec.
30054 (UNSPEC_FMLSL): Ditto.
30055 (UNSPEC_FMLAL2): Ditto.
30056 (UNSPEC_FMLSL2): Ditto.
30057 (f16mac): New code attribute.
30058 * config/aarch64/aarch64-simd-builtins.def
30059 (aarch64_fmlal_lowv2sf): Ditto.
30060 (aarch64_fmlsl_lowv2sf): Ditto.
30061 (aarch64_fmlalq_lowv4sf): Ditto.
30062 (aarch64_fmlslq_lowv4sf): Ditto.
30063 (aarch64_fmlal_highv2sf): Ditto.
30064 (aarch64_fmlsl_highv2sf): Ditto.
30065 (aarch64_fmlalq_highv4sf): Ditto.
30066 (aarch64_fmlslq_highv4sf): Ditto.
30067 (aarch64_fmlal_lane_lowv2sf): Ditto.
30068 (aarch64_fmlsl_lane_lowv2sf): Ditto.
30069 (aarch64_fmlal_laneq_lowv2sf): Ditto.
30070 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
30071 (aarch64_fmlalq_lane_lowv4sf): Ditto.
30072 (aarch64_fmlsl_lane_lowv4sf): Ditto.
30073 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
30074 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
30075 (aarch64_fmlal_lane_highv2sf): Ditto.
30076 (aarch64_fmlsl_lane_highv2sf): Ditto.
30077 (aarch64_fmlal_laneq_highv2sf): Ditto.
30078 (aarch64_fmlsl_laneq_highv2sf): Ditto.
30079 (aarch64_fmlalq_lane_highv4sf): Ditto.
30080 (aarch64_fmlsl_lane_highv4sf): Ditto.
30081 (aarch64_fmlalq_laneq_highv4sf): Ditto.
30082 (aarch64_fmlsl_laneq_highv4sf): Ditto.
30083 * config/aarch64/aarch64-simd.md:
30084 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
30085 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30086 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
30087 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30088 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
30089 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
30090 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
30091 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
30092 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
30093 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
30094 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
30095 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
30096 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
30097 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
30098 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
30099 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
30100 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
30101 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
30102 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
30103 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
30104 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
30105 (vfmlsl_low_u32): Ditto.
30106 (vfmlalq_low_u32): Ditto.
30107 (vfmlslq_low_u32): Ditto.
30108 (vfmlal_high_u32): Ditto.
30109 (vfmlsl_high_u32): Ditto.
30110 (vfmlalq_high_u32): Ditto.
30111 (vfmlslq_high_u32): Ditto.
30112 (vfmlal_lane_low_u32): Ditto.
30113 (vfmlsl_lane_low_u32): Ditto.
30114 (vfmlal_laneq_low_u32): Ditto.
30115 (vfmlsl_laneq_low_u32): Ditto.
30116 (vfmlalq_lane_low_u32): Ditto.
30117 (vfmlslq_lane_low_u32): Ditto.
30118 (vfmlalq_laneq_low_u32): Ditto.
30119 (vfmlslq_laneq_low_u32): Ditto.
30120 (vfmlal_lane_high_u32): Ditto.
30121 (vfmlsl_lane_high_u32): Ditto.
30122 (vfmlal_laneq_high_u32): Ditto.
30123 (vfmlsl_laneq_high_u32): Ditto.
30124 (vfmlalq_lane_high_u32): Ditto.
30125 (vfmlslq_lane_high_u32): Ditto.
30126 (vfmlalq_laneq_high_u32): Ditto.
30127 (vfmlslq_laneq_high_u32): Ditto.
30128 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
30129 (AARCH64_FL_FOR_ARCH8_4): New.
30130 (AARCH64_ISA_F16FML): New ISA flag.
30131 (TARGET_F16FML): New feature flag for fp16fml.
30132 (doc/invoke.texi): Document new fp16fml option.
30134 2018-01-10 Michael Collison <michael.collison@arm.com>
30136 * config/aarch64/aarch64-builtins.c:
30137 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
30138 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30139 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
30140 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
30141 (AARCH64_ISA_SHA3): New ISA flag.
30142 (TARGET_SHA3): New feature flag for sha3.
30143 * config/aarch64/iterators.md (sha512_op): New int attribute.
30144 (CRYPTO_SHA512): New int iterator.
30145 (UNSPEC_SHA512H): New unspec.
30146 (UNSPEC_SHA512H2): Ditto.
30147 (UNSPEC_SHA512SU0): Ditto.
30148 (UNSPEC_SHA512SU1): Ditto.
30149 * config/aarch64/aarch64-simd-builtins.def
30150 (aarch64_crypto_sha512hqv2di): New builtin.
30151 (aarch64_crypto_sha512h2qv2di): Ditto.
30152 (aarch64_crypto_sha512su0qv2di): Ditto.
30153 (aarch64_crypto_sha512su1qv2di): Ditto.
30154 (aarch64_eor3qv8hi): Ditto.
30155 (aarch64_rax1qv2di): Ditto.
30156 (aarch64_xarqv2di): Ditto.
30157 (aarch64_bcaxqv8hi): Ditto.
30158 * config/aarch64/aarch64-simd.md:
30159 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
30160 (aarch64_crypto_sha512su0qv2di): Ditto.
30161 (aarch64_crypto_sha512su1qv2di): Ditto.
30162 (aarch64_eor3qv8hi): Ditto.
30163 (aarch64_rax1qv2di): Ditto.
30164 (aarch64_xarqv2di): Ditto.
30165 (aarch64_bcaxqv8hi): Ditto.
30166 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
30167 (vsha512h2q_u64): Ditto.
30168 (vsha512su0q_u64): Ditto.
30169 (vsha512su1q_u64): Ditto.
30170 (veor3q_u16): Ditto.
30171 (vrax1q_u64): Ditto.
30172 (vxarq_u64): Ditto.
30173 (vbcaxq_u16): Ditto.
30174 * config/arm/types.md (crypto_sha512): New type attribute.
30175 (crypto_sha3): Ditto.
30176 (doc/invoke.texi): Document new sha3 option.
30178 2018-01-10 Michael Collison <michael.collison@arm.com>
30180 * config/aarch64/aarch64-builtins.c:
30181 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
30182 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30183 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
30184 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
30185 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
30186 (AARCH64_ISA_SM4): New ISA flag.
30187 (TARGET_SM4): New feature flag for sm4.
30188 * config/aarch64/aarch64-simd-builtins.def
30189 (aarch64_sm3ss1qv4si): Ditto.
30190 (aarch64_sm3tt1aq4si): Ditto.
30191 (aarch64_sm3tt1bq4si): Ditto.
30192 (aarch64_sm3tt2aq4si): Ditto.
30193 (aarch64_sm3tt2bq4si): Ditto.
30194 (aarch64_sm3partw1qv4si): Ditto.
30195 (aarch64_sm3partw2qv4si): Ditto.
30196 (aarch64_sm4eqv4si): Ditto.
30197 (aarch64_sm4ekeyqv4si): Ditto.
30198 * config/aarch64/aarch64-simd.md:
30199 (aarch64_sm3ss1qv4si): Ditto.
30200 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
30201 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
30202 (aarch64_sm4eqv4si): Ditto.
30203 (aarch64_sm4ekeyqv4si): Ditto.
30204 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
30205 (sm3part_op): Ditto.
30206 (CRYPTO_SM3TT): Ditto.
30207 (CRYPTO_SM3PART): Ditto.
30208 (UNSPEC_SM3SS1): New unspec.
30209 (UNSPEC_SM3TT1A): Ditto.
30210 (UNSPEC_SM3TT1B): Ditto.
30211 (UNSPEC_SM3TT2A): Ditto.
30212 (UNSPEC_SM3TT2B): Ditto.
30213 (UNSPEC_SM3PARTW1): Ditto.
30214 (UNSPEC_SM3PARTW2): Ditto.
30215 (UNSPEC_SM4E): Ditto.
30216 (UNSPEC_SM4EKEY): Ditto.
30217 * config/aarch64/constraints.md (Ui2): New constraint.
30218 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30219 * config/arm/types.md (crypto_sm3): New type attribute.
30220 (crypto_sm4): Ditto.
30221 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30222 (vsm3tt1aq_u32): Ditto.
30223 (vsm3tt1bq_u32): Ditto.
30224 (vsm3tt2aq_u32): Ditto.
30225 (vsm3tt2bq_u32): Ditto.
30226 (vsm3partw1q_u32): Ditto.
30227 (vsm3partw2q_u32): Ditto.
30228 (vsm4eq_u32): Ditto.
30229 (vsm4ekeyq_u32): Ditto.
30230 (doc/invoke.texi): Document new sm4 option.
30232 2018-01-10 Michael Collison <michael.collison@arm.com>
30234 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30235 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30236 (AARCH64_FL_FOR_ARCH8_4): New.
30237 (AARCH64_FL_V8_4): New flag.
30238 (doc/invoke.texi): Document new armv8.4-a option.
30240 2018-01-10 Michael Collison <michael.collison@arm.com>
30242 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30243 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30244 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30245 * config/aarch64/aarch64-option-extension.def: Add
30246 AARCH64_OPT_EXTENSION of 'sha2'.
30247 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30248 (crypto): Disable sha2 and aes if crypto disabled.
30249 (crypto): Enable aes and sha2 if enabled.
30250 (simd): Disable sha2 and aes if simd disabled.
30251 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30253 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30254 (TARGET_SHA2): New feature flag for sha2.
30255 (TARGET_AES): New feature flag for aes.
30256 * config/aarch64/aarch64-simd.md:
30257 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30258 conditional on TARGET_AES.
30259 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30260 (aarch64_crypto_sha1hsi): Make pattern conditional
30262 (aarch64_crypto_sha1hv4si): Ditto.
30263 (aarch64_be_crypto_sha1hv4si): Ditto.
30264 (aarch64_crypto_sha1su1v4si): Ditto.
30265 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30266 (aarch64_crypto_sha1su0v4si): Ditto.
30267 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30268 (aarch64_crypto_sha256su0v4si): Ditto.
30269 (aarch64_crypto_sha256su1v4si): Ditto.
30270 (doc/invoke.texi): Document new aes and sha2 options.
30272 2018-01-10 Martin Sebor <msebor@redhat.com>
30274 PR tree-optimization/83781
30275 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30278 2018-01-11 Martin Sebor <msebor@gmail.com>
30279 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30281 PR tree-optimization/83501
30282 PR tree-optimization/81703
30284 * tree-ssa-strlen.c (get_string_cst): Rename...
30285 (get_string_len): ...to this. Handle global constants.
30286 (handle_char_store): Adjust.
30288 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
30289 Jim Wilson <jimw@sifive.com>
30291 * config/riscv/riscv-protos.h (riscv_output_return): New.
30292 * config/riscv/riscv.c (struct machine_function): New naked_p field.
30293 (riscv_attribute_table, riscv_output_return),
30294 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30295 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30296 (riscv_compute_frame_info): Only compute frame->mask if not a naked
30298 (riscv_expand_prologue): Add early return for naked function.
30299 (riscv_expand_epilogue): Likewise.
30300 (riscv_function_ok_for_sibcall): Return false for naked function.
30301 (riscv_set_current_function): New.
30302 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30303 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30304 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30305 * doc/extend.texi (RISC-V Function Attributes): New.
30307 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
30309 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30310 check for 128-bit long double before checking TCmode.
30311 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30312 128-bit long doubles before checking TFmode or TCmode.
30313 (FLOAT128_IBM_P): Likewise.
30315 2018-01-10 Martin Sebor <msebor@redhat.com>
30317 PR tree-optimization/83671
30318 * builtins.c (c_strlen): Unconditionally return zero for the empty
30320 Use -Warray-bounds for warnings.
30321 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30322 for non-constant array indices with COMPONENT_REF, arrays of
30323 arrays, and pointers to arrays.
30324 (gimple_fold_builtin_strlen): Determine and set length range for
30325 non-constant character arrays.
30327 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
30329 PR middle-end/81897
30330 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30333 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
30335 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30337 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30340 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30341 VECTOR_MEM_ALTIVEC_OR_VSX_P.
30342 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30343 indexed_or_indirect_operand predicate.
30344 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30345 (*vsx_le_perm_load_v8hi): Likewise.
30346 (*vsx_le_perm_load_v16qi): Likewise.
30347 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30348 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30349 (*vsx_le_perm_store_v8hi): Likewise.
30350 (*vsx_le_perm_store_v16qi): Likewise.
30351 (eight unnamed splitters): Likewise.
30353 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
30355 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30356 * config/rs6000/emmintrin.h: Likewise.
30357 * config/rs6000/mmintrin.h: Likewise.
30358 * config/rs6000/xmmintrin.h: Likewise.
30360 2018-01-10 David Malcolm <dmalcolm@redhat.com>
30363 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30365 * tree.c (tree_nop_conversion): Return true for location wrapper
30367 (maybe_wrap_with_location): New function.
30368 (selftest::check_strip_nops): New function.
30369 (selftest::test_location_wrappers): New function.
30370 (selftest::tree_c_tests): Call it.
30371 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30372 (maybe_wrap_with_location): New decl.
30373 (EXPR_LOCATION_WRAPPER_P): New macro.
30374 (location_wrapper_p): New inline function.
30375 (tree_strip_any_location_wrapper): New inline function.
30377 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
30380 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30381 stack_realign_offset for the largest alignment of stack slot
30383 (ix86_find_max_used_stack_alignment): New function.
30384 (ix86_finalize_stack_frame_flags): Use it. Set
30385 max_used_stack_alignment if we don't realign stack.
30386 * config/i386/i386.h (machine_function): Add
30387 max_used_stack_alignment.
30389 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
30391 * config/arm/arm.opt (-mbranch-cost): New option.
30392 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30395 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
30398 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30399 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30401 2018-01-10 Richard Biener <rguenther@suse.de>
30404 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30405 early out so it also covers the case where we have a non-NULL
30408 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30410 PR tree-optimization/83753
30411 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30412 for non-strided grouped accesses if the number of elements is 1.
30414 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
30417 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30418 * i386.h (TARGET_USE_GATHER): Define.
30419 * x86-tune.def (X86_TUNE_USE_GATHER): New.
30421 2018-01-10 Martin Liska <mliska@suse.cz>
30424 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30425 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30427 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30428 CLEANUP_NO_PARTITIONING is not set.
30430 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30432 * doc/rtl.texi: Remove documentation of (const ...) wrappers
30433 for vectors, as a partial revert of r254296.
30434 * rtl.h (const_vec_p): Delete.
30435 (const_vec_duplicate_p): Don't test for vector CONSTs.
30436 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30437 * expmed.c (make_tree): Likewise.
30440 * common.md (E, F): Use CONSTANT_P instead of checking for
30442 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30443 checking for CONST_VECTOR.
30445 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30447 PR middle-end/83575
30448 * predict.c (force_edge_cold): Handle in more sane way edges
30449 with no prediction.
30451 2018-01-09 Carl Love <cel@us.ibm.com>
30453 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30455 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30456 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30457 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30458 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
30459 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30460 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
30461 * config/rs6000/rs6000-protos.h: Add extern defition for
30462 rs6000_generate_float2_double_code.
30463 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30465 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30466 (float2_v2df): Add define_expand.
30468 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
30471 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30472 op_mode in the force_to_mode call.
30474 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30476 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30477 instead of checking each element individually.
30478 (aarch64_evpc_uzp): Likewise.
30479 (aarch64_evpc_zip): Likewise.
30480 (aarch64_evpc_ext): Likewise.
30481 (aarch64_evpc_rev): Likewise.
30482 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30483 instead of checking each element individually. Return true without
30485 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30486 whether all selected elements come from the same input, instead of
30487 checking each element individually. Remove calls to gen_rtx_REG,
30488 start_sequence and end_sequence and instead assert that no rtl is
30491 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30493 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30494 order of HIGH and CONST checks.
30496 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30498 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30499 if the destination isn't an SSA_NAME.
30501 2018-01-09 Richard Biener <rguenther@suse.de>
30503 PR tree-optimization/83668
30504 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30506 (canonicalize_loop_form): ... here, renamed from ...
30507 (canonicalize_loop_closed_ssa_form): ... this and amended to
30508 swap successor edges for loop exit blocks to make us use
30509 the RPO order we need for initial schedule generation.
30511 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30513 PR tree-optimization/64811
30514 * match.pd: When optimizing comparisons with Inf, avoid
30515 introducing or losing exceptions from comparisons with NaN.
30517 2018-01-09 Martin Liska <mliska@suse.cz>
30520 * asan.c (shadow_mem_size): Add gcc_assert.
30522 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30524 Don't save registers in main().
30527 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30528 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30529 * config/avr/avr.c (avr_set_current_function): Don't error if
30530 naked, OS_task or OS_main are specified at the same time.
30531 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30533 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30535 * common/config/avr/avr-common.c (avr_option_optimization_table):
30536 Switch on -mmain-is-OS_task for optimizing compilations.
30538 2018-01-09 Richard Biener <rguenther@suse.de>
30540 PR tree-optimization/83572
30541 * graphite.c: Include cfganal.h.
30542 (graphite_transform_loops): Connect infinite loops to exit
30543 and remove fake edges at the end.
30545 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30547 * ipa-inline.c (edge_badness): Revert accidental checkin.
30549 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30552 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30553 symbols; not inline clones.
30555 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30558 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30559 hard registers. Formatting fixes.
30561 PR preprocessor/83722
30562 * gcc.c (try_generate_repro): Pass
30563 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30564 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30567 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30568 Kito Cheng <kito.cheng@gmail.com>
30570 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30571 (riscv_leaf_function_p): Delete.
30572 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30574 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30576 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30578 (do_ifelse): New function.
30579 (do_isel): New function.
30580 (do_sub3): New function.
30581 (do_add3): New function.
30582 (do_load_mask_compare): New function.
30583 (do_overlap_load_compare): New function.
30584 (expand_compare_loop): New function.
30585 (expand_block_compare): Call expand_compare_loop() when appropriate.
30586 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30587 option description.
30588 (-mblock-compare-inline-loop-limit): New option.
30590 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30593 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30594 Reverse order of second and third operands in first alternative.
30595 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30596 of first and second elements in UNSPEC_VPERMR vector.
30597 (altivec_expand_vec_perm_le): Likewise.
30599 2018-01-08 Jeff Law <law@redhat.com>
30601 PR rtl-optimizatin/81308
30602 * tree-switch-conversion.c (cfg_altered): New file scoped static.
30603 (process_switch): If group_case_labels makes a change, then set
30605 (pass_convert_switch::execute): If a switch is converted, then
30606 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
30608 PR rtl-optimization/81308
30609 * recog.c (split_all_insns): Conditionally cleanup the CFG after
30612 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
30614 PR target/83663 - Revert r255946
30615 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30616 generation for cases where splatting a value is not useful.
30617 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30618 across a vec_duplicate and a paradoxical subreg forming a vector
30619 mode to a vec_concat.
30621 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30623 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30624 -march=armv8.3-a variants.
30625 * config/arm/t-multilib: Likewise.
30626 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
30628 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30630 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30632 (cceq_ior_compare_complement): Give it a name so I can use it, and
30633 change boolean_or_operator predicate to boolean_operator so it can
30634 be used to generate a crand.
30635 (eqne): New code iterator.
30636 (bd/bd_neg): New code_attrs.
30637 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30638 a single define_insn.
30639 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30640 decrement (bdnzt/bdnzf/bdzt/bdzf).
30641 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30642 with the new names of the branch decrement patterns, and added the
30643 names of the branch decrement conditional patterns.
30645 2018-01-08 Richard Biener <rguenther@suse.de>
30647 PR tree-optimization/83563
30648 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30651 2018-01-08 Richard Biener <rguenther@suse.de>
30653 PR middle-end/83713
30654 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30656 2018-01-08 Richard Biener <rguenther@suse.de>
30658 PR tree-optimization/83685
30659 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30660 references to abnormals.
30662 2018-01-08 Richard Biener <rguenther@suse.de>
30665 * dwarf2out.c (output_indirect_strings): Handle empty
30666 skeleton_debug_str_hash.
30667 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30669 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30671 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30672 (emit_store_direct): Likewise.
30673 (arc_trampoline_adjust_address): Likewise.
30674 (arc_asm_trampoline_template): New function.
30675 (arc_initialize_trampoline): Use asm_trampoline_template.
30676 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30677 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30678 * config/arc/arc.md (flush_icache): Delete pattern.
30680 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30682 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30683 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30686 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30689 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30690 by not USED_FOR_TARGET.
30691 (make_pass_resolve_sw_modes): Likewise.
30693 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30695 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30698 2018-01-08 Richard Biener <rguenther@suse.de>
30700 PR middle-end/83580
30701 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30703 2018-01-08 Richard Biener <rguenther@suse.de>
30705 PR middle-end/83517
30706 * match.pd ((t * 2) / 2) -> t): Add missing :c.
30708 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
30710 PR middle-end/81897
30711 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30712 basic blocks with a small number of successors.
30713 (convert_control_dep_chain_into_preds): Improve handling of
30715 (dump_predicates): Split apart into...
30716 (dump_pred_chain): ...here...
30717 (dump_pred_info): ...and here.
30718 (can_one_predicate_be_invalidated_p): Add debugging printfs.
30719 (can_chain_union_be_invalidated_p): Improve check for invalidation
30721 (uninit_uses_cannot_happen): Avoid unnecessary if
30722 convert_control_dep_chain_into_preds yielded nothing.
30724 2018-01-06 Martin Sebor <msebor@redhat.com>
30726 PR tree-optimization/83640
30727 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30728 subtracting negative offset from size.
30729 (builtin_access::overlap): Adjust offset bounds of the access to fall
30730 within the size of the object if possible.
30732 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
30734 PR rtl-optimization/83699
30735 * expmed.c (extract_bit_field_1): Restrict the vector usage of
30736 extract_bit_field_as_subreg to cases in which the extracted
30737 value is also a vector.
30739 * lra-constraints.c (process_alt_operands): Test for the equivalence
30740 substitutions when detecting a possible reload cycle.
30742 2018-01-06 Jakub Jelinek <jakub@redhat.com>
30745 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30746 by default if flag_selective_schedling{,2}. Formatting fixes.
30748 PR rtl-optimization/83682
30749 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30750 if it has non-VECTOR_MODE element mode.
30751 (vec_duplicate_p): Likewise.
30753 PR middle-end/83694
30754 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30755 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30757 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30760 * config/i386/i386-builtin.def
30761 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30762 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30763 Require also OPTION_MASK_ISA_AVX512F in addition to
30764 OPTION_MASK_ISA_GFNI.
30765 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30766 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30767 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30768 to OPTION_MASK_ISA_GFNI.
30769 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30770 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30771 OPTION_MASK_ISA_AVX512BW.
30772 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30773 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30774 addition to OPTION_MASK_ISA_GFNI.
30775 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30776 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30777 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30778 to OPTION_MASK_ISA_GFNI.
30779 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30780 a requirement for all ISAs rather than any of them with a few
30782 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30784 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30785 bitmasks to be enabled with 3 exceptions, instead of requiring any
30786 enabled ISA with lots of exceptions.
30787 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30788 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30789 Change avx512bw in isa attribute to avx512f.
30790 * config/i386/sgxintrin.h: Add license boilerplate.
30791 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
30792 to __AVX512F__ and __AVX512VL to __AVX512VL__.
30793 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30794 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30796 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30797 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30798 temporarily sse2 rather than sse if not enabled already.
30801 * config/i386/sse.md (VI248_VLBW): Rename to ...
30802 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
30803 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30804 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30805 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30806 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30807 mode iterator instead of VI248_VLBW.
30809 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
30811 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30812 (record_modified): Skip clobbers; add debug output.
30813 (param_change_prob): Use sreal frequencies.
30815 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30817 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30818 punt for user-aligned variables.
30820 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30822 * tree-chrec.c (chrec_contains_symbols): Return true for
30825 2018-01-05 Sudakshina Das <sudi.das@arm.com>
30828 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30829 of (x|y) == x for BICS pattern.
30831 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30833 PR tree-optimization/83605
30834 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30835 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30838 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
30840 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30841 * config/epiphany/rtems.h: New file.
30843 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30844 Uros Bizjak <ubizjak@gmail.com>
30847 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30848 QIreg_operand instead of register_operand predicate.
30849 * config/i386/i386.c (ix86_rop_should_change_byte_p,
30850 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30851 comments instead of -fmitigate[-_]rop.
30853 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30856 * cgraphunit.c (symbol_table::compile): Switch to text_section
30857 before calling assembly_start debug hook.
30858 * run-rtl-passes.c (run_rtl_passes): Likewise.
30861 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30863 * tree-vrp.c (extract_range_from_binary_expr_1): Check
30864 range_int_cst_p rather than !symbolic_range_p before calling
30865 extract_range_from_multiplicative_op_1.
30867 2018-01-04 Jeff Law <law@redhat.com>
30869 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30870 redundant test in assertion.
30872 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30874 * doc/rtl.texi: Document machine_mode wrapper classes.
30876 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30878 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30879 using tree_to_uhwi.
30881 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30883 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30884 the VEC_PERM_EXPR fold to fail.
30886 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30889 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30890 to switched_sections.
30892 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30895 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30896 test for d.testing.
30898 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
30901 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30902 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30904 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30907 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30908 is BLKmode and bitpos not zero or mode change is needed.
30910 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30913 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30916 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
30919 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30920 instead of MULT rtx. Update all corresponding splitters.
30921 (*saddl_se): Ditto.
30922 (*ssub<modesuffix>): Ditto.
30923 (*ssubl_se): Ditto.
30924 (*cmp_sadd_di): Update split patterns.
30925 (*cmp_sadd_si): Ditto.
30926 (*cmp_sadd_sidi): Ditto.
30927 (*cmp_ssub_di): Ditto.
30928 (*cmp_ssub_si): Ditto.
30929 (*cmp_ssub_sidi): Ditto.
30930 * config/alpha/predicates.md (const23_operand): New predicate.
30931 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30932 Look for ASHIFT, not MULT inner operand.
30933 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30935 2018-01-04 Martin Liska <mliska@suse.cz>
30937 PR gcov-profile/83669
30938 * gcov.c (output_intermediate_file): Add version to intermediate
30940 * doc/gcov.texi: Document new field 'version' in intermediate
30941 file format. Fix location of '-k' option of gcov command.
30943 2018-01-04 Martin Liska <mliska@suse.cz>
30946 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30948 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30950 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30952 2018-01-03 Martin Sebor <msebor@redhat.com>
30954 PR tree-optimization/83655
30955 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30956 checking calls with invalid arguments.
30958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30960 * tree-vect-stmts.c (vect_get_store_rhs): New function.
30961 (vectorizable_mask_load_store): Delete.
30962 (vectorizable_call): Return false for masked loads and stores.
30963 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
30964 instead of gimple_assign_rhs1.
30965 (vectorizable_load): Handle IFN_MASK_LOAD.
30966 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30970 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30972 (vectorizable_mask_load_store): ...here.
30973 (vectorizable_load): ...and here.
30975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30977 * tree-vect-stmts.c (vect_build_all_ones_mask)
30978 (vect_build_zero_merge_argument): New functions, split out from...
30979 (vectorizable_load): ...here.
30981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30983 * tree-vect-stmts.c (vect_check_store_rhs): New function,
30985 (vectorizable_mask_load_store): ...here.
30986 (vectorizable_store): ...and here.
30988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30990 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30992 (vectorizable_mask_load_store): ...here.
30994 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30996 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30997 (vect_model_store_cost): Take a vec_load_store_type instead of a
30999 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
31000 (vect_model_store_cost): Take a vec_load_store_type instead of a
31002 (vectorizable_mask_load_store): Update accordingly.
31003 (vectorizable_store): Likewise.
31004 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
31006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31008 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
31009 IFN_MASK_LOAD calls here rather than...
31010 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
31012 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31013 Alan Hayward <alan.hayward@arm.com>
31014 David Sherwood <david.sherwood@arm.com>
31016 * expmed.c (extract_bit_field_1): For vector extracts,
31017 fall back to extract_bit_field_as_subreg if vec_extract
31020 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31021 Alan Hayward <alan.hayward@arm.com>
31022 David Sherwood <david.sherwood@arm.com>
31024 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
31025 they are variable or constant sized.
31026 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
31027 slots for constant-sized data.
31029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31030 Alan Hayward <alan.hayward@arm.com>
31031 David Sherwood <david.sherwood@arm.com>
31033 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
31034 handling COND_EXPRs with boolean comparisons, try to find a better
31035 basis for the mask type than the boolean itself.
31037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31039 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
31040 is calculated and how it can be overridden.
31041 * genmodes.c (max_bitsize_mode_any_mode): New variable.
31042 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
31044 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
31047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31048 Alan Hayward <alan.hayward@arm.com>
31049 David Sherwood <david.sherwood@arm.com>
31051 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
31052 Remove the mode argument.
31053 (aarch64_simd_valid_immediate): Remove the mode and inverse
31055 * config/aarch64/iterators.md (bitsize): New iterator.
31056 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
31057 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
31058 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
31059 aarch64_simd_valid_immediate.
31060 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
31061 (aarch64_reg_or_bic_imm): Likewise.
31062 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
31063 with an insn_type enum and msl with a modifier_type enum.
31064 Replace element_width with a scalar_mode. Change the shift
31065 to unsigned int. Add constructors for scalar_float_mode and
31066 scalar_int_mode elements.
31067 (aarch64_vect_float_const_representable_p): Delete.
31068 (aarch64_can_const_movi_rtx_p)
31069 (aarch64_simd_scalar_immediate_valid_for_move)
31070 (aarch64_simd_make_constant): Update call to
31071 aarch64_simd_valid_immediate.
31072 (aarch64_advsimd_valid_immediate_hs): New function.
31073 (aarch64_advsimd_valid_immediate): Likewise.
31074 (aarch64_simd_valid_immediate): Remove mode and inverse
31075 arguments. Rewrite to use the above. Use const_vec_duplicate_p
31076 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
31077 and aarch64_float_const_representable_p on the result.
31078 (aarch64_output_simd_mov_immediate): Remove mode argument.
31079 Update call to aarch64_simd_valid_immediate and use of
31080 simd_immediate_info.
31081 (aarch64_output_scalar_simd_mov_immediate): Update call
31084 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31085 Alan Hayward <alan.hayward@arm.com>
31086 David Sherwood <david.sherwood@arm.com>
31088 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
31089 (mode_nunits): Likewise CONST_MODE_NUNITS.
31090 * machmode.def (ADJUST_NUNITS): Document.
31091 * genmodes.c (mode_data::need_nunits_adj): New field.
31092 (blank_mode): Update accordingly.
31093 (adj_nunits): New variable.
31094 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
31096 (emit_mode_size_inline): Set need_bytesize_adj for all modes
31097 listed in adj_nunits.
31098 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
31099 listed in adj_nunits. Don't emit case statements for such modes.
31100 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
31101 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
31102 nothing if adj_nunits is nonnull.
31103 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
31104 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
31105 (emit_mode_fbit): Update use of print_maybe_const_decl.
31106 (emit_move_size): Likewise. Treat the array as non-const
31108 (emit_mode_adjustments): Handle adj_nunits.
31110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31112 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
31113 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
31114 (VECTOR_MODES): Use it.
31115 (make_vector_modes): Take the prefix as an argument.
31117 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31118 Alan Hayward <alan.hayward@arm.com>
31119 David Sherwood <david.sherwood@arm.com>
31121 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
31122 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
31123 for MODE_VECTOR_BOOL.
31124 * machmode.def (VECTOR_BOOL_MODE): Document.
31125 * genmodes.c (VECTOR_BOOL_MODE): New macro.
31126 (make_vector_bool_mode): New function.
31127 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
31129 * lto-streamer-in.c (lto_input_mode_table): Likewise.
31130 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
31132 * stor-layout.c (int_mode_for_mode): Likewise.
31133 * tree.c (build_vector_type_for_mode): Likewise.
31134 * varasm.c (output_constant_pool_2): Likewise.
31135 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
31136 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
31137 for MODE_VECTOR_BOOL.
31138 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
31139 of mode class checks.
31140 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
31141 instead of a list of mode class checks.
31142 (expand_vector_scalar_condition): Likewise.
31143 (type_for_widest_vector_mode): Handle BImode as an inner mode.
31145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31146 Alan Hayward <alan.hayward@arm.com>
31147 David Sherwood <david.sherwood@arm.com>
31149 * machmode.h (mode_size): Change from unsigned short to
31151 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
31152 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31153 or if measurement_type is not polynomial.
31154 (fixed_size_mode::includes_p): Check for constant-sized modes.
31155 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
31156 return a poly_uint16 rather than an unsigned short.
31157 (emit_mode_size): Change the type of mode_size from unsigned short
31158 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
31159 (emit_mode_adjustments): Cope with polynomial vector sizes.
31160 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31162 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31164 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
31165 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31166 * caller-save.c (setup_save_areas): Likewise.
31167 (replace_reg_with_saved_mem): Likewise.
31168 * calls.c (emit_library_call_value_1): Likewise.
31169 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31170 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31171 (gen_lowpart_for_combine): Likewise.
31172 * convert.c (convert_to_integer_1): Likewise.
31173 * cse.c (equiv_constant, cse_insn): Likewise.
31174 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
31175 (cselib_subst_to_values): Likewise.
31176 * dce.c (word_dce_process_block): Likewise.
31177 * df-problems.c (df_word_lr_mark_ref): Likewise.
31178 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
31179 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
31180 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
31181 (rtl_for_decl_location): Likewise.
31182 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
31183 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
31184 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
31185 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
31186 (expand_expr_real_1): Likewise.
31187 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
31188 (pad_below): Likewise.
31189 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31190 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
31191 * ira.c (get_subreg_tracking_sizes): Likewise.
31192 * ira-build.c (ira_create_allocno_objects): Likewise.
31193 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
31194 (ira_sort_regnos_for_alter_reg): Likewise.
31195 * ira-costs.c (record_operand_costs): Likewise.
31196 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
31197 (resolve_simple_move): Likewise.
31198 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
31199 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
31200 (lra_constraints): Likewise.
31201 (CONST_POOL_OK_P): Reject variable-sized modes.
31202 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
31203 (add_pseudo_to_slot, lra_spill): Likewise.
31204 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31205 * optabs-query.c (get_best_extraction_insn): Likewise.
31206 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31207 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31208 (expand_mult_highpart, valid_multiword_target_p): Likewise.
31209 * recog.c (offsettable_address_addr_space_p): Likewise.
31210 * regcprop.c (maybe_mode_change): Likewise.
31211 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31212 * regrename.c (build_def_use): Likewise.
31213 * regstat.c (dump_reg_info): Likewise.
31214 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31215 (find_reloads, find_reloads_subreg_address): Likewise.
31216 * reload1.c (eliminate_regs_1): Likewise.
31217 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31218 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31219 (simplify_binary_operation_1, simplify_subreg): Likewise.
31220 * targhooks.c (default_function_arg_padding): Likewise.
31221 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31222 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31223 (verify_gimple_assign_ternary): Likewise.
31224 * tree-inline.c (estimate_move_cost): Likewise.
31225 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31226 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31227 (get_address_cost_ainc): Likewise.
31228 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31229 (vect_supportable_dr_alignment): Likewise.
31230 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31231 (vectorizable_reduction): Likewise.
31232 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31233 (vectorizable_operation, vectorizable_load): Likewise.
31234 * tree.c (build_same_sized_truth_vector_type): Likewise.
31235 * valtrack.c (cleanup_auto_inc_dec): Likewise.
31236 * var-tracking.c (emit_note_insn_var_location): Likewise.
31237 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31238 (ADDR_VEC_ALIGN): Likewise.
31240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31241 Alan Hayward <alan.hayward@arm.com>
31242 David Sherwood <david.sherwood@arm.com>
31244 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31246 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31247 or if measurement_type is polynomial.
31248 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31249 * combine.c (make_extraction): Likewise.
31250 * dse.c (find_shift_sequence): Likewise.
31251 * dwarf2out.c (mem_loc_descriptor): Likewise.
31252 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31253 (extract_bit_field, extract_low_bits): Likewise.
31254 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31255 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31256 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31257 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31258 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31259 * reload.c (find_reloads): Likewise.
31260 * reload1.c (alter_reg): Likewise.
31261 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31262 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31263 * tree-if-conv.c (predicate_mem_writes): Likewise.
31264 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31265 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31266 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31267 * valtrack.c (dead_debug_insert_temp): Likewise.
31268 * varasm.c (mergeable_constant_section): Likewise.
31269 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31272 Alan Hayward <alan.hayward@arm.com>
31273 David Sherwood <david.sherwood@arm.com>
31275 * expr.c (expand_assignment): Cope with polynomial mode sizes
31276 when assigning to a CONCAT.
31278 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31279 Alan Hayward <alan.hayward@arm.com>
31280 David Sherwood <david.sherwood@arm.com>
31282 * machmode.h (mode_precision): Change from unsigned short to
31284 (mode_to_precision): Return a poly_uint16 rather than an unsigned
31286 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31287 or if measurement_type is not polynomial.
31288 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
31289 in which the mode is already known to be a scalar_int_mode.
31290 * genmodes.c (emit_mode_precision): Change the type of mode_precision
31291 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
31293 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31294 for GET_MODE_PRECISION.
31295 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31296 for GET_MODE_PRECISION.
31297 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31299 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31300 (expand_field_assignment, make_extraction): Likewise.
31301 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31302 (get_last_value): Likewise.
31303 * convert.c (convert_to_integer_1): Likewise.
31304 * cse.c (cse_insn): Likewise.
31305 * expr.c (expand_expr_real_1): Likewise.
31306 * lra-constraints.c (simplify_operand_subreg): Likewise.
31307 * optabs-query.c (can_atomic_load_p): Likewise.
31308 * optabs.c (expand_atomic_load): Likewise.
31309 (expand_atomic_store): Likewise.
31310 * ree.c (combine_reaching_defs): Likewise.
31311 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31312 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31313 * tree.h (type_has_mode_precision_p): Likewise.
31314 * ubsan.c (instrument_si_overflow): Likewise.
31316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31317 Alan Hayward <alan.hayward@arm.com>
31318 David Sherwood <david.sherwood@arm.com>
31320 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31321 polynomial numbers of units.
31322 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31323 (valid_vector_subparts_p): New function.
31324 (build_vector_type): Remove temporary shim and take the number
31325 of units as a poly_uint64 rather than an int.
31326 (build_opaque_vector_type): Take the number of units as a
31327 poly_uint64 rather than an int.
31328 * tree.c (build_vector_from_ctor): Handle polynomial
31329 TYPE_VECTOR_SUBPARTS.
31330 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31331 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31332 (build_vector_from_val): If the number of units is variable,
31333 use build_vec_duplicate_cst for constant operands and
31334 VEC_DUPLICATE_EXPR otherwise.
31335 (make_vector_type): Remove temporary is_constant ().
31336 (build_vector_type, build_opaque_vector_type): Take the number of
31337 units as a poly_uint64 rather than an int.
31338 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31340 * cfgexpand.c (expand_debug_expr): Likewise.
31341 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31342 (store_constructor, expand_expr_real_1): Likewise.
31343 (const_scalar_mask_from_tree): Likewise.
31344 * fold-const-call.c (fold_const_reduction): Likewise.
31345 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31346 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31347 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31348 (fold_relational_const): Likewise.
31349 (native_interpret_vector): Likewise. Change the size from an
31350 int to an unsigned int.
31351 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31352 TYPE_VECTOR_SUBPARTS.
31353 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31354 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31355 duplicating a non-constant operand into a variable-length vector.
31356 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31357 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31358 * ipa-icf.c (sem_variable::equals): Likewise.
31359 * match.pd: Likewise.
31360 * omp-simd-clone.c (simd_clone_subparts): Likewise.
31361 * print-tree.c (print_node): Likewise.
31362 * stor-layout.c (layout_type): Likewise.
31363 * targhooks.c (default_builtin_vectorization_cost): Likewise.
31364 * tree-cfg.c (verify_gimple_comparison): Likewise.
31365 (verify_gimple_assign_binary): Likewise.
31366 (verify_gimple_assign_ternary): Likewise.
31367 (verify_gimple_assign_single): Likewise.
31368 * tree-pretty-print.c (dump_generic_node): Likewise.
31369 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31370 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31371 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31372 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31373 (vect_shift_permute_load_chain): Likewise.
31374 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31375 (expand_vector_condition, optimize_vector_constructor): Likewise.
31376 (lower_vec_perm, get_compute_type): Likewise.
31377 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31378 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31379 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31380 (vect_recog_mask_conversion_pattern): Likewise.
31381 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31382 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31383 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31384 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31385 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31386 (vectorizable_shift, vectorizable_operation, vectorizable_store)
31387 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31388 (supportable_widening_operation): Likewise.
31389 (supportable_narrowing_operation): Likewise.
31390 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31392 * varasm.c (output_constant): Likewise.
31394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31395 Alan Hayward <alan.hayward@arm.com>
31396 David Sherwood <david.sherwood@arm.com>
31398 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31399 so that both the length == 3 and length != 3 cases set up their
31400 own permute vectors. Add comments explaining why we know the
31401 number of elements is constant.
31402 (vect_permute_load_chain): Likewise.
31404 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31405 Alan Hayward <alan.hayward@arm.com>
31406 David Sherwood <david.sherwood@arm.com>
31408 * machmode.h (mode_nunits): Change from unsigned char to
31410 (ONLY_FIXED_SIZE_MODES): New macro.
31411 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31412 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31413 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31415 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31416 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31417 or if measurement_type is not polynomial.
31418 * genmodes.c (ZERO_COEFFS): New macro.
31419 (emit_mode_nunits_inline): Make mode_nunits_inline return a
31421 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31422 Use ZERO_COEFFS when emitting initializers.
31423 * data-streamer.h (bp_pack_poly_value): New function.
31424 (bp_unpack_poly_value): Likewise.
31425 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31426 for GET_MODE_NUNITS.
31427 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31428 for GET_MODE_NUNITS.
31429 * tree.c (make_vector_type): Remove temporary shim and make
31430 the real function take the number of units as a poly_uint64
31431 rather than an int.
31432 (build_vector_type_for_mode): Handle polynomial nunits.
31433 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31434 * emit-rtl.c (const_vec_series_p_1): Likewise.
31435 (gen_rtx_CONST_VECTOR): Likewise.
31436 * fold-const.c (test_vec_duplicate_folding): Likewise.
31437 * genrecog.c (validate_pattern): Likewise.
31438 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31439 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31440 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31441 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31442 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31443 * rtlanal.c (subreg_get_info): Likewise.
31444 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31445 (vect_grouped_load_supported): Likewise.
31446 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31447 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31448 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31449 (simplify_const_unary_operation, simplify_binary_operation_1)
31450 (simplify_const_binary_operation, simplify_ternary_operation)
31451 (test_vector_ops_duplicate, test_vector_ops): Likewise.
31452 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31453 instead of CONST_VECTOR_NUNITS.
31454 * varasm.c (output_constant_pool_2): Likewise.
31455 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31456 explicit-encoded elements in the XVEC for variable-length vectors.
31458 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31460 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31462 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31463 Alan Hayward <alan.hayward@arm.com>
31464 David Sherwood <david.sherwood@arm.com>
31466 * coretypes.h (fixed_size_mode): Declare.
31467 (fixed_size_mode_pod): New typedef.
31468 * builtins.h (target_builtins::x_apply_args_mode)
31469 (target_builtins::x_apply_result_mode): Change type to
31470 fixed_size_mode_pod.
31471 * builtins.c (apply_args_size, apply_result_size, result_vector)
31472 (expand_builtin_apply_args_1, expand_builtin_apply)
31473 (expand_builtin_return): Update accordingly.
31475 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31477 * cse.c (hash_rtx_cb): Hash only the encoded elements.
31478 * cselib.c (cselib_hash_rtx): Likewise.
31479 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31480 CONST_VECTOR encoding.
31482 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31483 Jeff Law <law@redhat.com>
31486 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31487 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31488 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31489 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31492 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31493 explicitly probe *sp in a noreturn function if there were any callee
31494 register saves or frame pointer is needed.
31496 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31499 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31500 BLKmode for ternary, binary or unary expressions.
31503 * var-tracking.c (delete_vta_debug_insn): New inline function.
31504 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31505 insns from get_insns () to NULL instead of each bb separately.
31506 Use delete_vta_debug_insn. No longer static.
31507 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31508 delete_vta_debug_insns callers.
31509 * rtl.h (delete_vta_debug_insns): Declare.
31510 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31511 instead of variable_tracking_main.
31513 2018-01-03 Martin Sebor <msebor@redhat.com>
31515 PR tree-optimization/83603
31516 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31517 arguments past the endof the argument list in functions declared
31518 without a prototype.
31519 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31520 Avoid checking when arguments are null.
31522 2018-01-03 Martin Sebor <msebor@redhat.com>
31525 * doc/extend.texi (attribute const): Fix a typo.
31526 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31527 issuing -Wsuggest-attribute for void functions.
31529 2018-01-03 Martin Sebor <msebor@redhat.com>
31531 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31532 offset_int::from instead of wide_int::to_shwi.
31533 (maybe_diag_overlap): Remove assertion.
31534 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31535 * gimple-ssa-sprintf.c (format_directive): Same.
31536 (parse_directive): Same.
31537 (sprintf_dom_walker::compute_format_length): Same.
31538 (try_substitute_return_value): Same.
31540 2018-01-03 Jeff Law <law@redhat.com>
31542 PR middle-end/83654
31543 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31544 non-constant residual for zero at runtime and avoid probing in
31545 that case. Reorganize code for trailing problem to mirror handling
31548 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31550 PR tree-optimization/83501
31551 * tree-ssa-strlen.c (get_string_cst): New.
31552 (handle_char_store): Call get_string_cst.
31554 2018-01-03 Martin Liska <mliska@suse.cz>
31556 PR tree-optimization/83593
31557 * tree-ssa-strlen.c: Include tree-cfg.h.
31558 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31559 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31560 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31562 (strlen_dom_walker::before_dom_children): Call
31563 gimple_purge_dead_eh_edges. Dump tranformation with details
31565 (strlen_dom_walker::before_dom_children): Update call by adding
31566 new argument cleanup_eh.
31567 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31569 2018-01-03 Martin Liska <mliska@suse.cz>
31572 * cif-code.def (VARIADIC_THUNK): New enum value.
31573 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31576 2018-01-03 Jan Beulich <jbeulich@suse.com>
31578 * sse.md (mov<mode>_internal): Tighten condition for when to use
31579 vmovdqu<ssescalarsize> for TI and OI modes.
31581 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31583 Update copyright years.
31585 2018-01-03 Martin Liska <mliska@suse.cz>
31588 * ipa-visibility.c (function_and_variable_visibility): Skip
31589 functions with noipa attribure.
31591 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31593 * gcc.c (process_command): Update copyright notice dates.
31594 * gcov-dump.c (print_version): Ditto.
31595 * gcov.c (print_version): Ditto.
31596 * gcov-tool.c (print_version): Ditto.
31597 * gengtype.c (create_file): Ditto.
31598 * doc/cpp.texi: Bump @copying's copyright year.
31599 * doc/cppinternals.texi: Ditto.
31600 * doc/gcc.texi: Ditto.
31601 * doc/gccint.texi: Ditto.
31602 * doc/gcov.texi: Ditto.
31603 * doc/install.texi: Ditto.
31604 * doc/invoke.texi: Ditto.
31606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31608 * vector-builder.h (vector_builder::m_full_nelts): Change from
31609 unsigned int to poly_uint64.
31610 (vector_builder::full_nelts): Update prototype accordingly.
31611 (vector_builder::new_vector): Likewise.
31612 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31613 (vector_builder::operator ==): Likewise.
31614 (vector_builder::finalize): Likewise.
31615 * int-vector-builder.h (int_vector_builder::int_vector_builder):
31616 Take the number of elements as a poly_uint64 rather than an
31618 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31619 from unsigned int to poly_uint64.
31620 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31621 (vec_perm_indices::new_vector): Likewise.
31622 (vec_perm_indices::length): Likewise.
31623 (vec_perm_indices::nelts_per_input): Likewise.
31624 (vec_perm_indices::input_nelts): Likewise.
31625 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31626 number of elements per input as a poly_uint64 rather than an
31627 unsigned int. Use the original encoding for variable-length
31628 vectors, rather than clamping each individual element.
31629 For the second and subsequent elements in each pattern,
31630 clamp the step and base before clamping their sum.
31631 (vec_perm_indices::series_p): Handle polynomial element counts.
31632 (vec_perm_indices::all_in_range_p): Likewise.
31633 (vec_perm_indices_to_tree): Likewise.
31634 (vec_perm_indices_to_rtx): Likewise.
31635 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31636 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31637 (tree_vector_builder::new_binary_operation): Handle polynomial
31638 element counts. Return false if we need to know the number
31639 of elements at compile time.
31640 * fold-const.c (fold_vec_perm): Punt if the number of elements
31641 isn't known at compile time.
31643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31645 * vec-perm-indices.h (vec_perm_builder): Change element type
31646 from HOST_WIDE_INT to poly_int64.
31647 (vec_perm_indices::element_type): Update accordingly.
31648 (vec_perm_indices::clamp): Handle polynomial element_types.
31649 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31650 (vec_perm_indices::all_in_range_p): Likewise.
31651 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31653 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31654 polynomial vec_perm_indices element types.
31655 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31656 * fold-const.c (fold_vec_perm): Likewise.
31657 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31658 * tree-vect-generic.c (lower_vec_perm): Likewise.
31659 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31660 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31661 element type to HOST_WIDE_INT.
31663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31664 Alan Hayward <alan.hayward@arm.com>
31665 David Sherwood <david.sherwood@arm.com>
31667 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31668 rather than an int. Use plus_constant.
31669 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31670 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31672 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31673 Alan Hayward <alan.hayward@arm.com>
31674 David Sherwood <david.sherwood@arm.com>
31676 * calls.c (emit_call_1, expand_call): Change struct_value_size from
31677 a HOST_WIDE_INT to a poly_int64.
31679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31680 Alan Hayward <alan.hayward@arm.com>
31681 David Sherwood <david.sherwood@arm.com>
31683 * calls.c (load_register_parameters): Cope with polynomial
31684 mode sizes. Require a constant size for BLKmode parameters
31685 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
31686 forces a parameter to be padded at the lsb end in order to
31687 fill a complete number of words, require the parameter size
31688 to be ordered wrt UNITS_PER_WORD.
31690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31691 Alan Hayward <alan.hayward@arm.com>
31692 David Sherwood <david.sherwood@arm.com>
31694 * reload1.c (spill_stack_slot_width): Change element type
31695 from unsigned int to poly_uint64_pod.
31696 (alter_reg): Treat mode sizes as polynomial.
31698 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31699 Alan Hayward <alan.hayward@arm.com>
31700 David Sherwood <david.sherwood@arm.com>
31702 * reload.c (complex_word_subreg_p): New function.
31703 (reload_inner_reg_of_subreg, push_reload): Use it.
31705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31706 Alan Hayward <alan.hayward@arm.com>
31707 David Sherwood <david.sherwood@arm.com>
31709 * lra-constraints.c (process_alt_operands): Reject matched
31710 operands whose sizes aren't ordered.
31711 (match_reload): Refer to this check here.
31713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31714 Alan Hayward <alan.hayward@arm.com>
31715 David Sherwood <david.sherwood@arm.com>
31717 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31718 that the mode size is in the set {1, 2, 4, 8, 16}.
31720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31721 Alan Hayward <alan.hayward@arm.com>
31722 David Sherwood <david.sherwood@arm.com>
31724 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31725 Use plus_constant instead of gen_rtx_PLUS.
31727 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31728 Alan Hayward <alan.hayward@arm.com>
31729 David Sherwood <david.sherwood@arm.com>
31731 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31732 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31733 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31734 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31735 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31736 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31737 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31738 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31739 * config/i386/i386.c (ix86_push_rounding): ...this new function.
31740 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31742 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31743 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31744 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31745 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31746 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31747 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31748 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31749 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31750 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31751 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31753 * expr.c (emit_move_resolve_push): Treat the input and result
31754 of PUSH_ROUNDING as a poly_int64.
31755 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31756 (emit_push_insn): Likewise.
31757 * lra-eliminations.c (mark_not_eliminable): Likewise.
31758 * recog.c (push_operand): Likewise.
31759 * reload1.c (elimination_effects): Likewise.
31760 * rtlanal.c (nonzero_bits1): Likewise.
31761 * calls.c (store_one_arg): Likewise. Require the padding to be
31762 known at compile time.
31764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31765 Alan Hayward <alan.hayward@arm.com>
31766 David Sherwood <david.sherwood@arm.com>
31768 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31769 Use plus_constant instead of gen_rtx_PLUS.
31771 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31772 Alan Hayward <alan.hayward@arm.com>
31773 David Sherwood <david.sherwood@arm.com>
31775 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31776 rather than an int.
31778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31779 Alan Hayward <alan.hayward@arm.com>
31780 David Sherwood <david.sherwood@arm.com>
31782 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31783 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31784 via stack temporaries. Treat the mode size as polynomial too.
31786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31787 Alan Hayward <alan.hayward@arm.com>
31788 David Sherwood <david.sherwood@arm.com>
31790 * expr.c (expand_expr_real_2): When handling conversions involving
31791 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31792 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
31793 as a poly_uint64 too.
31795 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31796 Alan Hayward <alan.hayward@arm.com>
31797 David Sherwood <david.sherwood@arm.com>
31799 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31801 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31802 Alan Hayward <alan.hayward@arm.com>
31803 David Sherwood <david.sherwood@arm.com>
31805 * combine.c (can_change_dest_mode): Handle polynomial
31806 REGMODE_NATURAL_SIZE.
31807 * expmed.c (store_bit_field_1): Likewise.
31808 * expr.c (store_constructor): Likewise.
31809 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31810 and polynomial REGMODE_NATURAL_SIZE.
31811 (gen_lowpart_common): Likewise.
31812 * reginfo.c (record_subregs_of_mode): Likewise.
31813 * rtlanal.c (read_modify_subreg_p): Likewise.
31815 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31816 Alan Hayward <alan.hayward@arm.com>
31817 David Sherwood <david.sherwood@arm.com>
31819 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31820 numbers of elements.
31822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31823 Alan Hayward <alan.hayward@arm.com>
31824 David Sherwood <david.sherwood@arm.com>
31826 * match.pd: Cope with polynomial numbers of vector elements.
31828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31829 Alan Hayward <alan.hayward@arm.com>
31830 David Sherwood <david.sherwood@arm.com>
31832 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31833 in a POINTER_PLUS_EXPR.
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 * omp-simd-clone.c (simd_clone_subparts): New function.
31840 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31841 (ipa_simd_modify_function_body): Likewise.
31843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31844 Alan Hayward <alan.hayward@arm.com>
31845 David Sherwood <david.sherwood@arm.com>
31847 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31848 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31849 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31850 (expand_vector_condition, vector_element): Likewise.
31851 (subparts_gt): New function.
31852 (get_compute_type): Use subparts_gt.
31853 (count_type_subparts): Delete.
31854 (expand_vector_operations_1): Use subparts_gt instead of
31855 count_type_subparts.
31857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31858 Alan Hayward <alan.hayward@arm.com>
31859 David Sherwood <david.sherwood@arm.com>
31861 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31862 (vect_compile_time_alias): ...this new function. Do the calculation
31863 on poly_ints rather than trees.
31864 (vect_prune_runtime_alias_test_list): Update call accordingly.
31866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31867 Alan Hayward <alan.hayward@arm.com>
31868 David Sherwood <david.sherwood@arm.com>
31870 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31872 (vect_schedule_slp_instance): Likewise.
31874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31875 Alan Hayward <alan.hayward@arm.com>
31876 David Sherwood <david.sherwood@arm.com>
31878 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31879 constant and extern definitions for variable-length vectors.
31880 (vect_get_constant_vectors): Note that the number of units
31881 is known to be constant.
31883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31884 Alan Hayward <alan.hayward@arm.com>
31885 David Sherwood <david.sherwood@arm.com>
31887 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31888 of units as polynomial. Choose between WIDE and NARROW based
31891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31892 Alan Hayward <alan.hayward@arm.com>
31893 David Sherwood <david.sherwood@arm.com>
31895 * tree-vect-stmts.c (simd_clone_subparts): New function.
31896 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31899 Alan Hayward <alan.hayward@arm.com>
31900 David Sherwood <david.sherwood@arm.com>
31902 * tree-vect-stmts.c (vectorizable_call): Treat the number of
31903 vectors as polynomial. Use build_index_vector for
31904 IFN_GOMP_SIMD_LANE.
31906 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31907 Alan Hayward <alan.hayward@arm.com>
31908 David Sherwood <david.sherwood@arm.com>
31910 * tree-vect-stmts.c (get_load_store_type): Treat the number of
31911 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31912 for variable-length vectors.
31913 (vectorizable_mask_load_store): Treat the number of units as
31914 polynomial, asserting that it is constant if the condition has
31915 already been enforced.
31916 (vectorizable_store, vectorizable_load): Likewise.
31918 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31919 Alan Hayward <alan.hayward@arm.com>
31920 David Sherwood <david.sherwood@arm.com>
31922 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31923 of units as polynomial. Punt if we can't tell at compile time
31924 which vector contains the final result.
31926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31927 Alan Hayward <alan.hayward@arm.com>
31928 David Sherwood <david.sherwood@arm.com>
31930 * tree-vect-loop.c (vectorizable_induction): Treat the number
31931 of units as polynomial. Punt on SLP inductions. Use an integer
31932 VEC_SERIES_EXPR for variable-length integer reductions. Use a
31933 cast of such a series for variable-length floating-point
31936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31937 Alan Hayward <alan.hayward@arm.com>
31938 David Sherwood <david.sherwood@arm.com>
31940 * tree.h (build_index_vector): Declare.
31941 * tree.c (build_index_vector): New function.
31942 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31943 of units as polynomial, forcibly converting it to a constant if
31944 vectorizable_reduction has already enforced the condition.
31945 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
31946 to create a {1,2,3,...} vector.
31947 (vectorizable_reduction): Treat the number of units as polynomial.
31948 Choose vectype_in based on the largest scalar element size rather
31949 than the smallest number of units. Enforce the restrictions
31952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31953 Alan Hayward <alan.hayward@arm.com>
31954 David Sherwood <david.sherwood@arm.com>
31956 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31957 number of units as polynomial.
31959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31960 Alan Hayward <alan.hayward@arm.com>
31961 David Sherwood <david.sherwood@arm.com>
31963 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31964 * target.def (autovectorize_vector_sizes): Return the vector sizes
31965 by pointer, using vector_sizes rather than a bitmask.
31966 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31967 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31968 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31970 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31971 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31972 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31973 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31974 * omp-general.c (omp_max_vf): Likewise.
31975 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31976 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31977 * tree-vect-loop.c (vect_analyze_loop): Likewise.
31978 * tree-vect-slp.c (vect_slp_bb): Likewise.
31979 * doc/tm.texi: Regenerate.
31980 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31982 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31983 the vector size as a poly_uint64 rather than an unsigned int.
31984 (current_vector_size): Change from an unsigned int to a poly_uint64.
31985 (get_vectype_for_scalar_type): Update accordingly.
31986 * tree.h (build_truth_vector_type): Take the size and number of
31987 units as a poly_uint64 rather than an unsigned int.
31988 (build_vector_type): Add a temporary overload that takes
31989 the number of units as a poly_uint64 rather than an unsigned int.
31990 * tree.c (make_vector_type): Likewise.
31991 (build_truth_vector_type): Take the number of units as a poly_uint64
31992 rather than an unsigned int.
31994 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31995 Alan Hayward <alan.hayward@arm.com>
31996 David Sherwood <david.sherwood@arm.com>
31998 * target.def (get_mask_mode): Take the number of units and length
31999 as poly_uint64s rather than unsigned ints.
32000 * targhooks.h (default_get_mask_mode): Update accordingly.
32001 * targhooks.c (default_get_mask_mode): Likewise.
32002 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
32003 * doc/tm.texi: Regenerate.
32005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32006 Alan Hayward <alan.hayward@arm.com>
32007 David Sherwood <david.sherwood@arm.com>
32009 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
32010 * omp-general.c (omp_max_vf): Likewise.
32011 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
32012 (expand_omp_simd): Handle polynomial safelen.
32013 * omp-low.c (omplow_simd_context): Add a default constructor.
32014 (omplow_simd_context::max_vf): Change from int to poly_uint64.
32015 (lower_rec_simd_input_clauses): Update accordingly.
32016 (lower_rec_input_clauses): Likewise.
32018 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32019 Alan Hayward <alan.hayward@arm.com>
32020 David Sherwood <david.sherwood@arm.com>
32022 * tree-vectorizer.h (vect_nunits_for_cost): New function.
32023 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
32024 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
32025 (vect_analyze_slp_cost): Likewise.
32026 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
32027 (vect_model_load_cost): Likewise.
32029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32030 Alan Hayward <alan.hayward@arm.com>
32031 David Sherwood <david.sherwood@arm.com>
32033 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
32034 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
32035 from an unsigned int * to a poly_uint64_pod *.
32036 (calculate_unrolling_factor): New function.
32037 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
32039 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32040 Alan Hayward <alan.hayward@arm.com>
32041 David Sherwood <david.sherwood@arm.com>
32043 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
32044 from an unsigned int to a poly_uint64.
32045 (_loop_vec_info::slp_unrolling_factor): Likewise.
32046 (_loop_vec_info::vectorization_factor): Change from an int
32048 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
32049 (vect_get_num_vectors): New function.
32050 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
32051 (vect_get_num_copies): Use vect_get_num_vectors.
32052 (vect_analyze_data_ref_dependences): Change max_vf from an int *
32053 to an unsigned int *.
32054 (vect_analyze_data_refs): Change min_vf from an int * to a
32056 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32057 than an unsigned HOST_WIDE_INT.
32058 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
32059 (vect_analyze_data_ref_dependence): Change max_vf from an int *
32060 to an unsigned int *.
32061 (vect_analyze_data_ref_dependences): Likewise.
32062 (vect_compute_data_ref_alignment): Handle polynomial vf.
32063 (vect_enhance_data_refs_alignment): Likewise.
32064 (vect_prune_runtime_alias_test_list): Likewise.
32065 (vect_shift_permute_load_chain): Likewise.
32066 (vect_supportable_dr_alignment): Likewise.
32067 (dependence_distance_ge_vf): Take the vectorization factor as a
32068 poly_uint64 rather than an unsigned HOST_WIDE_INT.
32069 (vect_analyze_data_refs): Change min_vf from an int * to a
32071 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
32072 vfm1 as a poly_uint64 rather than an int. Make the same change
32073 for the returned bound_scalar.
32074 (vect_gen_vector_loop_niters): Handle polynomial vf.
32075 (vect_do_peeling): Likewise. Update call to
32076 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
32077 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
32079 * tree-vect-loop.c (vect_determine_vectorization_factor)
32080 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
32081 (vect_get_known_peeling_cost): Likewise.
32082 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
32083 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
32084 (vect_transform_loop): Likewise. Use the lowest possible VF when
32085 updating the upper bounds of the loop.
32086 (vect_min_worthwhile_factor): Make static. Return an unsigned int
32087 rather than an int.
32088 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
32089 polynomial unroll factors.
32090 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
32091 (vect_make_slp_decision): Likewise.
32092 (vect_supported_load_permutation_p): Likewise, and polynomial
32094 (vect_analyze_slp_cost): Handle polynomial vf.
32095 (vect_slp_analyze_node_operations): Likewise.
32096 (vect_slp_analyze_bb_1): Likewise.
32097 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32098 than an unsigned HOST_WIDE_INT.
32099 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
32100 (vectorizable_load): Handle polynomial vf.
32101 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
32103 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
32105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32106 Alan Hayward <alan.hayward@arm.com>
32107 David Sherwood <david.sherwood@arm.com>
32109 * match.pd: Handle bit operations involving three constants
32110 and try to fold one pair.
32112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32114 * tree-vect-loop-manip.c: Include gimple-fold.h.
32115 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
32116 niters_maybe_zero parameters. Handle other cases besides a step of 1.
32117 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
32118 Add a path that uses a step of VF instead of 1, but disable it
32120 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
32121 and niters_no_overflow parameters. Update calls to
32122 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
32123 Create a new SSA name if the latter choses to use a ste other
32124 than zero, and return it via niters_vector_mult_vf_var.
32125 * tree-vect-loop.c (vect_transform_loop): Update calls to
32126 vect_do_peeling, vect_gen_vector_loop_niters and
32127 slpeel_make_loop_iterate_ntimes.
32128 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
32129 (vect_gen_vector_loop_niters): Update declarations after above changes.
32131 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
32133 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
32134 128-bit round to integer instructions.
32135 (ceil<mode>2): Likewise.
32136 (btrunc<mode>2): Likewise.
32137 (round<mode>2): Likewise.
32139 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32141 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
32142 unaligned VSX load/store on P8/P9.
32143 (expand_block_clear): Allow the use of unaligned VSX
32144 load/store on P8/P9.
32146 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32148 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
32150 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
32151 swap associated with both a load and a store.
32153 2018-01-02 Andrew Waterman <andrew@sifive.com>
32155 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
32156 * config/riscv/riscv.md (clear_cache): Use it.
32158 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
32160 * web.c: Remove out-of-date comment.
32162 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32164 * expr.c (fixup_args_size_notes): Check that any existing
32165 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32166 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32167 (emit_single_push_insn): ...here.
32169 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32171 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32172 (const_vector_encoded_nelts): New function.
32173 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
32174 (const_vector_int_elt, const_vector_elt): Declare.
32175 * emit-rtl.c (const_vector_int_elt_1): New function.
32176 (const_vector_elt): Likewise.
32177 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
32178 of CONST_VECTOR_ELT.
32180 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32182 * expr.c: Include rtx-vector-builder.h.
32183 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
32184 directly on the tree encoding.
32185 (const_vector_from_tree): Likewise.
32186 * optabs.c: Include rtx-vector-builder.h.
32187 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
32188 sequence of "u" values.
32189 * vec-perm-indices.c: Include rtx-vector-builder.h.
32190 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
32191 directly on the vec_perm_indices encoding.
32193 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32195 * doc/rtl.texi (const_vector): Describe new encoding scheme.
32196 * Makefile.in (OBJS): Add rtx-vector-builder.o.
32197 * rtx-vector-builder.h: New file.
32198 * rtx-vector-builder.c: Likewise.
32199 * rtl.h (rtx_def::u2): Add a const_vector field.
32200 (CONST_VECTOR_NPATTERNS): New macro.
32201 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
32202 (CONST_VECTOR_DUPLICATE_P): Likewise.
32203 (CONST_VECTOR_STEPPED_P): Likewise.
32204 (CONST_VECTOR_ENCODED_ELT): Likewise.
32205 (const_vec_duplicate_p): Check for a duplicated vector encoding.
32206 (unwrap_const_vec_duplicate): Likewise.
32207 (const_vec_series_p): Check for a non-duplicated vector encoding.
32208 Say that the function only returns true for integer vectors.
32209 * emit-rtl.c: Include rtx-vector-builder.h.
32210 (gen_const_vec_duplicate_1): Delete.
32211 (gen_const_vector): Call gen_const_vec_duplicate instead of
32212 gen_const_vec_duplicate_1.
32213 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32214 (gen_const_vec_duplicate): Use rtx_vector_builder.
32215 (gen_const_vec_series): Likewise.
32216 (gen_rtx_CONST_VECTOR): Likewise.
32217 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32218 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32219 Build a new vector rather than modifying a CONST_VECTOR in-place.
32220 (handle_special_swappables): Update call accordingly.
32221 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32222 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32223 Build a new vector rather than modifying a CONST_VECTOR in-place.
32224 (handle_special_swappables): Update call accordingly.
32226 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32228 * simplify-rtx.c (simplify_const_binary_operation): Use
32229 CONST_VECTOR_ELT instead of XVECEXP.
32231 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32233 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32234 the selector elements to be different from the data elements
32235 if the selector is a VECTOR_CST.
32236 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32237 ssizetype for the selector.
32239 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32241 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32242 before testing each element individually.
32243 * tree-vect-generic.c (lower_vec_perm): Likewise.
32245 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32247 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32248 * selftest-run-tests.c (selftest::run_tests): Call it.
32249 * vector-builder.h (vector_builder::operator ==): New function.
32250 (vector_builder::operator !=): Likewise.
32251 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32252 (vec_perm_indices::all_from_input_p): New function.
32253 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32254 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32255 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32256 instead of reading the VECTOR_CST directly. Detect whether both
32257 vector inputs are the same before constructing the vec_perm_indices,
32258 and update the number of inputs argument accordingly. Use the
32259 utility functions added above. Only construct sel2 if we need to.
32261 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32263 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32264 the broadcast of the low byte.
32265 (expand_mult_highpart): Use an explicit encoding for the permutes.
32266 * optabs-query.c (can_mult_highpart_p): Likewise.
32267 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32268 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32269 (vectorizable_bswap): Likewise.
32270 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32271 explicit encoding for the power-of-2 permutes.
32272 (vect_permute_store_chain): Likewise.
32273 (vect_grouped_load_supported): Likewise.
32274 (vect_permute_load_chain): Likewise.
32276 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32278 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32279 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32280 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32281 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32282 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32283 (vect_gen_perm_mask_any): Likewise.
32285 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32287 * int-vector-builder.h: New file.
32288 * vec-perm-indices.h: Include int-vector-builder.h.
32289 (vec_perm_indices): Redefine as an int_vector_builder.
32290 (auto_vec_perm_indices): Delete.
32291 (vec_perm_builder): Redefine as a stand-alone class.
32292 (vec_perm_indices::vec_perm_indices): New function.
32293 (vec_perm_indices::clamp): Likewise.
32294 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32295 (vec_perm_indices::new_vector): New function.
32296 (vec_perm_indices::new_expanded_vector): Update for new
32297 vec_perm_indices class.
32298 (vec_perm_indices::rotate_inputs): New function.
32299 (vec_perm_indices::all_in_range_p): Operate directly on the
32300 encoded form, without computing elided elements.
32301 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32302 encoding. Update for new vec_perm_indices class.
32303 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32304 the given vec_perm_builder.
32305 (expand_vec_perm_var): Update vec_perm_builder constructor.
32306 (expand_mult_highpart): Use vec_perm_builder instead of
32307 auto_vec_perm_indices.
32308 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32309 vec_perm_indices instead of auto_vec_perm_indices. Use a single
32310 or double series encoding as appropriate.
32311 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32312 vec_perm_indices instead of auto_vec_perm_indices.
32313 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32314 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32315 (vect_permute_store_chain): Likewise.
32316 (vect_grouped_load_supported): Likewise.
32317 (vect_permute_load_chain): Likewise.
32318 (vect_shift_permute_load_chain): Likewise.
32319 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32320 (vect_transform_slp_perm_load): Likewise.
32321 (vect_schedule_slp_instance): Likewise.
32322 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32323 (vectorizable_mask_load_store): Likewise.
32324 (vectorizable_bswap): Likewise.
32325 (vectorizable_store): Likewise.
32326 (vectorizable_load): Likewise.
32327 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32328 vec_perm_indices instead of auto_vec_perm_indices. Use
32329 tree_to_vec_perm_builder to read the vector from a tree.
32330 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32331 vec_perm_builder instead of a vec_perm_indices.
32332 (have_whole_vector_shift): Use vec_perm_builder and
32333 vec_perm_indices instead of auto_vec_perm_indices. Leave the
32334 truncation to calc_vec_perm_mask_for_shift.
32335 (vect_create_epilog_for_reduction): Likewise.
32336 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32337 from auto_vec_perm_indices to vec_perm_indices.
32338 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32339 instead of changing individual elements.
32340 (aarch64_vectorize_vec_perm_const): Use new_vector to install
32341 the vector in d.perm.
32342 * config/arm/arm.c (expand_vec_perm_d::perm): Change
32343 from auto_vec_perm_indices to vec_perm_indices.
32344 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32345 instead of changing individual elements.
32346 (arm_vectorize_vec_perm_const): Use new_vector to install
32347 the vector in d.perm.
32348 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32349 Update vec_perm_builder constructor.
32350 (rs6000_expand_interleave): Likewise.
32351 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32352 (rs6000_expand_interleave): Likewise.
32354 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32356 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32357 to qimode could truncate the indices.
32358 * optabs.c (expand_vec_perm_var): Likewise.
32360 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32362 * Makefile.in (OBJS): Add vec-perm-indices.o.
32363 * vec-perm-indices.h: New file.
32364 * vec-perm-indices.c: Likewise.
32365 * target.h (vec_perm_indices): Replace with a forward class
32367 (auto_vec_perm_indices): Move to vec-perm-indices.h.
32368 * optabs.h: Include vec-perm-indices.h.
32369 (expand_vec_perm): Delete.
32370 (selector_fits_mode_p, expand_vec_perm_var): Declare.
32371 (expand_vec_perm_const): Declare.
32372 * target.def (vec_perm_const_ok): Replace with...
32373 (vec_perm_const): ...this new hook.
32374 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32375 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32376 * doc/tm.texi: Regenerate.
32377 * optabs.def (vec_perm_const): Delete.
32378 * doc/md.texi (vec_perm_const): Likewise.
32379 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32380 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32381 expand_vec_perm for constant permutation vectors. Assert that
32382 the mode of variable permutation vectors is the integer equivalent
32383 of the mode that is being permuted.
32384 * optabs-query.h (selector_fits_mode_p): Declare.
32385 * optabs-query.c: Include vec-perm-indices.h.
32386 (selector_fits_mode_p): New function.
32387 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32388 is defined, instead of checking whether the vec_perm_const_optab
32389 exists. Use targetm.vectorize.vec_perm_const instead of
32390 targetm.vectorize.vec_perm_const_ok. Check whether the indices
32391 fit in the vector mode before using a variable permute.
32392 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32393 vec_perm_indices instead of an rtx.
32394 (expand_vec_perm): Replace with...
32395 (expand_vec_perm_const): ...this new function. Take the selector
32396 as a vec_perm_indices rather than an rtx. Also take the mode of
32397 the selector. Update call to shift_amt_for_vec_perm_mask.
32398 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32399 Use vec_perm_indices::new_expanded_vector to expand the original
32400 selector into bytes. Check whether the indices fit in the vector
32401 mode before using a variable permute.
32402 (expand_vec_perm_var): Make global.
32403 (expand_mult_highpart): Use expand_vec_perm_const.
32404 * fold-const.c: Includes vec-perm-indices.h.
32405 * tree-ssa-forwprop.c: Likewise.
32406 * tree-vect-data-refs.c: Likewise.
32407 * tree-vect-generic.c: Likewise.
32408 * tree-vect-loop.c: Likewise.
32409 * tree-vect-slp.c: Likewise.
32410 * tree-vect-stmts.c: Likewise.
32411 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32413 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32414 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32415 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32416 (aarch64_vectorize_vec_perm_const): ...this new function.
32417 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32418 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32419 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32420 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32421 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32422 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32423 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32425 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
32426 check for NEON modes.
32427 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32428 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32429 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32430 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32432 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
32433 the old VEC_PERM_CONST conditions.
32434 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32435 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32436 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32437 (ia64_vectorize_vec_perm_const_ok): Merge into...
32438 (ia64_vectorize_vec_perm_const): ...this new function.
32439 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32440 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32441 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32442 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32443 * config/mips/mips.c (mips_expand_vec_perm_const)
32444 (mips_vectorize_vec_perm_const_ok): Merge into...
32445 (mips_vectorize_vec_perm_const): ...this new function.
32446 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32447 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32448 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32449 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32450 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32451 (rs6000_expand_vec_perm_const): Delete.
32452 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32454 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32455 (altivec_expand_vec_perm_const_le): Take each operand individually.
32456 Operate on constant selectors rather than rtxes.
32457 (altivec_expand_vec_perm_const): Likewise. Update call to
32458 altivec_expand_vec_perm_const_le.
32459 (rs6000_expand_vec_perm_const): Delete.
32460 (rs6000_vectorize_vec_perm_const_ok): Delete.
32461 (rs6000_vectorize_vec_perm_const): New function.
32462 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32463 an element count and rtx array.
32464 (rs6000_expand_extract_even): Update call accordingly.
32465 (rs6000_expand_interleave): Likewise.
32466 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32467 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32468 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32469 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32470 (rs6000_expand_vec_perm_const): Delete.
32471 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32472 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32473 (altivec_expand_vec_perm_const_le): Take each operand individually.
32474 Operate on constant selectors rather than rtxes.
32475 (altivec_expand_vec_perm_const): Likewise. Update call to
32476 altivec_expand_vec_perm_const_le.
32477 (rs6000_expand_vec_perm_const): Delete.
32478 (rs6000_vectorize_vec_perm_const_ok): Delete.
32479 (rs6000_vectorize_vec_perm_const): New function. Remove stray
32480 reference to the SPE evmerge intructions.
32481 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32482 an element count and rtx array.
32483 (rs6000_expand_extract_even): Update call accordingly.
32484 (rs6000_expand_interleave): Likewise.
32485 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32486 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32488 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32490 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32492 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32493 vector mode and that that mode matches the mode of the data
32495 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32496 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
32497 directly using expand_vec_perm_1 when forcing selectors into
32499 (expand_vec_perm_var): New function, split out from expand_vec_perm.
32501 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32503 * optabs-query.h (can_vec_perm_p): Delete.
32504 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32505 * optabs-query.c (can_vec_perm_p): Split into...
32506 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32507 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32508 particular selector is valid.
32509 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32510 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32511 (vect_grouped_load_supported): Likewise.
32512 (vect_shift_permute_load_chain): Likewise.
32513 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32514 (vect_transform_slp_perm_load): Likewise.
32515 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32516 (vectorizable_bswap): Likewise.
32517 (vect_gen_perm_mask_checked): Likewise.
32518 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32519 implementations of variable permutation vectors into account
32520 when deciding which selector to use.
32521 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32522 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32523 with a false third argument.
32524 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32525 to test whether the constant selector is valid and can_vec_perm_var_p
32526 to test whether a variable selector is valid.
32528 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32530 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32531 * optabs-query.c (can_vec_perm_p): Likewise.
32532 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32533 instead of vec_perm_indices.
32534 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32535 (vect_gen_perm_mask_checked): Likewise,
32536 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32537 (vect_gen_perm_mask_checked): Likewise,
32539 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32541 * optabs-query.h (qimode_for_vec_perm): Declare.
32542 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32543 (qimode_for_vec_perm): ...this new function.
32544 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32546 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32548 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32549 does not have a conditional at the top.
32551 2018-01-02 Richard Biener <rguenther@suse.de>
32553 * ipa-inline.c (big_speedup_p): Fix expression.
32555 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32558 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32561 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32565 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32566 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32567 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32568 cond_taken_branch_cost 3->4.
32570 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32572 PR tree-optimization/83581
32573 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32574 TODO_cleanup_cfg if any changes have been made.
32576 PR middle-end/83608
32577 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32578 convert_modes if target mode has the right side, but different mode
32581 PR middle-end/83609
32582 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32583 last argument when extracting from CONCAT. If either from_real or
32584 from_imag is NULL, use expansion through memory. If result is not
32585 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32586 the parts directly to inner mode, if even that fails, use expansion
32589 PR middle-end/83623
32590 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32591 check for bswap in mode rather than HImode and use that in expand_unop
32594 Copyright (C) 2018 Free Software Foundation, Inc.
32596 Copying and distribution of this file, with or without modification,
32597 are permitted in any medium without royalty provided the copyright
32598 notice and this notice are preserved.