1 2018-12-08 Jakub Jelinek <jakub@redhat.com>
4 * tree-nested.c (convert_local_reference_stmt): Handle clobbers where
5 lhs is not a decl normally, don't call use_pointer_in_frame on that
8 2018-12-08 Eric Botcazou <ebotcazou@adacore.com>
10 PR rtl-optimization/88390
11 * dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
12 (cfi_row_equal_p): Compare it.
13 (dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
14 If FAKE is false, set window_save of the current row.
15 (dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
16 function with FAKE parameter set to true.
17 <REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
18 (change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
20 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
23 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
24 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
25 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
26 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
27 require -mlong-double-128.
29 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31 * config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
33 (aarch64_parse_sve_width_string): Define.
35 2018-12-07 Jeff Law <law@redhat.com>
38 * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
39 m_update_global_ranges member. Add corresponding argument to ctor.
40 * gimple-ssa-evrp-analyze.c
41 (evrp_range_analyzer::evrp_range_analyzer): Add new argument and
42 initialize m_update_global_ranges.
43 (evrp_range_analyzer::set_ssa_range_info): Assert that we are
44 updating global ranges.
45 (evrp_range_analyzer::record_ranges_from_incoming_edge): Only
46 update global ranges if explicitly requested.
47 (evrp_range_analyzer::record_ranges_from_phis): Similarly.
48 (evrp_range_analyzer::record_ranges_from_stmt): Similarly.
49 * gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
50 evrp_range_analyzer ctor.
51 * gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
52 * tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
54 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
56 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
57 Add SVE_NOT_IMPLEMENTED value.
58 * config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
60 * config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
61 cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
62 cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
63 thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
64 saphira_tunings, thunderx2t99_tunings, emag_tunings):
66 (aarch64_estimated_poly_value): Define.
67 (TARGET_ESTIMATED_POLY_VALUE): Define.
69 2018-12-07 Paul A. Clarke <pc@us.ibm.com>
72 * config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
74 2018-12-07 Vladimir Makarov <vmakarov@redhat.com>
76 PR rtl-optimization/88349
77 * ira-costs.c (record_operand_costs): Check bigger reg class on
80 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
82 * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
83 Split the patterns after reload if we don't need the predicate
85 (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
87 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
89 * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
91 (sve_fp_op): Handle minus and mult.
92 * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
93 (*mul<mode>3): Split the patterns after reload if we don't
94 need the predicate operand.
95 (*post_ra_<sve_fp_op><mode>3): New pattern.
97 2018-12-07 Bin Cheng <bin.cheng@linux.alibaba.com>
99 * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
100 return condition when *this is precise zero.
102 2018-12-07 Jakub Jelinek <jakub@redhat.com>
105 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
106 for functions with naked attribute.
109 * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
110 with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
111 is non-NULL and offset is known to have most significant bit clear.
112 * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
113 of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
114 most significant bit clear. If offset does have most significant bit
115 set and -fno-delete-null-pointer-checks, don't return true even if
116 the base pointer is non-NULL.
118 2018-12-06 Alexandre Oliva <aoliva@redhat.com>
120 * cselib.c (cselib_record_sets): Skip strict low part sets
123 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
126 * config/rs6000/smmintrin.h: New file.
127 * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
129 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
132 * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
133 (_mm_unpacklo_pi8): Likewise.
134 (_mm_mulhi_pi16): Likewise.
135 (_mm_packs_pi16): Fix for big-endian. Use preferred API.
136 (_mm_packs_pi32): Likewise.
137 (_mm_packs_pu16): Likewise.
138 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
139 (_mm_cvtss_si64): Likewise.
140 (_mm_cvtpi32x2_ps): Likewise.
141 (_mm_shuffle_ps): Likewise.
142 (_mm_movemask_pi8): Likewise.
143 (_mm_mulhi_pu16): Likewise.
144 (_mm_sad_pu8): Likewise.
145 (_mm_sad_pu8): Likewise.
146 (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
147 (_mm_cvtpu8_ps): Likewise.
148 (_mm_movemask_ps): Better #else case for big-endian (no functional
150 (_mm_shuffle_pi16): Likewise.
151 * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
152 Better #else case for big-endian (no functional change).
153 (_mm_movemask_epi8): Likewise.
154 (_mm_shufflehi_epi16): Likewise.
155 (_mm_shufflelo_epi16): Likewise.
156 (_mm_shuffle_epi32): Likewise.
157 (_mm_mul_epu32): Fix for big-endian.
158 (_mm_bsrli_si128): Likewise.
159 (_mm_cvtps_pd): Better #else case for big endian.
160 (_mm_mulhi_epi16): Likewise.
161 (_mm_mul_epu32): Likewise.
162 (_mm_slli_si128): Likewise.
163 (_mm_sll_epi16): Likewise.
164 (_mm_sll_epi32): Likewise.
165 (_mm_sra_epi16): Likewise.
166 (_mm_sra_epi32): Likewise.
167 (_mm_srl_epi16): Likewise.
168 (_mm_srl_epi32): Likewise.
169 (_mm_mulhi_epu16): Likewise.
170 (_mm_sad_epu8): Likewise.
171 * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
172 (_mm_sub_ps): Likewise.
173 * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
174 * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
175 macros consistently (no functional changes).
176 (_mm_alignr_pi8): Likewise.
178 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
181 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
183 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
185 2018-12-06 Vladimir Makarov <vmakarov@redhat.com>
188 * ira.c (ira_init_register_move_cost): Use info from
189 hard_regno_mode_ok instead of contains_reg_of_mode.
190 * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
191 hard register class for some fixed hard registers.
193 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
195 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
196 (Size of an asm): Fix typo. Document asm inline.
197 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
198 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
199 (gimple_asm_set_volatile): Fix typo.
200 (gimple_asm_inline_p): New.
201 (gimple_asm_set_inline): New.
202 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
204 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
205 gimple_asm_inline_p flag, too.
206 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
208 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
209 a minimum size for an asm.
210 * tree.h (ASM_INLINE_P): New.
212 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
215 * doc/extend.texi (Basic Asm): Update grammar.
216 (Extended Asm): Update grammar.
218 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
221 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
222 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
223 stack alignment in non-leaf functions.
225 2018-12-06 Jakub Jelinek <jakub@redhat.com>
228 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
229 call output_operand_lossage on VOIDmode CONST_INTs. After
230 output_operand_lossage do return false.
232 2018-12-06 Richard Biener <rguenther@suse.de>
234 * df-problems.c (df_rd_local_compute): Use bitmap_release.
235 (df_live_free): Likewise.
236 (df_md_local_compute): Likewise.
237 (df_md_free): Release df_md_scratch bitmap.
238 * loop-invariant.c (calculate_loop_reg_pressure): Use
240 * sched-deps.c (true_dependency_cache, output_dependency_cache,
241 anti_dependency_cache, control_dependency_cache,
242 spec_dependency_cache): Use bitmap instead of bitmap_head *.
243 * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
244 dont_calc_deps as bitmap allocated from obstack not GC.
245 (schedule_ebbs_finish): Use bitmap_release.
246 * sched-rgn.c (schedule_insns): Initialize non-GTY
247 not_in_df as bitmap allocated from obstack not GC.
249 * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
250 (sel_region_init): Allocate forced_ebb_heads.
251 (sel_region_finish): Free forced_ebb_heads.
253 2018-12-06 Richard Biener <rguenther@suse.de>
255 * bitmap.c (bitmap_head::crashme): Define.
256 * bitmap.h (bitmap_head): Add constexpr default constructor
257 poisoning the obstack member.
258 (bitmap_head::crashme): Declare.
259 (bitmap_release): New function clearing a bitmap and poisoning
261 * gengtype.c (main): Make it recognize CONSTEXPR.
262 * lra-constraints.c (lra_inheritance): Use bitmap_release
263 instead of bitmap_clear.
264 * ira.c (ira): Work around class-memaccess warning.
265 * regrename.c (create_new_chain): Likewise.
267 2018-12-06 Jakub Jelinek <jakub@redhat.com>
269 PR tree-optimization/85726
270 * generic-match-head.c (optimize_successive_divisions_p): New function.
271 * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
272 * match.pd: Don't combine successive divisions if they aren't exact
273 and optimize_successive_divisions_p is false.
276 * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
277 for non-local automatic decls.
279 2018-12-05 David Edelsohn <dje.gcc@gmail.com>
281 * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
284 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
286 * dwarf2out.c (field_byte_offset): Remove
287 #ifdef PCC_BITFIELD_TYPE_MATTERS check.
289 2018-12-05 Richard Biener <rguenther@suse.de>
290 Martin Sebor <msebor@redhat.com>
293 * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
295 * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
296 * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
298 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
300 * configure.ac (gcc_cv_otool): Set.
301 * configure: Regenerate.
303 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
305 * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
306 (GROUP_BITFIELDS_BY_ALIGN): Ditto.
308 2018-12-05 Richard Sandiford <richard.sandiford@arm.com>
310 PR tree-optimization/88064
311 * tree-vect-patterns.c (vect_convert_input): Convert the result of
312 an existing cast if it has the right width but the wrong sign.
313 Do not test the signedness of the required result when
314 considering whether to split an existing cast; instead split to
315 a type with the same signedness as the source of the cast, then
316 convert it to the opposite signedness where necessary.
317 (vect_recog_over_widening_pattern): Handle sign changes between
318 the final PLUS_EXPR and the RSHIFT_EXPR.
319 (vect_recog_average_pattern): Use an unsigned operation when
320 truncating an addition, subtraction or multiplication. Cast the
321 result back to the "real" signedness before promoting.
323 2018-12-05 Richard Biener <rguenther@suse.de>
325 PR tree-optimization/86637
326 * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
327 vect_location at the end.
329 2018-12-05 Jakub Jelinek <jakub@redhat.com>
331 PR tree-optimization/87360
332 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
333 data dependencies, don't return false, just continue. Formatting
335 (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
336 fuse_loops): Formatting fixes.
339 * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
340 aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
342 2018-12-05 Xianmiao Qu <xianmiao_qu@c-sky.com>
344 * config.gcc (csky-*-linux-gnu*): Force .init_array support.
346 2018-12-05 Segher Boessenkool <segher@kernel.crashing.org>
348 * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
349 aggregate handling on actual AIX, not on somewhat similar systems.
350 (rs6000_arg_partial_bytes): Ditto.
352 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
354 PR rtl-optimization/88317
355 * lra-constraints.c (split_reg): Don't set up check_only_regs if
356 we are outside the inheritance pass.
358 2018-12-04 Jan Hubicka <hubicka@ucw.cz>
360 * ipa-prop.c (jump_function_useful_p): New.
361 (ipa_read_node_info): Do not allocated useless jump functions.
363 2018-12-04 David Malcolm <dmalcolm@redhat.com>
366 * spellcheck.c (selftest::test_suggestions): Add another assertion.
368 2018-12-04 Martin Sebor <msebor@redhat.com>
370 * doc/extend.texi (__builtin_has_attribute): Fix typo.
372 2018-12-04 Jakub Jelinek <jakub@redhat.com>
375 * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
377 (print_operand): Use REG_P instead of GET_CODE == REG.
378 <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
379 <case 't'>: Likewise. Remove GET_MODE check.
380 * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
383 2018-12-04 Martin Sebor <msebor@redhat.com>
385 * doc/extend.texi (attribute aligned): Expand.
387 2018-12-04 David Edelsohn <dje.gcc@gmail.com>
390 * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
392 (rs6000_arg_partial_bytes): Same.
394 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
397 * ira-costs.c (exec): Try bigger class to use smaller register
400 2018-12-04 Michael Ploujnikov <michael.ploujnikov@oracle.com>
403 * ipa-cp.c (create_specialized_node): Track clone counters by
404 node assembler names.
405 (ipcp_driver): Change type of clone_num_suffixes key to const char*.
407 2018-12-04 Richard Biener <rguenther@suse.de>
409 * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
410 for epilogue vectorization.
412 2018-12-04 Richard Biener <rguenther@suse.de>
414 PR tree-optimization/88301
415 * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
416 issues in last commit.
418 2018-12-04 Richard Biener <rguenther@suse.de>
420 PR tree-optimization/88315
421 * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
422 and fix initialization vector for SAD and DOT_PROD SLP reductions.
424 2018-12-03 Sandra Loosemore <sandra@codesourcery.com>
427 * doc/extend.texi (Nonlocal gotos): New section.
429 2018-12-03 Uros Bizjak <ubizjak@gmail.com>
431 * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
432 alternative to (v,vm,c).
434 2018-12-03 Segher Boessenkool <segher@kernel.crashing.org>
436 * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
437 (powerpc*-*-linux*): Don't handle it here.
439 2018-12-03 Jeff Law <law@redhat.com>
441 * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
444 * config/h8300/h8300.md (low byte masking peepholes): Only accept
445 nonimmediate_operand for the to-be-masked operand.
447 2018-12-03 Richard Biener <rguenther@suse.de>
449 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
450 allow expected function-pointer cast re-instantiation.
452 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
454 * common/config/s390/s390-common.c (s390_option_init_struct):
455 Use section anchors by default.
456 * config/s390/s390.c (s390_check_symref_alignment): Handle
458 (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
459 * output.h (assemble_align): Pass `align' as unsigned int, so
460 that the value 0x80000000, which corresponds to `aligned(1 <<
461 28)', would pass the `align > BITS_PER_UNIT' check.
462 * varasm.c (assemble_align): Likewise.
464 2018-12-03 Julian Brown <julian@codesourcery.com>
466 * tree-pretty-print.c (dump_omp_clause): Make default case
469 2018-12-03 Richard Biener <rguenther@suse.de>
471 PR tree-optimization/88301
472 * tree-vrp.c (register_edge_assert_for_2): Handle conversions
473 that do not change the value by registering the same assert
476 2018-12-03 Richard Biener <rguenther@suse.de>
478 * tree-vect-loop.c (vect_transform_loop): Properly compute
479 upper bound for the epilogue when doing epilogue vectorization.
481 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
484 * cfgcleanup.c (class pass_postreload_jump): New pass.
485 (pass_postreload_jump::execute): Likewise.
486 (make_pass_postreload_jump): Likewise.
487 * passes.def: Add pass_postreload_jump before
489 * tree-pass.h (make_pass_postreload_jump): New pass.
491 2018-12-02 Uros Bizjak <ubizjak@gmail.com>
493 * config/i386/i386.c (inline_memory_move_cost): Correctly
494 compute number of TFmode GPR moves.
496 2018-12-02 Jakub Jelinek <jakub@redhat.com>
499 * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
501 2018-12-02 Jeff Law <law@redhat.com>
503 * config/h8300/h8300.md (call, call_value): Drop mode from
504 operand containing number of bytes pushed.
505 (call_insn, call_value_insn): Use mode iterator for number
506 of bytes pushed operand. Make pattern name vary appropriately.
508 2018-12-02 Jan Hubicka <jh@suse.cz>
510 * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
511 trust precise profiles.
513 2018-12-02 Jakub Jelinek <jakub@redhat.com>
515 * tree-nested.c (convert_nonlocal_omp_clauses,
516 convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
517 OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
518 (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
519 Convert clauses for GIMPLE_OMP_TASKGROUP.
521 * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
522 cancellation point with taskgroup clause inside of taskloop. Consider
523 a taskloop construct without nogroup clause as implicit taskgroup for
524 diagnostics if cancel/cancellation point with taskgroup clause is
525 closely nested inside of taskgroup region.
528 * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
529 to the start of the function.
530 (asan_emit_stack_protection): When emitting clearing sequence for
531 epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
532 add last_size_aligned which is last_size padded to multiples of
533 ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
536 2018-12-01 Jakub Jelinek <jakub@redhat.com>
539 * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
540 an off-by-one for BYTES_BIG_ENDIAN.
543 * combine.c (find_split_point): For invalid memory address
544 nonobj + obj + const, if reg + obj + const is valid addressing
545 mode, split at nonobj. Use if rather than else if for the
546 fallback. Comment fixes.
548 2018-11-30 Indu Bhagat <indu.bhagat@oracle.com>
550 * coverage.c (get_coverage_counts): Use from_function_decl for precise
552 * profile-count.c (profile_count::dump): Add handling for precise
554 * profile.c (compute_branch_probabilities): Rely on exec_counts instead
555 of profile_info to set profile_status of function.
556 (branch_prob): Do not set profile_status of function based on
557 profile_info. Done above based on exec_counts.
559 2018-11-30 Jakub Jelinek <jakub@redhat.com>
561 PR tree-optimization/88274
562 * tree-ssa-reassoc.c (optimize_range_tests_xor,
563 optimize_range_tests_diff): If type has smaller precision than
564 corresponding mode or if it has non-standard min/max, compute
565 everything in a standard type for the precision.
568 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
569 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
570 --param logical-op-non-short-circuit is present, override
571 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
572 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
574 2018-11-30 Jeff Law <law@redhat.com>
576 * optabs.c (expand_binop): Use "machine_mode" rather than
577 "enum machine mode" in most recent change.
579 2018-11-30 Wilco Dijkstra <wdijkstr@arm.com>
582 * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
584 (expand_builtin_nonlocal_goto): Likewise.
586 2018-11-30 David Malcolm <dmalcolm@redhat.com>
588 * diagnostic-core.h (emit_diagnostic): New decl.
589 * diagnostic.c (emit_diagnostic): New overload, taking a
592 2018-11-30 David Malcolm <dmalcolm@redhat.com>
594 * pretty-print.c (class selftest::test_pretty_printer): New
595 subclass of pretty_printer.
596 (selftest::test_prefixes_and_wrapping): New test.
597 (selftest::pretty_print_c_tests): Call it.
599 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
601 Minimize clone counter memory usage in create_virtual_clone.
602 * cgraph.h (clone_function_name): Add a variant that takes a
604 * cgraph.h (cgraph_node::create_virtual_clone): Add a new
605 argument: num_suffix.
606 * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
607 num_suffix to clone_function_name.
608 (clone_function_name): Add a variant that takes a tree decl.
609 * ipa-cp.c (create_specialized_node): Keep track of clone
610 counters in clone_num_suffixes hash map.
611 (ipcp_driver): Free the counter hash map.
612 * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
615 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
616 Make function assembly more independent.
618 This is achieved by having clone_function_name assign unique clone
619 numbers for each function independently.
621 * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
623 (clone_function_name_numbered): Use clone_fn_ids.
625 2018-11-30 Vladimir Makarov <vmakarov@redhat.com>
627 PR rtl-optimization/88179
628 * lra-constraints.c (address_eliminator::address_eliminator):
629 Don't eleminate regs in illegitimate address.
631 2018-11-30 David Malcolm <dmalcolm@redhat.com>
633 PR preprocessor/88257
634 * input.c (get_substring_ranges_for_loc): Fix indentation.
635 Bulletproof against getting a different files back from
636 linemap_resolve_location and expand_location_to_spelling_point.
638 2018-11-30 Alexander Monakov <amonakov@ispras.ru>
640 PR gcov-profile/88279
641 * tree-profile.c (init_ic_make_global_vars): Call
642 decl_default_tls_model for variable and not it's type.
644 2018-11-30 Sam Tebbs <sam.tebbs@arm.com>
646 * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
648 2018-11-30 Martin Liska <mliska@suse.cz>
651 * asan.c (asan_shadow_cst): Remove, partially transform
652 into flush_redzone_payload.
653 (RZ_BUFFER_SIZE): New.
654 (struct asan_redzone_buffer): New.
655 (asan_redzone_buffer::emit_redzone_byte): Likewise.
656 (asan_redzone_buffer::flush_redzone_payload): Likewise.
657 (asan_redzone_buffer::flush_if_full): Likewise.
658 (asan_emit_stack_protection): Use asan_redzone_buffer class
659 that is responsible for proper aligned stores and flushing
660 of shadow memory payload.
661 * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
662 (asan_var_and_redzone_size): Likewise.
663 * cfgexpand.c (expand_stack_vars): Use smaller alignment
664 (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
665 for automatic variables more compact.
667 2018-11-30 Alan Modra <amodra@gmail.com>
669 * config/rs6000/predicates.md (easy_fp_constant): Avoid long
670 dependent insn sequences.
671 * config/rs6000/rs6000.c (num_insns_constant): Support long
673 * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
676 2018-11-30 Alan Modra <amodra@gmail.com>
678 * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
679 num_insns_constant_wide. Make static. Revise comment.
680 (num_insns_constant_multi): New function.
681 (num_insns_constant): Formatting. Correct CONST_WIDE_INT
682 calculation. Simplify and extract code common to both
683 CONST_INT and CONST_DOUBLE. Add gcc_unreachable for unhandled
685 * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
687 2018-11-30 Richard Biener <rguenther@suse.de>
689 PR tree-optimization/88274
690 * tree-vrp.c (ranges_from_anti_range): Fix handling of
693 2018-11-29 Andi Kleen <ak@linux.intel.com>
695 * config/i386/i386.c (current_fentry_section): Add.
696 (x86_function_profiler): Handle fentry section.
697 (ix86_attribute_table): Add fentry section.
698 * config/i386/i386.opt: Add -mfentry-section.
699 * doc/extend.texi: Document fentry_section attribute.
700 * doc/invoke.texi: Document -mfentry-section.
702 2018-11-29 Andi Kleen <ak@linux.intel.com>
704 * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
705 (current_fentry_name): Add.
706 (x86_function_profiler): Handle fentry_name attribute.
707 (ix86_handle_fentry_name): Add.
708 (ix86_attribute_table): Add fentry_name.
709 * config/i386/i386.opt: Add -mfentry-name
710 * doc/extend.texi: Document fentry_name.
711 * doc/invoke.texi: Document minstrument-return.
713 2018-11-29 Andi Kleen <ak@linux.intel.com>
715 * config/i386/i386-opts.h (enum instrument_return): Add.
716 * config/i386/i386.c (output_return_instrumentation): Add.
717 (ix86_output_function_return): Call output_return_instrumentation.
718 (ix86_output_call_insn): Call output_return_instrumentation.
719 * config/i386/i386.opt: Add -minstrument-return=.
720 * doc/invoke.texi (-minstrument-return): Document.
722 2018-11-29 Eric Botcazou <ebotcazou@adacore.com>
725 * config/sparc/sparc-modes.def: Minor tweak.
726 * config/sparc/sparc.c: Minor reordering.
727 (sparc_pass_by_reference): Move around.
728 (traverse_record_type): Change offset from HOST_WIDE_INT to int.
729 (classify_registers): Likewise for bitpos.
730 (function_arg_slotno): Remove dead test and tweak comments.
731 <MODE_RANDOM>: Remove useless assertion and test whether the
732 parameter is named in order to pass it in FP registers. Return
733 the regno for floating-point vector types.
734 (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
735 (compute_fp_layout): Likewise.
736 (count_registers): Likewise.
737 (assign_int_registers): Likewise.
738 (assign_fp_registers): Likewise.
739 (assign_registers): Likewise.
740 (function_arg_record_value): Change size from HOST_WIDE_INT to int
741 and use CEIL_NWORDS to compute the number of registers.
742 (function_arg_union_value): Minor tweaks.
743 (function_arg_vector_value): Add slotno and named parameters, use
744 CEIL_NWORDS to compute the number of registers.
745 (sparc_function_arg_1): Rework handling of vector types. Change
746 size from HOST_WIDE_INT to int.
747 (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
748 with vector types for the 64-bt ABI.
749 (sparc_function_arg_advance): Likewise.
750 (sparc_return_in_memory): Add reference to -fpcc-struct-return.
751 (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
752 (sparc_function_value_1): Rework handling of vector types. Change
753 size from HOST_WIDE_INT to int.
755 2018-11-29 Jakub Jelinek <jakub@redhat.com>
758 * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
759 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
760 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
761 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
762 *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
763 define_insn_and_split patterns.
767 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
768 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
769 *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
770 define_insn_and_split.
772 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
775 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
776 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
778 2018-11-29 Uros Bizjak <ubizjak@gmail.com>
780 * config/i386/i386.c (inline_memory_move_cost):
781 Check "in" for 2 in MMX_CLASS_P case.
782 * config/i386/mmx.md (*mov<mode>_internal): Correct
783 TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
784 alternatives in preferred_for_speed attribute calculation.
786 2018-11-29 Martin Sebor <msebor@redhat.com>
790 * doc/extend.texi (attribute constructor): Clarify.
792 2018-11-29 Martin Liska <mliska@suse.cz>
795 * builtins.c (expand_movstr): Fix thinko introduced
796 when switching to the new enum.
798 2018-11-29 qing zhao <qing.zhao@oracle.com>
800 * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
801 * common.opt: Add -flive-patching flag.
802 * doc/invoke.texi: Document -flive-patching.
803 * flag-types.h (enum live_patching_level): New enum.
804 * ipa-inline.c (can_inline_edge_p): Disable external functions from
805 inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
806 * opts.c (control_options_for_live_patching): New function.
807 (finish_options): Make flag_live_patching incompatible with flag_lto.
808 Control IPA optimizations based on different levels of
811 2018-11-29 Giuliano Belinassi <giuliano.belinassi@usp.br>
813 * match.pd (sinh (atanh (x))): New simplification rules.
814 (cosh (atanh (x))): Likewise.
816 2018-11-29 Jakub Jelinek <jakub@redhat.com>
819 * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
820 (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
821 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
822 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
823 *<sse4_1_avx2>_pblendvb_lt): New define_insns.
826 * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
827 * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
828 * match.pd (define_predicates): Add uniform_integer_cst_p.
829 (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
830 so that it works also for vector comparisons with uniform constants
831 with INTEGER_CST element.
834 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
835 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
836 in unsigned_type_for instead of vector integral type where overflow
839 2018-11-29 Michael Ploujnikov <michael.ploujnikov@oracle.com>
841 There can be at most one .resolver clone per function
842 * config/rs6000/rs6000.c (make_resolver_func): Generate
843 resolver symbol with clone_function_name instead of
844 clone_function_name_numbered.
846 2018-11-29 Richard Biener <rguenther@suse.de>
848 PR tree-optimization/88243
849 * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
850 type of all pattern-sequence stmts to vect_internal_def.
852 2018-11-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
855 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
856 (cortex-r7, cortex-r8): Update default and add new configuration.
857 * doc/invoke.texi (armv7-r): Add two new vfp options.
858 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
861 2018-11-29 Alan Modra <amodra@gmail.com>
863 * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
864 double split for targets other than Darwin.
866 2018-11-29 Alan Modra <amodra@gmail.com>
868 * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
870 2018-11-29 Alan Modra <amodra@gmail.com>
872 * config/rs6000/predicates.md (easy_fp_constant): Remove code
873 dealing with integers in const_double. Assert on unexpected
874 modes. Delete superfluous ABI_V4 test.
875 * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
876 Don't call easy_fp_constant for Pmode.
877 (rs6000_hash_constant): Remove code dealing with integers in
879 (rs6000_legitimate_constant_p): Likewise.
880 (output_toc): Formatting, use CONST_DOUBLE_P.
882 2018-11-29 Alan Modra <amodra@gmail.com>
884 * config/rs6000/constraints.md (G, H): Comment on purpose of
885 constraint. Correct mode comments and "G" mode test.
886 * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
887 alternative handling "F". Add length attr. Formatting.
888 (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
889 alternative, and move "F" to separate alternative. Correct
892 2018-11-29 Alan Modra <amodra@gmail.com>
894 * config/rs6000/predicates.md (easy_vector_constant): Don't call
897 2018-11-29 Alan Modra <amodra@gmail.com>
899 * config.in (HAVE_AS_PLTSEQ): Add.
900 * config/rs6000/predicates.md (indirect_call_operand): New.
901 * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
902 (rs6000_sibcall_sysv): Declare.
903 * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
904 CALL_LONG for -fno-plt.
905 (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
906 (rs6000_indirect_call_template_1): Emit .reloc directives for
908 (rs6000_pltseq_template): New function.
909 (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
910 relocs supported by assembler. Move SYMBOL_REF test to callers.
911 (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
912 insns in UNSPEC_PLTSEQ, preserving original func_desc.
913 (rs6000_call_sysv): Likewise.
914 (rs6000_sibcall_sysv): New function.
915 * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
916 * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
917 UNSPEC_PLT16_LO): New.
918 (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
919 (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
920 cookie in constraints. Test explicitly for flags in length attr.
921 Handle unspec operand 1.
922 (call_value_indirect_nonlocal_sysv): Likewise.
923 (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
924 (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
925 (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
926 (sibcall_indirect_nonlocal_sysv): New pattern.
927 (sibcall_value_indirect_nonlocal_sysv): Likewise.
928 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
930 * configure.ac: Check for gas plt sequence marker support.
931 * configure: Regenerate.
933 2018-11-29 Alan Modra <amodra@gmail.com>
935 * config/rs6000/predicates.md (unspec_tls): New.
936 * config/rs6000/rs6000-protos.h (rs6000_call_template),
937 (rs6000_sibcall_template): Update prototype.
938 (rs6000_longcall_ref): Delete.
939 (rs6000_call_sysv): Declare.
940 * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
941 (global_tlsarg): New variable.
942 (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
944 (print_operand): Extract UNSPEC_TLSGD address operand.
945 (rs6000_call_template, rs6000_sibcall_template): Remove arg
946 parameter, extract from second call operand instead.
947 (rs6000_longcall_ref): Make static, localize vars.
948 (rs6000_call_aix): Rename parameter to reflect new usage. Take
949 tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
950 (rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
951 tlsarg from global_tlsarg.
952 (rs6000_call_sysv): New function.
953 * config/rs6000/rs6000.md: Adjust rs6000_call_template and
954 rs6000_sibcall_template throughout.
955 (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
956 (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
957 (tls_gdld_nomark): New insn.
958 (tls_gd): Swap operand order. Simplify mode selection.
959 (tls_gd_high, tls_gd_low): Swap operand order.
960 (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
961 Simplify mode selection.
962 (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
963 (call, call_value): Don't assert for second call operand.
964 Use rs6000_call_sysv.
966 2018-11-29 Alan Modra <amodra@gmail.com>
968 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
969 (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
970 (call_value_nonlocal_darwin64): Remove constraints from second call
971 arg, the rounded_stack_size_rtx arg.
972 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
973 (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
974 (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
975 (call_value_local64, call_indirect_nonlocal_sysv),
976 (call_nonlocal_sysv, call_nonlocal_sysv_secure),
977 (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
978 (call_value_nonlocal_sysv_secure, call_local_aix),
979 (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
980 (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
981 (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
982 (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
983 (sibcall_value_aix): Likewise.
985 2018-11-29 Alan Modra <amodra@gmail.com>
987 * config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
988 with P throughout except for call mems which should use SI.
989 (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
990 attributes. Replace with bits, mode and ptrload respectively.
992 2018-11-29 Alan Modra <amodra@gmail.com>
994 * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
995 (rs6000_indirect_sibcall_template): Declare.
996 * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
997 (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
999 * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
1000 (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
1001 (call_indirect_aix, call_value_indirect_aix): Use
1002 rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
1003 call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
1004 handle both speculation and non-speculation cases.
1005 (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
1006 (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
1008 2018-11-29 Alan Modra <amodra@gmail.com>
1010 * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
1011 (rs6000_sibcall_template): Declare.
1012 (macho_call_template): Rename from output_call.
1013 * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
1014 (rs6000_call_template, rs6000_sibcall_template): Likewise.
1015 (macho_call_template): Rename from output_call.
1016 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
1017 (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
1018 (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
1019 (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
1020 (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
1021 (call_value_nonlocal_aix): Use rs6000_call_template and update
1022 occurrences of output_call to macho_call_template.
1023 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
1024 (sibcall_value_aix): Use rs6000_sibcall_template.
1026 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
1028 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
1029 we determine if unaligned vsx is ok.
1031 2018-11-28 Jan Hubicka <jh@suse.cz>
1033 * predict.c (determine_unlikely_bbs): Forward declare; also determine
1034 edges that are always known to be taken because it is only likely
1035 edge out of given BB.
1036 (tree_estimate_probability): Call before profile guessing to get bit
1039 2018-11-28 Jan Hubicka <jh@suse.cz>
1041 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
1042 profile_probability::always better.
1044 2018-11-28 Jan Hubicka <jh@suse.cz>
1046 * profile-count.h (profile_count::split): Give better result when
1047 splitting profile_probability::always.
1049 2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
1052 * ira-costs.c (scan_one_insn): Process subregs when updating costs
1053 for pseudos and allocnos from insn.
1055 2018-11-28 David Edelsohn <dje.gcc@gmail.com>
1057 * config/rs6000/aix72.h: Update to match aix71.h changes.
1059 2018-11-28 Jeff Law <law@redhat.com>
1061 * config/h8300/constraints.md: Add "C" constraint for call insns.
1062 * config/h8300/h8300.md (call, call_value): Turn into a define_expand
1063 and define_insn pair. Move invalid call targets into a register in
1064 the expander and fix constraints in the matching pattern.
1065 * config/h8300/predicates.md (call_expander_operand): Renamed from
1066 call_insn_operand. Reject things we shouldn't be trying to handle.
1067 (call_insn_operand): New predicate for use by the call/call_value
1069 (small_call_insn_operand): Update appropriately.
1071 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
1073 * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
1074 calls to strtok with strtok_r.
1076 2018-11-28 Richard Biener <rguenther@suse.de>
1078 PR tree-optimization/88223
1079 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
1080 over a stored-same value may-alias store make sure to consider
1081 partial overlaps which are valid when TBAA reasonings do not
1082 apply and byte-granular overlaps are possible at all.
1084 2018-11-28 Richard Biener <rguenther@suse.de>
1086 PR tree-optimization/88217
1087 * vr-values.c (vr_values::extract_range_from_phi_node): Make
1088 sure to handle results > +INF and < -INF correctly when
1089 trying to drop down to +INF - 1 or -INF + 1.
1091 2018-11-28 Alan Modra <amodra@gmail.com>
1093 * xcoffout.c (do_block): Signed/unsigned warning fix.
1095 2018-11-28 Richard Biener <rguenther@suse.de>
1097 PR tree-optimization/79351
1098 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
1099 empty CONSTRUCTORs ensure the store is at a constant position.
1101 2018-11-28 Richard Biener <rguenther@suse.de>
1103 PR tree-optimization/88229
1104 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
1105 is an INTEGER_CST before accessing it so.
1107 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
1109 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
1111 2018-11-28 Jakub Jelinek <jakub@redhat.com>
1114 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
1115 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
1116 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
1118 2018-11-27 Martin Liska <mliska@suse.cz>
1120 * gcov.c (generate_results): Append current_working_directory
1123 2018-11-27 Mike Gulick <mgulick@mathworks.com>
1125 PR preprocessor/83173
1126 * input.c (dump_location_info): Dump reason and included_from
1127 fields from line_map_ordinary struct. Fix indentation when
1128 location > 5 digits.
1129 * diagnostic-show-locus.c (num_digits, num_digits): Move to
1130 diagnostic.c to allow it to be utilized by input.c.
1131 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
1133 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
1134 * diagnostic.h (num_digits): Add extern definition.
1136 2018-11-27 Fredrik Noring <noring@nocrew.org>
1138 * config/mips/mips.c (mips_reorg_process_insns)
1139 (mips_option_override): Handle `-mfix-r5900'.
1140 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
1142 * config/mips/mips.opt (mfix-r5900): New option.
1143 * doc/invoke.texi: Document the `r5900' processor name, and
1144 `-mfix-r5900' and `-mno-fix-r5900' options.
1146 2018-11-27 Jakub Jelinek <jakub@redhat.com>
1149 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
1150 output_operand_lossage instead of gcc_assert.
1151 <case 't'>: Likewise.
1152 <case 'z'>: Likewise.
1153 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
1155 2018-11-27 Jeff Law <law@redhat.com>
1157 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
1158 in call to move_by_pieces.
1160 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
1163 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
1164 call to move_by_pieces.
1166 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
1167 in call to move_by_pieces.
1169 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
1170 RETURN_BEGIN in call to move_by_pieces.
1171 (microblaze_expand_block_move): Likewise.
1173 2018-11-27 Tamar Christina <tamar.christina@arm.com>
1175 * doc/md.texi (xorsign): Document it.
1177 2018-11-27 Martin Liska <mliska@suse.cz>
1179 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
1180 * gcc.c (find_fortran_preinclude_file): New function
1181 to handle Fortran pre-include.
1183 2018-11-27 Martin Liska <mliska@suse.cz>
1185 * asan.c (asan_emit_stack_protection): Use new enum values
1186 instead of int constants.
1187 * builtins.c (expand_builtin_memory_copy_args): Replace int
1188 type with memop_ret enum type.
1189 (expand_builtin_mempcpy_args): Likewise.
1190 (expand_builtin_memcpy): Use new enum values
1191 instead of int constants. Likewise.
1192 (expand_builtin_mempcpy): Likewise.
1193 (expand_movstr): Likewise.
1194 (expand_builtin_strcpy_args): Likewise.
1195 (expand_builtin_stpcpy_1): Likewise.
1196 (expand_builtin_strncpy): Likewise.
1197 (expand_builtin_memset_args): Likewise.
1198 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
1199 (move_by_pieces_d::finish_retmode): ... this.
1200 (move_by_pieces): Change last argument type to memop_ret.
1201 (store_by_pieces): Use new enum values
1202 instead of int constants.
1203 (emit_block_move_hints): Likewise.
1204 (emit_push_insn): Likewise.
1205 (store_expr): Likewise.
1206 * expr.h (store_by_pieces): Change int to newly added enum
1208 * rtl.h (enum memop_ret): Define.
1209 (move_by_pieces): Use the enum type.
1211 2018-11-27 Alan Modra <amodra@gmail.com>
1213 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
1215 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
1216 form. Error on missing -mcpu case.
1217 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
1218 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
1219 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
1220 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
1221 else if .. specs form. Error on missing -mcpu case. Don't output
1222 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
1224 2018-11-26 David Malcolm <dmalcolm@redhat.com>
1226 * dump-context.h (dump_context::dump_loc): Convert 1st param from
1227 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
1228 const dump_location_t & to const dump_user_location_t &.
1229 (dump_context::dump_loc_immediate): Convert 2nd param from
1230 const dump_location_t & to const dump_user_location_t &.
1231 (dump_context::dump_gimple_stmt): Convert 1st param from
1232 dump_flags_t to const dump_metadata_t &.
1233 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1234 2nd param from const dump_location_t & to
1235 const dump_user_location_t &.
1236 (dump_context::dump_gimple_expr): Convert 1st param from
1237 dump_flags_t to const dump_metadata_t &.
1238 (dump_context::dump_gimple_expr_loc): Likewise; convert
1239 2nd param from const dump_location_t & to
1240 const dump_user_location_t &.
1241 (dump_context::dump_generic_expr): Convert 1st param from
1242 dump_flags_t to const dump_metadata_t &.
1243 (dump_context::dump_generic_expr_loc): Likewise; convert
1244 2nd param from const dump_location_t & to
1245 const dump_user_location_t &.
1246 (dump_context::dump_printf_va): Convert 1st param from
1247 dump_flags_t to const dump_metadata_t &.
1248 (dump_context::dump_printf_loc_va): Likewise; convert
1249 2nd param from const dump_location_t & to
1250 const dump_user_location_t &.
1251 (dump_context::dump_dec): Convert 1st param from
1252 dump_flags_t to const dump_metadata_t &.
1253 (dump_context::dump_symtab_node): Likewise.
1254 (dump_context::begin_scope): Split out 2nd param into
1255 user and impl locations.
1256 (dump_context::ensure_pending_optinfo): Add metadata param.
1257 (dump_context::begin_next_optinfo): Replace dump_location_t param
1258 with metadata and user location.
1259 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
1260 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
1261 const dump_location_t & to const dump_user_location_t &.
1262 (dump_context::dump_loc_immediate): Convert 2nd param from
1263 const dump_location_t & to const dump_user_location_t &.
1264 (dump_context::dump_gimple_stmt): Convert 1st param from
1265 dump_flags_t to const dump_metadata_t &.
1266 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1267 2nd param from const dump_location_t & to
1268 const dump_user_location_t &.
1269 (dump_context::dump_gimple_expr): Convert 1st param from
1270 dump_flags_t to const dump_metadata_t &.
1271 (dump_context::dump_gimple_expr_loc): Likewise; convert
1272 2nd param from const dump_location_t & to
1273 const dump_user_location_t &.
1274 (dump_context::dump_generic_expr): Convert 1st param from
1275 dump_flags_t to const dump_metadata_t &.
1276 (dump_context::dump_generic_expr_loc): Likewise; convert
1277 2nd param from const dump_location_t & to
1278 const dump_user_location_t &.
1279 (dump_context::dump_printf_va): Convert 1st param from
1280 dump_flags_t to const dump_metadata_t &.
1281 (dump_context::dump_printf_loc_va): Likewise; convert
1282 2nd param from const dump_location_t & to
1283 const dump_user_location_t &.
1284 (dump_context::dump_dec): Convert 1st param from
1285 dump_flags_t to const dump_metadata_t &.
1286 (dump_context::dump_symtab_node): Likewise.
1287 (dump_context::begin_scope): Split out 2nd param into
1288 user and impl locations.
1289 (dump_context::ensure_pending_optinfo): Add metadata param.
1290 (dump_context::begin_next_optinfo): Replace dump_location_t param
1291 with metadata and user location.
1292 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1293 const dump_metadata_t &.
1294 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1295 const dump_location_t & to const dump_user_location_t &.
1296 (dump_gimple_expr): Convert 1st param from dump_flags_t to
1297 const dump_metadata_t &.
1298 (dump_gimple_expr_loc): Likewise; convert 2nd param from
1299 const dump_location_t & to const dump_user_location_t &.
1300 (dump_generic_expr): Convert 1st param from dump_flags_t to
1301 const dump_metadata_t &.
1302 (dump_generic_expr_loc): Likewise; convert 2nd param from
1303 const dump_location_t & to const dump_user_location_t &.
1304 (dump_printf): Convert 1st param from dump_flags_t to
1305 const dump_metadata_t &.
1306 (dump_printf_loc): Likewise; convert 2nd param from
1307 const dump_location_t & to const dump_user_location_t &.
1308 (dump_dec): Convert 1st param from dump_flags_t to
1309 const dump_metadata_t &.
1310 (dump_symtab_node): Likewise.
1311 (dump_begin_scope): Split out 2nd param into user and impl
1313 (selftest::assert_impl_location_eq): New function.
1314 (ASSERT_IMPL_LOCATION_EQ): New macro.
1315 (selftest::test_impl_location): Update to use
1316 ASSERT_IMPL_LOCATION_EQ.
1317 (selftest::test_capture_of_dump_calls): Convert "loc" to
1318 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
1319 verifying line numbers of dump emissions.
1320 * dumpfile.h (class dump_metadata_t): New class.
1321 (dump_printf): Convert 1st param from dump_flags_t to
1322 const dump_metadata_t &.
1323 (dump_printf_loc): Likewise; convert 2nd param from
1324 const dump_location_t & to const dump_user_location_t &.
1325 (dump_generic_expr_loc): Likewise.
1326 (dump_generic_expr): Convert 1st param from dump_flags_t to
1327 const dump_metadata_t &.
1328 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1329 const dump_location_t & to const dump_user_location_t &.
1330 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1331 const dump_metadata_t &.
1332 (dump_gimple_expr_loc): Likewise; convert 2nd param from
1333 const dump_location_t & to const dump_user_location_t &.
1334 (dump_gimple_expr): Convert 1st param from dump_flags_t to
1335 const dump_metadata_t &.
1336 (dump_symtab_node): Likewise.
1337 (dump_dec): Likewise.
1338 (dump_begin_scope): Split out 2nd param into user and impl
1340 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
1341 location and impl_location, and capture the impl_location.
1342 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
1343 * loop-unroll.c (report_unroll): Update for changes to
1344 dump_printf_loc and dump_printf.
1345 * opt-problem.cc (opt_problem::opt_problem): Update for change to
1347 * optinfo-emit-json.cc
1348 (selftest::test_building_json_from_dump_calls): Convert "loc" from
1349 dump_location_t to dump_user_location_t.
1350 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
1352 * profile.c (compute_branch_probabilities): Update for change to
1354 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
1355 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
1358 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1360 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
1361 and check_effective_target_ptr_eq_long.
1363 2018-11-27 Alan Modra <amodra@gmail.com>
1365 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
1366 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
1367 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
1368 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
1369 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
1370 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
1371 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1372 (ASM_APP_ON, ASM_APP_OFF): Don't define.
1373 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1374 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1375 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1376 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
1377 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1378 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1379 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
1380 (GNU_USER_TARGET_CRTN): Redefine.
1381 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
1382 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
1383 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
1384 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
1385 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
1386 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
1387 (LINK_EH_SPEC): Don't define.
1389 2018-11-26 Martin Sebor <msebor@redhat.com>
1392 * expr.c (string_constant): Handle top-level decls of all character
1393 types and subobjects of narrow character type.
1395 2018-11-27 Alan Modra <amodra@gmail.com>
1397 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
1398 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
1399 GNU_USER_TARGET_OS_CPP_BUILTINS.
1400 (RS6000_ABI_NAME): Define.
1401 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
1402 GNU_USER_TARGET_OS_CPP_BUILTINS.
1403 (MUSL_DYNAMIC_LINKER32): Undef before defining.
1404 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
1405 (CHOOSE_DYNAMIC_LINKER): Don't define.
1406 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
1407 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
1408 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
1409 not already defined.
1410 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
1411 TARGET_OS_CPP_BUILTINS.
1413 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1415 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
1417 2018-11-26 Jakub Jelinek <jakub@redhat.com>
1420 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
1421 and !TARGET_64BIT, return NULL_TREE.
1424 * dwarf2out.c (secname_for_decl): For functions with
1425 DECL_SECTION_NAME if in_cold_section_p, try to return
1426 current_function_section's name if it is a named section.
1428 2018-11-26 Maya Rashish <coypu@sdf.org>
1431 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
1432 * config/x-netbsd: New file.
1433 * config/host-netbsd: New file.
1435 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1437 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
1438 Clarify documentation for check_effective_target_size32plus.
1440 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1442 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
1443 and modify expand_strncmp_vec_sequence.
1444 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
1445 (generate_6432_conversion): New function.
1446 (expand_block_compare): Add support for vsx.
1447 (expand_block_compare_gpr): New function.
1448 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
1449 default limit to 63 because of more compact vsx code.
1451 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
1454 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
1455 for registers for which no debug information can be generated.
1456 Use INVALID_REGNUM for non-existent registers.
1457 (dbx64_register_map): Ditto.
1458 (svr4_dbx_register_map): Ditto.
1460 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
1463 * doc/invoke.texi (Optimize Options): Document that
1464 -freorder-functions also uses "hot" and "cold" attributes.
1466 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1468 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
1470 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1472 * config/arm/types.md (mul64): Rename to...
1473 (widen_mul64): ... This.
1474 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
1475 * config/arm/cortex-a15.md: Likewise.
1476 * config/arm/cortex-a5.md: Likewise.
1477 * config/arm/cortex-a53.md: Likewise.
1478 * config/arm/cortex-a57.md: Likewise.
1479 * config/arm/cortex-a7.md: Likewise.
1480 * config/arm/cortex-m4.md: Likewise.
1481 * config/arm/exynos-m1.md: Likewise.
1482 * config/arm/marvell-pj4.md: Likewise.
1483 * config/arm/xgene1.md: Likewise.
1485 2018-11-26 Richard Biener <rguenther@suse.de>
1487 PR tree-optimization/88182
1488 * tree-vect-loop.c (vectorizable_reduction): Pick up single
1489 correct reduc_def_info.
1490 * tree-vect-slp.c (vect_analyze_slp_instance): Set
1491 STMT_VINFO_REDUC_DEF of the first stmt.
1493 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
1495 * doc/invoke.texi: Document z14/arch12 -march option.
1497 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
1500 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
1501 (Warning Options): Likewise.
1503 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
1506 * doc/extend.texi (Common Function Attributes): Clarify that
1507 functions with "const" attribute can read const global variables.
1509 2018-11-26 Alan Modra <amodra@gmail.com>
1511 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
1513 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
1516 * doc/extend.texi (Common Variable Attributes): Use preferred
1517 placement of type attributes in examples, plus whitespace fixes.
1518 (Type Attributes): Clarify why placement of attributes
1519 immediately after struct/union/enum keyword is preferred.
1520 (Common Type Attributes): Use preferred placement of type
1521 attributes in examples, plus more whitespace fixes.
1523 2018-11-25 Paul Koning <ni1d@arrl.net>
1525 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
1527 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1529 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
1530 attributes): Document d_runtime.
1532 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
1535 * ira-costs.c (record_operand_costs): Initiate register move cost
1538 2018-11-23 Jeff Law <law@redhat.com>
1540 PR rtl-optimization/87468
1541 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
1542 EDGE_IGNORE on all outgoing edges of the duplicate block.
1544 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
1547 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
1548 its mode does not fit to the original class.
1550 2018-11-23 Martin Sebor <msebor@redhat.com>
1552 PR tree-optimization/87756
1553 * expr.c (string_constant): Synthesize a string literal from
1554 the address of a constant character.
1555 * tree.c (build_string_literal): Add an argument.
1556 * tree.h (build_string_literal): Same.
1558 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
1560 * config/aarch64/aarch64-cores.def: Define emag.
1561 * config/aarch64/aarch64-tune.md: Regenerated with emag.
1562 * config/aarch64/aarch64.c (emag_tunings): New struct.
1563 * doc/invoke.texi: Document mtune value.
1565 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
1566 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
1568 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
1570 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
1572 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
1574 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
1577 2018-11-23 Richard Biener <rguenther@suse.de>
1579 PR tree-optimization/88149
1580 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
1581 the case where there are two different def types for the
1582 same operand at different operand position in the same stmt.
1584 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
1586 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
1587 gen_atomic_compare_swap_1.
1588 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
1589 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
1590 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
1591 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
1592 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
1594 * config/arm/arm.md (neon_vext<mode>),
1595 (neon_vrev64<mode>, neon_vrev32<mode>),
1596 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
1597 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
1598 before the pattern name.
1599 * config/arm/sync.md:
1600 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
1601 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
1603 2018-11-23 Jakub Jelinek <jakub@redhat.com>
1605 PR tree-optimization/86614
1606 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
1607 if TREE_NO_WARNING is set on ref.ref.
1609 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
1610 Alan Coopersmith <alan.coopersmith@oracle.com>
1613 * doc/extend.texi (Designated Inits): Clarify handling of multiple
1614 initializers for unions.
1616 2018-11-22 Jan Hubicka <jh@suse.cz>
1619 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
1620 parameters; do not warn here.
1621 (odr_subtypes_equivalent_p): Likewise.
1622 (warn_odr): Fix typo.
1623 (warn_types_mismatch): Do not output confused warnings on integer types.
1624 (odr_types_equivalent_p): Update.
1626 2018-11-22 Jakub Jelinek <jakub@redhat.com>
1628 * config/i386/i386.c (ix86_option_override_internal,
1629 ix86_can_inline_p, classify_argument, construct_container,
1630 ix86_expand_prologue, ix86_expand_split_stack_prologue,
1631 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
1632 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
1633 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
1636 * config/i386/i386.c (ix86_option_override_internal): For
1637 stack_protector_guard related options, use opts_set->x_ instead
1638 of global_options_set. and prefix options with opts->x_ . Move
1639 defaults for offset and reg into else block.
1641 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
1643 * config/i386/i386.c (ix86_check_avx_upper_register):
1644 Return true for all SSE registers with mode bitsize > 128.
1646 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
1648 PR rtl-optimization/87718
1649 * ira-costs.c: Remove trailing white-spaces.
1650 (record_operand_costs): Add a special treatment for moves
1651 involving a hard register.
1653 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
1655 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
1656 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
1658 2018-11-22 Martin Liska <mliska@suse.cz>
1660 * common/config/i386/i386-common.c (processor_names): Add
1661 static assert and add missing "znver2".
1662 (ix86_get_valid_option_values): Add checking assert for null
1663 values and add "native" value if feasible.
1664 * config/i386/i386.h: Do not declare size of processor_names.
1665 * common/config/i386/i386-common.c:
1666 * config/i386/i386.c: Add static assert for size
1667 of processor_cost_table.
1669 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1671 * target-insns.def (stack_protect_combined_set): Define new standard
1673 (stack_protect_combined_test): Likewise.
1674 * cfgexpand.c (stack_protect_prologue): Try new
1675 stack_protect_combined_set pattern first.
1676 * function.c (stack_protect_epilogue): Try new
1677 stack_protect_combined_test pattern first.
1678 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
1679 parameters to control which register to use as PIC register and force
1680 reloading PIC register respectively. Insert in the stream of insns if
1682 (legitimize_pic_address): Expose above new parameters in prototype and
1683 adapt recursive calls accordingly. Use pic_reg if non null instead of
1685 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
1686 (arm_legitimize_address): Adapt to new legitimize_pic_address
1688 (thumb_legitimize_address): Likewise.
1689 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
1690 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
1691 (thumb1_expand_prologue): Likewise.
1692 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
1694 (arm_load_pic_register): Likewise.
1695 * config/arm/predicated.md (guard_addr_operand): New predicate.
1696 (guard_operand): New predicate.
1697 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
1699 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
1701 (stack_protect_combined_set): New expander..
1702 (stack_protect_combined_set_insn): New insn_and_split pattern.
1703 (stack_protect_set_insn): New insn pattern.
1704 (stack_protect_combined_test): New expander.
1705 (stack_protect_combined_test_insn): New insn_and_split pattern.
1706 (arm_stack_protect_test_insn): New insn pattern.
1707 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
1708 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
1709 (UNSPEC_SP_TEST): Likewise.
1710 * doc/md.texi (stack_protect_combined_set): Document new standard
1712 (stack_protect_set): Clarify that the operand for guard's address is
1714 (stack_protect_combined_test): Document new standard pattern name.
1715 (stack_protect_test): Clarify that the operand for guard's address is
1718 2018-11-22 Richard Biener <rguenther@suse.de>
1720 PR tree-optimization/88148
1721 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
1722 valueization callback parameter and handle it.
1723 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
1724 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
1726 2018-11-22 Richard Biener <rguenther@suse.de>
1730 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1731 which can appear in size expressions.
1732 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1733 CALL_EXPR_BY_DESCRIPTOR.
1734 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1735 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1736 CALL_EXPR_BY_DESCRIPTOR.
1737 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1741 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1744 2018-11-22 Richard Biener <rguenther@suse.de>
1746 PR tree-optimization/88069
1747 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
1748 apply to default defs.
1750 2018-11-22 Jakub Jelinek <jakub@redhat.com>
1754 * config/i386/i386.c (ix86_option_override_internal): Default
1755 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
1757 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
1758 stack_protect_test, stack_protect_test_<mode>): Use empty condition
1759 instead of TARGET_SSP_TLS_GUARD.
1761 2018-11-22 Martin Liska <mliska@suse.cz>
1764 * config/i386/i386.c (ix86_option_override_internal): Error
1765 about usage -mabi=ms and -fsanitize=thread.
1767 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
1770 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
1773 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
1775 * lra-spills.c (lra_final_code_change): Remove useless move insns.
1777 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
1780 * function.c (expand_function_end): Do not emit extra blockage insn.
1782 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
1785 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
1786 of FIRST_SSE_REG for 4 or 8 byte modes.
1788 2018-11-21 Jan Hubicka <jh@suse.cz>
1791 * tree.c (fld_decl_context): Break out from ...
1792 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
1793 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
1794 (fld_incomplete_type_of): Build copy of TYP_DECL.
1795 * ipa-devirt.c (free_enum_values): Rename to ...
1796 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
1797 and TREE_TYPEs of TYPE_DECLs.
1798 (get_odr_type): Initialize odr_vtable_hash if needed.
1800 2018-11-21 Alexandre Oliva <oliva@adacore.com>
1802 * final.c (compute_discriminator): Declare. Renamed from...
1803 (maybe_set_discriminator): ... this. Set and return a local.
1804 (override_discriminator): New.
1805 (final_scan_insn_1): Set it.
1806 (notice_source_line): Adjust. Always set discriminator.
1808 2018-11-21 Jakub Jelinek <jakub@redhat.com>
1811 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
1812 rIJ constraint for aarch64_plus_operand rather than rn.
1814 2018-11-21 Renlin Li <renlin.li@arm.com>
1817 * explow.h (get_dynamic_stack_size): Declare it as external.
1818 * explow.c (record_new_stack_level): Remove function static attribute.
1819 * function.c (assign_stack_local_1): Dynamically align the stack slot
1820 addr for parameter copy on the stack.
1822 2018-11-21 Richard Biener <rguenther@suse.de>
1825 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
1826 * Makefile.in (bitmap.o-warn): Remove again.
1828 2018-11-20 Jeff Law <law@redhat.com>
1830 PR tree-optimization/88069
1831 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
1832 degenerate virtual PHIs.
1834 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
1837 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
1838 nonimmediate_operand with register_operand.
1839 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
1840 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
1841 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
1842 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
1843 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
1844 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
1845 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
1846 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
1847 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
1848 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
1849 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
1850 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
1851 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
1852 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
1853 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
1854 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
1855 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
1856 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
1857 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
1858 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
1859 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
1860 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
1861 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
1862 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
1863 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
1864 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
1865 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
1867 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
1869 * read-rtl.c (apply_subst_iterator): Handle define_split and
1870 define_insn_and_split.
1872 2018-11-21 Jakub Jelinek <jakub@redhat.com>
1874 PR rtl-optimization/87817
1875 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
1876 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
1877 in the pattern to avoid triggering UB when operands[2] is zero.
1878 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
1879 (*tbm_bextri_<mode>): ... this.
1881 2018-11-21 Tom de Vries <tdevries@suse.de>
1884 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
1887 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
1889 * configure.ac: Add check for Binutils to determine whether vector
1890 load/store alignments hints are being supported.
1891 * config.in: Regenerate.
1892 * configure: Regenerate.
1893 * config/s390/s390.c (print_operand): Support new output
1895 * config/s390/s390.md ("movti"): Append alignment hint output
1896 using the new output modifier 'A'.
1897 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
1898 ("*vec_ti_to_v1ti"): Likewise.
1900 2018-11-20 Martin Sebor <msebor@redhat.com>
1902 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
1904 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1907 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
1908 compare ENUM values.
1910 2018-11-20 Jakub Jelinek <jakub@redhat.com>
1912 PR tree-optimization/87895
1913 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1914 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1915 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1916 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1917 has any preds and always use EDGE_PRED (, 0).
1919 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
1922 * mode-switching.c (create_pre_exit): After reload, always split the
1923 fallthrough edge to the exit block.
1925 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1927 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
1928 * tree.c (build_array_type_1): Forward declare.
1929 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
1930 (fld_type_variant): Likewise.
1931 (fld_simplified_types): New hash.
1932 (fld_process_array_type): New function.
1933 (fld_incomplete_type_of): Handle array and enumeration types.
1934 (fld_simplified_type): Handle simplification of arrays.
1935 (free_lang_data): Allocate and free simplified types hash.
1937 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1940 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
1941 when sybtype already violates ODR.
1942 (get_odr_type): Do not ICE when insert is false and type duplicate
1943 is not registered yet.
1944 (register_odr_type): Be sure to register subtypes first.
1946 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
1948 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
1949 DImode parts of the target operand.
1951 2018-11-20 Nathan Sidwell <nathan@acm.org>
1954 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
1956 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1959 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
1961 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
1963 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1966 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
1967 * ipa.c (possible_inline_candidate_p): Break out from ..
1968 (process_references): ... here ; drop before_inlining_p;
1969 cleanup handling of alises.
1970 (walk_polymorphic_call_targets): Likewise.
1971 (symbol_table::remove_unreachable_nodes): Likewise.
1972 * passes.c (pass_data_ipa_remove_symbols): New structure.
1973 (pass_ipa_remove_symbols): New pass.
1974 (make_pass_ipa_remove_symbols): New function.
1975 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
1976 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
1978 2018-11-20 Richard Biener <rguenther@suse.de>
1980 * tree-vect-stmts.c (vectorizable_condition): Do not get
1981 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
1982 pointless vect_is_simple_use calls.
1984 2018-11-20 Richard Biener <rguenther@suse.de>
1986 PR tree-optimization/88074
1987 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1990 2018-11-20 Richard Biener <rguenther@suse.de>
1992 PR tree-optimization/88069
1993 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
1994 virtual PHI arguments.
1996 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
1999 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
2001 * rtl.h (contains_constant_pool_address_p): New function.
2002 * rtlanal.c (contains_constant_pool_address_p): Likewise.
2004 2018-11-20 Richard Biener <rguenther@suse.de>
2007 * alias.c (component_uses_parent_alias_set_from): Remove
2008 alias-set zero and TYPE_TYPELESS_STORAGE case both already
2009 handled in other ways.
2011 2018-11-20 Richard Biener <rguenther@suse.de>
2013 PR tree-optimization/88087
2014 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
2016 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
2019 2018-11-20 Richard Biener <rguenther@suse.de>
2022 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
2024 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
2027 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
2029 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
2032 * doc/invoke.texi (Link Options): Mention shared libraries
2033 in documentation for the -l option. Simplify discussion and
2034 point to the system linker documentation for details.
2036 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
2038 PR rtl-optimization/88033
2039 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
2040 to itself. Use HARD_REGISTER_NUM_P.
2042 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2044 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
2045 of the loop if vf is non-constant.
2047 2018-11-19 David Malcolm <dmalcolm@redhat.com>
2049 PR tree-optimization/87025
2050 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
2051 immediately after creating the scope optinfo.
2052 (selftest::test_pr87025): New function.
2053 (selftest::dumpfile_c_tests): Call it.
2054 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
2055 that we're not popping the top-level records array.
2056 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
2057 not changing the kind of a "scope" optinfo.
2059 2018-11-19 David Malcolm <dmalcolm@redhat.com>
2061 PR tree-optimization/87025
2062 * dump-context.h: Include "optinfo.h".
2063 (class optrecord_json_writer): New forward decl.
2064 (dump_context::forcibly_enable_optinfo_p): Delete.
2065 (dump_context::optinfo_enabled_p): New member function.
2066 (dump_context::optimization_records_enabled_p): New member
2068 (dump_context::set_json_writer): New member function.
2069 (dump_context::emit_optinfo): New member function.
2070 (dump_context::m_forcibly_enable_optinfo): Delete.
2071 (dump_context::m_json_writer): New member data.
2072 * dumpfile.c (dump_context::set_json_writer): New member function.
2073 (dump_context::finish_any_json_writer): New member function.
2074 (dump_context::end_scope): Replace call to
2075 optimization_records_maybe_pop_dump_scope with call to
2076 m_json_writer->pop_scope.
2077 (dump_context::optinfo_enabled_p): New member function.
2078 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
2079 to dump_context::emit_optinfo.
2080 (dump_context::emit_optinfo): New member function.
2081 (temp_dump_context::temp_dump_context): Replace
2082 m_forcibly_enable_optinfo with call to set_json_writer.
2083 (temp_dump_context::~temp_dump_context): Clean up any json writer.
2084 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
2086 (the_json_writer): Delete.
2087 (optimization_records_start): Delete.
2088 (optimization_records_finish): Delete.
2089 (optimization_records_enabled_p): Delete, in favor of
2090 dump_context::optimization_records_enabled_p.
2091 (optimization_records_maybe_record_optinfo): Delete.
2092 (optimization_records_maybe_pop_dump_scope): Delete.
2093 * optinfo-emit-json.h: Include "json.h". Delete forward
2095 (optimization_records_start): Delete.
2096 (optimization_records_finish): Delete.
2097 (optimization_records_enabled_p): Delete.
2098 (optimization_records_maybe_record_optinfo): Delete.
2099 (optimization_records_maybe_pop_dump_scope): Delete.
2100 (class optrecord_json_writer): Move here from
2101 optinfo-emit-json.cc.
2102 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
2103 to optinfo::emit with call to dump_context::emit_optinfo.
2104 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2105 (optinfo_enabled_p): Delete, in favor of
2106 dump_context::optinfo_enabled_p.
2107 (optinfo_wants_inlining_info_p): Update for conversion o
2108 optimization_records_enabled_p to a member function of
2110 * optinfo.h (optinfo_enabled_p): Delete, in favor of
2111 dump_context::optinfo_enabled_p.
2112 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2113 * toplev.c: Include "dump-context.h".
2114 (compile_file): Replace call to optimization_records_finish with
2115 dump_context::finish_any_json_writer.
2116 (do_compile): Replace call to optimization_records_start with
2117 conditionally creating a optrecord_json_writer for the
2120 2018-11-19 Jakub Jelinek <jakub@redhat.com>
2122 PR tree-optimization/88071
2123 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
2124 of false as last argument to gsi_remove.
2125 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
2126 false as last argument to gsi_replace.
2129 * omp-expand.c: Don't include debug.h.
2130 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
2131 from innermost outer parallel, task, teams or target that has a
2132 child_fn set, or, if there is no such outer region, use
2133 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
2134 whether a suitable BLOCK is found or not.
2135 (expand_parallel_call, expand_teams_call): Don't call
2136 adjust_context_and_scope here.
2137 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
2138 (expand_omp_taskreg, expand_omp_target): Likewise. Call
2139 adjust_context_and_scope.
2140 * dwarf2out.c (dwarf2out_early_global_decl): For
2141 decl_function_context recurse instead of calling dwarf2out_decl.
2143 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
2145 PR rtl-optimization/85925
2146 * rtl.h (word_register_operation_p): New predicate.
2147 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
2148 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
2149 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
2150 (num_sign_bit_copies1): Likewise.
2152 2018-11-19 Richard Biener <rguenther@suse.de>
2155 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
2158 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
2160 * compare-elim.c (struct comparison): Add not_in_a field.
2161 (is_not): New static function.
2162 (strip_not): Likewise.
2163 (conforming_compare): Handle a NOT in the first operand.
2164 (can_eliminate_compare): Likewise.
2165 (find_comparison_dom_walker::before_dom_children): Likewise.
2166 (try_eliminate_compare): Likewise.
2167 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
2168 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
2170 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
2172 * doc/extend.texi (Common Type Attributes): Fix typos.
2174 2018-11-19 Martin Liska <mliska@suse.cz>
2176 PR gcov-profile/88045
2177 * coverage.c (coverage_begin_function): Add assert.
2179 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
2182 * doc/extend.texi (Common Function Attributes): Document that
2183 no_instrument_function applies to -p and -pg, too.
2184 * doc/invoke.texi (Instrumentation Options): Add cross-references
2185 to docs for -p, -pg, and -finstrument-functions.
2187 2018-11-18 Alan Modra <amodra@gmail.com>
2189 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
2190 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
2191 (GNU_USER_TARGET_CRTN): Define.
2192 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
2193 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
2195 2018-11-18 Alan Modra <amodra@gmail.com>
2197 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
2198 !HAVE_LD_PIE variant.
2199 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
2201 2018-11-17 Nick Clifton <nickc@redhat.com>
2202 Sandra Loosemore <sandra@codesourcery.com>
2205 * doc/invoke.texi (Overall Options): Document that --help and
2206 --help=<value> options cannot be combined.
2208 2018-11-17 Jim Wilson <jimw@sifive.com>
2210 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
2211 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
2212 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
2213 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
2214 to step2 if frame_pointer_needed and step1 is 0.
2216 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
2219 * doc/cpp.texi (System Headers): Add note about implicit
2220 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
2222 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
2225 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
2226 -fno-implicit-templates.
2228 2018-11-17 Jakub Jelinek <jakub@redhat.com>
2230 PR tree-optimization/87546
2231 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
2232 min_precision variable, initially set it to orig_precision, only does
2233 something if op_type's precision is <= min_precision and update
2234 min_precision whenever calling set_op.
2236 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
2239 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
2241 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
2243 * doc/invoke.texi (Option Summary): Fix whitespace and line
2244 breaks in @gccoptlist environments.
2245 (Warning Options): Likewise.
2246 (Optimize Options): Likewise.
2247 (PowerPC SPE Options): Likewise.
2248 (RS/6000 and PowerPC Options): Likewise.
2250 2018-11-16 Jeff Law <law@redhat.com>
2252 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
2255 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
2258 * doc/invoke.texi (Optimize Options): Update options enabled by
2259 fprofile-generate, -fprofile-use, and -fauto-profile.
2261 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2264 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
2265 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
2266 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
2268 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
2269 * targhooks.c (default_print_patchable_function_entry): Assert
2270 asm_int_op does not return a NULL string.
2271 * varasm.c (integer_asm_op): Return the op for a partial int type
2272 when the requested size does not correspond to an integer type.
2273 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
2274 * doc/tm.texi: Regenerate.
2276 2018-11-12 Jason Merrill <jason@redhat.com>
2278 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
2280 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
2282 * config/rs6000/constraints.md (wF constraint): Remove power9
2283 fusion documentation. Just document wF's use for power8 fusion.
2284 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
2285 (fusion_gpr_addis): Delete power9 fusion support. Change power8
2286 fusion support to require the upper 12 bits to be all 0's or all
2288 (fusion_gpr_mem_load): Add comment.
2289 (fusion_addis_mem_combo_load): Remove power9 fusion support.
2290 (fusion_addis_mem_combo_store): Delete.
2291 (fusion_offsettable_mem_operand): Delete.
2292 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
2294 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
2295 (POWERPC_MASKS): Delete power9 fusion.
2296 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
2297 (fusion_p9_p): Delete.
2298 (expand_fusion_p9_load): Delete.
2299 (expand_fusion_p9_store): Delete.
2300 (emit_fusion_p9_load): Delete.
2301 (emit_fusion_p9_store): Delete.
2302 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
2304 (rs6000_option_override_internal): Set power8 fusion based on
2305 whether we are tuning for power8. Delete power9 fusion support.
2306 (rs6000_opt_masks): Delete -mpower9-fusion switch.
2307 (emit_fusion_load): Rename emit_fusion_load_store to
2308 emit_fusion_load, and drop fusion store support. Update callers.
2309 (emit_fusion_load_store): Likewise.
2310 (emit_fusion_gpr_load): Likewise.
2311 (fusion_p9_p): Delete.
2312 (expand_fusion_p9_load): Delete.
2313 (expand_fusion_p9_store): Delete.
2314 (emit_fusion_p9_load): Delete.
2315 (emit_fusion_p9_store): Delete.
2316 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
2317 (GPR_FUSION): Delete.
2318 (FPR_FUSION): Delete.
2319 (power9 fusion peephole2s): Delete.
2320 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
2321 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
2322 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
2323 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
2324 (fusion_p9_<mode>_constant): Delete.
2325 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
2326 power9 fusion switch.
2327 * doc/md.texi (PowerPC constraints): Update wF constraint
2328 documentation for power8 fusion only.
2330 2018-11-16 Jakub Jelinek <jakub@redhat.com>
2332 PR rtl-optimization/87475
2333 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
2334 CROSSING_JUMP_P insns.
2335 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
2337 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
2340 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
2341 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
2342 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2344 2018-11-16 Jakub Jelinek <jakub@redhat.com>
2347 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
2348 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
2350 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
2352 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
2353 location_t parameter.
2354 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2355 (switch_decision_tree::do_jump_if_equal): Likewise.
2356 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
2357 of switch statement to emit_case_nodes.
2358 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
2359 set it on the newly built GIMPLE comparison statement.
2360 (switch_decision_tree::do_jump_if_equal): Likewise.
2361 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
2362 in calls to do_jump_if_equal as well as recursive calls.
2364 2018-11-16 Andi Kleen <ak@linux.intel.com>
2366 * config/i386/i386.md: Allow memory operands to ptwrite.
2368 2018-11-16 Michael Matz <matz@suse.de>
2370 * system.h (PRsa): New macro.
2371 (SIZE_AMOUNT): Cast number to uint64_t.
2372 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
2373 (pool_usage::dump_footer): Likewise and also use PRIu64.
2374 * bitmap.h (bitmap_usage::dump): Likewise.
2375 * ggc-common.c (ggc_usage::dump): Likewise.
2376 * ggc-page.c (ggc_print_statistics): Likewise.
2377 * input.c (dump_line_table_statistics): Likewise.
2378 * mem-stats.h (mem_usage::dump): Likewise.
2379 (mem_usage::dump_footer): Likewise.
2380 * rtl.c (dump_rtx_statistics): Likewise.
2381 * tree-cfg.c (dump_cfg_stats): Likewise.
2382 * tree-dfa.c (dump_dfa_stats): Likewise.
2383 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2384 * tree-ssanames (ssanames_print_statistics): Likewise.
2385 * vec.c (vec_usage::dump): Likewise.
2386 (vec_usage::dump_footer): Likewise.
2388 2018-11-16 Richard Biener <rguenther@suse.de>
2390 PR tree-optimization/88011
2391 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
2392 replacing set_value_range_to_undefined and
2393 set_value_range_to_varying with method calls.
2395 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
2397 * config/s390/s390.md
2398 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
2400 (*r<noxa>sbg_<mode>_sll): Likewise.
2401 (*r<noxa>sbg_<mode>_srl): Likewise.
2402 (*r<noxa>sbg_sidi_srl): New pattern.
2404 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
2406 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
2407 Default to TARGET_VXWORKS_RTP.
2408 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2409 of TARGET_VXWORKS_RTP.
2410 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
2411 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2412 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
2414 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
2417 * doc/extend.texi (Common Type Attributes): Make it explicit
2418 that attribute "packed" can apply to C++ classes.
2420 2018-11-15 Martin Sebor <msebor@redhat.com>
2424 * tree.c (type_argument_type): New function.
2425 * tree.h (type_argument_type): Declare it.
2426 * gcc/doc/extend.texi (alloc_align): Update and clarify.
2427 (alloc_size, nonnull, sentinel): Same.
2429 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
2430 Kwok Cheung Yeung <kcy@codesourcery.com>
2432 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
2433 int_mode_for_size fails.
2434 (vectorizable_load): Likewise.
2436 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2438 * doc/ux.texi (Group logically-related diagnostics): Move
2439 discussion of auto_diagnostic_group into this new subsection.
2440 Give an example of where this grouping is used.
2442 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2445 * Makefile.in (OBJS): Move json.o to...
2446 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
2447 * common.opt (fdiagnostics-format=): New option.
2448 (diagnostics_output_format): New enum.
2449 * diagnostic-format-json.cc: New file.
2450 * diagnostic.c (default_diagnostic_final_cb): New function, taken
2451 from start of diagnostic_finish.
2452 (diagnostic_initialize): Initialize final_cb to
2453 default_diagnostic_final_cb.
2454 (diagnostic_finish): Move "being treated as errors" messages to
2455 default_diagnostic_final_cb. Call any final_cb.
2456 (default_diagnostic_finalizer): Add diagnostic_t param.
2457 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
2458 diagnostic_finalizer callback.
2459 * diagnostic.h (enum diagnostics_output_format): New enum.
2460 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
2461 (struct diagnostic_context): Add "final_cb".
2462 (default_diagnostic_finalizer): Add diagnostic_t param.
2463 (diagnostic_output_format_init): New decl.
2464 * doc/invoke.texi (-fdiagnostics-format): New option.
2465 * dwarf2out.c (gen_producer_string): Ignore
2466 OPT_fdiagnostics_format_.
2467 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
2468 * lto-wrapper.c (append_diag_options): Ignore it.
2469 * opts.c (common_handle_option): Handle it.
2471 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2473 PR tree-optimization/88015
2474 * graphite-isl-ast-to-gimple.c
2475 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
2477 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
2479 2018-11-15 Richard Biener <rguenther@suse.de>
2482 * gimple.c (gimple_call_flags): Union flags from decl, type
2484 * trans-mem.c (is_tm_pure_call): Simplify.
2486 2018-11-15 Richard Biener <rguenther@suse.de>
2488 PR tree-optimization/88031
2489 * tree-vect-loop.c (vectorizable_reduction): Move check
2490 for multiple types earlier so we get the expected dump.
2491 Simplify calls to vectorizable_condition.
2492 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
2493 * tree-vect-stmts.c (vectorizable_condition): Instead of
2494 reduc_def and reduc_index take just a flag. Simplify
2495 code-generation now that we can rely on the defs being set up.
2496 (vectorizable_comparison): Remove unused argument.
2498 2018-11-15 Richard Biener <rguenther@suse.de>
2500 PR tree-optimization/88030
2501 * tree-complex.c (need_eh_cleanup): New global.
2502 (update_complex_assignment): Mark blocks that need EH update.
2503 (expand_complex_comparison): Likewise.
2504 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
2505 perform EH cleanup and schedule CFG cleanup if that did anything.
2507 2018-11-15 Jakub Jelinek <jakub@redhat.com>
2509 PR rtl-optimization/88018
2510 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
2511 on the presence of fallthru edge, rather than if it is a USE or not.
2513 2018-11-15 Richard Biener <rguenther@suse.de>
2516 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
2517 analyze_subscript_affine_affine properly.
2519 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
2521 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
2522 (GLIBC_DYNAMIC_LINKER): Define.
2523 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
2525 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
2527 PR tree-optimization/84648
2528 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
2529 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
2530 by calling adjust_cond_for_loop_until_wrap.
2532 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
2535 * doc/extend.texi (Common Function Attributes): Clarify linker
2536 restrictions on "aligned" attribute.
2537 (Common Variable Attributes): Likewise. Mention that linker
2538 restrictions don't apply to stack-allocated variables.
2540 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
2542 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
2545 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
2549 * doc/invoke.texi (Optimize Options): Remove bad example about
2550 interaction between -flto and -O. Replace it with a note that
2551 you need to compile with -O and not just link. Copy-edit -flto
2552 discussion to reduce verbiage and improve flow.
2554 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
2557 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
2558 also suppress many optimizations. Alphabetize option lists for
2559 -O1, -O2, and -Os. Add list of options disabled with -Og, and
2560 correct documentation for those options to say that.
2561 * opts.c (default_options_table): Sort table by level and option
2562 name, to make it easier to correlate to the manual.
2564 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
2566 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
2567 printing of the names of segment registers.
2569 2018-11-14 Nathan Sidwell <nathan@acm.org>
2573 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
2576 2018-11-14 David Malcolm <dmalcolm@redhat.com>
2578 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
2580 2018-11-14 Jakub Jelinek <jakub@redhat.com>
2582 P1236R1 - Signed integers are two's complement
2583 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
2586 * hash-map.h (hash_map::iterator::reference_pair): New class.
2587 (hash_map::iterator::operator*): Return it rather than std::pair.
2589 2018-11-14 Jeff Law <law@redhat.com>
2591 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
2592 iff the operand is a constant.
2594 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
2596 * gimple-ssa-evrp-analyze.c
2597 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
2598 ignore_equivs_equal_p to equal_p.
2599 * ipa-cp.c (meet_with_1): Use equal_p instead of
2600 ignore_equivs_equal_p.
2601 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
2602 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
2603 (value_range::operator==): Remove.
2604 (value_range::operator!=): Remove.
2605 (vrp_prop::visit_stmt): Use equal_p.
2606 * tree-vrp.h (value_range): Remove operator==, operator!=,
2607 ignore_equivs_equal_p.
2608 * vr-values.c (update_value_range): Use equal_p.
2610 2018-11-14 Michael Matz <matz@suse.de>
2613 * gimplify.c (collect_fallthrough_labels): Add new argument,
2614 return location via that, don't modify statements.
2615 (warn_implicit_fallthrough_r): Adjust call, don't use
2616 statement location directly.
2618 2018-11-14 Richard Biener <rguenther@suse.de>
2621 * tree-data-ref.c (split_constant_offset): Add wrapper
2622 allocating a cache hash-map.
2623 (split_constant_offset_1): Cache results of expanding
2624 expressions from SSA def stmts.
2626 2018-11-14 Richard Biener <rguenther@suse.de>
2629 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
2631 (lambda_vector_mult_const): Likewise.
2632 (lambda_matrix_right_hermite): Use lambda_int temporaries.
2634 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
2635 Jackson Woodruff <jackson.woodruff@arm.com>
2637 PR 71026/tree-optimization
2638 * match.pd: Simplify floating point comparisons.
2640 2018-11-14 Jakub Jelinek <jakub@redhat.com>
2642 PR rtl-optimization/87817
2643 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
2644 last argument has low 8 bits clear, fold to 0.
2646 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
2648 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
2649 MAX_OFILE_ALIGNMENT as needed.
2651 2018-11-14 Richard Biener <rguenther@suse.de>
2653 PR tree-optimization/88019
2654 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
2655 COND_EXPR arguments to non-trapping overflow.
2657 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2659 * config/arc/arc.h (reg_class): Reorder registers classes, remove
2660 unused register classes.
2661 (REG_CLASS_NAMES): Likewise.
2662 (REG_CLASS_CONTENTS): Likewise.
2663 (FIXED_REGISTERS): Make lp_count fixed.
2664 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
2665 (PROGRAM_COUNTER_REGNO): Remove.
2666 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
2667 register classes, use constants for register numbers, remove
2668 reg_class_contents references.
2669 (arc_process_double_reg_moves): Add asserts.
2670 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
2671 lra_in_progress predicate.
2672 (arc_init_reg_tables): Remove unused register classes.
2673 (arc_register_move_cost): Likewise.
2674 (arc_preferred_reload_class): Likewise.
2675 (hwloop_optimize): Update rtx patterns involving lp_count register.
2676 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
2677 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
2678 CHEAP_CORE_REGS. Former one will be used for LRA.
2679 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
2680 one will be used for LRA.
2681 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
2682 one will be used for LRA.
2683 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
2684 Former one will be used for LRA.
2685 ("f"): Delete constraint.
2688 ("l"): Change it from register constraint to constraint.
2689 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
2690 (movhi_insn): Likewise.
2691 (movsi_insn): Update pattern.
2694 (stack_tie): Remove 'b' constraint letter.
2696 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
2697 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
2698 (R57_REG, R59_REG, PCL_REG): Likewise.
2699 (ILINK1_REGNUM): Renamed to ILINK1_REG.
2700 (ILINK2_REGNUM): Renamed to ILINK2_REG.
2702 (SP_REGS): Likewise.
2703 (Rcw): Remove unused reg classes.
2704 * config/arc/predicates.md (dest_reg_operand): Just default on
2705 register_operand predicate.
2706 (mpy_dest_reg_operand): Likewise.
2707 (move_dest_operand): Use macros instead of constants.
2708 * config/arc/arc.opt (mlra): Switch to lra as default.
2710 2018-11-14 Richard Biener <rguenther@suse.de>
2712 PR tree-optimization/87974
2713 * tree-vect-loop.c (vectorizable_reduction): When computing
2714 the vectorized reduction PHI vector type ignore constant
2717 2018-11-14 Jakub Jelinek <jakub@redhat.com>
2719 PR tree-optimization/87977
2720 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
2721 stmt, build a new one and replace the old one with it. Formatting fix.
2722 Call release_ssa_name (x) if !has_other_use and !delete_div.
2723 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
2724 verify lhs of stmt is still def.
2726 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
2728 PR rtl-optimization/87507
2729 * lower-subreg.c (operand_for_swap_move_operator): New function.
2730 (simple_move): Strip simple operators.
2731 (find_pseudo_copy): Likewise.
2732 (resolve_operand_for_swap_move_operator): New function.
2733 (resolve_simple_move): Strip simple operators and swap operands.
2735 2018-11-13 Jakub Jelinek <jakub@redhat.com>
2737 PR tree-optimization/87898
2738 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
2739 (ipa_simd_modify_function_body): Remove debug stmts where the first
2740 argument was changed into a non-decl.
2742 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
2744 PR rtl-optimization/87899
2745 * lra-lives.c (start_living): Update white space in comment.
2746 (enum point_type): New.
2747 (sparseset_contains_pseudos_p): New function.
2748 (update_pseudo_point): Likewise.
2749 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
2750 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
2751 handling. Move early exit after adding conflicts.
2752 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
2753 if regno is already live. Remove all handling of program points.
2754 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
2755 after adding conflicts. Remove all handling of program points and
2756 ignore_reg_for_conflicts.
2757 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
2758 and do not guard call to mark_pseudo_live.
2759 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
2760 and do not guard call to mark_pseudo_dead.
2761 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
2762 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
2763 Use new function update_pseudo_point. Handle register copies by
2764 removing the source register from the live set. Handle INOUT operands.
2765 Update to the next program point using the unused_set, dead_set and
2767 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
2769 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2771 * builtins.c: Replace "source_location" with "location_t".
2772 * diagnostic-show-locus.c: Likewise.
2773 * diagnostic.c: Likewise.
2774 * dumpfile.c: Likewise.
2775 * gcc-rich-location.h: Likewise.
2776 * genmatch.c: Likewise.
2777 * gimple.h: Likewise.
2778 * gimplify.c: Likewise.
2779 * input.c: Likewise.
2780 * input.h: Likewise. Eliminate the typedef.
2781 * omp-expand.c: Likewise.
2782 * selftest.h: Likewise.
2783 * substring-locations.h (get_source_location_for_substring):
2785 (get_location_within_string): ...this.
2786 * tree-cfg.c: Replace "source_location" with "location_t".
2787 * tree-cfgcleanup.c: Likewise.
2788 * tree-diagnostic.c: Likewise.
2789 * tree-into-ssa.c: Likewise.
2790 * tree-outof-ssa.c: Likewise.
2791 * tree-parloops.c: Likewise.
2792 * tree-phinodes.c: Likewise.
2793 * tree-phinodes.h: Likewise.
2794 * tree-ssa-loop-ivopts.c: Likewise.
2795 * tree-ssa-loop-manip.c: Likewise.
2796 * tree-ssa-phiopt.c: Likewise.
2797 * tree-ssa-phiprop.c: Likewise.
2798 * tree-ssa-threadupdate.c: Likewise.
2799 * tree-ssa.c: Likewise.
2800 * tree-ssa.h: Likewise.
2801 * tree-vect-loop-manip.c: Likewise.
2803 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2805 * doc/extend.texi: Fix typo in the weakref description.
2807 2018-11-13 Richard Biener <rguenther@suse.de>
2809 PR tree-optimization/86991
2810 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
2811 group building until we have successfully detected the SLP
2813 (vect_is_simple_reduction): Remove fixup code here.
2815 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2817 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
2818 (dump_gimple_stmt): Use it.
2819 (dump_gimple_stmt_loc): Likewise.
2820 (dump_gimple_expr): Likewise.
2821 (dump_gimple_expr_loc): Likewise.
2822 (dump_generic_expr): Likewise.
2823 (dump_generic_expr_loc): Likewise.
2824 (dump_printf): Likewise.
2825 (dump_printf_loc): Likewise.
2826 (dump_dec): Likewise.
2827 (dump_dec): Likewise.
2828 (dump_hex): Likewise.
2829 (dump_symtab_node): Likewise.
2830 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
2831 Guard dump call with dump_enabled_p.
2832 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
2833 * graphite-optimize-isl.c (optimize_isl): Likewise.
2834 * graphite.c (graphite_transform_loops): Likewise.
2835 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
2836 * tree-parloops.c (parallelize_loops): Likewise.
2837 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
2838 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
2839 (vect_prune_runtime_alias_test_list): Likewise.
2840 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
2841 (vect_estimate_min_profitable_iters): Likewise.
2842 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
2843 (vect_build_slp_tree_2): Likewise.
2844 (vect_supported_load_permutation_p): Likewise.
2845 (vect_slp_analyze_operations): Likewise.
2846 (vect_slp_analyze_bb_1): Likewise.
2847 (vect_slp_bb): Likewise.
2848 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
2849 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
2850 (pass_slp_vectorize::execute): Likewise.
2851 (increase_alignment): Likewise.
2853 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2856 * ipa-inline.c (report_inline_failed_reason): Guard calls to
2857 cl_target_option_print_diff and cl_optimization_print_diff with
2860 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2862 * doc/invoke.texi (-fsave-optimization-record): Note that the
2863 output is compressed.
2864 * optinfo-emit-json.cc: Include <zlib.h>.
2865 (optrecord_json_writer::write): Compress the output.
2867 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
2869 * tree-vrp.c (value_range_base::dump): Dump type.
2870 Do not use INF nomenclature for 1-bit types.
2871 (dump_value_range): Group all variants to common dumping code.
2872 (debug): New overloaded functions for value_ranges.
2873 (value_range_base::dump): Remove no argument version.
2874 (value_range::dump): Same.
2876 2018-11-13 Richard Biener <rguenther@suse.de>
2878 PR tree-optimization/87931
2879 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
2880 nested cycles we support to latch computations vectorizable_reduction
2883 2018-11-13 Martin Liska <mliska@suse.cz>
2885 PR tree-optimization/87885
2886 * cfghooks.c (account_profile_record): Rename
2888 (profile_record_check_consistency): ... this.
2889 Calculate missing num_mismatched_freq_in.
2890 (profile_record_account_profile): New function
2891 that calculates time and size of a function.
2892 * cfghooks.h (struct profile_record): Remove
2894 (struct cfg_hooks): Remove after_pass flag.
2895 (account_profile_record): Rename to ...
2896 (profile_record_check_consistency): ... this.
2897 (profile_record_account_profile): New.
2898 * cfgrtl.c (rtl_account_profile_record): Remove
2900 * passes.c (check_profile_consistency): Do only
2902 (account_profile): Calculate size and time of
2904 (pass_manager::dump_profile_report): Reformat
2906 (execute_one_ipa_transform_pass): Call
2907 consistency check before clean upand call account_profile
2908 after a clean up is done.
2909 (execute_one_pass): Call check_profile_consistency and
2910 account_profile instead of using after_pass flag..
2911 * tree-cfg.c (gimple_account_profile_record): Likewise.
2913 2018-11-13 Martin Liska <mliska@suse.cz>
2916 * config/i386/i386.c (ix86_option_override_internal): Error
2917 about usage -mabi=ms and -fsanitize={,kernel-}address.
2919 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
2921 * config/aarch64/aarch64.c
2922 (aarch64_vectorize_preferred_vector_alignment): Change return type to
2924 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
2925 alignment being a poly int.
2926 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
2927 return type to poly_uint64.
2928 * target.def (default_preferred_vector_alignment): Likewise.
2929 * targhooks.c (default_preferred_vector_alignment): Likewise.
2930 * targhooks.h (default_preferred_vector_alignment): Likewise.
2931 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
2932 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
2934 (vect_update_misalignment_for_peel): Likewise.
2935 (vect_enhance_data_refs_alignment): Likewise.
2936 (vect_find_same_alignment_drs): Likewise.
2937 (vect_duplicate_ssa_name_ptr_info): Likewise.
2938 (vect_setup_realignment): Likewise.
2939 (vect_can_force_dr_alignment_p): Change alignment parameter type to
2941 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
2942 mask with a compile time variable vector alignment.
2943 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
2945 (vect_do_peeling): Exit early if vector alignment is not constant.
2946 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
2948 (vectorizable_store): Likewise.
2949 (vectorizable_load): Likweise.
2950 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
2952 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
2954 (vect_can_force_dr_alignment_p): Change alignment parameter type to
2957 2018-11-13 Richard Biener <rguenther@suse.de>
2959 PR tree-optimization/87962
2960 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
2961 detect outer reduction for disqualifying in-loop uses.
2963 2018-11-13 Richard Biener <rguenther@suse.de>
2965 PR tree-optimization/87967
2966 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
2967 for constants for the scalar loop.
2969 2018-11-13 Alan Modra <amodra@gmail.com>
2971 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
2972 integer constants when -mcmodel=medium.
2974 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2976 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2977 * config/arc/elf.h (PROFILE_HOOK): Define.
2978 * config/arc/linux.h (PROFILE_HOOK): Likewise.
2980 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2982 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2983 jump table data in the text section.
2985 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2987 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2988 to fit the eh_return pattern.
2989 * config/arc/arc.md (eh_return): Define.
2990 (VUNSPEC_ARC_EH_RETURN): Likewise.
2991 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2993 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2996 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2998 * common/config/arc/arc-common.c (arc_option_optimization_table):
2999 Millicode optimization is default on for size optimizations.
3000 * config/arc/arc-protos.h (arc_check_multi): New function.
3001 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
3002 (ENTER_LEAVE_START_REG): Define.
3003 (ENTER_LEAVE_END_REG): Likewise.
3004 (arc_override_options): Disable millicode when long calls option
3006 (arc_frame_info): Change it from int to bool.
3007 (arc_compute_frame_size): Clean up.
3008 (arc_save_restore): Remove.
3009 (frame_save_reg): New function.
3010 (frame_restore_reg): Likewise.
3011 (arc_enter_leave_p): Likewise.
3012 (arc_save_callee_saves): Likewise.
3013 (arc_restore_callee_saves): Likewise.
3014 (arc_save_callee_enter): Likewise.
3015 (arc_restore_callee_leave): Likewise.
3016 (arc_save_callee_milli): Likewise.
3017 (arc_restore_callee_milli): Likewise.
3018 (arc_expand_prologue): Reimplement to emit enter/leave
3020 (arc_expand_epilogue): Likewise.
3021 (arc_check_multi): New function.
3022 * config/arc/arc.md (push_multi_fp): New pattern.
3023 (push_multi_fp_blink): Likewise.
3024 (pop_multi_fp): Likewise.
3025 (pop_multi_fp_blink): Likewise.
3026 (pop_multi_fp_ret): Likewise.
3027 (pop_multi_fp_blink_ret): Likewise.
3028 * config/arc/arc.opt (mmillicode): Update option.
3029 (mcode-density-frame): New option.
3030 * config/arc/predicates.md (push_multi_operand): New predicate.
3031 (pop_multi_operand): Likewise.
3032 * doc/invoke.texi (ARC): Update ARC options information.
3035 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
3037 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
3038 * config/arc/arc.c (operands_ok_ldd_std): New function.
3039 (mem_ok_for_ldd_std): Likewise.
3040 (gen_operands_ldd_std): Likewise.
3041 * config/arc/arc.md: Add peephole2 rules for std/ldd.
3043 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
3045 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
3046 test on stack_usage_file.
3047 (lang_dependent_init): Do not open the .su file if generating LTO.
3049 2018-11-13 Jakub Jelinek <jakub@redhat.com>
3051 PR rtl-optimization/87918
3052 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
3053 simplify_gen_relational rather than simplify_gen_binary.
3055 2018-11-13 Richard Biener <rguenther@suse.de>
3057 * tree-ssanames.h (set_range_info): Use value_range_base.
3058 (get_range_info): Likewise.
3059 * tree-ssanames.c (set_range_info): Likewise.
3060 (get_range_info): Likewise.
3061 * tree-vrp.c (value_range_base::union_helper): Split
3062 out common parts of value_range[_base]::union_.
3063 (value_range_base::union_): Update.
3064 (value_range::union_): Likewise.
3065 (determine_value_range_1): Use value_range_base.
3066 (determine_value_range): Likewise.
3067 * tree-vrp.h (value_range_base::union_helper): Move ...
3068 (value_range::union_helper): ... from here.
3070 2018-11-13 Alan Modra <amodra@gmail.com>
3072 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
3074 (rs6000_secondary_reload_gpr): Don't call find_replacement.
3076 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
3079 * doc/invoke.texi (Optimize Options): Clarify that the
3080 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
3081 apply to data cache size.
3083 2018-11-13 Alan Modra <amodra@gmail.com>
3085 * config/rs6000/predicates.md (logical_const_operand),
3086 (logical_operand): Correct comment.
3087 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
3089 2018-11-13 Alan Modra <amodra@gmail.com>
3091 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
3093 2018-11-13 Alan Modra <amodra@gmail.com>
3095 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
3097 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
3098 covered by alternative.
3099 (movcc_internal1): Ignore h for register preference.
3100 (mov<mode>_hardfloat64): Likewise.
3101 (mov<mode>_softfloat): Ignore c, l, h for register preference.
3103 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
3105 PR preprocessor/47823
3106 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
3109 * doc/extend.texi (Pragmas): Note additional pragmas documented
3112 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
3116 * tree-scalar-evolution.c (expression_expensive_p): Make
3117 BUILTIN POPCOUNT as expensive when backend does not define it.
3119 2018-11-12 Fredrik Noring <noring@nocrew.org>
3121 * config.gcc: Update with-llsc defaults for MIPS r5900.
3123 2018-11-12 Martin Liska <mliska@suse.cz>
3125 PR gcov-profile/87442
3126 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
3128 * doc/invoke.texi: Document them.
3129 * tree-profile.c (parse_profile_filter): New.
3130 (parse_profile_file_filtering): Likewise.
3131 (release_profile_file_filtering): Likewise.
3132 (include_source_file_for_profile): Likewise.
3133 (tree_profiling): Filter source files based on the
3134 newly added options.
3136 2018-11-12 Martin Liska <mliska@suse.cz>
3139 * doc/extend.texi: Add missing values for __builtin_cpu_is and
3140 __builtin_cpu_supports for x86 target.
3142 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
3145 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
3147 (Arithmetic): Likewise for "lo_sum".
3149 2018-11-12 Renlin Li <renlin.li@arm.com>
3152 * dse.c (get_stored_val): Add check for compile-time constantness
3155 2018-11-12 Sudakshina Das <sudi.das@arm.com>
3157 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
3158 (ARMv8_5a): New fgroup.
3159 (armv8.5-a): New arch.
3160 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
3162 * config/arm/arm-tables.opt: Regenerate.
3163 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
3164 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
3165 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
3166 Add matching rules for -march=armv8.5-a and extensions.
3167 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
3168 Add sb and predres to all armv8-a except armv8.5-a.
3170 2018-11-12 Richard Biener <rguenther@suse.de>
3172 * tree-vrp.h (value_range[_base]::set): Make public. Provide
3173 overload for single value.
3174 (value_range[_base]::set_nonnull): New.
3175 (value_range[_base]::set_null): Likewise.
3176 (value_range): Document bitmap copying behavior, mark
3177 copy constructor and assignment operator deleted.
3178 (value_range::move): New.
3179 (value_range::set_and_canonicalize): Default bitmap to zero.
3180 (set_value_range_to_nonnull): Remove.
3181 (set_value_range_to_null): Likewise.
3182 (set_value_range): Likewise.
3183 (set_value_range_to_value): Likewise.
3184 (extract_range_from_unary_expr): Work on value_range_base.
3185 (extract_range_from_binary_expr_1): Likewise. Rename to...
3186 (extract_range_from_binary_expr): ... this.
3187 * tree-vrp.c (value_range::update): Clear equiv bitmap
3189 (value_range::move): New, move equiv bitmap.
3190 (value_range_base::set_undefined): Avoid assignment.
3191 (value_range::set_undefined): Likewise.
3192 (value_range_base::set_varying): Likewise.
3193 (value_range::set_varying): Likewise.
3194 (set_value_range): Remove.
3195 (value_range_base::set): New overload for value.
3196 (value_range::set): Likewise.
3197 (set_value_range_to_nonnull): Remove.
3198 (value_range_base::set_nonnull): New.
3199 (value_range::set_nonnull): Likewise.
3200 (set_value_range_to_null): Remove.
3201 (value_range_base::set_null): New.
3202 (value_range::set_null): Likewise.
3203 (range_is_null): Work on value_range_base.
3204 (range_is_nonnull): Likewise.
3205 (ranges_from_anti_range): Likewise.
3206 (extract_range_into_wide_ints): Likewise.
3207 (extract_range_from_multiplicative_op): Likewise.
3208 (extract_range_from_binary_expr): Likewise. Update for API changes.
3209 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
3211 (value_range::intersect_helper): Avoid copy and assignment.
3212 (value_range::union_helper): Likewise.
3213 (determine_value_range_1): Adjust.
3214 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
3215 Avoid assignment by using move.
3216 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
3217 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3219 * tree-ssanames.c (get_range_info): Likewise.
3220 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
3221 * vr-values.c (vr_values::get_value_range): Adjust.
3222 (vr_values::update_value_range): Likewise.
3223 (symbolic_range_based_on_p): Work on value_range_base.
3224 (vr_values::extract_range_from_binary_expr): Use value_range_base.
3225 (vr_values::extract_range_from_unary_expr): Likewise.
3226 (vr_values::extract_range_from_cond_expr): Avoid assignment.
3227 (vr_values::extract_range_from_comparison): Adjust.
3228 (vr_values::check_for_binary_op_overflow): Use value_range_base.
3229 (vr_values::extract_range_basic): Adjust.
3230 (vr_values::adjust_range_with_scev): Likewise.
3231 (vr_values::vrp_visit_assignment_or_call): Likewise.
3232 (vr_values::get_vr_for_comparison): Change API to avoid
3233 assignment and copy construction.
3234 (vr_values::compare_name_with_value): Adjust accordingly.
3235 (vr_values::compare_names): Likewise.
3236 (vr_values::extract_range_from_phi_node): Avoid assignment and
3237 bogus in-place modify of equiv bitmap.
3238 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
3239 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
3240 for extract_range_from_unary_expr API change.
3241 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
3243 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
3245 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
3247 2018-11-12 Richard Biener <rguenther@suse.de>
3249 * tree-vrp.h (value_range_base::symbolic_p,
3250 value_range_base::constant_p, value_range_base::zero_p,
3251 value_range_base::singleton_p): Move from value_range.
3252 (value_range::dump): Add.
3253 * gimple-ssa-evrp-analyze.c
3254 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
3255 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
3256 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3258 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
3259 (value_range::constant_p): Likewise.
3260 (value_range::singleton_p): Likewise.
3261 (value_range_base::dump): Add.
3262 (set_value_range_to_undefined): Remove.
3263 (set_value_range_to_varying): Likewise.
3264 (range_int_cst_p): Take value_range_base argument.
3265 (range_int_cst_singleton_p): Likewise.
3266 (value_range_constant_singleton): Likewise.
3267 (vrp_set_zero_nonzero_bits): Likewise.
3268 (extract_range_from_multiplicative_op): Use set_varying.
3269 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
3270 (extract_range_from_unary_expr): Likewise.
3271 (dump_value_range_base): Change to overload of dump_value_range.
3272 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
3273 (vrp_prop::visit_stmt): Likewise.
3274 (value_range::intersect_helper): Likewise.
3275 (value_range::union_helper): Likewise.
3276 (determine_value_range_1): Likewise.
3278 2018-11-12 Richard Biener <rguenther@suse.de>
3280 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
3281 (set_value_range_to_null): Likewise.
3282 * vr-values.c (vr_values::extract_range_from_comparison):
3283 Clear equiv for constant singleton ranges.
3285 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
3287 * config/i386/sse.md: Combine VFIXUPIMM* patterns
3288 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3289 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3290 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
3291 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3292 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3293 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
3295 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
3298 * doc/extend.texi (Common Type Attributes): For the align type
3299 attribute, copy language about decreasing alignment from the
3300 corresponding variable attribute.
3302 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
3304 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
3307 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
3310 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
3311 -frtti and -fno-rtti code.
3313 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
3316 * doc/extend.texi (Other Builtins): Document probability associated
3317 with __builtin_expect.
3319 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
3322 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
3323 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
3324 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
3325 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
3327 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
3329 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
3331 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
3333 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
3335 2018-11-11 Richard Biener <rguenther@suse.de>
3337 * tree-vrp.h (class value_range_base): New base class for
3338 value_range containing all but the m_equiv member.
3339 (dump_value_range_base): Add.
3340 (range_includes_zero_p): Work on value_range_base.
3341 * tree-vrp.c (value_range_base::set): Split out base handling
3343 (value_range::set): this.
3344 (value_range::set_equiv): New.
3345 (value_range_base::value_range_base): New constructors.
3346 (value_range_base::check): Split out base handling from...
3347 (value_range::check): this.
3348 (value_range::equal_p): Refactor in terms of
3349 ignore_equivs_equal_p which is now member of the base.
3350 (value_range_base::set_undefined): New.
3351 (value_range_base::set_varying): Likewise.
3352 (value_range_base::dump):Split out base handling from...
3353 (value_range::dump): this.
3354 (value_range_base::set_and_canonicalize): Split out base handling
3356 (value_range::set_and_canonicalize): this.
3357 (value_range_base::union_): New.
3358 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
3360 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
3361 instead of value_range everywhere.
3362 (ipcp_vr_lattice::print): Use dump_value_range_base.
3363 (ipcp_vr_lattice::meet_with): Adjust.
3364 (ipcp_vr_lattice::meet_with_1): Likewise.
3365 (ipa_vr_operation_and_type_effects): Likewise.
3366 (propagate_vr_across_jump_function): Likewise.
3367 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
3368 (ipa_get_value_range): Likewise.
3369 (ipa_set_jfunc_vr): Likewise.
3370 (ipa_compute_jump_functions_for_edge): Likewise.
3372 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
3375 * doc/invoke.texi (Optimize Options): Add @opindex entries
3376 for the positive forms of -fno-xxx and -mno-xxx options
3377 that were lacking them.
3379 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
3381 * combine.c (make_more_copies): Only make an intermediate copy if the
3382 dest of a move is a pseudo.
3384 2018-11-09 Maya Rashish <coypu@sdf.org>
3387 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
3388 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
3390 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
3394 * doc/invoke.texi (Optimize Options): Clarify default behavior
3395 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
3397 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
3399 PR tree-optimization/87940
3400 * expr.c (string_constant): Don't strip NOPS in subexpressions.
3401 Fold PLUS_EXPR correctly.
3403 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
3406 * config/s390/s390.c (s390_safe_relative_long_p): New function.
3407 (annotate_constant_pool_refs): Skip insns which support
3408 relative addressing.
3409 (annotate_constant_pool_refs_1): New helper function.
3410 (find_constant_pool_ref): Skip insns which support relative
3412 (find_constant_pool_ref_1): New helper function.
3413 (replace_constant_pool_ref): Skip insns which support
3414 relative addressing.
3415 (replace_constant_pool_ref_1): New helper function.
3416 (s390_mainpool_start): Adapt to the new signature.
3417 (s390_mainpool_finish): Likewise.
3418 (s390_chunkify_start): Likewise.
3419 (s390_chunkify_finish): Likewise.
3420 (pass_s390_early_mach::execute): Likewise.
3421 (s390_prologue_plus_offset): Likewise.
3422 (s390_emit_prologue): Likewise.
3423 (s390_emit_epilogue): Likewise.
3425 2018-11-09 Jakub Jelinek <jakub@redhat.com>
3427 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
3428 but unsupported lastprivate with conditional modifier.
3430 2018-11-09 Jeff Law <law@redhat.com>
3432 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
3433 unused argument better. Add gcc_unreachable to silence warning.
3435 2018-11-09 Martin Sebor <msebor@redhat.com>
3438 * attribs.c (has_attribute): New helper function.
3439 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
3440 * attribs.h (decls_mismatched_attributes): Declare.
3441 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
3442 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
3443 * common.opt (-Wattribute-alias): Take an argument.
3444 (-Wno-attribute-alias): New option.
3445 * doc/extend.texi (Common Function Attributes): Document copy.
3446 (Common Variable Attributes): Same.
3447 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
3448 (-Wattribute-alias): Document new option argument.
3450 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
3452 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
3453 matching criteria. Remove unused array initializer.
3455 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
3456 Jinsong Ji <jji@us.ibm.com>
3458 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
3459 constraints by introducing a new temporary.
3460 (_mm_cvtss_si64): Likewise.
3462 2018-11-09 Martin Liska <mliska@suse.cz>
3464 * common.opt: Add -fipa-stack-alignment flag.
3465 * doc/invoke.texi: Document it.
3466 * final.c (rest_of_clean_state): Guard stack
3467 shrinking with flag.
3469 2018-11-09 Martin Liska <mliska@suse.cz>
3471 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
3473 (ipa_discover_variable_flags): ... this.
3474 * common.opt: Come up with new flag -fipa-reference-addressable.
3475 * doc/invoke.texi: Document it.
3476 * ipa-reference.c (propagate): Call the renamed fn.
3477 * ipa-visibility.c (whole_program_function_and_variable_visibility):
3479 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
3481 (ipa_discover_variable_flags): ... this. Discover
3482 non-addressable variables only with the newly added flag.
3483 * opts.c: Enable the newly added flag with -O1 and higher
3486 2018-11-09 David Malcolm <dmalcolm@redhat.com>
3488 * json.cc (selftest::test_writing_literals): Fix comment.
3490 2018-11-09 Martin Liska <mliska@suse.cz>
3492 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
3493 string to a stack buffer.
3494 (aarch64_parse_cpu): Likewise.
3495 (aarch64_parse_tune): Likewise.
3497 2018-11-09 Richard Biener <rguenther@suse.de>
3499 PR tree-optimization/87953
3500 * tree-vect-loop.c (vectorizable_reduction): For analysis
3501 always pass ops[0] to vectorizable_condition.
3503 2018-11-09 Stafford Horne <shorne@gmail.com>
3504 Richard Henderson <rth@twiddle.net>
3505 Joel Sherrill <joel@rtems.org>
3507 * common/config/or1k/or1k-common.c: New file.
3508 * config/or1k/*: New.
3509 * config.gcc (or1k*-*-*): New.
3510 * configure.ac (or1k*-*-*): New test for openrisc tls.
3511 * configure: Regenerated.
3512 * doc/install.texi: Document OpenRISC triplets.
3513 * doc/invoke.texi: Document OpenRISC arguments.
3514 * doc/md.texi: Document OpenRISC.
3516 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
3518 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
3519 (arm7tdmi-s): Delete CPU.
3520 (arm710t): Add aliases for arm720t and arm740t.
3521 (arm720t, arm740t): Delete CPUs.
3522 (arm920t): Add aliases for arm920, arm922t and arm940t.
3523 (arm920, arm922t, arm940t): Delete CPUs.
3524 (arm10tdmi): Add alias for arm1020t.
3525 (arm1020t): Delete CPU.
3526 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
3527 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
3528 (arm10e): Add aliases for arm1020e and arm1022e.
3529 (arm1020e, arm1022e): Delete CPU.
3530 * config/arm/arm.md (generic_sched): Remove entries that are now
3532 (generic_vfp): Likewise.
3533 * config/arm/arm1020e.md: Simplify tuning selection based on alias
3535 * config/arm/arm-tune.md: Regenerated.
3536 * config/arm/arm-tables.opt: Regenerated.
3538 2018-11-09 Richard Biener <rguenther@suse.de>
3540 PR tree-optimization/87621
3541 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
3542 op with only phi inputs.
3543 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
3544 (ch_base::copy_headers): Run CSE on copied loop headers.
3545 (pass_ch_vect::process_loop_p): Simplify.
3547 2018-11-09 Alexandre Oliva <oliva@adacore.com>
3549 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
3550 for non-w64 x86_64 biarch.
3552 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
3554 PR rtl-optimization/86438
3555 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
3556 of in_b for the compare if in_b is SET_DEST.
3559 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
3560 non-toplevel UNSPEC.
3562 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
3564 * tree-vrp.c (value_range::check): Do not access internals
3566 (value_range::singleton_p): Same.
3567 (value_range::type): Same.
3568 (vrp_finalize): Use value_range API.
3570 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
3572 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
3574 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
3576 * vr-values.c (vr_values::get_value_range): Use value_range API
3577 instead of piecing together ranges.
3578 (vr_values::update_value_range): Same.
3580 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
3582 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
3583 of performing ad-hoc calculations.
3584 * tree-ssanames.c (set_range_info): New overloaded function
3585 accepting value_range &.
3586 (get_range_info): Same.
3587 * tree-ssanames.h (set_range_info_raw): Remove.
3588 (set_range_info): New prototype.
3589 (get_range_info): Same.
3590 * tree-vrp.h (value_range::null_p): Rename to zero_p.
3591 * tree-vrp.c (value_range::null_p): Same.
3593 2018-11-09 Jan Hubicka <jh@suse.cz>
3595 * tree.c (fld_type_variant_equal_p): Test user align flag.
3596 (flt_type_variant): Copy user align flag.
3597 (fld_incomplete_type_of): Clear it.
3599 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3601 * config/arm/neon.md (div<mode>3): New pattern.
3603 2018-11-08 Andi Kleen <ak@linux.intel.com>
3605 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
3606 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
3607 (ix86_handle_option): Handle OPT_mptwrite.
3608 * config/i386/cpuid.h (bit_PTWRITE): Add.
3609 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
3610 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
3611 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
3612 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
3613 (ix86_option_override_internal): Handle PTA_PTWRITE.
3614 (ix86_valid_target_attribute_inner_p): Define ptwrite.
3615 (def_builtin2): Force UINT64 to be 64bit only.
3616 * config/i386/i386.h (TARGET_PTWRITE): Add.
3617 (TARGET_PTWRITE_P): Add.
3619 * config/i386/i386.md: Define ptwrite.
3620 * config/i386/i386.opt: Add -mptwrite.
3621 * config/i386/immintrin.h (_ptwrite64): Add.
3623 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
3624 * doc/invoke.texi: Document -mptwrite.
3626 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
3628 PR rtl-optimization/87600
3629 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
3630 * lra-constraints.c (process_alt_operands): Skip illegal hard
3631 register usage. Prefer reloading non hard register operands.
3633 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
3636 * doc/invoke.texi (Optimize Options): Clarify default behavior
3637 for -fno-sched-interblock and -fno-sched-spec.
3639 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
3641 * collect2.c (linker_select): Add USE_LLD_LD.
3642 (ld_suffixes): Add ld.lld.
3643 (main): Handle -fuse-ld=lld.
3644 * common.opt (-fuse-ld=lld): New option.
3645 * doc/invoke.texi (-fuse-ld=lld): Document.
3646 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
3648 2018-11-08 Paul Koning <ni1d@arrl.net>
3650 * config/pdp11/constraints.md: Add "Z" series constraints for use
3651 with pre-dec and post-inc addressing.
3652 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
3653 (pdp11_expand_operands): Add int argument (word count).
3654 (pdp11_sp_frame_offset): Delete.
3655 (pdp11_cmp_length): New function.
3656 (pushpop_regeq): New function.
3657 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
3659 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
3661 (pdp11_initial_elimination_offset): Ditto.
3662 (pdp11_expand_operands): Add word count argument. Bugfixes.
3663 (output_move_multiple): Change how pointer adjustment is done.
3664 (pdp11_gen_int_label): Correct format.
3665 (output_ascii): Ditto.
3666 (pdp11_asm_output_var): Add code for DEC assembler case.
3667 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
3669 (legitimate_const_double_p): Ditto.
3670 (pdp11_register_move_cost): Adjust for new register classes.
3671 (pdp11_regno_reg_class): Ditto.
3672 (expand_block_move): Delete.
3673 (pushpop_regeq): New function.
3674 (pdp11_legitimate_address_p): Bugfix in check for constant
3676 (pdp11_sp_frame_offset): Delete.
3677 (pdp11_reg_save_size): New helper function for new frame layout.
3678 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
3679 (pdp11_expand_shift): Bugfix in check for constant shift count.
3680 (pdp11_shift_length): Ditto.
3681 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
3682 (pdp11_cmp_length): New function.
3683 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
3684 some compile options.
3685 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
3686 (CALL_USED_REGISTERS): Ditto.
3687 (ELIMINABLE_REGS): Ditto.
3688 (REGISTER_NAMES): Ditto.
3689 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
3691 (REG_CLASS_NAMES): Ditto.
3692 (REG_CLASS_CONTENTS): Ditto. Also remove
3693 HARD_FRAME_POINTER_REGNUM.
3694 (CPU_REG_CLASS): New macro.
3695 (CLASS_MAX_NREGS): Adjust for new register classes.
3696 (FUNCTION_PROFILER): Make no-op.
3697 (may_call_alloca): Remove unused declaration.
3698 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
3699 (ASM_OUTPUT_SKIP): Fix format.
3700 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
3701 (HARD_FRAME_POINTER_REGNUM): Remove.
3703 (*rts): Rename. Remove epilogue related checks.
3704 (cmpsi, cmpdi): New insn.
3705 (cbranch<mode>4): Change to apply to SI and DI modes as well.
3706 (mov<mode>): Change constraints to enforce that push/pop
3707 destination cannot use the same register as source.
3708 (*mov<mode><cc_cc>): Ditto.
3709 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
3710 at assembly output rather than as RTL expander.
3711 (zero_extendqihi2): Bugfix in check for same registers.
3712 (adddi3_nocc): Bugfix in check for constant operand.
3713 (addsi3_nocc): Ditto.
3714 (subdi3_nocc): Ditto.
3715 (subsi3_nocc): Ditto.
3716 (negdi2_nocc): Copy input to pdp11_expand_operands.
3717 (negsi2_nocc): Ditto.
3718 (bswap2_nocc): Ditto.
3719 * config/pdp11/pdp11.opt (mlra): Fix documentation.
3720 * config/pdp11/t-pdp11: Use -Os.
3722 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
3724 * config/arm/parsecpu.awk (/alias/): New parsing rule.
3725 (/begin cpu/): Check that the cpu name hasn't been previously defined.
3726 (gen_comm_data): Print out CPU alias tables.
3727 (check_cpu): Match aliases when checking the CPU name.
3728 * config/arm/arm-protos.h (cpu_alias): New structure.
3729 (cpu_option): Add entry for aliases.
3730 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
3731 strongarm1100 and strongarm1110.
3732 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
3733 (config/arm/arm-generic.md): Remove redundant references to
3734 strongarm110, strongarm1100 and strongarm1110.
3735 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
3736 Scan aliases for additional hints.
3737 (arm_parse_cpu_option_name): Also match a cpu name against the list
3739 * config/arm/arm-tables.opt: Regenerated.
3740 * config/arm/arm-tune.md: Regenerated.
3742 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3744 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
3745 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
3746 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3747 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
3748 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3749 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
3750 * gengtype.c (open_base_files): Add omp-general.h.
3751 * gimple.c (gimple_build_omp_critical):
3752 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
3753 gimple_omp_taskgroup_set_clauses.
3754 (gimple_build_omp_atomic_load): Add mo argument, call
3755 gimple_omp_atomic_set_memory_order.
3756 (gimple_build_omp_atomic_store): Likewise.
3757 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
3758 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
3760 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
3761 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
3762 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
3763 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
3764 different value for GF_OMP_ATOMIC_NEED_VALUE.
3765 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
3767 (struct gimple_statement_omp_single_layout): And remove here.
3768 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
3769 than gimple_statement_omp_single_layout.
3770 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
3772 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
3773 (gimple_omp_subcode): Formatting fix.
3774 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
3775 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
3776 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
3777 gimple_omp_teams_host, gimple_omp_teams_set_host,
3778 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
3779 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
3780 gimple_omp_taskgroup_set_clauses): New inline functions.
3781 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
3782 (gimple_build_omp_atomic_store): Likewise.
3783 (gimple_omp_atomic_seq_cst_p): Remove.
3784 (gimple_omp_atomic_memory_order): New function.
3785 (gimple_omp_atomic_set_seq_cst): Remove.
3786 (gimple_omp_atomic_set_memory_order): New function.
3787 (gimple_build_omp_taskgroup): Add clauses argument.
3788 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
3789 (dump_gimple_omp_task): Print taskwait with depend clauses.
3790 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
3791 dump_omp_atomic_memory_order.
3792 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
3793 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
3794 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
3795 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
3796 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
3797 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
3798 ORT_UNTIED_TASKLOOP enumerators.
3799 (enum gimplify_defaultmap_kind): New.
3800 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
3801 target_map_pointers_as_0len_arrays members, add defaultmap.
3802 (new_omp_context): Initialize defaultmap member.
3803 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3804 (maybe_fold_stmt): Don't fold even in host teams regions.
3805 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
3806 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
3807 ctx->omp_firstprivatize_variable.
3808 (omp_add_variable): Don't add private/firstprivate for VLAs in
3810 (omp_default_clause): Print "taskloop" rather than "task" if
3812 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3813 Handle new defaultmap clause kinds.
3814 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
3815 iterator to be lastprivate or private. Fix up diagnostics if linear
3816 is used on collapse>1 simd iterator.
3817 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3818 (gimplify_omp_depend): New function.
3819 (gimplify_scan_omp_clauses): Add shared clause on parallel for
3820 combined parallel master taskloop{, simd} if taskloop has
3821 firstprivate, lastprivate or reduction clause. Handle
3822 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
3823 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
3824 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
3825 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
3826 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
3828 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
3829 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
3830 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
3831 OMP_CLAUSE_{TASK,IN}_REDUCTION.
3832 (gimplify_omp_task): Handle taskwait with depend clauses.
3833 (gimplify_omp_for): Add shared clause on parallel for combined
3834 parallel master taskloop{, simd} if taskloop has firstprivate,
3835 lastprivate or reduction clause. Use ORT_TASKLOOP or
3836 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
3837 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
3838 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
3839 __for_end and __for_range temporaries on OMP_PARALLEL for
3840 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
3841 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
3842 sandwiched in between two taskloops.
3843 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
3844 instead of ctx->omp_firstprivatize_variable.
3845 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
3846 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
3847 host teams, use gimplify_and_return_first etc. for body like
3848 for target or target data constructs, and at the end call
3849 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
3850 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
3851 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
3852 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
3853 gimple_omp_atomic_set_seq_cst calls.
3854 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
3855 case, handle taskgroup clauses.
3856 * lto-streamer-out.c (hash_tree): Handle
3857 OMP_CLAUSE_{TASK,IN}_REDUCTION.
3858 * Makefile.in (GTFILES): Add omp-general.h.
3859 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
3860 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
3861 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
3862 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
3863 BUILT_IN_GOMP_LOOP_DOACROSS_START,
3864 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
3865 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3866 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
3867 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
3868 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
3869 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
3870 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
3871 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3872 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
3873 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
3874 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
3875 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
3876 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
3877 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
3878 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
3879 * omp-expand.c (workshare_safe_to_combine_p): Return false for
3880 non-worksharing loops.
3881 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
3882 (determine_parallel_type): Don't combine parallel with worksharing
3883 which has _reductemp_ clause.
3884 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
3885 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
3886 if there is nonmonotonic modifier or if there is no modifier and no
3887 ordered clause. For dynamic and guided schedule without monotonic
3888 and nonmonotonic modifier, default to nonmonotonic.
3889 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
3890 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
3892 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
3893 there are any reduction clauses.
3894 (expand_taskwait_call): New function.
3895 (expand_teams_call): New function.
3896 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
3897 expand_teams_call for it. Formatting fix. Handle taskwait with
3899 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
3900 of worksharing loops with task reductions.
3901 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
3902 expansion of worksharing loops with task reductions.
3903 (expand_omp_sections): Handle expansion of sections with task
3905 (expand_omp_synch): For host teams call expand_omp_taskreg.
3906 (omp_memory_order_to_memmodel): New function.
3907 (expand_omp_atomic_load, expand_omp_atomic_store,
3908 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
3909 instead of gimple_omp_atomic_seq_cst_p.
3910 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
3911 depend clauses as a standalone directive.
3912 * omp-general.c (enum omp_requires): New variable.
3913 (omp_extract_for_data): Initialize have_reductemp member. Allow
3914 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
3915 GT_EXPR loops depending on incr sign. Formatting fixes.
3916 * omp-general.h (struct omp_for_data): Add have_reductemp member.
3917 (enum omp_requires): New enum.
3918 (omp_requires_mask): Declare.
3919 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
3921 * omp-low.c (struct omp_context): Add task_reductions and
3922 task_reduction_map fields.
3923 (is_host_teams_ctx): New function.
3924 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
3925 (use_pointer_for_field): Use is_global_var instead of
3926 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
3928 (build_outer_var_ref): Ignore taskgroup outer contexts.
3929 (delete_omp_context): Release task_reductions and task_reduction_map.
3930 (scan_sharing_clauses): Don't add any fields for reduction clause on
3931 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
3932 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
3933 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
3934 Handle OMP_CLAUSE_NONTEMPORAL.
3935 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
3937 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
3938 clauses with task modifier.
3939 (scan_omp_task): Handle taskwait with depend clauses.
3940 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
3941 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
3942 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
3943 (scan_omp_for): Fix comment formatting.
3944 (scan_omp_teams): Handle host teams constructs.
3945 (check_omp_nesting_restrictions): Allow teams with no outer
3946 OpenMP context. Adjust diagnostics for teams strictly nested into
3947 some explicit OpenMP construct other than target. Allow OpenMP atomics
3948 inside of simd regions.
3949 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
3950 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
3951 taskreg_nesting_level while scanning host teams construct.
3952 (task_reduction_read): New function.
3953 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
3954 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
3955 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
3956 second argument create_tmp_var if it is NULL. Don't ignore shared
3957 clauses in is_host_teams_ctx contexts. Handle
3958 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
3960 (lower_reduction_clauses): Ignore reduction clauses with task
3961 modifier. Remove second argument create_tmp_var if it is NULL.
3962 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
3963 (lower_send_clauses): Ignore reduction clauses with task modifier.
3964 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
3965 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
3966 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
3967 rely that it is the last stmt in body so far. Ignore outer taskgroup
3969 (omp_task_reductions_find_first, omp_task_reduction_iterate,
3970 lower_omp_task_reductions): New functions.
3971 (lower_omp_sections): Handle reduction clauses with taskgroup
3972 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
3973 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
3974 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
3976 (lower_omp_taskgroup): Handle taskgroup reductions.
3977 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
3978 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
3979 (lower_depend_clauses): If there are any
3980 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3981 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
3982 seen, assume lowering is done already and return early. Set kind
3983 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
3984 (lower_omp_taskreg): Handle reduction clauses with task modifier on
3985 parallel construct. Handle reduction clause on taskloop construct.
3986 Handle taskwait with depend clauses.
3987 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
3988 for host teams constructs.
3989 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
3990 nontemporal and _reductemp_ clause entries.
3991 (omp_clause_code_name): Likewise.
3992 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
3993 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
3994 * tree-core.h (enum omp_clause_code): Add
3995 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
3996 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
3997 (struct tree_base): Add omp_atomic_memory_order field into union.
3998 Remove OMP_ATOMIC_SEQ_CST comment.
3999 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
4000 and OMP_CLAUSE_DEPEND_DEPOBJ.
4001 (struct tree_omp_clause): Add subcode.defaultmap_kind.
4002 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
4003 OpenMP constructs with body and clauses operands.
4004 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
4005 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
4006 (OMP_TASKGROUP_CLAUSES): Define.
4007 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
4008 OMP_CLAUSE__LOOPTEMP_.
4009 (OMP_ATOMIC_SEQ_CST): Remove.
4010 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
4011 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
4012 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
4013 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
4014 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
4015 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
4016 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
4017 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
4018 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
4019 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
4021 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
4022 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4023 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
4024 (convert_local_omp_clauses): Likewise. Remove useless test.
4025 * tree-parloops.c (create_call_for_reduction_1): Pass
4026 OMP_MEMORY_ORDER_RELAXED as new argument to
4027 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
4028 * tree-pretty-print.c (dump_omp_iterators): New function.
4029 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
4030 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
4031 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
4032 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
4033 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
4034 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
4035 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
4036 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4037 (dump_omp_atomic_memory_order): New function.
4038 (dump_generic_node): Use it. Print taskgroup clauses. Print
4039 taskwait with depend clauses.
4040 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
4041 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
4042 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
4043 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
4044 write_ts_omp_clause_tree_pointers): Likewise.
4046 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4049 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
4050 "-missed", "-note", and "-all" sub-options.
4051 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
4053 (can_early_inline_edge_p): Likewise.
4054 (want_early_inline_function_p): Likewise.
4055 (want_inline_self_recursive_call_p): Likewise.
4056 (recursive_inlining): Likewise.
4057 (inline_small_functions): Likewise.
4058 (flatten_function): Likewise.
4059 (ipa_inline): Likewise.
4060 (inline_always_inline_functions): Likewise.
4061 (early_inline_small_functions): Likewise.
4062 (early_inliner): Likewise.
4063 * tree-inline.c (expand_call_inline): Likewise.
4065 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4067 * pretty-print.c (pp_format): Handle %f.
4068 (selftest::test_pp_format): Add test of %f.
4069 * pretty-print.h (pp_double): New macro.
4071 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4073 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
4074 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
4075 (dump_pretty_printer::decode_format): Implement "%C" for
4077 (selftest::test_capture_of_dump_calls): Rename "where" to
4078 "stmt_loc". Convert test_decl to a function decl and set its
4079 location. Add a symbol_table_test RAII instance and a
4080 cgraph_node, using it to test "%C" and dump_symtab_node.
4082 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
4085 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
4087 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4089 * cgraph.c: Include "selftest.h".
4090 (saved_symtab): New variable.
4091 (selftest::symbol_table_test::symbol_table_test): New ctor.
4092 (selftest::symbol_table_test::~symbol_table_test): New dtor.
4093 (selftest::test_symbol_table_test): New test.
4094 (selftest::cgraph_c_tests): New.
4095 * cgraph.h (saved_symtab): New decl.
4096 (selftest::symbol_table_test): New class.
4097 * selftest-run-tests.c (selftest::run_tests): Call
4098 selftest::cgraph_c_tests.
4099 * selftest.h (selftest::cgraph_c_tests): New decl.
4101 2018-11-08 Richard Biener <rguenther@suse.de>
4103 * tree-data-ref.h (lambda_int): New typedef.
4104 (lambda_vector_gcd): Adjust.
4105 (lambda_vector_new): Likewise.
4106 (lambda_matrix_new): Likewise.
4107 * tree-data-ref.c (print_lambda_vector): Adjust.
4109 2018-11-08 Richard Biener <rguenther@suse.de>
4111 PR tree-optimization/87929
4112 * tree-complex.c (expand_complex_comparison): Clean EH.
4114 2018-11-08 Martin Liska <mliska@suse.cz>
4116 * doc/extend.texi: Reword.
4117 * predict.c (expr_expected_value_1): Likewise.
4119 2018-11-08 Richard Biener <rguenther@suse.de>
4121 PR tree-optimization/87913
4122 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
4123 of extreme values to ordered comparisons.
4125 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
4128 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
4130 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
4132 * doc/invoke.texi: Remove leading dash from @opindex entries
4133 throughout the file.
4135 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
4138 * doc/invoke.texi (Option Summary): Add -e and --entry.
4139 (Link Options): Likewise.
4141 2018-11-07 Nathan Sidwell <nathan@acm.org>
4144 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
4145 --disable-checking bootstrap.
4147 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
4149 * configure: Regenerated.
4151 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4154 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
4155 to the mode of the widest field iff the widest field has mode class
4156 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
4159 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
4161 * common.opt: Add -Wattribute-warning.
4162 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
4163 * expr.c (expand_expr_real_1): Add new attribute to warning_at
4164 call to allow user configure behavior of "warning" attribute.
4166 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
4168 * target.def: Put @: after every vs., e.g., and i.e. where it is
4169 followed by whitespace.
4170 * doc/extend.texi: Ditto.
4171 * doc/fragments.texi: Ditto.
4172 * doc/gimple.texi: Ditto.
4173 * doc/implement-c.texi: Ditto.
4174 * doc/install.texi: Ditto.
4175 * doc/invoke.texi: Ditto.
4176 * doc/md.texi: Ditto.
4177 * doc/plugins.texi: Ditto.
4178 * doc/rtl.texi: Ditto.
4179 * doc/sourcebuild.texi: Ditto.
4180 * doc/tm.texi.in: Ditto.
4181 * doc/ux.texi: Ditto.
4182 * doc/tm.texi: Regenerate.
4184 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4186 * config/arm/arm-cpus.in (ares): New entry.
4187 * config/arm/arm-tables.opt: Regenerate.
4188 * config/arm/arm-tune.md: Likewise.
4189 * doc/invoke.texi (ARM Options): Document ares.
4191 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4193 * config/aarch64/aarch64-cores.def (ares): Define.
4194 * config/aarch64/aarch64-tune.md: Regenerate.
4195 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
4197 2018-11-07 Jan Hubicka <jh@suse.cz>
4199 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
4200 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
4201 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
4204 2018-11-07 Richard Biener <rguenther@suse.de>
4206 PR tree-optimization/87914
4207 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
4209 (vectorizable_reduction): Handle shifts and rotates by dispatching
4210 to vectorizable_shift.
4211 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
4212 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
4214 (vectorizable_shift): Export and handle being called as
4216 (vect_analyze_stmt): Call vectorizable_shift after
4217 vectorizable_reduction.
4218 * tree-vectorizer.h (vectorizable_shift): Declare.
4220 2018-11-07 Jan Hubicka <jh@suse.cz>
4222 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
4223 than const decls in TREE_VALUE of enum.
4224 (dump_type_inheritance_graph): Improve duplicate dumping.
4225 (free_enum_values): New.
4226 (build_type_inheritance_graph): Use it.
4227 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
4228 which are not main variants or not ODR types.
4229 (verify_type_variant): Expect variants to have no TYPE_VALUES.
4231 2018-11-07 Richard Biener <rguenther@suse.de>
4233 * ipa-inline.c (want_inline_small_function_p): Compute
4234 big_speedup_p lazily and last.
4236 2018-11-07 Jan Hubicka <jh@suse.cz>
4238 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
4239 building incomplete variant of complete type.
4240 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
4241 variant of complete type.
4243 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4245 * config/mips/mips.c: Fix typo in documentation of
4246 mips_loongson_ext2_prefetch_cookie.
4247 (mips_option_override): fix brain twister logical.
4248 * config/mips/mips.h: Fix typo in documentation of
4249 ISA_HAS_CTZ_CTO and define pattern.
4250 * config/mips/mips.md (prefetch): Hoist EXT2 above
4252 (prefetch_indexed): Hoist EXT2 above the EXT block.
4254 2018-11-07 Jan Hubicka <jh@suse.cz>
4256 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
4257 return and parameter types of function and method types.
4258 (free_lang_data_in_cgraph): Update.
4260 2018-11-07 Martin Liska <mliska@suse.cz>
4262 PR rtl-optimization/87868
4263 * postreload-gcse.c (eliminate_partially_redundant_load): Set
4264 threshold to max_count if we would overflow.
4265 * profile-count.h: Make max_count a public constant.
4267 2018-11-07 Martin Liska <mliska@suse.cz>
4269 * mem-stats.h: Fix GNU coding style.
4271 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4273 * config/mips/gs264e.md: New.
4274 * config/mips/mips-cpus.def: Define gs264e.
4275 * config/mips/mips-tables.opt: Regenerate.
4276 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4278 (mips_issue_rate): Add support for gs264e.
4279 (mips_multipass_dfa_lookahead): Likewise.
4280 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
4281 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
4282 (MIPS_ASE_MSA_SPEC): New.
4283 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
4284 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
4285 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
4286 * config/mips/mips.md: Include gs264e.md.
4287 (processor): Add gs264e.
4288 * config/mips/mips.opt (MSA): Use Mask instead of Var.
4289 * doc/invoke.texi: Add gs264e to supported architectures.
4291 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4293 * config/mips/gs464e.md: New.
4294 * config/mips/mips-cpus.def: Define gs464e.
4295 * config/mips/mips-tables.opt: Regenerate.
4296 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4298 (mips_issue_rate): Add support for gs464e.
4299 (mips_multipass_dfa_lookahead): Likewise.
4300 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
4301 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
4302 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
4303 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
4304 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
4305 * config/mips/mips.md: Include gs464e.md.
4306 (processor): Add gs464e.
4307 * doc/invoke.texi: Add gs464e to supported architectures.
4309 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4311 * config/mips/loongson3a.md: Rename to ...
4312 * config/mips/gs464.md: ... here.
4313 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
4314 as an alias of gs464 processor.
4315 * config/mips/mips-tables.opt: Regenerate.
4316 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
4317 instead of PROCESSOR_LOONGSON_3A.
4318 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
4320 (mips_option_override): Enable MMI and EXT for gs464.
4321 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
4322 Rename TUNE_LOONGSON_3A to TUNE_GS464.
4323 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
4324 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
4325 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
4327 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
4328 (processor): Add gs464;
4329 * doc/invoke.texi: Add gs464 to supported architectures.
4331 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4333 * config/mips/mips-protos.h
4334 (mips_loongson_ext2_prefetch_cookie): New prototype.
4335 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
4336 (mips_option_override): Enable TARGET_LOONGSON_EXT when
4337 TARGET_LOONGSON_EXT2 is true.
4338 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
4339 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
4340 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
4341 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
4342 TARGET_LOONGSON_EXT2.
4343 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
4344 (define_insn "ctz<mode>2"): New insn pattern.
4345 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
4346 (define_insn "prefetch_indexed_<mode>"): Include
4347 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
4348 * config/mips/mips.opt (-mloongson-ext2): Add option.
4349 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
4351 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4353 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
4354 __mips_loongson_ext.
4355 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
4356 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
4358 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
4359 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
4360 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
4361 instead of TARGET_LOONGSON_3A.
4362 * config/mips/mips.opt (-mloongson-ext): Add option.
4363 * gcc/doc/invoke.texi (-mloongson-ext): Document.
4365 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4367 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
4368 * config/mips/loongson.md: Move to ...
4369 * config/mips/loongson-mmi.md: here; Adjustment.
4370 * config/mips/loongson.h: Move to ...
4371 State as deprecated. Include loongson-mmiintrin.h for back
4372 compatibility and warning.
4373 * config/mips/loongson-mmiintrin.h: ... here.
4374 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
4375 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
4376 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4377 (mips_option_override): Make sure MMI use hard float;
4378 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
4379 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
4380 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
4381 TARGET_LOONGSON_VECTORS.
4382 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
4383 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
4384 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
4385 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
4387 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
4388 TARGET_LOONGSON_VECTORS.
4389 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
4390 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4391 (Loongson MMI patterns): Include loongson-mmi.md instead of
4393 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
4394 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
4396 2018-11-07 Richard Biener <rguenther@suse.de>
4399 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
4400 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
4402 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
4404 PR rtl-optimization/87874
4405 * lra.c (lra_substitute_pseudo): Do not create a subreg for
4408 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
4410 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
4411 if not in indexed or indirect form.
4412 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
4413 (bswap<mode>2_store): Ditto.
4415 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
4417 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
4420 2018-11-06 Richard Biener <rguenther@suse.de>
4422 PR tree-optimization/86850
4423 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
4424 instead of src.m_vec.
4426 2018-11-06 Jan Hubicka <jh@suse.cz>
4428 * tree.c (fld_simplified_type_name): Break out form ...
4429 (free_lang_data_in_type): ... here.
4430 (fld_type_variant_equal_p): Use it.
4432 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4434 * config/default-d.c: Include memmodel.h.
4436 * config/sol2-d.c: New file.
4437 * config/t-sol2 (sol2-d.o): New rule.
4438 * config.gcc <*-*-solaris2*>: Set d_target_objs,
4439 target_has_targetdm.
4441 2018-11-06 Jan Hubicka <jh@suse.cz>
4443 * tree.c (fld_type_variant): Also copy alignment; be sure that
4444 new variant is equal.
4446 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
4449 * config/s390/s390.md: Add relative_long attribute.
4451 2018-11-06 Jan Hubicka <jh@suse.cz>
4453 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
4454 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
4455 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
4456 stream TYPE_NEEDS_CONSTRUCTING.
4457 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
4458 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
4460 2018-11-06 Richard Biener <rguenther@suse.de>
4462 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
4464 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
4466 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4468 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
4469 REG_CLASS_CONTENTS[GEN_REGS].
4470 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
4472 2018-11-06 Jan Hubicka <jh@suse.cz>
4474 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
4476 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4479 * config/sol2.h (ASAN_CC1_SPEC): Define.
4480 (LD_WHOLE_ARCHIVE_OPTION): Define.
4481 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
4482 (ASAN_REJECT_SPEC): Provide default.
4483 (LIBASAN_EARLY_SPEC): Define.
4484 (LIBTSAN_EARLY_SPEC): Define.
4485 (LIBLSAN_EARLY_SPEC): Define.
4486 * config/i386/sol2.h (CC1_SPEC): Redefine.
4487 (ASAN_REJECT_SPEC): Define.
4489 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
4490 (TARGET_ASAN_SHADOW_OFFSET): Define.
4491 (sparc_asan_shadow_offset): New function.
4492 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
4493 (ASAN_REJECT_SPEC): Define.
4495 2018-11-06 Jan Hubicka <jh@suse.cz>
4497 * tree.c (fld_type_variant): Copy canonical type.
4498 (fld_incomplete_type_of): Check that canonical types looks sane;
4499 copy canonical type.
4500 (verify_type): Accept when incomplete type has complete canonical type.
4502 2018-11-06 Jan Hubicka <jh@suse.cz>
4504 * tree.c (free_lang_data): Reset overwite_assembler_name,
4505 print_xnode, print_decl, print_type and print_identifier of
4508 2018-11-06 Richard Biener <rguenther@suse.de>
4510 PR tree-optimization/87889
4511 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4512 Do nothing if old and new arg are the same
4514 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
4517 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
4518 attributes for operands 3 and 4.
4520 2018-11-06 Richard Biener <rguenther@suse.de>
4523 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
4524 matching bitfield insertion.
4526 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
4528 * auto-inc-dec.c: Include valtrack.h. Improve comments.
4529 (reg_next_debug_use): New.
4530 (attempt_change): Propagate adjusted expression into affected
4532 (merge_in_block): Track uses in debug insns.
4533 (pass_inc_dec::execute): Allocate and release
4536 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
4538 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
4539 (_mm512_fixupimm_round_pd): Update parameters and builtin.
4540 (_mm512_maskz_fixupimm_round_pd): Ditto.
4541 (_mm512_fixupimm_round_ps): Ditto.
4542 (_mm512_maskz_fixupimm_round_ps): Ditto.
4543 (_mm_fixupimm_round_sd): Ditto.
4544 (_mm_maskz_fixupimm_round_sd): Ditto.
4545 (_mm_fixupimm_round_ss): Ditto.
4546 (_mm_maskz_fixupimm_round_ss): Ditto.
4547 (_mm512_fixupimm_pd): Ditto.
4548 (_mm512_maskz_fixupimm_pd): Ditto.
4549 (_mm512_fixupimm_ps): Ditto.
4550 (_mm512_maskz_fixupimm_ps): Ditto.
4551 (_mm_fixupimm_sd): Ditto.
4552 (_mm_maskz_fixupimm_sd): Ditto.
4553 (_mm_fixupimm_ss): Ditto.
4554 (_mm_maskz_fixupimm_ss): Ditto.
4555 (_mm512_mask_fixupimm_round_pd): Update builtin.
4556 (_mm512_mask_fixupimm_round_ps): Ditto.
4557 (_mm_mask_fixupimm_round_sd): Ditto.
4558 (_mm_mask_fixupimm_round_ss): Ditto.
4559 (_mm512_mask_fixupimm_pd): Ditto.
4560 (_mm512_mask_fixupimm_ps): Ditto.
4561 (_mm_mask_fixupimm_sd): Ditto.
4562 (_mm_mask_fixupimm_ss): Ditto.
4563 * config/i386/avx512vlintrin.h:
4564 (_mm256_fixupimm_pd): Update parameters and builtin.
4565 (_mm256_maskz_fixupimm_pd): Ditto.
4566 (_mm256_fixupimm_ps): Ditto.
4567 (_mm256_maskz_fixupimm_ps): Ditto.
4568 (_mm_fixupimm_pd): Ditto.
4569 (_mm_maskz_fixupimm_pd): Ditto.
4570 (_mm_fixupimm_ps): Ditto.
4571 (_mm_maskz_fixupimm_ps): Ditto.
4572 (_mm256_mask_fixupimm_pd): Update builtin.
4573 (_mm256_mask_fixupimm_ps): Ditto.
4574 (_mm_mask_fixupimm_pd): Ditto.
4575 (_mm_mask_fixupimm_ps): Ditto.
4576 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
4577 * config/i386/i386-builtin.def: Update builtin definitions.
4578 * config/i386/i386.c: Handle new builtin types and remove useless ones.
4579 * config/i386/sse.md: Update VFIXUPIMM* patterns.
4580 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4581 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4582 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
4583 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4584 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4585 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
4586 * config/i386/subst.md:
4587 (round_saeonly_sd_mask_operand4): Add new subst_attr.
4588 (round_saeonly_sd_mask_op4): Ditto.
4589 (round_saeonly_expand_operand5): Ditto.
4590 (round_saeonly_expand): Update.
4592 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
4594 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
4596 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
4598 PR rtl-optimization/87871
4599 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
4601 2018-11-05 Paul Koning <ni1d@arrl.net>
4603 * doc/sourcebuild.texi (target attributes): Document new "inf"
4604 effective target keyword.
4606 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
4608 * config/s390/s390.c (s390_register_move_cost): Increase costs for
4609 moves involving the CC reg.
4611 2018-11-05 Richard Biener <rguenther@suse.de>
4613 PR tree-optimization/87873
4614 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
4616 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
4617 * tree-vect-loop.c (vect_transform_loop): When splitting the
4618 loop exit also create forwarder PHIs for constants.
4619 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4620 Handle constant to_arg, add extra checking we match up the correct
4623 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
4625 * config/s390/s390.md: QImode and HImode for load on condition.
4627 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
4629 * config/s390/predicates.md: Fix typo.
4630 * config/s390/s390.md: Allow immediates for load on condition.
4632 2018-11-05 Martin Liska <mliska@suse.cz>
4634 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
4635 * bitmap.h (struct bitmap_usage): Likewise.
4636 * ggc-common.c (SCALE): Remove.
4638 (struct ggc_usage): Use SIZE_AMOUNT. And update
4640 * ggc-page.c (SCALE): Remove.
4641 (STAT_LABEL): Remove.
4642 (ggc_print_statistics): Use SIZE_AMOUNT.
4643 * gimple.h (SCALE): Remove.
4645 * input.c (ONE_K): Remove.
4648 (STAT_LABEL): Likewise.
4649 (FORMAT_AMOUNT): Likewise.
4650 (dump_line_table_statistics): Use SIZE_AMOUNT.
4651 * mem-stats.h (struct mem_usage): Likewise.
4652 * rtl.c (dump_rtx_statistics): Likewise.
4653 (rtx_alloc_counts): Change type to size_t.
4654 (rtx_alloc_sizes): Likewise.
4655 (rtx_count_cmp): New.
4656 (dump_rtx_statistics): Sort first based on counts.
4657 * tree.c (tree_nodes_cmp): New.
4658 (tree_codes_cmp): New.
4659 (dump_tree_statistics): Sort first based on counts.
4660 * system.h (ONE_K): New.
4662 (SIZE_SCALE): Likewise.
4663 (SIZE_LABEL): Likewise.
4664 (SIZE_AMOUNT): Likewise.
4665 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
4666 * tree-dfa.c (dump_dfa_stats): Likewise.
4667 * tree-phinodes.c (phinodes_print_statistics): Likewise.
4668 * tree-ssanames.c (ssanames_print_statistics): Likewise.
4669 * tree.c (dump_tree_statistics): Likewise.
4670 * vec.c (struct vec_usage): Likewise.
4671 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
4672 trigger a -Werror=format-overflow with
4673 --enable-gather-detailed-stats.
4675 2018-11-05 Martin Liska <mliska@suse.cz>
4677 * mem-stats.h (mem_alloc_description::release_instance_overhead):
4679 * vec.c (struct vec_usage): Register m_element_size.
4680 (vec_prefix::register_overhead): New arguments: elements and
4682 (vec_prefix::release_overhead): Subtract elements.
4683 * vec.h (struct vec_prefix): Change signature.
4684 (va_heap::reserve): Pass proper arguments.
4685 (va_heap::release): Likewise.
4687 2018-11-05 Martin Liska <mliska@suse.cz>
4689 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
4693 2018-11-05 Richard Biener <rguenther@suse.de>
4695 * tree-scalar-evolution.h (final_value_replacement_loop): Update
4697 * tree-scalar-evolution.c (final_value_replacement_loop): Return
4698 whether anything was done.
4699 (scev_const_prop): Remove constant propagation part, fold
4701 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
4702 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
4705 2018-11-05 Jakub Jelinek <jakub@redhat.com>
4707 PR tree-optimization/87859
4708 * gimple-ssa-store-merging.c (struct merged_store_group): Add
4709 only_constants and first_nonmergeable_order members.
4710 (merged_store_group::merged_store_group): Initialize them.
4711 (merged_store_group::do_merge): Clear only_constants member if
4712 adding something other than INTEGER_CST store.
4713 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
4714 stores with order >= first_nonmergeable_order. Use
4715 merged_store->only_constants instead of always recomputing it.
4716 Set merged_store->first_nonmergeable_order if we've skipped any
4717 stores. Attempt to merge overlapping INTEGER_CST stores that
4718 we would otherwise skip.
4721 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
4723 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
4726 * config/i386/emmintrin.h (__v16qs): New to cope with option
4728 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
4729 (_mm_cmplt_epi8): Likewise.
4730 (_mm_cmpgt_epi8): Likewise.
4732 2018-11-05 Richard Biener <rguenther@suse.de>
4734 PR rtl-optimization/87852
4735 * fwprop.c (use_killed_between): Only consider single-defs of the
4736 use whose definition statement dominates the use.
4738 2018-11-05 Martin Liska <mliska@suse.cz>
4741 * doc/invoke.texi: Remove options that are
4742 not disabled with -Os.
4744 2018-11-05 Martin Liska <mliska@suse.cz>
4747 * doc/extend.texi: Update constrain about the last argument
4748 of __builtin_expect_with_probability.
4750 2018-11-05 Martin Liska <mliska@suse.cz>
4753 * predict.c (expr_expected_value_1): Verify
4754 that last argument is a real constants and emit
4757 2018-11-05 Martin Liska <mliska@suse.cz>
4759 PR gcov-profile/77698
4760 * ipa-profile.c (ipa_profile): Adjust hotness threshold
4763 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4765 PR tree-optimization/86572
4766 * builtins.c (c_strlen): Handle negative offsets in a safe way.
4768 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4770 PR tree-optimization/87672
4771 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
4772 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
4774 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
4777 * cfgexpand.c (pass_expand::execute): Move the call to
4778 finish_eh_generation in front of the call to expand_stack_alignment.
4780 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
4782 * common/config/i386/i386-common.c (processor_alias_table): Add
4784 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
4785 (case ${target}): Add znver2.
4786 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
4787 -march=native recognize znver2 processors.
4788 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
4789 * config/i386/i386.c (m_znver2): New definition.
4790 (m_ZNVER): New definition.
4791 (m_AMD_MULTIPLE): Includes m_znver2.
4792 (processor_cost_table): Add znver2 entry.
4793 (processor_target_table): Add znver2 entry.
4794 (get_builtin_code_for_version): Set priority for
4796 (processor_model): Add M_AMDFAM17H_ZNVER2.
4797 (arch_names_table): Ditto.
4798 (ix86_reassociation_width): Include znver2.
4799 * config/i386/i386.h (TARGET_znver2): New definition.
4800 (struct ix86_size_cost): Add TARGET_ZNVER2.
4801 (enum processor_type): Add PROCESSOR_ZNVER2.
4802 * config/i386/i386.md (define_attr "cpu"): Add znver2.
4803 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
4804 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
4805 (ix86_adjust_cost): Add znver2.
4806 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
4807 * gcc/doc/extend.texi: Add details about znver2.
4808 * gcc/doc/invoke.texi: Add details about znver2.
4810 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
4814 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
4817 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4819 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
4820 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
4822 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
4824 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
4825 shrink-wrapping when -mtrack-speculation.
4827 2018-11-02 Richard Biener <rguenther@suse.de>
4829 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
4830 (pop_cost_one_pair): Do not free pair.
4831 (pop_best_coalesce): Likewise.
4832 (create_coalesce_list): Initialize obstack.
4833 (delete_coalesce_list): Free obstack.
4834 (find_coalesce_pair): Obstack-allocate coalesce pairs.
4835 (add_cost_one_coalesce): Likewise.
4836 (struct live_track): Remove bitmap pointer indirections.
4837 (new_live_track): Adjust.
4838 (delete_live_track): Likewise.
4839 (live_track_remove_partition): Likewise.
4840 (live_track_add_partition): Likewise.
4841 (live_track_live_p): Likewise.
4842 (live_track_process_def): Likewise.
4843 (live_track_clear_base_vars): Likewise.
4845 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4847 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
4848 * configure: Regenerate.
4849 * config.in: Regenerate.
4850 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
4851 HAVE_AS_REGISTER_PSEUDO_OP guard.
4852 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
4853 !HAVE_AS_REGISTER_PSEUDO_OP support.
4854 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
4857 2018-11-02 Richard Biener <rguenther@suse.de>
4859 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
4862 2018-11-02 Richard Biener <rguenther@suse.de>
4864 PR tree-optimization/87776
4865 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
4866 executable when iterating but running into rpo-vn-max-loop-depth
4867 and not eliding the iteration.
4869 2018-11-30 Jan Hubicka <jh@suse.cz>
4871 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
4874 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
4876 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
4878 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
4879 Combine with rs6000_address_for_fpconvert.
4880 (rs6000_address_for_fpconvert): Combine with
4881 rs6000_force_indexed_or_indirect_mem.
4882 (rs6000_expand_vector_init): Change function call from
4883 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4884 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
4885 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4886 (floatsi<mode>2_lfiwax_mem): Ditto.
4887 (floatunssi<mode>2_lfiwzx): Ditto.
4888 (floatunssi<mode>2_lfiwzx_mem): Ditto.
4889 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
4890 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
4891 (fix_trunc<mode>si2_stfiwx): Ditto.
4892 (fixuns_trunc<mode>si2_stfiwx): Ditto.
4893 (float_<mode>si2_hw): Ditto.
4894 (floatuns_<mode>si2_hw): Ditto.
4895 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
4896 (vsx_splat_<mode>): Ditto.
4898 2018-11-01 Joseph Myers <joseph@codesourcery.com>
4900 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4901 at end of assembler input text.
4902 * configure: Regenerate.
4904 2018-11-01 Jakub Jelinek <jakub@redhat.com>
4906 PR tree-optimization/87826
4907 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
4908 negative or larger or equal to type's precision.
4910 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
4912 * opts.c (default_options_table): Do not enable
4913 OPT_fdelayed_branch at -Og.
4914 * doc/invoke.texi (-fdelayed-branch): Document it.
4916 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
4918 * optabs-libfuncs.c (build_libfunc_function_visibility):
4919 New, split out from...
4920 (build_libfunc_function): ... here.
4921 (init_one_libfunc_visibility): New, split out from ...
4922 (init_one_libfunc): ... here.
4924 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
4925 scratch register need not be early-clobber. Document the reason
4926 why we cannot use ST<OP>.
4928 2018-10-31 Joseph Myers <joseph@codesourcery.com>
4931 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
4932 line for second argument of AC_DEFINE_UNQUOTED.
4933 * doc/install.texi (Tools/packages necessary for modifying GCC):
4934 Update to autoconf 2.69 and automake 1.15.1.
4935 * aclocal.m4, config.in, configure: Regenerate.
4937 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
4939 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
4942 2018-10-31 Martin Liska <mliska@suse.cz>
4945 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
4946 Add new argument invalid_extension.
4947 (aarch64_get_all_extension_candidates): New function.
4948 (aarch64_rewrite_selected_cpu): Add NULL to function call.
4949 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
4951 (aarch64_get_all_extension_candidates): New function.
4952 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
4953 argument invalid_extension.
4954 (aarch64_parse_cpu): Likewise.
4955 (aarch64_print_hint_for_extensions): New function.
4956 (aarch64_validate_mcpu): Provide hint about invalid extension.
4957 (aarch64_validate_march): Likewise.
4958 (aarch64_handle_attr_arch): Pass new argument.
4959 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
4960 (aarch64_handle_attr_isa_flags): Likewise.
4962 2018-10-31 Richard Biener <rguenther@suse.de>
4966 * tree-outof-ssa.c (insert_backedge_copies): Restrict
4967 copy generation to useful cases. Place the copy before
4968 the definition of the backedge value when possible.
4970 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4972 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
4973 * config/arc/arc.c (arc_active_insn): New function.
4974 (check_store_cacheline_hazard): Likewise.
4975 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
4976 (arc_override_options): Disable delay slot scheduler for older
4978 (arc_store_addr_hazard_p): New implementation, old one renamed to
4980 (arc_store_addr_hazard_internal_p): Renamed.
4981 (arc_reorg): Don't combine into brcc instructions which are part
4982 of hardware hazard solution.
4983 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
4984 (tune_arc700): Likewise.
4985 * config/arc/arc.opt (arc7xx): New tune value.
4986 * config/arc/arc700.md: Improve A7 scheduler.
4988 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4990 * config/arc/arc.c (arc_override_options): Remove
4991 TARGET_COMPACT_CASESI.
4992 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
4993 (CASE_VECTOR_MODE): Likewise.
4994 (CASE_VECTOR_PC_RELATIVE): Likewise.
4995 (CASE_VECTOR_SHORTEN_MODE): Likewise.
4996 (CASE_VECTOR_SHORTEN_MODE1): Delete.
4997 (ADDR_VEC_ALIGN): Update.
4998 (ASM_OUTPUT_CASE_LABEL): Undefine.
4999 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
5000 (TARGET_BI_BIH): Define.
5001 (DEFAULT_BRANCH_INDEX): Likewise.
5002 * config/arc/arc.md (casesi): Rework to accept BI/BIH
5003 instructions, remove compact_casesi use case.
5004 (casesi_compact_jump): Remove.
5005 (casesi_dispatch): New pattern.
5006 * config/arc/arc.opt: Add mbranch-index option. Deprecate
5007 compact_casesi option.
5008 * doc/invoke.texi: Document mbranch-index option.
5010 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
5012 * config/arc/arc.c (arc_get_tp): Remove function.
5013 (arc_emit_call_tls_get_addr): Likewise.
5014 (arc_call_tls_get_addr): New function.
5015 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
5016 * config/arc/arc.md (tls_load_tp_soft): Remove.
5017 (tls_gd_get_addr): Likewise.
5019 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
5021 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
5022 (mulsi3_600_lib): Remove pattern.
5023 (umulsi3_highpart_600_lib_le): Likewise.
5024 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
5025 (umulsidi3): Remove call to umulsidi3_600_lib.
5026 (umulsidi3_600_lib): Remove pattern.
5027 (peephole2): Remove peephole using the above deprecated patterns.
5029 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5032 * config/arm/arm.c (arm_option_check_internal): Disable the combined
5033 use of -mslow-flash-data and -mword-relocations.
5034 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
5035 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
5037 * doc/invoke.texi (-mword-relocations): Mention conflict with
5039 (-mslow-flash-data): Reciprocally.
5041 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
5043 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
5044 16-byte modes held in GP registers to use an even regno.
5046 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
5047 (aarch64_atomic_ldop_supported_p): Remove.
5048 (aarch64_gen_atomic_ldop): Remove.
5049 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
5050 Fully expand LSE operations here.
5051 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
5052 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
5053 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
5054 and use ATOMIC_LDOP instead; use register_operand for the input;
5055 drop the split and emit insns directly.
5056 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
5057 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
5058 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
5060 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
5061 (aarch64_gen_atomic_ldop): Don't call it.
5062 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
5063 Use aarch64_reg_or_zero.
5064 (aarch64_atomic_exchange<ALLI>): Likewise.
5065 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
5066 operand 0; use aarch64_reg_or_zero for input; merge ...
5067 (@aarch64_atomic_swp<ALLI>): ... this and remove.
5069 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
5070 (aarch64_split_compare_and_swap): Use it.
5071 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
5072 test oldval against the proper predicate.
5073 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
5074 Use nonmemory_operand for expected.
5075 (cas_short_expected_pred): New.
5076 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
5077 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
5078 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
5079 (aarch64_plushi_operand): New.
5081 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
5082 Force oldval into the rval register for TARGET_LSE; emit the compare
5083 during initial expansion so that it may be deleted if unused.
5084 (aarch64_gen_atomic_cas): Remove.
5085 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
5086 Change =&r to +r for operand 0; use match_dup for operand 2;
5087 remove is_weak and mod_f operands as unused. Drop the split
5089 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
5090 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
5091 (@aarch64_atomic_cas<GPI>): Similarly.
5093 2018-10-31 Richard Biener <rguenther@suse.de>
5095 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
5098 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5100 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
5101 * config/aarch64/aarch64.md: Include saphira.md
5102 * config/aarch64/saphira.md: New file for pipeline description.
5104 2018-10-30 Martin Sebor <msebor@redhat.com>
5107 * gimple-ssa-sprintf.c (format_directive): Use %G to include
5109 (sprintf_dom_walker::compute_format_length):
5110 Avoid setting POSUNDER4K here.
5111 (get_destination_size): Handle null argument values.
5112 (get_user_idx_format): New function.
5113 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
5114 functions, including user-defined with attribute format printf.
5115 Use %G to include inlining context.
5116 Set POSUNDER4K here.
5118 2018-10-30 Jan Hubicka <jh@suse.cz>
5120 * params.def (lto-partitions): Bump from 32 to 128.
5122 2018-10-30 Jan Hubicka <jh@suse.cz>
5125 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
5127 (free_lang_data_in_type): Forward declare.
5128 (fld_type_variant_equal_p): New function.
5129 (fld_type_variant): New function
5130 (fld_incomplete_types): New hash.
5131 (fld_incomplete_type_of): New function
5132 (fld_simplfied-type): New function.
5133 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
5134 (free_lang_data): Allocate and free fld_incomplete_type; update call
5135 of free_lang_data_in_decl.
5137 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
5139 * gcov.c (output_lines): Remove duplicate line.
5141 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5143 * config/rs6000/rs6000.md (bswapdi2): Force address into register
5144 if not in indexed or indirect form.
5145 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
5146 (bswapdi2_store): Ditto.
5147 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
5149 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
5150 Prototype for helper function.
5152 2018-10-30 Martin Sebor <msebor@redhat.com>
5154 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
5155 (target, pragma GCC optimize, pragma GCC target): Ditto.
5157 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
5159 * doc/extend.texi: Fix prototype and description of
5160 __builtin_expect_with_probability.
5162 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
5164 * cgraph.h (clone_function_name_1): Replaced by new
5165 clone_function_name_numbered that takes name as string; for
5166 privatize_symbol_name_1 use only.
5167 (clone_function_name): Renamed to
5168 clone_function_name_numbered to be explicit about numbering.
5169 (clone_function_name): New two-argument function that does
5170 not number its output.
5171 (clone_function_name): New three-argument function that
5172 takes a number to append to its output.
5173 * cgraphclones.c (duplicate_thunk_for_node):
5174 (clone_function_name_1): Renamed.
5175 (clone_function_name_numbered): Two new functions.
5176 (clone_function_name): Improved documentation.
5177 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
5178 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
5179 * final.c (final_scan_insn_1): Use the new clone_function_name
5181 * multiple_target.c (create_dispatcher_calls): Ditto.
5182 (create_target_clone): Ditto.
5183 * omp-expand.c (grid_expand_target_grid_body): Ditto.
5184 * omp-low.c (create_omp_child_function_name): Ditto.
5185 * omp-simd-clone.c (simd_clone_create): Ditto.
5186 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
5187 new clone_function_name without numbering.
5189 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
5191 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
5192 Assert that the allocation size is not zero.
5194 2018-10-30 Richard Biener <rguenther@suse.de>
5196 PR tree-optimization/87800
5197 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
5198 non-induction or reduction PHIs.
5200 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
5202 * config/aarch64/falkor-tag-collision-avoidance.c
5203 (execute_tag_collision_avoidance): Call df_note_add_problem.
5205 2018-10-30 Martin Liska <mliska@suse.cz>
5207 * doc/extend.texi: Fix typo in documentation
5208 of __builtin_expect_with_probability.
5210 2018-10-29 David Malcolm <dmalcolm@redhat.com>
5213 * input.c (get_substring_ranges_for_loc): Detect if
5214 linemap_resolve_location gives us a NULL map, and reject
5217 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
5219 * config.gcc (xstormy16-*-elf): Set tm_d_file.
5221 2018-10-29 David Malcolm <dmalcolm@redhat.com>
5222 Martin Sebor <msebor@redhat.com>
5223 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5225 * doc/ux.texi (Quoting): New subsection, adapted from material at
5226 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
5227 MartinSebor and ManuelLopezIbanez.
5228 (Fix-it hints): Note that fix-it hints shouldn't be marked for
5231 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
5234 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
5237 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
5239 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
5241 2018-10-29 Paul Koning <ni1d@arrl.net>
5243 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
5245 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
5247 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
5248 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
5249 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
5250 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
5251 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
5252 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
5253 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
5254 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
5255 Change 'vector' to '__vector'.
5256 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
5257 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
5258 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
5259 _mm_avg_pu16): Likewise. And, whitespace corrections.
5261 2018-10-29 Richard Biener <rguenther@suse.de>
5263 PR tree-optimization/87785
5264 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
5267 2018-10-29 Olivier Hainque <hainque@adacore.com>
5269 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
5271 2018-10-29 Olivier Hainque <hainque@adacore.com>
5273 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
5274 ports configuration macro, defaults to "gnu".
5275 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
5276 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
5278 2018-10-29 Olivier Hainque <hainque@adacore.com>
5280 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
5282 2018-10-29 Richard Biener <rguenther@suse.de>
5284 PR tree-optimization/87790
5285 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
5286 (vect_make_slp_decision): Adjust.
5287 (vect_slp_analyze_bb_1): Likewise.
5288 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
5291 2018-10-29 Richard Biener <rguenther@suse.de>
5293 PR tree-optimization/87785
5294 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
5296 (vect_build_slp_tree): Likewise.
5297 (vect_gather_slp_loads): New function.
5298 (vect_analyze_slp_instance): Gather loads separately from the
5301 2018-10-29 Martin Liska <mliska@suse.cz>
5303 * Makefile.in: Make dependency to json.o.
5304 * doc/gcov.texi: Document new JSON format, remove
5305 old intermediate format documentation.
5306 * gcov.c (struct function_info): Come up with m_name and
5308 (function_info::function_info): Initialize it.
5309 (function_info::~function_info): Release it.
5310 (main): Rename flag_intermediate_format to flag_json_format.
5311 (print_usage): Describe --json-format.
5312 (process_args): Set flag_json_format.
5313 (output_intermediate_line): Remove.
5314 (output_intermediate_json_line): Likewise.
5315 (get_gcov_intermediate_filename): Return new extension
5317 (output_intermediate_file): Implement JSON emission.
5318 (output_json_intermediate_file): Implement JSON emission.
5319 (generate_results): Use ::get_name for function name.
5320 Handle JSON output file.
5321 (read_graph_file): Use ::get_name instead of cplus_demangle.
5322 (read_count_file): Likewise.
5323 (solve_flow_graph): Likewise.
5324 (add_line_counts): Likewise.
5325 (accumulate_line_counts): Use new flag_json_format.
5326 (output_function_details): Use ::get_name instead of cplus_demangle.
5327 (output_lines): Likewise.
5328 * json.cc (test_writing_literals): Add new tests.
5329 * json.h (class literal): Add new boolean constructor.
5331 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
5333 PR rtl-optimization/87701
5334 PR rtl-optimization/87780
5335 * combine.c (make_more_copies): Rewrite.
5337 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
5339 * doc/generic.texi (ABSU_EXPR): Document.
5340 * match.pd (absu(x)*absu(x) -> x*x): Handle.
5341 (absu(absu(X)) -> absu(X)): Likewise.
5342 (absu(-X) -> absu(X)): Likewise.
5343 (absu(X) where X is nonnegative -> X): Likewise.
5345 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
5347 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
5348 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
5349 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
5350 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
5351 (s-tm-texi): Also check timestamp on d-target.def.
5352 (generated_files): Add TM_D_H and d-target-hooks-def.h.
5353 (build/genhooks.o): Also depend on D_TARGET_DEF.
5354 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
5356 * config/aarch64/aarch64-d.c: New file.
5357 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
5359 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
5361 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
5362 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
5363 * config/arm/arm-d.c: New file.
5364 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
5365 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
5366 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5367 * config/arm/t-arm (arm-d.o): New rule.
5368 * config/default-d.c: New file.
5369 * config/glibc-d.c: New file.
5370 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5371 * config/i386/i386-d.c: New file.
5372 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
5373 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
5374 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5375 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
5376 * config/i386/t-i386 (i386-d.o): New rule.
5377 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5378 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5379 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
5380 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5381 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5382 * config/mips/mips-d.c: New file.
5383 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
5384 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
5385 * config/mips/t-mips (mips-d.o): New rule.
5386 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5387 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5388 * config/powerpcspe/powerpcspe-d.c: New file.
5389 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
5391 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5392 Support GNU D by using 0 as the language type.
5393 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
5394 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
5395 * config/riscv/riscv-d.c: New file.
5396 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
5398 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
5399 * config/riscv/t-riscv (riscv-d.o): New rule.
5400 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5401 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5402 * config/rs6000/rs6000-d.c: New file.
5403 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
5405 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5406 Support GNU D by using 0 as the language type.
5407 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
5408 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
5409 * config/s390/s390-d.c: New file.
5410 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
5411 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
5412 * config/s390/t-s390 (s390-d.o): New rule.
5413 * config/sparc/sparc-d.c: New file.
5414 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
5416 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
5417 * config/sparc/t-sparc (sparc-d.o): New rule.
5418 * config/t-glibc (glibc-d.o): New rule.
5419 * configure: Regenerated.
5420 * configure.ac (tm_d_file): New variable.
5421 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
5422 * doc/contrib.texi (Contributors): Add self for the D frontend.
5423 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
5424 * doc/install.texi (Configuration): Mention libphobos as an option for
5425 --enable-shared. Mention d as an option for --enable-languages.
5426 (Testing): Mention check-d as a target.
5427 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
5428 name suffixes. Mention d as a -x option.
5429 * doc/sourcebuild.texi (Top Level): Mention libphobos.
5430 * doc/standards.texi (Standards): Add section on D language.
5431 * doc/tm.texi: Regenerated.
5432 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
5433 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
5434 * dwarf2out.c (is_dlang): New function.
5435 (gen_compile_unit_die): Use DW_LANG_D for D.
5436 (declare_in_namespace): Return module die for D, instead of adding
5437 extra declarations into the namespace.
5438 (gen_namespace_die): Generate DW_TAG_module for D.
5439 (gen_decl_die): Handle CONST_DECLSs for D.
5440 (dwarf2out_decl): Likewise.
5441 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
5442 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
5443 kinds of aggregates.
5444 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
5445 * genhooks.c: Include d/d-target.def.
5447 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
5450 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
5451 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
5452 (STACK_DYNAMIC_OFFSET): Likewise.
5454 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
5457 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
5460 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
5462 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
5463 return type and other typos.
5465 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
5467 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
5468 a shorter sequence with fewer branches.
5469 (emit_final_str_compare_gpr): Ditto.
5471 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
5473 * config/rs6000/tmmintrin.h: New file.
5474 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
5476 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
5478 * config/rs6000/mmintrin.h: Enable 32bit compilation.
5479 * config/rs6000/xmmintrin.h: Likewise.
5481 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
5483 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
5485 2018-10-26 Richard Biener <rguenther@suse.de>
5487 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
5489 (vect_mark_slp_stmts_relevant): Likewise.
5490 (vect_detect_hybrid_slp_stmts): Likewise.
5491 (vect_bb_slp_scalar_cost): Likewise.
5492 (vect_remove_slp_scalar_calls): Likewise.
5494 2018-10-26 Jan Hubicka <jh@suse.cz>
5496 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
5497 (warn_types_mismatch): Fix walk of DECL_NAME.
5498 (odr_types_equivalent_p): Fix overactive assert.
5500 2018-10-26 Richard Biener <rguenther@suse.de>
5502 PR tree-optimization/87105
5503 * tree-vectorizer.h (_slp_tree::refcnt): New member.
5504 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
5506 (vect_create_new_slp_node): Initialize refcnt to one.
5508 (scalar_stmts_set_t, bst_fail): Remove.
5509 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
5510 (vect_build_slp_tree): Add bst_map argument and lookup
5511 already created SLP nodes.
5512 (vect_print_slp_tree): Handle a SLP graph, print SLP node
5514 (vect_slp_rearrange_stmts): Handle a SLP graph.
5515 (vect_analyze_slp_instance): Adjust and free SLP nodes from
5516 the CSE map. Fix indenting.
5517 (vect_schedule_slp_instance): Add short-cut.
5519 2018-10-26 Martin Liska <mliska@suse.cz>
5522 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
5523 addr_expr and not with pointers.
5525 2018-10-26 Jan Hubicka <jh@suse.cz>
5527 * tree.c (free_lang_data_in_type): Only check main variants.
5528 * ipa-devirt.c (warn_odr): Make static.
5529 (types_same_for_odr): Drop strict variant.
5530 (types_odr_comparable): Likewise.
5531 (odr_or_derived_type_p): Look for main variants.
5532 (odr_name_hasher::equal): Cleanup comment.
5533 (odr_subtypes_equivalent): Add warn and warned arguments; check main
5535 (type_variants_equivalent_p): break out from ...
5536 (odr_types_equivalent): ... here; go for main variants where needed.
5537 (warn_odr): ... here; turn static.
5538 (warn_types_mismatch): Compare mangled names of main variants.
5539 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
5540 (type_with_linkage_p): Sanity check that we look at main variant.
5541 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
5542 * tree.h (types_same_for_odr): Drop strict argument.
5544 2018-10-26 Richard Biener <rguenther@suse.de>
5546 PR tree-optimization/87746
5547 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
5548 Simplify and fix WRT strided store groups with size not
5549 equal to step in element count.
5550 (vect_analyze_group_access_1): Dump the whole group.
5552 2018-10-25 Carl Love <cel@us.ibm.com>
5554 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
5555 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
5556 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
5557 precicion entry for each overloaded builtin.
5558 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
5559 VSCEDPUO): Rename overloaded name.
5560 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
5561 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
5562 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
5563 define_expand for xscmpexqp instruction.
5564 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
5566 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
5567 Jinsong Ji <jji@us.ibm.com>
5569 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
5570 function with vec_sl.
5571 (_mm_slli_epi32): Likewise.
5572 (_mm_slli_epi64): Likewise.
5573 (_mm_srai_epi16): Replace deprecated function with vec_sra.
5574 (_mm_srai_epi32): Likewise.
5575 (_mm_srli_epi16): Replace deprecated function with vec_sr.
5576 (_mm_srli_epi32): Likewise.
5577 (_mm_srli_epi64): Likewise.
5578 (_mm_sll_epi16): Replace deprecated function with vec_sl.
5579 (_mm_sll_epi32): Likewise.
5580 (_mm_sll_epi64): Likewise.
5581 (_mm_sra_epi16): Replace deprecated function with vec_sra.
5582 (_mm_sra_epi32): Likewise.
5583 (_mm_srl_epi16): Replace deprecated function with vec_sr.
5584 (_mm_srl_epi32): Likewise.
5585 (_mm_srl_epi64): Likewise.
5587 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
5588 Jinsong Ji <jji@us.ibm.com>
5590 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
5591 comparison operators with vec_cmp* for compatibility due to
5592 unfortunate history; clean up formatting and use types more
5594 (_mm_sll_epi32): Likewise.
5595 (_mm_sll_epi64): Likewise.
5596 (_mm_srl_epi16): Likewise.
5597 (_mm_srl_epi32): Likewise.
5598 (_mm_srl_epi64): Likewise.
5600 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
5601 Jinsong Ji <jji@us.ibm.com>
5603 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
5604 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
5605 __vector __bool int. Use vec_cmpgt in preference to deprecated
5606 function vec_vcmpgtfp.
5607 (_mm_max_ps): Likewise.
5609 2018-10-25 Jeff Law <law@redhat.com>
5611 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
5614 2018-10-25 Martin Sebor <msebor@redhat.com>
5616 * doc/extend.texi (aligned): Expand attribute description.
5617 (Alignment): Rename section. Discuss function arguments.
5619 2018-10-25 Jan Hubicka <jh@suse.cz>
5621 * ipa-devirt.c (main_odr_variant): Remove.
5622 (hash_odr_name, types_same_for_odr, types_odr_comparable,
5623 odr_name_hasher::equal, odr_subtypes_equivalent_p):
5624 Drop use of main_odr_variant.
5625 (add_type_duplicate): Silence confused warnings on integer types.
5626 (get_odr_type): Always look for main variant.
5627 (register_odr_type): Simplify.
5629 2018-10-25 Richard Biener <rguenther@suse.de>
5631 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
5632 Initialize ng to silence error with release checking bootstrap.
5634 2018-10-25 Richard Biener <rguenther@suse.de>
5636 * tree-if-conv.c: Include tree-ssa-sccvn.h.
5637 (tree_if_conversion): Run CSE on the if-converted loop body.
5639 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
5641 * config/s390/constraints.md (ZL): New constraint.
5642 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
5644 * config/s390/s390.md (movdi_larl): Remove.
5645 (movdi_64): Add the LARL alternative.
5647 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
5650 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
5651 (RTX_CODE_HWINT_P): New macro.
5652 (rtx_code_size): Use RTX_CODE_HWINT_P ().
5654 2018-10-25 Jan Hubicka <jh@suse.cz>
5656 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
5659 2018-10-25 Richard Biener <rguenther@suse.de>
5661 PR tree-optimization/87665
5662 PR tree-optimization/87745
5663 * tree-vectorizer.h (get_earlier_stmt): Remove.
5664 (get_later_stmt): Pick up UID from the original non-pattern stmt.
5666 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
5668 * options.texi (Deprecated): Move list to Var section.
5670 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
5671 Jinsong Ji <jji@us.ibm.com>
5673 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
5674 __vector long to __vector long long.
5675 (_mm_cvtpd_ps): Likewise.
5676 (_mm_cvttpd_epi32): Likewise.
5677 (_mm_cvtpi32_pd): Likewise.
5678 (_mm_unpackhi_epi64): Likewise.
5679 (_mm_unpacklo_epi64): Likewise.
5681 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
5683 PR rtl-optimization/87720
5684 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
5686 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
5688 * gimple-ssa-isolate-paths.c
5689 (find_implicit_erroneous_behavior): Do not change code if the
5690 pass is running for warnings only.
5691 (find_explicit_erroneous_behavior): Likewise.
5693 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
5695 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
5696 Define as rs6000_mangle_decl_assembler_name.
5697 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
5698 long double to IEEE long double, switch the names of the long
5699 double built-in functions to be <func>f128 instead of <func>l.
5701 2018-10-24 Martin Sebor <msebor@redhat.com>
5703 * doc/extend.texi (nonnull): List no-argument form. Reference
5704 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
5706 2018-10-24 Richard Biener <rguenther@suse.de>
5708 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
5710 2018-10-24 Martin Liska <mliska@suse.cz>
5712 PR tree-optimization/84436
5713 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
5715 (switch_conversion::contains_linear_function_p): New.
5716 (switch_conversion::build_one_array): Support linear
5717 transformation on input.
5718 * tree-switch-conversion.h (struct switch_conversion): Add
5719 contains_linear_function_p declaration.
5721 2018-10-24 Richard Biener <rguenther@suse.de>
5723 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
5724 if its argument is CONSTANT_CLASS_P.
5726 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
5728 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
5729 it is wrong for forward declarations.
5731 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
5733 * config/s390/s390.c (s390_check_qrst_address): Add the missing
5734 SYMBOL_REF_P () check.
5736 2018-10-24 Richard Biener <rguenther@suse.de>
5738 PR tree-optimization/87105
5739 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
5740 dump classification.
5741 (vect_analyze_data_ref_accesses): Handle duplicate loads and
5742 stores by splitting the affected group after the fact.
5743 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
5744 fail the SLP build because of size constraints.
5746 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5748 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
5749 * configure: Regenerate.
5750 * config.in: Regenerate.
5751 * varasm.c (mergeable_string_section): Use readonly_data_section
5752 if linker doesn't support SHF_MERGE with alignment > 8.
5753 (mergeable_constant_section): Likewise.
5755 2018-10-24 Richard Biener <rguenther@suse.de>
5757 PR tree-optimization/84013
5758 * tree-ssa-structalias.c (struct msdi_data): New struct for
5759 marshalling data to walk_stmt_load_store_ops.
5760 (maybe_set_dependence_info): Refactor as callback for
5761 walk_stmt_load_store_ops.
5762 (compute_dependence_clique): Set restrict info on all stmt kinds.
5764 2018-10-24 Martin Liska <mliska@suse.cz>
5766 * cgraph.c (cgraph_node::dump):
5767 Remove reduntant dumps and make tp_first_run dump more compact.
5769 2018-10-24 Richard Biener <rguenther@suse.de>
5771 PR tree-optimization/87665
5772 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
5775 2018-10-12 Jeff Law <law@redhat.com>
5777 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
5780 2018-10-23 Richard Biener <rguenther@suse.de>
5782 * tree-vrp.c (add_assert_info): Guard dump_printf with
5784 * gimple-ssa-evrp-analyze.c
5785 (evrp_range_analyzer::record_ranges_from_incoming_edge):
5786 Use value_range::ignore_equivs_equal_p.
5788 2018-10-23 Richard Biener <rguenther@suse.de>
5790 PR tree-optimization/87105
5791 PR tree-optimization/87608
5792 * passes.def (pass_all_early_optimizations): Add early phi-opt
5794 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
5795 addition to debug stmts.
5796 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
5797 and abs replacement early.
5798 * tree-cfg.c (gimple_empty_block_p): Likewise.
5800 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
5803 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
5804 specified to configure.
5805 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
5807 2018-10-23 Richard Biener <rguenther@suse.de>
5809 PR tree-optimization/87700
5810 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
5812 2018-10-23 Jakub Jelinek <jakub@redhat.com>
5815 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
5816 second argument from __mmask16 to __mmask8.
5817 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
5818 _mm_mask_packs_epi32): Likewise.
5819 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
5821 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
5823 2018-10-23 Richard Biener <rguenther@suse.de>
5825 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
5827 2018-10-23 Richard Biener <rguenther@suse.de>
5829 PR tree-optimization/86144
5830 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
5831 over simd attribute.
5833 2018-10-23 Richard Biener <rguenther@suse.de>
5835 PR tree-optimization/87693
5836 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
5837 the case we do not find the taken edge.
5839 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
5840 Jinsong Ji <jji@us.ibm.com>
5842 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
5843 (_mm_store_pd): Use unaligned vector type for pointer cast.
5844 (_mm_maskmoveu_si128): Likewise.
5845 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
5846 (_mm_store_ps): Use unaligned vector type for pointer cast.
5848 2018-10-22 Paul Koning <ni1d@arrl.net>
5850 * symtab.c (symtab_node::increase_alignment): Correct max
5853 2018-10-22 Yury Gribov <tetra2005@gmail.com>
5855 PR tree-optimization/87633
5856 * match.pd: Do not generate unordered integer comparisons.
5858 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
5860 PR rtl-optimization/87600
5861 * combine.c: Add include of expr.h.
5862 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
5863 register to a pseudo.
5864 (make_more_copies): New function, add a copy to a new pseudo after
5865 the moves from hard registers into pseudos.
5866 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
5867 later. Call make_more_copies.
5869 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
5871 * lra-constraints.c (process_alt_operands): New local array,
5872 matching_early_clobber. Check matching_early_clobber before
5873 decrementing reject, and set matching_early_clobber after.
5875 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
5878 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
5879 call output_addr_const and hope for the best.
5881 2018-10-22 Richard Biener <rguenther@suse.de>
5883 * gimple-ssa-evrp-analyze.c
5884 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
5885 smarter about what ranges to use.
5886 * tree-vrp.c (add_assert_info): Dump here.
5887 (register_edge_assert_for_2): Instead of here at multiple but
5890 * gcc.dg/tree-ssa/evrp12.c: New testcase.
5891 * gcc.dg/predict-6.c: Adjust.
5892 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
5893 * gcc.dg/tree-ssa/vrp02.c: Likewise.
5894 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
5896 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
5897 Richard Biener <rguenther@suse.de>
5899 * bitmap.h: Update data structure documentation, including a
5900 description of bitmap views as either linked-lists or splay trees.
5901 (struct bitmap_element_def): Update comments for splay tree bitmaps.
5902 (struct bitmap_head_def): Likewise.
5903 (bitmap_list_view, bitmap_tree_view): New prototypes.
5904 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
5906 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
5907 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
5908 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
5909 released bitmap element here.
5910 (bitmap_element_free): Remove.
5911 (bitmap_elt_clear_from): Work on splay tree bitmaps.
5912 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
5913 this function similar ones such that linked-list bitmap implementation
5914 functions are grouped.
5915 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
5916 and moved for grouping.
5917 (bitmap_list_insert_element_after): Renamed from
5918 bitmap_elt_insert_after, and moved for grouping.
5919 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
5920 (bitmap_tree_link_left, bitmap_tree_link_right,
5921 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
5922 bitmap_tree_link_element, bitmap_tree_unlink_element,
5923 bitmap_tree_find_element): New functions for splay-tree bitmap
5925 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
5926 Renamed and moved, see above entries.
5927 (bitmap_tree_listify_from): New function to convert part of a splay
5928 tree bitmap to a linked-list bitmap.
5929 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
5930 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
5931 (bitmap_find_bit): Remove.
5932 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
5933 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
5934 Handle splay tree bitmaps.
5935 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
5936 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
5937 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
5938 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
5939 bitmap_intersect_compl_p, bitmap_ior_and_compl,
5940 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
5941 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
5942 corresponding changes to use linked-list specific bitmap_element
5943 manipulation functions as applicable for efficiency.
5944 (bitmap_tree_to_vec): New function.
5945 (debug_bitmap_elt_file): New function split out from ...
5946 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
5947 (bitmap_print): Likewise.
5949 PR tree-optimization/63155
5950 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
5952 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
5955 2018-10-22 Martin Liska <mliska@suse.cz>
5957 PR tree-optimization/87686
5959 2018-08-29 Martin Liska <mliska@suse.cz>
5961 * tree-switch-conversion.c (switch_conversion::expand):
5962 Strenghten assumption about gswitch statements.
5964 2018-10-22 Martin Liska <mliska@suse.cz>
5966 * ipa-icf.c (sem_item::compare_attributes): Remove.
5967 (sem_item::compare_referenced_symbol_properties): Use
5968 attribute_list_equal instead.
5969 (sem_function::equals_wpa): Likewise.
5970 * ipa-icf.h: Remove compare_attributes.
5972 2018-10-22 Richard Biener <rguenther@suse.de>
5975 * mem-stats.h (mem_usage::operator==): Fix pasto.
5977 2018-10-22 Richard Biener <rguenther@suse.de>
5979 PR tree-optimization/87640
5980 * tree-vrp.c (set_value_range_with_overflow): Decompose
5982 (extract_range_from_binary_expr_1): Adjust.
5984 2018-10-22 Martin Jambor <mjambor@suse.cz>
5986 * tree-eh.h (stmt_could_throw_p): Add function parameter.
5987 (stmt_can_throw_external): Likewise.
5988 (stmt_can_throw_internal): Likewise.
5989 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
5990 (lower_eh_constructs_2): Likewise.
5991 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
5992 (stmt_can_throw_external): Likewise.
5993 (stmt_can_throw_internal): Likewise.
5994 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
5995 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
5996 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
5997 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
5998 (pass_lower_eh_dispatch::execute): Pass cfun to
5999 stmt_can_throw_external.
6000 (cleanup_empty_eh): Likewise.
6001 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
6002 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
6003 stmt_can_throw_external instead of pushing it to cfun.
6004 (symbol_table::create_edge): Likewise.
6005 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
6006 stmt_can_throw_internal.
6007 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
6008 to stmt_could_throw_p.
6009 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
6010 stmt_can_throw_internal.
6011 (pass_store_merging::execute): Likewise.
6012 * gimple-ssa-strength-reduction.c
6013 (find_candidates_dom_walker::before_dom_children): Pass cfun to
6015 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
6016 stmt_can_throw_internal.
6017 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
6018 to stmt_can_throw_external.
6019 (check_stmt): Pass cfun to stmt_could_throw_p.
6020 (check_stmt): Pass cfun to stmt_can_throw_external.
6021 (pass_nothrow::execute): Likewise.
6022 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
6023 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
6024 stmt_can_throw_internal.
6025 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
6026 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
6027 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
6028 * tree-complex.c (expand_complex_libcall): Pass cfun to
6029 stmt_could_throw_p and to stmt_can_throw_internal.
6030 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
6031 * tree-inline.c (copy_edges_for_bb): Likewise.
6032 (maybe_move_debug_stmts_to_successors): Likewise.
6033 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
6035 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
6036 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
6037 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
6038 stmt_can_throw_internal.
6039 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
6040 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
6042 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
6043 stmt_can_throw_internal.
6044 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
6045 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
6047 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
6048 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
6049 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6050 (convert_mult_to_fma_1): Likewise.
6051 (convert_to_divmod): Likewise.
6052 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
6053 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
6054 * tree-ssa-propagate.c
6055 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
6056 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
6057 (maybe_optimize_range_tests): Likewise.
6058 (linearize_expr_tree): Likewise.
6059 (reassociate_bb): Likewise.
6060 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6061 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
6062 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
6063 (handle_char_store): Likewise.
6064 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
6065 stmt_can_throw_internal.
6066 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
6068 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6069 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
6070 (vectorizable_simd_clone_call): Likewise.
6071 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
6072 (gimple_stringop_fixed_value): Likewise.
6074 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
6076 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
6077 literal pool references.
6078 (s390_check_qrst_address): Adapt to the new behavior of
6079 s390_loadrelative_operand_p ().
6081 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
6084 * config/i386/sse.md (*andnot<mode>3_bcst): New.
6086 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
6089 * config/i386/sse.md (*<code><mode>3_bcst): New.
6091 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
6094 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
6095 V4DI, V16SI and V8DI.
6096 (*sub<mode>3<mask_name>_bcst): New.
6097 (*add<mode>3<mask_name>_bcst): Likewise.
6099 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
6100 Jinsong Ji <jji@us.ibm.com>
6102 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
6103 __m64 with __vector unsigned long long for compatibility.
6104 (_mm_movemask_epi8): Likewise.
6105 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
6106 (_mm_cvttps_pi32): Likewise.
6107 (_mm_cvtpi32_ps): Likewise.
6108 (_mm_cvtps_pi16): Likewise.
6109 (_mm_loadh_pi): Likewise.
6110 (_mm_storeh_pi): Likewise.
6111 (_mm_movehl_ps): Likewise.
6112 (_mm_movelh_ps): Likewise.
6113 (_mm_loadl_pi): Likewise.
6114 (_mm_storel_pi): Likewise.
6115 (_mm_movemask_ps): Likewise.
6116 (_mm_shuffle_pi16): Likewise.
6118 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6121 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
6122 __builtin_ia32_vfnmsubpd512_mask.
6123 (_mm512_mask_fnmsub_round_pd): Likewise.
6124 (_mm512_fnmsub_pd): Likewise.
6125 (_mm512_mask_fnmsub_pd): Likewise.
6126 (_mm512_maskz_fnmsub_round_pd): Use
6127 __builtin_ia32_vfnmsubpd512_maskz.
6128 (_mm512_maskz_fnmsub_pd): Likewise.
6129 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
6130 (_mm512_mask_fnmsub_round_ps): Likewise.
6131 (_mm512_fnmsub_ps): Likewise.
6132 (_mm512_mask_fnmsub_ps): Likewise.
6133 (_mm512_maskz_fnmsub_round_ps): Use
6134 __builtin_ia32_vfnmsubps512_maskz.
6135 (_mm512_maskz_fnmsub_ps): Likewise.
6136 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
6137 __builtin_ia32_vfnmsubpd256_mask.
6138 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
6139 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6140 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
6141 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6142 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6143 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
6144 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
6145 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
6146 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
6147 __builtin_ia32_vfnmsubpd.
6148 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
6149 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
6150 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
6151 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
6152 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
6153 * config/i386/i386-builtin.def: Add
6154 __builtin_ia32_vfnmsubpd256_mask,
6155 __builtin_ia32_vfnmsubpd256_maskz,
6156 __builtin_ia32_vfnmsubpd128_mask,
6157 __builtin_ia32_vfnmsubpd128_maskz,
6158 __builtin_ia32_vfnmsubps256_mask,
6159 __builtin_ia32_vfnmsubps256_maskz,
6160 __builtin_ia32_vfnmsubps128_mask,
6161 __builtin_ia32_vfnmsubps128_maskz,
6162 __builtin_ia32_vfnmsubpd512_mask,
6163 __builtin_ia32_vfnmsubpd512_maskz,
6164 __builtin_ia32_vfnmsubps512_mask,
6165 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
6166 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
6167 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
6168 __builtin_ia32_vfnmsubpd256.
6169 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
6170 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
6171 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
6173 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
6175 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
6177 (fmai_vmfnmsub_<mode><round_name>): Likewise.
6179 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6182 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
6183 __builtin_ia32_vfnmaddpd512_mask.
6184 (_mm512_mask_fnmadd_round_pd): Likewise.
6185 (_mm512_fnmadd_pd): Likewise.
6186 (_mm512_mask_fnmadd_pd): Likewise.
6187 (_mm512_maskz_fnmadd_round_pd): Use
6188 __builtin_ia32_vfnmaddpd512_maskz.
6189 (_mm512_maskz_fnmadd_pd): Likewise.
6190 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
6191 (_mm512_mask_fnmadd_round_ps): Likewise.
6192 (_mm512_fnmadd_ps): Likewise.
6193 (_mm512_mask_fnmadd_ps): Likewise.
6194 (_mm512_maskz_fnmadd_round_ps): Use
6195 __builtin_ia32_vfnmaddps512_maskz.
6196 (_mm512_maskz_fnmadd_ps): Likewise.
6197 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
6198 __builtin_ia32_vfnmaddpd256_mask.
6199 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
6200 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
6201 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
6202 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6203 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6204 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
6205 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
6206 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
6207 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
6208 __builtin_ia32_vfnmaddpd.
6209 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
6210 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
6211 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
6212 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
6213 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
6214 * config/i386/i386-builtin.def: Add
6215 __builtin_ia32_vfnmaddpd256_mask,
6216 __builtin_ia32_vfnmaddpd256_maskz,
6217 __builtin_ia32_vfnmaddpd128_mask,
6218 __builtin_ia32_vfnmaddpd128_maskz,
6219 __builtin_ia32_vfnmaddps256_mask,
6220 __builtin_ia32_vfnmaddps256_maskz,
6221 __builtin_ia32_vfnmaddps128_mask,
6222 __builtin_ia32_vfnmaddps128_maskz,
6223 __builtin_ia32_vfnmaddpd512_mask,
6224 __builtin_ia32_vfnmaddpd512_maskz,
6225 __builtin_ia32_vfnmaddps512_mask,
6226 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
6227 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
6228 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
6229 __builtin_ia32_vfnmaddpd256.
6230 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
6231 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
6232 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
6234 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
6236 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
6238 (fmai_vmfnmadd_<mode><round_name>): Likewise.
6240 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6243 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
6244 __builtin_ia32_vfmsubpd512_mask.
6245 (_mm512_mask_fmsub_round_pd): Likewise.
6246 (_mm512_fmsub_pd): Likewise.
6247 (_mm512_mask_fmsub_pd): Likewise.
6248 (_mm512_maskz_fmsub_round_pd): Use
6249 __builtin_ia32_vfmsubpd512_maskz.
6250 (_mm512_maskz_fmsub_pd): Likewise.
6251 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
6252 (_mm512_mask_fmsub_round_ps): Likewise.
6253 (_mm512_fmsub_ps): Likewise.
6254 (_mm512_mask_fmsub_ps): Likewise.
6255 (_mm512_maskz_fmsub_round_ps): Use
6256 __builtin_ia32_vfmsubps512_maskz.
6257 (_mm512_maskz_fmsub_ps): Likewise.
6258 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
6259 __builtin_ia32_vfmsubpd256_mask.
6260 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
6261 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6262 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
6263 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6264 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6265 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
6266 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
6267 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
6268 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
6269 __builtin_ia32_vfmsubpd.
6270 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
6271 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
6272 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
6273 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
6274 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
6275 * config/i386/i386-builtin.def: Add
6276 __builtin_ia32_vfmsubpd256_mask,
6277 __builtin_ia32_vfmsubpd256_maskz,
6278 __builtin_ia32_vfmsubpd128_mask,
6279 __builtin_ia32_vfmsubpd128_maskz,
6280 __builtin_ia32_vfmsubps256_mask,
6281 __builtin_ia32_vfmsubps256_maskz,
6282 __builtin_ia32_vfmsubps128_mask,
6283 __builtin_ia32_vfmsubps128_maskz,
6284 __builtin_ia32_vfmsubpd512_mask,
6285 __builtin_ia32_vfmsubpd512_maskz,
6286 __builtin_ia32_vfmsubps512_mask,
6287 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
6288 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
6289 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
6290 __builtin_ia32_vfmsubpd256.
6291 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
6292 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
6293 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
6295 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
6297 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
6299 (fmai_vmfmsub_<mode><round_name>): Likewise.
6301 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6303 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
6304 Remove plus. Renamed to ...
6305 (*sub<mode>3<mask_name>_bcst): This.
6306 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
6307 (*add<mode>3<mask_name>_bcst): This.
6309 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6312 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
6314 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6317 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
6318 (_mm_or_epi32): Likewise.
6319 (_mm256_xor_epi32): Likewise.
6320 (_mm_xor_epi32): Likewise.
6321 (_mm256_or_epi64): Likewise.
6322 (_mm_or_epi64): Likewise.
6323 (_mm256_xor_epi64): Likewise.
6324 (_mm_xor_epi64): Likewise.
6326 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
6329 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
6331 2018-10-20 Jakub Jelinek <jakub@redhat.com>
6334 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
6336 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
6338 * doc/ux.texi: Move @section directly after @node.
6340 2018-10-19 Jakub Jelinek <jakub@redhat.com>
6344 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
6345 depend closely nested inside of loop with ordered clause with
6348 2018-10-19 David Malcolm <dmalcolm@redhat.com>
6350 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
6351 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
6352 * doc/ux.texi: New file.
6354 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
6356 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
6357 be the first CR field allocated.
6359 2018-10-19 Richard Biener <rguenther@suse.de>
6362 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
6363 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
6365 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
6368 * config/i386/sse.md
6369 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
6370 (*add<mode>3<mask_name>_bcst_2): Likewise.
6372 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
6374 * config/i386/sse.md
6375 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6376 Replace nonimmediate_operand with register_operand.
6377 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6379 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6382 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
6384 PR rtl-optimization/87596
6385 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
6386 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
6387 for instructions in FROM..TO range.
6389 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
6391 * cfgexpand.c (expand_one_var): Use specific wording in error message
6392 for non-local frame variables.
6393 * stor-layout.c (layout_decl): Do not issue a warning for them.
6395 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
6397 * haifa-sched.c (priority): Add force_recompute parameter.
6398 (apply_replacement): Call priority () with force_recompute = true.
6399 (restore_pattern): Likewise.
6401 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
6403 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
6404 HOST_BITS_PER_WIDE_INT.
6405 (test_vector_ops_duplicate): Likewise.
6407 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
6410 * config/i386/sse.md (VF_AVX512): New.
6411 (avx512bcst): Likewise.
6412 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6414 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6416 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6419 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
6421 * doc/invoke.texi (-dumpversion): Improve grammar.
6422 (-dumpfullversion): Make more consistent with -dumpversion.
6424 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
6426 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
6427 Set JUMP_LABEL to the jump insn.
6428 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
6429 Predict emitted jump and add label to jump insn.
6431 2018-10-18 David Malcolm <dmalcolm@redhat.com>
6433 PR tree-optimization/87562
6434 * input.c (get_substring_ranges_for_loc): Use
6435 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
6436 getting the linemap for the endpoint. Verify that it's either
6437 in the same linemap as the start point's spelling location, or
6438 at least in the same file.
6440 2018-10-18 Richard Biener <rguenther@suse.de>
6442 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
6443 feed width-specific load/store costs through ix86_vec_cost.
6444 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
6445 (k8_cost): Likewise.
6446 (bdver_cost): Likewise.
6447 (znver1_cost): Likewise.
6448 (btver1_cost): Likewise.
6449 (btver2_cost): Likewise.
6451 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
6453 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
6454 to simplify subreg of vec_merge.
6456 2018-10-18 Richard Biener <rguenther@suse.de>
6458 * config/i386/i386.c: Fix costing of vector FMA.
6460 2018-10-18 Richard Biener <rguenther@suse.de>
6462 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
6464 (ix86_builtin_vectorization_cost): For vec_construct properly
6465 cost insertion into SSE regs.
6466 (...): Adjust calls to ix86_vec_cost.
6468 2018-10-18 Richard Biener <rguenther@suse.de>
6472 2018-02-07 Richard Biener <rguenther@suse.de>
6474 PR tree-optimization/84204
6475 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
6478 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
6481 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
6483 (test_vector_ops_duplicate): Add test for a scalar subreg of a
6484 VEC_MERGE of a VEC_DUPLICATE.
6486 2018-10-17 Joseph Myers <joseph@codesourcery.com>
6488 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
6489 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
6490 * doc/standards.texi (C Language): Document C2X.
6491 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
6492 (rl78_option_override): Handle "GNU C2X" language name.
6494 2018-10-17 Joseph Myers <joseph@codesourcery.com>
6496 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
6497 Document C17 as published in 2018.
6499 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
6502 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
6503 bail out if both sides do not have the same storage order.
6505 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
6507 * bitmap.c (bitmap_head::dump): New.
6508 * bitmap.h (bitmap_head): Add dump().
6509 * gimple-ssa-evrp-analyze.c
6510 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
6511 (evrp_range_analyzer::set_ssa_range_info): Same.
6512 (evrp_range_analyzer::record_ranges_from_phis): Same.
6513 (evrp_range_analyzer::record_ranges_from_stmt): Same.
6514 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
6515 * gimple-ssa-sprintf.c (get_int_range): Same.
6516 (format_integer): Same.
6517 (sprintf_dom_walker::handle_gimple_call): Same.
6518 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
6519 (ipcp_vr_lattice::top_p): Same.
6520 (ipcp_vr_lattice::bottom_p): Same.
6521 (ipcp_vr_lattice::set_to_bottom): Same.
6522 (ipa_vr_operation_and_type_effects): Same.
6523 (propagate_vr_across_jump_function): Same.
6524 (ipcp_store_vr_results): Same.
6525 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
6526 (ipa_print_node_jump_functions_for_edge): Same.
6527 (ipa_get_value_range): Same.
6528 (ipa_compute_jump_functions_for_edge): Same.
6529 (ipa_write_jump_function): Same.
6530 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
6531 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
6533 * vr-values.c (set_value_range_to_nonnegative): Same.
6534 (set_value_range_to_truthvalue): Same.
6535 (vr_values::get_value_range): Same.
6536 (vr_values::set_defs_to_varying): Same.
6537 (vr_values::update_value_range): Same.
6538 (symbolic_range_based_on_p): Same.
6539 (vr_values::op_with_boolean_value_range_p): Same.
6540 (vr_values::extract_range_for_var_from_comparison_expr): Same.
6541 (vr_values::extract_range_from_ssa_name): Same.
6542 (vr_values::extract_range_from_binary_expr): Same.
6543 (vr_values::extract_range_from_unary_expr): Same.
6544 (vr_values::extract_range_from_cond_expr): Same.
6545 (vr_values::extract_range_from_comparison): Same.
6546 (vr_values::check_for_binary_op_overflow): Same.
6547 (vr_values::extract_range_basic): Same.
6548 (vr_values::extract_range_from_assignment): Same.
6549 (compare_ranges): Same.
6550 (compare_range_with_value): Same.
6551 (vr_values::adjust_range_with_scev): Same.
6552 (vrp_valueize): Same.
6553 (vrp_valueize_1): Same.
6554 (vr_values::get_vr_for_comparison): Same.
6555 (vr_values::compare_name_with_value): Same.
6556 (vr_values::compare_names): Same.
6557 (vr_values::vrp_evaluate_conditional): Same.
6558 (find_case_label_ranges): Same.
6559 (vr_values::vrp_visit_switch_stmt): Same.
6560 (vr_values::extract_range_from_phi_node): Same.
6561 (vr_values::simplify_div_or_mod_using_ranges): Same.
6562 (vr_values::simplify_bit_ops_using_ranges): Same.
6563 (test_for_singularity): Same.
6564 (range_fits_type_p): Same.
6565 (vr_values::simplify_cond_using_ranges_1): Same.
6566 (vr_values::simplify_switch_using_ranges): Same.
6567 (vr_values::simplify_float_conversion_using_ranges): Same.
6568 (vr_values::two_valued_val_range_p): Same.
6569 (vr_values::add_equivalence): Move to value_range::equiv_add.
6570 * vr-values.h (vr_values::add_equivalence): Remove.
6571 (VR_INITIALIZER): Remove.
6572 * tree-vrp.c (value_range::set): New.
6573 (value_range::equiv_add): New.
6574 (value_range::value_range): New.
6575 (value_range::deep_copy): New.
6576 (value_range::check): New.
6577 (value_range::equal_p): New.
6578 (value_range::ignore_equivs_equal_p): New.
6579 (value_range::operator==): New.
6580 (value_range::operator!=): New.
6581 (value_range::symbolic_p): New.
6582 (value_range::numeric_p): New.
6583 (value_range::set_undefined): New.
6584 (value_range::set_varying): New.
6585 (value_range::may_contain_p): New.
6586 (value_range::equiv_clear): New.
6587 (value_range::singleton_p): New.
6588 (value_range::intersect): New.
6589 (value_range::dump): New.
6590 (value_range::set_and_canonicalize): New.
6591 (set_value_range): Adjust for value_range API.
6592 (set_value_range_to_undefined): Same.
6593 (set_value_range_to_varying): Same.
6594 (set_and_canonicalize_value_range): Same.
6595 (set_value_range_to_nonnull): Same.
6596 (set_value_range_to_null): Same.
6597 (range_is_null): Same.
6598 (range_is_nonnull): Same.
6599 (range_int_cst_p): Same.
6600 (range_int_cst_singleton_p): Same.
6601 (symbolic_range_p): Same.
6602 (range_includes_zero_p): Same.
6603 (value_range_constant_singleton): Same.
6604 (vrp_set_zero_nonzero_bits): Same.
6605 (ranges_from_anti_range): Same.
6606 (extract_range_into_wide_ints): Same.
6607 (extract_range_from_multiplicative_op): Same.
6608 (set_value_range_with_overflow): Same.
6609 (extract_range_from_binary_expr_1): Same.
6610 (extract_range_from_unary_expr): Same.
6611 (dump_value_range): Same.
6612 (debug_value_range): Same.
6613 (vrp_prop::check_array_ref): Same.
6614 (vrp_prop::check_mem_ref): Same.
6615 (vrp_prop::vrp_initialize): Same.
6616 (vrp_prop::visit_stmt): Same.
6617 (intersect_ranges): Same.
6618 (vrp_prop::visit_phi): Same.
6619 (vrp_prop::vrp_finalize): Same.
6620 (determine_value_range_1): Same.
6621 (determine_value_range): Same.
6622 (vrp_intersect_ranges_1): Rename to...
6623 (vrp_intersect_1): this.
6624 (vrp_intersect_ranges): Rename to...
6625 (value_range::intersect_helper): ...this.
6626 (vrp_meet_1): Rename to...
6627 (value_range::union_helper): ...this.
6628 (vrp_meet): Rename to...
6629 (value_range::union_): ...this.
6630 (copy_value_range): Remove.
6631 * tree-vrp.h (struct value_range): Rewrite into a proper class.
6632 (value_range::vrtype): New.
6633 (value_range::type): New.
6634 (value_range::equiv): New.
6635 (value_range::min): New.
6636 (value_range::max): New.
6637 (value_range::varying_p): New.
6638 (value_range::undefined_p): New.
6639 (value_range::null_p): New.
6640 (value_range::equiv_add): New.
6641 (copy_value_range): Remove.
6643 2018-10-17 David Malcolm <dmalcolm@redhat.com>
6645 * Makefile.in (SELFTEST_TARGETS): New.
6646 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
6647 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
6648 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
6650 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
6651 (selftest-c++-gdb, selftest-c++-valgrind): Move to
6653 * configure: Regenerate.
6654 * configure.ac (selftest_languages): New.
6656 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
6658 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
6659 overflow wraps argument.
6660 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
6661 wide_int_range_multiplicative_op.
6662 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
6663 overflow wraps argument.
6664 (wide_int_range_multiplicative_op): Same.
6665 (wide_int_range_lshift): Same.
6666 (wide_int_range_div): Same.
6667 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
6668 (wide_int_range_lshift): Same.
6669 (wide_int_range_div): Same.
6671 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
6673 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
6674 use sign as argument.
6675 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
6676 wide_int_range_shift_undefined_p.
6678 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6680 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
6682 (@despeculate_copy<ALLI_TI:mode>): ... This.
6683 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
6686 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6688 * config.gcc: Obsolete *-*-solaris2.10*.
6689 * doc/install.texi (Specific, *-*-solaris2*): Document it.
6691 2018-10-12 Jeff Law <law@redhat.com>
6693 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
6694 reg + sym +- const_int addressing modes.
6696 2018-10-15 David Malcolm <dmalcolm@redhat.com>
6698 * common.opt (fdiagnostics-minimum-margin-width=): New option.
6699 * diagnostic-show-locus.c (layout::layout): Apply the minimum
6701 (layout::start_annotation_line): Only print up to 3 of the
6702 margin character, to avoid touching the left-hand side.
6703 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
6704 minimum margin width, as set by test_diagnostic_context's ctor.
6705 (selftest::test_fixit_insert_containing_newline): Likewise.
6706 (selftest::test_fixit_insert_containing_newline_2): Likewise.
6707 (selftest::test_line_numbers_multiline_range): Clear
6708 dc.min_margin_width.
6709 * diagnostic.c (diagnostic_initialize): Initialize
6711 * diagnostic.h (struct diagnostic_context): Add field
6713 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
6714 * opts.c (common_handle_option): Handle
6715 OPT_fdiagnostics_minimum_margin_width_.
6716 * selftest-diagnostic.c
6717 (selftest::test_diagnostic_context::test_diagnostic_context):
6718 Initialize min_margin_width to 6.
6719 * toplev.c (general_init): Initialize global_dc->min_margin_width.
6721 2018-10-15 David Malcolm <dmalcolm@redhat.com>
6723 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
6724 Fix usage of "error_at_rich_loc" in the comment.
6726 2018-10-15 Renlin Li <renlin.li@arm.com>
6729 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
6730 if-conversioned loop when it contains ifn with types not
6731 supported by backend.
6732 * internal-fn.c (expand_direct_optab_fn): Add an assert.
6733 (direct_internal_fn_supported_p): New helper function.
6734 * internal-fn.h (direct_internal_fn_supported_p): Declare.
6736 2018-10-15 Jakub Jelinek <jakub@redhat.com>
6739 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6740 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6741 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6743 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
6745 PR tree-optimization/87022
6746 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
6747 bits in dist vector rather than the first one.
6749 2018-10-15 Richard Biener <rguenther@suse.de>
6752 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
6753 (visit_loadstore): When a used restrict tag escaped verify that
6754 the points-to solution of "other" pointers do not include
6756 (compute_dependence_clique): If a used restrict tag escaped
6757 communicated that down to visit_loadstore.
6759 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
6761 * config/s390/s390.c (s390_expand_vec_init): Force vector element
6762 into reg if it isn't a general operand.
6764 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
6767 * config/i386/sse.md (*vec_dupv2di): Add register source to
6770 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
6773 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6774 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
6775 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6776 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6778 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
6780 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
6781 (notice_args_size): Set it in the current trace if no insn that can
6782 throw internally has been seen yet.
6783 (connect_traces): When connecting args_size between traces, allow the
6784 incoming values not to match if there is an insn setting it before the
6785 first insn that can throw internally; in that case, force the creation
6786 of a CFI note on this latter insn.
6788 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
6790 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
6791 the base class, because using the injected-class-name was not clearly
6792 specified until DR 176.
6794 2018-10-12 Paul Koning <ni1d@arrl.net>
6796 * config/pdp11/pdp11.md (doloop_end): New expander.
6797 (doloop_end_insn): renamed from "doloop_end".
6798 (addqi3): New pattern.
6799 (subqi3): New pattern.
6800 * config/pdp11/predicates.md (incdec_operand): New predicate.
6802 2018-10-12 Yury Gribov <tetra2005@gmail.com>
6805 * real.c (format_helper::can_represent_integral_type_p): New function
6806 * real.h (format_helper::can_represent_integral_type_p): Ditto.
6807 * match.pd: New pattern.
6809 2018-10-12 Alexandre Oliva <oliva@adacore.com>
6811 * configure.ac: Introduce --enable-large-address-aware
6812 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
6813 * doc/install.texi: Document it.
6814 * configure, config.in: Rebuilt.
6815 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
6816 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
6817 (LINK_SPEC): Insert it.
6818 * config/i386/mingw-w64.h: Likewise.
6820 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
6822 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
6824 PR rtl-optimization/87600
6825 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
6827 2018-10-12 Paul Koning <ni1d@arrl.net>
6829 * doc/md.texi (doloop_end): Document that the pattern code may
6830 need to check operand mode.
6832 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
6834 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
6835 to zero-extend between int and floating-point registers.
6836 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
6837 ldp into floating-point registers. Add type and arch attributes.
6838 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
6839 Use f_loads for type attribute.
6841 2018-10-11 Martin Sebor <msebor@redhat.com>
6843 * doc/extend.texi (attribute packed): Correct typos.
6845 2018-10-11 Martin Sebor <msebor@redhat.com>
6847 * doc/extend.texi (attribute flatten): Mention interaction with
6850 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
6853 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
6854 Set new_decl virtual flag to zero.
6856 2018-10-11 Martin Sebor <msebor@redhat.com>
6859 * doc/extend.texi (attribute format_arg): Discuss using multiple
6860 attributes on a single function.
6862 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
6864 PR tree-optimization/86829
6865 * match.pd (sin (atan (x))): New simplification rules.
6866 (cos (atan (x))): Likewise.
6867 * real.c (build_sinatan_real): New function.
6868 * real.h (build_sinatan_real): Prototype.
6870 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
6872 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
6874 (fold_mergeeo_helper): New helper function.
6875 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
6876 intrinsics. Correct some whitespace indentation issues.
6878 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
6881 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
6882 Use HOST_WIDE_INT_1U for shift.
6884 2018-10-11 Doug Rupp <rupp@adacore.com>
6885 Olivier Hainque <hainque@adacore.com>
6887 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
6888 Pass --relax to the linker for RTPs.
6889 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
6891 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
6892 Jan Hubicka <jh@suse.cz>
6893 Martin Jambor <mjambor@suse.cz>
6895 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
6896 the same elements are repeated rather than printing all of them.
6897 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
6898 "repeated" elements.
6899 * read-rtl-function.c (test_loading_repeat): New function.
6900 (read_rtl_function_c_tests): Call test_loading_repeat.
6901 * rtl-tests.c (test_dumping_repeat): New function.
6902 (rtl_tests_c_tests): Call test_dumping_repeat.
6904 2018-10-11 Richard Biener <rguenther@suse.de>
6906 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
6907 bdver?_cost): Unify to ...
6908 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
6909 * config/i386/i386.c (processor_cost_table): Adjust.
6911 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
6914 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
6915 the thunk when expanding to GIMPLE.
6917 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6920 * varasm.c (mergeable_string_section): Don't try to move zero-length
6921 strings to the merge section.
6923 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
6926 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
6928 2018-10-10 Jakub Jelinek <jakub@redhat.com>
6931 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
6932 to special_args set.
6934 2018-10-10 Richard Biener <rguenther@suse.de>
6936 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
6937 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
6938 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
6939 and recursing and pattern terminating the recursion on SSE
6940 vector width using ix86_expand_reduc.
6941 (reduc_sminmax_scal_<mode>): Split into part reducing to half
6942 width and recursing and SSE2 vector variant doing the final
6943 reduction with ix86_expand_reduc.
6944 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
6945 with terminating the recursion at AVX level, splitting that
6948 2018-10-09 David Malcolm <dmalcolm@redhat.com>
6950 * genmatch.c (error_cb): Rename to...
6951 (diagnostic_cb): ...this, converting int params to enums.
6952 (fatal_at): Update for renaming.
6953 (warning_at): Likewise.
6955 * input.c (selftest::ebcdic_execution_charset::apply):
6956 Update for renaming of...
6957 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
6959 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
6960 converting level and reason to enums.
6961 (class selftest::lexer_error_sink): Rename to...
6962 (class selftest::lexer_test_options): ...this, renaming field
6963 "m_errors" to "m_diagnostics".
6964 (selftest::lexer_test_options::apply): Update for renaming of...
6965 (selftest::lexer_test_options::on_error): ...this, renaming to...
6966 (selftest::lexer_test_options::on_diagnostic): ...this
6967 converting level and reason to enums.
6968 (selftest::test_lexer_string_locations_raw_string_unterminated):
6969 Update for renamings.
6970 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
6973 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
6975 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
6976 * config/rs6000/pmmintrin.h: New file.
6978 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
6980 PR tree-optimization/86659
6981 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6983 2018-10-09 Richard Biener <rguenther@suse.de>
6985 PR tree-optimization/63155
6986 * tree-ssa-structalias.c: Include tree-ssa.h.
6987 (get_constraint_for_ssa_var): For undefs return nothing_id.
6988 (find_func_aliases): Cleanup PHI handling.
6990 2018-10-09 Richard Biener <rguenther@suse.de>
6992 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
6995 2018-10-09 Martin Liska <mliska@suse.cz>
6997 * asan.c (asan_emit_stack_protection): If a stack variable
6998 is located in a same file as current function, then emit
6999 line info into variable definition string.
7001 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
7003 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
7006 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
7008 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
7011 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
7013 PR tree-optimization/86659
7014 * gimple-match.h (struct gimple_match_op): Add reverse field.
7015 (gimple_match_op::set_op): New overloaded method.
7016 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
7017 the REF_REVERSE_STORAGE_ORDER flag on the value.
7018 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
7019 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
7021 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
7024 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
7025 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
7027 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
7030 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
7031 Defined with __builtin_ia32_vfmaddsubpd512_mask.
7033 2018-10-08 Richard Biener <rguenther@suse.de>
7035 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
7036 cost the same as AVX128 ones.
7038 2018-10-08 Paul Koning <ni1d@arrl.net>
7040 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
7041 (expand_block_move): New function.
7042 * config/pdp11/pdp11.c (output_block_move): Remove.
7043 (expand_block_move): New function.
7044 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
7045 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
7046 (*movmemhi1): Remove.
7048 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
7050 * config/s390/2827.md: Increase latencies for some FP instructions.
7052 2018-10-08 Richard Biener <rguenther@suse.de>
7054 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7056 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
7057 * tree-vectorizer.h (dump_stmt_cost): Adjust.
7058 (add_stmt_cost): Dump return value of the hook.
7060 2018-10-08 Richard Biener <rguenther@suse.de>
7062 PR tree-optimization/63155
7063 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
7064 (ssa_propagation_engine::ssa_propagate): Remove redundant
7065 bitmap bit clearing.
7067 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
7069 PR rtl-optimization/86939
7070 PR rtl-optimization/87479
7071 * ira.h (non_conflicting_reg_copy_p): New prototype.
7072 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
7073 (make_hard_regno_dead): Don't add conflicts for register
7074 ignore_reg_for_conflicts.
7075 (make_object_dead): Likewise.
7076 (non_conflicting_reg_copy_p): New function.
7077 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
7078 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
7079 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
7080 (make_hard_regno_dead): Don't add conflicts for register
7081 ignore_reg_for_conflicts. Remove special conflict handling of
7082 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
7083 check_pic_pseudo_p and update callers.
7084 (mark_pseudo_dead): Don't add conflicts for register
7085 ignore_reg_for_conflicts.
7086 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
7088 2018-10-05 Andrew Waterman <andrew@sifive.com>
7089 Jim Wilson <jimw@sifive.com>
7091 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
7092 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
7093 new pattern using HONOR_SNANS that emits one extra instruction.
7095 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
7097 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
7098 patterns): Merge SI and DI patterns to a GPR pattern.
7099 (unnamed define_insn and define_split for record form of that): Merge
7100 to a single define_insn_and_split pattern.
7102 2018-10-05 David Malcolm <dmalcolm@redhat.com>
7105 * input.c (expand_location_to_spelling_point): Add param "aspect"
7106 and use rather than hardcoding LOCATION_ASPECT_CARET.
7107 (get_substring_ranges_for_loc): Handle the case of a single token
7108 within a macro expansion.
7109 * input.h (expand_location_to_spelling_point): Add "aspect" param,
7110 defaulting to LOCATION_ASPECT_CARET.
7112 2018-10-05 Paul Koning <ni1d@arrl.net>
7114 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
7115 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
7116 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
7117 (pdp11_guard_type): New function.
7119 2018-10-05 Paul Koning <ni1d@arrl.net>
7121 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
7122 * config/pdp11/pdp11.opt (mfloat32): Remove.
7124 * doc/invoke.texi (pdp11 -mfloat32): Remove:
7125 (pdp11 -mfloat64): Remove.
7127 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
7129 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
7130 (*cmp<mode>_cc_i387): Ditto.
7131 (*cmpu<mode>_cc_i387): Ditto.
7132 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7133 * config/i386/i386.c (ix86_expand_fp_compare): Remove
7135 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
7136 Emit x86_sahf_1 pattern.
7137 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
7138 (ix86_expand_carry_flag_compare): Ditto.
7140 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
7142 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
7143 to reg_or_0_operand. Add "C" constraint.
7144 (*cmpxf_cc_i387): Ditto.
7145 (*cmp<mode>_i387): Change operand 2 predicate
7146 to nonimm_or_0_operand. Add "C" constraint.
7147 (*cmp<mode>_cc_i387): Ditto.
7148 (*cmp<mode>_0_i387): Remove insn pattern.
7149 (*cmp<mode>_0_cc_i387): Ditto.
7151 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
7153 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
7154 * config/i386/predicates.md (nonimm_or_0_operand): Rename
7155 from vector_move_operand. Update all uses.
7157 2018-10-05 Martin Sebor <msebor@redhat.com>
7159 PR tree-optimization/87490
7160 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
7163 2018-10-05 Richard Biener <rguenther@suse.de>
7165 PR tree-optimization/63155
7166 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
7167 vertical space in dumpfiles.
7168 * tree-ssa-propagate.h
7169 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
7170 * tree-ssa-propagate.c (cfg_blocks_back): New global.
7171 (ssa_edge_worklist_back): Likewise.
7172 (curr_order): Likewise.
7173 (cfg_blocks_get): Remove abstraction.
7174 (cfg_blocks_add): Likewise.
7175 (cfg_blocks_empty_p): Likewise.
7176 (add_ssa_edge): Add to current or next worklist based on
7178 (add_control_edge): Likewise.
7179 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
7181 (ssa_propagation_engine::ssa_propagate): ... here. Unify
7182 iteration from CFG and SSA edge worklist so we process
7183 everything in RPO order, prioritizing forward progress
7185 (ssa_prop_init): Allocate new worklists, do not dump
7187 (ssa_prop_fini): Free new worklists.
7189 2018-10-05 Richard Biener <rguenther@suse.de>
7191 * tree-core.h (tree_block::abstract_flag): Remove.
7192 (tree_block::block_num): Make full 32bits.
7193 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
7194 * tree.h (BLOCK_ABSTRACT): Remove.
7195 * dwarf2out.c (gen_lexical_block_die): Remove dead code
7196 resulting from BLOCK_ABSTRACT being always false.
7197 (gen_inlined_subroutine_die): Likewise.
7198 (gen_block_die): Likewise.
7199 * tree.c (block_ultimate_origin): Likewise.
7200 * tree-pretty-print.c (dump_block_node): Remove code dealing
7201 with BLOCK_ABSTRACT.
7202 * tree-ssa-live.c (dump_scope_block): Likewise.
7203 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
7204 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
7206 2018-10-05 Richard Biener <rguenther@suse.de>
7208 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
7209 is asked for initialize mode to the component mode of the
7212 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
7215 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
7216 assembler for -mavx.
7217 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
7219 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
7222 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
7224 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
7225 to be DImode. When using mffscrn, force the operand to a register.
7227 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
7229 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
7230 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
7231 X87MODEF mode iterator.
7232 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
7233 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
7234 X87MODEF mode iterator.
7236 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
7238 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
7239 -Wno-prio-ctor-dtor.
7241 2018-10-04 David Malcolm <dmalcolm@redhat.com>
7243 * Makefile.in (OBJS): Add opt-problem.o.
7244 * dump-context.h: Include "selftest.h.
7245 (selftest::temp_dump_context): New forward decl.
7246 (class dump_context): Make friend of class
7247 selftest::temp_dump_context.
7248 (dump_context::dump_loc_immediate): New decl.
7249 (class dump_pretty_printer): Move here from dumpfile.c.
7250 (class temp_dump_context): Move to namespace selftest.
7251 (temp_dump_context::temp_dump_context): Add param
7252 "forcibly_enable_dumping".
7253 (selftest::verify_dumped_text):
7254 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
7255 (selftest::verify_item):
7256 (ASSERT_IS_TEXT): Move here from dumpfile.c.
7257 (ASSERT_IS_TREE): Likewise.
7258 (ASSERT_IS_GIMPLE): Likewise.
7259 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
7261 (dump_context::dump_loc_immediate): ...this new function.
7262 (class dump_pretty_printer): Move to dump-context.h.
7263 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
7264 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
7265 (temp_dump_context::temp_dump_context): Move to "selftest"
7266 namespace. Add param "forcibly_enable_dumping", and use it to
7267 conditionalize the use of m_pp;
7268 (selftest::verify_dumped_text): Make non-static.
7269 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
7270 (selftest::verify_item): Make non-static.
7271 (ASSERT_IS_TEXT): Move to dump-context.h.
7272 (ASSERT_IS_TREE): Likewise.
7273 (ASSERT_IS_GIMPLE): Likewise.
7274 (selftest::test_capture_of_dump_calls): Pass "true" for new
7275 param of temp_dump_context.
7276 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
7277 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
7279 * opt-problem.cc: New file.
7280 * opt-problem.h: New file.
7281 * optinfo-emit-json.cc
7282 (selftest::test_building_json_from_dump_calls): Pass "true" for
7283 new param of temp_dump_context.
7284 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
7285 (optinfo::emit_for_opt_problem): New function.
7286 (optinfo::emit): Clarity which emit_item is used.
7287 * optinfo.h (optinfo::get_dump_location): New accessor.
7288 (optinfo::emit_for_opt_problem): New decl.
7289 (optinfo::emit): Make const.
7290 * selftest-run-tests.c (selftest::run_tests): Call
7291 selftest::opt_problem_cc_tests.
7292 * selftest.h (selftest::opt_problem_cc_tests): New decl.
7293 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
7294 bool to opt_result, converting fprintf messages to
7295 opt_result::failure_at calls. Add "stmt" param for use by the
7297 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
7298 (runtime_alias_check_p): Convert return type from bool to
7299 opt_result, converting dump_printf calls to
7300 opt_result::failure_at, using the statement DDR_A for their
7302 (find_data_references_in_stmt): Convert return type from bool to
7303 opt_result, converting "return false" to opt_result::failure_at
7305 * tree-data-ref.h: Include "opt-problem.h".
7306 (dr_analyze_innermost): Convert return type from bool to opt_result,
7307 and add a const gimple * param.
7308 (find_data_references_in_stmt): Convert return type from bool to
7310 (runtime_alias_check_p): Likewise.
7311 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
7312 dr_analyze_innermost.
7313 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
7314 Convert return type from bool to opt_result, adding a message for
7315 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
7316 (vect_analyze_data_ref_dependence): Convert return type from bool
7317 to opt_result. Change sense of return type from "false"
7318 effectively meaning "no problems" to "false" meaning a problem,
7319 so that "return false" becomes "return opt_result::success".
7320 Convert "return true" calls to opt_result::failure_at, using
7321 the location of statement A rather than vect_location.
7322 (vect_analyze_data_ref_dependences): Convert return type from bool
7324 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
7325 calls to opt_result::failure_at, using the stmt location rather
7327 (vect_verify_datarefs_alignment): Convert return type from bool
7329 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
7330 into multiple more-tightly-scoped copies.
7331 (vect_analyze_data_refs_alignment): Convert return type from bool
7333 (vect_analyze_data_ref_accesses): Likewise, converting a
7334 "return false" to a "return opt_result::failure_at", adding a
7336 (vect_prune_runtime_alias_test_list): Convert return type from
7337 bool to opt_result, converting dump_printf_loc to
7338 opt_result::failure_at. Add a %G to show the pertinent statement,
7339 and use the stmt's location rather than vect_location.
7340 (vect_find_stmt_data_reference): Convert return type from
7341 bool to opt_result, converting dump_printf_loc to
7342 opt_result::failure_at, using stmt's location.
7343 (vect_analyze_data_refs): Convert return type from bool to
7344 opt_result. Convert "return false" to "return
7345 opt_result::failure_at", adding messages as needed.
7346 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
7347 type from bool to opt_result.
7348 (vect_determine_vf_for_stmt): Likewise.
7349 (vect_determine_vectorization_factor): Likewise, converting
7350 dump_printf_loc to opt_result::failure_at, using location of phi
7351 rather than vect_location.
7352 (vect_analyze_loop_form_1): Convert return type from bool to
7353 opt_result, converting dump_printf_loc calls, retaining the use of
7355 (vect_analyze_loop_form): Convert return type from loop_vec_info
7356 to opt_loop_vec_info.
7357 (vect_analyze_loop_operations): Convert return type from bool to
7358 opt_result, converting dump_printf_loc calls, using the location
7359 of phi/stmt rather than vect_location where available. Convert
7360 various "return false" to "return opt_result::failure_at" with
7361 "unsupported phi" messages.
7362 (vect_get_datarefs_in_loop): Convert return type from bool to
7363 opt_result. Add a message for the
7364 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
7365 (vect_analyze_loop_2): Convert return type from bool to
7366 opt_result. Ensure "ok" is set to a opt_result::failure_at before
7367 each "goto again;", adding new messages where needed.
7368 Add "unsupported grouped {store|load}" messages.
7369 (vect_analyze_loop): Convert return type from loop_vec_info to
7371 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
7373 * tree-vect-stmts.c (process_use): Likewise, converting
7374 dump_printf_loc call and using stmt location, rather than
7376 (vect_mark_stmts_to_be_vectorized): Likeise.
7377 (vect_analyze_stmt): Likewise, adding a %G.
7378 (vect_get_vector_types_for_stmt): Convert return type from bool to
7379 opt_result, converting dump_printf_loc calls and using stmt
7380 location, rather than vect_location.
7381 (vect_get_mask_type_for_stmt): Convert return type from tree to
7382 opt_tree, converting dump_printf_loc calls and using stmt location.
7383 * tree-vectorizer.c: Include "opt-problem.h.
7384 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
7385 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
7386 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
7387 enabled, use it to report at the top level "couldn't vectorize
7388 loop" followed by the problem.
7389 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
7390 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
7392 (vect_analyze_stmt): Likewise.
7393 (vect_get_vector_types_for_stmt): Likewise.
7394 (tree vect_get_mask_type_for_stmt): Likewise.
7395 (vect_analyze_data_ref_dependences): Likewise.
7396 (vect_enhance_data_refs_alignment): Likewise.
7397 (vect_analyze_data_refs_alignment): Likewise.
7398 (vect_verify_datarefs_alignment): Likewise.
7399 (vect_analyze_data_ref_accesses): Likewise.
7400 (vect_prune_runtime_alias_test_list): Likewise.
7401 (vect_find_stmt_data_reference): Likewise.
7402 (vect_analyze_data_refs): Likewise.
7403 (vect_analyze_loop): Convert return type from loop_vec_info to
7405 (vect_analyze_loop_form): Likewise.
7406 (vect_analyze_slp): Convert return type from bool to opt_result.
7408 2018-10-04 David Malcolm <dmalcolm@redhat.com>
7410 * doc/invoke.texi (-fopt-info): Document new "internals"
7412 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
7413 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
7415 (optinfo_verbosity_options): Add "internals".
7416 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
7417 (dump_context::apply_dump_filter_p): New member function.
7418 (dump_context::dump_loc): Use apply_dump_filter_p rather than
7419 explicitly masking the dump_kind.
7420 (dump_context::begin_scope): Increment the scope depth first. Use
7421 apply_dump_filter_p rather than explicitly masking the dump_kind.
7422 (dump_context::emit_item): Use apply_dump_filter_p rather than
7423 explicitly masking the dump_kind.
7424 (dump_dec): Likewise.
7425 (dump_hex): Likewise.
7426 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
7427 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
7428 (opt_info_switch_p): Update handling of default
7429 MSG_OPTIMIZED_LOCATIONS to cope with default of
7430 MSG_PRIORITY_USER_FACING.
7431 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
7432 masking the dump_kind.
7433 (selftest::test_capture_of_dump_calls): Update test_dump_context
7434 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
7435 than MSG_ALL. Generalize scope test to be run at all four
7436 combinations of with/without MSG_PRIORITY_USER_FACING and
7437 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
7438 for each of the two values.
7439 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
7440 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
7441 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
7442 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
7443 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
7444 with MSG_PRIORITY_*.
7445 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
7446 dump messages as MSG_PRIORITY_USER_FACING.
7447 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
7448 about the interaction with MSG_PRIORITY_*.
7450 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
7452 * varasm.c (output_constant): Add new parameter merge_strings.
7453 Make strings properly zero terminated in merge string sections.
7454 (mergeable_string_section): Don't fail if the last char is non-zero.
7455 (assemble_variable_contents): Handle merge string sections.
7456 (assemble_variable): Likewise.
7457 (assemble_constant_contents): Likewise.
7458 (output_constant_def_contents): Likewise.
7459 (output_constructor_array_range,
7460 output_constructor_regular_field): Adjust call to output_constant.
7461 (output_object_block): Adjust call to assemble_constant_contents
7462 and assemble_variable_contents.
7464 2018-10-04 Martin Liska <mliska@suse.cz>
7467 * cgraphunit.c (process_function_and_variable_attributes):
7468 Warn about a function with alias attribute and a body.
7470 2018-10-04 Martin Liska <mliska@suse.cz>
7473 * multiple_target.c (redirect_to_specific_clone): New function.
7474 (ipa_target_clone): Use it.
7475 * tree-inline.c: Fix comment.
7477 2018-10-04 David Malcolm <dmalcolm@redhat.com>
7479 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
7481 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
7482 (gcc::dump_manager::register_pass): New member function, adapted
7483 from loop body in gcc::pass_manager::register_pass, adding a
7484 call to update_dfi_for_opt_info.
7485 (gcc::dump_manager::opt_info_enable_passes): Store the
7486 -fopt-info options into the new fields. Move the loop
7488 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
7490 * dumpfile.h (struct opt_pass): New forward decl.
7491 (gcc::dump_manager::register_pass): New decl.
7492 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
7493 (class gcc::dump_manager): Add fields "m_optgroup_flags",
7494 "m_optinfo_flags", and "m_optinfo_filename".
7495 * passes.c (gcc::pass_manager::register_pass): Move all of the
7496 dump-handling code to gcc::dump_manager::register_pass.
7498 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
7500 PR rtl-optimization/87466
7501 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
7502 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
7503 * doc/tm.texi: Regenerate.
7504 * ira-lives.c (process_bb_node_lives): Use the new target hook.
7505 * lra-lives.c (process_bb_lives): Likewise.
7506 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
7509 2018-10-04 Tamar Christina <tamar.christina@arm.com>
7511 * params.c (add_params): Fix initialization.
7513 2018-10-04 Martin Liska <mliska@suse.cz>
7515 PR gcov-profile/84107
7516 * tree-profile.c (init_ic_make_global_vars):
7517 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
7518 Come up with new ic_tuple* variables. Emit
7519 __gcov_indirect_call{,_topn} variables.
7520 (gimple_gen_ic_profiler): Access the variable
7522 (gimple_gen_ic_func_profiler): Access
7523 __gcov_indirect_call.callee field.
7524 (gimple_init_gcov_profiler): Use ptr_type_node.
7525 * value-prof.c (gimple_ic): Use ptr_type_node.
7527 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7529 PR tree-optimization/85787
7530 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
7531 malloc_candidate_p into this function and add support for
7532 detecting multiple phis.
7533 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
7535 2018-10-04 Martin Liska <mliska@suse.cz>
7538 * ipa-inline.c (inline_to_all_callers_1):
7539 Call ultimate_alias_target for node being inlined.
7541 2018-10-03 Jeff Law <law@redhat.com>
7543 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
7545 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
7546 * tree.h (get_typenode_from_name): Prototype.
7548 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
7550 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
7551 Change operand 2 predicate to nonimmediate_operand.
7552 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7554 2018-10-03 Martin Sebor <msebor@redhat.com>
7555 Jeff Law <law@redhat.com>
7557 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
7559 (get_string_length): Detect unterminated arrays.
7560 (format_string): Same.
7561 (format_directive): Warn about unterminated arrays.
7562 (handle_gimple_call): Mark statements with no_warning as needed.
7564 2018-10-03 Jim Wilson <jimw@sifive.com>
7566 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
7567 also define __riscv_abi_rve. Delete trailing white space.
7569 2018-10-03 Paul Koning <ni1d@arrl.net>
7571 Enable LRA register allocator for PDP11.
7572 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
7575 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
7576 * config/pdp11/pdp11.opt (-mlra): New option.
7577 * doc/invoke.texi (PDP-11 Options): Document -mlra.
7579 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
7581 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
7582 (*<absneg:code>extend<mode>xf2): Ditto.
7584 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
7586 PR tree-optimization/87415
7587 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
7590 2018-10-02 Jeff Law <law@redhat.com>
7592 * gimple-fold.c (get_range_strlen): Only set *nonstr when
7593 an unterminated string is discovered. Bubble up range
7594 even for unterminated strings.
7595 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
7596 indicates the string was not terminated via NONSTR.
7598 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
7600 * tree-vrp.c (extract_range_from_unary_expr): Special case all
7601 pointer conversions.
7602 Do not do anything special for anti-ranges.
7604 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
7606 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
7607 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
7609 2018-10-03 Martin Liska <mliska@suse.cz>
7611 PR gcov-profile/86109
7612 * coverage.c (coverage_begin_function): Do not
7613 mark lambdas as artificial.
7614 * tree-core.h (struct GTY): Remove tm_clone_flag
7615 and introduce new lambda_function.
7616 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
7618 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7621 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
7622 P8_VECTOR and VSX are enabled.
7624 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
7626 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
7627 0x3907 as CPU model number.
7629 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
7631 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
7632 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
7633 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
7634 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
7635 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
7636 * config/s390/s390.md: Likewise. Rename also the cpu attribute
7637 value from arch12 to z14.
7639 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
7641 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
7643 (isinf<mode>2): Ditto.
7645 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
7647 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
7648 before emitting fxam. Perform calculations in XFmode.
7650 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
7652 * match.pd (((X /[ex] A) +- B) * A): New transformation.
7654 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
7657 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
7658 * tree.c (signed_or_unsigned_type_for): Handle complex.
7660 2018-10-02 Jeff Law <law@redhat.com>
7662 * gimple-fold.c (get_range_strlen): Remove dead code.
7664 2018-10-02 Martin Sebor <msebor@redhat.com>
7665 Jeff Law <law@redhat.com>
7667 * builtins.c (unterminated_array): Add new arguments.
7668 If argument is not terminated, bubble up size and exact
7670 (expand_builtin_strnlen): Detect, avoid expanding
7671 and diagnose unterminated arrays.
7672 (c_strlen): Fill in offset of start of unterminated strings.
7673 * builtins.h (unterminated_array): Update prototype.
7675 2018-10-02 Richard Biener <rguenther@suse.de>
7677 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
7678 of haddv4df, first reduce to SSE width and exploit the fact
7679 that we only need element zero with the reduction result.
7680 (reduc_plus_scal_v2df): Likewise.
7682 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
7684 * dojump.h (do_jump): Delete.
7685 (do_jump_1): Likewise.
7686 (split_comparison): Move around.
7687 * dojump.c (do_jump): Make static.
7688 (do_jump_1): Likewise.
7689 (jumpifnot): Move around.
7690 (jumpifnot_1): Likewise.
7692 (jumpif_1): Likewise.
7693 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
7695 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
7697 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
7698 insns in the delay slot and add_insn_after for the jump insn.
7700 2018-10-02 Richard Biener <rguenther@suse.de>
7702 * tree-inline.c (expand_call_inline): Use the location of
7703 the callee declaration for the inline-entry marker.
7704 * final.c (notice_source_line): Remove special-casing of
7705 NOTE_INSN_INLINE_ENTRY.
7707 2018-10-01 Carl Love <cel@us.ibm.com>
7710 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
7711 (__builtin_mtfsb0): New.
7712 (__builtin_mtfsb1): New.
7713 ( __builtin_set_fpscr_rn): New.
7714 (__builtin_set_fpscr_drn): New.
7715 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
7716 (rs6000_expand_set_fpscr_rn_builtin): Add.
7717 (rs6000_expand_set_fpscr_drn_builtin): Add.
7718 (rs6000_expand_builtin): Add case statement entries for
7719 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
7720 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
7721 RS6000_BUILTIN_MFFSL.
7722 (rs6000_init_builtins): Add ftype initialization and def_builtin
7723 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
7724 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
7725 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
7726 rs6000_mffscdrn): Add define_insn.
7727 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
7728 * doc/extend.texi: Add documentation for the builtins.
7730 2018-10-01 Richard Biener <rguenther@suse.de>
7732 PR tree-optimization/87465
7733 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
7734 causing branch miscounts.
7736 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7738 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
7739 aarch64_option_default_param): New.
7740 (params.h): Include.
7741 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
7742 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
7743 stack-clash protection validation code.
7745 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7747 * params.c (validate_param): New.
7748 (add_params): Use it.
7749 (set_param_value): Refactor param validation into validate_param.
7750 (diagnostic.h): Include.
7751 * diagnostic.h (diagnostic_ready_p): New.
7753 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7755 * params.c (set_param_value):
7756 Add index of parameter being validated.
7757 * common/common-target.def (option_validate_param): New.
7758 * common/common-targhooks.h (default_option_validate_param): New.
7759 * common/common-targhooks.c (default_option_validate_param): New.
7760 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
7761 * doc/tm.texi: Regenerate.
7763 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7766 * config/aarch64/aarch64.c (aarch64_override_options_internal):
7767 Add validation for stack-clash parameters and set defaults.
7769 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7772 * configure.ac: Add stack-clash-protection-guard-size.
7773 * doc/install.texi: Document it.
7774 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
7775 * params.def: Update comment for guard-size.
7776 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
7777 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
7778 * configure: Regenerate.
7780 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7783 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
7784 STACK_DYNAMIC_OFFSET): New.
7785 * config/aarch64/aarch64.c (aarch64_layout_frame):
7786 Update outgoing args size.
7787 (aarch64_stack_clash_protection_alloca_probe_range,
7788 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7790 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7793 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
7795 * target.def (stack_clash_protection_alloca_probe_range): New.
7796 (stack_clash_protection_final_dynamic_probe): Remove.
7797 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
7798 (default_stack_clash_protection_final_dynamic_probe): Remove.
7799 * targhooks.c: Likewise.
7800 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7801 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
7802 * doc/tm.texi: Regenerate.
7804 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7807 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
7808 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
7809 aarch64_clamp_to_uimm12_shift): New.
7810 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
7811 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
7813 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7816 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
7818 2018-10-01 Jeff Law <law@redhat.com>
7819 Richard Sandiford <richard.sandiford@linaro.org>
7820 Tamar Christina <tamar.christina@arm.com>
7823 * config/aarch64/aarch64.md
7824 (probe_stack_range): Add k (SP) constraint.
7825 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
7826 STACK_CLASH_MAX_UNROLL_PAGES): New.
7827 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
7828 stack probes for stack clash.
7829 (aarch64_allocate_and_probe_stack_space): New.
7830 (aarch64_expand_prologue): Use it.
7831 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
7832 (aarch64_sub_sp): Add emit_move_imm optional param.
7834 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
7836 PR tree-optimization/87261
7837 * match.pd: Remove trailing whitespace.
7838 Add (x & y) | ~(x | y) -> ~(x ^ y),
7839 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
7841 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
7843 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
7845 (ashlsi3_insn): Update instruction constraints.
7846 (ashrsi3_insn): Likewise.
7847 (rotrsi3): Likewise.
7848 (add_shift): Likewise.
7849 * config/arc/constraints.md (Csz): New 32 bit constraint. It
7850 avoids placing in the limm field small constants which, otherwise,
7851 could end into a small instruction.
7853 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
7855 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
7856 destination register is not odd-even.
7857 (umaddsidi4_split): Likewise.
7859 2018-10-01 Richard Biener <rguenther@suse.de>
7861 * tree-inline.c (expand_call_inline): Store origin of fn
7862 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
7863 * tree.c (block_ultimate_origin): Simplify and do some
7866 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
7868 * config/i386/mmx.md (EMMS): New int iterator.
7869 (emms): New int attribute.
7870 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
7871 EMMS int iterator. Explicitly declare clobbers.
7872 (mmx_emms): Remove expander.
7874 * config/i386/predicates.md (emms_operation): Remove predicate.
7875 (vzeroall_pattern): New predicate.
7876 (vzeroupper_pattern): Rename from vzeroupper_operation.
7877 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
7878 vzeroupper_pattern and vzeroall_pattern predicates.
7880 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
7882 PR rtl-optimization/86939
7883 * ira-lives.c (make_hard_regno_born): Rename from this...
7884 (make_hard_regno_live): ... to this. Remove update to conflict
7885 information. Update function comment.
7886 (make_hard_regno_dead): Add conflict information update. Update
7888 (make_object_born): Rename from this...
7889 (make_object_live): ... to this. Remove update to conflict information.
7890 Update function comment.
7891 (make_object_dead): Add conflict information update. Update function
7893 (mark_pseudo_regno_live): Call make_object_live.
7894 (mark_pseudo_regno_subword_live): Likewise.
7895 (mark_hard_reg_dead): Update function comment.
7896 (mark_hard_reg_live): Call make_hard_regno_live.
7897 (process_bb_node_lives): Likewise.
7898 * lra-lives.c (make_hard_regno_born): Rename from this...
7899 (make_hard_regno_live): ... to this. Remove update to conflict
7900 information. Remove now uneeded check_pic_pseudo_p argument.
7901 Update function comment.
7902 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
7903 to conflict information. Update function comment.
7904 (mark_pseudo_live): Remove update to conflict information. Update
7906 (mark_pseudo_dead): Add conflict information update.
7907 (mark_regno_live): Call make_hard_regno_live.
7908 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
7909 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
7911 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
7914 * config/i386/i386.c (construct_container): Use TImode for
7915 BLKmode values in 2 integer registers.
7917 2018-09-29 Jeff Law <law@redhat.com>
7919 * builtins.c (unterminated_array): Pass in c_strlen_data * to
7920 c_strlen rather than just a tree *.
7921 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
7922 Update recursive calls appropriately. If caller did not provide a
7923 suitable data pointer, create a local one. When a non-terminated
7924 string is discovered, bubble up information about the string via the
7925 c_strlen_data object.
7926 * builtins.h (c_strlen): Update prototype.
7927 (c_strlen_data): New structure.
7928 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
7929 For a type 2 call, if c_strlen indicates a non-terminated string
7930 use the length of the non-terminated string.
7931 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
7933 2018-09-29 Jakub Jelinek <jakub@redhat.com>
7936 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
7937 __m512d type for __A argument rather than __m512.
7939 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
7941 * match.pd (simple_comparison): Don't optimize if either operand is
7942 a function pointer when target needs function pointer canonicalization.
7944 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7946 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
7947 power5 .. power9 to remove indirection.
7948 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
7949 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
7950 ASM_CPU_476_SPEC): Delete.
7951 (ASM_CPU_SPEC): Adjust.
7952 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
7953 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
7955 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7957 * config.in: Delete HAVE_AS_DCI.
7958 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
7959 * config/rs6000/rs6000.h: Ditto.
7960 * configure.ac: Delete HAVE_AS_DCI.
7961 * configure: Regenerate.
7963 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7965 * config.in (HAVE_AS_LWSYNC): Delete.
7966 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7967 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
7969 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7970 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
7972 * configure.ac: Delete HAVE_AS_LWSYNC.
7973 * configure: Regenerate.
7975 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
7976 Pierre-Marie de Rodat <derodat@adacore.com>
7978 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
7979 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
7980 (cgraph_node::create_thunk): Add indirect_offset parameter.
7981 (thunk_adjust): Likewise.
7982 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
7983 and initialize the corresponding field with it.
7984 (cgraph_node::dump): Dump indirect_offset field.
7985 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
7986 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
7987 (thunk_adjust): Add indirect_offset parameter and deal with it.
7988 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
7989 pass it to thunk_adjust. Do not call the target hook if it's non-zero
7990 or if the thunk is external or local. Fix formatting. Do not chain
7991 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
7992 if any, in the GIMPLE representation.
7993 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
7994 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
7995 (input_node): Read indirect_offset field.
7996 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
7997 call to thunk_adjust.
7998 * tree-nested.c (struct nesting_info): Add thunk_p field.
7999 (create_nesting_tree): Set it.
8000 (convert_all_function_calls): Copy static chain from targets to thunks.
8001 (finalize_nesting_tree_1): Return early for thunks.
8002 (unnest_nesting_tree_1): Do not finalize thunks.
8003 (gimplify_all_functions): Do not gimplify thunks.
8005 2018-09-28 David Malcolm <dmalcolm@redhat.com>
8007 * opt-suggestions.c (option_proposer::build_option_suggestions):
8008 Release "option_values".
8010 2018-09-28 David Malcolm <dmalcolm@redhat.com>
8012 * coverage.c (get_coverage_counts): Convert problem-reporting dump
8013 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
8014 * dumpfile.c (kind_as_string): New function.
8015 (dump_loc): Rather than a hardcoded prefix of "note: ", use
8016 kind_as_string to vary the prefix based on dump_kind.
8017 (selftest::test_capture_of_dump_calls): Update for above.
8019 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
8021 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
8022 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
8024 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
8026 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
8027 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
8028 INVALID_REGNUM instead of FPSR_REG.
8029 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
8030 * config/i386/i386.md: Update comment of FP compares.
8031 (fldenv): Do not clobber FPSR_REG.
8033 2018-09-28 Richard Biener <rguenther@suse.de>
8035 * tree.h (BLOCK_ORIGIN): New.
8036 * omp-expand.c (grid_expand_target_grid_body): Assign
8037 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
8038 * tree-inline.c (remap_block): Likewise.
8039 * auto-profile.c (get_function_decl_from_block): Simplify
8040 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
8041 * langhooks.c (lhd_print_error_function): Likewise.
8042 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
8044 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
8045 * tree.c (block_nonartificial_location): Likewise.
8046 (block_ultimate_origin): Likewise.
8047 * tree-pretty-print.c (percent_K_format): Likewise. Remove
8048 no longer needed LTO case.
8050 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
8051 Jan Hubicka <jh@suse.cz>
8052 Martin Jambor <mjambor@suse.cz>
8054 * simplify-rtx.c (simplify_merge_mask): New function.
8055 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
8056 same masks are used in op1 or op2.
8057 (test_vec_merge): New function.
8058 (test_vector_ops): Call test_vec_merge.
8060 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
8062 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
8063 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
8064 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
8065 (cypress_costs): Set it.
8066 (supersparc_costs): Likewise.
8067 (hypersparc_costs): Likewise.
8068 (leon_cost): Likewise.
8069 (leon3_costs): Likewise.
8070 (sparclet_costs): Likewise.
8071 (ultrasparc_costs): Likewise.
8072 (ultrasparc_costs): Likewise.
8073 (niagara_costs): Likewise.
8074 (niagara2_costs): Likewise.
8075 (niagara3_costs): Likewise.
8076 (niagara4_costs): Likewise.
8077 (niagara7_costs): Likewise.
8078 (m8_costs): Likewise.
8079 (TARGET_CAN_FOLLOW_JUMP): Define.
8080 (pass_work_around_errata::gate): Minor tweak.
8081 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
8082 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
8083 Automaitcally clear MASK_FSMULD mask for V7 processors.
8084 (sparc_can_follow_jump): New static function.
8085 (output_ubranch): Deal with CROSSING_JUMP_P.
8086 (sparc_use_sched_lookahead): Rewrite using switch statement.
8087 (sparc_issue_rate): Reorder.
8088 (sparc_branch_cost): New function.
8090 2018-09-27 Martin Sebor <msebor@redhat.com>
8092 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
8093 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
8094 (int_fits_type_p): Same.
8096 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
8098 * config/i386/i386.md (FPCR_REG): Remove.
8099 (UNSPEC_FLDCW): Remove.
8100 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
8101 (x86_fldcw_1): Remove insn pattern.
8102 (fnstenv): Do not clobber FPCR_REG.
8104 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
8105 (CALL_USED_REGISTERS): Ditto.
8106 (REG_ALLOC_ORDER): Ditto.
8107 (REG_CLASS_CONTENTS): Ditto.
8108 (HI_REGISTER_NAMES): Ditto.
8109 (ADDITIONAL_REGISTER_NAMES): Use defines instead
8110 of numerical constants.
8111 * config/i386/i386.c (regclass_map): Remove fpsr register.
8112 (dbx_register_map): Ditto.
8113 (dbx64_register_map): Ditto.
8114 (svr4_dbx_register_map): Ditto.
8115 (print_reg): Do not handle FPCR_REG.
8117 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
8120 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
8121 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
8122 Delete, always treat as true.
8123 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8124 Ditto. Simplify remaining code.
8125 * config/powerpcspe/powerpcspe.h: Ditto.
8126 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
8127 Simplify remaining code.
8128 (rs6000_expand_builtin): Ditto.
8129 * config/rs6000/rs6000.h: Ditto.
8130 * configure.ac: Ditto.
8131 * configure: Regenerate.
8133 2018-09-27 Martin Liska <mliska@suse.cz>
8135 * coverage.c (get_coverage_counts): Revert the formatting
8136 of missing profile opt info.
8138 2018-09-27 Richard Biener <rguenther@suse.de>
8142 * dwarf2out.c (set_block_origin_self): Do not mark outermost
8143 block as we do not output that.
8144 (gen_inlined_subroutine_die): Elide the originally outermost
8145 block, matching what we do for concrete instances.
8146 (decls_for_scope): Add parameter specifying whether to recurse
8149 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
8150 Tom de Vries <tom@codesourcery.com>
8154 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
8155 STORE_FLAG_VALUE == 1.
8157 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
8159 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
8160 constant definitions.
8161 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
8162 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
8163 ("speculation_barrier"): New expander definition.
8165 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
8167 PR gcov-profile/86957
8168 * common.opt: New warning option -Wmissing-profile.
8169 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
8170 * doc/invoke.texi: Document -Wmissing-profile.
8172 2018-09-26 Jim Wilson <jimw@sifive.com>
8174 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
8175 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
8177 2018-09-26 Martin Sebor <msebor@redhat.com>
8179 * tree.c (zerop): Change return type to bool.
8180 (integer_zerop, integer_onep, integer_each_onep): Same.
8181 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8182 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8183 (real_onep, real_minus_onep, chain_index): Same.
8184 (print_type_hash_statistics, type_list_equal): Same.
8185 * tree.h (zerop): Same.
8186 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
8187 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8188 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8189 (real_onep, real_minus_onep, chain_index): Same.
8190 (print_type_hash_statistics, type_list_equal): Same.
8192 2018-09-26 Jim Wilson <jimw@sifive.com>
8194 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
8196 2018-09-26 Jakub Jelinek <jakub@redhat.com>
8199 * config/i386/i386.c: Include debug.h and dwarf2out.h.
8200 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
8203 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
8205 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
8207 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
8209 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
8210 and FP_SECOND_SSE_REGS.
8211 (REG_CLASS_NAMES): Ditto.
8212 (REG_CLASS_CONTENTS): Ditto.
8213 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
8214 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
8215 (ix86_preferred_output_reload_class): Ditto.
8216 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
8217 clobber constraint to "=&f".
8218 (fix_truncdi_i387): Ditto.
8219 (lrintxfdi2): Ditto.
8220 (fistdi2_<rounding>): Ditto.
8221 (fpremxf4_i387): Change "=u" constraint to "=f".
8222 (fprem1xf4_i387): Ditto.
8224 (fptanxf4_i387): Ditto.
8225 (fxtractxf3_i387): Ditto.
8226 (fscalexf4_i387): Ditto.
8227 (atan2xf3): Change "u" constraint to "f".
8228 (fyl2xxf3_i387): Ditto.
8229 (fyl2xp1xf3_i387): Ditto.
8231 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
8234 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
8235 for removed I387_MASK_PM entity.
8238 2018-09-26 Jeff Law <law@redhat.com>
8240 2018-09-26 Alexey Neyman <stilor@att.net>
8242 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8243 headers are no longer pulled in by <isl/val.h>.
8245 2018-09-26 Richard Biener <rguenther@suse.de>
8248 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
8249 or concrete instance DIE to the tree. Create abstract origin
8250 attributes also for concrete instances.
8252 2018-09-26 Alexey Neyman <stilor@att.net>
8254 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8255 headers are no longer pulled in by <isl/val.h>.
8257 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
8259 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
8260 Use new helper functions.
8261 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
8262 Use new helper functions.
8263 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
8264 aarch_mm_needs_release): New declarations.
8265 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
8266 aarch_mm_needs_release): New.
8268 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
8270 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
8271 (arm32_output_mi_thunk): Deal with long calls.
8273 2018-09-26 Richard Biener <rguenther@suse.de>
8277 * tree-inline.c (expand_call_inline): When the location
8278 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
8279 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
8280 the inserted BLOCK to make inlined_function_outer_scope_p
8282 * dwarf2out.c (add_call_src_coords_attributes): Do not add
8283 coords for reserved locations.
8285 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
8287 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
8288 (*call_indirect_nonlocal_sysv<mode>): Ditto.
8289 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
8290 (*sibcall_nonlocal_sysv<mode>): Ditto.
8291 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
8292 (<bd>_<mode>): Ditto.
8293 (<bd>tf_<mode>): Ditto.
8295 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
8297 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
8298 control string as a list of templates instead of as C code.
8299 (*altivec_movti): Ditto.
8300 * config/rs6000/darwin.md (movdf_low_di): Ditto.
8302 2018-09-25 Jim Wilson <jimw@sifive.com>
8304 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
8305 when target symbol is weak.
8307 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
8310 * builtins.c (unterminated_array): Simplify.
8311 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
8312 where pointer arithmetic is safe.
8314 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
8317 * config/rs6000/altivec.md (altivec_vspltb): Use
8318 const_0_to_15_operand instead of u5bit_cint_operand.
8319 (*altivec_vspltb_internal): Ditto.
8320 (altivec_vspltb_direct): Ditto.
8321 (altivec_vsplth): Use const_0_to_7_operand instead of
8323 (*altivec_vsplth_internal): Ditto.
8324 (altivec_vsplth_direct): Ditto.
8325 (altivec_vspltw): Use const_0_to_3_operand instead of
8327 (*altivec_vspltw_internal): Ditto.
8328 (altivec_vspltw_direct): Ditto.
8329 (altivec_vspltsf): Ditto.
8330 (*altivec_vspltsf_internal): Ditto.
8331 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
8332 various splats with the proper size immediate. Reorder the various
8333 cases by ascending size of immediate, and put all such together.
8335 2018-09-25 Richard Biener <rguenther@suse.de>
8338 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
8340 (maybe_create_die_with_external_ref): Do not create
8341 DW_TAG_imported_unit here.
8342 (add_abstract_origin_attribute): Handle external BLOCK refs.
8343 (dwarf2out_abstract_function): Simplify LTO case.
8344 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
8345 rather than using maybe_create_die_with_external_ref.
8347 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
8350 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
8351 (frndintxf2_mask_pm_i387): Ditto.
8352 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
8353 Enable for !flag_trapping_math.
8354 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
8355 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
8356 Change operand 1 predicate to nonimmediate_operand.
8357 (attr "i387_cw"): Remove mask_pm.
8358 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
8359 (enum ix86_entity): Remove I387_MASK_PM.
8360 * config/i386/i386.c (ix86_i387_mode_needed): Do not
8361 handle I387_MASK_PM.
8362 (ix86_mode_needed): Ditto.
8363 (ix86_mode_after): Ditto.
8364 (ix86_mode_entry): Ditto.
8365 (ix86_mode_exit): Ditto.
8366 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
8368 2018-09-25 Jakub Jelinek <jakub@redhat.com>
8370 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
8371 to_update_switch_stmts to vNULL instead of calling create on them
8374 2018-09-25 Richard Biener <rguenther@suse.de>
8376 PR tree-optimization/87402
8377 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
8378 (visit_phi): Re-instantiate handling of supposed to be VARYING
8379 but non-VARYING backedge value.
8381 2018-09-25 Richard Biener <rguenther@suse.de>
8384 * dwarf2out.c (struct sym_off_pair): New.
8385 (external_die_map): New global.
8386 (lookup_decl_die): When in LTO create DIEs lazily from the
8388 (lookup_block_die): New function, create DIEs lazily in LTO.
8389 (equate_block_to_die): New function.
8390 (dwarf2out_die_ref_for_decl): During WPA get the association
8391 from the external DIE map.
8392 (dwarf2out_register_external_die): Record mapping into the
8394 (maybe_create_die_with_external_ref): New function split out from
8395 DIE generation part of old dwarf2out_register_external_die.
8396 (add_abstract_origin_attribute): Do not return the DIE. When
8397 in LTO reference externals directly.
8398 (dwarf2out_abstract_function): When in LTO ignore calls for
8399 decls with external DIEs (already present abstract instances).
8400 (gen_call_site_die): Adjust.
8401 (add_high_low_attributes): Likewise.
8402 (gen_lexical_block_die): Likewise.
8403 (gen_inlined_subroutine_die): Likewie.
8404 (gen_block_die): Likewise.
8405 (dwarf2out_inline_entry): Likewise.
8406 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
8409 2018-09-25 Martin Liska <mliska@suse.cz>
8411 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
8412 integers and not by a float value.
8414 2018-09-25 Martin Liska <mliska@suse.cz>
8417 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
8419 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
8420 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
8421 * godump.c (go_format_type): Remove extra parenthesis.
8423 2018-09-25 Martin Liska <mliska@suse.cz>
8425 * alias.c (set_dest_equal_p): Remove unused function.
8426 * config/i386/i386.c (def_builtin_pure2): Likewise.
8427 * diagnostic-show-locus.c (class layout): Remove
8429 (layout::layout): Likewise here.
8430 * dump-context.h (class temp_dump_context): Likewise.
8431 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
8432 (add_AT_loclistsptr): Likewise.
8433 (add_AT_offset): Likewise.
8434 (get_AT_hi_pc): Likewise.
8435 (is_comdat_die): Likewise.
8436 (type_is_enum): Likewise.
8437 (ceiling): Likewise.
8438 (add_AT_vms_delta): Likewise.
8439 (is_class_die): Likewise.
8440 * edit-context.c (class line_event): Remove unused field.
8441 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
8443 * ipa-cp.c (ipa_get_vr_lat): Likewise.
8444 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
8445 (ok_for_base_p_nonstrict): Likewise.
8446 * tree-chrec.c (is_not_constant_evolution): Likewise.
8447 (chrec_fold_poly_cst): Likewise.
8448 * tree-if-conv.c (has_pred_critical_p): Likewise.
8449 * tree-ssa-coalesce.c (print_exprs): Likewise.
8450 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
8451 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
8452 * tree-vrp.c (value_ranges_intersect_p): Likewise.
8453 (value_range_nonnegative_p): Likewise.
8455 2018-09-25 Martin Liska <mliska@suse.cz>
8457 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
8458 Do not handle "GNU Pascal".
8459 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
8461 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
8462 from documentation. Likewise.
8463 * dbxout.c (dbxout_range_type): Likewise.
8464 * doc/cpp.texi: Likewise.
8465 * doc/extend.texi: Likewise.
8466 * doc/frontends.texi: Likewise.
8467 * doc/invoke.texi: Remove Pascal entry.
8468 * tree.def (CLEANUP_POINT_EXPR): Likewise.
8469 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
8471 2018-09-25 Martin Liska <mliska@suse.cz>
8474 * doc/invoke.texi: Document all parameters and remove default
8477 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
8480 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
8481 contains HOST_WIDE_INTs when computing its size.
8483 2018-09-24 Jim Wilson <jimw@sifive.com>
8486 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
8488 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
8490 2018-09-24 Andrew Pinski <apinski@marvell.com>
8492 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
8493 access prev before checking it for NULLness in the
8494 AARCH64_FUSE_CMP_BRANCH case.
8496 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
8499 * config/i386/i386.c (rest_of_insert_endbranch): Set
8500 endbr_queued_at_entrance to true and don't insert ENDBR if
8501 x86_function_profiler will be called.
8502 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
8504 * config/i386/i386.h (machine_function): Add
8505 endbr_queued_at_entrance.
8507 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
8509 * genattrtab.c (mk_attr_alt): Use alternative_mask.
8510 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
8512 (check_attr_test): Use alternative_mask.
8513 (get_attr_value): Likewise.
8514 (compute_alternative_mask): Use alternative_mask and XWINT.
8515 (make_alternative_compare): Use alternative_mask.
8516 (attr_alt_subset_p): Use XWINT.
8517 (attr_alt_subset_of_compl_p): Likewise.
8518 (attr_alt_intersection): Use alternative_mask and XWINT.
8519 (attr_alt_union): Likewise.
8520 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
8521 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
8522 (simplify_test_exp): Use alternative_mask and XWINT.
8523 (write_test_expr): Use alternative_mask and XWINT, adjust bit
8524 number calculation to support 64 bits. Generate code that
8525 checks 64-bit masks.
8526 (main): Use alternative_mask.
8527 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
8529 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
8532 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
8533 RETURN+USE when returning via %r14.
8535 2018-09-24 Martin Liska <mliska@suse.cz>
8537 * gcov.c (output_lines): Print colorization legend
8538 for both flag_use_colors and flag_use_hotness_colors.
8541 2018-09-24 Martin Liska <mliska@suse.cz>
8543 * coverage.c (get_coverage_counts): Use warning_at
8544 with current_function_decl location. Use %qD in warning
8547 2018-09-24 Martin Liska <mliska@suse.cz>
8549 * memory-block.h (memory_block_pool::release): Annotate with
8550 valgrind that the memory is not accessible.
8552 2018-09-24 Martin Liska <mliska@suse.cz>
8555 * asan.c: Make asan_handled_variables extern.
8557 * cfgexpand.c (expand_stack_vars): Make sure
8558 a representative is unpoison if another
8559 variable in the partition is handled by
8560 use-after-scope sanitization.
8562 2018-09-24 Richard Biener <rguenther@suse.de>
8564 PR tree-optimization/63155
8565 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
8566 the worklist when the edge of the respective argument isn't
8569 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
8571 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
8572 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
8573 (MASK_CLASS_P): Update for rename.
8574 (MAYBE_MASK_CLASS_P): Ditto.
8575 (REG_CLASS_NAMES): Update.
8576 (REG_CLASS_CONTENT): Update.
8577 * config/i386/i386.c (regclass_map): Update for MASK_REG
8578 and ALL_MASK_REGS rename.
8579 * config/i386/constraints.md (Yk): Update for rename.
8582 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
8584 * config/i386/i386.h (enum reg_class): Remove
8585 EVEX_SSE_REGS and MOD4_SSE_REGS.
8586 (REG_CLASS_NAMES): Update.
8587 (REG_CLASS_CONTENT): Update.
8588 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
8589 registers as ALL_SSE_REGS.
8590 (ix86_additional_allocno_class_p): Remove.
8591 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
8592 (ix86_register_priority): Lower priority of EVEX SSE registers.
8593 Use IN_RANGE macro where appropriate.
8594 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
8595 AVX-5124VNNIW checks.
8596 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
8597 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
8598 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
8599 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
8600 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
8601 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
8602 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
8603 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
8604 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
8605 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
8606 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
8607 * config/i386/constraints.md (Yh): Remove.
8609 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
8611 * config/i386/i386.c (regclass_map): Declare integer REX registers
8614 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
8616 * doc/service.texi (Service): Switch the fsf.org link to https.
8618 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
8621 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8622 Define to speculation_safe_value_not_needed.
8624 2018-09-21 Florian Weimer <fweimer@redhat.com>
8627 * doc/extend.texi (Common Function Attributes): Mention that
8628 noreturn suppresses tail call optimization.
8630 2018-09-21 Jeff Law <law@redhat.com>
8632 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
8633 vr_values::cleanup_edges_and_switches.
8634 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
8636 (identify_jump_threads): Remove EDGE_IGNORE handling.
8637 (execute_vrp): Move handling of to_remove_edges and
8638 to_update_switch_stmts into vr_values class member functions.
8639 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
8640 (to_update_switch_stmts): Likewise.
8641 * vr-values.c: Include cfghooks.h.
8642 (vr_values::vr_values): Initialize to_remove_edges and
8643 to_update_switch_stmts.
8644 (vr_values::~vr_values): Verify to_remove_edges and
8645 to_update_switch_stmts are empty.
8646 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
8647 (vr_values::cleanup_edges_and_switches): New member function.
8648 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
8649 function. Add new data members.
8651 2018-09-21 David Malcolm <dmalcolm@redhat.com>
8653 PR tree-optimization/87309
8654 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
8655 calls with pflags and alt_flags.
8656 (selftest::test_capture_of_dump_calls): Add test of interaction of
8657 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
8659 2018-09-21 Olivier Hainque <hainque@adacore.com>
8661 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
8663 2018-09-21 Olivier Hainque <hainque@adacore.com>
8665 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
8667 2018-09-21 Olivier Hainque <hainque@adacore.com>
8669 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
8670 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
8671 (VXWORKS_LIBS_RTP): Minor reordering.
8673 2018-09-21 Olivier Hainque <hainque@adacore.com>
8675 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
8676 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
8678 2018-09-21 Olivier Hainque <hainque@adacore.com>
8680 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
8681 (PTRDIFF_TYPE): Likewise.
8683 2018-09-21 Olivier Hainque <hainque@adacore.com>
8685 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
8686 triplet, similar to support for VxWorks7.
8687 * config/vxworks-dummy.h: Provide a default definition
8688 of TARGET_VXWORKS64 to 0.
8690 2018-09-21 Olivier Hainque <hainque@adacore.com>
8692 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
8693 * config/vxworks-dummy.h: here.
8695 2018-09-21 Olivier Hainque <hainque@adacore.com>
8697 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
8699 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
8700 Bo Zhou <zbo.zhou@hisilicon.com>
8702 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
8703 * config/aarch64/aarch64-tune.md: Regenerated.
8704 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
8705 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
8706 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
8708 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
8709 Julian Brown <julian@codesourcery.com>
8711 * builtins.c (get_builtin_sync_mem): Handle address spaces.
8713 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
8715 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
8716 if the call takes a static chain.
8718 2018-09-21 Martin Liska <mliska@suse.cz>
8720 * auto-profile.c (autofdo_source_profile::read): Do not
8722 (read_profile): Do not add working sets.
8723 (read_autofdo_file): Remove sum_all.
8724 (afdo_callsite_hot_enough_for_early_inline): Remove const
8726 * coverage.c (struct counts_entry): Remove gcov_summary.
8727 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
8728 do not support GCOV_TAG_PROGRAM_SUMMARY.
8729 (get_coverage_counts): Remove summary and expected
8731 * coverage.h (get_coverage_counts): Likewise.
8732 * doc/gcov-dump.texi: Remove -w option.
8733 * gcov-dump.c (dump_working_sets): Remove.
8734 (main): Do not support '-w' option.
8735 (print_usage): Likewise.
8736 (tag_summary): Likewise.
8737 * gcov-io.c (gcov_write_summary): Do not dump
8739 (gcov_read_summary): Likewise.
8740 (gcov_histo_index): Remove.
8741 (gcov_histogram_merge): Likewise.
8742 (compute_working_sets): Likewise.
8743 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
8745 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
8746 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
8747 (GCOV_HISTOGRAM_SIZE): Remove.
8748 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
8749 (struct gcov_summary): Simplify rapidly just
8750 to runs and sum_max fields.
8751 (gcov_histo_index): Remove.
8752 (NUM_GCOV_WORKING_SETS): Likewise.
8753 (compute_working_sets): Likewise.
8754 * gcov-tool.c (print_overlap_usage_message): Remove
8755 trailing empty line.
8756 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
8757 (output_lines): Remove program related line.
8758 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
8759 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
8761 (input_profile_summary): Do not read it.
8762 (merge_profile_summaries): And do not merge it.
8763 (input_symtab): Do not call removed function.
8764 * modulo-sched.c (sms_schedule): Do not print sum_max.
8765 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
8766 removed when histogram method was invented.
8767 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
8769 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
8771 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
8772 and dump selected value.
8773 * profile.c (add_working_set): Remove.
8774 (get_working_sets): Likewise.
8775 (find_working_set): Likewise.
8776 (get_exec_counts): Do not work with working sets.
8777 (read_profile_edge_counts): Do not inform as sum_max is removed.
8778 (compute_branch_probabilities): Likewise.
8779 (compute_value_histograms): Remove argument for call of
8780 get_coverage_counts.
8781 * profile.h: Do not make gcov_summary const.
8783 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
8785 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
8787 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
8789 PR tree-optimization/86990
8790 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
8791 Check that the entire merged store group is made of constants only for
8794 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
8796 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
8797 (VTABLE_VERIFICATION_SPEC): Likewise.
8798 (SANITIZER_EARLY_SPEC): Likewise.
8799 (SANITIZER_SPEC): Likewise.
8800 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
8801 * doc/invoke.texi (Link Options): Document -r.
8803 2018-09-20 Richard Biener <rguenther@suse.de>
8806 * gimplify.c (gimplify_expr): Retain alignment of
8807 addressable lvalue in dereference.
8809 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
8812 * configure.ac: Check for .loc is_stmt support.
8813 * configure, config.in: Rebuilt.
8814 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
8817 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
8819 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
8820 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
8823 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
8825 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8827 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
8830 2018-09-20 Marek Polacek <polacek@redhat.com>
8832 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
8834 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
8836 PR tree-optimization/87288
8837 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
8838 into account when determining PEELING_FOR_NITERS.
8840 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
8842 PR tree-optimization/86877
8843 * tree-vect-loop.c (vect_analyze_loop_2): Call
8844 vect_verify_datarefs_alignment.
8846 2018-09-19 Marek Polacek <polacek@redhat.com>
8848 * doc/invoke.texi: Document -Wclass-conversion.
8850 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
8852 * config/pa/pa.c (pa_adjust_priority): Delete.
8853 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
8855 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
8856 (atomic_storehi): Likewise.
8857 (atomic_storesi): Likewise.
8858 (atomic_loaddi): Restore compare and swap exchange loop code.
8860 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
8862 PR rtl-optimization/86902
8863 * combine.c (try_combine): When changing the CC mode used, don't change
8864 an unrelated mode in other_insn to that new CC mode.
8866 2018-09-19 David Malcolm <dmalcolm@redhat.com>
8868 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
8869 with %T in place of calls to dump_generic_expr.
8870 (prune_runtime_alias_test_list): Likewise.
8871 (create_runtime_alias_checks): Likewise.
8872 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
8873 (vect_analyze_data_ref_dependence): Likewise.
8874 (vect_slp_analyze_data_ref_dependence): Likewise.
8875 (vect_record_base_alignment): Likewise. Use %G in place of call
8876 to dump_gimple_stmt.
8877 (vect_compute_data_ref_alignment): Likewise.
8878 (verify_data_ref_alignment): Likewise.
8879 (vect_find_same_alignment_drs): Likewise.
8880 (vect_analyze_group_access_1): Likewise.
8881 (vect_analyze_data_ref_accesses): Likewise.
8882 (dependence_distance_ge_vf): Likewise.
8883 (dump_lower_bound): Likewise.
8884 (vect_prune_runtime_alias_test_list): Likewise.
8885 (vect_find_stmt_data_reference): Likewise.
8886 (vect_analyze_data_refs): Likewise.
8887 (vect_create_addr_base_for_vector_ref): Likewise.
8888 (vect_create_data_ref_ptr): Likewise.
8889 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
8890 (vect_can_advance_ivs_p): Likewise.
8891 (vect_update_ivs_after_vectorizer): Likewise.
8892 (vect_gen_prolog_loop_niters): Likewise.
8893 (vect_prepare_for_masked_peels): Likewise.
8894 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8895 (vect_determine_vectorization_factor): Likewise.
8896 (vect_is_simple_iv_evolution): Likewise.
8897 (vect_analyze_scalar_cycles_1): Likewise.
8898 (vect_analyze_loop_operations): Likewise.
8899 (report_vect_op): Likewise.
8900 (vect_is_slp_reduction): Likewise.
8901 (check_reduction_path): Likewise.
8902 (vect_is_simple_reduction): Likewise.
8903 (vect_create_epilog_for_reduction): Likewise.
8904 (vect_finalize_reduction:): Likewise.
8905 (vectorizable_induction): Likewise.
8906 (vect_transform_loop_stmt): Likewise.
8907 (vect_transform_loop): Likewise.
8908 (optimize_mask_stores): Likewise.
8909 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
8910 (vect_split_statement): Likewise.
8911 (vect_recog_over_widening_pattern): Likewise.
8912 (vect_recog_average_pattern): Likewise.
8913 (vect_determine_min_output_precision_1): Likewise.
8914 (vect_determine_precisions_from_range): Likewise.
8915 (vect_determine_precisions_from_users): Likewise.
8916 (vect_mark_pattern_stmts): Likewise.
8917 (vect_pattern_recog_1): Likewise.
8918 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8919 (vect_record_max_nunits): Likewise.
8920 (vect_build_slp_tree_1): Likewise.
8921 (vect_build_slp_tree_2): Likewise.
8922 (vect_print_slp_tree): Likewise.
8923 (vect_analyze_slp_instance): Likewise.
8924 (vect_detect_hybrid_slp_stmts): Likewise.
8925 (vect_detect_hybrid_slp_1): Likewise.
8926 (vect_slp_analyze_operations): Likewise.
8927 (vect_slp_analyze_bb_1): Likewise.
8928 (vect_transform_slp_perm_load): Likewise.
8929 (vect_schedule_slp_instance): Likewise.
8930 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8931 (vect_mark_stmts_to_be_vectorized): Likewise.
8932 (vect_init_vector_1): Likewise.
8933 (vect_get_vec_def_for_operand): Likewise.
8934 (vect_finish_stmt_generation_1): Likewise.
8935 (vect_check_load_store_mask): Likewise.
8936 (vectorizable_call): Likewise.
8937 (vectorizable_conversion): Likewise.
8938 (vectorizable_operation): Likewise.
8939 (vectorizable_load): Likewise.
8940 (vect_analyze_stmt): Likewise.
8941 (vect_is_simple_use): Likewise.
8942 (vect_get_vector_types_for_stmt): Likewise.
8943 (vect_get_mask_type_for_stmt): Likewise.
8944 * tree-vectorizer.c (increase_alignment): Likewise.
8946 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
8948 * doc/rtl.texi: Adjust vec_select description.
8949 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
8950 non-constant selectors.
8952 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
8954 * config/aarch64/aarch64-protos.h
8955 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
8956 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
8957 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
8958 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
8959 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
8960 (AARCH64_FL_PROFILE): Move index so flags are ordered.
8961 (AARCH64_ISA_RCPC8_4): New flag.
8962 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
8963 to aarch64_offset_9bit_signed_unscaled_p.
8964 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
8966 * config/aarch64/constraints.md (Ust): New constraint.
8967 * config/aarch64/predicates.md.
8968 (aarch64_9bit_offset_memory_operand): New predicate.
8969 (aarch64_rcpc_memory_operand): New predicate.
8971 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
8973 PR rtl-optimization/87361
8974 * rtlanal.c (nonzero_bits1): Revert accidental change.
8976 2018-09-19 Richard Biener <rguenther@suse.de>
8978 PR tree-optimization/87349
8979 PR tree-optimization/87342
8980 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
8982 2018-09-18 Marek Polacek <polacek@redhat.com>
8984 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
8985 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
8987 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
8989 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
8991 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
8993 PR rtl-optimization/86882
8994 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
8996 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
8998 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
8999 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
9001 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
9004 * doc/invoke.texi (Link Options): Fix formatting and grammar.
9006 2018-09-18 Richard Biener <rguenther@suse.de>
9009 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
9010 (compute_samebase_partition_bases): Likewise.
9011 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
9012 (gimple_can_coalesce_p): Simplify.
9014 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
9016 Handle a library implementation of ffs calling __builtin_ffs.
9017 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
9018 (mmix_init_libfuncs): New function: make __builtin_ffs expand
9021 2018-09-17 David Malcolm <dmalcolm@redhat.com>
9023 * diagnostic-show-locus.c (class layout_range): Add field
9025 (layout_range::layout_range): Add "original_idx" param and use it
9026 to initialize new field.
9027 (make_range): Use 0 for original_idx.
9028 (layout::layout): Pass in index to calls to
9029 maybe_add_location_range.
9030 (layout::maybe_add_location_range): Add param "original_idx" and
9031 pass it on to layout_range.
9032 (layout::print_any_labels): Pass on range->m_original_idx to
9034 (gcc_rich_location::add_location_if_nearby): Use 0 for
9036 * gcc-rich-location.h (text_range_label::get_text): Update for new
9038 (range_label_for_type_mismatch::get_text): Likewise.
9040 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
9042 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
9044 2018-09-17 David Malcolm <dmalcolm@redhat.com>
9046 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
9047 format_string_diagnostic_t.
9048 (fmtwarn_n): Likewise.
9049 * substring-locations.c
9050 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
9051 (format_warning_n_va): Convert to...
9052 (format_string_diagnostic_t::emit_warning_n_va): ...this.
9053 (format_warning_va): Convert to...
9054 (format_string_diagnostic_t::emit_warning_va): ...this.
9055 (format_warning_at_substring): Convert to...
9056 (format_string_diagnostic_t::emit_warning): ...this.
9057 (format_warning_at_substring_n): Convert to...
9058 (format_string_diagnostic_t::emit_warning_n): ...this.
9059 * substring-locations.h (class format_string_diagnostic_t): New
9061 (format_warning_va): Convert to
9062 format_string_diagnostic_t::emit_warning_va.
9063 (format_warning_n_va): Convert to
9064 format_string_diagnostic_t::emit_warning_n_va.
9065 (format_warning_at_substring): Convert to
9066 format_string_diagnostic_t::emit_warning.
9067 (format_warning_at_substring_n): Convert to
9068 format_string_diagnostic_t::emit_warning_n.
9070 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
9071 Bernd Schmidt <bernds_cb1@t-online.de>
9073 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
9076 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
9078 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
9079 operand 0 predicate to nonimmediate operand.
9080 (rint<mode>2_frndint): Remove insn pattern.
9081 (rint<mode>2): Change operand 1 predicate to general_operand.
9082 Extend operand 1 to XFmode and generate rintxf2 insn.
9083 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
9084 Do not use X87MODEF mode macro.
9085 (frndintxf2_<rounding>_i387): Rename from
9086 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
9087 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
9088 to XFmode and generate significandxf3 insn.
9090 2018-09-17 Richard Biener <rguenther@suse.de>
9092 PR tree-optimization/87328
9093 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
9094 visiting unexecutable backedges when not iterating.
9095 (do_rpo_vn): Mark all edges not executable even when not
9098 2018-09-17 Martin Jambor <mjambor@suse.cz>
9101 * doc/invoke.texi (Warning Options): Likewise.
9103 2018-09-17 Richard Biener <rguenther@suse.de>
9105 PR tree-optimization/87301
9106 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
9107 clean EH info from leftover copy assignments.
9109 2018-09-17 Martin Liska <mliska@suse.cz>
9111 PR gcov-profile/85871
9112 * gcov.c (output_intermediate_file): Fix out of bounds
9115 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
9117 * config/arc/arc.c: Object attributes for core4 not reflected
9119 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
9122 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
9124 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
9126 2018-09-17 Martin Liska <mliska@suse.cz>
9128 * doc/gcov.texi: Document new option --use-hotness-colors.
9129 * gcov.c (struct source_info): Declare new field.
9130 (source_info::source_info): Set default for maximum_count.
9131 (print_usage): Add new -q option.
9132 (process_args): Process it.
9133 (accumulate_line_info): Save src->maximum_count.
9134 (output_line_beginning): Make color line number if
9135 flag_use_hotness_colors is set.
9136 (output_line_details): Pass default argument value.
9137 (output_lines): Pass src->maximum_count.
9139 2018-09-17 Martin Liska <mliska@suse.cz>
9141 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
9142 Use processor_names table.
9143 * config/i386/i386.c (ix86_default_align): Use
9144 processor_cost_table for alignment values.
9145 (ix86_option_override_internal): Use processor_names.
9146 (ix86_function_specific_print): Likewise.
9147 * config/i386/i386.h (struct processor_costs):
9148 Add alignment values.
9149 (struct ptt): Remove and replace with const char *.
9150 * config/i386/x86-tune-costs.h (struct processor_costs):
9151 Declare default alignments for all costs.
9153 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
9155 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
9156 symbolics or VR_VARYING ranges for ABS_EXPR.
9157 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
9158 when range will wrap.
9160 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
9163 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
9164 before and after a JUMP_TABLE_DATA.
9166 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
9169 * dojump.c (do_compare_and_jump): Canonicalize function pointers
9170 when one operand is a function pointer. Use POINTER_TYPE_P and
9171 FUNC_OR_METHOD_TYPE_P.
9172 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
9173 * fold-const.c (build_range_check): Likewise.
9174 * match.pd (simple_comparison): Likewise.
9176 2018-09-14 David Malcolm <dmalcolm@redhat.com>
9179 * spellcheck.c (get_edit_distance_cutoff): New function.
9180 (selftest::test_edit_distance_unit_test_oneway): Rename to...
9181 (selftest::test_get_edit_distance_one_way): ...this.
9182 (selftest::test_get_edit_distance_unit): Rename to...
9183 (selftest::test_get_edit_distance_both_ways): ...this.
9184 (selftest::test_edit_distances): Move tests to this new function,
9185 and test some more pairs of strings. Update for above renaming.
9186 (selftest::get_old_cutoff): New function.
9187 (selftest::test_get_edit_distance_cutoff): New function.
9188 (selftest::assert_suggested_for): New function.
9189 (ASSERT_SUGGESTED_FOR): New macro.
9190 (selftest::assert_not_suggested_for): New function.
9191 (ASSERT_NOT_SUGGESTED_FOR): New macro.
9192 (selftest::test_suggestions): New function.
9193 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
9194 tests to selftest::test_edit_distances and call it. Add calls to
9195 selftest::test_get_edit_distance_cutoff and
9196 selftest::test_suggestions.
9197 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
9198 (best_match::consider): Replace hard-coded cutoff calculation with
9200 (best_match::get_cutoff): New declaration.
9201 (best_match::get_best_meaningful_candidate): Likewise.
9203 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9205 * builtins.c (fold_builtin_strlen): Remove TODO comment.
9207 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9210 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9212 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9213 terminated string literal.
9215 2018-09-14 Martin Sebor <msebor@redhat.com>
9217 * builtins.c (unterminated_array): Handle ARRAY_REF.
9218 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
9219 * builtins.h (unterminated_array): Declare extern.
9220 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
9222 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
9225 2018-09-14 Martin Sebor <msebor@redhat.com>
9226 Jeff Law <law@redhat.com>
9228 * builtins.c (unterminated_array): New.
9229 (expand_builtin_strcpy): Adjust.
9230 (expand_builtin_strcpy_args): Detect unterminated arrays.
9231 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
9232 unterminated arrays.
9233 * gimple-fold.h (get_maxval_strlen): Add argument.
9234 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
9236 * gimple-fold.c (get_range_strlen): Add argument.
9237 (get_maxval_strlen): Adjust.
9238 * gimple-fold.h (get_range_strlen): Add argument.
9240 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
9242 * config/i386/movdirintrin.h: Fix copyright year.
9244 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
9246 * reg-stack.c: Include regs.h.
9247 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
9248 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
9249 FIRST_STACK_REG, not DFmode.
9250 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
9251 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
9252 (change stack): Default register mode to the reg_raw_mode of
9253 FIRST_STACK_REG, not DFmode.
9254 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
9255 (*swapxf): Rename from swapxf.
9257 2018-09-14 Carl Love <cel@us.ibm.com>
9259 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
9260 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
9262 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
9265 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
9268 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
9271 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
9273 2018-09-14 Jason Merrill <jason@redhat.com>
9275 Fix --enable-gather-detailed-mem-stats.
9276 * hash-table.c (hash_table_usage): Change from variable to function.
9277 * hash-table.h: Adjust.
9278 * Makefile.in: Add missing dependencies on hash-table.h.
9280 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9282 PR tree-optimization/87259
9284 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
9285 execute_cse_reciprocals_1 has tried transforming.
9287 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
9289 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
9290 VR_VARYING for PLUS/MINUS_EXPR.
9292 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
9294 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
9297 2018-09-14 Richard Biener <rguenther@suse.de>
9300 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
9301 bits for the merged partition.
9303 2018-09-13 Martin Sebor <msebor@redhat.com>
9304 Bernd Edlinger <bernd.edlinger@hotmail.de>
9306 * builtins.h (c_srlen): Add argument.
9307 * builtins.c (warn_string_no_nul): New function.
9308 (c_strlen): Add argument and use it. Update recursive calls.
9309 Pass DECL argument to string_constant to get info on non
9310 terminated strings. Update *NONSTR as needed.
9311 (fold_builtin_strlen): Add argument to calls to c_strlen.
9312 Warn for unterminated arrays.
9313 (warn_string_no_null): Add prototype.
9314 * expr.c (string_constant): Update arguments. Update recursive
9315 calls appropriately. Detect missing NUL terminator and outermost
9316 declaration its missing in.
9317 Improve checks for arrays with nonzero lower bound or elements
9318 that are not a single byte. Simplify offset computation.
9319 Simplify checks for non-NUL terminated strings.
9320 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
9321 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
9323 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
9325 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
9327 * fold-const.c (c_getstr): Fix function comment. Remove unused third
9328 argument. Fix range checks.
9329 * fold-const.h (c_getstr): Adjust protoype.
9330 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
9331 string is constant but contains no NUL byte.
9333 * expr.c (string_constant): Adjust function comment.
9334 Remove bogus check for zero termination.
9336 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
9338 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
9339 (get_constant_size): Don't make STRING_CSTs larger than they are.
9340 (check_string_literal): New check function for STRING_CSTs.
9341 (output_constant): Use it.
9343 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
9346 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
9348 2018-09-13 Richard Biener <rguenther@suse.de>
9350 PR tree-optimization/87263
9351 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
9352 (struct unwind_state): Add max_rpo field.
9353 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
9354 Compute max_rpo, the max RPO number a block can be backwards reached
9355 from. Re-write non-iterating mode to a RPO ordered worklist approach,
9356 separating it from the iterating mode.
9358 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
9360 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
9361 (rfs_decision): New scheduling decision.
9363 2018-09-13 Richard Biener <rguenther@suse.de>
9366 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
9367 (vn_nary_op_insert_pieces_predicated): Do not write useless
9368 valid_dominated_by_p entry outside of the allocated storage.
9370 2018-09-13 Omar Sandoval <osandov@osandov.com>
9371 Tom de Vries <tdevries@suse.de>
9374 * dwarf2out.c (is_c): New function.
9375 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
9377 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
9380 * config/aarch64/aarch64.md (*aarch64_bfxil):
9382 * config/aarch64/constraints.md (Ulc): Define.
9383 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
9385 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
9388 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
9390 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
9391 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
9392 aarch64_layout_frame call.
9393 (aarch64_expand_epilogue): Likewise.
9394 (aarch64_initial_elimination_offset): Likewise.
9395 (aarch64_get_separate_components): Likewise.
9396 (aarch64_use_return_insn_p): Likewise.
9397 (aarch64_layout_frame): Remove unneeded check.
9399 2018-09-13 Jakub Jelinek <jakub@redhat.com>
9401 * configure.ac: Only append
9402 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
9403 gcc_config_arguments if it was never reconfigured or last reconfigure
9404 was with different arguments.
9405 * configure: Regenerated.
9407 2018-09-13 Jakub Jelinek <jakub@redhat.com>
9408 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9411 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
9412 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
9414 2018-09-13 Jakub Jelinek <jakub@redhat.com>
9416 PR tree-optimization/87287
9417 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
9418 X % C == 0 to X % (unsigned) C == 0 optimization to ...
9419 * match.pd (X % C == 0): ... here. New optimization.
9421 2018-09-12 Jakub Jelinek <jakub@redhat.com>
9424 * expr.h (maybe_optimize_mod_cmp): Declare.
9425 * expr.c (mod_inv): New function.
9426 (maybe_optimize_mod_cmp): New function.
9427 (do_store_flag): Use it.
9428 * cfgexpand.c (expand_gimple_cond): Likewise.
9430 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
9431 Julian Brown <julian@codesourcery.com>
9434 * gimplify.c (gimplify_scan_omp_clauses): Set
9435 target_firstprivatize_array_bases in OpenACC parallel and kernels
9436 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
9437 OpenACC data regions.
9439 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
9441 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
9442 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
9444 2018-09-12 Richard Biener <rguenther@suse.de>
9446 PR tree-optimization/87280
9447 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
9448 edge but unreachable target.
9449 (do_rpo_vn): For conservatively handling a PHI only mark
9450 the backedge executable but not the block reachable.
9452 2018-09-12 Richard Biener <rguenther@suse.de>
9454 PR tree-optimization/87266
9455 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
9458 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
9460 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
9462 ("trunc<BFP:mode><DFP_ALL:mode>2")
9463 ("trunc<DFP_ALL:mode><BFP:mode>2")
9464 ("extend<BFP:mode><DFP_ALL:mode>2")
9465 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
9466 according to the target operand type.
9468 2018-09-12 Jakub Jelinek <jakub@redhat.com>
9469 Andreas Krebbel <krebbel@linux.ibm.com>
9471 PR tree-optimization/86844
9472 * gimple-ssa-store-merging.c
9473 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
9474 there are any overlapping stores in between them, make sure they are
9475 also coalesced or we give up completely.
9477 2018-09-12 Jakub Jelinek <jakub@redhat.com>
9480 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
9481 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
9483 2018-09-12 Tom de Vries <tdevries@suse.de>
9485 * common.opt (gdescribe-dies): Add option.
9486 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
9487 attribute for artifical and nameless decls.
9488 (dwarf2out_register_external_die): Add description attribute to
9489 external reference die.
9490 (add_desc_attribute): New functions.
9491 (gen_subprogram_die): Add description attribute to
9492 DW_TAG_call_site_parameter.
9493 * tree-pretty-print.c (print_generic_expr_to_str): New function.
9494 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
9495 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
9497 (@item -gdescribe-dies): Add.
9499 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
9501 * tree-vrp.c (vrp_shift_undefined_p): Remove.
9502 (extract_range_from_binary_expr_1: Call
9503 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
9504 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
9507 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
9509 * gimple-ssa-warn-alloca.c
9510 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
9511 field for ALLOCA_BOUND_*_LARGE.
9513 2018-09-11 Nathan Sidwell <nathan@acm.org>
9515 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
9517 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
9519 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
9520 for clobbers. Remove obsolete comment.
9522 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
9524 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
9525 mpxchk, mpxld and mpxst types.
9526 (define_attr length_immediate): Remove all processing of mpx types.
9527 (define_attr prefix_0f): Ditto.
9528 (define_attr memory): Ditto.
9530 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
9532 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
9533 (log<mode>2): Change operand 1 predicate to general_operand.
9534 Extend operand 1 to XFmode and generate logxf3 insn.
9535 (log10<mode>2): Change operand 1 predicate to general_operand.
9536 Extend operand 1 to XFmode and generate log10xf3 insn.
9537 (log2<mode>2): Change operand 1 predicate to general_operand.
9538 Extend operand 1 to XFmode and generate log2xf3 insn.
9539 (fyl2xp1_extend<mode>xf3_i387): Remove.
9540 (log1p<mode>2): Change operand 1 predicate to general_operand.
9541 Extend operand 1 to XFmode and generate log1pxf3 insn.
9542 (fxtract_extend<mode>xf3_i387): Remove.
9543 (logb<mode>2): Change operand 1 predicate to general_operand.
9544 Extend operand 1 to XFmode and generate logbxf3 insn.
9545 (ilogb<mode>2): Change operand 1 predicate to general_operand.
9546 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
9547 (significand<mode>2): Change operand 1 predicate to general_operand.
9548 Extend operand 1 to XFmode and generate significandxf3 insn.
9550 2018-09-11 Nathan Sidwell <nathan@acm.org>
9552 * gcc.c (perror_with_name, pfatal_with_name): Delete.
9553 (load_specs): Use fatal_error.
9554 (DELETE_IF_ORDINARY, process_command): Use error.
9555 (execute, run_attempt): Use fatal_error.
9557 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
9559 * diagnostic-core.h (sorry_at): New prototype.
9560 * diagnostic.c (sorry_at): New function.
9562 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
9564 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
9565 by zero as VR_UNDEFINED.
9567 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
9569 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
9570 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
9571 (<sincos>mode2): New expander.
9572 (sincos_extend<mode>xf3_i387): Remove insn pattern.
9573 (sincos -> sin, cos splitters): Remove splitter patterns.
9574 (sincos<mode>3): Change operand 2 predicate to general_operand.
9575 Extend operand 2 to XFmode and generate sincosxf3 insn.
9576 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
9577 Change operand 3 predicate to const1_operand.
9578 (fptan_extend<mode>xf4_i387): Remove insn pattern.
9579 (tanxf2): Update operands in the call to fptanxf4_i387.
9580 (tan<mode>2): Change operand 1 predicate to general_operand.
9581 Extend operand 1 to XFmode and generate tanxf3 insn.
9582 (atan2xf3): Rename from *fpatanxf3_i387.
9583 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
9584 (atan2xf3): Remove expander.
9585 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
9586 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
9587 (atan<mode>2): Change operand 1 predicate to general_operand.
9588 Extend operand 1 to XFmode and generate atanxf3 insn.
9590 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
9592 * config/i386/i386.md (x87/SSE constant load splitter): Use
9593 memory_operand instead of nonimmediate_operand for input operand
9596 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
9598 * config/i386/i386.md (float partial SSE register stall splitter): Move
9599 splitter near its instruction pattern.
9600 (float_extend partial SSE register stall splitter): Ditto.
9601 (float_truncate partial SSE register stall splitter): Ditto.
9603 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
9606 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9607 to speculation_safe_value_not_needed.
9610 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
9611 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
9612 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
9613 leaf_function_p, instead use has_hard_reg_initial_val.
9615 2018-09-09 Nathan Sidwell <nathan@acm.org>
9617 * gcc.h (pfatal_with_name): Don't declare here.
9618 * gcc.c (pfatal_with_name): Make static.
9620 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
9622 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
9625 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
9627 PR rtl-optimization/85458
9628 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
9629 priority hook to reduce the priority of EXPR.
9631 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
9633 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
9634 DImode for x87 on 32bit targets. Conditionally disable x87 modes
9635 with X87_ENABLE_FLOAT. Remove preparation code.
9636 (*float<SWI48:mode><MODEF:mode>2): Rename from
9637 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
9638 math using "enabled" attribute.
9639 (*floatdi<MODEF:mode>2_i387): Rename from
9640 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
9641 enable for 32bit targets only.
9642 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
9644 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
9645 as operand 1 predicate. Rewrite as define_insn_and_split.
9646 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
9648 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
9650 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
9651 to fallthru to FLOAT case.
9653 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
9656 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
9657 around folding of vec_sl to handle out of range shift values.
9659 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
9661 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
9662 Update callers to gen_fix_trunc<mode>_i387_fisttp
9663 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
9664 nonimmediate_operand.
9665 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
9666 and corresponding splitters.
9667 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
9668 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
9669 (fix_truncdi_i387_with_temp): Remove insn pattern
9670 and corresponding splitters.
9671 (fix_trunc<mode>_i387): Change operand 0 predicate to
9672 nonimmediate_operand.
9673 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
9674 and corresponding splitters.
9675 (*fistdi2_1): Remove.
9677 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
9678 (lrintxfdi2): Remove expander. Reimplement as define_insn.
9679 (*fist<mode>2_1): Remove.
9680 (fist<mode>2): Ditto.
9681 (fist<mode>2_with_temp): Remove insn pattern and corresponding
9683 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
9684 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
9685 (fistdi2_<rounding>): Change operand 0 predicate to
9686 nonimmediate_operand.
9687 (fistdi2_<rounding>_with_temp): Remove insn pattern
9688 and corresponding splitters.
9689 (fist<mode>2_<rounding>): Change operand 0 predicate to
9690 nonimmediate_operand.
9691 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
9692 and corresponding splitters.
9694 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
9696 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
9698 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
9701 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
9703 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9704 early gimple folding of vec_splat().
9705 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
9706 * gimple-fold.h: Add an extern define for tree_vec_extract().
9708 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
9710 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
9711 wrappers around TREE_TYPE comparisons.
9713 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9716 * config/s390/predicates.md: Add nonsym_memory_operand.
9717 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
9718 contains a SYMBOL_REF, load it into an intermediate pseudo.
9719 (s390_emit_compare_and_swap): Legitimize operand.
9720 * config/s390/s390.md: Use the new nonsym_memory_operand
9721 with UNSPECV_CAS patterns.
9723 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9726 * config/s390/s390-passes.def: New file.
9727 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
9729 (make_pass_s390_early_mach): Add declaration.
9730 * config/s390/s390.c (make_pass_s390_early_mach):
9731 (s390_option_override): Remove dynamic registration.
9732 * config/s390/t-s390: Add s390-passes.def.
9734 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9736 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9737 Remove UNSPEC_LTREL_BASE check.
9738 (annotate_constant_pool_refs): Likewise.
9739 (find_constant_pool_ref): Likewise.
9740 (find_ltrel_base): Removed.
9741 (replace_ltrel_base): Removed.
9742 (s390_mainpool_finish): Remove replace_ltrel_base call.
9743 (s390_chunkify_start): Remove pending LTREL_BASE logic.
9744 (s390_chunkify_finish): Remove replace_ltrel_base call.
9745 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
9747 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
9750 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9751 to speculation_safe_value_not_needed.
9753 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
9754 Bernd Schmidt <bernds_cb1@t-online.de>
9756 * config/nvptx/nvptx-opts.h: New file.
9757 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
9758 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
9760 (TARGET_SM35): New macro.
9761 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
9763 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
9765 (misa=): New option.
9766 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
9768 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
9770 * config/i386/i386.md (truncdfsf2): Remove expander.
9771 (truncdfsf2_with_temp): Ditto.
9772 (truncxf<mode>2): Ditto.
9773 (*truncdfsf_fast_mixed): Remove insn pattern.
9774 (*truncdfsf_fast_i387): Ditto.
9775 (*truncdfsf_mixed): Ditto.
9776 (*truncdfsf_i387): Ditto.
9777 (*truncdfsf2_i387_1): Ditto.
9778 (*truncxfsf2_mixed): Ditto.
9779 (*truncxfdf2_mixed): Ditto.
9780 (*truncxf<mode>2_i387_noop): Ditto. Update callers
9781 to call gen_truncxf<mode>2 instead.
9782 (*truncxf<mode>2_i387): Remove.
9783 (reg->reg splitters): Remove splitter pattern.
9784 (reg->mem splitters): Ditto.
9786 (truncdfsf2): New insn pattern.
9787 (truncxf<mode>2): Ditto.
9789 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9791 * tree-ssa-math-opts.c (is_mult_by): New function.
9792 (is_square_of): Use the above.
9793 (optimize_recip_sqrt): New function.
9794 (pass_cse_reciprocals::execute): Use the above.
9796 2018-09-05 Richard Biener <rguenther@suse.de>
9799 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
9800 to zero-init the emplaced vec.
9802 2018-09-05 Martin Liska <mliska@suse.cz>
9804 PR tree-optimization/87205
9805 * tree-switch-conversion.c (pass_lower_switch::execute):
9806 Group cases for switch statements.
9808 2018-09-05 Richard Biener <rguenther@suse.de>
9810 PR tree-optimization/87217
9811 * tree-ssa-sccvn.c (vuse_valueize): New.
9812 (vn_reference_lookup_pieces): Use it.
9813 (vn_reference_lookup): Likewise.
9815 2018-09-05 Nathan Sidwell <nathan@acm.org>
9818 * stor-layout.c (place_field): Scan forwards to check last
9819 bitfield when ms_bitfield_placement is in effect.
9821 2018-09-05 Richard Biener <rguenther@suse.de>
9824 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
9827 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
9828 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
9830 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
9831 * config.gcc (extra_objs): Build it.
9832 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
9834 * config/aarch64/aarch64-passes.def
9835 (pass_tag_collision_avoidance): New pass.
9836 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
9837 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
9838 (aarch64_classify_address): Remove static qualifier.
9839 (aarch64_address_info, aarch64_address_type): Move to...
9840 * config/aarch64/aarch64-protos.h: ... here.
9841 (make_pass_tag_collision_avoidance): New function.
9842 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
9845 2018-09-05 Martin Liska <mliska@suse.cz>
9847 * doc/gcov.texi: Update documentation of humar
9849 * gcov.c (format_count): Print one decimal place, it provides
9850 more fine number of situations like '1G' vs. '1.4G'.
9852 2018-09-05 Martin Liska <mliska@suse.cz>
9855 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
9856 * optc-gen.awk: Allow 'Var' for Deprecated options in order
9857 to generate a MASK value.
9859 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
9862 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
9863 if frame pointer isn't used.
9864 (compute_frame_pointer_to_fb_displacement): Likewise.
9866 2018-09-04 Jakub Jelinek <jakub@redhat.com>
9869 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
9870 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
9871 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
9872 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
9873 and OPTION_MASK_ISA_XSAVEC_UNSET.
9875 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
9877 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
9878 XOR operations in NAND case.
9880 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
9882 * wide-int-range.cc (wide_int_range_convert): New.
9883 * wide-int-range.h (wide_int_range_convert): New.
9884 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
9885 code into wide_int_range_convert.
9886 (extract_range_into_wide_ints): Do not munge anti range constants
9887 into the entire domain. Just return the range back.
9889 2018-09-04 Martin Liska <mliska@suse.cz>
9891 * genmatch.c (output_line_directive): Add new argument
9893 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
9895 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
9897 * doc/invoke.texi (Option Summary): Add whitespace.
9899 * doc/invoke.texi (Option Summary): Add -Waligned-new.
9901 2018-09-04 Richard Biener <rguenther@suse.de>
9903 PR tree-optimization/87211
9904 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
9905 backedge value we're supposed to treat as VARYING also number
9906 the PHI to VARYING in case it got a different value-number already.
9908 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
9910 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
9911 (extract_range_from_binary_expr_1): Do not call
9912 vrp_can_optimize_bit_op.
9913 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
9915 (wide_int_range_get_mask_and_bounds): New.
9916 (wide_int_range_optimize_bit_op): New.
9917 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
9918 (wide_int_range_bit_and): Same.
9919 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
9920 (wide_int_range_optimize_bit_op): New.
9921 (wide_int_range_get_mask_and_bounds): New.
9923 2018-09-04 Richard Biener <rguenther@suse.de>
9925 PR tree-optimization/87176
9926 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
9927 variable. When value-numbering a virtual PHI node make sure
9928 to not value-number to the backedge value.
9930 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
9932 * doc/extend.texi (Long Long, Hex Floats): Document support for
9933 long long and hex floats in more recent versions of ISO C++.
9935 2018-09-03 Richard Biener <rguenther@suse.de>
9937 PR tree-optimization/87177
9938 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
9941 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9943 * bb-reorder.c (edge_order): Convert to C-qsort-style
9944 tri-state comparator.
9945 (reorder_basic_blocks_simple): Change std::stable_sort to
9948 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9950 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
9951 tri-state comparator.
9952 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
9954 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9956 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
9957 (mergesort): ... here as maximum count for using netsort.
9958 (gcc_qsort): Set nlim to 3 if stable sort is requested.
9959 (gcc_stablesort): New.
9960 * system.h (gcc_stablesort): Declare.
9962 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9964 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
9965 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
9966 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
9968 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
9970 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
9971 lxsdx and stxsdx alternatives.
9972 (*mov<mode>_hardfloat64): Ditto.
9973 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
9975 2018-09-03 Richard Biener <rguenther@suse.de>
9977 PR tree-optimization/87200
9978 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
9981 2018-09-03 Martin Liska <mliska@suse.cz>
9983 PR tree-optimization/87201
9984 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9985 Fix parenthesis in an expression.
9987 2018-09-03 Richard Biener <rguenther@suse.de>
9989 PR tree-optimization/87197
9990 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
9991 visited. CSE the VN_INFO hashtable lookup.
9993 PR tree-optimization/87169
9994 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
9995 iterating make sure there's no extra backedges from irreducible
9996 regions feeding the header. Mark the destination block
9999 2018-09-03 Martin Liska <mliska@suse.cz>
10002 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
10003 * common/common-targhooks.c (default_get_valid_option_values):
10005 * common/common-targhooks.h (default_get_valid_option_values):
10007 * common/config/i386/i386-common.c: Move processor_target_table
10009 (ix86_get_valid_option_values): New function.
10010 (TARGET_GET_VALID_OPTION_VALUES): New macro.
10011 * config/i386/i386.c (struct ptt): Move to i386-common.c.
10012 (PTA_*): Move all defined masks into i386-common.c.
10013 (ix86_function_specific_restore): Use new processor_cost_table.
10014 * config/i386/i386.h (struct ptt): Moved from i386.c.
10015 (struct pta): Likewise.
10016 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
10017 * doc/tm.texi.in: Likewise.
10018 * opt-suggestions.c (option_proposer::suggest_option):
10019 Pass prefix to build_option_suggestions.
10020 (option_proposer::get_completions): Likewise.
10021 (option_proposer::build_option_suggestions): Use the new target
10023 * opts.c (struct option_help_tuple): New struct.
10024 (print_filtered_help): Use the new target hook.
10026 2018-09-03 Martin Liska <mliska@suse.cz>
10028 PR middle-end/59521
10029 * predict.c (set_even_probabilities): Add likely_edges
10030 argument and handle cases where we have precisely one
10032 (combine_predictions_for_bb): Catch also likely_edges.
10033 (tree_predict_by_opcode): Handle gswitch statements.
10034 * tree-cfg.h (find_case_label_for_value): New declaration.
10035 (find_taken_edge_switch_expr): Likewise.
10036 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
10037 Find pivot in decision tree based on probabily, not by number of
10040 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
10042 * doc/standards.texi (Standards): Update Objective-C reference.
10044 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
10046 * doc/install.texi (Prerequisites): Update link for MPC.
10048 2018-09-01 Michael Matz <matz@suse.de>
10050 PR tree-optimization/87074
10051 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
10052 PHIs for outer-loop uses.
10054 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
10056 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
10057 * doc/invoke.texi (C Dialect Options): Ditto.
10059 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
10061 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
10063 2018-08-31 Richard Biener <rguenther@suse.de>
10065 PR tree-optimization/87168
10066 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
10067 (rpo_elim::eliminate_avail): When OP was not visited it must
10070 2018-08-31 David Malcolm <dmalcolm@redhat.com>
10072 * tree-vrp.c (copy_value_range): Convert param "from" from
10073 "value_range *" to "const value_range *".
10074 (range_is_null): Likewise for param "vr".
10075 (range_int_cst_p): Likewise.
10076 (range_int_cst_singleton_p): Likewise.
10077 (symbolic_range_p): Likewise.
10078 (value_ranges_intersect_p): Likewise for both params.
10079 (value_range_nonnegative_p): Likewise for param "vr".
10080 (value_range_constant_singleton): Likewise.
10081 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
10082 (extract_range_into_wide_ints): Likewise for param "vr".
10083 (extract_range_from_multiplicative_op): Likewise for params "vr0"
10085 (vrp_can_optimize_bit_op): Likewise.
10086 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
10088 (extract_range_from_unary_expr): Likewise.
10089 (debug_value_range): Likewise for param "vr".
10090 (value_range::dump): Add "const" qualifier.
10091 (vrp_prop::check_array_ref): Convert local "vr" from
10092 "value_range *" to "const value_range *".
10093 (vrp_prop::check_mem_ref): Likewise.
10094 (vrp_prop::visit_stmt): Likewise for local "old_vr".
10095 (vrp_intersect_ranges_1): Likewise for param "vr_1".
10096 (vrp_intersect_ranges): Likewise.
10097 (simplify_stmt_for_jump_threading): Likewise for local "vr".
10098 (vrp_prop::vrp_finalize): Likewise.
10099 * tree-vrp.h (value_range::dump): Add "const" qualifier.
10100 (vrp_intersect_ranges): Add "const" qualifier to params as above.
10101 (extract_range_from_unary_expr): Likewise.
10102 (value_range_constant_singleton): Likewise.
10103 (symbolic_range_p): Likewise.
10104 (copy_value_range): Likewise.
10105 (extract_range_from_binary_expr_1): Likewise.
10106 (range_int_cst_p): Likewise.
10107 (vrp_set_zero_nonzero_bits): Likewise.
10108 (range_int_cst_singleton_p): Likewise.
10110 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
10112 * config/aarch64/arm_neon.h (vabsd_s64): New.
10113 (vnegd_s64): Likewise.
10115 2018-08-31 Martin Jambor <mjambor@suse.cz>
10117 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
10119 2018-08-31 Martin Liska <mliska@suse.cz>
10121 * ipa-icf.c (sem_item::add_type): Use
10122 sem_item::m_type_hash_cache.
10123 * ipa-icf.h: Move the cache from sem_item_optimizer
10126 2018-08-31 Nathan Sidwell <nathan@acm.org>
10128 * doc/extend.texi (Backwards Compatibility): Remove implicit
10129 extern C leeway of () being (...).
10131 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10133 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
10135 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
10139 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
10141 2018-08-31 Jakub Jelinek <jakub@redhat.com>
10143 PR middle-end/87138
10144 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
10145 gen_int_mode. Formatting fixes.
10147 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
10149 * target.def (custom_function_descriptors): Improve documentation.
10150 * doc/tm.texi.in (Trampolines): Expand discussion of function
10151 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
10152 beginning of the section.
10153 * doc/tm.texi: Regenerated.
10155 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
10157 * cfg.h (class auto_edge_flag): Spell out the template-id of the
10158 base class in the initializer list. This is a workaround for
10159 building with older GCC.
10160 (class auto_bb_flag): Likewise.
10162 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
10164 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
10165 (altivec_vcmpequ<VI_char>_p): Remove star.
10166 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
10168 (expand_strncmp_vec_sequence): New function.
10169 (emit_final_str_compare_vec): New function.
10170 (expand_strn_compare): Add support for vector strncmp.
10171 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
10172 length specification to bytes.
10173 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
10174 (vcmpnezb_p): New pattern.
10175 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
10176 for option -mstring-compare-inline-limit.
10178 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
10180 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
10181 (PTA_SKYLAKE): Add PTA_AES.
10182 (PTA_GOLDMONT): Likewise.
10184 2018-08-29 Jan Hubicka <jh@suse.cz>
10187 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
10188 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
10190 2018-08-29 Jan Hubicka <jh@suse.cz>
10192 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
10194 (hash_tree): Do not visit TYPE_STUB_DECL.
10195 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
10196 stream TYPE_STUB_DECL.
10197 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
10198 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
10199 after free_lang_data.
10200 (type_in_anonymous_namespace_p): Likewise.
10202 2018-08-29 Jan Hubicka <jh@suse.cz>
10204 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10205 comment that it has to be even number.
10206 (class sreal): Change m_sig type to int32_t.
10207 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10208 int64_t for temporary calculations.
10209 (sreal_verify_basics): Drop one bit from minimum and maximum.
10211 2018-08-30 Richard Biener <rguenther@suse.de>
10213 PR tree-optimization/87147
10214 * tree-ssa-sccvn.c (SSA_VISITED): New function.
10215 (visit_phi): When the degenerate result is from the backedge and
10216 we didn't visit its definition yet drop to VARYING.
10217 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
10219 2018-08-29 Jan Hubicka <jh@suse.cz>
10221 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
10223 (hash_tree): Likewise.
10225 2018-08-29 Jan Hubicka <jh@suse.cz>
10227 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
10228 and TYPE_NEXT_REF_TO.
10230 2018-08-29 Jan Hubicka <jh@suse.cz>
10232 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10233 comment that it has to be even number.
10234 (class sreal): Change m_sig type to int32_t.
10235 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10236 int64_t for temporary calculations.
10237 (sreal_verify_basics): Drop one bit from minimum and maximum.
10239 2018-08-30 Tamar Christina <tamar.christina@arm.com>
10241 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
10243 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
10245 PR middle-end/86995
10246 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
10247 if to_add is negative.
10249 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
10251 PR middle-end/87053
10252 * builtins.c (c_strlen): Improve range checks.
10254 2018-08-29 Martin Sebor <msebor@redhat.com>
10255 Jeff Law <law@redhat.com>
10257 PR tree-optimization/86714
10258 PR tree-optimization/86711
10259 * builtins.c (c_strlen): Add arguments to call to string_constant.
10260 * expr.c (string_constant): Add argument. Detect missing nul
10261 terminator and outermost declaration it's missing in.
10262 * expr.h (string_constant): Add argument.
10263 * fold-const.c (read_from_constant_string): Add arguments to call to
10265 (c_getstr): Likewise.
10266 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10267 to string_constant.
10268 * tree-ssa-strlen.c (get_stridx): Likewise.
10270 2018-08-29 Jan Hubicka <jh@suse.cz>
10272 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
10273 Do not stream DECL_VINDEX.
10274 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
10275 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
10276 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
10278 2018-08-29 Richard Biener <rguenther@suse.de>
10280 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
10281 virtual operands that are not default defs to honor region
10283 (rpo_vn_valueize): Remove ineffective code here.
10285 2018-08-29 Richard Biener <rguenther@suse.de>
10287 PR tree-optimization/87132
10288 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
10289 when skipping defs reachable over backedges.
10291 2018-08-29 Richard Biener <rguenther@suse.de>
10293 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
10294 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
10295 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
10296 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
10297 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
10298 (vn_reference_lookup_3): Remove use of const_parms.
10299 (free_rpo_vn): Do not free const_parms.
10300 (do_rpo_vn): Do not call init_const_parms.
10301 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
10302 SSA_NAME_POINTS_TO_READONLY_MEMORY.
10303 (call_may_clobber_ref_p_1): Likewise.
10305 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
10308 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
10310 (-ftree-scev-cprop): Document.
10312 2018-08-29 Jan Hubicka <jh@suse.cz>
10314 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
10316 (sreal constructor): Update.
10317 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
10318 sreal:operator/): Update.
10320 2018-08-29 Martin Liska <mliska@suse.cz>
10322 * tree-switch-conversion.c (switch_conversion::expand):
10323 Strenghten assumption about gswitch statements.
10325 2018-08-29 Richard Biener <rguenther@suse.de>
10327 PR tree-optimization/87117
10328 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
10329 re-value-number released SSA VDEFs.
10331 2018-08-29 Richard Biener <rguenther@suse.de>
10333 PR tree-optimization/87126
10334 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
10336 2018-08-28 Jim Wilson <jimw@sifive.com>
10338 * config/riscv/pic.md: Rewrite.
10339 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
10341 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
10342 (SOFTF, default_load, softload, softstore): New.
10344 2018-08-28 Jeff Law <law@redhat.com>
10346 * fold-const.c (fold_binary_loc): Remove recently added assert.
10348 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
10350 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
10351 to OP parmeter of generated function.
10353 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
10355 PR tree-optimization/87009
10356 * match.pd: Add boolean optimizations.
10358 2018-08-28 Martin Sebor <msebor@redhat.com>
10360 PR middle-end/86631
10361 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
10362 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
10363 (pass_walloca::gate): Use it.
10364 (alloca_call_type): Same.
10365 (pass_walloca::execute): Same.
10366 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
10368 2018-08-28 David Malcolm <dmalcolm@redhat.com>
10370 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
10371 GCC_VERSION for usage of "__gcc_dump_printf__" format from
10372 >= 3005 to >= 9000.
10374 2018-08-28 Richard Biener <rguenther@suse.de>
10376 PR tree-optimization/87124
10377 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
10378 constants before looking up avail.
10380 2018-08-28 Jakub Jelinek <jakub@redhat.com>
10382 PR middle-end/87099
10383 * calls.c (maybe_warn_nonstring_arg): Punt early if
10384 warn_stringop_overflow is zero. Don't call get_range_strlen
10385 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
10386 Swap comparison operands to have constants on rhs. Only use
10387 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
10388 increment lenrng[0].
10390 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
10392 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
10393 use of tree_to_shwi. Remove duplicated test for the size being
10394 a whole number of bytes.
10396 2018-08-28 Richard Biener <rguenther@suse.de>
10398 PR tree-optimization/87117
10399 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
10400 Handle removed stmt without LHS (GIMPLE_NOP).
10402 2018-08-28 Richard Biener <rguenther@suse.de>
10404 PR tree-optimization/87117
10405 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
10406 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
10408 2018-08-28 Richard Biener <rguenther@suse.de>
10410 PR tree-optimization/87117
10411 * tree-ssa-pre.c (compute_avail): Do not make expressions
10412 with predicated values available.
10413 (get_expr_value_id): Assert we do not run into predicated value
10416 2018-08-28 Richard Biener <rguenther@suse.de>
10418 PR tree-optimization/87117
10419 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
10420 get virtual operands.
10421 (get_expr_operands): Handle STRING_CST like other decls.
10423 2018-08-28 Martin Liska <mliska@suse.cz>
10425 * tree.h: Update documentation of fndecl_built_in_p
10429 2018-08-27 Jeff Law <law@redhat.com>
10430 PR tree-optimization/87110
10431 * tree-ssa-dse.c (compute_trims): Handle non-constant
10434 2018-08-27 Martin Sebor <msebor@redhat.com>
10436 PR tree-optimization/86914
10437 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
10439 2018-08-27 Martin Sebor <msebor@redhat.com>
10441 PR tree-optimization/87112
10442 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
10443 the type of the bound argument.
10445 2018-08-27 Jeff Law <law@redhat.com>
10447 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
10448 type does not have a TYPE_SIZE_UNIT.
10450 2018-08-27 Steve Ellcey <sellcey@cavium.com>
10452 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
10453 with include of backend.h.
10455 2018-08-27 Richard Biener <rguenther@suse.de>
10457 PR tree-optimization/86927
10458 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
10459 use const cond reduction code.
10461 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
10463 PR tree-optimization/85758
10464 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
10466 2018-08-27 David Malcolm <dmalcolm@redhat.com>
10469 * diagnostic-show-locus.c (class layout_range): Update for
10470 conversion of show_caret_p to a tri-state.
10471 (layout_range::layout_range): Likewise.
10472 (make_range): Likewise.
10473 (layout::maybe_add_location_range): Likewise.
10474 (layout::should_print_annotation_line_p): Don't show annotation
10475 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
10476 (layout::get_state_at_point): Update for conversion of
10477 show_caret_p to a tri-state. Bail out early for
10478 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
10479 underlining or source colorization.
10480 (gcc_rich_location::add_location_if_nearby): Update for conversion
10481 of show_caret_p to a tri-state.
10482 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
10483 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
10485 (selftest::test_one_liner_labels): Likewise.
10486 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
10487 conversion of show_caret_p to a tri-state.
10488 * pretty-print.c (text_info::set_location): Likewise.
10489 * pretty-print.h (text_info::set_location): Likewise.
10490 * substring-locations.c (format_warning_n_va): Likewise.
10491 * tree-diagnostic.c (default_tree_printer): Likewise.
10492 * tree-pretty-print.c (newline_and_indent): Likewise.
10494 2018-08-27 David Malcolm <dmalcolm@redhat.com>
10497 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
10498 line above for line-insertion fix-it hints.
10499 (selftest::test_fixit_insert_containing_newline): Update the
10500 expected results, and add a test with line-numbering enabled.
10502 2018-08-27 Martin Liska <mliska@suse.cz>
10505 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
10506 params with DECL_HAS_VALUE_EXPR_P.
10508 2018-08-27 Martin Liska <mliska@suse.cz>
10510 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
10511 selected expansion strategy.
10513 2018-08-27 Martin Liska <mliska@suse.cz>
10515 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
10516 * builtins.c (is_builtin_fn): Likewise.
10517 * attribs.c (diag_attr_exclusions): Use new function
10518 fndecl_built_in_p and remove check for FUNCTION_DECL if
10520 (builtin_mathfn_code): Likewise.
10521 (fold_builtin_expect): Likewise.
10522 (fold_call_expr): Likewise.
10523 (fold_builtin_call_array): Likewise.
10524 (fold_call_stmt): Likewise.
10525 (set_builtin_user_assembler_name): Likewise.
10526 (is_simple_builtin): Likewise.
10527 * calls.c (gimple_alloca_call_p): Likewise.
10528 (maybe_warn_nonstring_arg): Likewise.
10529 * cfgexpand.c (expand_call_stmt): Likewise.
10530 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
10531 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
10532 (cgraph_node::verify_node): Likewise.
10533 * cgraphclones.c (build_function_decl_skip_args): Likewise.
10534 (cgraph_node::create_clone): Likewise.
10535 * config/arm/arm.c (arm_insert_attributes): Likewise.
10536 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
10537 * dse.c (scan_insn): Likewise.
10538 * expr.c (expand_expr_real_1): Likewise.
10539 * fold-const.c (operand_equal_p): Likewise.
10540 (fold_binary_loc): Likewise.
10541 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
10542 * gimple-low.c (lower_stmt): Likewise.
10543 * gimple-pretty-print.c (dump_gimple_call): Likewise.
10544 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
10546 * gimple.c (gimple_build_call_from_tree): Likewise.
10547 (gimple_call_builtin_p): Likewise.
10548 (gimple_call_combined_fn): Likewise.
10549 * gimplify.c (gimplify_call_expr): Likewise.
10550 (gimple_boolify): Likewise.
10551 (gimplify_modify_expr): Likewise.
10552 (gimplify_addr_expr): Likewise.
10553 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
10554 * ipa-cp.c (determine_versionability): Likewise.
10555 * ipa-fnsummary.c (compute_fn_summary): Likewise.
10556 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
10557 * ipa-split.c (visit_bb): Likewise.
10558 (split_function): Likewise.
10559 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10560 * lto-cgraph.c (input_node): Likewise.
10561 * lto-streamer-out.c (write_symbol): Likewise.
10562 * omp-low.c (setjmp_or_longjmp_p): Likewise.
10563 (lower_omp_1): Likewise.
10564 * predict.c (strip_predict_hints): Likewise.
10565 * print-tree.c (print_node): Likewise.
10566 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
10567 * trans-mem.c (is_tm_irrevocable): Likewise.
10568 (is_tm_load): Likewise.
10569 (is_tm_simple_load): Likewise.
10570 (is_tm_store): Likewise.
10571 (is_tm_simple_store): Likewise.
10572 (is_tm_abort): Likewise.
10573 (tm_region_init_1): Likewise.
10574 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
10575 * tree-cfg.c (verify_gimple_call): Likewise.
10576 (move_stmt_r): Likewise.
10577 (stmt_can_terminate_bb_p): Likewise.
10578 * tree-eh.c (lower_eh_constructs_2): Likewise.
10579 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
10580 * tree-inline.c (remap_gimple_stmt): Likewise.
10581 (copy_bb): Likewise.
10582 (estimate_num_insns): Likewise.
10583 (fold_marked_statements): Likewise.
10584 * tree-sra.c (scan_function): Likewise.
10585 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
10586 (optimize_stack_restore): Likewise.
10587 (pass_fold_builtins::execute): Likewise.
10588 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
10589 (mark_all_reaching_defs_necessary_1): Likewise.
10590 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
10591 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10592 (pass_forwprop::execute): Likewise.
10593 * tree-ssa-loop-im.c (stmt_cost): Likewise.
10594 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
10595 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
10596 * tree-ssa-strlen.c (get_string_length): Likewise.
10597 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
10598 (find_func_aliases_for_call): Likewise.
10599 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
10600 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
10601 * tree-tailcall.c (find_tail_calls): Likewise.
10602 * tree.c (need_assembler_name_p): Likewise.
10603 (free_lang_data_in_decl): Likewise.
10604 (get_call_combined_fn): Likewise.
10605 * ubsan.c (is_ubsan_builtin_p): Likewise.
10606 * varasm.c (incorporeal_function_p): Likewise.
10607 * tree.h (DECL_BUILT_IN): Remove and replace with
10609 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
10610 (fndecl_built_in_p): New.
10612 2018-08-27 Martin Liska <mliska@suse.cz>
10614 PR tree-optimization/86847
10615 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
10616 Dump also subtree probability.
10617 (switch_decision_tree::do_jump_if_equal): New function.
10618 (switch_decision_tree::emit_case_nodes): Handle special
10619 situations in balanced tree that can be emitted much simpler.
10620 Fix calculation of probabilities that happen in tree expansion.
10621 * tree-switch-conversion.h (struct cluster): Add
10623 (struct simple_cluster): Likewise.
10624 (struct case_tree_node): Add new function has_child.
10625 (do_jump_if_equal): New.
10627 2018-08-27 Martin Liska <mliska@suse.cz>
10629 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
10630 Add new argument to bit_test_cluster constructor.
10631 (bit_test_cluster::emit): Set bits really number of values
10633 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
10634 probability argument.
10635 * tree-switch-conversion.h (struct bit_test_cluster):
10636 Add m_handles_entire_switch.
10638 2018-08-27 Martin Liska <mliska@suse.cz>
10640 PR tree-optimization/86702
10641 * tree-switch-conversion.c (jump_table_cluster::emit):
10642 Make probabilities even for values in jump table
10643 according to number of cases handled.
10644 (switch_decision_tree::compute_cases_per_edge): Pass
10645 argument to reset_out_edges_aux function.
10646 (switch_decision_tree::analyze_switch_statement): Likewise.
10647 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
10650 2018-08-27 Martin Liska <mliska@suse.cz>
10652 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
10653 cfun argument explicitly.
10654 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
10655 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
10656 function gimple_switch_default_bb.
10657 (convert_switch_statements):
10659 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
10660 * stmt.c (label_to_block_fn): Use label_to_block and pass
10661 cfun argument explicitly and use gimple_switch_label_bb.
10662 (expand_case): Likewise.
10663 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
10664 cfun argument explicitly. Likewise.
10665 (make_edges_bb): Likewise.
10666 (make_cond_expr_edges): Likewise.
10667 (get_cases_for_edge): Likewise.
10668 (make_gimple_switch_edges): Likewise.
10669 (label_to_block_fn): Likewise.
10670 (label_to_block): Likewise.
10671 (make_goto_expr_edges): Likewise.
10672 (make_gimple_asm_edges): Likewise.
10673 (main_block_label): Likewise.
10674 (group_case_labels_stmt): Likewise.
10675 (find_taken_edge_computed_goto): Likewise.
10676 (find_taken_edge_switch_expr): Likewise.
10677 (gimple_verify_flow_info): Likewise.
10678 (gimple_redirect_edge_and_branch): Likewise.
10679 (gimple_switch_label_bb): New function.
10680 (gimple_switch_default_bb): Likewise.
10681 (gimple_switch_edge): Likewise.
10682 (gimple_switch_default_edge): Likewise.
10683 * tree-cfg.h (label_to_block_fn): Remove and replace ...
10684 (label_to_block): ... with this.
10685 (gimple_switch_label_bb): New.
10686 (gimple_switch_default_bb): Likewise.
10687 (gimple_switch_edge): Likewise.
10688 (gimple_switch_default_edge): Likewise.
10689 * tree-cfgcleanup.c (convert_single_case_switch): Use
10690 new gimple functions and pass new argument to label_to_block.
10691 (cleanup_control_flow_bb):
10692 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
10693 cfun argument explicitly.
10694 (make_eh_edges): Likewise.
10695 (redirect_eh_dispatch_edge): Likewise.
10696 (lower_resx): Likewise.
10697 (lower_eh_dispatch): Likewise.
10698 (maybe_remove_unreachable_handlers): Likewise.
10699 (unsplit_eh): Likewise.
10700 (cleanup_empty_eh): Likewise.
10701 (verify_eh_edges): Likewise.
10702 (verify_eh_dispatch_edge): Likewise.
10703 * tree-ssa-dom.c (record_edge_info): Likewise.
10704 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
10705 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
10706 (thread_through_normal_block): Likewise.
10707 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
10708 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
10709 * tree-switch-conversion.c (switch_conversion::collect): Use new
10711 (switch_conversion::check_final_bb): Likewise.
10712 (switch_conversion::gather_default_values): Pass new argument
10714 (switch_conversion::build_constructors): Likewise.
10715 (switch_decision_tree::compute_cases_per_edge): Use new
10716 gimple_switch_edge function.
10717 (switch_decision_tree::analyze_switch_statement): Pass new argument
10719 (switch_decision_tree::try_switch_expansion): Use
10720 gimple_switch_default_edge.
10721 * tree-vrp.c (find_switch_asserts): Pass new argument
10723 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
10724 (vr_values::simplify_switch_using_ranges): Likewise.
10726 2018-08-27 Richard Biener <rguenther@suse.de>
10728 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
10729 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
10731 * tree-ssa-sccvn.h (struct vn_pval): New structure.
10732 (struct vn_nary_op_s): Add unwind_to member. Add
10733 predicated_values flag and put result into a union together
10734 with a linked list of vn_pval.
10735 (struct vn_ssa_aux): Add name member to make maintaining
10736 a map of SSA name to vn_ssa_aux possible. Remove no longer
10737 needed info, dfsnum, low, visited, on_sccstack, use_processed
10738 and range_info_anti_range_p members.
10739 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
10740 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
10742 (vn_valueize): New global.
10743 (vn_context_bb): Likewise.
10744 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
10745 VN_INFO_PTR_INFO): Remove.
10746 * tree-ssa-sccvn.c: ... (rewrite)
10747 (pass_fre::execute): For -O2+ initialize loops and run
10748 RPO VN in optimistic mode (iterating). For -O1 and -Og
10749 run RPO VN in non-optimistic mode.
10750 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
10751 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
10752 * doc/invoke.texi (sccvn-max-scc-size): Remove.
10753 (rpo-vn-max-loop-depth): Document.
10754 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
10755 when valuezing the VUSE signals we walked out of the region.
10756 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
10757 (phi_translate): Set VN context block to use for availability
10759 (compute_avail): Likewise.
10760 (pre_valueize): New function.
10761 (pass_pre::execute): Adjust to the RPO VN API.
10763 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
10764 (propagate_constants_for_unrolling): Remove.
10765 (tree_unroll_loops_completely): Perform value-numbering
10766 on the unrolled bodies loop parent.
10768 2018-08-27 Richard Biener <rguenther@suse.de>
10770 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
10771 for partial antic compute.
10773 2018-08-27 Jakub Jelinek <jakub@redhat.com>
10775 PR rtl-optimization/87065
10776 * combine.c (simplify_if_then_else): Formatting fix.
10777 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
10779 (known_cond): Don't return const_true_rtx for vector modes. Use
10780 CONST0_RTX instead of const0_rtx. Formatting fixes.
10782 2018-08-27 Martin Liska <mliska@suse.cz>
10784 PR gcov-profile/87069
10785 * gcov.c (process_file): Record files already processed
10786 and warn about a file being processed multiple times.
10788 2018-08-27 Martin Liska <mliska@suse.cz>
10791 * config/aarch64/aarch64.c (aarch64_override_options_internal):
10792 Set default values for x_aarch64_*_string strings.
10793 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
10794 prefix. For -mabi do not print '=ABI' in help and use
10795 <option_value> format for -msve-vector-bits and -moverride
10798 2018-08-26 Jeff Law <law@redhat.com>
10800 * config/mips/frame-header-opt.c: Include "backend.h" rather than
10803 2018-08-26 Marek Polacek <polacek@redhat.com>
10805 PR c++/87029, Implement -Wredundant-move.
10806 * doc/invoke.texi: Document -Wredundant-move.
10808 2018-08-25 Martin Sebor <msebor@redhat.com>
10810 PR tree-optimization/87059
10811 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
10812 to the same type as the other.
10813 * fold-const.c (fold_binary_loc): Assert expectation.
10815 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
10817 * config/darwin.c (machopic_legitimize_pic_address): Clean up
10818 extraneous parentheses, dead code section and formatting.
10820 2018-08-24 David Malcolm <dmalcolm@redhat.com>
10823 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
10824 wide enough for jumps in the line-numbering to be visible.
10825 (layout::print_gap_in_line_numbering): New member function.
10826 (layout::calculate_line_spans): When using line numbering, merge
10827 line spans that are only 1 line apart.
10828 (diagnostic_show_locus): When printing line numbers, show gaps in
10829 line numbering directly, rather than printing headers.
10830 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
10831 line-numbering with multiple line spans.
10832 (selftest::test_fixit_insert_containing_newline_2): Add test of
10833 line-numbering, in which the spans are close enough to be merged.
10835 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
10837 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
10838 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
10839 * tree-vrp.c (range_is_nonnull): Remove.
10840 (range_includes_zero_p): Accept value_range instead of min/max.
10841 (extract_range_from_binary_expr_1): Do not early bail on
10843 Use range_includes_zero_p instead of range_is_nonnull.
10844 (extract_range_from_unary_expr): Use range_includes_zero_p instead
10845 of range_is_nonnull.
10846 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
10847 special case VR_ANTI_RANGE.
10848 (vrp_finalize): Same.
10849 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
10850 instead of min/max.
10851 (range_is_nonnull): Remove.
10852 * vr-values.c (vrp_stmt_computes_nonzero): Use
10853 range_includes_zero_p instead of range_is_nonnull.
10854 (extract_range_basic): Pass value_range to range_includes_zero_p
10855 instead of range_is_nonnull.
10857 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
10859 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
10860 * emit-rtl.h (rtl_data): Remove return_bnd.
10861 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
10862 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
10863 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
10864 (POINTER_BOUNDS_MODE): Remove definition.
10865 (make_pointer_bounds_mode): Remove.
10866 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
10867 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
10868 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
10869 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
10870 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
10871 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
10872 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
10874 * config/i386/i386-modes.def (BND32, BND64): Remove.
10875 * config/i386/i386.c (dbx_register_map): Remove bound registers.
10876 (dbx64_register_map): Ditto.
10877 (svr4_dbx_register_map): Ditto.
10878 (indirect_thunk_bnd_needed): Remove.
10879 (indirect_thunks_bnd_used): Ditto.
10880 (indirect_return_bnd_needed): Ditto.
10881 (indirect_return_via_cx_bnd): Ditto.
10882 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
10883 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
10884 (output_indirect_thunk): Ditto. Remove need_prefix argument.
10885 (output_indirect_thunk_function): Remove handling of
10886 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
10887 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
10888 (ix86_save_reg): Remove handling of crtl->return_bnd.
10889 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
10890 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
10891 and UNSPEC_BNDLX_ADDR.
10892 (ix86_output_indirect_branch_via_reg): Remove handling of
10893 indirect_thunk_prefix_bnd.
10894 (ix86_output_indirect_branch_via_push): Ditto.
10895 (ix86_output_function_return): Ditto.
10896 (ix86_output_indirect_function_return): Ditto.
10897 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
10898 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
10899 (CALL_USED_REGISTERS): Ditto.
10900 (REG_ALLOC_ORDER): Update for removal of bound registers.
10901 (HI_REGISTER_NAMES): Ditto.
10902 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
10903 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
10904 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
10905 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
10906 (FIRST_PSEUDO_REG): Update.
10907 (BND): Remove mode iterator.
10908 * config/i386/predicates.md (bnd_mem_operator): Remove.
10910 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
10912 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
10915 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
10917 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
10918 the case in which the permute needs only a single element and
10919 repeats for every vector of the result. Extend that case to
10920 handle variable-length vectors.
10921 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10923 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
10926 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
10927 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
10929 2018-08-24 Richard Biener <rguenther@suse.de>
10931 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
10932 bb_flags_allocated members.
10933 (auto_flag): New RAII class for allocating flags.
10934 (auto_edge_flag): New RAII class for allocating edge flags.
10935 (auto_bb_flag): New RAII class for allocating bb flags.
10936 * cfgloop.c (verify_loop_structure): Allocate temporary edge
10938 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
10939 in favor of temporarily allocated BB flag.
10940 * hsa-brig.c: Re-order includes.
10941 * hsa-dump.c: Likewise.
10942 * hsa-regalloc.c: Likewise.
10943 * print-rtl.c: Likewise.
10944 * profile-count.c: Likewise.
10946 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
10949 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
10952 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
10955 * wide-int-range.cc (wide_int_range_div): Do not ignore result
10956 from wide_int_range_multiplicative_op.
10958 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10960 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
10963 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
10965 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
10968 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
10970 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
10971 full GENERIC expression used for replacement.
10973 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
10975 * tree-vrp.c (abs_extent_range): Remove.
10976 (extract_range_into_wide_ints): Pass wide ints by reference.
10977 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
10978 Pass wide ints by reference in all calls to
10979 extract_range_into_wide_ints.
10980 * wide-int-range.cc (wide_int_range_div): New.
10981 * wide-int-range.h (wide_int_range_div): New.
10982 (wide_int_range_includes_zero_p): New.
10983 (wide_int_range_zero_p): New.
10985 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
10987 * config/aarch64/aarch64.md (arches): New enum.
10988 (arch): New enum attr.
10989 (arch_enabled): New attr.
10990 (enabled): Now uses arch_enabled only.
10991 (simd, sve, fp16): Removed attribute.
10992 (fp): Attr now defined in terms of 'arch'.
10993 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
10994 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
10995 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
10996 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
10997 attributes into 'arch'.
10998 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
10999 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
11000 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
11001 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
11002 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
11003 'simd' attribute into 'arch'.
11004 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
11005 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
11006 Convert use of 'fp' attribute to 'arch'.
11007 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
11008 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
11010 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
11011 (different modes) Merge 'fp' and 'simd' into 'arch'.
11012 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
11013 'simd' into 'arch'.
11015 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
11017 PR rtl-optimization/87026
11018 * expmed.c (canonicalize_comparison): If we can no longer create
11019 pseudoregisters, don't.
11021 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
11024 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
11026 * config/arm/arm.c (speculation_barrier_libfunc): New static
11028 (arm_init_libfuncs): Initialize it.
11029 (arm_emit_speculation_barrier): New function.
11030 * config/arm/arm.md (speculation_barrier): Call
11031 arm_emit_speculation_barrier for architectures that do not have
11033 (speculation_barrier_insn): Only match on Armv7 or later.
11035 2018-08-23 Richard Biener <rguenther@suse.de>
11037 PR middle-end/87024
11038 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
11041 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
11043 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
11044 of single-vector TBLs.
11045 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
11046 one input is given.
11048 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
11051 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
11052 aarch64_evpc_tbl guard.
11054 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
11056 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
11059 2018-08-22 Martin Sebor <msebor@redhat.com>
11061 PR middle-end/87052
11062 * tree-pretty-print.c (pretty_print_string): Add argument.
11063 (dump_generic_node): Call to pretty_print_string with string size.
11065 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
11067 PR rtl-optimization/86771
11068 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
11069 of two SETs into those two SETs, one to be placed at i2, if that SETs
11070 destination is modified between i2 and i3.
11072 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
11074 PR tree-optimization/86725
11075 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
11077 (vect_analyze_scalar_cycles_1): Check it.
11079 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
11081 PR tree-optimization/86725
11082 * tree-vect-loop.c (vect_is_simple_reduction): When treating
11083 an outer loop phi as a double reduction, make sure that the
11084 single user of the phi result is an inner loop phi.
11086 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
11088 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
11089 grouped stores with gaps to a strided group.
11091 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
11093 * tree-vect-stmts.c (get_group_load_store_type)
11094 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
11095 first statement in a group.
11097 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11099 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
11100 the sequence used in gcc/gcc.c.
11102 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11105 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
11108 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11110 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
11111 Darwin10-specific unwinder-shim.
11112 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
11113 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
11114 New to cater for Darwin10 Rosetta.
11116 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11118 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
11119 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
11121 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11126 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
11127 (dwarf2out_switch_text_section): Generate a local label for the
11128 second function sub-section and apply it as the second FDE start
11130 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
11131 second sub-section start.
11133 2018-08-22 Richard Biener <rguenther@suse.de>
11135 PR tree-optimization/86988
11136 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
11138 2018-08-22 Richard Biener <rguenther@suse.de>
11140 PR tree-optimization/86945
11141 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
11143 2018-08-22 Alexandre Oliva <oliva@adacore.com>
11145 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
11146 a comment about how uses of r2 for .sdata2 come about.
11148 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
11150 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
11152 2018-08-21 Marek Polacek <polacek@redhat.com>
11154 PR c++/86981, Implement -Wpessimizing-move.
11155 * doc/invoke.texi: Document -Wpessimizing-move.
11157 2018-08-21 Jan Hubicka <jh@suse.cz>
11159 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
11160 * tree.h (is_redundant_typedef): Remove.
11161 * dwarf2out.c (is_redundant_typedef): Turn into static function.
11163 2018-08-21 Jan Hubicka <jh@suse.cz>
11165 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
11168 2018-08-21 Tamar Christina <tamar.christina@arm.com>
11170 * expmed.c (extract_low_bits): Reject invalid subregs early.
11172 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
11174 PR middle-end/86121
11175 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
11178 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11180 * config/vxworks.h: Guard vxworks_asm_out_constructor and
11181 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
11182 * config/vxworks.c: Likewise.
11184 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11186 * config/vxworks.c: Set targetm.have_ctors_dtors
11187 if HAVE_INITFINI_ARRAY_SUPPORT.
11188 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
11189 if HAVE_INITFINI_ARRAY_SUPPORT.
11191 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11193 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
11194 default search path for VxWorks < 7.
11196 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
11198 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
11199 (get_format_string): Refer to c_getstr.
11201 2018-08-21 Tom de Vries <tdevries@suse.de>
11203 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11204 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11205 (debuginfo_early_stop): Declare.
11206 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11207 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11208 (debuginfo_early_stop): New function.
11209 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
11210 and debuginfo_early_stop.
11211 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
11212 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
11213 (general_init): Call debuginfo_early_init.
11214 (finalize): Call debuginfo_fini.
11215 (do_compile): Call debuginfo_init.
11216 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
11217 -fdump-early-debug.
11218 (@item -fdump-debug, @item -fdump-earlydebug): Add.
11220 2018-08-21 Tom de Vries <tdevries@suse.de>
11222 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
11223 flag_dump_noaddr and flag_dump_unnumbered.
11225 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
11227 * wide-int-range.cc (wide_int_range_abs): New.
11228 (wide_int_range_order_set): Rename from wide_int_range_min_max.
11229 * wide-int-range.h (wide_int_range_abs): New.
11230 (wide_int_range_min_max): New.
11231 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
11232 case to call wide_int_range_abs.
11233 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
11234 (extract_range_from_abs_expr): Delete.
11236 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
11239 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
11240 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
11243 2018-08-20 Nathan Sidwell <nathan@acm.org>
11244 Jeff Law <law@redhat.com>
11246 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
11247 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
11249 2018-08-20 David Malcolm <dmalcolm@redhat.com>
11252 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
11253 (decl_attributes): Likewise.
11254 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
11256 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11257 * diagnostic-core.h (class auto_diagnostic_group): New class.
11258 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
11259 (diagnostic_report_diagnostic): Handle the first diagnostics within
11261 (emit_diagnostic): Add auto_diagnostic_group instance.
11262 (inform): Likewise.
11263 (inform_n): Likewise.
11264 (warning): Likewise.
11265 (warning_at): Likewise.
11266 (warning_n): Likewise.
11267 (pedwarn): Likewise.
11268 (permerror): Likewise.
11270 (error_n): Likewise.
11271 (error_at): Likewise.
11273 (fatal_error): Likewise.
11274 (internal_error): Likewise.
11275 (internal_error_no_backtrace): Likewise.
11276 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
11277 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
11278 * diagnostic.h (struct diagnostic_context): Add fields
11279 "diagnostic_group_nesting_depth",
11280 "diagnostic_group_emission_count", "begin_group_cb",
11282 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
11283 Add auto_diagnostic_group instance(s).
11284 (find_explicit_erroneous_behavior): Likewise.
11285 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
11286 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
11287 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
11288 (gimplify_va_arg_expr): Likewise.
11289 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
11290 (HSA_SORRY_AT): Likewise.
11291 * ipa-devirt.c (compare_virtual_tables): Likewise.
11292 (warn_odr): Likewise.
11293 * multiple_target.c (expand_target_clones): Likewise.
11294 * opts-common.c (cmdline_handle_error): Likewise.
11295 * reginfo.c (globalize_reg): Likewise.
11296 * substring-locations.c (format_warning_n_va): Likewise.
11297 * tree-inline.c (expand_call_inline): Likewise.
11298 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
11299 * tree-ssa-loop-niter.c
11300 (do_warn_aggressive_loop_optimizations): Likewise.
11301 * tree-ssa-uninit.c (warn_uninit): Likewise.
11302 * tree.c (warn_deprecated_use): Likewise.
11304 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
11307 * config/i386/i386.md (eh_return): Always update EH return
11308 address in word_mode.
11310 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
11312 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
11313 TARGET_SPLIT_COMPLEX_ARG is defined.
11315 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
11317 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
11319 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
11322 * expr.c (expand_assignment): Assert that bitpos is positive.
11323 (store_field): Likewise
11324 (expand_expr_real_1): Make sure that bitpos is positive.
11325 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
11328 2018-08-20 Nathan Sidwell <nathan@acm.org>
11330 * Makefile.in (CPP_ID_DATA_H): Delete.
11331 (CPP_INTERNAL_H): Don't add it.
11332 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
11333 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
11335 2018-08-20 Richard Biener <rguenther@suse.de>
11337 PR tree-optimization/78655
11338 * tree-vrp.c (extract_range_from_binary_expr_1): Make
11339 pointer + offset nonnull if either operand is nonnull work.
11341 2018-08-20 Tom de Vries <tdevries@suse.de>
11343 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
11344 unless the referenced die describes the added property using
11345 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
11346 Otherwise, add a DW_AT_location to the referenced die.
11348 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
11351 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
11352 register_operand when calling ix86_set_reg_reg_cost.
11353 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
11354 Set *total to 0 for operands that satisfy x86_64_immediate_operand
11355 predicate and to 1 otherwise.
11357 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
11359 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
11360 emit a diagnostic that it is not supported and reset the option.
11361 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
11362 supported and consume the option. (ASM_FINAL_SPEC): New.
11364 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
11366 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
11369 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
11371 C-SKY port: Documentation
11373 * doc/extend.texi (C-SKY Function Attributes): New section.
11374 * doc/invoke.texi (Option Summary): Add C-SKY options.
11375 (C-SKY Options): New section.
11376 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
11378 2018-08-17 Jojo <jijie_rong@c-sky.com>
11379 Huibin Wang <huibin_wang@c-sky.com>
11380 Sandra Loosemore <sandra@codesourcery.com>
11381 Chung-Lin Tang <cltang@codesourcery.com>
11383 C-SKY port: Backend implementation
11385 * config/csky/*: New.
11386 * common/config/csky/*: New.
11388 2018-08-17 Jojo <jijie_rong@c-sky.com>
11389 Huibin Wang <huibin_wang@c-sky.com>
11390 Sandra Loosemore <sandra@codesourcery.com>
11391 Chung-Lin Tang <cltang@codesourcery.com>
11392 Andrew Jenner <andrew@codesourcery.com>
11394 C-SKY port: Configury
11396 * config.gcc (csky-*-*): New.
11397 * configure.ac: Add csky to targets for dwarf2 debug_line support.
11398 * configure: Regenerated.
11400 2018-08-17 David Malcolm <dmalcolm@redhat.com>
11402 * dump-context.h: Include "dumpfile.h".
11403 (dump_context::dump_printf_va): Convert final param from va_list
11404 to va_list *. Convert from ATTRIBUTE_PRINTF to
11405 ATTRIBUTE_GCC_DUMP_PRINTF.
11406 (dump_context::dump_printf_loc_va): Likewise.
11407 * dumpfile.c: Include "stringpool.h".
11408 (make_item_for_dump_printf_va): Delete.
11409 (make_item_for_dump_printf): Delete.
11410 (class dump_pretty_printer): New class.
11411 (dump_pretty_printer::dump_pretty_printer): New ctor.
11412 (dump_pretty_printer::emit_items): New member function.
11413 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
11415 (dump_pretty_printer::emit_item): New member function.
11416 (dump_pretty_printer::stash_item): New member function.
11417 (dump_pretty_printer::format_decoder_cb): New member function.
11418 (dump_pretty_printer::decode_format): New member function.
11419 (dump_context::dump_printf_va): Reimplement in terms of
11420 dump_pretty_printer.
11421 (dump_context::dump_printf_loc_va): Convert final param from va_list
11423 (dump_context::begin_scope): Reimplement call to
11424 make_item_for_dump_printf.
11425 (dump_printf): Update for change to dump_printf_va.
11426 (dump_printf_loc): Likewise.
11427 (selftest::test_capture_of_dump_calls): Convert "stmt" from
11428 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
11429 with %T, %E, and %G.
11430 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
11431 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
11432 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
11433 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
11434 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
11435 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
11436 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
11437 within a dump_printf_loc call to "%wu".
11438 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
11439 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
11440 missing space after "=".
11441 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
11442 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
11443 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
11444 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
11445 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
11446 duplicate "vectorized" from message.
11448 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
11450 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
11451 polyNxK_t element's TYPE_STRING_FLAG.
11453 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
11455 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
11456 (they were unnamed before). Fix comments.
11458 2018-08-17 Nathan Sidwell <nathan@acm.org>
11460 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
11462 2018-08-17 Richard Biener <rguenther@suse.de>
11464 PR tree-optimization/86841
11465 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
11467 2018-08-17 Martin Liska <mliska@suse.cz>
11469 * common.opt: Remove Warn, Init and Report for options with
11470 Ignore/Deprecated flag. Warning is done automatically for
11472 * config/i386/i386.opt: Likewise.
11473 * config/ia64/ia64.opt: Likewise.
11474 * config/rs6000/rs6000.opt: Likewise.
11475 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
11476 Remove usage of flag_check_pointer_bounds.
11477 * lto-wrapper.c (merge_and_complain): Do not handle
11478 OPT_fcheck_pointer_bounds.
11479 (append_compiler_options): Likewise.
11480 * opt-functions.awk: Do not handle Deprecated.
11481 * optc-gen.awk: Check that Var, Report and Init are not
11482 used for an option with Ignore/Deprecated flag.
11483 * opts-common.c (decode_cmdline_option): Do not report
11485 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
11487 * opts.h (struct cl_option): Remove cl_deprecated flag.
11488 (CL_ERR_DEPRECATED): Remove error enum value.
11490 2018-08-17 Richard Biener <rguenther@suse.de>
11492 PR middle-end/86505
11493 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
11494 across a va-arg-pack using call adjust its return value accordingly.
11496 2018-08-16 Martin Sebor <msebor@redhat.com>
11498 PR tree-optimization/86853
11499 * gimple-ssa-sprintf.c (struct format_result): Rename member.
11500 (struct fmtresult): Add member and initialize it in ctors.
11501 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
11502 (format_string): Handle %S the same as %ls. Set MAYFAIL.
11503 (format_directive): Set POSUNDER4K when MAYFAIL is set.
11504 (parse_directive): Handle %C same as %c.
11505 (sprintf_dom_walker::compute_format_length): Adjust.
11506 (is_call_safe): Adjust.
11508 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
11510 * builtins.c (c_strlen): Add new parameter eltsize. Use it
11511 for determining how to count the elements.
11512 * builtins.h (c_strlen): Adjust prototype.
11513 * expr.c (string_constant): Add new parameter mem_size.
11514 Set *mem_size appropriately.
11515 * expr.h (string_constant): Adjust protoype.
11516 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
11517 * gimple-fold.h (get_range_strlen): Adjust prototype.
11518 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
11519 (format_string): Call get_string_length with eltsize.
11521 2018-08-16 David Malcolm <dmalcolm@redhat.com>
11523 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
11524 to emit the span, rather than setting it as the prefix.
11526 2018-08-16 David Malcolm <dmalcolm@redhat.com>
11528 * diagnostic-show-locus.c (layout::start_annotation_line): Add
11529 "margin_char" parameter, defaulting to space. Use it in place
11530 of pp_space for the initial part of the margin.
11531 (layout::print_leading_fixits): Use '+' when filling the margin
11532 of line-insertion fix-it hints.
11534 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
11536 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
11539 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
11541 * config/rs6000/altivec.md: Don't set length attribute to the default
11543 * config/rs6000/darwin.md: Ditto.
11544 * config/rs6000/dfp.md: Ditto.
11545 * config/rs6000/htm.md: Ditto.
11546 * config/rs6000/rs6000.md: Ditto.
11547 * config/rs6000/sync.md: Ditto.
11548 * config/rs6000/vsx.md: Ditto.
11550 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
11552 * config/rs6000/altivec.md: Don't set length attribute to the default
11553 value, for branch instructions.
11554 * config/rs6000/darwin.md: Ditto.
11555 * config/rs6000/rs6000.md: Ditto.
11557 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
11559 * config/rs6000/rs6000.md (length): Always define as const_int 4.
11560 (unnamed conditional branch define_insn): Set length to 4 or 8
11561 depending on offset.
11562 (<bd>_<mode>): Similar, for alternative 0.
11563 (<bd>tf_<mode>): Ditto.
11565 2018-08-16 Tamar Christina <tamar.christina@arm.com>
11567 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
11569 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
11571 * doc/rtl.texi: Replace old RTX class names with new names.
11574 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
11576 * expmed.h (canonicalize_comparison): New declaration.
11577 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
11578 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
11579 * optabs.c (prepare_cmp_insn): Likewise.
11580 * rtl.h (unsigned_condition_p): New function which checks if a
11581 comparison operator is unsigned.
11583 2018-08-16 Nathan Sidwell <nathan@acm.org>
11585 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
11586 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
11588 2018-08-16 Tamar Christina <tamar.christina@arm.com>
11591 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
11592 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
11593 (mov<mov>): ..this and enable unconditionally.
11595 2018-08-16 Tamar Christina <tamar.christina@arm.com>
11597 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
11599 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
11601 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
11602 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
11603 "Common" with "Target".
11605 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
11607 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
11608 * doc/invoke.texi (mmitigate-rop): Remove.
11609 * config/i386/i386.c: Do not include "regrename.h".
11610 (ix86_rop_should_change_byte_p, reg_encoded_number)
11611 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
11613 (ix86_reorg): Remove call to ix86_mitigate_rop.
11614 * config/i386/i386.md (attr "modrm_class"): Remove.
11615 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
11616 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
11617 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
11619 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
11621 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
11622 allow folding of mergeh() and mergel() for the float and double types.
11623 (fold_mergehl_helper): Rework to handle building a permute tree
11626 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
11628 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
11631 2018-08-15 David Malcolm <dmalcolm@redhat.com>
11633 * common.opt (fdiagnostics-show-labels): New option.
11634 * diagnostic-show-locus.c (class layout_range): Add field
11636 (class layout): Add field "m_show_labels_p".
11637 (layout_range::layout_range): Add param "label" and use it to
11638 initialize m_label.
11639 (make_range): Pass in NULL for new "label" param of layout_range's
11641 (layout::layout): Initialize m_show_labels_p.
11642 (layout::maybe_add_location_range): Pass in loc_range->m_label
11643 when constructing layout_range instances.
11644 (struct line_label): New struct.
11645 (layout::print_any_labels): New member function.
11646 (layout::print_line): Call it if label-printing is enabled.
11647 (selftest::test_one_liner_labels): New test.
11648 (selftest::test_diagnostic_show_locus_one_liner): Call it.
11649 * diagnostic.c (diagnostic_initialize): Initialize
11650 context->show_labels_p.
11651 * diagnostic.h (struct diagnostic_context): Add field
11653 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11654 -fno-diagnostics-show-labels.
11655 * dwarf2out.c (gen_producer_string): Add
11656 OPT_fdiagnostics_show_labels to the ignored options.
11657 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
11659 (gcc_rich_location::maybe_add_expr): Likewise.
11660 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
11661 label" param, defaulting to NULL.
11662 (gcc_rich_location::add_expr): Add "label" param.
11663 (gcc_rich_location::maybe_add_expr): Likewise.
11664 (class text_range_label): New class.
11665 (class range_label_for_type_mismatch): New class.
11666 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
11667 of format_warning_va.
11668 (fmtwarn_n): Likewise for new params of format_warning_n_va.
11669 * lto-wrapper.c (merge_and_complain): Add
11670 OPT_fdiagnostics_show_labels to the "pick one setting" options.
11671 (append_compiler_options): Likewise to the dropped options.
11672 (append_diag_options): Likewise to the passed-on options.
11673 * opts.c (common_handle_option): Handle the new option.
11674 * selftest-diagnostic.c
11675 (test_diagnostic_context::test_diagnostic_context): Enable
11677 * substring-locations.c: Include "gcc-rich-location.h".
11678 (format_warning_n_va): Add "fmt_label" and "param_label" params
11679 and use them as appropriate.
11680 (format_warning_va): Add "fmt_label" and "param_label" params,
11681 passing them on to format_warning_n_va.
11682 (format_warning_at_substring): Likewise.
11683 (format_warning_at_substring_n): Likewise.
11684 * substring-locations.h (format_warning_va): Add "fmt_label" and
11685 "param_label" params.
11686 (format_warning_n_va): Likewise.
11687 (format_warning_at_substring): Likewise.
11688 (format_warning_at_substring_n): Likewise.
11689 * toplev.c (general_init): Initialize global_dc->show_labels_p.
11691 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
11694 * builtins.c (expand_builtin_memcmp): Do not expand the call
11695 when overflow is detected.
11697 2018-08-15 Martin Sebor <msebor@redhat.com>
11699 PR tree-optimization/71625
11700 * config/aarch64/aarch64-builtins.c
11701 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
11703 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
11705 * config/s390/s390.c (s390_reorg): Remove loop.
11707 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
11710 (darwin_function_switched_text_sections): Delete.
11711 * gcc/config/darwin.h
11712 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
11714 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
11717 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
11718 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
11719 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
11721 2018-08-15 Martin Liska <mliska@suse.cz>
11723 PR tree-optimization/86925
11724 * predict.c (expr_expected_value_1): When taking
11725 later predictor, assign also probability.
11726 Use fold_build2_initializer_loc in order to fold
11727 the expression in -frounding-math.
11729 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
11731 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
11733 (expand_vec_perm_1): Try the new method.
11735 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
11738 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
11739 Check whether lra_live_max_point is 0 before dividing.
11741 2018-08-14 Martin Sebor <msebor@redhat.com>
11743 PR tree-optimization/86650
11744 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
11745 (vrp_prop::check_mem_ref): Same.
11747 2018-08-13 Liu Hao <lh_mouse@126.com>
11749 * pretty-print.c (eat_esc_sequence): Swap the foreground and
11750 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
11751 and clear it thereafter, as it only works for DBCS.
11753 2018-08-13 Liu Hao <lh_mouse@126.com>
11755 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
11756 handle returned by _get_osf_handle().
11758 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11760 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
11761 for folding vec_perm.
11763 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11765 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
11766 Add support for gimple-folding of vec_pack() and vec_unpack()
11769 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11771 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
11772 vec_xst variants to the list.
11773 (rs6000_gimple_fold_builtin): Add support for folding unaligned
11774 vector loads and stores.
11776 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
11778 * config.gcc (rs6000-ibm-aix4.x): Delete.
11779 (rs6000-ibm-aix5.1): Delete.
11780 (rs6000-ibm-aix5.2): Delete.
11781 (rs6000-ibm-aix5.3): Delete.
11782 * config/rs6000/aix43.h: Delete.
11783 * config/rs6000/aix51.h: Delete.
11784 * config/rs6000/aix52.h: Delete.
11785 * config/rs6000/t-aix43: Delete.
11787 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
11789 * config/s390/s390.c (s390_decompose_constant_pool_ref):
11791 (s390_decompose_address): Factor out constant pool ref
11794 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11796 * config/nds32/nds32-predicates.c
11797 (nds32_can_use_bclr_p): Change return type as bool.
11798 (nds32_can_use_bset_p): Ditto.
11799 (nds32_can_use_btgl_p): Ditto.
11800 (nds32_can_use_bitci_p): Ditto.
11801 * config/nds32/nds32-protos.h
11802 (nds32_can_use_bclr_p): Change declaration.
11803 (nds32_can_use_bset_p): Ditto.
11804 (nds32_can_use_btgl_p): Ditto.
11805 (nds32_can_use_bitci_p): Ditto.
11807 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11809 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
11810 Support -msched-prolog-epilog option.
11811 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
11813 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11815 * common/config/nds32/nds32-common.c
11816 (nds32_option_optimization_table): Enalbe -malways-align.
11818 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11820 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
11822 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
11823 OPT_misr_secure_ case.
11824 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
11825 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
11826 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
11828 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
11829 (nds32_isr_info): New field security_level.
11830 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
11831 * config/nds32/nds32.md (return_internal): Consider critical attribute.
11832 * config/nds32/nds32.opt (misr-secure): New option.
11833 * config/nds32/nds32_init.inc: New file.
11834 * config/nds32/nds32_isr.h: New file.
11836 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
11838 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
11839 Update comment for atomic instructions.
11840 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
11841 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
11843 (atomic_loaddi): Revise fence expansion to only emit fence prior to
11844 load for __ATOMIC_SEQ_CST model.
11845 (atomic_loaddi_1): Remove float register target.
11846 (atomic_storedi): Handle CONST_INT values.
11847 (atomic_storedi_1): Remove float register source. Add special case
11849 (memory_barrier): New expander and insn.
11851 2018-08-11 Jakub Jelinek <jakub@redhat.com>
11853 PR tree-optimization/86835
11854 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
11855 new_stmt after def_gsi, make sure to insert new_square_stmt after
11856 that stmt, not 2 stmts before it.
11858 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
11861 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
11864 2018-08-10 Martin Liska <mliska@suse.cz>
11867 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
11869 * builtins.c (expand_builtin_expect_with_probability):
11871 (expand_builtin_expect_with_probability): New function.
11872 (build_builtin_expect_predicate): Add new argumnet probability
11873 for BUILT_IN_EXPECT_WITH_PROBABILITY.
11874 (fold_builtin_expect):
11877 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
11878 * builtins.h (fold_builtin_expect): Set new argument.
11879 * doc/extend.texi: Document __builtin_expect_with_probability.
11880 * doc/invoke.texi: Likewise.
11881 * gimple-fold.c (gimple_fold_call): Pass new argument.
11882 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
11883 also BUILT_IN_EXPECT_WITH_PROBABILITY.
11884 * predict.c (get_predictor_value): New function.
11885 (expr_expected_value): Add new argument probability. Assume
11886 that predictor and probability are always non-null.
11887 (expr_expected_value_1): Likewise. For __builtin_expect and
11888 __builtin_expect_with_probability set probability. Handle
11889 combination in binary expressions.
11890 (tree_predict_by_opcode): Simplify code by simply calling
11891 get_predictor_value.
11892 (pass_strip_predict_hints::execute): Add handling of
11893 BUILT_IN_EXPECT_WITH_PROBABILITY.
11894 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
11896 * tree.h (DECL_BUILT_IN_P): New function.
11898 2018-08-10 Martin Liska <mliska@suse.cz>
11900 PR tree-optimization/85799
11901 * passes.def: Add argument for pass_strip_predict_hints.
11902 * predict.c (class pass_strip_predict_hints): Add new argument
11904 (strip_predictor_early): New function.
11905 (pass_strip_predict_hints::execute): Call the function to
11907 (strip_predict_hints): New function.
11908 * predict.def: Fix comment.
11910 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
11912 * Makefile.in: Clarify which tm.texi to copy over to assert the
11913 right to grant a GFDL license for all.
11915 2018-08-09 Jeff Law <law@redhat.com>
11917 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
11920 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
11922 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
11925 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11927 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
11928 reductions for variable-length vectors.
11930 2018-08-09 David Malcolm <dmalcolm@redhat.com>
11933 * common.opt (fdiagnostics-show-line-numbers): New option.
11934 * diagnostic-show-locus.c (class layout): Add fields
11935 "m_show_line_numbers_p" and "m_linenum_width";
11936 (num_digits): New function.
11937 (test_num_digits): New function.
11938 (layout::layout): Initialize new fields. Update m_x_offset
11939 logic to handle any left margin.
11940 (layout::print_source_line): Print line number when requested.
11941 (layout::start_annotation_line): New member function.
11942 (layout::print_annotation_line): Call it.
11943 (layout::print_leading_fixits): Likewise.
11944 (layout::print_trailing_fixits): Likewise. Update calls to
11945 move_to_column for new parameter.
11946 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
11947 it to potentially call start_annotation_line.
11948 (layout::show_ruler): Call start_annotation_line.
11949 (selftest::test_line_numbers_multiline_range): New selftest.
11950 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
11951 and selftest::test_line_numbers_multiline_range.
11952 * diagnostic.c (diagnostic_initialize): Initialize
11953 show_line_numbers_p.
11954 * diagnostic.h (struct diagnostic_context): Add field
11955 "show_line_numbers_p".
11956 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11957 -fno-diagnostics-show-line-numbers.
11958 * dwarf2out.c (gen_producer_string): Add
11959 OPT_fdiagnostics_show_line_numbers to the ignored options.
11960 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
11961 one setting" options.
11962 (append_compiler_options): Likewise to the dropped options.
11963 (append_diag_options): Likewise to the passed-on options.
11964 * opts.c (common_handle_option): Handle the new option.
11965 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
11967 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
11969 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
11970 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
11971 third argument of type "const signed char" to descriptions of
11972 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
11973 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
11974 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
11975 __builtin_bcdsub_ov functions.
11977 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11979 PR tree-optimization/86858
11980 * tree-vect-loop.c (vect_is_simple_reduction): Restore
11981 flow_bb_inside_loop_p calls.
11983 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11985 PR tree-optimization/86871
11986 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
11987 instead of gimple_assign_lhs.
11989 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
11992 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
11993 register constraint to operand 0.
11994 (add<mode>3_carryinC): Likewise.
11995 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
11997 2018-08-09 Martin Liska <mliska@suse.cz>
12000 * common.opt: Remove extra line.
12002 2018-08-09 Martin Liska <mliska@suse.cz>
12004 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
12005 at the end of a line, make first letter capital and end up
12006 a sentence with a dot.
12007 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
12008 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
12009 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
12010 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
12011 (PARAM_MAX_ISL_OPERATIONS): Likewise.
12012 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
12013 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
12014 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
12015 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
12016 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
12017 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
12018 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
12019 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
12020 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
12021 (PARAM_TREE_REASSOC_WIDTH): Likewise.
12022 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
12023 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
12024 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
12026 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
12029 * config/s390/s390.c (s390_option_override_internal): Reduce the
12030 stack-clash-protection-probe-interval param if it would be too big
12033 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
12036 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
12037 * config/m68k/m68k.c (handle_move_double): Don't call
12038 m68k_final_prescan_insn.
12039 (m68k_adjust_decorated_operand): Renamed from
12040 m68k_final_prescan_insn, remove first and third operand and
12042 (print_operand): Call it.
12043 (print_operand_address): Call it.
12045 2018-08-08 Nathan Sidwell <nathan@acm.org>
12047 * diagnostic.c (diagnostic_report_current_module): Use
12048 linemap_included_from & linemap_included_from_linemap.
12050 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
12052 * config/aarch64/aarch64-cores.def: Add phecda core.
12053 * config/aarch64/aarch64-tune.md: Regenerate.
12054 * doc/invoke.texi: Add phecda core.
12056 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
12059 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
12061 * config/s390/s390.md ("movti"): Add more alternatives for
12062 constant to GPR copies.
12064 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
12066 * config/s390/s390.c: Fix whitespace damage throughout the file.
12067 * config/s390/s390.h: Likewise.
12068 * config/s390/tpf.h: Likewise.
12070 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
12072 * config/s390/s390.c (s390_loadrelative_operand_p):
12073 Remove TARGET_CPU_ZARCH usages.
12074 (s390_rtx_costs): Likewise.
12075 (s390_legitimate_constant_p): Likewise.
12076 (s390_cannot_force_const_mem): Likewise.
12077 (legitimate_reload_constant_p): Likewise.
12078 (s390_preferred_reload_class): Likewise.
12079 (legitimize_pic_address): Likewise.
12080 (legitimize_tls_address): Likewise.
12081 (s390_split_branches): Removed.
12082 (s390_add_execute): Removed.
12083 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
12084 (s390_mainpool_start): Likewise.
12085 (s390_mainpool_finish): Likewise.
12086 (s390_mainpool_cancel): Removed.
12087 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
12088 (s390_chunkify_cancel): Likewise.
12089 (s390_return_addr_rtx): Likewise.
12090 (s390_register_info): Remove split_branches_pending_p uages.
12091 (s390_optimize_register_info): Likewise.
12092 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
12093 split_branches_pending_p usages.
12094 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
12095 (s390_load_got): Likewise.
12096 (s390_expand_split_stack_prologue): Likewise.
12097 (output_asm_nops): Likewise.
12098 (s390_function_profiler): Likewise.
12099 (s390_emit_call): Likewise.
12100 (s390_conditional_register_usage): Likewise.
12101 (s390_optimize_prologue): Likewise.
12102 (s390_reorg): Remove TARGET_CPU_ZARCH and
12103 split_branches_pending_p usages.
12104 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
12106 (s390_output_indirect_thunk_function): Likewise.
12107 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
12108 (TARGET_CPU_ZARCH_P): Removed.
12109 (struct machine_function): Remove split_branches_pending_p.
12110 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
12112 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
12114 * common/config/s390/s390-common.c (processor_flags_table):
12116 * config.gcc: Remove with_arch/with_tune support.
12117 * config/s390/2064.md: Remove cpu attribute comparisons.
12118 * config/s390/driver-native.c (s390_host_detect_local_cpu):
12120 * config/s390/linux.h (ASM_SPEC):
12121 Remove -march support.
12122 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
12123 Use a table to get an arch level.
12124 * config/s390/s390-opts.h (enum processor_type):
12125 Remove enum values.
12126 * config/s390/s390.c
12127 (processor_table): Remove entries, add arch_level values.
12128 (s390_issue_rate): Remove cases.
12129 (s390_option_override): Adjust
12130 s390_option_override_internal() call.
12131 (s390_option_override_internal): Remove deprecation warning.
12132 (s390_valid_target_attribute_tree): Adjust
12133 s390_option_override_internal() call.
12134 * config/s390/s390.h (struct s390_processor):
12135 Share with s390-c.c, add arch_level field.
12136 * config/s390/s390.md:
12137 Remove occurrences in cpu attribute.
12138 * config/s390/s390.opt: Remove -march/-mtune support.
12139 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
12140 * doc/invoke.texi: Remove deprecation warning.
12142 2018-08-08 Luis Machado <luis.machado@linaro.org>
12144 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
12146 (qdf24xx_tunings): Set vector cost structure to
12147 qdf24xx_vector_cost.
12149 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
12150 <register_sextend>: Set to 3.
12152 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
12155 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
12156 * config/aarch64/aarch64-simd.md
12157 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
12158 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
12159 (aarch64_frecpx<mode>): ...this new pattern.
12160 * config/aarch64/aarch64-simd-builtins.def: Remove comment
12161 about aarch64_frecp<FRECP:frecp_suffix><mode>.
12163 2018-08-07 Martin Liska <mliska@suse.cz>
12165 PR middle-end/83023
12166 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
12167 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
12168 * predict.def (PRED_MALLOC_NONNULL): New predictor.
12169 * doc/extend.texi: Document that malloc attribute adds
12172 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
12175 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12176 Define to speculation_safe_value_not_needed.
12178 2018-08-06 Jeff Law <law@redhat.com>
12180 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
12181 the vr_values instance to cprop_into_stmt.
12182 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
12183 (cprop_operand): Also query EVRP to determine if OP is a constant.
12185 2018-08-06 Nathan Sidwell <nathan@acm.org>
12187 * diagnostic.c (diagnostic_report_current_module): Reroll
12188 included-at loop. Translate text.
12190 2018-08-06 David Malcolm <dmalcolm@redhat.com>
12192 * function-tests.c (selftest::test_expansion_to_rtl): Call
12193 free_after_compilation.
12195 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12197 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
12199 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
12201 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
12202 loops with memory block operations from getting unrolled.
12204 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
12207 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12208 Define to speculation_safe_value_not_needed.
12210 2018-08-06 Jeff Law <law@redhat.com>
12212 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
12215 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12218 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
12219 with all enabled __intN types.
12221 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
12223 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12225 * alias.c (record_set): Check for clobber high.
12226 * cfgexpand.c (expand_gimple_stmt): Likewise.
12227 * combine-stack-adj.c (single_set_for_csa): Likewise.
12228 * combine.c (find_single_use_1): Likewise.
12229 (set_nonzero_bits_and_sign_copies): Likewise.
12230 (get_combine_src_dest): Likewise.
12231 (is_parallel_of_n_reg_sets): Likewise.
12232 (try_combine): Likewise.
12233 (record_dead_and_set_regs_1): Likewise.
12234 (reg_dead_at_p_1): Likewise.
12235 (reg_dead_at_p): Likewise.
12236 * dce.c (deletable_insn_p): Likewise.
12237 (mark_nonreg_stores_1): Likewise.
12238 (mark_nonreg_stores_2): Likewise.
12239 * df-scan.c (df_find_hard_reg_defs): Likewise.
12240 (df_uses_record): Likewise.
12241 (df_get_call_refs): Likewise.
12242 * dwarf2out.c (mem_loc_descriptor): Likewise.
12243 * haifa-sched.c (haifa_classify_rtx): Likewise.
12244 * ira-build.c (create_insn_allocnos): Likewise.
12245 * ira-costs.c (scan_one_insn): Likewise.
12246 * ira.c (equiv_init_movable_p): Likewise.
12247 (rtx_moveable_p): Likewise.
12248 (interesting_dest_for_shprep): Likewise.
12249 * jump.c (mark_jump_label_1): Likewise.
12250 * postreload-gcse.c (record_opr_changes): Likewise.
12251 * postreload.c (reload_cse_simplify): Likewise.
12252 (struct reg_use): Add source expr.
12253 (reload_combine): Check for clobber high.
12254 (reload_combine_note_use): Likewise.
12255 (reload_cse_move2add): Likewise.
12256 (move2add_note_store): Likewise.
12257 * print-rtl.c (print_pattern): Likewise.
12258 * recog.c (decode_asm_operands): Likewise.
12259 (store_data_bypass_p): Likewise.
12260 (if_test_bypass_p): Likewise.
12261 * regcprop.c (kill_clobbered_value): Likewise.
12262 (kill_set_value): Likewise.
12263 * reginfo.c (reg_scan_mark_refs): Likewise.
12264 * reload1.c (maybe_fix_stack_asms): Likewise.
12265 (eliminate_regs_1): Likewise.
12266 (elimination_effects): Likewise.
12267 (mark_not_eliminable): Likewise.
12268 (scan_paradoxical_subregs): Likewise.
12269 (forget_old_reloads_1): Likewise.
12270 * reorg.c (find_end_label): Likewise.
12271 (try_merge_delay_insns): Likewise.
12272 (redundant_insn): Likewise.
12273 (own_thread_p): Likewise.
12274 (fill_simple_delay_slots): Likewise.
12275 (fill_slots_from_thread): Likewise.
12276 (dbr_schedule): Likewise.
12277 * resource.c (update_live_status): Likewise.
12278 (mark_referenced_resources): Likewise.
12279 (mark_set_resources): Likewise.
12280 * rtl.c (copy_rtx): Likewise.
12281 * rtlanal.c (reg_referenced_p): Likewise.
12282 (single_set_2): Likewise.
12283 (noop_move_p): Likewise.
12284 (note_stores): Likewise.
12285 * sched-deps.c (sched_analyze_reg): Likewise.
12286 (sched_analyze_insn): Likewise.
12288 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12290 * cse.c (invalidate_reg): New function extracted from...
12291 (invalidate): ...here.
12292 (canonicalize_insn): Check for clobber high.
12293 (invalidate_from_clobbers): invalidate clobber highs.
12294 (invalidate_from_sets_and_clobbers): Likewise.
12295 (count_reg_usage): Check for clobber high.
12296 (insn_live_p): Likewise.
12297 * cselib.c (cselib_expand_value_rtx_1):Likewise.
12298 (cselib_invalidate_regno): Check for clobber in setter.
12299 (cselib_invalidate_rtx): Pass through setter.
12300 (cselib_invalidate_rtx_note_stores):
12301 (cselib_process_insn): Check for clobber high.
12302 * cselib.h (cselib_invalidate_rtx): Add operand.
12304 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12306 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
12307 (mark_not_eliminable): Likewise.
12308 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
12309 * lra-lives.c (process_bb_lives): Check for clobber high.
12310 * lra.c (new_insn_reg): Remember clobber highs.
12311 (collect_non_operand_hard_regs): Check for clobber high.
12312 (lra_set_insn_recog_data): Likewise.
12313 (add_regs_to_insn_regno_info): Likewise.
12314 (lra_update_insn_regno_info): Likewise.
12316 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12318 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
12319 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
12321 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12323 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
12324 (copy_insn_1): Likewise.
12325 (gen_hard_reg_clobber_high): New gen function.
12326 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
12327 * genemit.c (gen_exp): Likewise.
12328 (gen_emit_seq): Pass through info.
12329 (gen_insn): Check for CLOBBER_HIGH.
12330 (gen_expand): Pass through info.
12331 (gen_split): Likewise.
12332 (output_add_clobbers): Likewise.
12333 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
12334 (remove_clobbers): Likewise.
12335 * rtl.h (gen_hard_reg_clobber_high): New declaration.
12337 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12339 * doc/rtl.texi (clobber_high): Add.
12340 (parallel): Add in clobber high
12341 * rtl.c (rtl_check_failed_code3): Add function.
12342 * rtl.def (CLOBBER_HIGH): Add expression.
12343 * rtl.h (RTL_CHECKC3): Add macro.
12344 (rtl_check_failed_code3): Add declaration.
12345 (XC3EXP): Add macro.
12347 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
12350 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
12351 cfun->machine->max_used_stack_alignment if needed.
12353 2018-08-04 Martin Sebor <msebor@redhat.com>
12355 PR tree-optimization/86571
12356 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
12359 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
12362 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12365 2018-08-03 Jeff Law <law@redhat.com>
12368 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12369 Define to speculation_safe_value_not_needed.
12371 2018-08-03 David Malcolm <dmalcolm@redhat.com>
12373 * doc/gcov.texi (-x): Remove duplicate "to".
12374 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
12375 (-Wif-not-aligned): Remove duplicate "is".
12376 (-flto): Remove duplicate "the".
12377 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
12378 duplicate "v5.00.b".
12379 (MSP430 Options): Remove duplicate "and" from the description
12380 of "-mgprel-sec=regexp".
12381 (x86 Options): Remove duplicate copies of "vmldLog102" and
12382 vmlsLog104 from description of "-mveclibabi=type".
12384 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
12386 * internal-fn.h (first_commutative_argument): Declare.
12387 * internal-fn.c (first_commutative_argument): New function.
12388 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
12389 restrictions for pattern statements. Use first_commutative_argument
12390 to look for commutative operands in calls to internal functions.
12392 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
12394 * Makefile.in (wide-int-range.o): New.
12395 * tree-vrp.c: Move all the wide_int_* functions to...
12396 * wide-int-range.cc: ...here.
12397 * tree-vrp.h: Move all the wide_int_* prototypes to...
12398 * wide-int-range.h: ...here.
12400 2018-08-03 Tom de Vries <tdevries@suse.de>
12402 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
12404 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
12405 * except.c (output_function_exception_table): Do early exit if
12406 targetm_common.except_unwind_info (&global_options) == UI_NONE.
12408 2018-08-03 Martin Liska <mliska@suse.cz>
12410 * predict.c (dump_prediction): Change to 2 digits
12413 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
12415 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
12417 (falkor_am_1_gtov_gtov): ... a new insn reservation.
12419 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
12421 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
12422 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
12423 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
12424 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
12425 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
12427 2018-08-02 David Malcolm <dmalcolm@redhat.com>
12429 * diagnostic-show-locus.c (diagnostic_show_locus): Use
12430 pp_take_prefix when saving the existing prefix.
12431 * diagnostic.c (diagnostic_append_note): Likewise.
12432 * langhooks.c (lhd_print_error_function): Likewise.
12433 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
12434 param's type. Free the existing prefix.
12435 (pp_take_prefix): New function.
12436 (pretty_printer::pretty_printer): Drop the prefix parameter.
12437 Rename the length parameter to match the comment.
12438 (pretty_printer::~pretty_printer): Free the prefix.
12439 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
12441 (struct pretty_printer): Drop the "const" from "prefix" field's
12442 type and clarify memory management.
12443 (pp_set_prefix): Drop the "const" from the 2nd param.
12444 (pp_take_prefix): New decl.
12446 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
12448 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
12449 for word_mode_ok here instead of passing as argument.
12450 (expand_block_compare): Change select_block_compare_mode() call.
12451 (expand_strncmp_gpr_sequence): New function.
12452 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
12454 2018-08-02 Jeff Law <law@redhat.com>
12457 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12458 Define to speculation_safe_value_not_needed.
12461 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12462 Define to speculation_safe_value_not_needed.
12464 2018-08-02 Tom de Vries <tdevries@suse.de>
12467 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
12468 function. Return UI_TARGET unconditionally.
12469 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
12470 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
12472 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
12474 * genemit.c (print_overload_test): Fix typo.
12476 2018-08-02 Richard Biener <rguenther@suse.de>
12478 PR tree-optimization/86816
12479 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
12480 which checks for value availability before querying it.
12481 (gvn_uses_equal): Use it.
12482 (same_succ_hash): Likewise.
12483 (gimple_equal_p): Likewise.
12485 2018-08-02 Nick Clifton <nickc@redhat.com>
12488 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12489 Define to speculation_safe_value_not_needed.
12492 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12493 Define to speculation_safe_value_not_needed.
12496 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12497 Define to speculation_safe_value_not_needed.
12500 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12501 Define to speculation_safe_value_not_needed.
12504 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12505 Define to speculation_safe_value_not_needed.
12508 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12509 Define to speculation_safe_value_not_needed.
12512 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12513 Define to speculation_safe_value_not_needed.
12516 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12517 Define to speculation_safe_value_not_needed.
12520 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12521 speculation_safe_value_not_needed.
12524 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
12525 to speculation_safe_value_not_needed.
12527 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
12529 * doc/md.texi: Expand the documentation of instruction names
12530 to mention port-local uses. Document '@' in pattern names.
12531 * read-md.h (overloaded_instance, overloaded_name): New structs.
12532 (mapping): Declare.
12533 (md_reader::handle_overloaded_name): New member function.
12534 (md_reader::get_overloads): Likewise.
12535 (md_reader::m_first_overload): New member variable.
12536 (md_reader::m_next_overload_ptr): Likewise.
12537 (md_reader::m_overloads_htab): Likewise.
12538 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
12539 m_next_overload_ptr and m_overloads_htab.
12540 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
12541 (get_mode_token, get_code_token, get_int_token): New functions.
12542 (map_attr_string): Add an optional argument that passes back
12543 the associated iterator.
12544 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
12545 (md_reader::handle_overloaded_name, add_overload_instance): New
12547 (apply_iterators): Handle '@' names. Report an error if '@'
12548 is used without iterators.
12549 (initialize_iterators): Initialize the new iterator_group fields.
12550 * genopinit.c (handle_overloaded_code_for)
12551 (handle_overloaded_gen): New functions.
12552 (main): Use them to print declarations of maybe_code_for_* and
12553 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
12554 * genemit.c (print_overload_arguments, print_overload_test)
12555 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
12556 (main): Use it to print definitions of maybe_code_for_* and
12557 maybe_gen_* functions.
12558 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
12559 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
12560 instead of explicit mode checks.
12561 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
12562 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
12563 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
12564 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
12565 (aarch64_expand_compare_and_swap): Likewise
12566 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
12567 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
12568 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
12569 (aarch64_constant_pool_reload_icode): Delete.
12570 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
12571 instead of aarch64_constant_pool_reload_icode. Use
12572 code_for_aarch64_reload_mov instead of explicit mode checks.
12573 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
12574 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
12575 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
12576 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
12577 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
12578 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
12579 (aarch64_atomic_load_op_code): Delete.
12580 (aarch64_emit_atomic_load_op): Likewise.
12581 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
12582 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
12583 instead of aarch64_emit_atomic_load_op.
12584 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
12585 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
12586 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
12587 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
12588 character before the pattern name.
12589 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
12590 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
12591 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
12592 (aarch64_frecps<mode>): Likewise.
12593 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
12594 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
12595 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
12596 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
12597 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
12599 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
12601 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
12602 Allow HFmode constants if TARGET_FP_F16INST.
12604 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
12607 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
12608 No longer check last store for clobber of address register.
12610 2018-08-02 Martin Liska <mliska@suse.cz>
12612 PR gcov-profile/86817
12613 * gcov.c (process_all_functions): New function.
12615 (process_file): Move functions processing to
12616 process_all_functions.
12618 2018-08-02 David Malcolm <dmalcolm@redhat.com>
12620 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
12621 "const" to the "gimple *" and "rtx_insn *" parameters.
12622 * dumpfile.h (dump_user_location_t::dump_user_location_t):
12624 (dump_location_t::dump_location_t): Likewise.
12626 2018-08-01 Martin Sebor <msebor@redhat.com>
12628 PR tree-optimization/86650
12629 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
12630 rather than a "gcall *". Directly pass the data of interest
12631 to percent_K_format, rather than building a temporary CALL_EXPR
12633 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
12634 (gimple_fold_builtin_strncat): Adjust.
12635 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
12636 gcall* argument with gimple*.
12637 * gimple-ssa-warn-restrict.c (check_call): Same.
12638 (wrestrict_dom_walker::before_dom_children): Same.
12639 (builtin_access::builtin_access): Same.
12640 (check_bounds_or_overlap): Same
12641 (maybe_diag_overlap): Same.
12642 (maybe_diag_offset_bounds): Same.
12643 * tree-diagnostic.c (default_tree_printer): Move usage of
12644 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
12646 * tree-pretty-print.c (percent_K_format): Add argument.
12647 * tree-pretty-print.h: Add argument.
12648 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
12649 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
12650 (maybe_diag_stxncpy_trunc): Same.
12651 (handle_builtin_stxncpy): Same.
12652 (handle_builtin_strcat): Same.
12654 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12656 * match.pd: Optimise pointer range checks.
12658 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12660 PR tree-optimization/86758
12661 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
12662 to remove pattern statements.
12664 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12666 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
12667 result of dfs_enumerate_from when constructing stmt_vec_infos,
12668 instead of additionally calling get_loop_body.
12670 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12672 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
12674 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
12675 When creating an iv, assert that the step is not known to be zero.
12676 (vect_setup_realignment): Update call accordingly.
12677 * tree-vect-stmts.c (vectorizable_store): Likewise.
12678 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
12680 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12682 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
12683 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
12684 (vectorizable_reduction): Likewise.
12685 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12686 (vect_detect_hybrid_slp_stmts): Likewise.
12687 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12689 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
12691 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
12692 (wide_int_set_zero_nonzero_bits): ...this.
12693 (zero_nonzero_bits_from_vr): Rename to...
12694 (vrp_set_zero_nonzero_bits): ...this.
12695 (extract_range_from_multiplicative_op_1): Abstract wide int
12697 (wide_int_range_multiplicative_op): ...here.
12698 (extract_range_from_binary_expr_1): Extract wide int binary
12699 operations into their own functions.
12700 (wide_int_range_lshift): New.
12701 (wide_int_range_can_optimize_bit_op): New.
12702 (wide_int_range_shift_undefined_p): New.
12703 (wide_int_range_bit_xor): New.
12704 (wide_int_range_bit_ior): New.
12705 (wide_int_range_bit_and): New.
12706 (wide_int_range_trunc_mod): New.
12707 (extract_range_into_wide_ints): New.
12708 (vrp_shift_undefined_p): New.
12709 (extract_range_from_multiplicative_op): New.
12710 (vrp_can_optimize_bit_op): New.
12711 * tree-vrp.h (value_range::dump): New.
12712 (wide_int_range_multiplicative_op): New.
12713 (wide_int_range_lshift):New.
12714 (wide_int_range_shift_undefined_p): New.
12715 (wide_int_range_bit_xor): New.
12716 (wide_int_range_bit_ior): New.
12717 (wide_int_range_bit_and): New.
12718 (wide_int_range_trunc_mod): New.
12719 (zero_nonzero_bits_from_bounds): Rename to...
12720 (wide_int_set_zero_nonzero_bits): ...this.
12721 (zero_nonzero_bits_from_vr): Rename to...
12722 (vrp_set_zero_nonzero_bits): ...this.
12723 (range_easy_mask_min_max): Rename to...
12724 (wide_int_range_can_optimize_bit_op): this.
12725 * vr-values.c (simplify_bit_ops_using_ranges): Rename
12726 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
12728 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12730 * tree-vectorizer.h (vect_orig_stmt): New function.
12731 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
12732 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
12733 (vect_create_epilog_for_reduction): Likewise.
12734 (vectorizable_live_operation): Likewise.
12735 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12736 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
12737 * tree-vect-stmts.c (vectorizable_call): Likewise.
12738 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
12740 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12742 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
12744 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
12745 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
12746 (vect_transform_loop): Likewise.
12747 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12749 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12751 * tree-vectorizer.h (vect_schedule_slp): Return void.
12752 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12753 (vect_schedule_slp): Likewise.
12755 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12757 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
12759 (vect_transform_loop): Update calls accordingly. Schedule SLP
12760 instances before the main loop, if any exist.
12762 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12764 PR tree-optimization/86749
12765 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
12766 If the lhs is used in a COND_EXPR, check that it is being used
12767 as the "then" or "else" value.
12769 2018-08-01 Tom de Vries <tdevries@suse.de>
12772 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12773 speculation_safe_value_not_needed.
12775 2018-08-01 Richard Biener <rguenther@suse.de>
12777 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
12778 as base and offset.
12780 2018-08-01 Martin Liska <mliska@suse.cz>
12782 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
12783 format how successful transformation is dumped.
12784 (gimple_mod_pow2_value_transform): Likewise.
12785 (gimple_mod_subtract_transform): Likewise.
12786 (gimple_stringops_transform): Likewise.
12788 2018-08-01 Martin Liska <mliska@suse.cz>
12790 PR value-prof/35543
12791 * value-prof.c (interesting_stringop_to_profile_p):
12792 Simplify the code and add BUILT_IN_MEMMOVE.
12793 (gimple_stringops_transform): Likewise.
12795 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
12797 * config/aarch64/aarch64-simd.md
12798 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
12799 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
12800 use GPI iterator instead of SI mode.
12802 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
12804 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
12805 rs6000_speculation_barrier.
12806 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
12807 new barrier pattern name.
12809 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
12811 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
12812 (speculation_barrier): New insn.
12814 2018-08-01 Richard Biener <rguenther@suse.de>
12817 * graphite.h: Include isl/id.h and isl/space.h to allow build
12820 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
12823 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12824 mode for COFF targets.
12825 * defaults.h (TARGET_COFF): Define.
12826 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
12827 TARGET_COFF): Define.
12828 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
12829 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
12830 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
12832 2018-07-31 Alexandre Oliva <oliva@adacore.com>
12834 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
12835 * gimple-streamer-out.c (output_bb): Save it.
12836 * lto-streamer-in.c (input_struct_function_base): Restore
12837 instance discriminator if available. Create map on demand.
12838 * lto-streamer-out.c (output_struct_function_base): Save it if
12840 * final.c (decl_to_instance_map): Document LTO strategy.
12842 2018-07-31 Alexandre Oliva <oliva@adacore.com>
12843 Olivier Hainque <hainque@adacore.com>
12845 * debug.h (decl_to_instance_map_t): New type.
12846 (decl_to_instance_map): Declare.
12847 (maybe_create_decl_to_instance_map): New inline function.
12848 * final.c (bb_discriminator, last_bb_discriminator): New statics,
12849 to track basic block discriminators.
12850 (final_start_function_1): Initialize them.
12851 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
12853 (decl_to_instance_map): New variable.
12854 (map_decl_to_instance, maybe_set_discriminator): New functions.
12855 (notice_source_line): Set discriminator.
12857 2018-07-31 Ian Lance Taylor <iant@golang.org>
12859 * targhooks.c (default_have_speculation_safe_value): Add
12862 2018-07-31 David Malcolm <dmalcolm@redhat.com>
12864 * dump-context.h: Include "pretty-print.h".
12865 (dump_context::refresh_dumps_are_enabled): New decl.
12866 (dump_context::emit_item): New decl.
12867 (class dump_context): Add fields "m_test_pp" and
12869 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12870 (temp_dump_context::get_dumped_text): New decl.
12871 (class temp_dump_context): Add field "m_pp".
12872 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
12873 (dump_context::refresh_dumps_are_enabled): ...and add a test for
12875 (set_dump_file): Update for above change.
12876 (set_alt_dump_file): Likewise.
12877 (dump_loc): New overload, taking a pretty_printer *.
12878 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
12879 to any test pretty-printer.
12880 (make_item_for_dump_gimple_stmt): New function, adapted from
12881 optinfo::add_gimple_stmt.
12882 (dump_context::dump_gimple_stmt): Call it, and use the result,
12883 eliminating the direct usage of dump_file and alt_dump_file in
12884 favor of indirectly using them via emit_item.
12885 (make_item_for_dump_gimple_expr): New function, adapted from
12886 optinfo::add_gimple_expr.
12887 (dump_context::dump_gimple_expr): Call it, and use the result,
12888 eliminating the direct usage of dump_file and alt_dump_file in
12889 favor of indirectly using them via emit_item.
12890 (make_item_for_dump_generic_expr): New function, adapted from
12892 (dump_context::dump_generic_expr): Call it, and use the result,
12893 eliminating the direct usage of dump_file and alt_dump_file in
12894 favor of indirectly using them via emit_item.
12895 (make_item_for_dump_printf_va): New function, adapted from
12896 optinfo::add_printf_va.
12897 (make_item_for_dump_printf): New function.
12898 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
12899 and use the result, eliminating the direct usage of dump_file and
12900 alt_dump_file in favor of indirectly using them via emit_item.
12901 (make_item_for_dump_dec): New function.
12902 (dump_context::dump_dec): Call it, and use the result,
12903 eliminating the direct usage of dump_file and alt_dump_file in
12904 favor of indirectly using them via emit_item.
12905 (make_item_for_dump_symtab_node): New function, adapted from
12906 optinfo::add_symtab_node.
12907 (dump_context::dump_symtab_node): Call it, and use the result,
12908 eliminating the direct usage of dump_file and alt_dump_file in
12909 favor of indirectly using them via emit_item.
12910 (dump_context::begin_scope): Reimplement, avoiding direct usage
12911 of dump_file and alt_dump_file in favor of indirectly using them
12913 (dump_context::emit_item): New member function.
12914 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12915 Set up test pretty-printer on the underlying context. Call
12916 refresh_dumps_are_enabled.
12917 (temp_dump_context::~temp_dump_context): Call
12918 refresh_dumps_are_enabled.
12919 (temp_dump_context::get_dumped_text): New member function.
12920 (selftest::verify_dumped_text): New function.
12921 (ASSERT_DUMPED_TEXT_EQ): New macro.
12922 (selftest::test_capture_of_dump_calls): Run all tests twice, with
12923 and then without optinfo enabled. Add uses of
12924 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
12925 * dumpfile.h: Update comment for the dump_* API.
12926 * optinfo-emit-json.cc
12927 (selftest::test_building_json_from_dump_calls): Update for new
12928 param for temp_dump_context ctor.
12929 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
12930 and "m_owned" field.
12931 (optinfo_item::~optinfo_item): Likewise.
12932 (optinfo::add_item): New member function.
12933 (optinfo::emit): Update comment.
12934 (optinfo::add_string): Delete.
12935 (optinfo::add_printf): Delete.
12936 (optinfo::add_printf_va): Delete.
12937 (optinfo::add_gimple_stmt): Delete.
12938 (optinfo::add_gimple_expr): Delete.
12939 (optinfo::add_tree): Delete.
12940 (optinfo::add_symtab_node): Delete.
12941 (optinfo::add_dec): Delete.
12942 * optinfo.h (class dump_context): New forward decl.
12943 (optinfo::add_item): New decl.
12944 (optinfo::add_string): Delete.
12945 (optinfo::add_printf): Delete.
12946 (optinfo::add_printf_va): Delete.
12947 (optinfo::add_gimple_stmt): Delete.
12948 (optinfo::add_gimple_expr): Delete.
12949 (optinfo::add_tree): Delete.
12950 (optinfo::add_symtab_node): Delete.
12951 (optinfo::add_dec): Delete.
12952 (optinfo::add_poly_int): Delete.
12953 (optinfo_item::optinfo_item): Remove "owned" param.
12954 (class optinfo_item): Remove field "m_owned".
12956 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12958 PR middle-end/86705
12959 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
12960 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
12961 requested variable alignment.
12962 (expand_one_ssa_partition): Likewise.
12963 (expand_one_var): Likewise.
12965 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12967 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
12968 to speculation_safe_value_not_needed.
12970 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12972 * targhooks.h (speculation_safe_value_not_needed): New prototype.
12973 * targhooks.c (speculation_safe_value_not_needed): New function.
12974 * target.def (have_speculation_safe_value): Update documentation.
12975 * doc/tm.texi: Regenerated.
12977 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12979 * config/aarch64/iterators.md (ALLI_TI): New iterator.
12980 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
12982 (despeculate_copy<ALLI:mode>_insn): New insn.
12983 (despeculate_copyti_insn): New insn.
12984 (despeculate_simple<ALLI:mode>): New insn
12985 (despeculate_simpleti): New insn.
12986 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
12988 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
12989 aarch64_speculation_safe_value.
12990 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
12992 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12994 * config/aarch64/aarch64-speculation.cc: New file.
12995 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
12996 before pass_reorder_blocks.
12997 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
12999 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
13000 X14 and X15 when tracking speculation.
13001 * config/aarch64/aarch64.md (register name constants): Add
13002 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
13003 (unspec): Add UNSPEC_SPECULATION_TRACKER.
13004 (speculation_barrier): New insn attribute.
13005 (cmp<mode>): Allow SP in comparisons.
13006 (speculation_tracker): New insn.
13007 (speculation_barrier): Add speculation_barrier attribute.
13008 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
13009 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
13010 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
13012 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13014 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
13015 aarch64_track_speculation is true.
13016 (tb<optab><mode>1): Likewise.
13017 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
13018 generate CB[N]Z when tracking speculation.
13019 (aarch64_split_compare_and_swap): Likewise.
13020 (aarch64_split_atomic_op): Likewise.
13022 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13024 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
13026 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13028 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
13029 (speculation_barrier): New insn.
13031 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13033 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
13034 * config/arm/arm.md (speculation_barrier): New expand.
13035 (speculation_barrier_insn): New pattern.
13037 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13039 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
13040 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
13041 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
13042 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
13044 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
13045 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
13046 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
13047 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
13048 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
13049 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
13050 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
13051 * builtins.c (expand_speculation_safe_value): New function.
13052 (expand_builtin): Call it.
13053 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
13054 * doc/extend.texi: Document __builtin_speculation_safe_value.
13055 * doc/md.texi: Document "speculation_barrier" pattern.
13056 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
13057 TARGET_HAVE_SPECULATION_SAFE_VALUE.
13058 * doc/tm.texi: Regenerated.
13059 * target.def (have_speculation_safe_value, speculation_safe_value): New
13061 * targhooks.c (default_have_speculation_safe_value): New function.
13062 (default_speculation_safe_value): New function.
13063 * targhooks.h (default_have_speculation_safe_value): Add prototype.
13064 (default_speculation_safe_value): Add prototype.
13066 2018-07-31 David Malcolm <dmalcolm@redhat.com>
13068 * dump-context.h (dump_context::dump_loc): New decl.
13069 * dumpfile.c (dump_context::dump_loc): New member function.
13070 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
13071 and dump_gimple_stmt.
13072 (dump_context::dump_gimple_expr_loc): Likewise, using
13074 (dump_context::dump_generic_expr_loc): Likewise, using
13076 (dump_context::dump_printf_loc_va): Likewise, using
13078 (dump_context::begin_scope): Explicitly using the global function
13079 "dump_loc", rather than the member function.
13081 2018-07-31 Martin Sebor <msebor@redhat.com>
13083 PR tree-optimization/86741
13084 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
13086 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
13088 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
13089 depend on whether prefetch instructions will be emitted or not.
13090 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
13091 will be emitted or not.
13092 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
13093 (TARGET_SETMEM_PFD): New macros.
13095 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13097 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
13098 (NULL_STMT_VEC_INFO): Delete.
13099 (stmt_vec_info::operator*): Likewise.
13100 (stmt_vec_info::operator gimple *): Likewise.
13101 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
13102 of NULL_STMT_VEC_INFO.
13103 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13104 (vect_reassociating_reduction_p): Likewise.
13105 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13106 (vectorizable_store): Likewise.
13107 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
13108 (vec_info::free_stmt_vec_infos): Likewise.
13110 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13112 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
13113 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
13115 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13117 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
13118 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13119 (vec_info::free_stmt_vec_info): New private member functions.
13120 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
13121 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
13122 * tree-parloops.c (gather_scalar_reductions): Remove calls to
13123 set_stmt_vec_info_vec and free_stmt_vec_infos.
13124 * tree-vect-loop.c (_loop_vec_info): Remove call to
13125 set_stmt_vec_info_vec.
13126 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
13127 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
13128 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
13129 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13130 (vec_info::free_stmt_vec_info): ...these new functions. Remove
13131 assignments in {vec_info::,}new_stmt_vec_info that are redundant
13132 with the clearing in the xcalloc.
13133 (stmt_vec_info_vec): Delete.
13134 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
13135 (vectorize_loops): Likewise.
13136 (vec_info::~vec_info): Remove argument from call to
13137 free_stmt_vec_infos.
13138 (vec_info::add_stmt): Remove vinfo argument from call to
13141 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13143 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
13144 rather than a gimple stmt.
13145 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
13146 information for pattern statements when passed the original
13147 statement; instead wait to be passed the pattern statement itself.
13148 Don't call set_vinfo_for_stmt here.
13149 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
13150 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
13151 stmt_vec_infos here.
13152 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
13153 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
13154 stmt_vec_infos entry.
13156 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13158 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
13159 * tree-vectorizer.c (vec_info::replace_stmt): New function.
13160 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
13161 * tree-vect-stmts.c (vectorizable_call): Likewise.
13162 (vectorizable_simd_clone_call): Likewise.
13164 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13166 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
13167 * tree-vectorizer.c (vec_info::remove_stmt): New function.
13168 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
13169 * tree-vect-loop.c (vect_transform_loop): Likewise.
13170 * tree-vect-slp.c (vect_schedule_slp): Likewise.
13171 * tree-vect-stmts.c (vect_remove_stores): Likewise.
13173 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13175 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
13176 (vect_dr_stmt): Delete.
13177 * tree-vectorizer.c (vec_info::lookup_dr): New function.
13178 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
13180 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13181 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
13182 (vect_verify_datarefs_alignment, vect_peeling_supportable)
13183 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13184 (vect_analyze_data_refs): Likewise.
13185 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
13187 (vect_find_same_alignment_drs): Likewise.
13188 (vect_slp_analyze_node_dependences): Update calls accordingly.
13189 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
13190 instead of DR_VECT_AUX.
13191 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
13192 of a vector data references. Use vec_info::lookup_dr instead of
13194 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
13195 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
13196 instead of DR_VECT_AUX.
13198 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13200 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
13202 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13204 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13205 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13206 (vect_gen_prolog_loop_niters): Likewise.
13208 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13210 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
13211 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
13212 (vect_known_alignment_in_bytes, vect_dr_behavior)
13213 (vect_get_scalar_dr_size): Take references as dr_vec_infos
13214 instead of data_references. Update calls to other routines for
13215 which the same change has been made.
13216 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
13217 dr_vec_infos instead of stmt_vec_infos.
13218 (vect_analyze_data_ref_dependence): Update call accordingly.
13219 (vect_slp_analyze_data_ref_dependence)
13220 (vect_record_base_alignments): Use DR_VECT_AUX.
13221 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
13222 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
13223 (vector_alignment_reachable_p, vect_get_data_access_cost)
13224 (vect_peeling_supportable, vect_analyze_group_access_1)
13225 (vect_analyze_group_access, vect_analyze_data_ref_access)
13226 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
13227 (vect_compile_time_alias, vect_small_gap_p)
13228 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
13229 (vect_supportable_dr_alignment): Take references as dr_vec_infos
13230 instead of data_references. Update calls to other routines for
13231 which the same change has been made.
13232 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
13233 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13234 (vect_slp_analyze_and_verify_node_alignment)
13235 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13236 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13237 (vect_setup_realignment): Use dr_vec_infos. Update calls after
13239 (_vect_peel_info::dr): Replace with...
13240 (_vect_peel_info::dr_info): ...this new field.
13241 (vect_peeling_hash_get_most_frequent)
13242 (vect_peeling_hash_choose_best_peeling): Update accordingly.
13243 (vect_peeling_hash_get_lowest_cost):
13244 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
13245 routines for which the same change has been made.
13246 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
13248 * tree-vect-loop-manip.c (get_misalign_in_elems)
13249 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
13251 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13252 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
13253 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
13254 (get_group_load_store_type, get_negative_load_store_type)
13255 (vect_get_data_ptr_increment, vectorizable_store)
13256 (vectorizable_load): Likewise.
13257 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
13258 Update calls to other routines for which the same change has been made.
13260 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13262 * tree-vectorizer.h (vec_info::move_dr): New member function.
13263 (dataref_aux): Rename to...
13264 (dr_vec_info): ...this and add "dr" and "stmt" fields.
13265 (_stmt_vec_info::dr_aux): Update accordingly.
13266 (_stmt_vec_info::data_ref_info): Delete.
13267 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
13268 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
13269 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
13270 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
13272 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
13273 (STMT_VINFO_DR_INFO): New macro.
13274 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
13275 (set_dr_misalignment): Update after rename of dataref_aux.
13276 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
13277 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
13278 initialization of STMT_VINFO_DATA_REF.
13279 * tree-vectorizer.c (vec_info::move_dr): New function.
13280 * tree-vect-patterns.c (vect_recog_bool_pattern)
13281 (vect_recog_mask_conversion_pattern)
13282 (vect_recog_gather_scatter_pattern): Use it.
13283 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
13284 the "dr" and "stmt" fields of dr_vec_info instead of
13285 STMT_VINFO_DATA_REF.
13287 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13289 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
13290 (is_pattern_stmt_p): Use it.
13291 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
13292 on pattern statements.
13294 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13296 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
13297 original stmt as a stmt_vec_info rather than a gimple stmt.
13298 (vect_pattern_recog_1): Take the statement directly as a
13299 stmt_vec_info, rather than via a gimple_stmt_iterator.
13300 Update call to vect_mark_pattern_stmts.
13301 (vect_pattern_recog): Update calls accordingly.
13303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13305 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
13306 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
13307 a vect_def_type for the first argument.
13308 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
13309 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
13310 operand if it isn't defined by a vectorized statement.
13311 (vect_build_gather_load_calls): Remove the mask_dt argument and
13312 update calls to vect_get_vec_def_for_stmt_copy.
13313 (vectorizable_bswap): Likewise the dt argument.
13314 (vectorizable_call): Update calls to vectorizable_bswap and
13315 vect_get_vec_def_for_stmt_copy.
13316 (vectorizable_simd_clone_call, vectorizable_assignment)
13317 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
13318 (vectorizable_comparison): Update calls to
13319 vect_get_vec_def_for_stmt_copy.
13320 (vectorizable_store): Likewise. Remove now-unnecessary calls to
13321 vect_is_simple_use.
13322 (vect_get_loop_based_defs): Remove dt argument and update call
13323 to vect_get_vec_def_for_stmt_copy.
13324 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
13325 and vect_get_vec_def_for_stmt_copy.
13326 (vectorizable_load): Update calls to vect_build_gather_load_calls
13327 and vect_get_vec_def_for_stmt_copy.
13328 * tree-vect-loop.c (vect_create_epilog_for_reduction)
13329 (vectorizable_reduction, vectorizable_live_operation): Update calls
13330 to vect_get_vec_def_for_stmt_copy.
13332 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13334 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
13335 and gimple stmt arguments with a stmt_vec_info.
13336 (vect_record_base_alignments): Update calls accordingly.
13337 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
13338 and gimple stmt arguments with a stmt_vec_info.
13339 (vect_build_slp_tree_1): Remove vinfo argument and update call
13340 to vect_record_max_nunits.
13341 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
13342 and vect_record_max_nunits.
13344 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13346 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
13347 file and take a stmt_vec_info instead of a gimple stmt.
13348 (supportable_widening_operation, vect_finish_replace_stmt)
13349 (vect_finish_stmt_generation, vect_get_store_rhs)
13350 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
13351 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
13352 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
13353 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
13354 (vect_create_data_ref_ptr, bump_vector_ptr)
13355 (vect_permute_store_chain, vect_setup_realignment)
13356 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
13357 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
13358 (vectorizable_reduction, vectorizable_induction)
13359 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
13360 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
13361 than gimple stmts as arguments.
13362 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
13363 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
13364 (can_group_stmts_p, vect_check_gather_scatter)
13365 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13366 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
13367 (vect_permute_load_chain, vect_shift_permute_load_chain)
13368 (vect_transform_grouped_load)
13369 (vect_record_grouped_load_vectors): Likewise.
13370 * tree-vect-loop.c (vect_fixup_reduc_chain)
13371 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
13372 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
13373 (vectorizable_reduction, vectorizable_induction)
13374 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
13375 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
13376 (vect_get_load_store_mask): Likewise.
13377 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
13378 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
13379 * tree-vect-stmts.c (vect_mark_relevant)
13380 (is_simple_and_all_uses_invariant)
13381 (exist_non_indexing_operands_for_use_p, process_use)
13382 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
13383 (vect_get_vec_def_for_operand, vect_get_vec_defs)
13384 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
13385 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
13386 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
13387 (get_negative_load_store_type, get_load_store_type)
13388 (vect_check_load_store_mask, vect_check_store_rhs)
13389 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
13390 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13391 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13392 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13393 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
13394 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
13395 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
13396 (supportable_widening_operation): Likewise.
13398 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13400 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
13401 a stmt_vec_info instead of a gcall.
13402 (vect_check_gather_scatter): Update call accordingly.
13403 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
13405 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
13406 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
13407 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
13408 instead of a gimple stmt.
13409 (vect_transform_loop): Update calls accordingly.
13410 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
13411 stmt_vec_infos instead of gimple stmts.
13412 (vect_analyze_slp_instance): Update use accordingly.
13413 * tree-vect-stmts.c (read_vector_array, write_vector_array)
13414 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
13415 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
13416 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
13417 (vect_gen_widened_results_half, vect_get_loop_based_defs)
13418 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
13419 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
13420 down to subroutines.
13422 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13424 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
13425 of the worklist from a vector of gimple stmts to a vector of
13427 * tree-vect-stmts.c (vect_mark_relevant, process_use)
13428 (vect_mark_stmts_to_be_vectorized): Likewise
13430 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13432 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
13433 statement before passing it to vect_analyze_stmt.
13434 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
13435 the chain of phi vector definitions. Track the exit phi via its
13437 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
13438 STMT_VINFO_REDUC_DEF.
13439 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
13440 stmt_vec_infos to handle the statement chains.
13441 (vect_get_slp_defs): Record the first statement in the node
13442 using a stmt_vec_info.
13443 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
13444 statements here and pass their stmt_vec_info down to subroutines.
13445 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
13446 down to vect_finish_stmt_generation.
13447 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
13448 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
13449 stmt_vec_infos to subroutines.
13450 (vect_remove_stores): Use stmt_vec_infos to handle the statement
13453 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13455 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
13456 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
13457 (vect_permute_store_chain, vect_setup_realignment)
13458 (vect_permute_load_chain, vect_shift_permute_load_chain)
13459 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
13460 stmts internally, and when passing values to other vectorizer routines.
13461 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13462 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
13463 (vect_analyze_loop_operations, get_initial_def_for_reduction)
13464 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
13465 (vectorizable_reduction, vectorizable_induction)
13466 (vectorizable_live_operation, vect_transform_loop_stmt)
13467 (vect_transform_loop): Likewise.
13468 * tree-vect-patterns.c (vect_reassociating_reduction_p)
13469 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
13470 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
13471 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13472 (vect_slp_analyze_node_operations_1): Likewise.
13473 * tree-vect-stmts.c (vect_mark_relevant, process_use)
13474 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
13475 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
13476 (vect_finish_stmt_generation_1, get_group_load_store_type)
13477 (get_load_store_type, vect_build_gather_load_calls)
13478 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13479 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13480 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13481 (vectorizable_store, vectorizable_load, vectorizable_condition)
13482 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
13483 (supportable_widening_operation): Likewise.
13484 (vect_get_vector_types_for_stmt): Likewise.
13485 * tree-vectorizer.h (vect_dr_behavior): Likewise.
13487 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13489 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13490 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
13491 (vect_permute_store_chain, vect_permute_load_chain)
13492 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
13493 repeated stmt_vec_info lookups.
13494 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13495 (vect_update_ivs_after_vectorizer): Likewise.
13496 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
13497 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13498 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
13499 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13500 (vect_bb_slp_scalar_cost): Likewise.
13501 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
13503 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13505 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
13506 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
13507 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
13508 to get gassigns and gcalls, rather than operating on generc gimple
13510 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
13511 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
13512 (vectorizable_load, vect_analyze_stmt): Likewise.
13513 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
13515 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13517 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
13518 return stmt_vec_infos rather than gimple stmts. Do not accept
13520 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
13522 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
13523 Update use of get_later_stmt.
13524 (vect_get_constant_vectors): Update call accordingly.
13525 (vect_schedule_slp_instance): Likewise
13526 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
13527 (vect_slp_analyze_instance_dependence): Likewise.
13528 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
13530 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13532 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
13533 (stmt_info_for_cost::stmt_info): ...this new field.
13534 (add_stmt_costs): Update accordingly.
13535 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13536 (vect_get_known_peeling_cost): Likewise.
13537 (vect_estimate_min_profitable_iters): Likewise.
13538 * tree-vect-stmts.c (record_stmt_cost): Likewise.
13540 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13542 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
13543 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13544 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13546 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
13548 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13550 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
13551 a gimple stmt to a stmt_vec_info.
13552 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
13554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13556 * tree-vectorizer.h (vec_info::grouped_stores): Change from
13557 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13558 (_loop_vec_info::reduction_chains): Likewise.
13559 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
13561 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13563 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13565 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
13566 a gimple stmt to a stmt_vec_info.
13567 (_stmt_vec_info::next_element): Likewise.
13568 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
13569 (vect_slp_analyze_and_verify_node_alignment)
13570 (vect_analyze_group_access_1, vect_analyze_group_access)
13571 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
13572 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
13573 (vect_supportable_dr_alignment): Update accordingly.
13574 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
13575 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
13576 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
13577 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13578 * tree-vect-slp.c (vect_build_slp_tree_1)
13579 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
13580 (vect_split_slp_store_group, vect_analyze_slp_instance)
13581 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
13582 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
13583 (get_group_load_store_type, get_load_store_type)
13584 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
13585 (vect_transform_stmt, vect_remove_stores): Likewise.
13587 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13589 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
13590 than a gimple stmt.
13591 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13592 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
13593 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
13594 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
13595 (vector_alignment_reachable_p, vect_get_data_access_cost)
13596 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
13597 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
13598 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13599 (vect_analyze_group_access_1, vect_analyze_group_access)
13600 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
13601 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
13602 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
13603 result of vect_dr_stmt and use the stmt_vec_info instead of
13604 the associated gimple stmt.
13605 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13606 (vect_gen_prolog_loop_niters): Likewise.
13607 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13609 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13611 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
13612 to a vec<stmt_vec_info>.
13613 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
13614 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
13615 vec<stmt_vec_info>.
13616 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
13617 to a vec<stmt_vec_info>.
13618 (bst_traits::value_type, bst_traits::value_type): Likewise.
13619 (bst_traits::hash): Update accordingly.
13620 (vect_get_and_check_slp_defs): Change the stmts parameter from
13621 a vec<gimple *> to a vec<stmt_vec_info>.
13622 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
13623 (vect_build_slp_tree): Likewise.
13624 (vect_build_slp_tree_2): Likewise. Update uses of
13625 SLP_TREE_SCALAR_STMTS.
13626 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
13627 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
13628 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
13629 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
13630 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
13631 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
13632 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
13633 (vect_get_constant_vectors, vect_get_slp_defs)
13634 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
13635 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
13636 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
13637 instead of gimple stmts.
13638 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
13639 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
13640 (vect_slp_analyze_instance_dependence): Update uses of
13641 SLP_TREE_SCALAR_STMTS.
13642 (vect_slp_analyze_and_verify_node_alignment): Likewise.
13643 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
13644 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
13645 (get_initial_defs_for_reduction): Likewise.
13646 (vect_create_epilog_for_reduction): Likewise.
13647 (vectorize_fold_left_reduction): Likewise.
13648 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
13649 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
13650 (can_vectorize_live_stmts): Likewise.
13652 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13654 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
13655 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13656 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
13658 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
13660 (gather_scalar_reductions): Update after above interface changes.
13661 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
13662 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
13664 (vect_force_simple_reduction): Likewise.
13665 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
13666 LOOP_VINFO_REDUCTIONS.
13667 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13669 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13671 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
13672 a gimple stmt to a stmt_vec_info.
13673 * tree-vect-loop.c (vect_active_double_reduction_p)
13674 (vect_force_simple_reduction, vectorizable_reduction): Update
13677 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13679 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
13680 vec<gimple *> to a vec<stmt_vec_info>.
13681 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
13682 the reduction_phis argument from a vec<gimple *> to a
13683 vec<stmt_vec_info>.
13684 (vectorizable_reduction): Likewise the phis local variable that
13685 is passed to vect_create_epilog_for_reduction. Update for new type
13686 of SLP_TREE_VEC_STMTS.
13687 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
13688 (vectorizable_live_operation): Likewise.
13689 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
13690 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
13692 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13694 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
13695 a gimple stmt to a stmt_vec_info.
13696 (vectorizable_condition, vectorizable_live_operation)
13697 (vectorizable_reduction, vectorizable_induction): Pass back the
13698 vectorized statement as a stmt_vec_info.
13699 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
13700 use of STMT_VINFO_VEC_STMT.
13701 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
13702 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
13703 as stmt_vec_infos rather than gimple stmts.
13704 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
13705 to a stmt_vec_info.
13706 (vectorizable_live_operation): Likewise.
13707 (vectorizable_reduction, vectorizable_induction): Likewise,
13708 updating use of STMT_VINFO_VEC_STMT.
13709 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
13710 of STMT_VINFO_VEC_STMT.
13711 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
13712 (vectorizable_simd_clone_call, vectorizable_conversion)
13713 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13714 (vectorizable_store, vectorizable_load, vectorizable_condition)
13715 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
13716 from a gimple stmt to a stmt_vec_info.
13717 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
13718 pointer to a stmt_vec_info to the vectorizable_* routines.
13720 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13722 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
13723 a gimple stmt to a stmt_vec_info.
13724 (is_pattern_stmt_p): Update accordingly.
13725 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
13726 (vect_record_grouped_load_vectors): Likewise.
13727 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
13728 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
13729 (vect_model_reduction_cost): Likewise.
13730 (vect_create_epilog_for_reduction): Likewise.
13731 (vectorizable_reduction, vectorizable_induction): Likewise.
13732 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13733 Return the stmt_vec_info for the pattern statement.
13734 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
13735 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
13736 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13737 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
13738 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
13739 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
13740 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
13741 (free_stmt_vec_info, vect_is_simple_use): Likewise.
13743 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13745 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
13746 (vect_finish_stmt_generation): Likewise.
13747 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13748 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
13749 (vect_build_gather_load_calls): Use the return value of the above
13750 functions instead of a separate call to vinfo_for_stmt. Use narrow
13751 scopes for the input gimple stmt and wider scopes for the associated
13752 stmt_vec_info. Use vec_info::lookup_def when setting these
13753 stmt_vec_infos from an SSA_NAME definition.
13754 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13755 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13756 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13757 (vectorizable_store, vectorizable_load, vectorizable_condition)
13758 (vectorizable_comparison): Likewise.
13759 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
13760 (vectorizable_reduction): Likewise.
13762 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13764 * tree-vectorizer.h (vect_is_simple_use): Add an optional
13765 stmt_vec_info * parameter before the optional gimple **.
13766 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13767 (process_use, vect_get_vec_def_for_operand_1): Update callers.
13768 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
13769 * tree-vect-loop.c (vectorizable_reduction): Likewise.
13770 (vectorizable_live_operation): Likewise.
13771 * tree-vect-patterns.c (type_conversion_p): Likewise.
13772 (vect_look_through_possible_promotion): Likewise.
13773 (vect_recog_rotate_pattern): Likewise.
13774 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13778 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
13779 a typedef to a wrapper class.
13780 (NULL_STMT_VEC_INFO): New macro.
13781 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
13782 (stmt_vec_info::operator*): New function.
13783 (stmt_vec_info::operator gimple *): Likewise.
13784 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
13785 (add_stmt_costs): Likewise.
13786 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
13787 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13788 (vect_get_known_peeling_cost): Likewise.
13789 (vect_estimate_min_profitable_iters): Likewise.
13790 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13791 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
13792 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13793 (vectorizable_store, free_stmt_vec_infos): Likewise.
13794 (new_stmt_vec_info): Change return type of xcalloc to
13797 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13799 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
13800 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
13801 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
13802 a single_imm_use-based sequence.
13803 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
13805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13807 * tree-vectorizer.h (vec_info::lookup_def): Declare.
13808 * tree-vectorizer.c (vec_info::lookup_def): New function.
13809 * tree-vect-patterns.c (vect_get_internal_def): Use it.
13810 (vect_widened_op_tree): Likewise.
13811 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13812 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
13813 (vectorizable_reduction): Likewise.
13814 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
13816 (vect_is_slp_reduction): Update calls accordingly. Use
13817 vec_info::lookup_def.
13818 (vect_is_simple_reduction): Likewise
13819 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
13821 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13823 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
13824 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
13825 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
13827 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
13828 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
13829 (vect_update_vf_for_slp, vect_analyze_loop_operations)
13830 (vect_is_slp_reduction, vectorizable_induction)
13831 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
13832 * tree-vect-patterns.c (vect_init_pattern_stmt):
13833 (vect_determine_min_output_precision_1, vect_determine_precisions)
13834 (vect_pattern_recog): Likewise.
13835 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
13836 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
13837 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
13838 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13839 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
13840 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
13841 info field from a loop to a loop_vec_info.
13843 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13845 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
13846 (vec_info::add_stmt): Declare.
13847 * tree-vectorizer.c (vec_info::add_stmt): New function.
13848 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
13849 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
13850 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13851 (vectorizable_induction): Likewise.
13852 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
13853 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13854 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
13855 (vectorizable_load): Likewise.
13856 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13857 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
13858 (vect_recog_gather_scatter_pattern): Likewise.
13859 (append_pattern_def_seq): Likewise. Remove a check that is
13860 performed by add_stmt itself.
13862 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13864 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
13865 which make_ssa_name was called with new_stmt before new_stmt
13868 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13870 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
13872 (vect_is_slp_reduction): ...here...
13873 (vect_is_simple_reduction): ...and here. Remove repetition of tests
13874 that are already known to be false.
13876 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13878 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
13879 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
13880 STMT_VINFO_NUM_SLP_USES when it's true.
13881 (vect_free_slp_instance): Add a final_p parameter and pass it to
13882 vect_free_slp_tree.
13883 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
13884 (vect_analyze_slp_instance): Likewise.
13885 (vect_slp_analyze_operations): Likewise.
13886 (vect_slp_analyze_bb_1): Likewise.
13887 * tree-vectorizer.c (vec_info): Likewise.
13888 * tree-vect-loop.c (vect_transform_loop): Likewise.
13890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13892 * tree-vect-loop.c (vectorizable_reduction): Assert that the
13893 function is not called for second and subsequent members of
13896 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13898 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
13899 cases for nested loops from here to ...
13900 (vect_create_epilog_for_reduction): ...here. Only call
13901 vect_is_simple_use for inner-loop reductions.
13903 2018-07-31 Martin Liska <mliska@suse.cz>
13905 PR gcov-profile/85338
13906 PR gcov-profile/85350
13907 PR gcov-profile/85372
13908 * profile.c (struct location_triplet): New.
13909 (struct location_triplet_hash): Likewise.
13910 (output_location): Do not output a BB that
13911 is already recorded for a line.
13912 (branch_prob): Use streamed_locations.
13914 2018-07-31 Martin Liska <mliska@suse.cz>
13916 PR gcov-profile/85370
13917 * coverage.c (coverage_begin_function): Do not mark target
13918 clones as artificial functions.
13920 2018-07-31 Martin Liska <mliska@suse.cz>
13922 PR gcov-profile/83813
13923 PR gcov-profile/84758
13924 PR gcov-profile/85217
13925 PR gcov-profile/85332
13926 * profile.c (branch_prob): Do not record GOTO expressions
13927 for GIMPLE statements which locations are already streamed.
13929 2018-07-31 Olivier Hainque <hainque@adacore.com>
13931 * gcc.c (handle_spec_function): Accept a soft_matched_part
13932 argument, as do_spec_1. Pass it down to ...
13933 (eval_spec_function): Accept a soft_matched_part argument,
13934 and pass it down to ...
13935 (do_spec_2): Accept a soft_matched_part argument, and pass
13936 it down to do_spec_1.
13937 (do_spec_1): Pass soft_matched_part to handle_spec_function.
13938 (handle_braces): Update call to handle_spec_function.
13939 (driver::set_up_specs): Update calls to do_spec_2.
13940 (compare_debug_dump_opt_spec_function): Likewise.
13941 (compare_debug_self_opt_spec_function): Likewise.
13943 2018-07-31 Olivier Hainque <hainque@adacore.com>
13945 * common.opt (nolibc): New option.
13946 * doc/invoke.texi (Link Options): Document it.
13947 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
13948 * config/alpha/linux.h: Likewise.
13949 * config/arc/elf.h: Likewise.
13950 * config/arm/uclinux-elf.h: Likewise.
13951 * config/arm/unknown-elf.h: Likewise.
13952 * config/avr/avrlibc.h: Likewise.
13953 * config/bfin/bfin.h: Likewise.
13954 * config/bfin/linux.h: Likewise.
13955 * config/bfin/uclinux.h: Likewise.
13956 * config/darwin.h: Likewise.
13957 * config/darwin10.h: Likewise.
13958 * config/darwin12.h: Likewise.
13959 * config/gnu-user.h: Likewise.
13960 * config/lm32/uclinux-elf.h: Likewise.
13961 * config/pa/pa-hpux11.h: Likewise.
13962 * config/pa/pa64-hpux.h: Likewise.
13963 * config/sparc/sparc.h: Likewise.
13965 2018-07-31 Olivier Hainque <hainque@adacore.com>
13967 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
13968 undefined variables.
13970 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
13973 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
13974 instead of GEN_INT.
13976 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13978 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
13979 terminated string literal.
13981 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
13983 PR rtl-optimization/85160
13984 * combine.c (is_just_move): New function.
13985 (try_combine): Allow combining two instructions into two if neither of
13986 the original instructions was a move.
13988 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
13991 * doc/extend.texi (Global Register Variables): Discourage use of type
13993 (Local Register Variables): Likewise.
13995 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
13997 PR tree-optimization/86506
13998 * hwint.h (ceil_log2): Resync with hwint.c implementation.
14000 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
14003 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
14004 hard_regno, make sure no insn between `from` and `to` clobbers it.
14006 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
14007 Tom de Vries <tdevries@suse.de>
14009 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
14010 (PTX_DEFAULT_RUNTIME_DIM): ... this.
14011 (nvptx_goacc_validate_dims): Set default worker and gang dims to
14012 PTX_DEFAULT_RUNTIME_DIM.
14013 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
14015 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
14017 * config/pa/pa.c (pa_output_addr_vec): Align address table.
14018 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
14019 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
14021 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
14023 * config/rs6000/constraints.md (wG constraint): Delete, no longer
14025 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
14026 predicate to reflect toc fusion has been deleted.
14027 (toc_fusion_mem_raw): Delete, no longer used.
14028 (toc_fusion_mem_wrapped): Likewise.
14029 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
14031 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
14032 Delete, no longer used.
14033 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
14034 meant to be used for toc fusion.
14035 (rs6000_debug_print_mode): Delete toc fusion debugging.
14036 (rs6000_debug_reg_global): Likewise.
14037 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
14038 fusion and secondary reload support that were never used.
14039 (rs6000_option_override_internal): Delete TOC fusion, that was only
14040 partially defined, and it did not work unless you also used the
14042 (rs6000_legitimate_address_p): Delete TOC fusion support.
14043 (rs6000_opt_masks): Likewise.
14044 (fusion_wrap_memory_address): Delete function, no longer used.
14045 (fusion_split_address); Delete TOC fusion support.
14046 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
14047 longer used with toc fusion being deleted.
14048 (TARGET_TOC_FUSION_FP): Likewise.
14049 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
14051 (toc fusion spliter): Delete TOC fusion support.
14052 (toc_fusionload_<mode>): Likewise.
14053 (toc_fusionload_di): Likewise.
14054 (fusion_gpr_load_<mode>): Delete generator function, this insn no
14055 longer needs to be named. Rename predicate to delete TOC fusion.
14056 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
14057 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
14058 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
14059 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
14060 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
14062 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
14064 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
14065 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
14066 __int128 in built-in function prototypes.
14067 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
14068 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
14070 2018-07-27 Martin Sebor <msebor@redhat.com>
14072 PR tree-optimization/86696
14073 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
14074 types, including enums.
14075 (handle_char_store): Be prepared for the above function to fail.
14077 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
14079 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
14080 when optimization level is lower than 2 or optimize for size.
14082 2018-07-26 Martin Sebor <msebor@redhat.com>
14084 PR tree-optimization/86043
14085 PR tree-optimization/86042
14086 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
14087 (get_string_cst_length): Rename...
14088 (get_min_string_length): ...to this. Add argument.
14089 (handle_char_store): Extend to handle multi-character stores by
14091 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
14092 * tree.h (initializer_zerop): Add argument.
14094 2018-07-26 Jakub Jelinek <jakub@redhat.com>
14096 PR middle-end/86660
14097 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
14098 declare target to variables if they have always,{to,from,tofrom} map
14101 2018-07-26 Martin Liska <mliska@suse.cz>
14104 * lto-wrapper.c: Add linker_output as prefix
14105 for ltrans_output_file.
14107 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
14109 PR rtl-optimization/85805
14110 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
14111 value for hard registers if that was written in the same mode.
14113 2018-07-26 Martin Liska <mliska@suse.cz>
14115 PR gcov-profile/86536
14116 * gcov.c (format_gcov): Use printf format %.*f directly
14117 and do not handle special values.
14119 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
14121 * common/config/arc/arc-common.c (arc_option_optimization_table):
14122 Update default optimizations for size.
14124 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
14126 * config/arc/arc.md (movsf_insn): Add short instruction selection.
14127 * config/arc/constraints.md (CfZ): New constraint.
14128 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
14129 (subsf3_fpu): Likewise.
14130 (cmpsf_fpu): Likewise.
14131 (cmpsf_fpu_uneq): Likewise.
14133 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
14135 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
14137 (arc_is_uncached_mem_p): uncached applies to both the variable and
14140 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
14142 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
14145 2018-07-25 David Malcolm <dmalcolm@redhat.com>
14147 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
14148 field "m_scopes" from vec to auto_vec.
14150 2018-07-25 Martin Liska <mliska@suse.cz>
14152 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
14155 2018-07-25 Richard Biener <rguenther@suse.de>
14158 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
14159 special wrt context_die late.
14160 (gen_subprogram_die): Re-use DIEs in local scope.
14162 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
14164 PR tree-optimization/86644
14165 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
14167 2018-07-25 Martin Liska <mliska@suse.cz>
14169 PR middle-end/86645
14170 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
14171 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
14173 2018-07-25 Martin Liska <mliska@suse.cz>
14176 * params.def: Explain ASan abbreviation and provide
14177 a documentation link.
14179 2018-07-24 Martin Sebor <msebor@redhat.com>
14181 PR tree-optimization/86622
14182 PR tree-optimization/86532
14183 * builtins.h (string_length): Declare.
14184 * builtins.c (c_strlen): Correct handling of non-constant offsets.
14185 (check_access): Be prepared for non-constant length ranges.
14186 (string_length): Make extern.
14187 * expr.c (string_constant): Only handle the minor non-constant
14188 array index. Use string_constant to compute the length of
14189 a generic string constant.
14191 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
14193 PR tree-optimization/86618
14194 * tree-vect-stmts.c (vectorizable_call): Don't take the address
14195 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
14197 2018-07-24 David Malcolm <dmalcolm@redhat.com>
14199 PR tree-optimization/86636
14200 * json.cc (json::object::set): Fix comment. Add assertions.
14201 (json::array::append): Move here from json.h. Add comment and an
14203 (json::string::string): Likewise.
14204 * json.h (json::array::append): Move to json.cc.
14205 (json::string::string): Likewise.
14206 * optinfo-emit-json.cc
14207 (optrecord_json_writer::impl_location_to_json): Assert that we
14208 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
14209 wrapper around it. Expand the location once, rather than three
14211 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
14212 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
14214 (optrecord_json_writer::optinfo_to_json): Likewise, in four
14215 places. Fix some overlong lines.
14217 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
14219 * config/aarch64/aarch64-simd.md
14220 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
14221 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
14222 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
14223 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
14224 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
14225 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
14226 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
14227 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
14228 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
14230 2018-07-24 Jakub Jelinek <jakub@redhat.com>
14232 PR middle-end/86627
14233 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
14234 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
14235 and abs_d == d, do the power of two handling if profitable.
14237 2018-07-24 Richard Biener <rguenther@suse.de>
14239 * match.pd: Add BIT_FIELD_REF canonicalizations.
14241 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
14244 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
14246 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
14248 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
14249 terminated STRING_CST object.
14251 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
14253 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
14255 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
14257 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
14258 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
14259 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
14260 the elements into a register.
14261 (rs6000_split_v4si_init_di_reg): Delete.
14262 (rs6000_split_v4si_init): Delete.
14263 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
14264 (vsx_init_v4si): Rewrite as a define_expand.
14266 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
14268 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
14269 zero_extend argument from memory): New.
14271 2018-07-22 Martin Sebor <msebor@redhat.com>
14274 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
14275 diagnosing calls with unknown arguments unless -Walloca-larger-than
14276 is restricted to less than PTRDIFF_MAX bytes.
14278 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
14280 * doc/gcov.texi (Invoking Gcov): Editorial changes.
14282 2018-07-20 David Malcolm <dmalcolm@redhat.com>
14284 * pretty-print.c (text_info::set_location): Remove redundant
14285 "line_table" parameter from call to rich_location::set_range.
14287 2018-07-20 Martin Sebor <msebor@redhat.com>
14289 PR middle-end/82063
14290 * builtins.c (expand_builtin_alloca): Adjust.
14291 * calls.c (alloc_max_size): Simplify.
14292 * cgraphunit.c (cgraph_node::expand): Adjust.
14293 * common.opt (larger_than_size, warn_frame_larger_than): Remove
14295 (frame_larger_than_size): Same.
14296 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
14297 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
14299 * doc/invoke.texi (GCC Command Options): Document option arguments.
14300 Explain byte-size arguments and suffixes.
14301 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
14302 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
14303 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
14304 * doc/options.texi (UInteger): Expand.
14305 (Host_Wide_Int, ByteSize): Document new properties.
14306 * final.c (final_start_function_1): Include sizes in an error message.
14307 * function.c (frame_offset_overflow): Same.
14308 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
14309 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
14310 Diagnose unbounded alloca calls only for limits of less than
14312 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
14313 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
14315 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
14316 only for limits of less than PTRDIFF_MAX.
14317 * langhooks-def.h (lhd_handle_option): Change function argument
14319 * langhooks.c (lhd_handle_option): Same.
14320 * langhooks.h (handle_option): Same.
14321 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
14323 (var_type, var_type_struct): Same.
14324 (var_set): Handle ByteSize flag.
14325 * optc-gen.awk: Add comments to output to ease debugging. Make
14326 use of HOST_WIDE_INT where appropriate.
14327 * opts-gen-save.awk: Use %lx to format unsigned long.
14328 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
14329 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
14330 arguments. Parse bytes-size suffixes.
14331 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
14332 (enum_value_to_arg): Same.
14333 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
14334 (handle_option): Adjust.
14335 (generate_option): Change function argument to HOST_WIDE_INT.
14336 (cmdline_handle_error): Adjust.
14337 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
14338 (set_option): Change function argument to HOST_WIDE_INT.
14339 (option_enabled): Handle cl_host_wide_int.
14340 (get_option_state): Handle CLVC_SIZE.
14341 (control_warning_option): Same.
14342 * opts.c (common_handle_option): Change function argument to
14343 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
14344 OPT_Wvla_larger_than_.
14345 * opts.h (enum cl_var_type): Add an enumerator.
14346 * stor-layout.c (layout_decl): Print a more meaningful warning.
14347 * toplev.c (output_stack_usage): Adjust.
14349 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
14351 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
14352 call to inline_expand_builtin_string_cmp.
14353 (expand_builtin_strcmp): Likewise.
14354 (expand_builtin_strncmp): Likewise.
14355 (inline_string_cmp): Delete the last parameter, change char_type_node
14356 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
14358 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
14359 the inlining expansion on target where the type of the call has same or
14360 narrower precision than unsigned char.
14362 2018-07-20 David Malcolm <dmalcolm@redhat.com>
14364 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
14365 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
14366 * common.opt (fsave-optimization-record): New option.
14367 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
14368 * doc/invoke.texi (-fsave-optimization-record): New option.
14369 * dumpfile.c: Include "optinfo-emit-json.h".
14370 (struct kv_pair): Move to coretypes.h.
14371 (optgroup_options): Make non-static.
14372 (dump_context::end_scope): Call
14373 optimization_records_maybe_pop_dump_scope.
14374 * dumpfile.h (optgroup_options): New decl.
14375 * json.cc: New file.
14376 * json.h: New file.
14377 * optinfo-emit-json.cc: New file.
14378 * optinfo-emit-json.h: New file.
14379 * optinfo.cc: Include "optinfo-emit-json.h".
14380 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
14381 (optinfo_enabled_p): Check optimization_records_enabled_p.
14382 (optinfo_wants_inlining_info_p): Likewise.
14383 * optinfo.h: Update comment.
14384 * profile-count.c (profile_quality_as_string): New function.
14385 * profile-count.h (profile_quality_as_string): New decl.
14386 (profile_count::quality): New accessor.
14387 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
14388 and optinfo_emit_json_cc_tests.
14389 * selftest.h (selftest::json_cc_tests): New decl.
14390 (selftest::optinfo_emit_json_cc_tests): New decl.
14391 * toplev.c: Include "optinfo-emit-json.h".
14392 (compile_file): Call optimization_records_finish.
14393 (do_compile): Call optimization_records_start.
14394 * tree-ssa-live.c: Include optinfo.h.
14395 (remove_unused_scope_block_p): Retain inlining information if
14396 optinfo_wants_inlining_info_p returns true.
14398 2018-07-20 Richard Biener <rguenther@suse.de>
14401 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
14402 to cover -flto-partition=none.
14404 2018-07-20 Martin Liska <mliska@suse.cz>
14406 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
14407 (get_decl_source_range): Remove unused function.
14409 2018-07-20 Richard Biener <rguenther@suse.de>
14411 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
14412 (struct vn_phi_s): Likewise.
14413 (struct vn_reference_s): Likewise.
14414 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
14415 for searching the slot of an entry known to be in the hash itself.
14416 (vn_phi_hasher::equal): Likewise.
14417 (vn_reference_hasher::equal): Likewise.
14418 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
14420 (optimistic_info, current_info): Remove, keeping only valid_info.
14421 (vn_reference_lookup_1): Remove fallback lookup.
14422 (vn_reference_lookup_2): Likewise.
14423 (vn_nary_op_lookup_1): Likewise.
14424 (vn_phi_lookup): Likewise.
14425 (vn_nary_build_or_lookup_1): Make sure to not chain the built
14427 (vn_reference_insert): Adjust, chain the inserted hash element
14428 at last_inserted_ref.
14429 (vn_reference_insert_pieces): Likewise.
14430 (visit_reference_op_call): Likewise.
14431 (vn_nary_op_insert_into): Chain the inserted hash element at
14432 last_inserted_nary.
14433 (vn_nary_op_insert_pieces): Adjust.
14434 (vn_nary_op_insert): Likewise.
14435 (vn_nary_op_insert_stmt): Likewise.
14436 (vn_phi_insert): Adjust, chain the inserted hash element at
14438 (process_scc): Remove clearing and copying the optimistic
14439 table. Instead remove elements inserted during an optimistic
14440 iteration from the single table we maintain.
14441 (init_scc_vn): Adjust.
14442 (free_scc_vn): Likewise.
14443 (sccvn_dom_walker::record_cond): Likewise.
14444 (sccvn_dom_walker::after_dom_children): Likewise.
14446 2018-07-19 Martin Sebor <msebor@redhat.com>
14448 PR tree-optimization/84047
14449 PR tree-optimization/83776
14450 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
14451 (check_array_bounds): Call it.
14453 2018-07-19 Martin Sebor <msebor@redhat.com>
14455 * align.h (align_flags): Use member initialization.
14457 2018-07-19 David Malcolm <dmalcolm@redhat.com>
14459 * Makefile.in (OBJS): Add optinfo.o.
14460 * coretypes.h (class symtab_node): New forward decl.
14461 (struct cgraph_node): New forward decl.
14462 (class varpool_node): New forward decl.
14463 * dump-context.h: New file.
14464 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
14466 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
14467 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
14468 (set_alt_dump_file): Likewise.
14469 (dump_context::~dump_context): New dtor.
14470 (dump_gimple_stmt): Move implementation to...
14471 (dump_context::dump_gimple_stmt): ...this new member function.
14472 Add the stmt to any pending optinfo, creating one if need be.
14473 (dump_gimple_stmt_loc): Move implementation to...
14474 (dump_context::dump_gimple_stmt_loc): ...this new member function.
14475 Start a new optinfo and add the stmt to it.
14476 (dump_gimple_expr): Move implementation to...
14477 (dump_context::dump_gimple_expr): ...this new member function.
14478 Add the stmt to any pending optinfo, creating one if need be.
14479 (dump_gimple_expr_loc): Move implementation to...
14480 (dump_context::dump_gimple_expr_loc): ...this new member function.
14481 Start a new optinfo and add the stmt to it.
14482 (dump_generic_expr): Move implementation to...
14483 (dump_context::dump_generic_expr): ...this new member function.
14484 Add the tree to any pending optinfo, creating one if need be.
14485 (dump_generic_expr_loc): Move implementation to...
14486 (dump_context::dump_generic_expr_loc): ...this new member
14487 function. Add the tree to any pending optinfo, creating one if
14489 (dump_printf): Move implementation to...
14490 (dump_context::dump_printf_va): ...this new member function. Add
14491 the text to any pending optinfo, creating one if need be.
14492 (dump_printf_loc): Move implementation to...
14493 (dump_context::dump_printf_loc_va): ...this new member function.
14494 Start a new optinfo and add the stmt to it.
14495 (dump_dec): Move implementation to...
14496 (dump_context::dump_dec): ...this new member function. Add the
14497 value to any pending optinfo, creating one if need be.
14498 (dump_context::dump_symtab_node): New member function.
14499 (dump_context::get_scope_depth): New member function.
14500 (dump_context::begin_scope): New member function.
14501 (dump_context::end_scope): New member function.
14502 (dump_context::ensure_pending_optinfo): New member function.
14503 (dump_context::begin_next_optinfo): New member function.
14504 (dump_context::end_any_optinfo): New member function.
14505 (dump_context::s_current): New global.
14506 (dump_context::s_default): New global.
14507 (dump_scope_depth): Delete global.
14508 (dumpfile_ensure_any_optinfo_are_flushed): New function.
14509 (dump_symtab_node): New function.
14510 (get_dump_scope_depth): Reimplement in terms of dump_context.
14511 (dump_begin_scope): Likewise.
14512 (dump_end_scope): Likewise.
14513 (selftest::temp_dump_context::temp_dump_context): New ctor.
14514 (selftest::temp_dump_context::~temp_dump_context): New dtor.
14515 (selftest::verify_item): New function.
14516 (ASSERT_IS_TEXT): New macro.
14517 (ASSERT_IS_TREE): New macro.
14518 (ASSERT_IS_GIMPLE): New macro.
14519 (selftest::test_capture_of_dump_calls): New test.
14520 (selftest::dumpfile_c_tests): Call it.
14521 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
14522 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
14523 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
14524 descriptive comment.
14525 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
14526 (dump_node, dump_bb): Move these unrelated decls.
14527 (class dump_manager): Add leading comment.
14528 * optinfo.cc: New file.
14529 * optinfo.h: New file.
14531 2018-07-19 Michael Collison <michael.collison@arm.com>
14532 Richard Henderson <rth@redhat.com>
14534 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
14535 (subti): Handle op1 zero.
14536 (subvti4, usub4ti4): New.
14537 (*sub<GPI>3_compare1_imm): New.
14538 (sub<GPI>3_carryinCV): New.
14539 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
14540 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
14542 2018-07-19 Michael Collison <michael.collison@arm.com>
14543 Richard Henderson <rth@redhat.com>
14545 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
14546 (addti3): Create simpler code if low part is already known to be 0.
14547 (addvti4, uaddvti4): New.
14548 (*add<GPI>3_compareC_cconly_imm): New.
14549 (*add<GPI>3_compareC_cconly): New.
14550 (*add<GPI>3_compareC_imm): New.
14551 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
14552 handle constants within this pattern..
14553 (*add<GPI>3_compareV_cconly_imm): New.
14554 (*add<GPI>3_compareV_cconly): New.
14555 (*add<GPI>3_compareV_imm): New.
14556 (add<GPI>3_compareV): New.
14557 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
14558 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
14559 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
14560 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
14561 with 'comparison' operator.
14562 (*add<GPI>3_compareV_cconly_imm): Ditto.
14563 (*add<GPI>3_compareV_cconly): Ditto.
14564 (*add<GPI>3_compareV_imm): Ditto.
14565 (add<GPI>3_compareV): Ditto.
14566 (add<mode>3_carryinC): Ditto.
14567 (*add<mode>3_carryinC_zero): Ditto.
14568 (*add<mode>3_carryinC): Ditto.
14569 (add<mode>3_carryinV): Ditto.
14570 (*add<mode>3_carryinV_zero): Ditto.
14571 (*add<mode>3_carryinV): Ditto.
14573 2018-07-19 Michael Collison <michael.collison@arm.com>
14574 Richard Henderson <rth@redhat.com>
14576 * config/aarch64/aarch64-modes.def (CC_V): New.
14577 * config/aarch64/aarch64-protos.h
14578 (aarch64_addti_scratch_regs): Declare
14579 (aarch64_subvti_scratch_regs): Declare.
14580 (aarch64_expand_subvti): Declare.
14581 (aarch64_gen_unlikely_cbranch): Declare
14582 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
14583 for signed overflow using CC_Vmode.
14584 (aarch64_get_condition_code_1): Handle CC_Vmode.
14585 (aarch64_gen_unlikely_cbranch): New function.
14586 (aarch64_addti_scratch_regs): New function.
14587 (aarch64_subvti_scratch_regs): New function.
14588 (aarch64_expand_subvti): New function.
14590 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
14592 * config/aarch64/aarch64-option-extensions.def: New entry for profile
14594 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
14595 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
14598 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
14601 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14602 address check not strict.
14604 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
14606 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
14608 (store_pair_lanes<mode>): Likewise.
14609 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
14610 enum value 'ADDR_QUERY_LDP_STP_N'.
14611 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
14612 (aarch64_print_address_internal): Add declaration.
14613 (aarch64_print_ldpstp_address): Remove.
14614 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
14615 (aarch64_print_operand): Change printing of 'y'.
14616 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
14617 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
14618 'true' rather than '1'.
14619 * config/aarch64/constraints.md (Uml): Likewise.
14620 (Uml): Rename to Umn.
14623 2018-07-19 Richard Biener <rguenther@suse.de>
14625 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
14627 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
14628 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
14629 (vn_reference_hasher): Likewise.
14630 (struct vn_tables_s): Remove obstack and alloc-pool members.
14631 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
14632 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
14633 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
14634 (vn_reference_insert_pieces): Likewise.
14635 (alloc_vn_nary_op_noinit): Adjust.
14636 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
14637 (vn_phi_eq): Adjust.
14638 (shared_lookup_phiargs): Remove.
14639 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
14640 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
14641 (visit_reference_op_call): Likewise.
14642 (copy_nary, copy_phi, copy_reference): Remove.
14643 (process_scc): Rewind the obstack when iterating. Do not
14644 copy the elements to valid_info but just move them from one
14645 hashtable to the other.
14646 (allocate_vn_table): Adjust.
14647 (free_vn_table): Likewise.
14648 (init_scc_vn): Likewise.
14649 (free_scc_vn): Likewise.
14651 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
14654 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
14655 indirect_return as function type attribute.
14656 (ix86_attribute_table): Change indirect_return to function
14658 * doc/extend.texi: Update indirect_return attribute.
14660 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
14662 * wide-int.h (widest2_int): New.
14663 * gimple-fold.c (arith_overflowed_p): Use it.
14664 * tree.h (widest2_int_cst): New.
14665 * tree-vrp.c (wide_int_binop_overflow): Rename from
14666 vrp_int_const_binop.
14667 Rewrite to work on trees.
14668 (extract_range_from_multiplicative_op_1): Abstract code to...
14669 (wide_int_range_min_max): ...here.
14670 (wide_int_range_cross_product): ...and here.
14671 (extract_range_from_binary_expr_1): Abstract overflow code to...
14672 (wide_int_range_mult_wrapping): ...here.
14673 * tree-vrp.h (wide_int_range_cross_product): New.
14674 (wide_int_range_mult_wrapping): New.
14676 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
14677 Julia Koval <julia.koval@intel.com>
14679 * config/i386/x86-tune-costs.h (skylake_memcpy,
14680 skylake_memset): Replace rep_prefix with unrolling for size 512.
14682 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
14684 PR middle-end/86544
14685 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
14686 comparision with EQ_EXPR in last stmt.
14688 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
14690 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
14691 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
14692 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
14693 previously known as "PowerPC AltiVec Built-in Functions". Move
14694 some material to new subsubsections "PowerPC AltiVec Built-in
14695 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
14697 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
14698 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
14699 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
14700 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
14702 2018-07-18 Richard Biener <rguenther@suse.de>
14704 PR tree-optimization/86557
14705 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
14708 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
14710 * config/s390/s390.c (s390_function_profiler): Generate CFI.
14712 2018-07-17 Jeff Law <law@redhat.com>
14714 * config/arm/arm.c (get_label_padding): Update for recent
14715 changes to label_to_alignment.
14717 PR tree-optimization/86010
14718 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
14720 * config/mips/mips.c (vr4130_align_insns): Update for recent
14721 changes to label_to_alignment.
14723 * config/frv/frv.c (frv_label_align): Update for recent changes
14724 to label_to_alignment.
14726 * config/nios2/nios2.c (nios2_label_align): Update for recent
14727 changes which dropped ALIGN_LABELS_LOG.
14729 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
14731 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
14732 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
14734 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
14736 * config/arc/arc.c (arc_label_align): Use align_labels instead of
14737 deprecated align_labels_log.
14739 2018-07-17 Richard Biener <rguenther@suse.de>
14742 * dwarf2out.c (init_sections_and_labels): Always generate
14743 a debug_line_str_section for early LTO debug.
14744 (dwarf2out_finish): Reset debug_line_str_hash output early.
14745 Bump counter for extra dwarf5 .debug_loc labels to not conflict
14747 (dwarf2out_early_finish): Output debug_line_str.
14749 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
14751 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
14752 index register on z196 or later.
14754 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
14756 * config/s390/s390.c (s390_default_align): Set default function
14758 (s390_override_options_after_change): Call s390_default align.
14759 (s390_option_override_internal): Call s390_default_align.
14760 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
14762 2018-07-17 Jakub Jelinek <jakub@redhat.com>
14764 PR middle-end/86542
14765 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
14766 to _looptemp_ clauses, other than the first two.
14768 2018-07-17 Martin Liska <mliska@suse.cz>
14770 * opts.c: Do not enable OPT_falign_* for -Os.
14772 2018-07-17 Martin Liska <mliska@suse.cz>
14774 * align.h (MAX_CODE_ALIGN): New.
14775 (MAX_CODE_ALIGN_VALUE): New.
14776 * common/config/i386/i386-common.c (ix86_handle_option):
14777 (MAX_CODE_ALIGN): Moved to align.h.
14778 * final.c (MAX_CODE_ALIGN): Likewise.
14779 * opts.c (parse_and_check_align_values):
14780 (MAX_CODE_ALIGN): Likewise.
14781 (MAX_CODE_ALIGN_VALUE): Likewise.
14783 2018-07-17 Martin Liska <mliska@suse.cz>
14785 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
14786 in order to fulfil coding style.
14787 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
14788 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14789 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14790 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
14791 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
14792 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
14793 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
14794 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
14795 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14797 2018-07-17 Martin Liska <mliska@suse.cz>
14799 * align.h: New file.
14800 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
14802 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
14803 align_flags of label_to_alignment.
14804 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
14806 * config/m68k/m68k.c: Do not use removed align_labels_value and
14808 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
14809 (LOOP_ALIGN): Likewise.
14810 (LABEL_ALIGN): Likewise.
14811 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14812 Remove not used macro.
14813 (rs6000_loop_align): Change return type to align_flags.
14814 (rs6000_loop_align_max_skip): Remove.
14815 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
14816 Change return type to align_flags.
14817 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14818 Remove not used macro.
14819 (rs6000_loop_align): Change return type to align_flags.
14820 (rs6000_loop_align_max_skip): Remove.
14821 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
14822 * config/rx/rx-protos.h (rx_align_for_label): Make it
14824 * config/rx/rx.c (rx_align_for_label): Change return type
14826 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
14828 into align_flags class.
14829 (LABEL_ALIGN): Likewise.
14830 (LOOP_ALIGN): Likewise.
14831 * config/s390/s390.c (s390_label_align): Use align_flags
14833 (s390_asm_output_function_label): Likewise.
14834 * config/sh/sh.c (sh_override_options_after_change):
14835 Use align_flags class directly without macros.
14836 (find_barrier): Likewise.
14837 (barrier_align): Likewise.
14838 (sh_loop_align): Likewise.
14839 * config/spu/spu.c (spu_option_override):
14840 Use align_flags_tuple::get_value instead of removed macros.
14841 (spu_sched_init): Likewise.
14842 * config/spu/spu.h (GTY): Likewise.
14843 * config/visium/visium.c (visium_option_override):
14844 Set "8" as default secondary alignment.
14845 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
14846 in order to guarantee secondary alignment of 8.
14847 * coretypes.h: Include align.h header file.
14848 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
14849 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
14850 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
14851 * doc/tm.texi.in: Likewise.
14852 * final.c (struct label_alignment): Remove not used structure.
14853 (LABEL_ALIGN): Change type to align_flags.
14854 (LOOP_ALIGN): Likewise.
14855 (JUMP_ALIGN): Likewise.
14856 (default_loop_align_max_skip): Remove.
14857 (default_label_align_max_skip): Likewise.
14858 (default_jump_align_max_skip): Likewise.
14859 (default_label_align_after_barrier_max_skip):
14860 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
14861 (LABEL_TO_MAX_SKIP): Remove.
14862 (label_to_alignment): Return align_flags type instead of integer.
14863 (label_to_max_skip): Remove.
14864 (align_fuzz): Use align_flags type.
14865 (compute_alignments): Use align_flags type and use align_flags::max
14866 to combine multiple alignments.
14867 (grow_label_align): Grow vec instead of C array.
14868 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
14869 (shorten_branches): Use align_flags type and use align_flags::max
14870 to combine multiple alignments.
14871 (final_scan_insn_1): Remove usage of secondary alignment that comes
14872 from label alignment, but instead use proper secondary alignment
14873 which is computed in grow_label_align.
14874 * flags.h (struct align_flags_tuple): Move to align.h.
14875 (struct align_flags): Likewise.
14876 (state_align_loops): Rename to align_loops.
14877 (state_align_jumps): Rename to align_jumps.
14878 (state_align_labels): Rename to align_labels.
14879 (state_align_functions): Rename to align_functions.
14880 (align_loops_log): Remove.
14881 (align_jumps_log): Remove.
14882 (align_labels_log): Remove.
14883 (align_functions_log): Remove.
14884 (align_loops_max_skip): Remove.
14885 (align_jumps_max_skip): Remove.
14886 (align_labels_max_skip): Remove.
14887 (align_functions_max_skip): Remove.
14888 (align_loops_value): Remove.
14889 (align_jumps_value): Remove.
14890 (align_labels_value): Remove.
14891 (align_functions_value): Remove.
14892 * output.h (label_to_alignment): Change return type to align_flags.
14893 (label_to_max_skip): Remove.
14894 * target.def: Remove loop_align_max_skip, label_align_max_skip,
14895 jump_align_max_skip macros.
14896 * targhooks.h (default_loop_align_max_skip): Remove.
14897 (default_label_align_max_skip): Likewise.
14898 (default_jump_align_max_skip): Likewise.
14899 (default_label_align_after_barrier_max_skip): Remove.
14900 * toplev.c (read_log_maxskip): Use ::normalize function.
14901 (parse_N_M): Remove not used argument and also call ::normalize.
14902 (parse_alignment_opts): Do not pass unused arguments.
14903 * varasm.c (assemble_start_function): Use directly align_functions
14904 instead of removed macros.
14905 * system.h: Do not poison removed macros.
14907 2018-07-17 Jakub Jelinek <jakub@redhat.com>
14909 PR middle-end/86539
14910 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
14911 and cond temporaries don't have reference type if iterator has
14912 pointer type. For init use &for_pre_body instead of pre_p if
14913 for_pre_body is non-empty.
14915 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14917 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
14918 double-double modes to SFmode directly directly.
14919 (trunc<mode>sf2_fprs): Delete.
14921 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14923 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
14924 for conversions between IFmode and the decimal floating point modes.
14925 (init_float128_ieee): Use the correct names for conversions between
14926 KFmode and the decimal floating point modes.
14928 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14930 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
14931 for the conversions between TDmode and IFmode.
14932 (init_float128_ieee): Use more correct names for the conversions
14933 between TDmode and KFmode.
14935 2018-07-16 Jakub Jelinek <jakub@redhat.com>
14937 PR tree-optimization/86526
14938 * builtins.c (expand_builtin_memcmp): Formatting fixes.
14939 (inline_expand_builtin_string_cmp): Likewise.
14940 (inline_string_cmp): Likewise. Use c_readstr instead of
14941 builtin_memcpy_read_str. Add unit_mode temporary.
14943 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
14945 PR middle-end/86528
14946 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
14947 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
14949 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
14951 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
14952 Alphabetize prototypes of built-in functions, separating out
14953 built-in functions that are listed in this section but should be
14954 described elsewhere.
14956 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
14959 * expmed.c (emit_store_flag): Do not emit setcc followed by a
14960 conditional move when trapping comparison was split to a
14961 non-trapping one (and vice versa).
14963 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14965 * config/s390/s390.c (s390_function_profiler): Generate nops
14966 instead of profiler call sequences.
14967 * config/s390/s390.opt: Add the new option.
14969 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14971 * config/s390/s390.c (s390_function_profiler): Generate
14972 __mcount_loc section.
14973 * config/s390/s390.opt: Add the new option.
14975 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14977 * common.opt: Add the new warning.
14978 * config/s390/s390.c (s390_function_profiler): Emit "brasl
14979 %r0,__fentry__" when -mfentry is specified.
14980 (s390_option_override_internal): Disallow -mfentry for 31-bit
14982 * config/s390/s390.opt: Add the new option.
14984 2018-07-16 Richard Biener <rguenther@suse.de>
14987 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
14988 for function-local FUNCTION_DECL and RESULT_DECL immediately.
14990 2018-07-16 Martin Liska <mliska@suse.cz>
14993 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
14996 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
14998 * config/arc/arcHS.md: Update ARCHS scheduling rules.
15000 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
15002 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
15004 * config/arc/arc-cpus.def (hs4x): New cpu.
15006 * config/arc/arc-tables.opt: Regenerate.
15007 * config/arc/arc.c (arc_sched_issue_rate): New function.
15008 (TARGET_SCHED_ISSUE_RATE): Define.
15009 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
15010 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
15012 (attr tune): Add ARCHS4x tune values.
15013 (attr tune_dspmpy): Define.
15014 (*tst): Correct instruction type.
15015 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
15016 * config/arc/arcHS4x.md: New file.
15017 * config/arc/fpu.md: Update instruction type attributes.
15018 * config/arc/t-multilib: Regenerate.
15020 2018-07-16 Tom de Vries <tdevries@suse.de>
15023 * var-tracking.c (vt_initialize): Fix pre_dec handling.
15025 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15027 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
15030 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
15032 PR tree-optimization/86514
15033 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
15034 conversion to a boolean type from a type with greater precision.
15036 2018-07-16 Tom de Vries <tdevries@suse.de>
15038 * var-tracking.c (vt_initialize): Print adjusted insn slim if
15039 dump_flags request TDF_SLIM.
15041 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
15043 * fold-const.c (int_const_binop_1): Abstract...
15044 (wide_int_binop): ...wide int code here.
15045 (poly_int_binop): ...poly int code here.
15046 Abstract the rest of int_const_binop_1 into int_const_binop.
15047 * fold-const.h (wide_int_binop): New.
15048 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
15049 Remove useless PLUS/MINUS_EXPR case.
15050 (zero_nonzero_bits_from_vr): Move wide int code...
15051 (zero_nonzero_bits_from_bounds): ...here.
15052 (extract_range_from_binary_expr_1): Move mask optimization code...
15053 (range_easy_mask_min_max): ...here.
15054 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
15055 (range_easy_mask_min_max): New.
15057 2018-07-15 Jeff Law <law@redhat.com>
15060 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
15063 2018-07-14 Jim Wilson <jimw@sifive.com>
15065 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
15067 2018-07-14 Paul Koning <ni1d@arrl.net>
15069 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
15071 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
15073 * lto-streamer-out.c (copy_function_or_variable): Dump info about
15076 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
15077 Steve Munroe <munroesj52@gmail.com>
15079 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
15080 (_mm_andnot_si128): Likewise.
15081 (_mm_or_si128): Likewise.
15082 (_mm_xor_si128): Likewise.
15084 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
15086 PR middle-end/78809
15087 * builtins.c (expand_builtin_memcmp): Inline the calls first
15088 when result_eq is false.
15089 (expand_builtin_strcmp): Inline the calls first.
15090 (expand_builtin_strncmp): Likewise.
15091 (inline_string_cmp): New routine. Expand a string compare
15092 call by using a sequence of char comparison.
15093 (inline_expand_builtin_string_cmp): New routine. Inline expansion
15094 a call to str(n)cmp/memcmp.
15095 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
15097 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
15099 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
15101 * config/arm/driver-arm.c: Include arm-native.h.
15102 (host_detect_local_cpu): Use auto-generated data tables.
15103 (vendors, arm_cpu_table): Delete. Move part information to ...
15104 * config/arm/arm-cpus.in: ... here.
15105 * config/arm/parsecpu.awk (gen_native): New function.
15106 (vendor, part): New CPU fields.
15107 (END): Add support for building the native CPU detection tables.
15108 * config/arm/t-arm (arm-native.h): Add build rule.
15109 (driver-arm.o): Add dependency on arm-native.h.
15111 2018-07-13 Richard Biener <rguenther@suse.de>
15113 PR middle-end/85974
15114 * match.pd (addr1 - addr2): Allow either of the operand to
15117 2018-07-13 Tom de Vries <tdevries@suse.de>
15119 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
15122 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
15124 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
15125 arrays instead of numbered variables.
15127 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
15129 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
15130 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
15132 2018-07-13 Richard Biener <rguenther@suse.de>
15135 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
15136 instead of get_context_die.
15138 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
15139 Richard Biener <rguenther@suse.de>
15141 PR middle-end/86489
15142 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
15143 that the loop latch destination where phi is defined.
15145 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
15147 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
15148 (riscv_expand_epilogue): Add assertion to check interrupt mode.
15149 (riscv_set_current_function): Extract getting interrupt type to new
15151 (riscv_get_interrupt_type): New function.
15152 (riscv_merge_decl_attributes): New function, checking interrupt type is
15154 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
15156 2018-07-12 Paul Koning <ni1d@arrl.net>
15158 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
15161 2018-07-12 Paul Koning <ni1d@arrl.net>
15163 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
15164 zero reference, add doloop_end instead.
15165 * doc/md.texi (decrement_and_branch_until_zero): Remove.
15166 (Looping patterns): Remove decrement_and_branch_until_zero. Add
15167 detail for doloop_end.
15169 2018-07-12 Martin Sebor <msebor@redhat.com>
15172 * attribs.c (decl_attributes): Reject conflicting attributes before
15173 calling attribute handlers.
15175 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
15177 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
15179 (gcc::dump_manager::get_dump_file_name): likewise.
15180 (dump_begin): Likewise.
15181 * dumpfile.h (dump_begin): Update prototype.
15182 (gcc::dump_manager::get_dump_file_name,
15183 gcc::dump_manager::get_dump_file_name): Update prototype.
15185 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15187 * internal-fn.h (vectorizable_internal_fn_p): New function.
15188 * tree-vect-slp.c (compatible_calls_p): Likewise.
15189 (vect_build_slp_tree_1): Remove nops argument. Handle calls
15190 to internal functions.
15191 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
15193 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15195 * fold-const.h (inverse_conditions_p): Declare.
15196 * fold-const.c (inverse_conditions_p): New function.
15197 * match.pd: Use inverse_conditions_p. Add folds of view_converts
15198 that test the inverse condition of a conditional internal function.
15199 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
15200 * internal-fn.c (internal_fn_mask_index): Handle conditional
15201 internal functions.
15202 (vectorized_internal_fn_supported_p): New function.
15203 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
15204 (any_pred_load_store): Replace with...
15205 (need_to_predicate): ...this new variable.
15206 (redundant_ssa_names): New variable.
15207 (ifcvt_can_use_mask_load_store): Move initial checks to...
15208 (ifcvt_can_predicate): ...this new function. Handle tree codes
15209 for which a conditional internal function exists.
15210 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
15211 instead of ifcvt_can_use_mask_load_store. Update after variable
15213 (predicate_load_or_store): New function, split out from
15214 predicate_mem_writes.
15215 (check_redundant_cond_expr): New function.
15216 (value_available_p): Likewise.
15217 (predicate_rhs_code): Likewise.
15218 (predicate_mem_writes): Rename to...
15219 (predicate_statements): ...this. Use predicate_load_or_store
15220 and predicate_rhs_code.
15221 (combine_blocks, tree_if_conversion): Update after above name changes.
15222 (ifcvt_local_dce): Handle redundant_ssa_names.
15223 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
15224 general conditional functions.
15225 * tree-vect-stmts.c (vectorizable_call): Likewise.
15227 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15228 Alan Hayward <alan.hayward@arm.com>
15229 David Sherwood <david.sherwood@arm.com>
15231 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
15232 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
15233 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
15234 plus and minus and convert them into IFN_COND_FMA-based sequences.
15235 (convert_mult_to_fma): Handle conditional plus and minus.
15237 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15239 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
15240 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
15241 (cond_fnms_optab): New optabs.
15242 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
15243 internal functions.
15244 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
15245 * internal-fn.h (get_conditional_internal_fn): Declare.
15246 (get_unconditional_internal_fn): Likewise.
15247 * internal-fn.c (cond_ternary_direct): New macro.
15248 (expand_cond_ternary_optab_fn): Likewise.
15249 (direct_cond_ternary_optab_supported_p): Likewise.
15250 (FOR_EACH_COND_FN_PAIR): Likewise.
15251 (get_conditional_internal_fn): New function.
15252 (get_unconditional_internal_fn): Likewise.
15253 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
15254 (gimple_match_op::gimple_match_op): Add a new overload for 5
15256 (gimple_match_op::set_op): Likewise.
15257 (gimple_resimplify5): Declare.
15258 * genmatch.c (decision_tree::gen): Generate simplifications for
15260 * gimple-match-head.c (gimple_simplify): Define an overload for
15261 5 operands. Handle calls with 5 arguments in the top-level overload.
15262 (convert_conditional_op): Handle conversions from unconditional
15263 internal functions to conditional ones.
15264 (gimple_resimplify5): New function.
15265 (build_call_internal): Pass a fifth operand.
15266 (maybe_push_res_to_seq): Likewise.
15267 (try_conditional_simplification): Try converting conditional
15268 internal functions to unconditional internal functions.
15269 Handle 3-operand unconditional forms.
15270 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
15271 Define ternary equivalents of the current rules for binary conditional
15272 internal functions.
15273 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
15274 ternary operations.
15275 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
15276 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
15277 (optab): Handle them.
15278 (SVE_COND_FP_TERNARY): New int iterator.
15279 (sve_fmla_op, sve_fmad_op): New int attributes.
15280 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
15281 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
15282 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
15284 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15286 * target.def (preferred_else_value): New target hook.
15287 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
15288 * doc/tm.texi: Regenerate.
15289 * targhooks.h (default_preferred_else_value): Declare.
15290 * targhooks.c (default_preferred_else_value): New function.
15291 * internal-fn.h (conditional_internal_fn_code): Declare.
15292 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
15293 (get_conditional_internal_fn): Use it.
15294 (conditional_internal_fn_code): New function.
15295 * gimple-match.h (gimple_match_cond): New struct.
15296 (gimple_match_op): Add a cond member function.
15297 (gimple_match_op::gimple_match_op): Update all forms to take a
15299 * genmatch.c (expr::gen_transform): Use the same condition as res_op
15300 for the suboperation, but don't specify a particular else_value.
15301 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
15302 (visit_nary_op, visit_reference_op_load): Pass
15303 gimple_match_cond::UNCOND to the gimple_match_op constructor.
15304 * gimple-match-head.c: Include tree-eh.h
15305 (convert_conditional_op): New function.
15306 (maybe_resimplify_conditional_op): Likewise.
15307 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
15308 (gimple_resimplify2): Likewise.
15309 (gimple_resimplify3): Likewise.
15310 (gimple_resimplify4): Likewise.
15311 (maybe_push_res_to_seq): Return null for conditional operations.
15312 (try_conditional_simplification): New function.
15313 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
15315 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
15317 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
15319 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
15321 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
15323 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15325 (hash_tree): Do not hash DECL_FCONTEXT
15326 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
15327 Do not stream DECL_FCONTEXT.
15328 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
15329 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
15331 2018-07-12 Richard Biener <rguenther@suse.de>
15334 * dwarf2out.c (gen_block_die): Only output blocks when they have
15335 at least one !DECL_IGNORED_P variable.
15337 2018-07-12 Richard Biener <rguenther@suse.de>
15340 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
15341 Remove -mieee-fp handling.
15343 2018-07-12 Richard Biener <rguenther@suse.de>
15345 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
15346 left-over from last patch.
15348 2018-07-12 Jakub Jelinek <jakub@redhat.com>
15350 PR tree-optimization/86492
15351 * gimple-ssa-store-merging.c
15352 (imm_store_chain_info::coalesce_immediate_stores): Call
15353 check_no_overlap even for the merge_overlapping case. Formatting fix.
15355 2018-07-12 Richard Biener <rguenther@suse.de>
15357 PR middle-end/86479
15358 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
15359 move possibly trapping operations into the conditional.
15361 2018-07-12 Richard Biener <rguenther@suse.de>
15363 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
15364 (vn_lookup_simplify_result): Remove recursion limit applied
15366 (vn_nary_build_or_lookup_1): Adjust.
15367 (try_to_simplify): Likewise.
15368 * gimple-match-head.c (gimple_resimplify1): Instead apply one
15370 (gimple_resimplify2): Likewise.
15371 (gimple_resimplify3): Likewise.
15372 (gimple_resimplify4): Likewise.
15374 2018-07-11 Jakub Jelinek <jakub@redhat.com>
15376 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
15377 Use __mmask64 type instead of __mmask8 for __M argument.
15378 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
15379 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
15381 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
15382 __mmask16 for __M argument.
15383 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
15384 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
15385 to __mmask16 instead of __mmask8.
15386 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
15387 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
15388 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
15389 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
15390 instead of __mmask16 for __U argument.
15391 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
15392 __mmask16 instead of __mmask8 for __U argument.
15393 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
15395 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
15397 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
15399 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
15401 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
15403 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
15405 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
15407 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
15409 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
15411 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
15413 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
15414 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
15415 return type as well as __M argument type and all casts from __mmask8
15417 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
15418 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
15419 return type as well as __M argument type and all casts from __mmask8
15421 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
15422 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
15423 return type as well as __M argument type and all casts from __mmask8
15425 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
15426 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
15427 return type as well as __M argument type and all casts from __mmask8
15429 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
15430 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
15433 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
15435 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
15436 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
15439 2018-07-11 Paul Koning <ni1d@arrl.net>
15441 * doc/md.texi (define_subst): Document how multiple occurrences of
15442 the same argument in the replacement pattern are handled.
15444 2018-07-11 Paul Koning <ni1d@arrl.net>
15446 * doc/extend.texi (Common Variable Attributes): Move "mode" into
15447 alphabetical order.
15448 (Common Type Attributes): Add "mode" attribute.
15450 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
15452 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
15453 stream DECL_ORIGINAL_TYPE.
15454 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
15455 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
15456 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
15457 Do not walk original type.
15458 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
15460 (write_ts_decl_non_common_tree_pointers): Do not stream
15462 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
15463 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
15465 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
15467 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
15468 thread twice from the same starting edge.
15470 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
15472 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
15473 * gimple.c (gimple_call_nonnull_result_p): ...here...
15474 (gimple_call_nonnull_arg): ...and here.
15475 * gimple.h (gimple_call_nonnull_result_p): New.
15476 (gimple_call_nonnull_arg): New.
15478 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
15480 * config/arm/arm-cpus.in: Move information from fpu field of each
15481 cpu definition to the isa field.
15482 * config/arm/parsecpu.awk (fpu): Delete match rule.
15483 (gen_comm_data): Don't add bits from the CPU's FPU entry.
15485 2018-07-11 Richard Biener <rguenther@suse.de>
15488 * dwarf2out.c (init_sections_and_labels): Use
15489 output_asm_line_debug_info consistently.
15490 (dwarf2out_early_finish): Likewise.
15491 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
15494 2018-07-11 Richard Biener <rguenther@suse.de>
15496 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
15497 Rework father_bb setting in a way to avoid propagating constants
15498 multiple times on a loop body.
15500 2018-07-10 Mark Wielaard <mark@klomp.org>
15503 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
15505 2018-07-10 Richard Biener <rguenther@suse.de>
15507 * hash-map.h (hash_map::iterator::operator*): Return
15508 references to key and value.
15510 2018-07-10 Jakub Jelinek <jakub@redhat.com>
15513 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
15514 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
15515 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
15516 (gimplify_omp_for): For composite loops, move outer
15517 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
15518 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
15519 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
15520 TREE_LIST for both the original class iterator and the "last" helper
15521 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
15522 loop, remember has_decl_expr from outer composite loops for the
15523 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
15525 2018-07-09 Martin Sebor <msebor@redhat.com>
15527 PR middle-end/77357
15528 PR middle-end/86428
15529 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
15530 accessing implicitly initialized array elements.
15531 * expr.c (string_constant): Handle string initializers of
15532 character arrays within aggregates.
15533 * gimple-fold.c (fold_array_ctor_reference): Add argument.
15534 Store element offset. As a special case, handle zero size.
15535 (fold_nonarray_ctor_reference): Same.
15536 (fold_ctor_reference): Add argument. Store subobject offset.
15537 * gimple-fold.h (fold_ctor_reference): Add argument.
15539 2018-07-09 Paul Koning <ni1d@arrl.net>
15541 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
15542 (pdp11_insn_cost): New function.
15543 (pdp11_md_asm_adjust): New function.
15544 (TARGET_INVALID_WITHIN_DOLOOP): Define.
15545 (pdp11_rtx_costs): Update to match machine better.
15546 (output_addr_const_pdp11): Correct format mismatch warnings.
15547 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
15548 * config/pdp11/pdp11.md: General change to add base_cost and/or
15549 length attributes for use by new pdp11_insn_cost function.
15550 (MIN_BRANCH): Correct definition.
15552 (doloop_end): Use standard pattern name for looping pattern.
15553 (doloop_end_nocc): New.
15554 (movsf): Add another constraint alternative.
15555 (zero_extendqihi2): Add constraint alternatives for not in place
15557 (zero_extendhisi2): Remove.
15558 (shift patterns): Add CC handling variants.
15562 (define_peephole2): New peephole to recognize mov that sets CC for
15565 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15567 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
15568 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
15571 2018-07-09 Jakub Jelinek <jakub@redhat.com>
15574 * real.c (real_nextafter): Return true if result is denormal.
15576 2018-07-09 Martin Liska <mliska@suse.cz>
15578 * common.opt: Add back wrongly removed attribute.
15580 2018-07-09 Richard Biener <rguenther@suse.de>
15583 * dwarf2out.c (gen_block_die): For an early generated DIE
15584 always output high/low PC attributes.
15586 2018-07-09 Tom de Vries <tdevries@suse.de>
15588 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
15589 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
15590 onto VAR_DECL with abstract origin.
15592 2018-07-07 Jim Wilson <jimw@sifive.com>
15594 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
15596 2018-07-07 Tom de Vries <tdevries@suse.de>
15598 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
15600 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
15602 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
15604 (combine_bound): Use wide-int overflow calculation instead of
15606 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
15608 * fold-const.c (int_const_binop_2): Same.
15609 (extract_muldiv_1): Same.
15610 (fold_div_compare): Same.
15611 (fold_abs_const): Same.
15613 * poly-int.h (add): Same.
15617 * predict.c (predict_iv_comparison): Same.
15618 * profile-count.c (slow_safe_scale_64bit): Same.
15619 * simplify-rtx.c (simplify_const_binary_operation): Same.
15620 * tree-chrec.c (tree_fold_binomial): Same.
15621 * tree-data-ref.c (split_constant_offset_1): Same.
15622 * tree-if-conv.c (idx_within_array_bound): Same.
15623 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
15624 * tree-ssa-phiopt.c (minmax_replacement): Same.
15625 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
15626 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
15627 * vr-values.c (vr_values::adjust_range_with_scev): Same.
15628 * wide-int.cc (wi::add_large): Same.
15629 (wi::mul_internal): Same.
15630 (wi::sub_large): Same.
15631 (wi::divmod_internal): Same.
15632 * wide-int.h: Change overflow type to overflow_type for neg, add,
15633 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
15634 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
15635 mul_internal, divmod_internal.
15636 (overflow_type): New enum.
15637 (accumulate_overflow): New.
15639 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
15641 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
15642 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
15644 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
15646 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
15647 argument is checked for zero before entering loop, avoid checking again.
15649 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
15651 * gimplify.h (generic_expr_could_trap_p): Set as global function.
15652 * gimplify.h (generic_expr_could_trap_p): Likwise.
15653 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
15655 2018-07-06 Jakub Jelinek <jakub@redhat.com>
15657 PR tree-optimization/86401
15658 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
15659 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
15660 (fold_bit_and_mask): ... here. New helper function for match.pd.
15661 * fold-const.h (fold_bit_and_mask): Declare.
15662 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
15664 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
15667 * target.def (translate_mode_attribute): New hook.
15668 * targhooks.h (default_translate_mode_attribute): Declare.
15669 * targhooks.c (default_translate_mode_attribute): New function.
15670 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
15671 * doc/tm.texi: Regenerate.
15672 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
15673 (rs6000_translate_mode_attribute): New function.
15675 2018-07-06 Paul Koning <ni1d@arrl.net>
15677 * doc/md.texi (define_split): Document DONE and FAIL.
15678 (define_peephole2): Ditto.
15680 2018-07-05 Jeff Law <law@redhat.com>
15682 PR tree-optimization/86010
15683 * tree-ssa-dse.c (compute_trims): More aggressively trim at
15684 both the head and tail of mem* and str* calls.
15686 2018-07-05 Jim Wilson <jimw@sifive.com>
15688 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
15690 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
15692 * config/aarch64/aarch64-simd.md: correct flags text for
15693 MIN_EXPR replacement.
15695 2018-07-05 James Clarke <jrtc27@jrtc27.com>
15697 * configure: Regenerated.
15699 2018-07-05 Carl Love <cel@us.ibm.com>
15701 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
15702 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
15703 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
15704 VSX_BUILTIN_DOUBLEL_V4SF.
15706 2018-07-05 Martin Sebor <msebor@redhat.com>
15709 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
15710 than its domain to compute its the upper bound of a char array.
15712 2018-07-05 Nathan Sidwell <nathan@acm.org>
15714 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
15715 * doc/cpp.texi: Update comment.
15716 * doc/tm.texi: Rebuilt.
15717 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
15718 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
15719 * doc/extend.texi (Backwards Compatibility): Clarify it is system
15720 headers affected by extern "C".
15721 * system.h: Poison NO_IMPLICIT_EXTERN_C.
15722 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
15723 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
15724 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
15725 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
15726 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
15727 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
15728 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
15729 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
15730 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
15731 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
15732 config/sparc/sp64-elf.h, config/spu/spu.h,
15733 config/stormy16/stormy16.h, config/v850/v850.h,
15734 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
15735 define NO_IMPLICIT_EXTERN_C.
15736 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
15738 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15741 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15742 instead of GET_MODE_SIZE when comparing Units.
15744 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15747 * rtlanal.c (set_noop_p): Constrain on mode change,
15748 include hard-reg-set.h
15750 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15752 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
15754 2018-07-05 Jakub Jelinek <jakub@redhat.com>
15757 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
15760 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15762 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15764 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
15767 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15769 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15771 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
15773 PR middle-end/86380
15774 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
15776 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
15778 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
15779 neg_*_op* variables.
15781 2018-07-04 Martin Liska <mliska@suse.cz>
15783 * tree-switch-conversion.c: Define
15784 max_ratio_for_speed and max_ratio_for_size constants.
15786 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
15787 Martin Liska <mliska@suse.cz>
15789 PR middle-end/66240
15792 * common.opt: Rename align options with 'str_' prefix.
15793 * common/config/i386/i386-common.c (set_malign_value): New
15795 (ix86_handle_option): Use it to set -falign-* options/
15796 * config/aarch64/aarch64-protos.h (struct tune_params): Change
15797 type from int to string.
15798 * config/aarch64/aarch64.c: Update default values from int
15800 * config/alpha/alpha.c (alpha_override_options_after_change):
15802 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
15803 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15804 max skip conditionally.
15805 * config/i386/freebsd.h (SUBALIGN_LOG): New.
15806 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15807 max skip conditionally.
15808 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15809 max skip conditionally.
15810 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
15811 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15812 max skip conditionally.
15813 * config/i386/i386.c (struct ptt): Change type from int to
15815 (ix86_default_align): Set default values.
15816 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
15817 max skip conditionally.
15818 * config/i386/iamcu.h (SUBALIGN_LOG): New.
15819 (ASM_OUTPUT_MAX_SKIP_ALIGN):
15820 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
15821 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15822 max skip conditionally.
15823 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
15824 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
15825 * config/i386/x86-64.h (SUBALIGN_LOG): New.
15826 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15827 max skip conditionally.
15828 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15829 * config/ia64/ia64.c (ia64_option_override): Set default values
15830 for alignment options.
15831 * config/m68k/m68k.c: Handle new str_align_* options.
15832 * config/mips/mips.c (mips_set_compression_mode): Change
15834 (mips_option_override): Set default values for options.
15835 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
15837 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15839 * config/rx/rx.c (rx_option_override): Likewise.
15840 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
15841 (LABEL_ALIGN): Use align_labels_log.
15842 (LOOP_ALIGN): Use align_loops_align.
15843 * config/s390/s390.c (s390_asm_output_function_label): Use new
15845 * config/sh/sh.c (sh_override_options_after_change):
15846 Change type of constants.
15847 * config/spu/spu.c (spu_sched_init): Likewise.
15848 * config/sparc/sparc.c (sparc_option_override): Set default
15849 values for options.
15850 * config/visium/visium.c (visium_option_override): Likewise.
15851 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
15852 emit p2align format with last argument if it's not needed.
15853 * doc/invoke.texi: Document extended format of -falign-*.
15854 * final.c: Use align_labels alignment.
15855 * flags.h (struct target_flag_state): Change type to use
15857 (struct align_flags_tuple): New.
15858 (struct align_flags): Likewise.
15859 (align_loops_log): Redefine macro to use new types.
15860 (align_loops_max_skip): Redefine macro to use new types.
15861 (align_jumps_log): Redefine macro to use new types.
15862 (align_jumps_max_skip): Redefine macro to use new types.
15863 (align_labels_log): Redefine macro to use new types.
15864 (align_labels_max_skip): Redefine macro to use new types.
15865 (align_functions_log): Redefine macro to use new types.
15866 (align_loops): Redefine macro to use new types.
15867 (align_jumps): Redefine macro to use new types.
15868 (align_labels): Redefine macro to use new types.
15869 (align_functions): Redefine macro to use new types.
15870 (align_functions_max_skip): Redefine macro to use new types.
15871 (align_loops_value): New macro.
15872 (align_jumps_value): New macro.
15873 (align_labels_value): New macro.
15874 (align_functions_value): New macro.
15875 * function.c (invoke_set_current_function_hook): Propagate
15876 alignment values from flags to global variables default in
15878 * ipa-icf.c (sem_function::equals_wpa): Use
15879 cl_optimization_option_eq instead of memcmp.
15880 * lto-streamer.h (cl_optimization_stream_out): Support streaming
15882 (cl_optimization_stream_in): Likewise.
15883 * optc-save-gen.awk: Support strings in cl_optimization.
15884 * opth-gen.awk: Likewise.
15885 * opts.c (finish_options): Remove error checking of invalid
15887 (MAX_CODE_ALIGN): Remove.
15888 (MAX_CODE_ALIGN_VALUE): Likewise.
15889 (parse_and_check_align_values): New function.
15890 (check_alignment_argument): Likewise.
15891 (common_handle_option): Use check_alignment_argument.
15892 * opts.h (parse_and_check_align_values): Declare.
15893 * toplev.c (init_alignments): Remove.
15894 (read_log_maxskip): New.
15895 (parse_N_M): Likewise.
15896 (parse_alignment_opts): Likewise.
15897 (backend_init_target): Remove usage of init_alignments.
15898 * toplev.h (parse_alignment_opts): Declare.
15899 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
15901 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
15902 * tree.c (cl_option_hasher::equal): New.
15903 * varasm.c: Use new global macros.
15905 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
15907 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
15908 Use a simpler align directive also if MAXSKIP = ALIGN-1.
15909 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15910 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15911 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15912 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15913 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
15914 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
15915 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
15916 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15917 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15918 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15919 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15921 2018-07-04 Martin Liska <mliska@suse.cz>
15922 Jonathan Wakely <jwakely@redhat.com>
15924 * coverage.c: Use correct type.
15925 * doc/invoke.texi: Language correction.
15927 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
15930 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
15931 ENDBRANCH for non-tail call which may return via indirect branch.
15932 * doc/extend.texi: Document indirect_return attribute.
15934 2018-07-03 Martin Sebor <msebor@redhat.com>
15936 PR tree-optimization/86274
15937 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
15939 (format_floating): Correct handling of infinities and NaNs.
15941 2018-07-03 Martin Sebor <msebor@redhat.com>
15943 * print-tree.c (print_real_cst): New function.
15944 (print_node_brief): Call it.
15945 (print_node): Ditto.
15947 2018-07-03 Jeff Law <law@redhat.com>
15949 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
15950 into a single pattern.
15952 * config/h8300/h8300.md (ors code_iterator): New.
15953 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
15954 a single pattern and single splitter.
15955 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
15956 (iorqi3_1, xorqi3_1): Likewise.
15957 (iorqi3, xorqi3 expanders): Similarly.
15959 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
15960 (movmd_internal) into a single pattern using the P mode iterator.
15961 (movmd splitters): Similarly.
15962 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
15963 (movsd splitters): Similarly.
15965 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
15966 ADDB, ADDW and ADDL into a single ADD attribute which selects the
15967 right table based on the size of the operand.
15968 * config/h8300/h8300.md (length_table): Corresponding changes. All
15969 references to "addb", "addw" and "addl" changed to "add".
15970 (btst patterns): Merge two variants into a single pattern.
15971 (tstqi, tsthi): Likewise.
15972 (addhi3_incdec, addsi3_incdec): Likewise.
15973 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
15974 (mulhi3, mulsi3): Likewise.
15975 (udivhi3, udivsi3): Likewise.
15976 (divhi3, divsi3): Likewise.
15977 (andorqi3, andorhi3, andorsi3): Likewise.
15979 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
15982 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
15983 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
15985 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15987 PR tree-optimization/85694
15988 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
15989 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
15991 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
15992 (<u>avg<mode>3_ceil): New patterns.
15994 2018-07-03 David Malcolm <dmalcolm@redhat.com>
15996 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
15997 scan-tree-dump directive.
15998 * gcc.dg/vect/slp-perm-2.c: Likewise.
15999 * gcc.dg/vect/slp-perm-3.c: Likewise.
16000 * gcc.dg/vect/slp-perm-5.c: Likewise.
16001 * gcc.dg/vect/slp-perm-6.c: Likewise.
16002 * gcc.dg/vect/slp-perm-7.c: Likewise.
16003 * gcc.dg/vect/slp-perm-8.c: Likewise.
16005 2018-07-03 Marek Polacek <polacek@redhat.com>
16007 PR middle-end/86202
16008 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
16010 2018-07-03 Richard Biener <rguenther@suse.de>
16013 * tree-ssa-structalias.c (find_func_clobbers): Properly
16014 handle indirect calls.
16016 2018-07-03 Jeff Law <law@redhat.com>
16018 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
16019 (shifts): New code iterator.
16020 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
16021 expander. Fix HImode handling on H8/SX.
16022 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
16023 (subqi3, subhi3, subsi3 expanders): Likewise.
16024 (andqi3, andhi3, andsi3 expanders): Likewise.
16025 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
16026 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
16027 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
16028 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
16029 (zero_extendqihi2, zero_extendqisi2): Likewise.
16030 (extendqihi2, extendqisi2): Likewise.
16031 (rotlqi3, rotlhi3, rotlsi3): Likewise.
16032 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
16033 (rotlqi3_1, rotlhi3_1): Likewise.
16034 (logicalhi3_sn, logicalsi3_sn): Likewise.
16035 (logicalhi3, logicalsi3): Likewise.
16037 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16039 * tree-vect-patterns.c (vect_recog_rotate_pattern)
16040 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16041 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
16042 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
16043 type to append_pattern_def_seq instead of creating a stmt_vec_info
16045 (build_mask_conversion): Likewise. Remove vinfo argument.
16046 (vect_add_conversion_to_patterm): Likewise, renaming to...
16047 (vect_add_conversion_to_pattern): ...this.
16048 (vect_recog_mask_conversion_pattern): Update call to
16049 build_mask_conversion. Pass the vector type to
16050 append_pattern_def_seq here too.
16051 (vect_recog_gather_scatter_pattern): Update call to
16052 vect_add_conversion_to_pattern.
16054 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16056 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
16057 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16058 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
16059 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
16060 STMT_VINFO_PATTERN_DEF_SEQ to null here.
16061 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
16062 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
16063 append_pattern_def_seq instead of new_pattern_def_seq.
16064 (vect_recog_divmod_pattern): Do both of the above.
16065 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
16068 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16070 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
16071 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
16072 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
16073 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
16074 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
16075 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16076 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
16077 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16078 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16079 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
16080 parameter with a single stmt_vec_info.
16081 (vect_recog_func_ptr): Likewise.
16082 (vect_recog_gather_scatter_pattern): Likewise, folding in...
16083 (vect_try_gather_scatter_pattern): ...this.
16084 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
16085 the stmt_vec_info of the statement to be matched. Don't clear
16086 STMT_VINFO_RELATED_STMT.
16087 (vect_pattern_recog): Update call accordingly.
16089 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16091 PR tree-optimization/85694
16092 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
16093 (uavgM3_ceil): Document new optabs.
16094 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
16095 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
16097 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
16098 (savg_ceil_optab): New optabs.
16099 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
16100 (vect_vect_recog_func_ptrs): Add it.
16101 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
16102 constant directly from the associated lhs.
16104 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16106 * tree-vect-patterns.c (vect_split_statement): New function.
16107 (vect_convert_input): Use it to try to split an existing cast.
16109 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16111 * poly-int.h (print_hex): New function.
16112 * dumpfile.h (dump_dec, dump_hex): Declare.
16113 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
16114 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
16115 min_input_precision, operation_precision and operation_sign.
16116 * tree-vect-patterns.c (vect_get_range_info): New function.
16117 (vect_same_loop_or_bb_p, vect_single_imm_use)
16118 (vect_operation_fits_smaller_type): Delete.
16119 (vect_look_through_possible_promotion): Add an optional
16120 single_use_p parameter.
16121 (vect_recog_over_widening_pattern): Rewrite to use new
16122 stmt_vec_info infomration. Handle one operation at a time.
16123 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
16124 (vect_truncatable_operation_p, vect_set_operation_type)
16125 (vect_set_min_input_precision): New functions.
16126 (vect_determine_min_output_precision_1): Likewise.
16127 (vect_determine_min_output_precision): Likewise.
16128 (vect_determine_precisions_from_range): Likewise.
16129 (vect_determine_precisions_from_users): Likewise.
16130 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
16131 (vect_vect_recog_func_ptrs): Put over_widening first.
16133 (vect_pattern_recog): Call vect_determine_precisions.
16135 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16137 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
16138 statements that have been replaced by further pattern statements.
16139 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
16141 2018-07-03 Richard Biener <rguenther@suse.de>
16143 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
16144 always set *dt. Dump vectype in vectype overload.
16145 * dumpfile.h (dump_gimple_expr): New function.
16146 (dump_gimple_expr_loc): Likewise.
16147 * dumpfile.c (dump_gimple_expr): New function.
16148 (dump_gimple_expr_loc): Likewise.
16150 2018-07-02 Jeff Law <law@redhat.com>
16152 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
16153 the H8/300, H8/300H and H8/S variants into a single pattern.
16154 (movhi_h8300, movqi_h8300hs): Similarly.
16155 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
16156 (QHI mode iterator): New.
16158 * config/h8300/h8300.md: Remove trailing whitespace.
16160 2018-07-02 Jim Wilson <jimw@sifive.com>
16162 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
16163 instead of emit_insn for interrupt returns.
16164 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
16165 (riscv_sret, riscv_uret): Likewise.
16167 2018-07-02 David Malcolm <dmalcolm@redhat.com>
16169 * pretty-print.c (selftest::test_pp_format): Move save and restore
16170 of quotes to class auto_fix_quotes, and add an instance.
16171 * selftest.c: Include "intl.h".
16172 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
16173 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
16174 * selftest.h (selftest::auto_fix_quotes): New class.
16176 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
16178 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
16179 (aarch64_sve_prepare_conditional_op): Remove.
16180 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
16181 Allow aarch64_simd_reg_or_zero as select operand; remove
16182 the aarch64_sve_prepare_conditional_op call.
16183 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
16184 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16185 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
16186 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
16187 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
16188 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
16189 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
16190 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
16191 and a splitters to match all of the *_any patterns.
16192 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
16194 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
16195 (SVE_COND_FP_BINARY_REV): Remove.
16196 (sve_int_op_rev, sve_fp_op_rev): New.
16197 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
16198 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
16199 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
16200 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
16201 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
16202 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
16203 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
16204 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
16205 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
16207 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
16208 Remove match_dup 1 from the inner unspec.
16209 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16211 * config/aarch64/aarch64.md (movprfx): New attr.
16212 (length): Default movprfx to 8.
16213 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
16214 (*madd<SVE_I>, *msub<SVE_I): Likewise.
16215 (*<su>mul<SVE_I>3_highpart): Likewise.
16216 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
16217 (*v<ASHIFT><SVE_I>3): Likewise.
16218 (*<su><MAXMIN><SVE_I>3): Likewise.
16219 (*<su><MAXMIN><SVE_F>3): Likewise.
16220 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
16221 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
16222 (*div<SVE_F>4): Likewise.
16224 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
16226 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
16229 2018-07-02 Richard Biener <rguenther@suse.de>
16231 PR tree-optimization/86363
16232 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
16233 memset argument refers to a non-variable address.
16235 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
16237 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
16238 {PLUS,MINUS}_EXPR code to...
16239 (adjust_symbolic_bound): ...here,
16240 (combine_bound): ...here,
16241 (set_value_range_with_overflow): ...and here.
16243 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
16245 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
16247 (extract_range_from_abs_expr): ...here.
16249 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
16251 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
16252 -fno-omit-frame-pointer when not optimizing.
16254 2018-07-02 Martin Liska <mliska@suse.cz>
16257 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
16258 (propagate_nothrow): Likewise.
16260 2018-07-02 Martin Liska <mliska@suse.cz>
16263 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
16265 2018-07-02 David Malcolm <dmalcolm@redhat.com>
16267 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
16268 function in r262149, changing "loc" param from source_location to
16269 const dump_location_t &.
16270 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
16271 declaration, as above.
16273 2018-07-01 Paul Koning <ni1d@arrl.net>
16275 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16276 -munit-asm, -mgnu-asm, -mdec-asm.
16277 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
16278 (pdp11_output_labelref): New.
16279 (pdp11_output_def): New.
16280 (pdp11_output_addr_vec_elt): New.
16281 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
16282 %# and %@ format codes.
16283 (pdp11_option_override): New.
16284 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
16285 (pdp11_output_ident): New.
16286 (pdp11_asm_named_section): New.
16287 (pdp11_asm_init_sections): New.
16288 (pdp11_file_start): New.
16289 (pdp11_file_end): New.
16290 (output_ascii): Use .ascii/.asciz for -mdec-asm.
16291 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
16292 %o, like %c but octal.
16293 (pdp11_option_override): New.
16294 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
16296 (DATA_SECTION_ASM_OP): Ditto.
16297 (READONLY_DATA_SECTION_ASM_OP): New.
16298 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
16299 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
16300 (ASM_OUTPUT_LABELREF): Ditto.
16301 (ASM_OUTPUT_DEF): Ditto.
16302 (ASM_OUTPUT_EXTERNAL): New.
16303 (ASM_OUTPUT_SOURCE_FILENAME): New.
16304 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
16305 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
16306 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
16307 %# and %@ format codes.
16308 * config/pdp11/pdp11.opt (mgnu-asm): New.
16309 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
16310 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
16311 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
16313 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
16315 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
16316 dereferencing path[] beyond its length.
16318 (debug_all_paths): New.
16319 (rewire_first_differing_edge): New.
16320 (adjust_paths_after_duplication): New.
16321 (duplicate_thread_path): Call adjust_paths_after_duplication.
16323 (thread_through_all_blocks): Add new argument to
16324 duplicate_thread_path.
16326 2018-06-30 Jim Wilson <jimw@sifive.com>
16328 * config/riscv/predicates.md (p2m1_shift_operand): New.
16329 (high_mask_shift_operand): New.
16330 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
16331 pattern using p2m1_shift_operand.
16332 (lshsi3_zero_extend_3+2): New combiner pattern using
16333 high_mask_shift_operand.
16335 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16337 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
16339 (vect_recog_rotate_pattern): ...here.
16340 (vect_convert_input): Try to insert casts of invariants in the
16342 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
16343 preheader to be empty.
16345 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16347 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
16348 vector type. If given, install it in the new statement's
16349 STMT_VINFO_VECTYPE.
16350 (vect_element_precision): New function.
16351 (vect_unpromoted_value): New struct.
16352 (vect_unpromoted_value::vect_unpromoted_value): New function.
16353 (vect_unpromoted_value::set_op): Likewise.
16354 (vect_look_through_possible_promotion): Likewise.
16355 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
16356 (vect_widened_op_tree, vect_convert_input): Likewise.
16357 (vect_convert_inputs, vect_convert_output): Likewise.
16358 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
16359 to handle the optional cast of the multiplication result and
16360 vect_widened_op_tree to detect the widened multiplication itself.
16361 Do not require the input and output of promotion casts to have
16362 the same sign, but base the signedness of the operation on the
16363 input rather than the result. If the pattern includes two
16364 promotions, check that those promotions have the same sign.
16365 Do not restrict the MULT_EXPR handling to a double-width result;
16366 handle quadruple-width results and wider. Use vect_convert_inputs
16367 to convert the inputs to the common type.
16368 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
16369 to handle the optional cast of the ABS result. Also allow a sign
16370 change or a sign extension between the ABS and MINUS.
16371 Use vect_widened_op_tree to detect the widened subtraction and use
16372 vect_convert_inputs to convert the inputs to the common type.
16373 (vect_handle_widen_op_by_const): Delete.
16374 (vect_recog_widen_op_pattern): New function.
16375 (vect_recog_widen_mult_pattern): Use it.
16376 (vect_recog_widen_shift_pattern): Likewise.
16377 (vect_recog_widen_sum_pattern): Use
16378 vect_look_through_possible_promotion to handle the promoted
16381 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16383 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
16384 the containing gimple_seq *.
16385 * gimple-iterator.h (gsi_for_stmt): Declare it.
16386 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
16387 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
16388 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16389 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16390 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
16392 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
16394 (vect_mark_pattern_stmts): ...here. Handle cases in which the
16395 statement being replaced is part of an existing pattern
16396 definition sequence, inserting the new pattern statements before
16398 (vect_pattern_recog_1): Don't return a bool. If the statement
16399 is already part of a pattern, instead apply pattern matching
16400 to the pattern definition statements. Don't clear the
16401 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
16402 (vect_pattern_recog): Don't break after the first match;
16403 continue processing the pattern definition statements instead.
16404 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
16406 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16408 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16409 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16410 (vect_recog_widen_sum_pattern): Use it.
16412 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16414 * tree-vect-loop.c (vectorizable_reduction): Assert that the
16415 phi is not a pattern statement and has not been replaced by
16416 a pattern statement.
16417 * tree-vect-patterns.c (type_conversion_p): Don't check
16418 STMT_VINFO_IN_PATTERN_P.
16419 (vect_recog_vector_vector_shift_pattern): Likewise.
16420 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
16421 the pattern statement rather than the original statement; check
16422 directly for a WIDEN_MULT_EXPR here.
16423 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
16424 vect_is_simple_use to return the pattern statement rather
16425 than the original statement; use is_pattern_stmt_p to check
16426 for such a pattern statement.
16427 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
16428 to return the pattern statement rather than the original statement;
16429 don't do the same transformation here.
16430 (vect_is_simple_use): If the defining statement has been replaced
16431 by a pattern statement, return the pattern statement instead.
16432 Remove the corresponding (local) transformation from the vectype
16435 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16437 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
16438 end and default to null.
16439 * tree-vect-loop.c (vect_create_epilog_for_reduction)
16440 (vectorizable_reduction): Update calls accordingly, dropping the
16441 gimple ** argument if the passed-back statement isn't needed.
16442 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
16443 (vect_recog_rotate_pattern): Likewise.
16444 (vect_recog_mask_conversion_pattern): Likewise.
16445 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
16446 (vect_mask_constant_operand_p): Likewise.
16447 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
16448 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
16449 (get_group_load_store_type, get_load_store_type): Likewise.
16450 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
16451 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
16452 (vectorizable_conversion, vectorizable_assignment): Likewise.
16453 (vectorizable_shift, vectorizable_operation): Likewise.
16454 (vectorizable_store, vect_is_simple_cond): Likewise.
16455 (vectorizable_condition, vectorizable_comparison): Likewise.
16456 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
16457 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
16458 and move it to the end. Cope with null def_stmt_outs.
16460 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
16462 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
16464 2018-06-29 Jeff Law <law@redhat.com>
16466 * config/v850/v850.c (v850_legitimate_address_p): Handle large
16467 displacements for TARGET_V850E2V3 and newer.
16468 (TARGET_LRA_P): Remove. Defaults to LRA now.
16469 * config/v850/v850.md (sign23byte_load): Remove.
16470 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
16471 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
16473 2018-06-29 Martin Liska <mliska@suse.cz>
16476 * coverage.c (coverage_init): Mangle full path name.
16477 * doc/invoke.texi: Document the change.
16478 * gcov-io.c (mangle_path): New.
16479 * gcov-io.h (mangle_path): Likewise.
16480 * gcov.c (mangle_name): Use mangle_path for path mangling.
16482 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16484 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
16485 if starting source register is not even.
16487 2018-06-29 Martin Liska <mliska@suse.cz>
16489 PR tree-optimization/86263
16490 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
16491 Make edge redirection.
16493 2018-06-29 David Malcolm <dmalcolm@redhat.com>
16495 * dumpfile.c (dump_loc): Add indentation based on scope depth.
16496 (dump_scope_depth): New variable.
16497 (get_dump_scope_depth): New function.
16498 (dump_begin_scope): New function.
16499 (dump_end_scope): New function.
16500 * dumpfile.h (get_dump_scope_depth): New declaration.
16501 (dump_begin_scope): New declaration.
16502 (dump_end_scope): New declaration.
16503 (class auto_dump_scope): New class.
16504 (AUTO_DUMP_SCOPE): New macro.
16505 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
16508 2018-06-29 Richard Biener <rguenther@suse.de>
16510 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
16511 compute_all_dependences succeeds.
16512 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
16513 exceed --param loop-max-datarefs-for-datadeps.
16515 2018-06-29 Jakub Jelinek <jakub@redhat.com>
16517 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
16519 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
16522 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
16523 alternative 0 in preferred_for_speed attribute.
16525 2018-06-28 Paul Koning <ni1d@arrl.net>
16527 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
16528 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
16529 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
16530 * config/pdp11/pdp11.md: Correct "length" attribute calculation
16531 for shift insn patterns.
16533 2018-06-28 David Malcolm <dmalcolm@redhat.com>
16535 * cgraph.c (cgraph_node::get_body): Replace assignments to
16536 "dump_file" with calls to set_dump_file.
16537 * dumpfile.c (alt_dump_file): Make static, and group with...
16538 (alt_flags): ...this definition.
16539 (dumps_are_enabled): New variable.
16540 (refresh_dumps_are_enabled): New function.
16541 (set_dump_file): New function.
16542 (set_alt_dump_file): New function.
16543 (gcc::dump_manager::dump_start): Replace assignments to
16544 "dump_file" and "alt_dump_file" with calls to set_dump_file and
16546 (gcc::dump_manager::dump_finish): Likewise.
16547 * dumpfile.h (alt_dump_file): Delete decl.
16548 (dumps_are_enabled): New variable decl.
16549 (set_dump_file): New function decl.
16550 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
16552 * tree-nested.c (lower_nested_functions): Replace assignments to
16553 "dump_file" with calls to set_dump_file.
16555 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
16557 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
16558 goto_locus of each outgoing edge of each basic block.
16560 2018-06-28 Richard Biener <rguenther@suse.de>
16562 * dwarf2out.c (decl_scope_table): Remove.
16563 (push_decl_scope): Likewise.
16564 (pop_decl_scope): Likewise.
16565 (gen_type_die_for_member): Do not call push/pop_decl_scope.
16566 (gen_struct_or_union_type_die): Likewise.
16567 (gen_tagged_type_die): Likewise.
16568 (dwarf2out_init): Do not initialize decl_scope_table.
16569 (dwarf2out_c_finalize): Do not free it.
16571 2018-06-28 Richard Biener <rguenther@suse.de>
16573 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
16574 deciding whether to not re-use a DIE.
16576 2018-06-28 Richard Biener <rguenther@suse.de>
16578 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
16579 DW_AT_abstract_origin attribute.
16581 2018-06-28 Martin Liska <mliska@suse.cz>
16583 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16584 Use newly introduced constants.
16585 * tree-switch-conversion.h (struct jump_table_cluster):
16586 Define max_ratio_for_size and max_ratio_for_speed.
16588 2018-06-28 Martin Liska <mliska@suse.cz>
16590 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16591 Add new checking assert to catch invalid state.
16592 (jump_table_cluster::can_be_handled): Handle single case
16594 (jump_table_cluster::is_beneficial): Bail out for such case.
16595 (bit_test_cluster::find_bit_tests):
16596 Add new checking assert to catch invalid state.
16597 (bit_test_cluster::can_be_handled): Handle single case
16599 (bit_test_cluster::is_beneficial): Bail out for such case.
16600 (switch_decision_tree::analyze_switch_statement):
16603 2018-06-28 Martin Liska <mliska@suse.cz>
16605 * common.opt: Introduce -completion option.
16606 * gcc.c (driver_handle_option): Handle it.
16607 (driver::main): Print completions if completion
16609 * opt-suggestions.c (option_proposer::get_completions):
16611 (option_proposer::suggest_completion): Likewise.
16612 (option_proposer::find_param_completions): Likewise.
16613 (verify_autocompletions): Likewise.
16614 (test_completion_valid_options): Likewise.
16615 (test_completion_valid_params): Likewise.
16616 (in_completion_p): Likewise.
16617 (empty_completion_p): Likewise.
16618 (test_completion_partial_match): Likewise.
16619 (test_completion_garbage): Likewise.
16620 (opt_proposer_c_tests): Likewise.
16621 * opt-suggestions.h: Declare new functions.
16622 * opts.c (common_handle_option): Handle OPT__completion_.
16623 * selftest-run-tests.c (selftest::run_tests): Add
16624 opt_proposer_c_tests.
16625 * selftest.c (assert_str_startswith): New.
16626 * selftest.h (assert_str_startswith): Likewise.
16627 (opt_proposer_c_tests): New.
16628 (ASSERT_STR_STARTSWITH): Likewise.
16630 2018-06-28 Martin Liska <mliska@suse.cz>
16632 * Makefile.in: Add opt-suggestions.o.
16633 * gcc-main.c: Include opt-suggestions.h.
16634 * gcc.c (driver::driver): Likewise.
16635 (driver::~driver): Remove m_option_suggestions.
16636 (driver::build_option_suggestions): Moved to option_proposer.
16637 (driver::suggest_option): Likewise.
16638 (driver::handle_unrecognized_options): Use option_proposer.
16639 * gcc.h (class driver): Add new memver m_option_proposer.
16640 * opt-suggestions.c: New file.
16641 * opt-suggestions.h: New file.
16643 2018-06-28 Martin Liska <mliska@suse.cz>
16645 * vec.h (class auto_string_vec): New (moved from auto_argvec).
16646 (auto_string_vec::~auto_string_vec): Likewise.
16648 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
16650 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
16651 prevent_decl_creation_for_types fields up and add reset_location field.
16652 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
16653 statement if id->reset_location is true.
16654 (copy_edges_for_bb): Do not set goto_locus on the new edges if
16655 id->reset_location is true.
16656 (copy_phis_for_bb): Force input_location on the arguments if
16657 id->reset_location is true.
16658 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
16659 is set on the function to be inlined.
16661 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
16663 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
16665 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
16667 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
16668 registers for Pmode.
16669 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
16670 hard registers for the clobbered pseudo.
16672 2018-06-27 Paul Koning <ni1d@arrl.net>
16674 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16675 mutually exclusive options.
16676 * config/pdp11/constraints.md (h): New constraint.
16677 (O): Update definition to match shift code generation.
16678 (D): New constraint.
16679 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
16681 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
16683 (output_jump): Change arguments.
16684 (pdp11_fixed_cc_regs): New function.
16685 (pdp11_cc_mode): Ditto.
16686 (pdp11_expand_shift): Ditto.
16687 (pdp11_assemble_shift): Ditto.
16688 (pdp11_small_shift): Ditto.
16689 (pdp11_branch_cost): Remove.
16690 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
16692 (pdp11_register_move_cost): Update for CC registers.
16693 (pdp11_rtx_costs): Add case for LSHIFTRT.
16694 (pdp11_output_jump): Add CCNZ mode conditional branches.
16695 (notice_update_cc_on_set): Remove.
16696 (pdp11_cc_mode): New function.
16697 (simple_memory_operand): Correct pre/post decrement case.
16698 (no_side_effect_operand): New function.
16699 (pdp11_regno_reg_class): Add CC_REGS class.
16700 (pdp11_fixed_cc_regs): New function.
16701 (pdp11_small_shift): New function.
16702 (pdp11_expand_shift): New function to expand shift insns.
16703 (pdp11_assemble_shift): New function to output shifts.
16704 (pdp11_branch_cost): Remove.
16705 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
16706 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
16707 (WCHAR_TYPE): Ditto.
16708 (PTRDIFF_TYPE): Ditto.
16709 (ADJUST_INSN_LENGTH): New macro.
16710 (FIXED_REGISTERS): Add CC registers.
16711 (CALL_USED_REGISTERS): Ditto.
16712 (reg_class): Ditto.
16713 (REG_CLASS_NAMES): Ditto.
16714 (REG_CLASS_CONTENTS): Ditto.
16715 (SELECT_CC_MODE): Use new function.
16716 (TARGET_FLAGS_REGNUM): New macro.
16717 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
16718 (cc0_reg_rtx): Remove.
16719 (CC_STATUS_MDEP): Remove.
16720 (CC_STATUS_MDEFP_INIT): Remove.
16721 (CC_IN_FPU): Remove.
16722 (NOTICE_UPDATE_CC): Remove.
16723 (REGISTER_NAMES): Add CC registers.
16724 (BRANCH_COST): Change to constant 1.
16725 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
16727 * config/pdp11/pdp11.opt (mbcopy): Remove.
16728 (mbcopy-builtin): Remove.
16729 (mbranch-cheap): Remove.
16730 (mbranch-expensive): Remove.
16731 * config/pdp11/predicates.md (expand_shift_operand): Update to
16732 match shift code generation.
16733 (ccnz_operator): New predicate.
16734 * doc/invoke.texi (PDP-11 Options): Remove deleted options
16735 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
16736 Remove non-existent option -mabshi, -mno-abshi. Document mutually
16738 * doc/md.texi (PDP-11): Document new D and h constraints. Update
16739 description of O constraint.
16741 2018-06-27 Jeff Law <law@redhat.com>
16742 Austin Law <austinklaw@gmail.com>
16744 * config/v850/v850.md (addsi3_set_flags): New pattern.
16745 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
16746 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
16747 (zero_extendhisi2_v850_set_flags): Likewise.
16748 (zero_extendqisi2_v850_set_flags): Likewise.
16749 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
16750 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
16751 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
16753 * config/v850/v850-protos.h (notice_update_cc): Remove.
16754 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
16755 (v850_print_operand): Handle 'D' and "d".
16756 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
16757 Add handling of arithmetic/logical operations compared against zero.
16758 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
16759 Do not look at v850_compare_op, instead get mode from last argument.
16760 (v850_gen_compare): Remove
16761 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
16762 after reload for prologue insns.
16763 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
16765 (construct_save_jarl): Likewise.
16766 (TARGET_FLAGS_REGNUM): Define.
16767 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
16768 (NOTICE_UPDATE_CC): Remove.
16769 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
16770 than cc0. Conditionalize on reload_completed.
16771 (cmpsi_insn, setfcc_insn): Likewise.
16772 (tst1 splitter): Turn into define_and_split which sets the flags
16774 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
16775 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
16776 (cstoresf4, cstoredf4): Clobber the flags.
16777 (cmpsi, cmpsf, cmpdf): Remove expanders.
16778 (setf_insn): Remove pattern.
16779 (addsi3): Turn into define_and_split which clobbers the flags after
16780 reload and a suitable pattern (addsi3_clobber_flags) for use after
16782 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
16783 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
16784 (ashrsi3, ashrsi3_v850e2): Likewise.
16785 (bins): Clobber the flags.
16786 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
16787 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
16788 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
16789 (call_value_internal_short, call_value_internal_long): Likewise.
16790 (callt_save_interrupt, callt_return_interrupt): Likewise.
16791 (save_interrupt, return_interrupt): Likewise.
16792 (callt_save_all_interrupt, save_all_interrupt): Likewise.
16793 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
16794 (restore_all_interrupt, _restore_all_interrupt): Likewise.
16795 (All FP comparisons): Only allow after reload has completed.
16797 (divh, divhu): Tweak output template.
16798 (branch_z_normal, branch_z_invert): Remove
16799 (branch_nz_normal, branch_nz_invert): Likewise.
16800 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
16802 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
16803 * config/v850/v850.c (notice_update_cc): Remove.
16804 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
16805 (CC_NO_CARRY): Likewise.
16806 (NOTICE_UPDATE_CC): Define to nothing.
16807 * config/v850/v850.md: Remove block comment on cc0 handling
16808 Remove "cc" attribute from all patterns. Remove cc_status handling
16809 from all patterns. Minor formatting fixes.
16811 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16813 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
16814 (cortex-a76.cortex-a55): Likewise.
16815 * config/aarch64/aarch64-tune.md: Regenerate.
16816 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
16817 cortex-a76.cortex-a55.
16819 2018-06-27 Jeff Law <law@redhat.com>
16821 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
16822 (MULTILIB_DIRNAMES): Similarly.
16824 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
16826 * gimple.h (gimple_return_retbnd): Delete.
16827 (gimple_return_set_retbnd): Likewise.
16828 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
16829 gimple_return_set_retbnd.
16830 * gimple-pretty-print.c (dump_gimple_return): Remove call to
16831 gimple_return_retbnd and adjust.
16832 * tree-inline.h (struct copy_body_data): Remove retbnd field.
16833 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
16834 Explicitly return NULL in a couple more cases. Move assertion
16835 on debug statements and remove unreachable code.
16836 (reset_debug_binding): Do not test id->retbnd.
16837 (expand_call_inline): Do not set it.
16839 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
16841 * configure.ac: Add --disable-gcov option.
16842 * configure: Regenerate.
16843 * Makefile.in: Honour @enable_gcov@.
16844 * doc/install.texi: Document --disable-gcov.
16846 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16848 * config/arm/arm-cpus.in (cortex-a76): New entry.
16849 (cortex-a76.cortex-a55): Likewise.
16850 * config/arm/arm-tables.opt: Regenerate.
16851 * config/arm/arm-tune.md: Likewise.
16852 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
16853 * doc/invoke.texi (ARM Options): Document cortex-a76 and
16854 cortex-a76.cortex-a55.
16856 2018-06-27 Tamar Christina <tamar.christina@arm.com>
16859 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
16861 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
16863 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
16865 (EPILOGUE_USES): Likewise.
16867 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
16869 * tree-inline.c (remap_location): New function extracted from...
16870 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
16871 (copy_phis_for_bb): ...here. Call remap_location.
16872 (copy_cfg_body): Adjust call to copy_edges_for_bb.
16874 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
16876 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
16877 unaligned vsx for 16B memset.
16879 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
16882 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
16883 ieee128_float_type_node to long_double_type_node unless
16884 TARGET_LONG_DOUBLE_128 is set.
16886 2018-06-26 David Malcolm <dmalcolm@redhat.com>
16888 * cfgloop.c (get_loop_location): Convert return type from
16889 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
16890 by implicit construction from rtx_insn *, and using
16891 dump_user_location_t::from_function_decl for the fallback case.
16892 * cfgloop.h (get_loop_location): Convert return type from
16893 location_t to dump_user_location_t.
16894 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
16895 dump_printf_loc to pass in a dump_location_t rather than a
16896 location_t, via the gimple stmt.
16897 * coverage.c (get_coverage_counts): Update calls to
16898 dump_printf_loc to pass in dump_location_t rather than a
16900 * doc/optinfo.texi (Dump types): Convert example of
16901 dump_printf_loc from taking "locus" to taking "insn". Update
16902 description of the "_loc" calls to cover dump_location_t.
16903 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
16905 (dump_user_location_t::dump_user_location_t): New constructors,
16906 from gimple *stmt and rtx_insn *.
16907 (dump_user_location_t::from_function_decl): New function.
16908 (dump_loc): Make static.
16909 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
16910 const dump_location_t &.
16911 (dump_generic_expr_loc): Delete.
16912 (dump_printf_loc): Convert param "loc" from location_t to
16913 const dump_location_t &.
16914 (selftest::test_impl_location): New function.
16915 (selftest::dumpfile_c_tests): New function.
16916 * dumpfile.h: Include "profile-count.h".
16917 (class dump_user_location_t): New class.
16918 (struct dump_impl_location_t): New struct.
16919 (class dump_location_t): New class.
16920 (dump_printf_loc): Convert 2nd param from source_location to
16921 const dump_location_t &.
16922 (dump_generic_expr_loc): Delete.
16923 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
16924 const dump_location_t &.
16925 * gimple-fold.c (fold_gimple_assign): Update call to
16926 dump_printf_loc to pass in a dump_location_t rather than a
16927 location_t, via the gimple stmt.
16928 (gimple_fold_call): Likewise.
16929 * gimple-loop-interchange.cc
16930 (loop_cand::analyze_iloop_reduction_var): Update for change to
16931 check_reduction_path.
16932 (tree_loop_interchange::interchange): Update for change to
16933 find_loop_location.
16934 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
16935 change in return-type of find_loop_location.
16936 (graphite_regenerate_ast_isl): Likewise.
16937 * graphite-optimize-isl.c (optimize_isl): Likewise.
16938 * graphite.c (graphite_transform_loops): Likewise.
16939 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
16940 pass in a dump_location_t rather than a location_t, via the
16942 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16943 * ipa.c (walk_polymorphic_call_targets): Likewise.
16944 * loop-unroll.c (report_unroll): Convert "locus" param from
16945 location_t to dump_location_t.
16946 (decide_unrolling): Update for change to get_loop_location's
16948 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
16949 location_t to dump_user_location_t.
16950 (grid_find_single_omp_among_assignments_1): Updates calls to
16951 dump_printf_loc to pass in a dump_location_t rather than a
16952 location_t, via the gimple stmt.
16953 (grid_parallel_clauses_gridifiable): Convert "tloc" from
16954 location_t to dump_location_t. Updates calls to dump_printf_loc
16955 to pass in a dump_location_t rather than a location_t, via the
16957 (grid_inner_loop_gridifiable_p): Likewise.
16958 (grid_dist_follows_simple_pattern): Likewise.
16959 (grid_gfor_follows_tiling_pattern): Likewise.
16960 (grid_target_follows_gridifiable_pattern): Likewise.
16961 (grid_attempt_target_gridification): Convert initialization
16962 of local "grid" from memset to zero-initialization; FIXME: does
16963 this require C++11? Update call to dump_printf_loc to pass in a
16964 optinfo_location rather than a location_t, via the gimple stmt.
16965 * profile.c (read_profile_edge_counts): Updates call to
16966 dump_printf_loc to pass in a dump_location_t rather than a
16968 (compute_branch_probabilities): Likewise.
16969 * selftest-run-tests.c (selftest::run_tests): Call
16971 * selftest.h (dumpfile_c_tests): New decl.
16972 * tree-loop-distribution.c (pass_loop_distribution::execute):
16973 Update for change in return type of find_loop_location.
16974 * tree-parloops.c (parallelize_loops): Likewise.
16975 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
16976 "locus" from location_t to dump_user_location_t.
16977 (canonicalize_loop_induction_variables): Likewise.
16978 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
16979 for change in return type of find_loop_location.
16980 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
16981 to dump_printf_loc to pass in a dump_location_t rather than a
16982 location_t, via the stmt.
16983 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
16985 * tree-vect-loop-manip.c (find_loop_location): Convert return
16986 type from source_location to dump_user_location_t.
16987 (vect_do_peeling): Update for above change.
16988 (vect_loop_versioning): Update for change in type of
16990 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
16991 from location_t to dump_user_location_t.
16992 (vect_estimate_min_profitable_iters): Update for change in type
16994 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
16995 location_t to dump_location_t.
16996 (vect_slp_bb): Update for change in type of vect_location.
16997 * tree-vectorizer.c (vect_location): Convert from source_location
16998 to dump_user_location_t.
16999 (try_vectorize_loop_1): Update for change in vect_location's type.
17000 (vectorize_loops): Likewise.
17001 (increase_alignment): Likewise.
17002 * tree-vectorizer.h (vect_location): Convert from source_location
17003 to dump_user_location_t.
17004 (find_loop_location): Convert return type from source_location to
17005 dump_user_location_t.
17006 (check_reduction_path): Convert 1st param from location_t to
17007 dump_user_location_t.
17008 * value-prof.c (check_counter): Update call to dump_printf_loc to
17009 pass in a dump_user_location_t rather than a location_t; update
17010 call to error_at for change in type of "locus".
17011 (check_ic_target): Update call to dump_printf_loc to
17012 pass in a dump_user_location_t rather than a location_t, via the
17015 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
17017 * config/s390/s390.h (enum processor_flags): Do not use
17018 default tune parameter when -march was specified.
17020 2018-06-26 Jakub Jelinek <jakub@redhat.com>
17023 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
17024 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
17027 2018-06-26 Richard Biener <rguenther@suse.de>
17029 PR tree-optimization/86287
17031 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
17032 (vect_analyze_loop): Initialize n_stmts.
17034 2018-06-26 Richard Biener <rguenther@suse.de>
17036 PR middle-end/86271
17037 * fold-const.c (fold_convertible_p): Pointer extension
17040 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
17043 * dwarf2out.c (loc_list_has_views): Adjust comments.
17044 (dw_loc_list): Split single cross-partition range with
17047 2018-06-25 Jeff Law <law@redhat.com>
17049 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
17050 on -mbig-switch by default.
17052 * config/v850/predicates.md (const_float_1_operand): Fix match_code
17054 (const_float_0_operand): Remove unused predicate.
17055 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
17056 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
17057 (recipsf2): New expander. Original pattern now called
17059 (recipdf2, recipdf2_insn): Similarly.
17060 (rsqrtsf2, rsqrtsf2_insn): Similarly
17061 (rsqrtdf2, rsqrtdf2_insn): Similarly
17063 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
17065 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
17066 Simplify logic for FreeBSD (twice).
17068 2018-06-25 Martin Sebor <msebor@redhat.com>
17070 PR tree-optimization/86204
17071 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
17072 a strnlen result if it's less than the length of the string.
17074 2018-06-25 Martin Sebor <msebor@redhat.com>
17076 PR tree-optimization/85700
17077 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
17078 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
17079 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
17081 2018-06-25 Martin Sebor <msebor@redhat.com>
17083 * doc/extend.texi (Zero-length arrays): Update and clarify.
17085 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
17087 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
17088 added IEEE/IBM long double multilib support on PowerPC little
17089 endian Linux systems.
17090 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
17091 (MULTILIB_DEFAULTS): Likewise.
17092 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17094 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
17095 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
17096 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
17098 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
17100 PR middle-end/86311
17101 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
17102 (REORDER_45): Likewise.
17104 2018-06-25 Jeff Law <law@redhat.com>
17106 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
17107 dividend to 32 bits. Adjust length.
17108 (udivmodhi4): Cleanup output template. Fix length.
17110 2018-06-25 Carl Love <cel@us.ibm.com>
17112 * config/rs6000/vsx.md: Change word selector to prefered location.
17114 2018-06-25 Richard Biener <rguenther@suse.de>
17116 PR tree-optimization/86304
17117 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
17118 epilogue-if-converted loops as well.
17120 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
17122 * lto-section-out.c (lto_begin_section): Do not print section
17123 name for noaddr and unnumbered dumps.
17125 2018-06-25 Richard Biener <rguenther@suse.de>
17127 * tree-vectorizer.h (struct vec_info_shared): New structure
17128 with parts split out from struct vec_info and loop_nest from
17129 struct _loop_vec_info.
17130 (struct vec_info): Adjust accordingly.
17131 (struct _loop_vec_info): Likewise.
17132 (LOOP_VINFO_LOOP_NEST): Adjust.
17133 (LOOP_VINFO_DATAREFS): Likewise.
17134 (LOOP_VINFO_DDRS): Likewise.
17135 (struct _bb_vec_info): Likewise.
17136 (BB_VINFO_DATAREFS): Likewise.
17137 (BB_VINFO_DDRS): Likewise.
17138 (struct _stmt_vec_info): Add dr_aux member.
17139 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
17140 (DR_MISALIGNMENT_UNINITIALIZED): New.
17141 (set_dr_misalignment): Adjust.
17142 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
17143 (vect_analyze_loop): Adjust prototype.
17144 (vect_analyze_loop_form): Likewise.
17145 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17146 Compute dependences lazily.
17147 (vect_record_base_alignments): Use shared datarefs/ddrs.
17148 (vect_verify_datarefs_alignment): Likewise.
17149 (vect_analyze_data_refs_alignment): Likewise.
17150 (vect_analyze_data_ref_accesses): Likewise.
17151 (vect_analyze_data_refs): Likewise.
17152 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
17153 constructor parameter for shared part.
17154 (vect_analyze_loop_form): Pass in shared part and adjust.
17155 (vect_analyze_loop_2): Pass in storage for the number of
17156 stmts. Move loop nest finding to the caller. Compute
17158 (vect_analyze_loop): Pass in shared part.
17159 (vect_transform_loop): Verify shared datarefs are unchanged.
17160 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
17161 constructor parameter for shared part.
17162 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
17163 (vect_slp_bb): Verify shared datarefs are unchanged before
17165 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
17167 (new_stmt_vec_info): Initialize DR_AUX misalignment to
17168 DR_MISALIGNMENT_UNINITIALIZED.
17169 * tree-vectorizer.c (vec_info::vec_info): Add constructor
17170 parameter for shared part.
17171 (vec_info::~vec_info): Adjust.
17172 (vec_info_shared::vec_info_shared): New.
17173 (vec_info_shared::~vec_info_shared): Likewise.
17174 (vec_info_shared::save_datarefs): Likewise.
17175 (vec_info_shared::check_datarefs): Likewise.
17176 (try_vectorize_loop_1): Construct shared part live for analyses
17177 of a single loop for multiple vector sizes.
17178 * tree-parloops.c (gather_scalar_reductions): Adjust.
17180 2018-06-25 Richard Biener <rguenther@suse.de>
17182 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
17183 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
17184 (vect_analyze_data_refs): Remove similar code from here and
17185 simplify accordingly.
17187 2018-06-25 Richard Biener <rguenther@suse.de>
17189 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
17190 for reverse storage order accesses rather than asserting
17191 they cannot happen here.
17193 2018-06-25 Tom de Vries <tdevries@suse.de>
17196 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
17197 Use data16 instead of .byte for insn prefix.
17199 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
17202 * parser.c (make_char_string_pack): Pass this literal chars
17203 through cpp_interpret_string.
17204 (cp_parser_userdef_numeric_literal): Check the result of
17205 make_char_string_pack.
17207 2018-06-24 Maya Rashish <coypu@sdf.org>
17209 * ginclude/stddef.h: Simplify conditions around avoiding
17210 re-definition of __size_t.
17212 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
17214 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
17215 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
17217 2018-06-22 Maya Rashish <coypu@sdf.org>
17219 * doc/invoke.texi (mno-fancy-math-387): Update for changes
17220 made to OpenBSD and NetBSD through the years.
17222 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
17224 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17225 behavior of vec_pack (vector double, vector double) to match
17226 behavior of vec_float2 (vector double, vector double).
17228 2018-06-22 Olivier Hainque <hainque@adacore.com>
17230 * gimplify.c (gimplify_function_tree): Prevent creation
17231 of a trampoline for the address of the current function
17232 passed to entry/exit instrumentation hooks.
17234 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
17237 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
17240 2018-06-22 Martin Liska <mliska@suse.cz>
17242 PR tree-optimization/86263
17243 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17244 Bail out if is_enabled is false.
17245 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
17247 (jump_table_cluster::is_enabled): New function.
17249 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
17251 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
17252 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
17253 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
17254 (lto_input_ts_binfo_tree_pointers): Likewise.
17255 * tree-streamer-out.c (streamer_write_tree_bitfields,
17256 write_ts_binfo_tree_pointers): Likewise.
17257 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
17259 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
17261 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
17263 2018-06-22 Martin Liska <mliska@suse.cz>
17265 * symbol-summary.h (get): Make it pure and inline move
17266 functionality from ::get function.
17267 (get): Remove and inline into ::get and ::get_create.
17268 (get_create): Move code from ::get function.
17270 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17273 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
17274 -x assembler-with-cpp.
17276 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17278 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
17279 _FILE_OFFSET_BITS=64 for C++.
17281 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
17283 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
17284 conversion insn that shows up when pr85657-3.c is compiled using
17285 IEEE 128-bit long double.
17286 (neg<mode>2_internal): Use the correct mode to check whether the
17287 mode is IBM extended.
17288 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
17289 multiply and divide external functions from being created more
17292 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
17294 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
17296 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
17297 the edge can be forwarded.
17298 (cfg_layout_merge_blocks): Likewise.
17300 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
17302 * except.c (finish_eh_generation): Commit edge insertions only after
17303 the EH edges have been redirected from post-landing to landing pads.
17305 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
17307 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
17308 create_tmp_var_for to create the FRAME decl.
17309 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
17311 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
17313 * tree-inline.c (copy_edges_for_bb): Minor tweak.
17314 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
17315 debug statement when resetting its value.
17316 (expand_call_inline): Copy the locus of the call onto the assignment
17317 of the return value, if any. Use local variable in more cases.
17319 2018-06-21 Martin Liska <mliska@suse.cz>
17321 * ipa-pure-const.c (propagate_nothrow): Use
17322 funct_state_summaries->get.
17323 (dump_malloc_lattice): Likewise.
17324 (propagate_malloc): Likewise.
17326 2018-06-21 Richard Biener <rguenther@suse.de>
17328 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
17329 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
17330 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
17332 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
17333 BLOCK_ABSTRACT_ORIGIN unconditionally.
17335 2018-06-21 David Malcolm <dmalcolm@redhat.com>
17337 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
17339 * ipa-reference.c (ipa_reference_c_finalize): Delete
17340 ipa_ref_opt_sum_summaries and set it to NULL.
17342 2018-06-21 Tom de Vries <tdevries@suse.de>
17344 PR tree-optimization/85859
17345 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
17346 test with comment from bb_no_side_effects_p.
17348 2018-06-21 Richard Biener <rguenther@suse.de>
17350 PR tree-optimization/86232
17351 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
17352 max for constant niter.
17354 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
17356 * config/aarch64/aarch64-simd.md
17357 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
17359 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
17361 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
17362 Make opernads of the unspec commutative.
17364 2018-06-21 Richard Biener <rguenther@suse.de>
17366 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
17367 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
17368 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
17369 (vect_analyze_data_ref_dependence): Re-order checks to deal with
17371 (vect_record_base_alignments): Do not record base alignment
17372 for gathers or scatters.
17373 (vect_compute_data_ref_alignment): Drop return value that is always
17374 true. Bail out early for gathers or scatters.
17375 (vect_enhance_data_refs_alignment): Bail out early for gathers
17377 (vect_find_same_alignment_drs): Likewise.
17378 (vect_analyze_data_refs_alignment): Remove dead code.
17379 (vect_slp_analyze_and_verify_node_alignment): Likewise.
17380 (vect_analyze_data_refs): For possible gathers or scatters do
17381 not create an alternate DR, just check their possible validity
17382 and mark them. Adjust DECL_NONALIASED handling to not rely
17383 on DR_BASE_ADDRESS.
17384 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
17385 update inits of gathers or scatters.
17386 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
17387 Also copy gather/scatter flag to pattern vinfo.
17389 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
17391 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17392 behavior of vec_packsu (vector unsigned long long, vector unsigned
17393 long long) to match behavior of vec_packs with same signature.
17395 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
17396 Thomas Schwinge <thomas@codesourcery.com>
17397 Cesar Philippidis <cesar@codesourcery.com>
17399 * gimplify.c (gimplify_scan_omp_clauses): Add support for
17400 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17401 (gimplify_adjust_omp_clauses): Likewise.
17402 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
17403 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
17404 (gimplify_omp_target_update): Update handling of acc update and
17406 * omp-low.c (install_var_field): Remove unused parameter
17407 base_pointers_restrict.
17408 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
17409 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
17411 (omp_target_base_pointers_restrict_p): Delete.
17412 (scan_omp_target): Update call to scan_sharing_clauses.
17413 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
17415 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
17416 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17417 (convert_local_omp_clauses): Likewise.
17418 * tree-pretty-print.c (dump_omp_clause): Likewise.
17419 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
17421 (omp_clause_code_name): Likewise.
17423 2018-06-20 Jakub Jelinek <jakub@redhat.com>
17426 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
17429 PR tree-optimization/86231
17430 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
17431 anti-range don't overwrite *vr0min before using it to compute *vr0max.
17433 2018-06-20 Tom de Vries <tdevries@suse.de>
17435 PR tree-optimization/86097
17436 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
17437 iv type if signedness of iv type is not the same as that of *nit.
17439 2018-06-20 Jakub Jelinek <jakub@redhat.com>
17441 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
17442 EDGE_EH edges, verify they are all EDGE_EH.
17444 2018-06-20 Maya Rashish <coypu@sdf.org>
17446 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
17448 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17450 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
17451 * config/aarch64/aarch64.c (xgene1_tunings): Add
17452 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
17453 (aarch64_mode_valid_for_sched_fusion_p):
17454 Allow 16-byte modes.
17455 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
17456 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
17458 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
17460 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
17461 * config/aarch64/iterators.md (VQ2): New mode iterator.
17463 2018-06-20 Martin Liska <mliska@suse.cz>
17465 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
17466 Change default ratio from 10 to 8.
17468 2018-06-20 Martin Liska <mliska@suse.cz>
17470 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17472 (bit_test_cluster::find_bit_tests): Likewise.
17473 (switch_decision_tree::analyze_switch_statement): Find clusters.
17474 * tree-switch-conversion.h (struct jump_table_cluster): Document
17477 2018-06-20 Martin Liska <mliska@suse.cz>
17479 * tree-switch-conversion.c (switch_conversion::collect):
17480 Record m_uniq property.
17481 (switch_conversion::expand): Bail out for special conditions.
17482 (group_cluster::~group_cluster): New.
17483 (group_cluster::group_cluster): Likewise.
17484 (group_cluster::dump): Likewise.
17485 (jump_table_cluster::emit): New.
17486 (switch_decision_tree::fix_phi_operands_for_edges): New.
17487 (struct case_node): Remove struct.
17488 (jump_table_cluster::can_be_handled): New.
17489 (case_values_threshold): Moved to header.
17490 (reset_out_edges_aux): Likewise.
17491 (jump_table_cluster::is_beneficial): New.
17492 (bit_test_cluster::can_be_handled): Likewise.
17493 (add_case_node): Remove.
17494 (bit_test_cluster::is_beneficial): New.
17495 (case_bit_test::cmp): New.
17496 (bit_test_cluster::emit): New.
17497 (expand_switch_as_decision_tree_p): Remove.
17498 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
17499 (fix_phi_operands_for_edge): Likewise.
17500 (switch_decision_tree::analyze_switch_statement): New.
17501 (compute_cases_per_edge): Move ...
17502 (switch_decision_tree::compute_cases_per_edge): ... here.
17503 (try_switch_expansion): Likewise.
17504 (switch_decision_tree::try_switch_expansion): Likewise.
17505 (record_phi_operand_mapping): Likewise.
17506 (switch_decision_tree::record_phi_operand_mapping): Likewise.
17507 (emit_case_decision_tree): Likewise.
17508 (switch_decision_tree::emit): Likewise.
17509 (balance_case_nodes): Likewise.
17510 (switch_decision_tree::balance_case_nodes): Likewise.
17511 (dump_case_nodes): Likewise.
17512 (switch_decision_tree::dump_case_nodes): Likewise.
17513 (emit_jump): Likewise.
17514 (switch_decision_tree::emit_jump): Likewise.
17515 (emit_cmp_and_jump_insns): Likewise.
17516 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
17517 (emit_case_nodes): Likewise.
17518 (switch_decision_tree::emit_case_nodes): Likewise.
17519 (conditional_probability): Remove.
17520 * tree-switch-conversion.h (enum cluster_type): New.
17522 (struct cluster): Likewise.
17523 (cluster::cluster): Likewise.
17524 (struct simple_cluster): Likewise.
17525 (simple_cluster::simple_cluster): Likewise.
17526 (struct group_cluster): Likewise.
17527 (struct jump_table_cluster): Likewise.
17528 (struct bit_test_cluster): Likewise.
17529 (struct min_cluster_item): Likewise.
17530 (struct case_tree_node): Likewise.
17531 (case_tree_node::case_tree_node): Likewise.
17532 (jump_table_cluster::case_values_threshold): Likewise.
17533 (struct case_bit_test): Likewise.
17534 (struct switch_decision_tree): Likewise.
17535 (struct switch_conversion): Likewise.
17536 (switch_decision_tree::reset_out_edges_aux): Likewise.
17538 2018-06-20 Martin Liska <mliska@suse.cz>
17540 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
17541 (hoist_edge_and_branch_if_true): Likewise.
17542 (expand_switch_using_bit_tests_p): Likewise.
17543 (struct case_bit_test): Likewise.
17544 (case_bit_test_cmp): Likewise.
17545 (emit_case_bit_tests): Likewise.
17546 (switch_conversion::switch_conversion): New class.
17547 (struct switch_conv_info): Remove old struct.
17548 (collect_switch_conv_info): More to ...
17549 (switch_conversion::collect): ... this.
17550 (check_range): Likewise.
17551 (switch_conversion::check_range): Likewise.
17552 (check_all_empty_except_final): Likewise.
17553 (switch_conversion::check_all_empty_except_final): Likewise.
17554 (check_final_bb): Likewise.
17555 (switch_conversion::check_final_bb): Likewise.
17556 (create_temp_arrays): Likewise.
17557 (switch_conversion::create_temp_arrays): Likewise.
17558 (free_temp_arrays): Likewise.
17559 (gather_default_values): Likewise.
17560 (switch_conversion::gather_default_values): Likewise.
17561 (build_constructors): Likewise.
17562 (switch_conversion::build_constructors): Likewise.
17563 (constructor_contains_same_values_p): Likewise.
17564 (switch_conversion::contains_same_values_p): Likewise.
17565 (array_value_type): Likewise.
17566 (switch_conversion::array_value_type): Likewise.
17567 (build_one_array): Likewise.
17568 (switch_conversion::build_one_array): Likewise.
17569 (build_arrays): Likewise.
17570 (switch_conversion::build_arrays): Likewise.
17571 (gen_def_assigns): Likewise.
17572 (switch_conversion::gen_def_assigns): Likewise.
17573 (prune_bbs): Likewise.
17574 (switch_conversion::prune_bbs): Likewise.
17575 (fix_phi_nodes): Likewise.
17576 (switch_conversion::fix_phi_nodes): Likewise.
17577 (gen_inbound_check): Likewise.
17578 (switch_conversion::gen_inbound_check): Likewise.
17579 (process_switch): Use the newly created class.
17580 (switch_conversion::expand): New.
17581 (switch_conversion::~switch_conversion): New.
17582 * tree-switch-conversion.h: New file.
17584 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17586 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
17587 tree-vect-patterns.c.
17588 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
17589 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
17590 (vect_recog_sad_pattern): Likewise.
17591 (vect_recog_widen_sum_pattern): Likewise.
17592 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
17593 (vect_recog_widen_shift_pattern): Remove the type_in argument.
17594 (vect_recog_rotate_pattern): Likewise.
17595 (vect_recog_mult_pattern): Likewise.
17596 (vect_recog_vector_vector_shift_pattern): Likewise.
17597 (vect_recog_divmod_pattern): Likewise.
17598 (vect_recog_mixed_size_cond_pattern): Likewise.
17599 (vect_recog_bool_pattern): Likewise.
17600 (vect_recog_mask_conversion_pattern): Likewise.
17601 (vect_try_gather_scatter_pattern): Likewise.
17602 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
17603 (vect_recog_over_widening_pattern): Likewise.
17604 (vect_recog_gather_scatter_pattern): Likewise.
17605 (vect_recog_func_ptr): Move from tree-vectorizer.h
17606 (vect_vect_recog_func_ptrs): Move further down the file.
17607 (vect_recog_func): Likewise. Remove the third argument.
17608 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
17609 (vect_pattern_recog_1): Expect the pattern function to do any
17610 necessary target tests. Also expect it to provide a vector type.
17611 Remove the type_in handling.
17613 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17615 * tree-vect-patterns.c (vect_pattern_detected): New function.
17616 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
17617 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
17618 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
17619 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
17620 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
17621 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
17622 (vect_recog_mask_conversion_pattern)
17623 (vect_try_gather_scatter_pattern): Likewise.
17625 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17627 * tree-vect-patterns.c (vect_get_internal_def): New function.
17628 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17629 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
17630 (search_type_for_mask_1): Use it.
17632 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17634 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
17635 redundant WIDEN_SUM_EXPR handling.
17636 (vect_recog_sad_pattern): Likewise.
17638 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17640 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
17641 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
17642 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
17643 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
17644 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
17646 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17648 * tree-vect-stmts.c (vectorizable_call): Make sure that we
17649 use the stmt_vec_info of the original bb statement for the
17650 new zero assignment, even if the call is part of a pattern.
17652 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17654 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
17655 that the sequence is attached to the original statement rather
17656 than the pattern statement.
17657 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
17658 PATTERN_DEF_SEQ from the original statement rather than
17659 the main pattern statement.
17660 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
17661 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
17662 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
17664 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17666 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
17667 definition statements before the early exit for statements that aren't
17669 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
17671 (vect_transform_loop): ...here. Process pattern definition
17672 statements without first checking whether the main pattern
17673 statement is live or relevant.
17675 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
17677 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
17678 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
17680 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
17682 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
17683 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
17684 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
17685 (expand_block_compare): Change select_block_compare_mode call.
17686 (expand_strncmp_align_check): Use new functions, fix comment.
17687 (emit_final_str_compare_gpr): New function.
17688 (expand_strn_compare): Refactor and clean up code.
17689 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
17691 2018-06-19 Tony Reix <tony.reix@atos.com>
17692 Damien Bergamini <damien.bergamini@atos.com>
17693 David Edelsohn <dje.gcc@gmail.com>
17695 * collect2.c (static_obj): New variable.
17696 (static_libs): New variable.
17697 (is_in_list): Uncomment declaration.
17698 (main): Track AIX libraries linked statically.
17699 (is_in_list): Uncomment definition.
17700 (scan_prog_file): Don't add AIX shared libraries initializer
17701 to constructor list if linking statically.
17703 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
17705 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
17707 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
17709 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
17711 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
17714 2018-06-19 Martin Liska <mliska@suse.cz>
17716 * config/i386/i386.c (ix86_can_inline_p): Do not use
17717 ipa_fn_summaries::get_create.
17718 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
17720 (devirtualization_time_bonus): Likewise.
17721 (ipcp_propagate_stage): Likewise.
17722 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17723 (edge_set_predicate): Likewise.
17724 (evaluate_conditions_for_known_args): Likewise.
17725 (evaluate_properties_for_edge): Likewise.
17726 (ipa_call_summary::reset): Tranform to ...
17727 (ipa_call_summary::~ipa_call_summary): ... this.
17728 (ipa_fn_summary::reset): Transform to ...
17729 (ipa_fn_summary::~ipa_fn_summary): ... this.
17730 (ipa_fn_summary_t::remove): Rename to ...
17731 (ipa_fn_summary_t::remove_callees): ... this.
17732 (ipa_fn_summary_t::duplicate): Use placement new
17733 instead of memory copy.
17734 (ipa_call_summary_t::duplicate): Likewise.
17735 (ipa_call_summary_t::remove): Remove.
17736 (dump_ipa_call_summary): Change get_create to get.
17737 (ipa_dump_fn_summary): Dump only when summary exists.
17738 (analyze_function_body): Use symbol_summary::get instead
17740 (compute_fn_summary): Likewise.
17741 (estimate_edge_devirt_benefit): Likewise.
17742 (estimate_edge_size_and_time): Likewise.
17743 (inline_update_callee_summaries): Likewise.
17744 (remap_edge_change_prob): Likewise.
17745 (remap_edge_summaries): Likewise.
17746 (ipa_merge_fn_summary_after_inlining): Likewise.
17747 (write_ipa_call_summary): Likewise.
17748 (ipa_fn_summary_write): Likewise.
17749 (ipa_free_fn_summary): Likewise.
17750 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
17751 (struct ipa_call_summary): Likewise.
17752 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
17754 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
17755 (estimate_size_after_inlining): Likewise.
17756 (estimate_growth): Likewise.
17757 (growth_likely_positive): Likewise.
17758 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17759 (inline_call): Likewise.
17760 * ipa-inline.c (caller_growth_limits): Likewise.
17761 (can_inline_edge_p): Likewise.
17762 (can_inline_edge_by_limits_p): Likewise.
17763 (compute_uninlined_call_time): Likewise.
17764 (compute_inlined_call_time): Likewise.
17765 (want_inline_small_function_p): Likewise.
17766 (edge_badness): Likewise.
17767 (update_caller_keys): Likewise.
17768 (update_callee_keys): Likewise.
17769 (inline_small_functions): Likewise.
17770 (inline_to_all_callers_1): Likewise.
17771 (dump_overall_stats): Likewise.
17772 (early_inline_small_functions): Likewise.
17773 (early_inliner): Likewise.
17774 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17775 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17776 * ipa-pure-const.c (malloc_candidate_p): Likewise.
17777 * ipa-split.c (execute_split_functions): Likewise.
17778 * symbol-summary.h: Likewise.
17779 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17781 2018-06-19 Richard Biener <rguenther@suse.de>
17783 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
17784 (vectorize_loops): ... here. Fix dbgcnt handling.
17785 (try_vectorize_loop): Wrap try_vectorize_loop_1.
17787 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
17790 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
17791 ieee128 argument takes up only one (vector) register, not two (floating
17794 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
17796 * gimplify.c (gimplify_init_constructor): Really never clear for an
17797 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
17799 2018-06-19 Richard Biener <rguenther@suse.de>
17801 PR tree-optimization/86179
17802 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
17803 after failed recognition.
17805 2018-06-18 Martin Sebor <msebor@redhat.com>
17807 PR middle-end/85602
17808 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
17809 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
17810 Handle integer subtraction.
17811 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
17812 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
17814 2018-06-18 David Malcolm <dmalcolm@redhat.com>
17816 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
17817 param from rtx to rtx_insn *.
17818 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
17820 (frv_ifcvt_modify_insn): Likwise.
17821 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
17822 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
17823 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
17824 as_a <rtx_insn *> cast to local "unprotected_region" once
17825 it's been established that it's not NULL or pc_rtx.
17826 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
17827 param "sethi" from rtx to rtx_insn *.
17828 (nds32_group_float_insns): Likewise for param "insn".
17829 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
17831 (vax_output_int_subtract): Likewise.
17832 * config/vax/vax.c (vax_output_int_add): Likewise for param
17834 (vax_output_int_subtract): Likewise.
17835 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
17836 (emit_pattern_after): Likewise for param "after".
17837 (emit_insn_after): Likewise.
17838 (emit_jump_insn_after): Likewise.
17839 (emit_call_insn_after): Likewise.
17840 (emit_debug_insn_after): Likewise.
17841 (emit_pattern_before): Likewise for param "before".
17842 (emit_insn_before): Likewise.
17843 (emit_jump_insn_before): Likewise.
17844 * final.c (get_insn_template): Likewise for param "insn", removing
17846 * output.h (get_insn_template): Likewise for 2nd param.
17847 * rtl.h (emit_insn_before): Likewise.
17848 (emit_jump_insn_before): Likewise.
17849 (emit_debug_insn_before_noloc): Likewise.
17850 (emit_insn_after): Likewise.
17851 (emit_jump_insn_after): Likewise.
17852 (emit_call_insn_after): Likewise.
17853 (emit_debug_insn_after): Likewise.
17854 (set_insn_deleted): Likewise for param.
17856 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
17859 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
17860 floating point modes, so that IFmode is numerically greater than
17861 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
17862 to declare the ordering. This prevents IFmode from being
17863 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
17864 machine. Include rs6000-modes.h to share the fractional values
17865 between genmodes* and the rest of the compiler.
17866 (IFmode): Likewise.
17867 (KFmode): Likewise.
17868 (TFmode): Likewise.
17869 * config/rs6000/rs6000-modes.h: New file.
17870 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
17871 meaning of rs6000_long_double_size so that 126..128 selects an
17872 appropriate 128-bit floating point type.
17873 (rs6000_option_override_internal): Likewise.
17874 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
17875 (TARGET_LONG_DOUBLE_128): Change the meaning of
17876 rs6000_long_double_size so that 126..128 selects an appropriate
17877 128-bit floating point type.
17878 (LONG_DOUBLE_TYPE_SIZE): Update comment.
17879 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
17880 source and destination to match the standard usage.
17881 (truncifkf2): Likewise.
17882 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
17883 ISA 2.07 to use an explicit clobber, instead of passing in a
17885 (copysign<mode>3_soft): Likewise.
17887 2018-06-18 David Malcolm <dmalcolm@redhat.com>
17889 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17890 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
17891 (vect_slp_analyze_instance_dependence): Likewise.
17892 (vect_enhance_data_refs_alignment): Likewise.
17893 (vect_analyze_data_refs_alignment): Likewise.
17894 (vect_slp_analyze_and_verify_instance_alignment
17895 (vect_analyze_data_ref_accesses): Likewise.
17896 (vect_prune_runtime_alias_test_list): Likewise.
17897 (vect_analyze_data_refs): Likewise.
17898 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
17899 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17900 (vect_analyze_scalar_cycles_1): Likewise.
17901 (vect_get_loop_niters): Likewise.
17902 (vect_analyze_loop_form_1): Likewise.
17903 (vect_update_vf_for_slp): Likewise.
17904 (vect_analyze_loop_operations): Likewise.
17905 (vect_analyze_loop): Likewise.
17906 (vectorizable_induction): Likewise.
17907 (vect_transform_loop): Likewise.
17908 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
17909 * tree-vect-slp.c (vect_analyze_slp): Likewise.
17910 (vect_make_slp_decision): Likewise.
17911 (vect_detect_hybrid_slp): Likewise.
17912 (vect_slp_analyze_operations): Likewise.
17913 (vect_slp_bb): Likewise.
17914 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
17915 (vectorizable_bswap): Likewise.
17916 (vectorizable_call): Likewise.
17917 (vectorizable_simd_clone_call): Likewise.
17918 (vectorizable_conversion): Likewise.
17919 (vectorizable_assignment): Likewise.
17920 (vectorizable_shift): Likewise.
17921 (vectorizable_operation): Likewise.
17922 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
17924 2018-06-18 Martin Sebor <msebor@redhat.com>
17926 PR tree-optimization/81384
17927 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
17928 * builtins.c (expand_builtin_strnlen): New function.
17929 (expand_builtin): Call it.
17930 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
17931 * builtins.def (BUILT_IN_STRNLEN): New.
17932 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
17933 Warn for bounds in excess of maximum object size.
17934 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
17935 single-value ranges. Handle strnlen.
17936 (handle_builtin_strlen): Handle strnlen.
17937 (strlen_check_and_optimize_stmt): Same.
17938 * doc/extend.texi (Other Builtins): Document strnlen.
17940 2018-06-18 Maya Rashish <coypu@sdf.org>
17942 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
17943 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
17944 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
17946 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
17948 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
17950 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17952 * tree.c (escaped_string::escape): Replace cast to char * by
17953 const_cast<char *> (unescaped).
17955 2018-06-18 Nick Clifton <nickc@redhat.com>
17958 * tree.c (escaped_string): New class. Converts an unescaped
17959 string into its escaped equivalent.
17960 (warn_deprecated_use): Use the new class to convert the
17961 deprecation message, if present.
17962 (test_escaped_strings): New self test.
17963 (test_c_tests): Add test_escaped_strings.
17964 * doc/extend.texi (deprecated): Add a note that the
17965 deprecation message is affected by the -fmessage-length
17966 option, and that control characters will be escaped.
17967 (#pragma GCC error): Document this pragma.
17968 (#pragma GCC warning): Likewise.
17969 * doc/invoke.texi (-fmessage-length): Document this option's
17970 effect on the #warning and #error preprocessor directives and
17971 the deprecated attribute.
17973 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
17975 * tree.c (decl_value_expr_lookup): Revert latest change.
17976 (decl_value_expr_insert): Likewise.
17978 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
17980 * gimplify.c (nonlocal_vlas): Delete.
17981 (nonlocal_vla_vars): Likewise.
17982 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
17984 (gimplify_body): Do not create and destroy nonlocal_vlas.
17985 * tree-nested.c: Include diagnostic.h.
17986 (use_pointer_in_frame): Tweak.
17987 (lookup_field_for_decl): Add assertion and declare the transformation.
17988 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
17989 internal error when the reference is in a wrong context. Do not
17990 create a debug decl by default.
17991 (note_nonlocal_block_vlas): Delete.
17992 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
17993 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
17994 create a debug decl by default.
17995 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
17996 call is in a wrong context.
17997 (fixup_vla_decls): New function.
17998 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
17999 debug variables were created.
18000 * tree.c (decl_value_expr_lookup): Add checking assertion.
18001 (decl_value_expr_insert): Likewise.
18003 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
18005 PR middle-end/82479
18006 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
18007 * tree-scalar-evolution.c (interpret_expr): Likewise.
18008 (expression_expensive_p): Likewise.
18009 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
18010 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
18011 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
18012 (ssa_defined_by_minus_one_stmt_p): New.
18014 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
18016 PR middle-end/64946
18017 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
18018 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
18019 * dojump.c (do_jump): Likewise.
18020 * expr.c (expand_expr_real_2): Check operand type's sign.
18021 * fold-const.c (const_unop): Handle ABSU_EXPR.
18022 (fold_abs_const): Likewise.
18023 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
18024 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
18025 (strip_sign_op_1): Likesise.
18026 * match.pd: Add new pattern to generate ABSU_EXPR.
18027 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
18028 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18029 * tree-eh.c (operation_could_trap_helper_p): Likewise.
18030 * tree-inline.c (estimate_operator_cost): Likewise.
18031 * tree-pretty-print.c (dump_generic_node): Likewise.
18032 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
18033 * tree.def (ABSU_EXPR): New.
18035 2018-06-16 Jakub Jelinek <jakub@redhat.com>
18037 PR middle-end/86095
18038 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
18039 documented as preserved for backward compatibility only.
18040 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
18042 PR rtl-optimization/86108
18043 * bb-reorder.c (create_forwarder_block): Renamed to ...
18044 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
18045 jump from new landing pad to the second part.
18046 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
18049 2018-06-15 Jakub Jelinek <jakub@redhat.com>
18051 PR middle-end/85878
18052 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
18053 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
18054 Only call store_expr for halves if the mode is the same.
18056 PR middle-end/86123
18057 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
18058 Fix up comment formatting.
18060 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
18062 * typed-splay-tree.h (typed_splay_tree::remove): New function.
18063 (typed_splay_tree::closure,
18064 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
18065 (typed_splay_tree::typed_splay_tree,
18066 typed_splay_tree::operator =): Declared private.
18067 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
18068 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
18069 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
18070 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
18071 typed_splay_tree::splay_tree_splay,
18072 typed_splay_tree::splay_tree_foreach_helper,
18073 typed_splay_tree::splay_tree_insert,
18074 typed_splay_tree::splay_tree_remove,
18075 typed_splay_tree::splay_tree_lookup,
18076 typed_splay_tree::splay_tree_predecessor,
18077 typed_splay_tree::splay_tree_successor,
18078 typed_splay_tree::splay_tree_min,
18079 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
18080 (typed_splay_tree::root, typed_splay_tree::comp,
18081 typed_splay_tree::delete_key,
18082 typed_splay_tree::delete_value): New data members.
18083 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
18084 typed_splay_tree::remove.
18086 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
18088 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
18089 -mginv and -mno-ginv to the assembler.
18090 * config/mips/mips.opt (-mcrc): New option.
18091 (-mginv): Likewise.
18092 * doc/invoke.text (-mcrc): Document.
18093 (-mginv): Likewise.
18095 2018-06-15 Nick Clifton <nickc@redhat.com>
18098 * tree.c (escaped_string): New class. Converts an unescaped
18099 string into its escaped equivalent.
18100 (warn_deprecated_use): Use the new class to convert the
18101 deprecation message, if present.
18102 (test_escaped_strings): New self test.
18103 (test_c_tests): Add test_escaped_strings.
18104 * doc/extend.texi (deprecated): Add a note that the
18105 deprecation message is affected by the -fmessage-length
18106 option, and that control characters will be escaped.
18107 (#pragma GCC error): Document this pragma.
18108 (#pragma GCC warning): Likewise.
18109 * doc/invoke.texi (-fmessage-length): Document this option's
18110 effect on the #warning and #error preprocessor directives and
18111 the deprecated attribute.
18113 2018-06-15 Richard Biener <rguenther@suse.de>
18115 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
18116 here, also noting vector size used.
18117 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
18118 size used in MSG_OPTIMIZED_LOCATIONS dump.
18119 (pass_slp_vectorize::execute): Adjust.
18121 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
18124 * config/arc/arc.c (arc_return_address_register): Fix
18127 2018-06-15 Richard Biener <rguenther@suse.de>
18129 PR middle-end/86159
18130 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
18131 leave useless conversion stripping to force_gimple_operand_gsi.
18132 (gimplify_build2): Likewise.
18133 (gimplify_build1): Likewise.
18135 2018-06-15 Richard Biener <rguenther@suse.de>
18137 PR middle-end/86076
18138 * tree-cfg.c (move_stmt_op): unshare invariant addresses
18139 before adjusting their block.
18141 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
18143 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
18144 multilibs for *-*-rtems*.
18145 * config/riscv/t-rtems: New file.
18147 2018-06-14 Jakub Jelinek <jakub@redhat.com>
18149 PR middle-end/86122
18150 * match.pd ((A +- CST1) +- CST2): Punt if last resort
18151 unsigned_type_for returns NULL.
18154 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
18155 subregs of multi-word pseudos unless the float mode has word size.
18157 2018-06-14 Richard Biener <rguenther@suse.de>
18159 PR middle-end/86139
18160 * tree-vect-generic.c (build_word_mode_vector_type): Remove
18161 duplicate and harmful type_hash_canon.
18162 * tree.c (type_hash_canon): Assert we didn't find ourselves.
18164 2018-06-14 Richard Biener <rguenther@suse.de>
18167 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
18170 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
18172 * config/rtems.h (STDINT_LONG32): Define.
18174 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
18175 Prachi Godbole <prachi.godbole@imgtec.com>
18177 * config/mips/mips-cpus.def: Define P6600.
18178 * config/mips/mips-tables.opt: Regenerate.
18179 * config/mips/mips.c (mips_ucbranch_type): New enum.
18180 (mips_rtx_cost_data): Add support for P6600.
18181 (mips_issue_rate): Likewise.
18182 (mips_multipass_dfa_lookahead): Likewise.
18183 (mips_avoid_hazard): Likewise.
18184 (mips_reorg_process_insns): Likewise.
18185 (mips_classify_branch_p6600): New function.
18186 * config/mips/mips.h (TUNE_P6600): New define.
18187 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
18188 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
18189 * config/mips/mips.md: Include p6600.md.
18190 (processor): Add p6600.
18191 * config/mips/p6600.md: New file.
18192 * doc/invoke.texi: Add p6600 to supported architectures.
18194 2018-06-13 Martin Sebor <msebor@redhat.com>
18196 PR tree-optimization/86114
18197 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
18199 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
18201 2018-06-13 Richard Biener <rguenther@suse.de>
18203 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
18204 Properly set vector type of the intermediate stmt.
18205 * tree-vect-stmts.c (vectorizable_operation): The destination
18206 var always has vectype_out type.
18208 2018-06-13 Jeff Law <law@redhat.com>
18210 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
18211 integer 0 for argument to print_rtl_with_bb.
18212 (rl78_reorg): Likewise.
18214 2018-06-13 David Malcolm <dmalcolm@redhat.com>
18216 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
18217 from rtx to rtx_insn *.
18218 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
18220 (add_sched_insns_for_speculation): Likewise for local "target",
18221 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18222 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
18223 from rtx_insn ** to rtx_code_label **.
18224 (reorg_emit_nops): Likewise.
18225 (c6x_reorg): Likewise for local "call_labels".
18226 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
18228 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
18229 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
18230 the loops over LABEL_REFS.
18231 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
18233 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18234 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
18235 (split_branches): Strengthen local "olabel" from rtx to
18236 rtx_insn *, adding a safe_as_a cast.
18237 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
18239 (add_insn_after): Likewise for first two params.
18240 (add_insn_before): Likewise.
18241 (remove_insn): Likewise for param.
18242 (emit_pattern_before_noloc): Likewise for second and third params.
18243 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
18244 (emit_call_insn_before_noloc): Likewise.
18245 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
18247 (emit_barrier_before): Likewise.
18248 (emit_label_before): Strengthen "label" param from "rtx" to
18249 "rtx_code_label *". Strengthen "before" param from "rtx" to
18251 (emit_insn_after_1): Strengthen "after" param from "rtx" to
18253 (emit_pattern_after_noloc): Likewise.
18254 (emit_insn_after_noloc): Likewise.
18255 (emit_jump_insn_after_noloc): Likewise.
18256 (emit_call_insn_after_noloc): Likewise.
18257 (emit_debug_insn_after_noloc): Likewise.
18258 (emit_barrier_after): Likewise.
18259 (emit_label_after): Likewise for both params.
18260 (emit_pattern_after_setloc): Likewise for "after" param. Convert
18261 "loc" param from "int" to "location_t".
18262 (emit_insn_after_setloc): Likewise.
18263 (emit_jump_insn_after_setloc): Likewise.
18264 (emit_call_insn_after_setloc): Likewise.
18265 (emit_debug_insn_after_setloc): Likewise.
18266 (emit_pattern_before_setloc): Likewise for "before" param. Convert
18267 "loc" param from "int" to "location_t".
18268 (emit_pattern_before): Convert NULL_RTX to NULL.
18269 (emit_insn_before_setloc): Convert "loc" param from "int" to
18271 (emit_jump_insn_before_setloc): Likewise.
18272 (emit_call_insn_before_setloc): Likewise.
18273 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
18274 rtx_insn *. Convert "loc" param from "int" to "location_t".
18275 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
18276 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
18277 Convert 3rd param from "int" to "location_t".
18278 (emit_barrier_before, emit_barrier_after, next_real_insn):
18279 Strengthen param from rtx to rtx_insn *.
18280 (emit_label_before): Strengthen 1st param from "rtx" to
18281 "rtx_code_label *". Strengthen 2nd param from "rtx" to
18283 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
18284 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
18285 Strengthen 2nd param from "rtx" to "rtx_insn *".
18286 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
18287 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
18288 Likewise. Convert 3rd param from "int" to "location_t".
18289 (emit_label_after): Strengthen 1st param from "rtx" to
18290 "rtx_code_label *".
18291 (next_real_insn, remove_insn): Strengthen param from "rtx" to
18293 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
18294 from "rtx" to "rtx_insn *".
18296 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
18298 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
18299 bodies streamed in with -Q.
18300 * dumpfile.c (dump_files): Add lto-stream-out dump file.
18301 * dumpfile.h (tree_dump_index): Add lto_stream_out.
18302 * gimple-streamer-out.c: Include gimple-pretty-print.h
18303 (output_bb): Dump stmts streamed.
18304 * lto-section-out.c: Include print-tree.h
18305 (lto_begin_section): Dump sections created.
18306 (lto_output_decl_index): Dump decl encoded.
18307 * lto-streamer-out.c: Include print-tree.h
18308 (create_output_block): Dump output block created.
18309 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
18310 (output_function): Dump function output.
18311 (output_constructor): Dump constructor streamed.
18312 (write_global_stream): Output indexes encoded.
18313 (produce_asm_for_decls): Dump streams encoded.
18314 * lto-streamer.c (streamer_dump_file): New global var.
18315 * lto-streamer.h (streamer_dump_file): Declare.
18316 * passes.c (ipa_write_summaries): Initialize streamer dump.
18317 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
18320 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
18323 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
18324 offsets for register save directives. Emit a second batch of save
18325 directives, if need be, when the function accesses prior frames.
18327 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18329 * config/arc/fpu.md (fmasf4): Force operand to register.
18330 (fnmasf4): Likewise.
18332 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18334 * config/arc/arc-protos.h (arc_pad_return): Remove.
18335 * config/arc/arc.c (machine_function): Remove force_short_suffix
18337 (arc_print_operand): Adjust printing of '&'.
18338 (arc_verify_short): Remove conditional printing of short suffix.
18339 (arc_final_prescan_insn): Remove reference to size_reason.
18340 (pad_return): New function.
18341 (arc_reorg): Call pad_return.
18342 (arc_pad_return): Remove.
18343 (arc_init_machine_status): Remove reference to force_short_suffix.
18344 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
18345 (attr length): When attribute iscompact is true force to 2
18346 regardless; in the case of maybe check if we want to force the
18347 instruction to have 4 bytes length.
18348 (nopv): Change it to generate 4 byte long nop as well.
18349 (blockage): New pattern.
18350 (simple_return): Remove call to arc_pad_return.
18351 (p_return_i): Likewise.
18353 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18355 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
18357 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18359 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
18362 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18364 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
18365 for ARC700 and ARCv2.
18367 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
18370 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
18371 operands[2] instead of operands[1].
18374 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
18376 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
18377 case, check whether the outer register overlaps an unallocatable
18378 register, not just whether it fits the required class.
18380 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
18382 * poly-int.h (can_div_trunc_p): Add new overload in which all values
18384 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
18385 (memrefs_conflict_p): Likewise.
18386 (init_alias_analysis): Likewise.
18387 * cfgexpand.c (expand_debug_expr): Likewise.
18388 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
18389 * cse.c (fold_rtx): Likewise.
18390 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
18391 * expr.c (emit_block_move_hints): Likewise.
18392 (clear_storage_hints, push_block, emit_push_insn): Likewise.
18393 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
18394 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
18395 (emit_group_store): Likewise.
18396 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
18397 to read the PRE/POST_MODIFY increment.
18398 * calls.c (store_one_arg): Use strip_offset.
18399 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
18401 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
18403 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
18404 (simplify_binary_operation_1): Extend CONST_INT handling to
18406 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
18407 than a HOST_WIDE_INT.
18408 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
18410 (adjust_mems, add_stores): Update accodingly.
18411 (vt_canonicalize_addr): Track polynomial offsets.
18412 (emit_note_insn_var_location): Likewise.
18413 (vt_add_function_parameter): Likewise.
18414 (vt_initialize): Likewise.
18416 2018-06-12 Jeff Law <law@redhat.com>
18418 * config.gcc (alpha*-*-freebsd*): Remove.
18419 * config/alpha/freebsd.h: Remove.
18421 2018-06-12 David Malcolm <dmalcolm@redhat.com>
18424 * spellcheck-tree.c (levenshtein_distance): Rename to...
18425 (get_edit_distance): ...this, and update for underlying renaming.
18426 * spellcheck-tree.h (levenshtein_distance): Rename to...
18427 (get_edit_distance): ...this.
18428 * spellcheck.c (levenshtein_distance): Rename to...
18429 (get_edit_distance): ...this. Convert from Levenshtein distance
18430 to Damerau-Levenshtein distance by supporting transpositions of
18431 adjacent characters. Rename "v1" to "v_next" and "v0" to
18433 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
18434 (selftest::test_edit_distance_unit_test_oneway): ...this, and
18435 update for underlying renaming.
18436 (selftest::levenshtein_distance_unit_test): Rename to...
18437 (selftest::test_get_edit_distance_unit): ...this, and update for
18438 underlying renaming.
18439 (selftest::test_find_closest_string): Add example from PR 69968
18440 where transposition helps
18441 (selftest::test_metric_conditions): Update for renaming.
18442 (selftest::test_metric_conditions): Likewise.
18443 (selftest::spellcheck_c_tests): Likewise.
18444 * spellcheck.h (levenshtein_distance): Rename both overloads to...
18445 (get_edit_distance): ...this.
18446 (best_match::consider): Update for renaming.
18448 2018-06-12 Martin Sebor <msebor@redhat.com>
18450 PR tree-optimization/85259
18451 * builtins.c (compute_objsize): Handle constant offsets.
18452 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
18453 true iff a warning has been issued.
18454 * gimple.h (gimple_nonartificial_location): New function.
18455 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
18456 gimple_nonartificial_location and handle -Wno-system-headers.
18457 (handle_builtin_stxncpy): Same.
18459 2018-06-12 Martin Sebor <msebor@redhat.com>
18462 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
18464 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
18466 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
18467 BUILTIN_VEC_XST entries for pointer to double and long long.
18469 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
18472 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18474 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18477 2018-06-12 Martin Liska <mliska@suse.cz>
18479 * doc/options.texi: Document IntegerRange.
18481 2018-06-12 Martin Liska <mliska@suse.cz>
18483 * config/i386/i386.opt: Make MPX-related options as Deprecated.
18484 * opt-functions.awk: Handle Deprecated flag.
18485 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
18487 (read_cmdline_option): Report warning for a deprecated option.
18488 * opts.h (struct cl_option): Add new field cl_deprecated.
18489 (CL_ERR_DEPRECATED): New.
18491 2018-06-12 Martin Liska <mliska@suse.cz>
18493 * doc/options.texi: Document Deprecated option flag.
18495 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18497 * config/arc/arc-arch.h (arc_extras): New enum.
18498 (arc_cpu_t):Add field extra.
18499 (arc_cpu_types): Consider the extras.
18500 * config/arc/arc-cpus.def: Add extras info.
18501 * config/arc/arc-opts.h (processor_type): Consider extra field.
18502 * config/arc/arc.c (arc_override_options): Handle extra field.
18504 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18506 * config/arc/arc-arch.h: Update ARC_OPTX macro.
18507 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
18509 * config/arc/arc.c (arc_init): Update pic warning.
18510 (irq_range): Update irq range parsing warnings.
18511 (arc_override_options): Update various warning messages.
18512 (arc_handle_aux_attribute): Likewise.
18514 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
18516 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
18518 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18520 * doc/sourcebuild.texi: Document usage of line number 0 in verify
18521 compiler messages directives.
18523 2018-06-12 Matthew Fortune <mfortune@gmail.com>
18525 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
18526 * config/mips/mips-tables.opt: Regenerate.
18527 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
18529 * doc/invoke.texi: Document -march=i6500.
18531 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
18533 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
18534 (i6400_gpmul): Add cpu_unit.
18535 (i6400_gpdiv): Likewise.
18536 (i6400_msa_add_d): Update reservations.
18537 (i6400_msa_int_add) Likewise.
18538 (i6400_msa_short_logic3) Likewise.
18539 (i6400_msa_short_logic2) Likewise.
18540 (i6400_msa_short_logic) Likewise.
18541 (i6400_msa_move) Likewise.
18542 (i6400_msa_cmp) Likewise.
18543 (i6400_msa_short_float2) Likewise.
18544 (i6400_msa_div_d) Likewise.
18545 (i6400_msa_long_logic1) Likewise.
18546 (i6400_msa_long_logic2) Likewise.
18547 (i6400_msa_mult) Likewise.
18548 (i6400_msa_long_float2) Likewise.
18549 (i6400_msa_long_float4) Likewise.
18550 (i6400_msa_long_float5) Likewise.
18551 (i6400_msa_long_float8) Likewise.
18552 (i6400_fpu_fadd): Include frint type.
18553 (i6400_fpu_store): New define_insn_reservation.
18554 (i6400_fpu_load): Likewise.
18555 (i6400_fpu_move): Likewise.
18556 (i6400_fpu_fcmp): Likewise.
18557 (i6400_fpu_fmadd): Likewise.
18558 (i6400_int_mult): Include imul3nc type and update reservation.
18559 (i6400_int_div): Include idiv3 type and update reservation.
18560 (i6400_int_load): Update to check type not move_type.
18561 (i6400_int_store): Likewise.
18562 (i6400_int_prefetch): Set zero latency.
18564 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
18566 * gcc.c: Document new %@{...} sequence.
18567 (LINK_COMMAND_SPEC): Use it for the -L switches.
18568 (cpp_unique_options): Use it for the -I switches.
18569 (at_file_argbuf): New global variable.
18570 (in_at_file): Likewise.
18571 (alloc_args): Create at_file_argbuf.
18572 (clear_args): Truncate at_file_argbuf.
18573 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
18574 (open_at_file): New function.
18575 (close_at_file): Likewise.
18576 (create_at_file): Delete.
18577 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
18580 (validate_switches_from_spec): Deal with %@{...} sequence.
18581 (validate_switches): Likewise.
18582 (driver::finalize): Call clear_args.
18584 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
18586 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
18588 2018-06-11 Martin Sebor <msebor@redhat.com>
18590 * doc/invoke.texi (-Wall): List -Wc++17-compat.
18591 (Wno-class-memaccess): Add @opindex.
18592 (Wno-templates, Wno-multiple-inheritance): Same.
18593 (Wno-virtual-inheritance, Wno-namespaces): Same.
18594 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
18595 (Wno-format-overflow, Wno-format-truncation): Same.
18596 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
18597 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
18598 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
18599 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
18600 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
18601 (Wno-misspelled-isr): Same.
18603 2018-06-11 Martin Sebor <msebor@redhat.com>
18605 * PR tree-optimization/86083
18606 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
18608 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
18610 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
18612 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
18615 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
18616 on the correct operand.
18617 (*movdi_internal64): Ditto.
18619 2018-06-11 Martin Liska <mliska@suse.cz>
18621 PR tree-optimization/86089
18622 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
18624 2018-06-11 Julia Koval <julia.koval@intel.com>
18626 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
18627 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
18628 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
18630 2018-06-11 Olivier Hainque <hainque@adacore.com>
18632 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
18633 for Ada with strict dwarf2.
18635 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
18638 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
18641 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
18643 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
18645 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
18647 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
18650 2018-06-08 Martin Liska <mliska@suse.cz>
18652 * tree-cfg.h (debug_function): Fix argument type to match
18655 2018-06-08 Martin Liska <mliska@suse.cz>
18657 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
18658 Remove usage of MPX-related (and removed) fields.
18659 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
18661 2018-06-08 David Malcolm <dmalcolm@redhat.com>
18663 * cfg.c (debug): Use TDF_NONE rather than 0.
18664 * cfghooks.c (debug): Likewise.
18665 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
18666 (struct dump_option_value_info): Convert to...
18667 (struct kv_pair): ...this template type.
18668 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
18670 (optinfo_verbosity_options): Likewise.
18671 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
18673 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
18674 than int for "optgroup_flags" param.
18675 (dump_generic_expr_loc): Use dump_flags_t rather than int for
18677 (dump_dec): Likewise.
18678 (dump_finish): Use TDF_NONE rather than 0.
18679 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
18680 rather than int for "optgroup_flags" param. Use TDF_NONE rather
18681 than 0. Update for change to option_ptr.
18682 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
18683 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
18684 0. Update for changes to optinfo_verbosity_options and
18686 (opt_info_switch_p): Convert optgroup_flags from int to
18688 (dump_basic_block): Use dump_flags_t rather than int
18689 for "dump_kind" param.
18690 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
18691 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
18692 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
18693 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
18694 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
18695 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
18696 TDF_NONE): Convert from macros to...
18697 (enum dump_flag): ...this new enum.
18698 (dump_flags_t): Update to use enum.
18699 (operator|, operator&, operator~, operator|=, operator&=):
18700 Implement for dump_flags_t.
18701 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
18702 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
18703 Convert from macros to...
18704 (enum optgroup_flag): ...this new enum.
18705 (optgroup_flags_t): New typedef.
18706 (operator|, operator|=): Implement for optgroup_flags_t.
18707 (struct dump_file_info): Convert field "alt_flags" to
18708 dump_flags_t. Convert field "optgroup_flags" to
18710 (dump_basic_block): Use dump_flags_t rather than int for param.
18711 (dump_generic_expr_loc): Likewise.
18712 (dump_dec): Likewise.
18713 (dump_register): Convert param "optgroup_flags" to
18715 (opt_info_enable_passes): Likewise.
18716 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
18718 * gimple-pretty-print.c (debug): Likewise.
18719 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
18720 (merged_store_group::apply_stores): Likewise.
18721 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
18722 * gimple.c (verify_gimple_pp): Likewise.
18723 * graphite-poly.c (print_pbb_body): Likewise.
18724 * passes.c (pass_manager::register_one_dump_file): Convert
18725 local "optgroup_flags" to optgroup_flags_t.
18726 * print-tree.c (print_node): Use TDF_NONE rather than 0.
18728 (debug_body): Likewise.
18729 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
18730 to optgroup_flags_t.
18731 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
18733 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
18734 (convert_mult_to_fma): Likewise.
18735 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
18736 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
18737 * tree-vect-data-refs.c (dump_lower_bound): Convert param
18738 "dump_kind" to dump_flags_t.
18740 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
18742 * config/rs6000/rs6000.c (min, max): Delete.
18744 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
18746 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
18747 -mabi=spe and -mabi=no-spe.
18749 2018-06-08 Martin Liska <mliska@suse.cz>
18751 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
18752 where we expect an existing summary.
18754 2018-06-08 Martin Liska <mliska@suse.cz>
18756 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
18757 * ipa-inline.h (estimate_edge_growth): Likewise.
18759 2018-06-08 Martin Liska <mliska@suse.cz>
18761 * cgraph.c (function_version_hasher::hash): Use
18762 cgraph_node::get_uid ().
18763 (function_version_hasher::equal):
18764 * cgraph.h (cgraph_node::get_uid): New method.
18765 * ipa-inline.c (update_caller_keys): Use
18766 cgraph_node::get_uid ().
18767 (update_callee_keys): Likewise.
18768 * ipa-utils.c (searchc): Likewise.
18769 (ipa_reduced_postorder): Likewise.
18770 * lto-cgraph.c (input_node): Likewise.
18771 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
18772 * symbol-summary.h (symtab_insertion): Likewise.
18773 (symtab_removal): Likewise.
18774 (symtab_duplication): Likewise.
18775 * tree-pretty-print.c (dump_function_header): Likewise.
18776 * tree-sra.c (convert_callers_for_node): Likewise.
18778 2018-06-08 Martin Liska <mliska@suse.cz>
18780 * cgraph.c (symbol_table::create_edge): Always assign a new
18782 (symbol_table::free_edge): Do not recycle numbers.
18783 * cgraph.h (cgraph_edge::get): New method.
18784 * symbol-summary.h (symtab_removal): Use it.
18785 (symtab_duplication): Likewise.
18786 (call_summary::hashable_uid): Remove.
18788 2018-06-08 Martin Liska <mliska@suse.cz>
18790 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
18791 (initialize_growth_caches): Remove.
18792 (free_growth_caches): Likewise.
18793 (do_estimate_edge_time): Use edge_growth_cache.
18794 (do_estimate_edge_size): Likewise.
18795 (do_estimate_edge_hints): Likewise.
18796 * ipa-inline.c (reset_edge_caches): Likewise.
18797 (recursive_inlining): Likewise.
18798 (inline_small_functions): Likewise.
18799 * ipa-inline.h (initialize_growth_caches): Remove.
18800 (estimate_edge_size): Likewise.
18801 (estimate_edge_time): Likewise.
18802 (estimate_edge_hints): Likewise.
18803 (reset_edge_growth_cache): Likewise.
18804 * symbol-summary.h (call_summary::remove): New method.
18806 2018-06-08 Martin Liska <mliska@suse.cz>
18808 * ipa-cp.c (class edge_clone_summary): New summary.
18809 (grow_edge_clone_vectors): Remove.
18810 (ipcp_edge_duplication_hook): Remove.
18811 (class edge_clone_summary_t): New call_summary class.
18812 (ipcp_edge_removal_hook): Remove.
18813 (edge_clone_summary_t::duplicate): New function.
18814 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
18815 (create_specialized_node): Likewise.
18816 (ipcp_driver): Initialize edge_clone_summaries and do not
18819 2018-06-08 Martin Liska <mliska@suse.cz>
18821 * symbol-summary.h (get): New function.
18822 (call_summary::m_initialize_when_cloning): New class member.
18824 2018-06-08 Martin Liska <mliska@suse.cz>
18826 * cgraph.c (cgraph_node::remove): Do not recycle uid.
18827 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
18828 (symbol_table::allocate_cgraph_symbol): Do not set uid.
18829 * passes.c (uid_hash_t): Record removed_nodes by their uids.
18830 (remove_cgraph_node_from_order): Use the removed_nodes set.
18831 (do_per_function_toporder): Likwise.
18832 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
18833 instead of summary_uid.
18834 (symtab_removal): Likewise.
18835 (symtab_duplication): Likewise.
18837 2018-06-08 Martin Liska <mliska@suse.cz>
18839 * ipa-cp.c (ipcp_store_bits_results): Use
18840 ipcp_transformation_sum.
18841 (ipcp_store_vr_results): Likewise.
18842 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
18844 (ipcp_transformation_initialize): ... this.
18845 (ipa_set_node_agg_value_chain):
18846 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
18847 (write_ipcp_transformation_info): Likewise.
18848 (read_ipcp_transformation_info): Likewise.
18849 (ipcp_update_bits): Likewise.
18850 (ipcp_update_vr): Likewise.
18851 (ipcp_transform_function): Likewise.
18852 * ipa-prop.h: Rename ipcp_transformation_summary to
18853 ipcp_transformation.
18854 (class ipcp_transformation_t): New function summary.
18855 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
18856 (ipa_get_agg_replacements_for_node): Likewise.
18858 2018-06-08 Martin Liska <mliska@suse.cz>
18860 * ipa-pure-const.c (struct funct_state_d): Do it class instead
18862 (class funct_state_summary_t): New function_summary class.
18863 (has_function_state): Remove.
18864 (get_function_state): Likewise.
18865 (set_function_state): Likewise.
18866 (add_new_function): Likewise.
18867 (funct_state_summary_t::insert): New function.
18868 (duplicate_node_data): Remove.
18869 (remove_node_data): Remove.
18870 (funct_state_summary_t::duplicate): New function.
18871 (register_hooks): Create new funct_state_summaries.
18872 (pure_const_generate_summary): Use it.
18873 (pure_const_write_summary): Likewise.
18874 (pure_const_read_summary): Likewise.
18875 (propagate_pure_const): Likewise.
18876 (propagate_nothrow): Likewise.
18877 (dump_malloc_lattice): Likewise.
18878 (propagate_malloc): Likewise.
18879 (execute): Do not register hooks, just remove summary
18881 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
18884 2018-06-08 Martin Liska <mliska@suse.cz>
18886 * ipa-reference.c (remove_node_data): Remove.
18887 (duplicate_node_data): Likewise.
18888 (class ipa_ref_var_info_summary_t): New class.
18889 (class ipa_ref_opt_summary_t): Likewise.
18890 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
18891 (get_reference_optimization_summary): Use
18892 ipa_ref_opt_sum_summaries.
18893 (set_reference_vars_info): Remove.
18894 (set_reference_optimization_summary): Likewise.
18895 (ipa_init): Create summaries.
18896 (init_function_info): Use function summary.
18897 (ipa_ref_opt_summary_t::duplicate): New function.
18898 (ipa_ref_opt_summary_t::remove): New function.
18899 (get_read_write_all_from_node): Fix GNU coding style.
18900 (propagate): Use function summary.
18901 (write_node_summary_p): Fix GNU coding style.
18902 (stream_out_bitmap): Likewise.
18903 (ipa_reference_read_optimization_summary): Use function summary.
18904 (ipa_reference_c_finalize): Do not release hooks.
18906 2018-06-08 Martin Liska <mliska@suse.cz>
18908 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
18909 (analyze_function_body): Extract multiple calls of get_create.
18910 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18911 * ipa-inline.c (recursive_inlining): Use ::get method.
18912 * ipa-inline.h (estimate_edge_growth): Likewise.
18914 2018-06-08 Martin Liska <mliska@suse.cz>
18916 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
18918 (hsa_function_summary::hsa_function_summary): Use the new enum
18920 (hsa_gpu_implementation_p): Use hsa_summaries::get.
18921 * hsa-gen.c (hsa_get_host_function): Likewise.
18922 (get_brig_function_name): Likewise.
18923 * ipa-hsa.c (process_hsa_functions): Likewise.
18924 (ipa_hsa_write_summary): Likewise.
18925 * symbol-summary.h (symtab_duplication): Use ::get function/
18926 (get): New function.
18928 2018-06-08 Martin Liska <mliska@suse.cz>
18930 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
18932 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
18933 (hsa_register_kernel): Likewise.
18934 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
18935 * hsa-gen.c (hsa_get_host_function): Likewise.
18936 (get_brig_function_name): Likewise.
18937 (generate_hsa): Likewise.
18938 (pass_gen_hsail::execute): Likewise.
18939 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
18940 (devirtualization_time_bonus): Likewise.
18941 (ipcp_propagate_stage): Likewise.
18942 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18943 (edge_set_predicate): Likewise.
18944 (evaluate_conditions_for_known_args): Likewise.
18945 (evaluate_properties_for_edge): Likewise.
18946 (ipa_fn_summary::reset): Likewise.
18947 (ipa_fn_summary_t::duplicate): Likewise.
18948 (dump_ipa_call_summary): Likewise.
18949 (ipa_dump_fn_summary): Likewise.
18950 (analyze_function_body): Likewise.
18951 (compute_fn_summary): Likewise.
18952 (estimate_edge_devirt_benefit): Likewise.
18953 (estimate_edge_size_and_time): Likewise.
18954 (estimate_calls_size_and_time): Likewise.
18955 (estimate_node_size_and_time): Likewise.
18956 (inline_update_callee_summaries): Likewise.
18957 (remap_edge_change_prob): Likewise.
18958 (remap_edge_summaries): Likewise.
18959 (ipa_merge_fn_summary_after_inlining): Likewise.
18960 (ipa_update_overall_fn_summary): Likewise.
18961 (read_ipa_call_summary): Likewise.
18962 (inline_read_section): Likewise.
18963 (write_ipa_call_summary): Likewise.
18964 (ipa_fn_summary_write): Likewise.
18965 (ipa_free_fn_summary): Likewise.
18966 * ipa-hsa.c (process_hsa_functions): Likewise.
18967 (ipa_hsa_write_summary): Likewise.
18968 (ipa_hsa_read_section): Likewise.
18969 * ipa-icf.c (sem_function::merge): Likewise.
18970 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18971 (do_estimate_edge_time): Likewise.
18972 (estimate_size_after_inlining): Likewise.
18973 (estimate_growth): Likewise.
18974 (growth_likely_positive): Likewise.
18975 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18976 (inline_call): Likewise.
18977 * ipa-inline.c (caller_growth_limits): Likewise.
18978 (can_inline_edge_p): Likewise.
18979 (can_inline_edge_by_limits_p): Likewise.
18980 (compute_uninlined_call_time): Likewise.
18981 (compute_inlined_call_time): Likewise.
18982 (want_inline_small_function_p): Likewise.
18983 (edge_badness): Likewise.
18984 (update_caller_keys): Likewise.
18985 (update_callee_keys): Likewise.
18986 (recursive_inlining): Likewise.
18987 (inline_small_functions): Likewise.
18988 (inline_to_all_callers_1): Likewise.
18989 (dump_overall_stats): Likewise.
18990 (early_inline_small_functions): Likewise.
18991 (early_inliner): Likewise.
18992 * ipa-inline.h (estimate_edge_growth): Likewise.
18993 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18994 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18995 * ipa-prop.h (IPA_NODE_REF): Likewise.
18996 (IPA_EDGE_REF): Likewise.
18997 * ipa-pure-const.c (malloc_candidate_p): Likewise.
18998 (propagate_malloc): Likewise.
18999 * ipa-split.c (execute_split_functions): Likewise.
19000 * symbol-summary.h: Rename get to get_create.
19002 (get_create): Likewise.
19003 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
19005 2018-06-08 Martin Liska <mliska@suse.cz>
19007 * symbol-summary.h (release): Move definition out of class
19009 (symtab_removal): Likewise.
19010 (symtab_duplication): Likewise.
19012 2018-06-08 Martin Liska <mliska@suse.cz>
19014 * symbol-summary.h (function_summary): Move constructor
19015 implementation out of class declaration.
19016 (release): Likewise.
19017 (symtab_insertion): Likewise.
19018 (symtab_removal): Likewise.
19019 (symtab_duplication): Likewise.
19022 2018-06-08 Martin Liska <mliska@suse.cz>
19024 * Makefile.in: Remove support for MPX (macros, related functions,
19025 fields in cgraph_node, ...).
19026 * builtin-types.def (BT_BND): Likewise.
19027 (BT_FN_BND_CONST_PTR): Likewise.
19028 (BT_FN_CONST_PTR_BND): Likewise.
19029 (BT_FN_VOID_PTR_BND): Likewise.
19030 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
19031 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
19032 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
19033 (expand_builtin_mempcpy_with_bounds): Likewise.
19034 (expand_builtin_memset_with_bounds): Likewise.
19035 (expand_builtin_memset_args): Likewise.
19036 (std_expand_builtin_va_start): Likewise.
19037 (expand_builtin): Likewise.
19038 (expand_builtin_with_bounds): Likewise.
19039 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
19040 (DEF_LIB_BUILTIN_CHKP): Likewise.
19041 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
19042 (DEF_CHKP_BUILTIN): Likewise.
19043 (BUILT_IN_MEMCPY): Likewise.
19044 (BUILT_IN_MEMMOVE): Likewise.
19045 (BUILT_IN_MEMPCPY): Likewise.
19046 (BUILT_IN_MEMSET): Likewise.
19047 (BUILT_IN_STPCPY): Likewise.
19048 (BUILT_IN_STRCAT): Likewise.
19049 (BUILT_IN_STRCHR): Likewise.
19050 (BUILT_IN_STRCPY): Likewise.
19051 (BUILT_IN_STRLEN): Likewise.
19052 (BUILT_IN_MEMCPY_CHK): Likewise.
19053 (BUILT_IN_MEMMOVE_CHK): Likewise.
19054 (BUILT_IN_MEMPCPY_CHK): Likewise.
19055 (BUILT_IN_MEMSET_CHK): Likewise.
19056 (BUILT_IN_STPCPY_CHK): Likewise.
19057 (BUILT_IN_STRCAT_CHK): Likewise.
19058 (BUILT_IN_STRCPY_CHK): Likewise.
19059 * calls.c (store_bounds): Likewise.
19060 (emit_call_1): Likewise.
19061 (special_function_p): Likewise.
19062 (maybe_warn_nonstring_arg): Likewise.
19063 (initialize_argument_information): Likewise.
19064 (finalize_must_preallocate): Likewise.
19065 (compute_argument_addresses): Likewise.
19066 (expand_call): Likewise.
19067 * cfgexpand.c (expand_call_stmt): Likewise.
19068 (expand_return): Likewise.
19069 (expand_gimple_stmt_1): Likewise.
19070 (pass_expand::execute): Likewise.
19071 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
19072 (cgraph_node::remove): Likewise.
19073 (cgraph_node::dump): Likewise.
19074 (cgraph_node::verify_node): Likewise.
19075 * cgraph.h (chkp_function_instrumented_p): Likewise.
19076 (symtab_node::get_alias_target): Likewise.
19077 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
19078 (cgraph_local_p): Likewise.
19079 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
19080 (cgraph_edge::rebuild_references): Likewise.
19081 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
19082 (walk_polymorphic_call_targets): Likewise.
19083 (cgraph_node::expand_thunk): Likewise.
19084 (symbol_table::output_weakrefs): Likewise.
19085 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
19086 (ix86_handle_option): Likewise.
19087 * config/i386/constraints.md: Likewise.
19088 * config/i386/i386-builtin-types.def (BND): Likewise.
19092 * config/i386/i386-builtin.def (BDESC_END): Likewise.
19093 (BDESC_FIRST): Likewise.
19095 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
19096 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
19097 * config/i386/i386.c (enum reg_class): Likewise.
19098 (ix86_target_string): Likewise.
19099 (ix86_option_override_internal): Likewise.
19100 (ix86_conditional_register_usage): Likewise.
19101 (ix86_valid_target_attribute_inner_p): Likewise.
19102 (ix86_set_indirect_branch_type): Likewise.
19103 (ix86_set_current_function): Likewise.
19104 (ix86_function_arg_regno_p): Likewise.
19105 (init_cumulative_args): Likewise.
19106 (ix86_function_arg_advance): Likewise.
19107 (ix86_function_arg): Likewise.
19108 (ix86_pass_by_reference): Likewise.
19109 (ix86_function_value_regno_p): Likewise.
19110 (ix86_function_value_1): Likewise.
19111 (ix86_function_value_bounds): Likewise.
19112 (ix86_return_in_memory): Likewise.
19113 (ix86_setup_incoming_vararg_bounds): Likewise.
19114 (ix86_va_start): Likewise.
19115 (indirect_thunk_need_prefix): Likewise.
19116 (print_reg): Likewise.
19117 (ix86_print_operand): Likewise.
19118 (ix86_expand_call): Likewise.
19119 (ix86_output_function_return): Likewise.
19120 (reg_encoded_number): Likewise.
19121 (BDESC_VERIFYS): Likewise.
19122 (ix86_init_mpx_builtins): Likewise.
19123 (ix86_init_builtins): Likewise.
19124 (ix86_emit_cmove): Likewise.
19125 (ix86_emit_move_max): Likewise.
19126 (ix86_expand_builtin): Likewise.
19127 (ix86_builtin_mpx_function): Likewise.
19128 (ix86_get_arg_address_for_bt): Likewise.
19129 (ix86_load_bounds): Likewise.
19130 (ix86_store_bounds): Likewise.
19131 (ix86_load_returned_bounds): Likewise.
19132 (ix86_store_returned_bounds): Likewise.
19133 (ix86_class_likely_spilled_p): Likewise.
19134 (ix86_hard_regno_mode_ok): Likewise.
19135 (x86_order_regs_for_local_alloc): Likewise.
19136 (ix86_mitigate_rop): Likewise.
19137 (ix86_bnd_prefixed_insn_p): Likewise.
19138 (ix86_mpx_bound_mode): Likewise.
19139 (ix86_make_bounds_constant): Likewise.
19140 (ix86_initialize_bounds): Likewise.
19141 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
19142 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
19143 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
19144 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
19145 (TARGET_CHKP_BOUND_MODE): Likewise.
19146 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
19147 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
19148 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
19149 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
19150 * config/i386/i386.h (TARGET_MPX): Likewise.
19151 (TARGET_MPX_P): Likewise.
19152 (VALID_BND_REG_MODE): Likewise.
19153 (FIRST_BND_REG): Likewise.
19154 (LAST_BND_REG): Likewise.
19155 (enum reg_class): Likewise.
19156 (BND_REG_P): Likewise.
19157 (BND_REGNO_P): Likewise.
19158 (BNDmode): Likewise.
19159 (ADJUST_INSN_LENGTH): Likewise.
19160 * config/i386/i386.md: Likewise.
19161 * config/i386/i386.opt: Likewise.
19162 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
19163 (defined): Likewise.
19164 (LINK_MPX): Likewise.
19165 (MPX_SPEC): Likewise.
19166 (LIBMPX_SPEC): Likewise.
19167 (LIBMPXWRAPPERS_SPEC): Likewise.
19168 (CHKP_SPEC): Likewise.
19169 * config/i386/predicates.md: Likewise.
19170 * dbxout.c (dbxout_type): Likewise.
19171 * doc/extend.texi: Likewise.
19172 * doc/invoke.texi: Likewise.
19173 * doc/md.texi: Likewise.
19174 * doc/tm.texi: Likewise.
19175 * doc/tm.texi.in: Likewise.
19176 * dwarf2out.c (is_base_type): Likewise.
19177 (gen_formal_types_die): Likewise.
19178 (gen_subprogram_die): Likewise.
19179 (gen_type_die_with_usage): Likewise.
19180 (gen_decl_die): Likewise.
19181 (dwarf2out_late_global_decl): Likewise.
19182 * expr.c (expand_assignment): Likewise.
19183 (emit_storent_insn): Likewise.
19184 (store_expr_with_bounds): Likewise.
19185 (store_expr): Likewise.
19186 (expand_expr_real_1): Likewise.
19187 * expr.h (store_expr_with_bounds): Likewise.
19188 * function.c (use_register_for_decl): Likewise.
19189 (struct bounds_parm_data): Likewise.
19190 (assign_parms_augmented_arg_list): Likewise.
19191 (assign_parm_find_entry_rtl): Likewise.
19192 (assign_parm_is_stack_parm): Likewise.
19193 (assign_parm_load_bounds): Likewise.
19194 (assign_bounds): Likewise.
19195 (assign_parms): Likewise.
19196 (expand_function_start): Likewise.
19197 * gcc.c (CHKP_SPEC): Likewise.
19198 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
19199 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
19200 (wrestrict_dom_walker::check_call): Likewise.
19201 * gimple.c (gimple_build_call_from_tree): Likewise.
19202 * gimple.h (enum gf_mask): Likewise.
19203 (gimple_call_with_bounds_p): Likewise.
19204 (gimple_call_set_with_bounds): Likewise.
19205 * gimplify.c (gimplify_init_constructor): Likewise.
19206 * ipa-cp.c (initialize_node_lattices): Likewise.
19207 (propagate_constants_across_call): Likewise.
19208 (find_more_scalar_values_for_callers_subset): Likewise.
19209 * ipa-hsa.c (process_hsa_functions): Likewise.
19210 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
19211 * ipa-icf.c (sem_function::merge): Likewise.
19212 * ipa-inline.c (early_inliner): Likewise.
19213 * ipa-pure-const.c (warn_function_noreturn): Likewise.
19214 (warn_function_cold): Likewise.
19215 (propagate_pure_const): Likewise.
19216 * ipa-ref.h (enum GTY): Likewise.
19217 * ipa-split.c (find_retbnd): Likewise.
19218 (consider_split): Likewise.
19219 (split_function): Likewise.
19220 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
19221 * ipa.c (walk_polymorphic_call_targets): Likewise.
19222 (symbol_table::remove_unreachable_nodes): Likewise.
19223 (process_references): Likewise.
19224 (cgraph_build_static_cdtor_1): Likewise.
19225 * lto-cgraph.c (lto_output_node): Likewise.
19226 (output_refs): Likewise.
19227 (compute_ltrans_boundary): Likewise.
19228 (input_overwrite_node): Likewise.
19229 (input_node): Likewise.
19230 (input_cgraph_1): Likewise.
19231 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
19232 * passes.c (pass_manager::execute_early_local_passes): Likewise.
19233 (class pass_chkp_instrumentation_passes): Likewise.
19234 (make_pass_chkp_instrumentation_passes): Likewise.
19235 * passes.def: Likewise.
19236 * rtl.h (struct GTY): Likewise.
19237 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
19238 * stor-layout.c (layout_type): Likewise.
19239 * symtab.c: Likewise.
19240 * target.def: Likewise.
19241 * targhooks.c (default_chkp_bound_type): Likewise.
19242 (default_chkp_bound_mode): Likewise.
19243 (default_builtin_chkp_function): Likewise.
19244 (default_chkp_function_value_bounds): Likewise.
19245 (default_chkp_make_bounds_constant): Likewise.
19246 (default_chkp_initialize_bounds): Likewise.
19247 * targhooks.h (default_chkp_bound_type): Likewise.
19248 (default_chkp_bound_mode): Likewise.
19249 (default_builtin_chkp_function): Likewise.
19250 (default_chkp_function_value_bounds): Likewise.
19251 (default_chkp_make_bounds_constant): Likewise.
19252 (default_chkp_initialize_bounds): Likewise.
19253 * toplev.c (compile_file): Likewise.
19254 (process_options): Likewise.
19255 * tree-core.h (DEF_BUILTIN): Likewise.
19256 (DEF_BUILTIN_CHKP): Likewise.
19257 * tree-inline.c (declare_return_variable): Likewise.
19258 (remap_gimple_stmt): Likewise.
19259 (copy_bb): Likewise.
19260 (initialize_inlined_parameters): Likewise.
19261 (expand_call_inline): Likewise.
19262 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
19263 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
19264 (make_pass_ipa_chkp_produce_thunks): Likewise.
19265 (make_pass_chkp): Likewise.
19266 (make_pass_chkp_opt): Likewise.
19267 (make_pass_chkp_instrumentation_passes): Likewise.
19268 * tree-pretty-print.c (dump_generic_node): Likewise.
19269 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
19270 * tree-ssa-dce.c (propagate_necessity): Likewise.
19271 (eliminate_unnecessary_stmts): Likewise.
19272 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
19273 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
19274 * tree-ssa-sccvn.h: Likewise.
19275 * tree-ssa-strlen.c (get_string_length): Likewise.
19276 (valid_builtin_call): Likewise.
19277 (adjust_last_stmt): Likewise.
19278 (handle_builtin_strchr): Likewise.
19279 (handle_builtin_strcpy): Likewise.
19280 (handle_builtin_stxncpy): Likewise.
19281 (handle_builtin_memcpy): Likewise.
19282 (handle_builtin_strcat): Likewise.
19283 (strlen_check_and_optimize_stmt): Likewise.
19284 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
19285 * tree-streamer-in.c: Likewise.
19286 * tree-streamer.c (record_common_node): Likewise.
19287 * tree.c (tree_code_size): Likewise.
19288 (wide_int_to_tree_1): Likewise.
19289 (type_contains_placeholder_1): Likewise.
19290 (build_common_tree_nodes): Likewise.
19291 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
19292 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
19293 (POINTER_BOUNDS_P): Likewise.
19294 (BOUNDED_TYPE_P): Likewise.
19295 (BOUNDED_P): Likewise.
19296 (CALL_WITH_BOUNDS_P): Likewise.
19297 (pointer_bounds_type_node): Likewise.
19298 * value-prof.c (gimple_ic): Likewise.
19299 * var-tracking.c (vt_add_function_parameters): Likewise.
19300 * varasm.c (make_decl_rtl): Likewise.
19301 (assemble_start_function): Likewise.
19302 (output_constant): Likewise.
19303 (maybe_assemble_visibility): Likewise.
19304 * varpool.c (ctor_for_folding): Likewise.
19305 * chkp-builtins.def: Remove.
19306 * ipa-chkp.c: Remove.
19307 * ipa-chkp.h: Remove.
19308 * rtl-chkp.c: Remove.
19309 * rtl-chkp.h: Remove.
19310 * tree-chkp-opt.c: Remove.
19311 * tree-chkp.c: Remove.
19312 * tree-chkp.h: Remove.
19314 2018-06-07 Carl Love <cel@us.ibm.com>
19316 * config/rs6000/vsx.md (vextract_fp_from_shorth,
19317 vextract_fp_from_shortl): Add BE support.
19319 2018-06-07 Paul Koning <ni1d@arrl.net>
19321 * compare-elim.c (try_merge_compare): Don't merge compare if
19322 address contains a side effect.
19323 (try_eliminate_compare): Likewise.
19325 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
19327 * config.gcc: Support "tremont".
19328 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
19329 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19331 * config/i386/i386.c (m_TREMONT): Define.
19332 (processor_target_table): Add "tremont".
19333 (PTA_TREMONT): Define.
19334 (ix86_lea_outperforms): Add TARGET_TREMONT.
19335 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
19336 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
19337 and M_INTEL_GOLDMONT_PLUS.
19338 (fold_builtin_cpu): Add "tremont".
19339 (ix86_add_stmt_cost): Add TARGET_TREMONT.
19340 (ix86_option_override_internal): Add "tremont".
19341 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
19342 (processor_type): Add PROCESSOR_TREMONT.
19343 * config/i386/x86-tune.def: Add m_TREMONT.
19344 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
19346 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19348 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
19349 symbol defined for msp430i* devices to be lower case.
19351 2018-06-07 Richard Biener <rguenther@suse.de>
19353 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
19354 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
19355 Properly wrap signed arithmetic if overflow wraps.
19357 2018-06-07 Jakub Jelinek <jakub@redhat.com>
19359 PR tree-optimization/69615
19360 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
19361 of a cast from a same precision integral SSA_NAME in a bb dominated
19362 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
19363 cast to utype if rhs2 has already a compatible type.
19365 2018-06-07 Richard Biener <rguenther@suse.de>
19367 PR tree-optimization/85935
19368 * graphite-scop-detection.c (find_params_in_bb): Analyze
19369 condition operands with respect to the correct loop. Assert
19370 the analysis doesn't fail.
19372 2018-06-04 Carl Love <cel@us.ibm.com>
19374 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
19375 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
19376 as it is slightly cheaper.
19377 (first_match_or_eos_index_<mode>):
19378 Calculate index using natural element order.
19379 (first_match_index_<mode>):
19380 Calculate index using natural element order.
19381 (first_match_or_eos_index_<mode>):
19382 Calculate index using natural order.
19383 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
19384 for BE and LE modes.
19385 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
19386 P9V_BUILTIN_VCLZLSBB_V16QI.
19387 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
19390 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
19392 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
19393 indentation and line wrap for many prototypes. Add missing
19394 @smallexample directives around block of prototypes for vec_xl and
19397 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
19399 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
19400 track if we pass or return IEEE 128-bit floating point.
19401 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
19402 C++ mangling that is compatible with GCC 8.1.
19403 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
19404 (init_cumulative_args): Note if we pass or return IEEE 128-bit
19405 floating point types.
19406 (rs6000_function_arg_advance_1): Likewise.
19407 (rs6000_mangle_type): Optionally generate mangled names that match
19408 what GCC 8.1 generated for IEEE 128-bit floating point types.
19409 (rs6000_globalize_decl_name): If we have an external function that
19410 passes or returns IEEE 128-bit types, generate a weak reference
19411 from the mangled name used in GCC 8.1 to the current mangled
19413 (rs6000_init_builtins): Make __ibm128 use the long double type if
19414 long double is IBM extended double. Make __float128 use the long
19415 double type if long double is IEEE 128-bit.
19418 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
19419 macro for __ibm128 built-in functions.
19420 (PACK_IF): Add __ibm128 pack/unpack functions.
19421 (UNPACK_IF): Likewise.
19422 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
19423 enable long double built-in functions if long double is IEEE
19424 128-bit floating point.
19425 (rs6000_invalid_builtin): Update long double built-in function
19427 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
19428 functions, adjust the built-in function to use the long double
19429 built-in function if __ibm128 and long double are the same type.
19430 * doc/extend.texi (PowerPC builtins): Update documention for
19431 __builtin_{,un}pack_longdouble. Add documentation for
19432 __builtin_{,un}pack_ibm128.
19434 2018-06-06 Jim Wilson <jimw@sifive.com>
19436 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
19437 (struct machine_function): New field interrupt_mode.
19438 (riscv_handle_type_attribute): New function. Add forward declaration.
19439 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
19440 (riscv_expand_epilogue): Check interrupt_mode field.
19441 (riscv_set_current_function): Check interrupt attribute args and
19442 set interrupt_mode field.
19443 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
19444 (riscv_sret, riscv_uret): New.
19445 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
19446 new arguments to interrupt attribute.
19448 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
19451 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
19452 Don't handle -mcpu=power8 if -mpower9-vector is also used.
19454 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
19456 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
19457 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
19458 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19459 several redundant entries.
19461 2018-06-06 David Malcolm <dmalcolm@redhat.com>
19463 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
19464 type from "rtx" to "rtx_insn *".
19465 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
19466 for local "call_insn", removing cast.
19467 (ix86_expand_call): Likewise, introducing a "call_insn" local.
19469 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
19471 PR tree-optimization/86066
19472 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
19473 for BIT_INSERT_EXPR stores.
19475 2018-06-06 Richard Biener <rguenther@suse.de>
19477 PR tree-optimization/86062
19478 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19479 component refs ontop
19480 of to be offsetted base.
19482 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19484 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
19485 to be static and remove check on interrupt attribute name.
19487 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
19489 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19490 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
19492 2018-06-05 Steve Ellcey <sellcey@cavium.com>
19495 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
19497 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
19498 Remove second argument, change how error is called.
19499 (aarch64_layout_arg): Remove second argument from
19500 aarch64_err_no_fpadvsimd call.
19501 (aarch64_init_cumulative_args): Ditto.
19502 (aarch64_gimplify_va_arg_expr): Ditto.
19503 * config/aarch64/aarch64.md (mov<mode>): Ditto.
19505 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
19507 * config/i386/i386.md (simple_return_indirect_internal): New expander.
19508 (*simple_return_indirect_internal<mode>): Rename from
19509 simple_return_indirect_internal. Use W mode iterator.
19510 (rstorssp): New expander.
19511 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
19512 (clrssbsy): New expander.
19513 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
19515 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
19517 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
19519 (cmse_check_pointed_object): Likewise.
19521 2018-06-05 Martin Liska <mliska@suse.cz>
19523 PR gcov-profile/47618
19524 * doc/invoke.texi: Document how -fprofile-dir format
19527 2018-06-05 Richard Biener <rguenther@suse.de>
19529 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
19530 removal pretend DOM info isn't available so we do not update
19531 it and only remove edges, not dominated blocks. Actually free
19532 DOM info in case we removed something. Remove unreachable blocks.
19533 (mfb_keep_latches): Work with either DOM info or marked backedges.
19534 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
19535 first. Mark backedges if DOM info isn't available.
19536 (Re-)compute DOM info after cleanup_control_flow_pre.
19538 2018-06-05 Richard Biener <rguenther@suse.de>
19540 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
19541 (locus_discrim_hasher::hash): Adjust.
19542 (locus_discrim_hasher::equal): Likewise.
19543 (next_discriminator_for_locus): Work on line directly.
19544 (same_line_p): Pass in expanded locus1 as well.
19545 (assign_discriminators): Avoid redundant location expansions.
19547 2018-06-05 Richard Biener <rguenther@suse.de>
19549 PR tree-optimization/86046
19550 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
19551 if required after clearing TREE_ADDRESSABLE.
19553 2018-06-05 Richard Biener <rguenther@suse.de>
19555 PR tree-optimization/86047
19556 * tree-ssa-loop.c (for_each_index): Glob handling of all
19557 decls and constants and really handle all of them.
19559 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19562 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
19563 qualifier_void_pointer and qualifier_const_void_pointer.
19564 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
19565 (arm_init_builtins): Handle the above.
19566 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
19567 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
19568 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
19571 2018-06-05 Martin Liska <mliska@suse.cz>
19573 * auto-profile.c (read_autofdo_file): Do not use
19574 gcov_ctr_summary struct.
19575 (afdo_callsite_hot_enough_for_early_inline): Likewise.
19576 * coverage.c (struct counts_entry): Likewise.
19577 (read_counts_file): Read just single summary entry.
19578 (get_coverage_counts): Use gcov_summary struct.
19579 * coverage.h (get_coverage_counts): Likewise.
19580 * gcov-dump.c (dump_working_sets): Likewise.
19581 (tag_summary): Dump just single summary.
19582 * gcov-io.c (gcov_write_summary): Write just histogram
19584 (gcov_read_summary): Read just single summary.
19585 (compute_working_sets): Use gcov_summary struct.
19586 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
19587 of GCOV_COUNTERS_SUMMABLE.
19588 (GCOV_COUNTERS_SUMMABLE): Remove.
19589 (GCOV_FIRST_VALUE_COUNTER): Replace with
19590 GCOV_COUNTER_V_INTERVAL.
19591 (struct gcov_ctr_summary): Remove.
19592 (struct gcov_summary): Directly use fields of former
19594 (compute_working_sets): Use gcov_summary struct.
19595 * gcov.c (read_count_file): Do not use ctrs fields.
19596 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
19598 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
19600 * profile.c: Likewise.
19601 * profile.h: Likewise.
19603 2018-06-05 Martin Liska <mliska@suse.cz>
19605 PR gcov-profile/84846
19606 * gcov.c (output_lines): Print working directory only
19607 in intermediate format.
19609 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
19611 * config/s390/s390-builtin-types.def: Add void function type.
19612 * config/s390/s390-builtins.def: Use the function type for the
19615 2018-06-04 Jim Wilson <jimw@sifive.com>
19617 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
19619 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
19620 and maybe_eh_return. Change regno to unsigned int. Use new args to
19621 handle EH_RETURN_DATA_REGNO registers properly.
19622 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
19623 (riscv_expand_epilogue): Update comment. Change argument name and
19624 type. Update code to use new name and type. Pass new args to
19625 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
19627 * config/riscv/riscv.md (NORMAL_RETURN): New.
19628 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
19629 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
19630 (eh_return): Call gen_eh_return_internal and emit barrier.
19631 (eh_return_internal): Call riscv_expand_epilogue.
19633 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
19635 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
19636 bit_insertion field and declare can_be_merged_into method.
19637 (merged_store_group::can_be_merged_into): New method.
19638 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
19639 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
19640 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
19642 2018-06-04 Richard Biener <rguenther@suse.de>
19644 PR tree-optimization/85955
19645 * builtins.c (fold_builtin_sincos): Convert pointers to
19646 destination to appropriate type before dereferencing.
19648 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
19650 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
19652 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
19654 * expr.c (expand_expr_real_1): Force the operand into memory if
19655 its TYPE_MODE is BLKmode and if there is no integer mode for
19656 the number of bits being extracted.
19658 2018-06-04 Jakub Jelinek <jakub@redhat.com>
19662 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19663 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
19665 2018-06-04 Richard Biener <rguenther@suse.de>
19667 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
19668 (cleanup_tree_cfg_noloop): ... single caller. Do
19669 start_recording_case_labels later.
19671 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
19673 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
19674 to _IMMINTRIN_H_INCLUDED.
19675 * config/i386/pconfigintrin.h: Ditto.
19676 * config/i386/waitpkgintrin.h: Ditto.
19677 * config/i386/immintrin.h: Add includes for sgxintrin.h,
19678 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
19679 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
19680 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
19681 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
19682 waitpkgintrin.h and cldemoteintrin.h.
19684 2018-06-04 Richard Biener <rguenther@suse.de>
19686 PR tree-optimization/86038
19687 * tracer.c (find_best_successor): Check probability for
19688 being initialized, bail out if not.
19690 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
19693 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
19694 of bits to ignore when comparing architectures.
19696 2018-06-04 Jakub Jelinek <jakub@redhat.com>
19698 PR tree-optimization/69615
19699 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
19700 maximum or minimum of the type, try to merge it also as if
19701 range1 is + [-, x - 1] or + [x + 1, -].
19704 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
19706 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
19708 PR tree-optimization/86034
19709 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
19710 the unsigned bitfield type in a bit insertion sequence if it does not
19711 have a larger precision than the bitfield size.
19712 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
19714 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
19716 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
19718 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
19720 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
19721 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
19722 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
19723 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
19725 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
19727 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
19728 Disable -fdelete-null-pointer-checks for ELF toolchain.
19730 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
19731 Kito Cheng <kito.cheng@gmail.com>
19733 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
19734 (nds32le-*-*, nds32be-*-*): Integrate checking process.
19735 (nds32*-*-*): Add glibc and uclibc conditions.
19736 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
19737 (TARGET_EXCEPT_UNWIND_INFO): Define.
19738 * config/nds32/elf.h: New file.
19739 * config/nds32/linux.h: New file.
19740 * config/nds32/nds32-elf.opt: New file.
19741 * config/nds32/nds32-linux.opt: New file.
19742 * config/nds32/nds32-fp-as-gp.c
19743 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
19744 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
19746 (nds32_asm_file_end): Ditto.
19747 (nds32_print_operand): Ditto.
19748 (nds32_insert_attributes): Ditto.
19749 (nds32_init_libfuncs): New function.
19750 (TARGET_HAVE_TLS): Define.
19751 (TARGET_INIT_LIBFUNCS): Define.
19752 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
19754 (TARGET_ELF): Apply different mcmodel setting.
19755 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
19756 been migrated into elf.h and linux.h files.
19757 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
19758 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
19759 (mcmodel): The content has been migrated into nds32-elf.opt and
19760 nds32-linux.opt files.
19761 * config/nds32/t-elf: New file.
19762 * config/nds32/t-linux: New file.
19764 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
19765 Shiva Chen <shiva0217@gmail.com>
19767 * config/nds32/constants.md (unspec_volatile_element): Add
19768 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
19769 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
19771 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
19772 (make_pass_nds32_fp_as_gp): Declare.
19773 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
19775 (nds32_asm_function_end_prologue): Remove unused asm output.
19776 (nds32_asm_function_begin_epilogue): Remove unused asm output.
19777 (nds32_asm_file_start): Output necessary fp_as_gp information.
19778 (nds32_option_override): Adjust register usage.
19779 (nds32_expand_prologue): Consider fp_as_gp situation.
19780 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
19781 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
19784 (simple_return): Ditto.
19785 (omit_fp_begin): Output special directive for fp_as_gp.
19786 (omit_fp_end): Output special directive for fp_as_gp.
19787 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
19788 mforbid-fp-as-gp): New options.
19790 2018-06-01 Mark Wielaard <mark@klomp.org>
19792 * dwarf2out.c (dwarf2out_finish): Remove generation of
19793 DW_AT_loclists_base.
19795 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
19797 * gimple-ssa-store-merging.c: Include gimple-fold.h.
19798 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
19799 (struct merged_store_group): Add bit_insertion field.
19800 (dump_char_array): Use standard hexadecimal format.
19801 (merged_store_group::merged_store_group): Set bit_insertion to false.
19802 (merged_store_group::apply_stores): Use optimal buffer size. Deal
19803 with BIT_INSERT_EXPR stores. Move up code updating the mask and
19804 also print the mask in the dump file.
19805 (pass_store_merging::gate): Minor tweak.
19806 (imm_store_chain_info::coalesce_immediate): Fix wrong association
19807 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
19808 stores with INTEGER_CST stores.
19809 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
19810 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
19811 and use it throughout. Generate bit insertion sequences if need be.
19812 (pass_store_merging::process_store): Remove redundant condition.
19813 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
19815 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
19817 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
19818 the 128-bit floating point types. Fix function comment.
19820 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19822 * config/aarch64/aarch64-simd.md
19823 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
19825 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
19828 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
19830 PR tree-optimization/85989
19831 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
19833 (backprop::intersect_uses): Check it when deciding whether this
19834 is a backedge reference.
19835 (backprop::process_block): Add each phi to m_visited_phis
19836 after visiting it, then clear it at the end.
19838 2018-06-01 Richard Biener <rguenther@suse.de>
19840 * tree-vectorizer.h (vect_dr_stmt): New function.
19841 (vect_get_load_cost): Adjust.
19842 (vect_get_store_cost): Likewise.
19843 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
19844 Use vect_dr_stmt instead of DR_SMTT.
19845 (vect_record_base_alignments): Likewise.
19846 (vect_calculate_target_alignment): Likewise.
19847 (vect_compute_data_ref_alignment): Likewise and make static.
19848 (vect_update_misalignment_for_peel): Likewise.
19849 (vect_verify_datarefs_alignment): Likewise.
19850 (vector_alignment_reachable_p): Likewise.
19851 (vect_get_data_access_cost): Likewise. Pass down
19852 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
19853 (vect_get_peeling_costs_all_drs): Likewise.
19854 (vect_peeling_hash_get_lowest_cost): Likewise.
19855 (vect_enhance_data_refs_alignment): Likewise.
19856 (vect_find_same_alignment_drs): Likewise.
19857 (vect_analyze_data_refs_alignment): Likewise.
19858 (vect_analyze_group_access_1): Likewise.
19859 (vect_analyze_group_access): Likewise.
19860 (vect_analyze_data_ref_access): Likewise.
19861 (vect_analyze_data_ref_accesses): Likewise.
19862 (vect_vfa_segment_size): Likewise.
19863 (vect_small_gap_p): Likewise.
19864 (vectorizable_with_step_bound_p): Likewise.
19865 (vect_prune_runtime_alias_test_list): Likewise.
19866 (vect_analyze_data_refs): Likewise.
19867 (vect_supportable_dr_alignment): Likewise.
19868 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
19869 (vect_gen_prolog_loop_niters): Likewise.
19870 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
19871 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
19873 (vect_recog_mask_conversion_pattern): Likewise.
19874 (vect_try_gather_scatter_pattern): Likewise.
19875 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
19876 to vect_get_store_cost.
19877 (vect_get_store_cost): Get stmt_info instead of DR.
19878 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
19879 (vect_get_load_cost): Get stmt_info instead of DR.
19881 2018-06-01 Richard Biener <rguenther@suse.de>
19883 PR middle-end/86017
19884 * gimple-fold.c (var_decl_component_p): Also allow offsetted
19885 vars wrapped in MEM_REFs.
19887 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
19889 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19890 Fix subreg tests so that we only return a choice between
19891 GENERAL_REGS and FP_REGS if the original classes included both.
19893 2018-06-01 Richard Biener <rguenther@suse.de>
19896 * tree-ssa-structalias.c (get_function_part_constraint):
19897 Handle NULL fi->decl.
19898 (find_func_aliases_for_call): Properly handle indirect
19899 fi from direct call.
19900 (find_func_clobbers): Likewise.
19901 (ipa_pta_execute): Likewise.
19902 (create_variable_info_for): For functions that are ifunc_resolver
19903 resolve to a varinfo that contains the result of the resolver call.
19904 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
19907 2018-05-31 Michael Collison <michael.collison@arm.com>
19909 * config/aarch64/aarch64.md:
19910 (*fix_to_zero_extenddfdi2): New pattern.
19911 * gcc.target/aarch64/fix_extend1.c: New testcase.
19913 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
19915 PR middle-end/78809
19916 PR middle-end/83026
19917 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
19918 and BUILT_IN_STRNCMP_EQ.
19919 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
19920 BUILT_IN_STRNCMP_EQ.
19921 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
19922 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19923 (gimple_fold_builtin): Likewise.
19924 * tree-ssa-strlen.c (compute_string_length): New function.
19925 (determine_min_obsize): New function.
19926 (handle_builtin_string_cmp): New function to handle calls to
19927 string compare functions.
19928 (strlen_optimize_stmt): Add handling to builtin string compare
19930 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
19931 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19932 * tree.c (build_common_builtin_nodes): Add new defines of
19933 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
19935 2018-05-31 Jakub Jelinek <jakub@redhat.com>
19938 * bb-reorder.c (pass_partition_blocks::gate): Return false for
19939 functions with naked attribute.
19941 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
19943 * config/i386/sse.md (avx_vec_concat<mode>):
19944 Substitute concat_tg_mode mode attribute with xtg_mode.
19945 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
19946 (concat_tg_mode): Remove mode attribute.
19948 2018-05-31 Martin Sebor <msebor@redhat.com>
19951 * calls.c (alloc_max_size): Correct a logic error/typo.
19952 Treat excessive arguments as infinite. Warn for invalid arguments.
19953 * doc/invoke.texi (-Walloc-size-larger-than): Update.
19955 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
19958 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
19959 and movx for Haswell.
19961 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
19962 Cesar Philippidis <cesar@codesourcery.com>
19964 PR middle-end/85879
19965 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19966 when emitting error on private/firstprivate reductions.
19967 * omp-low.c (lower_omp_target): Avoid reference-type processing
19968 on pointers for firstprivate clause.
19970 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
19972 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
19975 * config/aarch64/aarch64-simd.md
19976 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
19977 (aarch64_ld1_x3_<mode>): Likewise
19978 (aarch64_st1x2<VALLDIF:mode>): Likewise
19979 (aarch64_st1_x2_<mode>): Likewise
19980 (aarch64_st1x3<VALLDIF:mode>): Likewise
19981 (aarch64_st1_x3_<mode>): Likewise
19982 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
19983 (vld1_s8_x3): Likewise.
19984 (vld1_u16_x3): Likewise.
19985 (vld1_s16_x3): Likewise.
19986 (vld1_u32_x3): Likewise.
19987 (vld1_s32_x3): Likewise.
19988 (vld1_u64_x3): Likewise.
19989 (vld1_s64_x3): Likewise.
19990 (vld1_f16_x3): Likewise.
19991 (vld1_f32_x3): Likewise.
19992 (vld1_f64_x3): Likewise.
19993 (vld1_p8_x3): Likewise.
19994 (vld1_p16_x3): Likewise.
19995 (vld1_p64_x3): Likewise.
19996 (vld1q_u8_x3): Likewise.
19997 (vld1q_s8_x3): Likewise.
19998 (vld1q_u16_x3): Likewise.
19999 (vld1q_s16_x3): Likewise.
20000 (vld1q_u32_x3): Likewise.
20001 (vld1q_s32_x3): Likewise.
20002 (vld1q_u64_x3): Likewise.
20003 (vld1q_s64_x3): Likewise.
20004 (vld1q_f16_x3): Likewise.
20005 (vld1q_f32_x3): Likewise.
20006 (vld1q_f64_x3): Likewise.
20007 (vld1q_p8_x3): Likewise.
20008 (vld1q_p16_x3): Likewise.
20009 (vld1q_p64_x3): Likewise.
20010 (vst1_s64_x2): Likewise.
20011 (vst1_u64_x2): Likewise.
20012 (vst1_f64_x2): Likewise.
20013 (vst1_s8_x2): Likewise.
20014 (vst1_p8_x2): Likewise.
20015 (vst1_s16_x2): Likewise.
20016 (vst1_p16_x2): Likewise.
20017 (vst1_s32_x2): Likewise.
20018 (vst1_u8_x2): Likewise.
20019 (vst1_u16_x2): Likewise.
20020 (vst1_u32_x2): Likewise.
20021 (vst1_f16_x2): Likewise.
20022 (vst1_f32_x2): Likewise.
20023 (vst1_p64_x2): Likewise.
20024 (vst1q_s8_x2): Likewise.
20025 (vst1q_p8_x2): Likewise.
20026 (vst1q_s16_x2): Likewise.
20027 (vst1q_p16_x2): Likewise.
20028 (vst1q_s32_x2): Likewise.
20029 (vst1q_s64_x2): Likewise.
20030 (vst1q_u8_x2): Likewise.
20031 (vst1q_u16_x2): Likewise.
20032 (vst1q_u32_x2): Likewise.
20033 (vst1q_u64_x2): Likewise.
20034 (vst1q_f16_x2): Likewise.
20035 (vst1q_f32_x2): Likewise.
20036 (vst1q_f64_x2): Likewise.
20037 (vst1q_p64_x2): Likewise.
20038 (vst1_s64_x3): Likewise.
20039 (vst1_u64_x3): Likewise.
20040 (vst1_f64_x3): Likewise.
20041 (vst1_s8_x3): Likewise.
20042 (vst1_p8_x3): Likewise.
20043 (vst1_s16_x3): Likewise.
20044 (vst1_p16_x3): Likewise.
20045 (vst1_s32_x3): Likewise.
20046 (vst1_u8_x3): Likewise.
20047 (vst1_u16_x3): Likewise.
20048 (vst1_u32_x3): Likewise.
20049 (vst1_f16_x3): Likewise.
20050 (vst1_f32_x3): Likewise.
20051 (vst1_p64_x3): Likewise.
20052 (vst1q_s8_x3): Likewise.
20053 (vst1q_p8_x3): Likewise.
20054 (vst1q_s16_x3): Likewise.
20055 (vst1q_p16_x3): Likewise.
20056 (vst1q_s32_x3): Likewise.
20057 (vst1q_s64_x3): Likewise.
20058 (vst1q_u8_x3): Likewise.
20059 (vst1q_u16_x3): Likewise.
20060 (vst1q_u32_x3): Likewise.
20061 (vst1q_u64_x3): Likewise.
20062 (vst1q_f16_x3): Likewise.
20063 (vst1q_f32_x3): Likewise.
20064 (vst1q_f64_x3): Likewise.
20065 (vst1q_p64_x3): Likewise.
20067 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20069 * config/msp430/msp430.c (msp430_output_labelref): Prepend
20070 user_label_prefix to name.
20072 * tree-core.h: Update comment about the format of NAME string
20073 passed to handler in attribute_spec.
20075 * config/msp430/msp430.md: Remove erroneous subreg expression from
20076 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
20077 zero_extend{q,h}isi2.
20079 2018-05-30 Borislav Petkov <bp@suse.de>
20081 * doc/extend.texi: Document some architecture specific
20082 constraints and sort entries.
20084 2018-05-30 Martin Sebor <msebor@redhat.com>
20086 PR middle-end/85369
20087 * builtins.c (expand_builtin_stpcpy_1): New function.
20088 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
20089 only if the former succeeds.
20091 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
20093 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
20096 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
20098 * doc/invoke.texi (-flinker-output): Document
20100 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
20102 * passes.c (ipa_write_summaries): Only modify statements if body
20104 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
20105 incrementally linking.
20106 (ipa_passes): Likewise.
20107 * lto-cgraph.c (lto_output_node): When incrementally linking do not
20108 pass down resolution info.
20109 * common.opt (flag_incremental_link): Update info.
20110 * gcc.c (plugin specs): Turn flinker-output=* to
20111 -plugin-opt=-linker-output-known
20112 * toplev.c (compile_file): Also cut compilation when doing incremental
20114 * flag-types. (enum lto_partition_model): Add
20115 LTO_LINKER_OUTPUT_NOLTOREL.
20116 (invoke.texi): Add -flinker-output docs.
20117 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
20118 link same way as WPA; do not stream in dead initializers.
20120 * dwarf2out.c (dwarf2out_die_ref_for_decl,
20121 darf2out_register_external_decl): Support incremental link.
20123 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
20125 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
20127 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
20129 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
20130 it down to simple_object_copy_lto_debug_sections.
20131 (run_gcc): Determine incremental LTO link time and configure
20132 lto1 into non-wpa mode, disable renaming of debug sections.
20134 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
20136 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20137 descriptions of various incorrectly documented functions.
20139 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
20142 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20143 address check not strict.
20145 2018-05-30 Richard Biener <rguenther@suse.de>
20147 PR tree-optimization/85964
20148 * tracer.c (better_p): Drop initialized count check, we only
20149 call the function with initialized counts now.
20150 (find_best_successor): Do find a best edge if one
20151 has uninitialized count.
20152 (find_best_predecessor): Likewise. Do BB frequency check only
20153 if count is initialized.
20155 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
20157 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
20158 (aarch64_ldrstr_offset_compare): New.
20159 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
20160 load/store orderings.
20161 (aarch64_gen_adjusted_ldpstp): Likewise.
20163 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
20165 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
20166 Check for subset of GENERAL_REGS and FP_REGS.
20167 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
20170 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
20172 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
20173 and wi::to_poly_offset. Add the current offset and then check
20174 whether the sum fits, rather than using an unchecked addition of
20175 a checked term. Check for a shwi rather than a uhwi.
20176 * expr.c (get_bit_range): Use tree_to_poly_uint64.
20177 (store_constructor): Use poly_int_tree_p.
20178 (expand_expr_real_1): Likewise.
20179 * function.c (assign_temp): Likewise.
20180 * fold-const.c (const_binop): Use poly_int_tree_p and
20181 wi::to_poly_offset.
20182 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
20184 * ipa-icf-gimple.c (func_checker::compare_operand): Use
20185 to_poly_offset for MEM offsets.
20186 * ipa-icf.c (sem_variable::equals): Likewise.
20187 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
20188 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
20189 wi::to_poly_offset for BIT_FIELD_REF offsets.
20190 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
20191 wi::to_poly_offset.
20192 * var-tracking.c (emit_note_insn_var_location): Use
20193 tree_to_poly_uint64.
20195 2018-05-29 Jim Wilson <jimw@sifive.com>
20197 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
20199 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
20202 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
20203 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
20205 (sse4_1_round<mode>2): Use nonimmediate_operand
20206 for operand 1 predicate.
20208 2018-05-29 Martin Sebor <msebor@redhat.com>
20209 Richard Biener <rguenther@suse.de>
20212 * calls.c (get_size_range): Call determine_value_range instead
20213 of get_value_range..
20214 * tree-vrp.h (determine_value_range): Declared new function.
20215 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
20217 2018-05-29 Richard Biener <rguenther@suse.de>
20219 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
20220 sure to use non-pattern stmts for get_earlier_stmt arguments.
20221 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
20222 called on pattern stmts.
20223 (get_later_stmt): Likewise.
20225 2018-05-29 Martin Liska <mliska@suse.cz>
20227 PR gcov-profile/85759
20228 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
20231 2018-05-29 Jakub Jelinek <jakub@redhat.com>
20233 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
20235 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
20239 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20240 VEC_PACK_FLOAT_EXPR): New tree codes.
20241 * tree-pretty-print.c (op_code_prio): Handle
20242 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20243 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20244 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20245 * tree-inline.c (estimate_operator_cost): Likewise.
20246 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
20247 * fold-const.c (const_binop): Likewise.
20248 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
20249 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20250 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
20251 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
20252 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20253 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20254 * expr.c (expand_expr_real_2): Likewise.
20255 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
20256 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
20257 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
20259 * optabs.c (expand_widen_pattern_expr): For
20260 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
20261 sign from result type rather than operand's type.
20262 (expand_binop_directly): For vec_packu_float_optab and
20263 vec_packs_float_optab allow result type to be different from operand's
20265 * optabs-tree.c (optab_for_tree_code): Handle
20266 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20267 VEC_PACK_FLOAT_EXPR. Formatting fixes.
20268 * tree-vect-generic.c (expand_vector_operations_1): Handle
20269 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20270 VEC_PACK_FLOAT_EXPR.
20271 * tree-vect-stmts.c (supportable_widening_operation): Handle
20273 (supportable_narrowing_operation): Handle FLOAT_EXPR.
20274 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
20275 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
20276 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
20277 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
20279 (vec_pack<floatprefix>_float_<mode>): New expander.
20280 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
20282 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
20283 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
20284 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
20285 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
20286 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
20288 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
20289 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
20290 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20291 VEC_PACK_FLOAT_EXPR): Document.
20293 2018-05-29 Richard Biener <rguenther@suse.de>
20295 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
20297 (stmt_vec_info_vec): Make pointer.
20298 (init_stmt_vec_info_vec): Remove.
20299 (free_stmt_vec_info_vec): Likewise.
20300 (set_stmt_vec_info_vec): New function.
20301 (free_stmt_vec_infos): Likewise.
20302 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
20303 (set_vinfo_for_stmt): Likewise.
20304 (get_earlier_stmt): Likewise.
20305 (get_later_stmt): Likewise.
20306 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
20307 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
20308 (vec_info::~vec_info): Free stmt_vec_infos.
20309 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
20310 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
20311 (pass_slp_vectorize::execute): Likewise.
20312 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
20313 (free_stmt_vec_info_vec): Likewise.
20314 (set_stmt_vec_info_vec): New function.
20315 (free_stmt_vec_infos): Likewise.
20316 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
20317 the global stmt_vec_info_vec.
20318 * tree-parloops.c (gather_scalar_reductions): Use
20319 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
20322 2018-05-29 Richard Biener <rguenther@suse.de>
20324 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
20326 2018-05-29 Martin Liska <mliska@suse.cz>
20327 David Malcolm <dmalcolm@redhat.com>
20329 * vec.c (test_reverse): New.
20330 (vec_c_tests): Add new test.
20331 * vec.h (vl_ptr>::reverse): New function.
20333 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
20335 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
20337 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
20340 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
20342 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
20344 2018-05-28 Richard Biener <rguenther@suse.de>
20346 PR tree-optimization/85933
20347 * tree-vect-data-refs.c (vect_record_base_alignments): Only
20348 look at stmts marked as vectorizable.
20350 2018-05-28 Richard Biener <rguenther@suse.de>
20352 PR tree-optimization/85934
20353 * tree-vect-generic.c (expand_vector_operations_1): Hoist
20354 vector boolean check before scalar optimization.
20356 2018-05-28 Jakub Jelinek <jakub@redhat.com>
20358 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
20361 2018-05-28 Mark Wielaard <mark@klomp.org>
20363 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
20364 if it is an expression containing a minus sign.
20366 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
20368 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
20370 2018-05-27 Paul Koning <ni1d@arrl.net>
20372 * config/pdp11/pdp11.md (truncsihi2): Remove.
20374 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
20375 Chung-Ju Wu <jasonwucj@gmail.com>
20377 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
20379 (unaligned_store_dw): Ditto.
20380 * config/nds32/nds32-memory-manipulation.c
20381 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
20382 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
20383 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
20384 (emit_setmem_word_loop): Rename to ...
20385 (emit_setmem_doubleword_loop): ... this.
20386 (nds32_gen_dup_4_byte_to_word_value): New function.
20387 (nds32_gen_dup_8_byte_to_double_word_value): New function.
20388 (nds32_expand_setmem_loop): Refine implementation.
20389 (nds32_expand_setmem_loop_v3m): Ditto.
20390 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
20393 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
20395 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
20397 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
20399 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
20400 (nds32_init_machine_status): Initialize machine->attr_naked_p and
20401 machine->attr_no_prologue_p.
20402 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
20403 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
20404 (nds32_expand_epilogue): Consider attr_naked_p.
20405 (nds32_expand_epilogue_v3pop): Likewise.
20406 (nds32_can_use_return_insn): Likewise.
20407 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
20408 attr_no_prologue_p fields.
20409 * config/nds32/nds32.opt (mret-in-naked-func): New option.
20411 2018-05-27 Jakub Jelinek <jakub@redhat.com>
20414 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
20416 * config/i386/sse.md
20417 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
20419 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
20421 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
20423 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
20425 (*<floatsuffix>floatv2div2sf2): Rename to ...
20426 (*float<floatunssuffix>v2div2sf2): ... this.
20427 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
20428 (float<floatunssuffix>v2div2sf2_mask): ... this.
20429 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
20430 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
20431 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
20433 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
20435 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20437 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20439 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20441 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20443 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
20444 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
20445 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
20446 gen_ufix_truncv8dfv8si2.
20447 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
20448 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
20449 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
20450 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
20451 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
20452 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
20453 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
20454 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
20456 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
20460 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
20462 2018-05-25 Jim Wilson <jimw@sifive.com>
20464 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
20465 * config/riscv/riscv.c (struct machine_function): Add
20466 interrupt_handler_p and attribute_checked_p fields.
20467 (riscv_attribute_table): Add interrupt.
20468 (riscv_interrupt_type_p): New.
20469 (riscv_save_reg_p): Save extra regs for interrupt handler.
20470 (riscv_use_save_libcall): Return false for interrupt handler.
20471 (riscv_first_stack_step): Add forward declaration.
20472 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
20473 for interrupt handler with large frame. Use it for saved reg list.
20474 (riscv_expand_prologue): Move flag_stack_usage_info support to
20475 eliminate duplication.
20476 (riscv_expand_epilogue): Generate mret for interrupt handler.
20477 (riscv_epilogue_uses): New.
20478 (riscv_can_use_return_insn): Return false for interrupt handler.
20479 (riscv_function_ok_for_sibcall): Likewise.
20480 (riscv_set_current_function): Add interrupt handler support.
20481 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
20482 * config/riscv/riscv.md (UNSPECV_MRET): New.
20484 (riscv_frflags, riscv_fsflags): Use tab after opcode.
20486 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
20488 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
20490 PR tree-optimization/85712
20491 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
20492 this candidate has already been replaced in-situ by a copy.
20494 2018-05-25 Jason Merrill <jason@redhat.com>
20496 PR c++/80485 - inline function non-zero address.
20497 * symtab.c (nonzero_address): Check DECL_COMDAT.
20499 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
20502 * config/alpha/alpha.md (ashlsi3): New insn pattern.
20503 (*ashlsi_se): Rename from *ashldi_se. Define as sign
20504 extension of SImode operation. Use const123_operand predicate.
20505 (*saddsi_1): Remove.
20506 (*saddl_se_1): Ditto.
20507 (*ssubsi_1): Ditto.
20508 (*ssubl_se_1): Ditto.
20509 * config/alpha/predicates.md (const123_operand): New predicate.
20510 * config/alpha/constraints.md (P): Use IN_RANGE.
20512 2018-05-25 Richard Biener <rguenther@suse.de>
20514 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
20516 (ref_maybe_used_by_stmt_p): Likewise.
20517 (stmt_may_clobber_ref_p): Likewise.
20518 (stmt_may_clobber_ref_p_1): Likewise.
20519 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
20521 (ref_maybe_used_by_stmt_p): Likewise.
20522 (stmt_may_clobber_ref_p): Likewise.
20523 (stmt_may_clobber_ref_p_1): Likewise.
20524 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
20525 the alias oracle to disambiguate DRs with stmts DR analysis
20527 (vect_analyze_data_refs): Do not give up on not analyzable
20528 DRs for BB vectorization. Remove code truncating the dataref
20531 2018-05-25 Jakub Jelinek <jakub@redhat.com>
20534 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
20535 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
20536 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
20538 2018-05-25 Richard Biener <rguenther@suse.de>
20540 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
20541 function, combining stmt data ref gathering and fatal analysis
20543 (vect_analyze_data_refs): Remove now redudnant code and simplify.
20544 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
20545 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
20546 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
20547 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
20549 2018-05-25 Bin Cheng <bin.cheng@arm.com>
20551 PR tree-optimization/85720
20552 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
20553 SCC if all partitions are builtins.
20554 (version_loop_by_alias_check): New parameter. Generate cancelable
20555 runtime alias check if all partitions are builtins.
20556 (distribute_loop): Update call to above function.
20558 2018-05-25 Bin Cheng <bin.cheng@arm.com>
20560 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
20561 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
20562 (parm_default_def_partition_arg): Ditto.
20563 (set_parm_default_def_partition): Ditto.
20564 (get_parm_default_def_partitions): Ditto and make it static.
20565 (get_undefined_value_partitions): Ditto and make it static.
20566 (remove_ssa_form): Refactor call to init_var_map here.
20567 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
20568 computation for loop region.
20569 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
20570 (register_default_def): Delete.
20571 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
20572 (parm_default_def_partition_arg): Ditto.
20573 (set_parm_default_def_partition): Ditto.
20574 (get_parm_default_def_partitions): Ditto and make it static.
20575 (get_undefined_value_partitions): Ditto and make it static.
20576 (coalesce_with_default, coalesce_with_default): Update comment.
20577 (create_coalesce_list_for_region): New func factored out from
20578 create_outofssa_var_map.
20579 (populate_coalesce_list_for_outofssa): New func factored out from
20580 create_outofssa_var_map and coalesce_ssa_name.
20581 (create_outofssa_var_map): Delete.
20582 (coalesce_ssa_name): Refactor to support live range computation.
20583 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
20584 (get_parm_default_def_partitions): Delete.
20585 (get_undefined_value_partitions): Ditto.
20586 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
20587 computation for loop region.
20588 (new_tree_live_info, loe_visit_block): Ditto.
20589 (live_worklist, set_var_live_on_entry): Ditto.
20590 (calculate_live_on_exit, verify_live_on_entry): Ditto.
20591 * tree-ssa-live.h (struct _var_map): New fields.
20592 (init_var_map): Change decl.
20593 (region_contains_p): New.
20595 2018-05-25 Bin Cheng <bin.cheng@arm.com>
20597 * tree-ssa-live.h (live_merge_and_clear): Delete.
20599 2018-05-25 Richard Biener <rguenther@suse.de>
20602 * tree-dump.c (dequeue_and_dump): Remove access to removed
20603 operand 2 of a SWITCH_EXPR.
20605 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20607 * doc/sourcebuild.texi (vect_double_cond_arith): Include
20608 multiplication and division.
20609 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
20610 (cond_udiv@var{m}, cond_umod@var{m}): Document.
20611 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
20612 (cond_udiv_optab, cond_umod_optab): New optabs.
20613 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
20614 (IFN_COND_RDIV): New internal functions.
20615 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
20616 TRUNC_MOD_EXPR and RDIV_EXPR.
20617 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
20618 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
20620 (SVE_INT_BINARY): Include mult.
20621 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
20622 (optab, sve_int_op): Handle mult.
20623 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
20625 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
20626 for SVE_INT_BINARY_SD.
20628 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20630 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
20631 (optab, sve_int_op): Handle div and udiv.
20632 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
20633 for SVE_INT_BINARY_SD.
20634 (*<optab><mode>3): New insn for the same.
20636 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20638 * tree-vect-patterns.c: Include predict.h.
20639 (vect_recog_divmod_pattern): Restrict check for division support
20640 to when optimizing for size.
20642 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20644 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
20645 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
20646 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
20647 (gimple_match_op::set_op): Likewise.
20648 (gimple_resimplify4): Declare.
20649 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
20650 (expr::gen_transform): Likewise.
20651 (decision_tree::gen): Generate a simplification routine for 4 operands.
20652 * gimple-match-head.c (gimple_simplify): Add an overload for
20653 4 operands. In the top-level function, handle up to 4 call
20654 arguments and call gimple_resimplify4.
20655 (gimple_resimplify4): New function.
20656 (build_call_internal): Pass a fourth operand.
20657 (maybe_push_to_seq): Likewise.
20658 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
20659 Fold VEC_COND_EXPRs of an operation and a default value into
20660 an IFN_COND_* function if possible.
20661 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
20663 (SVE_COND_FP_BINARY): Include them.
20664 (optab, sve_fp_op): Handle them.
20665 (SVE_INT_BINARY_REV): New code iterator.
20666 (SVE_COND_FP_BINARY_REV): New int iterator.
20667 (commutative): New int attribute.
20668 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
20670 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
20672 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
20673 (*cond_<optab><mode>): New patterns for reversed operands.
20675 2018-05-25 Richard Biener <rguenther@suse.de>
20677 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
20678 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
20679 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
20680 (STMT_VINFO_GROUPED_ACCESS): Adjust.
20681 * tree-vect-data-refs.c (everywhere): Adjust users.
20682 * tree-vect-loop.c (everywhere): Likewise.
20683 * tree-vect-slp.c (everywhere): Likewise.
20684 * tree-vect-stmts.c (everywhere): Likewise.
20685 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
20687 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20689 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
20691 (gcc_cv_as_section_exclude): ... this.
20692 Try Solaris as #exclude syntax.
20693 * configure: Regenerate.
20694 * config.in: Regenerate.
20695 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
20697 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
20698 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
20700 * varasm.c (default_elf_asm_named_section): Don't check if
20701 HAVE_GAS_SECTION_EXCLUDE is defined.
20703 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20705 * doc/md.texi: Update the documentation of the cond_* optabs
20706 to mention the new final operand. Fix GET_MODE_NUNITS call.
20707 Describe the scalar case too.
20708 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
20709 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
20711 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
20712 (get_conditional_internal_fn): Update comment.
20713 * tree-vect-loop.c (vectorizable_reduction): Pass the original
20714 accumulator value as a final argument to conditional functions.
20715 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
20716 a define_expand and add an "else" operand. Assert for now that
20717 the else operand is equal to operand 2. Use SVE_INT_BINARY and
20718 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
20719 (*cond_<optab><mode>): New patterns.
20720 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
20721 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20722 (UNSPEC_COND_EOR): Delete.
20723 (optab): Remove associated mappings.
20724 (SVE_INT_BINARY): New code iterator.
20725 (sve_int_op): Remove int attribute and add "minus" to the code
20727 (SVE_COND_INT_OP): Delete.
20728 (SVE_COND_FP_OP): Rename to...
20729 (SVE_COND_FP_BINARY): ...this.
20731 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20733 * optabs.c (can_reuse_operands_p): New function.
20734 (maybe_legitimize_operands): Try to reuse the results for
20737 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
20739 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
20740 Add {q} suffix to insn mnemonic.
20742 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20744 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
20745 (msp430_warn_func_return): New.
20747 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
20749 * fold-const.c (tree_nonzero_bits): New function.
20750 * fold-const.h (tree_nonzero_bits): Likewise.
20751 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
20752 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
20754 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
20758 * varasm.c (assemble_alias): Check ifunc_resolver only on
20761 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
20764 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
20765 when memory input operand is handled.
20767 2018-05-24 Luis Machado <luis.machado@linaro.org>
20769 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
20771 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
20773 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
20775 * match.pd: Delay FMA folds until after vectorization.
20777 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
20780 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20781 address check not strict.
20783 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
20785 * gimple-match.h (gimple_match_op): New class.
20786 (mprts_hook): Replace parameters with a gimple_match_op *.
20787 (maybe_build_generic_op): Likewise.
20788 (gimple_simplified_result_is_gimple_val): Replace parameters with
20789 a const gimple_match_op *.
20790 (gimple_simplify): Replace code_helper * and tree * parameters with
20791 a gimple_match_op * parameter.
20792 (gimple_resimplify1): Replace code_helper *, tree and tree *
20793 parameters with a gimple_match_op * parameter.
20794 (gimple_resimplify2): Likewise.
20795 (gimple_resimplify3): Likewise.
20796 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
20797 parameters with a gimple_match_op * parameter.
20798 * gimple-match-head.c (gimple_simplify): Change prototypes of
20799 auto-generated functions to take a gimple_match_op * instead of
20800 separate code_helper * and tree * parameters. Make the same
20801 change in the top-level overload and update calls to the
20802 gimple_resimplify routines. Update calls to the auto-generated
20803 functions and to maybe_push_res_to_seq in the publicly-facing
20804 operation-specific gimple_simplify overloads.
20805 (gimple_match_op::MAX_NUM_OPS): Define.
20806 (gimple_resimplify1): Replace rcode and ops with a single res_op
20807 parameter. Update call to gimple_simplify.
20808 (gimple_resimplify2): Likewise.
20809 (gimple_resimplify3): Likewise.
20810 (mprts_hook): Replace parameters with a gimple_match_op *.
20811 (maybe_build_generic_op): Likewise.
20812 (build_call_internal): Replace type, nargs and ops with
20813 a gimple_match_op *.
20814 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
20815 with a single gimple_match_op *. Update calls to mprts_hook,
20816 build_call_internal and gimple_simplified_result_is_gimple_val.
20817 Factor out code that is common to the tree_code and combined_fn cases.
20818 * genmatch.c (expr::gen_transform): Replace tem_code and
20819 tem_ops with a gimple_match_op called tem_op. Update calls
20820 to the gimple_resimplify functions and maybe_push_res_to_seq.
20821 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
20822 res_ops. Update call to the gimple_resimplify functions.
20823 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
20824 (decision_tree::gen): Make the functions take a gimple_match_op *
20825 called res_op instead of separate res_code and res_ops parameters.
20826 Update call accordingly.
20827 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
20828 and ops with a single res_op parameter. Update calls to
20829 maybe_build_generic_op and maybe_push_res_to_seq.
20830 (fold_stmt_1): Update calls to gimple_simplify and
20831 replace_stmt_with_simplification.
20832 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
20833 and gimple_simplified_result_is_gimple_val.
20834 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
20836 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
20837 with a gimple_match_op *.
20838 (vn_nary_build_or_lookup): Likewise. Update call to
20839 vn_nary_build_or_lookup_1.
20840 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
20841 gimple_match_op *. Update calls to the gimple_resimplify routines
20842 and to gimple_simplified_result_is_gimple_val.
20843 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
20844 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
20845 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
20846 (visit_nary_op): Likewise.
20847 (visit_reference_op_load): Likewise.
20849 2018-05-23 Luis Machado <luis.machado@linaro.org>
20851 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
20852 modifier for printing the step amount.
20854 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
20857 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
20860 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
20862 * doc/sourcebuild.texi (Endianness): New subsubsection.
20864 2018-05-23 Luis Machado <luis.machado@linaro.org>
20866 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20867 <prefetch_dynamic_strides>: New const bool field.
20868 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20869 prefetch_dynamic_strides.
20870 (exynosm1_prefetch_tune): Likewise.
20871 (thunderxt88_prefetch_tune): Likewise.
20872 (thunderx_prefetch_tune): Likewise.
20873 (thunderx2t99_prefetch_tune): Likewise.
20874 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
20876 (aarch64_override_options_internal): Update to set
20877 PARAM_PREFETCH_DYNAMIC_STRIDES.
20878 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20879 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20880 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20881 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20882 prefetch-dynamic-strides setting.
20884 2018-05-23 Luis Machado <luis.machado@linaro.org>
20886 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20887 <minimum_stride>: New const int field.
20888 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20889 minimum_stride field defaulting to -1.
20890 (exynosm1_prefetch_tune): Likewise.
20891 (thunderxt88_prefetch_tune): Likewise.
20892 (thunderx_prefetch_tune): Likewise.
20893 (thunderx2t99_prefetch_tune): Likewise.
20894 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
20895 <default_opt_level>: Set to 3.
20896 (aarch64_override_options_internal): Update to set
20897 PARAM_PREFETCH_MINIMUM_STRIDE.
20898 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20899 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20900 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20901 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20902 stride is constant and is below the minimum stride threshold.
20904 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20906 * config/arm/arm-cpus.in (mode26): Delete.
20907 (armv4): Delete mode26 reference.
20908 * config/arm/arm.c (arm_configure_build_target): Delete use of
20911 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
20913 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
20915 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
20916 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
20918 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
20919 (floatunsdidf2): Ditto.
20921 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
20923 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
20924 (fixuns_trunc<mode>si2_avx512f): Ditto.
20925 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
20926 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
20927 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
20929 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
20931 PR rtl-optimization/79985
20932 * df-scan.c (df_insn_refs_collect): Remove special case for
20933 global registers and asm statements.
20935 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
20937 * extend.texi (Global Register Variables): Rewrite the bullet list.
20938 Note that the register is available for allocation. Note that access
20939 via inline asm must use constraints. Add note about async-signal
20940 handlers. Remove paragraph about automagic register selection.
20942 2018-05-23 Richard Biener <rguenther@suse.de>
20944 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
20945 of fixed offset from memset VN.
20947 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
20949 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
20950 first_interp field.
20951 (alloc_cand_and_find_basis): Initialize first_interp field.
20952 (slsr_process_mul): Modify first_interp field.
20953 (slsr_process_add): Likewise.
20954 (slsr_process_cast): Modify first_interp field for each new
20956 (slsr_process_copy): Likewise.
20957 (dump_candidate): Dump first_interp field.
20958 (replace_mult_candidate): Process all interpretations, not just
20960 (replace_rhs_if_not_dup): Likewise.
20961 (replace_one_candidate): Likewise.
20963 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
20965 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
20967 (aarch64_needs_frame_chain): New function.
20968 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
20970 2018-05-23 Sudakshina Das <sudi.das@arm.com>
20973 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
20974 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
20975 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
20976 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
20977 as true for strict-align.
20978 (aarch64_can_inline_p): Perform checks even when callee has no
20979 attributes to check for strict alignment.
20980 * doc/extend.texi (AArch64 Function Attributes): Document
20982 * doc/invoke.texi: (AArch64 Options): Likewise.
20984 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
20986 PR tree-optimization/85853
20987 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
20988 the handling of the root of the node to...
20989 (vect_slp_analyze_node_operations_1): ...this new function,
20990 and run the whole thing with the child nodes' def types
20991 set according to their SLP node's def type.
20993 2018-05-23 Richard Biener <rguenther@suse.de>
20995 PR middle-end/85874
20996 * tree-data-ref.c (create_runtime_alias_checks): Defer
20997 and ignore overflow warnings.
20999 2018-05-23 Yury Gribov <tetra2005@gmail.com>
21001 PR tree-optimization/85822
21002 * tree-vrp.c (is_masked_range_test): Fix handling of negative
21005 2018-05-23 Richard Biener <rguenther@suse.de>
21007 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
21008 memset constants via native_interpret_expr.
21010 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
21013 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
21015 (cgraph_node::create_alias): Likewise.
21016 (cgraph_node::get_availability): Check ifunc_resolver instead
21017 of looking up ifunc attribute.
21018 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
21019 * varasm.c (do_assemble_alias): Likewise.
21020 (assemble_alias): Likewise.
21021 (default_binds_local_p_3): Likewise.
21022 * cgraph.h (cgraph_node): Add ifunc_resolver.
21023 (cgraph_node::only_called_directly_or_aliased_p): Return false
21024 for IFUNC resolver.
21025 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
21027 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
21028 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
21029 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
21030 instead of looking up ifunc attribute.
21032 2018-05-22 Luis Machado <luis.machado@linaro.org>
21034 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
21036 2018-05-22 Martin Sebor <msebor@redhat.com>
21038 PR middle-end/85359
21039 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
21040 only when expasion succeeds.
21041 (expand_builtin_strcmp): Same.
21042 (expand_builtin_strncmp): Same.
21044 2018-05-22 Martin Sebor <msebor@redhat.com>
21046 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
21048 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
21049 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21051 * config/aarch64/aarch64-ldpstp.md: Replace uses of
21052 aarch64_mem_pair_operand with memory_operand and delete operand swapping
21054 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
21055 Add check for legitimate_address.
21056 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
21057 (aarch64_swap_ldrstr_operands): New.
21058 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
21061 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
21062 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21064 * config/aarch64/aarch64.md: New patterns to generate stp
21066 (store_pair_sw, store_pair_dw): New patterns to generate stp for
21067 single words and double words.
21068 (load_pair_sw, load_pair_dw): Likewise.
21069 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
21071 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
21073 * config/aarch64/aarch64-ldpstp.md: Modify peephole
21074 for different mode ldpstp and add peephole for merged zero stores.
21075 Likewise for loads.
21076 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
21078 (aarch64_gen_store_pair): Rename calls to match new patterns.
21079 (aarch64_gen_load_pair): Rename calls to match new patterns.
21080 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
21081 (load_pair<DREG:mode><DREG2:mode>): ... This.
21082 (store_pair<mode>): Rename to...
21083 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
21084 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
21085 New mode iterators.
21086 (V_INT_EQUIV): Handle SImode.
21087 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
21090 2018-05-22 Martin Sebor <msebor@redhat.com>
21093 * calls.c (maybe_warn_nonstring_arg): Use string length to set
21094 or ajust the presumed bound on an operation to avoid unnecessary
21097 2018-05-22 Martin Sebor <msebor@redhat.com>
21099 PR tree-optimization/85826
21100 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
21101 assuming that a DECL necesarily has a constant size.
21103 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
21105 PR middle-end/85862
21106 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
21108 2018-05-22 Richard Biener <rguenther@suse.de>
21110 PR tree-optimization/85834
21111 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
21112 non-constant and non-zero memset arguments.
21114 2018-05-22 Martin Liska <mliska@suse.cz>
21117 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
21119 2018-05-22 Richard Biener <rguenther@suse.de>
21121 PR tree-optimization/85863
21122 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
21123 comparisons when vectype is specified.
21124 (vectorizable_condition): Do not specify vectype for
21125 vect_is_simple_cond when SLP vectorizing.
21127 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
21130 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
21131 define __ibm128 as long double.
21132 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
21133 as a distinct type when IEEE 128-bit support is enabled.
21134 (init_float128_ieee): Fix up conversions between IFmode and IEEE
21135 128-bit types to use the correct functions.
21136 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
21137 convert between 128-bit floating point types that have different
21138 modes but the same representation, instead of using gen_lowpart to
21140 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
21142 (IFKF_reg): New attributes to give the register constraints for
21144 (extend<mode>tf2_internal): New insns to mark an explicit
21145 conversion between 128-bit floating point types that have a
21146 different mode but share the same representation.
21148 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
21150 PR tree-optimization/85814
21151 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
21152 a null return from get_strinfo when unsharing the next
21153 strinfo in the chain.
21155 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21158 * varasm.c (weak_finish): Clean up weak_decls.
21160 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21162 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
21163 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
21164 UNSPEC_UADALP values.
21165 * config/aarch64/iterators.md (ABAL): New int iterator.
21168 (sur): Add mappings for the above.
21169 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
21171 (aarch64_<sur>abal<mode>_4): Likewise.
21172 (aarch64_<sur>adalp<mode>_3): Likewise.
21173 (<sur>sadv16qi): New define_expand.
21175 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
21177 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
21178 (*movdf_internal): Ditto.
21179 (*rcpsf2_sse): Ditto.
21180 (*rsqrtsf2_sse): Ditto.
21181 (*sqrt<mode>2_sse): Ditto.
21183 2018-05-21 Tamar Christina <tamar.christina@arm.com>
21185 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
21187 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
21188 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
21189 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
21190 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
21192 * config/aarch64/arm_neon.h: Likewise.
21193 * config/aarch64/iterators.md (VQ_I): New.
21195 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
21197 * config.gcc: Add arc/t-multilib-linux to tmake_file for
21199 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
21202 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
21204 * config/nds32/constraints.md (S): New constraint.
21205 * config/nds32/nds32.md (call_internal): Use constraint S.
21206 (call_value_internal): Likewise.
21207 (sibcall_internal): Likewise.
21208 (sibcall_value_internal): Likewise.
21210 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
21211 Chung-Ju Wu <jasonwucj@gmail.com>
21213 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
21214 into consideration.
21216 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
21217 Chung-Ju Wu <jasonwucj@gmail.com>
21219 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
21220 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
21221 (nds32_rtx_costs_impl): Simplify.
21222 (nds32_address_cost_impl): Simplify.
21223 (nds32_init_rtx_costs): New function.
21224 (nds32_rtx_costs_speed_prefer): Likewise.
21225 (nds32_rtx_costs_size_prefer): Likewise.
21226 (nds32_address_cost_speed_prefer): Likewise.
21227 (nds32_address_cost_speed_fwprop): Likewise.
21228 (nds32_address_cost_size_prefer): Likewise.
21229 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
21230 * config/nds32/nds32.c (nds32_option_override): Use
21231 nds32_init_rtx_costs function.
21233 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
21235 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
21236 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
21237 (TARGET_PIPELINE_N8): Likewise.
21238 (TARGET_PIPELINE_N10): Likewise.
21239 (TARGET_PIPELINE_N13): Likewise.
21240 (TARGET_PIPELINE_GRAYWOLF): Likewise.
21242 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
21244 * config/nds32/nds32-fpu.md: Update copyright year.
21246 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21248 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
21250 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21252 * config/nds32/nds32.c
21253 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
21254 * config/nds32/nds32.opt (minline-asm-r15): New option.
21256 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21258 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
21260 * config/nds32/nds32.md (abssi2): New pattern.
21262 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
21264 * config/i386/i386.md (rex64namesuffix): New mode attribute.
21265 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
21266 Merge insn pattern from sse_cvtsi2ss<round_name> and
21267 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
21268 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
21269 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
21270 using SWI48 mode iterator.
21271 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
21272 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
21273 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
21274 pattern from sse_cvttss2si<round_saeonly_name>
21275 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
21276 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
21277 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
21278 using SWI48 mode iterator.
21279 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
21280 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
21281 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
21282 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
21283 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
21284 using SWI48 mode iterator.
21285 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
21286 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
21287 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
21288 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
21289 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
21290 SWI48 mode iterator.
21291 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
21292 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
21293 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
21294 pattern from sse_cvttsd2si<round_saeonly_name>
21295 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
21297 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21299 * config/nds32/nds32-md-auxiliary.c
21300 (nds32_valid_smw_lwm_base_p): Refine.
21301 (nds32_output_smw_single_word): Refine.
21302 (nds32_output_smw_double_word): New.
21303 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
21305 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21307 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
21308 (nds32_output_stack_pop): Refine.
21309 (nds32_expand_unaligned_load): Refine.
21310 (nds32_expand_unaligned_store): Refine.
21312 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21313 Chung-Ju Wu <jasonwucj@gmail.com>
21315 * config/nds32/constants.md: Add TP_REGNUM constant.
21316 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
21317 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
21319 * config/nds32/nds32-doubleword.md: Consider flag_pic.
21320 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
21321 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
21322 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
21323 and PIC code generation.
21324 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
21326 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
21328 * config/nds32/nds32.md: Support TLS and PIC.
21329 * config/nds32/nds32.c: Support TLS and PIC.
21330 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
21331 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
21334 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21336 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
21337 mode with E_ prefix.
21339 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21340 Chung-Ju Wu <jasonwucj@gmail.com>
21342 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
21343 * config/nds32/nds32-md-auxiliary.c
21344 (symbolic_reference_mentioned_p): New.
21345 (nds32_legitimize_ict_address): New.
21346 (nds32_expand_ict_move): New.
21347 (nds32_indirect_call_referenced_p): New.
21348 (nds32_symbol_binds_local_p): Delete.
21349 (nds32_long_call_p): Modify.
21350 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
21351 * config/nds32/nds32-protos.h
21352 (symbolic_reference_mentioned_p): Declare.
21353 (nds32_legitimize_ict_address): Declare.
21354 (nds32_expand_ict_move): Declare.
21355 (nds32_indirect_call_referenced_p): Declare.
21356 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
21357 (nds32_relax_group): Use nds32_ict_const_p as condition.
21358 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
21359 (nds32_asm_file_start): Output ict_model directive in asm code.
21360 (nds32_legitimate_address_p): Consider indirect call.
21361 (nds32_print_operand): Consider indirect call.
21362 (nds32_print_operand_address): Consider indirect call.
21363 (nds32_insert_attributes): Handle "indirect_call" attribute.
21364 (TARGET_LEGITIMATE_ADDRESS_P): Define.
21365 (TARGET_LEGITIMATE_CONSTANT_P): Define.
21366 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
21367 (TARGET_DELEGITIMIZE_ADDRESS): Define.
21368 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
21369 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
21370 (TARGET_ICT_MODEL_SMALL): Define.
21371 (TARGET_ICT_MODEL_LARGE): Define.
21372 * config/nds32/nds32.md (movsi): Consider ict model.
21373 (call, call_value): Consider ict model.
21374 (sibcall, sibcall_value): Consider ict model.
21375 * config/nds32/nds32.opt (mict-model): New option.
21376 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
21379 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
21380 Monk Chiang <sh.chiang04@gmail.com>
21381 Jim Wilson <jimw@sifive.com>
21383 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
21384 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
21385 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
21386 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
21387 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
21388 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
21389 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
21390 compute save_libcall_adjustment properly.
21391 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
21392 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
21393 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
21394 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
21395 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
21396 (ABI_SPEC): Handle mabi=ilp32e.
21397 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
21398 (RVE): Add RVE mask.
21399 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
21400 <-march>: Add rv32e as an example.
21402 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
21405 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
21406 (intra_create_variable_infos): Handle C++ constructors.
21408 2018-05-18 Martin Liska <mliska@suse.cz>
21410 * passes.def: Remove a redundant pass.
21412 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
21415 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
21417 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21419 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
21421 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
21423 (armv2, armv2a, armv3, armv3m): Delete architectures.
21424 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
21425 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
21426 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
21428 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
21429 (*mulsidi3adddi): Likewise.
21430 (mulsidi3): Likewise.
21431 (*mulsidi3_nov6): Likewise.
21432 (umulsidi3): Likewise.
21433 (umulsidi3_nov6): Likewise.
21434 (umaddsidi4): Likewise.
21435 (*umulsidi3adddi): Likewise.
21436 (smulsi3_highpart): Likewise.
21437 (*smulsi3_highpart_nov6): Likewise.
21438 (umulsi3_highpart): Likewise.
21439 (*umulsi3_highpart_nov6): Likewise.
21440 * config/arm/arm.h (arm_arch3m): Delete.
21441 * config/arm/arm.c (arm_arch3m): Delete.
21442 (arm_option_override_internal): Update armv3-related comment.
21443 (arm_configure_build_target): Delete use of isa_bit_mode32.
21444 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
21445 (arm_rtx_costs_internal): Delete check of arm_arch3m.
21446 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
21447 (mulsa3): Likewise.
21448 (mulusa3): Likewise.
21449 * config/arm/arm-protos.h (arm_arch3m): Delete.
21450 * config/arm/arm-tables.opt: Regenerate.
21451 * config/arm/arm-tune.md: Likewise.
21452 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
21453 deleted architectures.
21455 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21457 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
21458 (armv5t, armv5te): New features.
21459 (ARMv5, ARMv5e): Delete fgroups.
21460 (ARMv5t, ARMv5te): Adjust for above changes.
21461 (ARMv6m): Likewise.
21462 (armv5, armv5e): Delete arches.
21463 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
21465 (*call_reg_arm): Likewise.
21466 (*call_value_reg_armv5): Likewise.
21467 (*call_value_reg_arm): Likewise.
21468 (*call_symbol): Likewise.
21469 (*call_value_symbol): Likewise.
21470 (*sibcall_insn): Likewise.
21471 (*sibcall_value_insn): Likewise.
21472 (clzsi2): Likewise.
21473 (prefetch): Likewise.
21474 (define_split and define_peephole2 dependent on arm_arch5):
21476 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
21478 (TARGET_ARM_QBIT): Likewise.
21479 (TARGET_DSP_MULTIPLY): Likewise.
21480 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
21481 (arm_arch5, arm_arch5e): Delete.
21482 (arm_arch5t, arm_arch5te): Declare.
21483 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
21484 (arm_arch5t): Declare.
21485 (arm_option_reconfigure_globals): Update for the above.
21486 (arm_options_perform_arch_sanity_checks): Update comment, replace
21487 use of arm_arch5 with arm_arch5t.
21488 (use_return_insn): Likewise.
21489 (arm_emit_call_insn): Likewise.
21490 (output_return_instruction): Likewise.
21491 (arm_final_prescan_insn): Likewise.
21492 (arm_coproc_builtin_available): Likewise.
21493 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
21494 arm_arch5e with arm_arch5t and arm_arch5te.
21495 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
21496 (arm_arch5t, arm_arch5te): Declare.
21497 * config/arm/arm-tables.opt: Regenerate.
21498 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
21499 * config/arm/t-multilib: Likewise.
21500 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
21501 instead of arm_arch5.
21502 (*call_reg_thumb1): Likewise.
21503 (*call_value_reg_thumb1_v5): Likewise.
21504 (*call_value_reg_thumb1): Likewise.
21505 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
21507 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
21509 2018-05-18 Martin Liska <mliska@suse.cz>
21511 PR gcov-profile/84846
21512 * doc/gcov.texi: Document -t option of gcov tool.
21514 2018-05-18 Martin Liska <mliska@suse.cz>
21516 PR gcov-profile/84846
21517 * gcov.c (print_usage): Add new -t option.
21518 (process_args): Handle the option.
21519 (generate_results): Use stdout as output when requested by
21522 2018-05-18 Martin Liska <mliska@suse.cz>
21524 PR gcov-profile/84846
21525 * coverage.c (coverage_init): Write PWD to .gcno file.
21526 * doc/gcov.texi: Document how working directory is printed.
21527 * gcov-dump.c (dump_gcov_file): Print PWD.
21528 * gcov.c (output_intermediate_file): Likewise.
21529 (read_graph_file): Read PWD string.
21530 (output_lines): Print PWD.
21532 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21534 PR middle-end/85817
21535 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
21536 for retval and return false if all args to phi are zero.
21538 2018-05-18 Richard Biener <rguenther@suse.de>
21540 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
21542 (evrp_dom_walker::before_dom_children): Call it.
21544 2018-05-18 Richard Biener <rguenther@suse.de>
21546 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
21547 results when processing array refs with variable index.
21549 2018-05-18 Toon Moene <toon@moene.org>
21551 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
21552 directly after that of -floop-interchange. Indicate that both
21553 options are enabled by default when specifying -O3.
21555 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21557 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
21558 iterator. Delete separate integer-mode vec_set<mode> expander.
21559 (aarch64_simd_vec_setv2di): Delete.
21560 (vec_setv2di): Delete.
21561 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
21562 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
21563 the "w, r" alternative.
21565 2018-05-18 Martin Liska <mliska@suse.cz>
21567 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
21568 * tree-pass.h (make_pass_lower_switch_O0): New function.
21569 * tree-switch-conversion.c (node_has_low_bound): Remove.
21570 (node_has_high_bound): Likewise.
21571 (node_is_bounded): Likewise.
21572 (class pass_lower_switch): Make it a template type and create
21574 (pass_lower_switch::execute): Add template argument.
21575 (make_pass_lower_switch): New function.
21576 (make_pass_lower_switch_O0): New function.
21577 (do_jump_if_equal): Remove.
21578 (emit_case_nodes): Simplify to just handle all 3 cases and leave
21579 all the hard work to tree optimization passes.
21581 2018-05-18 Martin Liska <mliska@suse.cz>
21583 * dbgcnt.c (limit_low): Renamed from limit.
21584 (limit_high): New variable.
21585 (dbg_cnt_is_enabled): Check for upper limit.
21586 (dbg_cnt): Adjust dumping.
21587 (dbg_cnt_set_limit_by_index): Add new argument for high
21589 (dbg_cnt_set_limit_by_name): Likewise.
21590 (dbg_cnt_process_single_pair): Parse new format.
21591 (dbg_cnt_process_opt): Use strtok.
21592 (dbg_cnt_list_all_counters): Remove 'value' and add
21594 * doc/invoke.texi: Document changes.
21596 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
21598 * doc/sourcebuild.texi (scalar_all_fma): Document.
21599 * tree.def (FMA_EXPR): Delete.
21600 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
21601 * internal-fn.c (ternary_direct): New macro.
21602 (expand_ternary_optab_fn): Likewise.
21603 (direct_ternary_optab_supported_p): Likewise.
21604 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
21605 * builtins.c (fold_builtin_fma): Delete.
21606 (fold_builtin_3): Don't call it.
21607 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
21608 * expr.c (expand_expr_real_2): Likewise.
21609 * fold-const.c (operand_equal_p): Likewise.
21610 (fold_ternary_loc): Likewise.
21611 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
21612 * gimple.c (DEFTREECODE): Likewise.
21613 * gimplify.c (gimplify_expr): Likewise.
21614 * optabs-tree.c (optab_for_tree_code): Likewise.
21615 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
21616 * tree-eh.c (operation_could_trap_p): Likewise.
21617 (stmt_could_throw_1_p): Likewise.
21618 * tree-inline.c (estimate_operator_cost): Likewise.
21619 * tree-pretty-print.c (dump_generic_node): Likewise.
21620 (op_code_prio): Likewise.
21621 * tree-ssa-loop-im.c (stmt_cost): Likewise.
21622 * tree-ssa-operands.c (get_expr_operands): Likewise.
21623 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
21624 * fold-const-call.h (fold_fma): Delete.
21625 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
21626 CFN_FNMA and CFN_FNMS.
21627 (fold_fma): Delete.
21628 * genmatch.c (combined_fn): New enum.
21629 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
21630 (commutative_op): New function.
21631 (commutate): Use it. Handle more than 2 operands.
21632 (dt_operand::gen_gimple_expr): Use commutative_op.
21633 (parser::parse_expr): Allow :c to be used with non-binary
21634 operators if the commutative operand is known.
21635 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
21636 CFN_FMS, CFN_FNMA and CFN_FNMS.
21637 (backprop::process_assign_use): Remove FMA_EXPR handling.
21638 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
21639 (gen_hsa_fma): New function.
21640 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
21641 IFN_FNMA and IFN_FNMS.
21642 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
21643 * gimple-fold.h (follow_all_ssa_edges): Declare.
21644 * gimple-fold.c (follow_all_ssa_edges): New function.
21645 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
21646 gimple_build interface and use follow_all_ssa_edges to fold the result.
21647 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
21648 instead of checking for optabs directly.
21649 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
21650 rather than FMA_EXPRs.
21651 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
21652 call to IFN_FMA instead of an FMA_EXPR.
21654 2018-05-17 Jim Wilson <jimw@sifive.com>
21656 * expr.c (do_tablejump): When converting index to Pmode, if we have a
21657 sign extended promoted subreg, and the range does not have the sign bit
21658 set, then do a sign extend.
21660 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
21661 test, check for sign extended subreg and/or constant operands, and
21662 do a sign extend in that case.
21664 2018-05-17 Steve Ellcey <sellcey@cavium.com>
21666 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
21667 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
21669 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
21670 Change logics_shift_reg to logics_shift_imm.
21671 (thunderx2t99_fp_loadpair_basic): Delete.
21672 (thunderx2t99_fp_storepair_basic): Delete.
21673 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
21674 (thunderx2t99_asimd_polynomial): Delete.
21675 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
21676 and neon_fp_mul_d_scalar_q.
21677 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
21678 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
21679 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
21680 (thunderx2t99_asimd_lut): Add missing tbl types.
21681 (thunderx2t99_asimd_ext): Delete.
21682 (thunderx2t99_asimd_load1_1_mult): Delete.
21683 (thunderx2t99_asimd_load1_2_mult): Delete.
21684 (thunderx2t99_asimd_load1_ldp): New.
21685 (thunderx2t99_asimd_load1): New.
21686 (thunderx2t99_asimd_load2): Add missing *load2* types.
21687 (thunderx2t99_asimd_load3): New.
21688 (thunderx2t99_asimd_load4): New.
21689 (thunderx2t99_asimd_store1_1_mult): Delete.
21690 (thunderx2t99_asimd_store1_2_mult): Delete.
21691 (thunderx2t99_asimd_store2_mult): Delete.
21692 (thunderx2t99_asimd_store2_onelane): Delete.
21693 (thunderx2t99_asimd_store_stp): New.
21694 (thunderx2t99_asimd_store1): New.
21695 (thunderx2t99_asimd_store2): New.
21696 (thunderx2t99_asimd_store3): New.
21697 (thunderx2t99_asimd_store4): New.
21699 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
21701 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
21702 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
21704 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
21705 Segher Boessenkool <segher@kernel.crashing.org>
21708 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
21711 2018-05-17 Richard Biener <rguenther@suse.de>
21713 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
21714 for pruning loop and prune defs feeding only already visited PHIs.
21716 2018-05-17 Richard Biener <rguenther@suse.de>
21718 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
21720 2018-05-17 Bin Cheng <bin.cheng@arm.com>
21721 Richard Biener <rguenther@suse.de>
21723 PR tree-optimization/85793
21724 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
21725 for VMAT_ELEMENTWISE.
21727 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
21729 * internal-fn.h (lookup_internal_fn): Declare
21730 * internal-fn.c (lookup_internal_fn): New function.
21731 * gimple.c (gimple_build_call_from_tree): Handle calls to
21732 internal functions.
21733 * gimple-pretty-print.c (dump_gimple_call): Print "." before
21734 internal function names.
21735 * tree-pretty-print.c (dump_generic_node): Likewise.
21736 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
21738 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
21740 * gimple-fold.h (gimple_build): Make the function forms take
21741 combined_fn rather than built_in_function.
21742 (gimple_simplify): Likewise.
21743 * gimple-match-head.c (gimple_simplify): Likewise.
21744 * gimple-fold.c (gimple_build): Likewise.
21745 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
21746 rather than gimple_build_call_internal.
21747 (get_initial_defs_for_reduction): Likewise.
21748 (vect_create_epilog_for_reduction): Likewise.
21749 (vectorizable_live_operation): Likewise.
21751 2018-05-17 Martin Liska <mliska@suse.cz>
21753 * gimple-ssa-sprintf.c (format_directive): Do not use
21754 space in between 'G_' and '('.
21756 2018-05-17 Jakub Jelinek <jakub@redhat.com>
21759 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
21760 even if the mask is not all ones.
21763 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
21765 (ix86_gimple_fold_builtin): Likewise.
21768 * config/i386/i386.c: Include tree-vector-builder.h.
21769 (ix86_vector_shift_count): New function.
21770 (ix86_fold_builtin): Fold shift builtins by scalar count.
21771 (ix86_gimple_fold_builtin): Likewise.
21773 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
21774 _mm512_setzero): New intrinsics.
21776 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
21777 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21779 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
21780 code generation for cases where splatting a value is not useful.
21781 * simplify-rtx.c (simplify_ternary_operation): Simplify
21782 vec_merge across a vec_duplicate and a paradoxical subreg forming
21783 a vector mode to a vec_concat.
21785 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
21787 * config.gcc: Support "goldmont-plus".
21788 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21790 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21791 PROCESSOR_GOLDMONT_PLUS.
21792 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
21793 (processor_target_table): Add "goldmont-plus".
21794 (PTA_GOLDMONT_PLUS): Define.
21795 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
21796 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
21797 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
21798 (fold_builtin_cpu): Add "goldmont-plus".
21799 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
21800 (ix86_option_override_internal): Add "goldmont-plus".
21801 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
21802 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
21803 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
21804 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
21806 2018-05-17 Richard Biener <rguenther@suse.de>
21808 PR tree-optimization/85757
21809 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
21810 remove defs that only feed that PHI from further processing.
21812 2018-05-16 Jim Wilson <jimw@sifive.com>
21814 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
21816 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
21818 2018-05-16 Mark Wielaard <mark@klomp.org>
21820 * dwarf2out.c (count_index_strings): New function.
21821 (output_indirect_strings): Call count_index_strings and generate
21822 header for dwarf_version >= 5.
21824 2018-05-16 Mark Wielaard <mark@klomp.org>
21826 * dwarf2out.c (dwarf_FORM): New function.
21827 (set_indirect_string): Use dwarf_FORM.
21828 (reset_indirect_string): Likewise.
21829 (size_of_die): Likewise.
21830 (value_format): Likewise.
21831 (output_die): Likewise.
21832 (add_skeleton_AT_string): Likewise.
21833 (output_macinfo_op): Likewise.
21834 (index_string): Likewise.
21835 (output_index_string_offset): Likewise.
21836 (output_index_string): Likewise.
21837 (count_index_strings): Likewise.
21839 2018-05-16 Carl Love <cel@us.ibm.com>
21841 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21842 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
21844 2018-05-16 Martin Jambor <mjambor@suse.cz>
21846 * ipa-prop.c (ipa_free_all_edge_args): Remove.
21847 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
21849 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
21851 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
21852 (fnma<mode>4): Likewise.
21853 (fms<mode>4): Likewise.
21854 (fnms<mode>4): Likewise.
21855 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
21856 (aarch64_fnma<mode>4): Likewise.
21857 (aarch64_fms<mode>4): Likewise.
21858 (aarch64_fnms<mode>4): Likewise.
21859 (aarch64_fnmadd<mode>4): Likewise.
21861 2018-05-16 Jason Merrill <jason@redhat.com>
21863 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
21865 2018-05-16 Richard Biener <rguenther@suse.de>
21867 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
21868 (dump_stmt_cost): Declare.
21869 (add_stmt_cost): Dump cost we add.
21870 (add_stmt_costs): New function.
21871 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
21872 No longer exported.
21873 (vect_analyze_stmt): Adjust prototype.
21874 (vectorizable_condition): Likewise.
21875 (vectorizable_live_operation): Likewise.
21876 (vectorizable_reduction): Likewise.
21877 (vectorizable_induction): Likewise.
21878 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
21879 cost vector to pass to vectorizable_ and record afterwards.
21880 (vect_model_reduction_cost): Take cost vector argument and adjust.
21881 (vect_model_induction_cost): Likewise.
21882 (vectorizable_reduction): Likewise.
21883 (vectorizable_induction): Likewise.
21884 (vectorizable_live_operation): Likewise.
21885 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
21886 SLP_TREE_NUMBER_OF_VEC_STMTS.
21887 (vect_analyze_slp_cost_1): Remove.
21888 (vect_analyze_slp_cost): Likewise.
21889 (vect_slp_analyze_node_operations): Take visited args and
21890 a target cost vector. Avoid processing already visited stmt sets.
21891 (vect_slp_analyze_operations): Use a local cost vector to gather
21892 costs and register those of non-discarded instances.
21893 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
21894 (vect_schedule_slp_instance): Remove copying of
21895 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
21897 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
21898 adding cost. Record cost entry location.
21899 (vect_prologue_cost_for_slp_op): Function to compute cost of
21900 a constant or invariant generated for SLP vect in the prologue,
21901 split out from vect_analyze_slp_cost_1.
21902 (vect_model_simple_cost): Make static. Adjust for SLP costing.
21903 (vect_model_promotion_demotion_cost): Likewise.
21904 (vect_model_store_cost): Likewise, make static.
21905 (vect_model_load_cost): Likewise.
21906 (vectorizable_bswap): Add cost vector arg and adjust.
21907 (vectorizable_call): Likewise.
21908 (vectorizable_simd_clone_call): Likewise.
21909 (vectorizable_conversion): Likewise.
21910 (vectorizable_assignment): Likewise.
21911 (vectorizable_shift): Likewise.
21912 (vectorizable_operation): Likewise.
21913 (vectorizable_store): Likewise.
21914 (vectorizable_load): Likewise.
21915 (vectorizable_condition): Likewise.
21916 (vectorizable_comparison): Likewise.
21917 (can_vectorize_live_stmts): Likewise.
21918 (vect_analyze_stmt): Likewise.
21919 (vect_transform_stmt): Adjust calls to vectorizable_*.
21920 * tree-vectorizer.c: Include gimple-pretty-print.h.
21921 (dump_stmt_cost): New function.
21923 2018-05-16 Richard Biener <rguenther@suse.de>
21925 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
21926 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
21927 * tree-ssa-dse.c: Include tree-ssa-loop.h.
21928 (check_name): New callback.
21929 (dse_classify_store): Track cycles via a visited bitmap of PHI
21930 defs and simplify handling of in-loop and across loop dead stores
21931 and properly fail for loop-variant refs. Handle byte-tracking with
21932 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
21935 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
21937 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
21938 (vect_get_mask_type_for_stmt): Likewise.
21939 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
21941 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
21942 to determine the statement's vector type and the vector type that
21943 should be used for calculating nunits. Deal with cases in which
21944 the type has to be deferred.
21945 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
21946 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
21947 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
21948 (vect_determine_vf_for_stmt): New functions, split out from...
21949 (vect_determine_vectorization_factor): ...here.
21950 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
21951 (vect_get_mask_type_for_stmt): New functions, split out from
21952 vect_determine_vectorization_factor.
21954 2018-05-16 Richard Biener <rguenther@suse.de>
21956 * tree-cfg.c (verify_gimple_assign_ternary): Properly
21957 verify the [VEC_]COND_EXPR embedded comparison.
21959 2018-05-15 Martin Sebor <msebor@redhat.com>
21961 PR tree-optimization/85753
21962 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
21963 RECORD_TYPE in addition to ARRAY_TYPE.
21965 2018-05-15 Martin Sebor <msebor@redhat.com>
21967 PR middle-end/85643
21968 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
21970 2018-05-15 Richard Biener <rguenther@suse.de>
21972 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
21973 add by_clobber_p one. Change algorithm to collect all defs
21974 representing uses we need to walk and try reducing them to
21975 a single one before failing.
21976 (dse_dom_walker::dse_optimize_stmt): Adjust.
21978 2018-05-13 Mark Wielaard <mark@klomp.org>
21980 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
21981 (size_of_loc_descr): Likewise.
21982 (output_loc_operands): Likewise.
21983 (output_loc_operands_raw): Likewise.
21984 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
21985 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
21986 (hash_loc_operands): Likewise.
21987 (compare_loc_operands): Likewise.
21989 2018-05-14 Mark Wielaard <mark@klomp.org>
21991 * dwarf2out.c (count_index_addrs): New function.
21992 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
21994 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21996 PR tree-optimization/83648
21997 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
21998 return value as malloc candidate.
22000 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22003 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
22004 param as true in call to suggest_attribute.
22006 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
22008 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
22009 -mreadonly-in-sdata.
22011 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22013 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
22015 (aarch64_crypto_aesd_fused): Likewise.
22017 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
22019 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
22020 (movsi_aarch64): Likewise.
22021 (load_pairsi): Likewise.
22022 (load_pairdi): Likewise.
22023 (store_pairsi): Likewise.
22024 (store_pairdi): Likewise.
22025 (load_pairsf): Likewise.
22026 (load_pairdf): Likewise.
22027 (store_pairsf): Likewise.
22028 (store_pairdf): Likewise.
22029 (zero_extend): Likewise.
22030 (trunc): Swap alternatives.
22031 (fcvt_target): Add '?' to prefer w over r.
22033 2018-05-14 Jakub Jelinek <jakub@redhat.com>
22036 * config/i386/i386.md: Disallow non-commutative arithmetics in
22037 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
22038 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
22039 in the peephole2 before it.
22041 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
22043 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
22044 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
22045 (ix86_handle_option): Handle -mcldemote.
22046 * config.gcc: New header.
22047 * config/i386/cldemoteintrin.h: New file.
22048 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
22049 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
22051 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22052 OPTION_MASK_ISA_CLDEMOTE.
22053 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
22054 (ix86_valid_target_attribute_inner_p): Ditto.
22055 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
22056 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
22057 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
22058 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
22059 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
22061 * config/i386/i386.opt: Add -mcldemote.
22062 * config/i386/x86intrin.h: New header.
22063 * doc/invoke.texi: Add -mcldemote.
22065 2018-05-14 Richard Biener <rguenther@suse.de>
22067 * doc/match-and-simplify.texi: Adjust :s documentation.
22069 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
22071 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
22072 intended memcpy size.
22073 (REORDER_45): Likewise.
22075 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
22077 * sort.cc: New file.
22078 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
22079 * vec.c (qsort_chk): Use gcc_qsort.
22080 * Makefile.in (OBJS-libcommon): Add sort.o.
22081 (build/sort.o): New target. Use it...
22082 (BUILD_RTL): ... here, and...
22083 (build/gencfn-macros): ... here, and...
22084 (build/genmatch): ... here.
22086 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
22087 Chung-Ju Wu <jasonwucj@gmail.com>
22089 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
22090 * config/nds32/nds32-graywolf.md: New file.
22091 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
22092 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
22094 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
22095 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
22096 * config/nds32/nds32.md (pipeline_model): Add graywolf.
22097 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
22098 * config/nds32/pipelines.md: Include n15 settings.
22100 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
22101 Chung-Ju Wu <jasonwucj@gmail.com>
22103 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
22104 * config/nds32/nds32-n13.md: New file.
22105 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
22106 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
22108 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
22109 * config/nds32/nds32.md (pipeline_model): Add n13.
22110 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
22111 * config/nds32/pipelines.md: Include n13 settings.
22113 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
22114 Chung-Ju Wu <jasonwucj@gmail.com>
22116 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
22117 * config/nds32/nds32-n10.md: New file.
22118 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
22119 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
22121 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
22122 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
22123 * config/nds32/nds32.md (pipeline_model): Add n10.
22124 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
22125 * config/nds32/pipelines.md: Include n10 settings.
22127 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
22128 Kito Cheng <kito.cheng@gmail.com>
22129 Chung-Ju Wu <jasonwucj@gmail.com>
22131 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
22132 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22133 Add enum values for DSP extension instructions.
22134 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
22136 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
22137 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
22138 New code iterators.
22139 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
22140 * config/nds32/nds32-dspext.md: New file for DSP implementation.
22141 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
22142 * config/nds32/nds32-intrinsic.md: Likewise.
22143 * config/nds32/nds32_intrinsic.h: Likewise.
22144 * config/nds32/nds32-md-auxiliary.c: Likewise.
22145 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
22146 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
22147 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
22148 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
22149 * config/nds32/nds32-protos.h: New declarations for DSP extension.
22150 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
22151 TYPE_DMAC in switch statement.
22152 * config/nds32/nds32.c: New checking and implementation for DSP
22153 extension instructions.
22154 * config/nds32/nds32.h: Likewise.
22155 * config/nds32/nds32.md: Likewise.
22156 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
22157 * config/nds32/predicates.md: Implement new predicates for DSP
22160 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22162 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
22163 Reformat alternatives and attributes so it is easier to identify
22164 which constraints/attributes go with which instruction.
22165 (mov<mode>_hardfloat32, FMOVE64): Likewise.
22166 (mov<mode>_softfloat32, FMOVE64): Likewise.
22167 (mov<mode>_hardfloat64, FMOVE64): Likewise.
22168 (mov<mode>_softfloat64, FMOVE64): Likewise.
22170 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
22172 * doc/extend.texi (PowerPC Built-in Functions): Rename this
22174 (Basic PowerPC Built-in Functions): The new name of the
22175 subsection previously known as "PowerPC Built-in Functions".
22176 (Basic PowerPC Built-in Functions Available on all Configurations):
22178 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
22179 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
22180 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
22181 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
22183 2018-05-11 Martin Jambor <mjambor@suse.cz>
22186 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
22189 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
22192 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
22194 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
22196 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
22197 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
22198 (ix86_handle_option): Handle -mwaitpkg.
22199 * config.gcc: New header.
22200 * config/i386/cpuid.h (bit_WAITPKG): New bit.
22201 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
22202 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
22204 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22205 OPTION_MASK_ISA_WAITPKG.
22206 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
22207 (ix86_option_override_internal): Add PTA_WAITPKG.
22208 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
22209 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
22210 IX86_BUILTIN_TPAUSE.
22211 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
22212 __builtin_ia32_umwait and __builtin_ia32_tpause.
22213 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
22214 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
22215 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
22216 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
22217 UNSPECV_TPAUSE): New.
22218 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
22219 * config/i386/i386.opt: Add -mwaitpkg.
22220 * config/i386/waitpkgintrin.h: New file.
22221 * config/i386/x86intrin.h: New header.
22222 * doc/invoke.texi: Add -mwaitpkg.
22224 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
22227 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
22229 (cortex-m0): Use armv6s-m isa.
22230 (cortex-m0plus): Likewise.
22231 (cortex-m1): Likewise.
22232 (cortex-m0.small-multiply): Likewise.
22233 (cortex-m0plus.small-multiply): Likewise.
22234 (cortex-m1.small-multiply): Likewise.
22236 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
22237 Jakub Jelinek <jakub@redhat.com>
22239 PR tree-optimization/85692
22240 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
22241 source permute as well.
22243 2018-05-11 Martin Liska <mliska@suse.cz>
22246 * doc/extend.texi: Document LLVM style format for no_sanitize
22249 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22251 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
22252 mode_supports_vsx_dform_quad to mode_supports_dq_form.
22253 (mode_supports_vsx_dform_quad): Likewise.
22254 (mode_supports_vmx_dform): Move these functions to be next to the
22255 other mode_supports functions.
22256 (mode_supports_dq_form): Likewise.
22257 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
22258 mode_supports_dq_form.
22259 (reg_offset_addressing_ok_p): Likewise.
22260 (offsettable_ok_by_alignment): Likewise.
22261 (rs6000_legitimate_offset_address_p): Likewise.
22262 (legitimate_lo_sum_address_p): Likewise.
22263 (rs6000_legitimize_address): Likewise.
22264 (rs6000_legitimize_reload_address): Likewise.
22265 (rs6000_secondary_reload_inner): Likewise.
22266 (rs6000_preferred_reload_class): Likewise.
22267 (rs6000_output_move_128bit): Likewise.
22269 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
22271 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
22272 Generate SImode target register for null target.
22273 <case IX86_BUILTIN_XGETBV>: Ditto.
22274 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
22275 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
22277 2018-05-10 Carl Love <cel@us.ibm.com>
22279 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
22280 dcbtt and dcbtstt if operands[2] is 0.
22282 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
22285 * config/i386/sse.md (usadv64qi): New expander.
22287 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
22289 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
22290 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
22291 -maltivec=be support.
22292 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
22293 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
22294 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
22295 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
22296 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
22297 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
22298 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
22299 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
22300 altivec_vsumsws): Adjust.
22301 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
22302 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
22303 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
22305 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
22306 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
22307 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
22308 (altivec_lve<VI_char>x): Delete expand.
22309 (*altivec_lve<VI_char>x_internal): Rename to...
22310 (altivec_lve<VI_char>x): ... this.
22311 (altivec_lvxl_<mode>): Delete expand.
22312 (*altivec_lvxl_<mode>_internal): Rename to ...
22313 (altivec_lvxl_<mode>): ... this.
22314 (altivec_stvxl_<mode>): Delete expand.
22315 (*altivec_stvxl_<mode>_internal): Rename to ...
22316 (altivec_stvxl_<mode>): ... this.
22317 (altivec_stve<VI_char>x): Delete expand.
22318 (*altivec_stve<VI_char>x_internal): Rename to ...
22319 (altivec_stve<VI_char>x): ... this.
22320 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
22321 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
22322 reduc_plus_scal_<mode>): Adjust.
22323 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
22325 (rs6000_cpu_cpp_builtins): Adjust.
22326 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
22327 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
22328 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
22329 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
22330 -maltivec=be support.
22331 (rs6000_split_vec_extract_var): Adjust.
22332 (rs6000_split_v4si_init): Adjust.
22333 (swap_selector_for_mode): Delete.
22334 (altivec_expand_lvx_be, altivec_expand_stvx_be,
22335 altivec_expand_stvex_be): Delete.
22336 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
22337 -maltivec=be support.
22338 (rs6000_gimple_fold_builtin): Ditto.
22339 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
22341 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
22342 (TARGET_DIRECT_MOVE_64BIT): Adjust.
22343 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
22344 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
22345 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
22346 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
22347 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
22348 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
22349 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
22350 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
22351 anonymous split): Adjust.
22352 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
22353 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
22355 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
22357 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
22358 when --with-gxx-include-dir is also specified.
22359 * configure: Regenerate.
22361 2018-05-09 Jim Wilson <jimw@sifive.com>
22364 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
22365 * config/riscv/t-withmultilib: New.
22366 * config/riscv/withmultilib.h: New.
22367 * doc/install.texi: Document RISC-V --with-multilib-list support.
22369 2018-05-09 Richard Biener <rguenther@suse.de>
22371 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
22373 (vect_bb_vectorization_profitable_p): Adjust. Compute
22374 actual scalar cost using the cost vector and the add_stmt_cost
22377 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
22379 PR rtl-optimization/85645
22380 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
22381 in the REG_CFA_REGISTER note for LR, don't leave it empty.
22383 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
22385 PR rtl-optimization/85645
22386 * shrink-wrap.c (spread_components): Return a boolean saying if
22387 anything was changed.
22388 (try_shrink_wrapping_separate): Iterate spread_components until
22389 nothing changes anymore.
22391 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
22393 PR rtl-optimization/85645
22394 * regrename.c (build_def_use): Also kill the chains that include the
22395 destination of a REG_CFA_REGISTER note.
22397 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
22399 PR rtl-optimization/85645
22400 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
22401 insn that has a REG_CFA_REGISTER note.
22403 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
22405 * cfgexpand.c (expand_clobber): New function.
22406 (expand_gimple_stmt_1): Use it.
22407 * tree-vect-stmts.c (vect_clobber_variable): New function,
22409 (vectorizable_simd_clone_call): ...here.
22410 (vectorizable_store): Emit a clobber either side of an
22411 IFN_STORE_LANES sequence.
22412 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
22414 2018-05-09 Tom de Vries <tom@codesourcery.com>
22417 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
22418 (define_insn "trap_if_false"): Add exit after trap.
22420 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
22422 PR rtl-optimization/85638
22423 * bb-reorder.c: Include common/common-target.h.
22424 (create_forwarder_block): New function extracted from...
22425 (fix_up_crossing_landing_pad): ...here. Rename into...
22426 (dw2_fix_up_crossing_landing_pad): ...this.
22427 (sjlj_fix_up_crossing_landing_pad): New function.
22428 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
22429 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
22430 from both partitions and exit the loop after one iteration.
22432 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
22435 * doc/extend.texi (PowerPC Built-in Functions): Rename this
22437 (Basic PowerPC Built-in Functions): The new name of the
22438 subsection previously known as "PowerPC Built-in Functions".
22439 (Basic PowerPC Built-in Functions Available on all Configurations):
22441 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22443 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22445 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22447 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22450 2018-05-08 Jim Wilson <jimw@sifive.com>
22452 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
22453 (LD_EMUL_SUFFIX): New.
22454 (LINK_SPEC): Use it.
22456 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
22458 * doc/extend.texi (PowerPC Built-in Functions): Rename this
22460 (Basic PowerPC Built-in Functions): The new name of the
22461 subsection previously known as "PowerPC Built-in Functions".
22462 (Basic PowerPC Built-in Functions Available on all Configurations):
22464 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22466 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22468 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22470 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22473 2018-05-08 Jakub Jelinek <jakub@redhat.com>
22476 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
22477 after cmpelim optimization.
22479 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
22481 * config.gcc: Support "goldmont".
22482 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
22483 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22484 PROCESSOR_GOLDMONT.
22485 * config/i386/i386.c (m_GOLDMONT): Define.
22486 (processor_target_table): Add "goldmont".
22487 (PTA_GOLDMONT): Define.
22488 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
22489 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
22490 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
22491 (fold_builtin_cpu): Add "goldmont".
22492 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
22493 (ix86_option_override_internal): Add "goldmont".
22494 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
22495 (processor_type): Add PROCESSOR_GOLDMONT.
22496 * config/i386/i386.md: Add CPU "glm".
22497 * config/i386/glm.md: New file.
22498 * config/i386/x86-tune.def: Add m_GOLDMONT.
22499 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
22501 2018-05-08 Jakub Jelinek <jakub@redhat.com>
22504 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
22506 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
22507 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
22508 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
22511 * config/i386/i386.c (ix86_fold_builtin): Handle
22512 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
22515 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
22516 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
22518 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
22521 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
22522 (check_arch): Likewise.
22523 (check_fpu): Return the result rather than printing it.
22524 (end arch): Fix operator precedence.
22525 (end cpu): Likewise.
22526 (END): Print the result from check_fpu.
22528 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
22529 Alan Hayward <alan.hayward@arm.com>
22530 David Sherwood <david.sherwood@arm.com>
22532 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
22533 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
22534 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
22535 (*fcmuo<mode>_and): New patterns.
22537 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
22539 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
22540 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
22541 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
22542 (cmp_op, sve_imm_con): New code attributes.
22543 (SVE_COND_INT_CMP, imm_con): Delete.
22544 (cmp_op): Remove above unspecs from int attribute.
22545 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
22547 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
22548 comparison-specific unspecs.
22549 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
22550 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
22551 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
22552 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
22553 (*vec_fcm<cmp_op><mode>): Rename to...
22554 (*fcm<cmp_op><mode>): ...this and adjust likewise.
22555 (*vec_fcmuo<mode>): Rename to...
22556 (*fcmuo<mode>): ...this and adjust likewise.
22557 (*pred_fcm<cmp_op><mode>): New pattern.
22558 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
22559 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
22561 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
22563 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
22564 (aarch64_emit_sve_predicated_cond): New function.
22565 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
22566 (aarch64_emit_unspec_cond_or): Replace with...
22567 (aarch64_emit_sve_or_conds): ...this new function. Use
22568 aarch64_emit_sve_ptrue_op for the individual comparisons and
22569 aarch64_emit_binop to OR them together.
22570 (aarch64_emit_inverted_unspec_cond): Replace with...
22571 (aarch64_emit_sve_inverted_cond): ...this new function. Use
22572 aarch64_emit_sve_ptrue_op for the comparison and
22573 aarch64_emit_unop to invert the result.
22574 (aarch64_expand_sve_vec_cmp_float): Update after the above
22575 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
22577 2018-05-07 Nathan Sidwell <nathan@acm.org>
22579 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
22580 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
22581 (Backwards Compatibility): Likewise.
22583 2018-05-07 Luis Machado <luis.machado@linaro.org>
22587 2018-05-07 Luis Machado <luis.machado@linaro.org>
22589 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22590 <prefetch_dynamic_strides>: New const bool field.
22591 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22592 prefetch_dynamic_strides.
22593 (exynosm1_prefetch_tune): Likewise.
22594 (thunderxt88_prefetch_tune): Likewise.
22595 (thunderx_prefetch_tune): Likewise.
22596 (thunderx2t99_prefetch_tune): Likewise.
22597 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22599 (aarch64_override_options_internal): Update to set
22600 PARAM_PREFETCH_DYNAMIC_STRIDES.
22601 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22602 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22603 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22604 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22605 prefetch-dynamic-strides setting.
22607 2018-05-07 Luis Machado <luis.machado@linaro.org>
22609 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22610 <minimum_stride>: New const int field.
22611 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22612 minimum_stride field.
22613 (exynosm1_prefetch_tune): Likewise.
22614 (thunderxt88_prefetch_tune): Likewise.
22615 (thunderx_prefetch_tune): Likewise.
22616 (thunderx2t99_prefetch_tune): Likewise.
22617 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
22618 (aarch64_override_options_internal): Update to set
22619 PARAM_PREFETCH_MINIMUM_STRIDE.
22620 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22621 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22622 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22623 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22624 stride is constant and is below the minimum stride threshold.
22626 2018-05-07 Luis Machado <luis.machado@linaro.org>
22628 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
22631 2018-05-07 Luis Machado <luis.machado@linaro.org>
22633 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22634 <prefetch_dynamic_strides>: New const bool field.
22635 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22636 prefetch_dynamic_strides.
22637 (exynosm1_prefetch_tune): Likewise.
22638 (thunderxt88_prefetch_tune): Likewise.
22639 (thunderx_prefetch_tune): Likewise.
22640 (thunderx2t99_prefetch_tune): Likewise.
22641 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22643 (aarch64_override_options_internal): Update to set
22644 PARAM_PREFETCH_DYNAMIC_STRIDES.
22645 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22646 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22647 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22648 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22649 prefetch-dynamic-strides setting.
22651 2018-05-07 Luis Machado <luis.machado@linaro.org>
22653 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22654 <minimum_stride>: New const int field.
22655 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22656 minimum_stride field.
22657 (exynosm1_prefetch_tune): Likewise.
22658 (thunderxt88_prefetch_tune): Likewise.
22659 (thunderx_prefetch_tune): Likewise.
22660 (thunderx2t99_prefetch_tune): Likewise.
22661 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
22662 (aarch64_override_options_internal): Update to set
22663 PARAM_PREFETCH_MINIMUM_STRIDE.
22664 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22665 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22666 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22667 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22668 stride is constant and is below the minimum stride threshold.
22670 2018-05-06 Jakub Jelinek <jakub@redhat.com>
22673 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
22674 the type is addressable. Don't force op into register if it has
22677 2018-05-05 Roland McGrath <mcgrathr@google.com>
22680 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
22681 any section for which we don't know a specific type it should have,
22682 regardless of name. Previously this was done only for the exact
22683 names ".init_array", ".fini_array", and ".preinit_array".
22684 (default_elf_asm_named_section): Add comment about
22685 relationship with default_section_type_flags and SECTION_NOTYPE.
22686 (get_section): Don't consider it a type conflict if one side has
22687 SECTION_NOTYPE and the other doesn't, as long as neither has the
22688 SECTION_BSS et al used in the default_section_type_flags logic.
22690 2018-05-05 Tom de Vries <tom@codesourcery.com>
22693 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
22694 (workaround_barsyncs): New function.
22695 (nvptx_reorg): Use workaround_barsyncs.
22696 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22697 (define_expand "nvptx_membar_cta"): New define_expand.
22698 (define_insn "*nvptx_membar_cta"): New insn.
22700 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
22702 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
22703 To improve optimization opportunities.
22704 * builtin-types.def: The new needed builtin types for the above.
22706 2018-05-04 Richard Biener <rguenther@suse.de>
22708 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
22709 * gimple-ssa-store-merging.c
22710 (imm_store_chain_info::output_merged_store): Remove redundant create,
22711 release split_store vector contents on failure.
22712 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
22713 scalar stmt vector on cache hit.
22715 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
22717 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
22719 * config.gcc (powerpc-xilinx-eabi*): Remove.
22720 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
22722 (fusion_addis_mem_combo_load): Ditto.
22723 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
22725 (rs6000_cpu_cpp_builtins): Ditto.
22726 * config/rs6000/rs6000-linux.c
22727 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
22728 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
22729 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
22731 (rs6000_setup_reg_addr_masks): Ditto.
22732 (rs6000_init_hard_regno_mode_ok): Ditto.
22733 (rs6000_option_override_internal): Ditto.
22734 (legitimate_lo_sum_address_p): Ditto.
22735 (rs6000_legitimize_address): Ditto.
22736 (rs6000_legitimize_reload_address): Ditto.
22737 (rs6000_legitimate_address_p): Ditto.
22738 (abi_v4_pass_in_fpr): Ditto.
22739 (setup_incoming_varargs): Ditto.
22740 (rs6000_gimplify_va_arg): Ditto.
22741 (rs6000_split_multireg_move): Ditto.
22742 (rs6000_savres_strategy): Ditto.
22743 (rs6000_emit_prologue_components): Ditto.
22744 (rs6000_emit_epilogue_components): Ditto.
22745 (rs6000_emit_prologue): Ditto.
22746 (rs6000_emit_epilogue): Ditto.
22747 (rs6000_elf_file_end): Ditto.
22748 (rs6000_function_value): Ditto.
22749 (rs6000_libcall_value): Ditto.
22750 * config/rs6000/rs6000.h: Ditto.
22751 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
22752 (TARGET_MINMAX): ... this. New.
22753 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
22754 * config/rs6000/rs6000.md: Remove Xilinx FP support.
22755 (*movsi_internal1_single): Delete.
22756 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
22757 mfpu=, mxilinx-fpu): Delete.
22758 * config/rs6000/singlefp.h: Delete.
22759 * config/rs6000/sysv4.h: Remove Xilinx FP support.
22760 * config/rs6000/t-rs6000: Ditto.
22761 * config/rs6000/t-xilinx: Delete.
22762 * config/rs6000/titan.md: Adjust for fp_type removal.
22763 * config/rs6000/vsx.md: Remove Xilinx FP support.
22764 (VStype_simple): Delete.
22765 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
22766 * config/rs6000/xfpu.h: Delete.
22767 * config/rs6000/xfpu.md: Delete.
22768 * config/rs6000/xilinx.h: Delete.
22769 * config/rs6000/xilinx.opt: Delete.
22770 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
22771 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
22773 2018-05-04 Tom de Vries <tom@codesourcery.com>
22776 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
22779 2018-05-04 Richard Biener <rguenther@suse.de>
22781 PR middle-end/85627
22782 * tree-complex.c (update_complex_assignment): We are always in SSA form.
22783 (expand_complex_div_wide): Likewise.
22784 (expand_complex_operations_1): Likewise.
22785 (expand_complex_libcall): Preserve EH info of the original stmt.
22786 (tree_lower_complex): Handle removed blocks.
22787 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
22788 on complex multiplication and division libcall builtins.
22790 2018-05-04 Richard Biener <rguenther@suse.de>
22792 PR middle-end/85574
22793 * fold-const.c (negate_expr_p): Restrict negation of operand
22794 zero of a division to when we know that can happen without
22796 (fold_negate_expr_1): Likewise.
22798 2018-05-04 Jakub Jelinek <jakub@redhat.com>
22801 * real.h (real_nextafter): Declare.
22802 * real.c (real_nextafter): New function.
22803 * fold-const-call.c (fold_const_nextafter): New function.
22804 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
22805 CASE_CFN_NEXTTOWARD.
22806 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
22807 even when arg1_mode is different from arg0_mode.
22809 2018-05-03 Nathan Sidwell <nathan@acm.org>
22811 * doc/extend.texi (Deprecated Features): Remove
22812 -ffriend-injection.
22813 (Backwards Compatibility): Likewise.
22814 * doc/invoke.texi (C++ Language Options): Likewise.
22815 (C++ Dialect Options): Likewise.
22817 2018-05-03 Jakub Jelinek <jakub@redhat.com>
22820 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
22821 _mm512_mask_mullox_epi64): New intrinsics.
22823 2018-05-03 Tom de Vries <tom@codesourcery.com>
22826 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22827 dump files): Add offload-tree.
22829 2018-05-03 Richard Biener <rguenther@suse.de>
22831 PR tree-optimization/85615
22832 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
22833 to loops not nested in BBs loop father to avoid creating multi-entry
22836 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22838 PR tree-optimization/70291
22839 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
22840 arguments. Change return type to tree. Emit libcall as a new
22841 statement rather than replacing existing one when inplace_p is true.
22842 (expand_complex_multiplication_components): New function.
22843 (expand_complex_multiplication): Expand floating-point complex
22844 multiplication using the above.
22845 (expand_complex_division): Rename inner_type parameter to type.
22846 Update expand_complex_libcall call-site.
22847 (expand_complex_operations_1): Update expand_complex_multiplication
22848 and expand_complex_division call-sites.
22850 2018-05-02 Jakub Jelinek <jakub@redhat.com>
22853 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22854 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22855 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
22856 the highest significant bit of the shift count mask is clear. In
22857 check whether and[sq]i3 is needed verify that all significant bits
22858 of the shift count other than the highest are set.
22860 2018-05-02 Tom de Vries <tom@codesourcery.com>
22863 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
22864 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
22865 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
22866 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
22867 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
22868 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
22869 __builtin_goacc_parlevel_size.
22871 2018-05-02 Richard Biener <rguenther@suse.de>
22873 PR tree-optimization/85597
22874 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
22875 do not use split vect_get_vec_defs call but call vect_get_slp_defs
22878 2018-05-02 Tom de Vries <tom@codesourcery.com>
22881 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22882 dump files): Add ltrans-tree.
22884 2018-05-02 Tom de Vries <tom@codesourcery.com>
22887 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22888 dump files): Add wpa-ipa.
22890 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
22892 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
22893 powerpc*-*-linux*paired* target.
22894 * config/rs6000/750cl.h: Delete.
22895 * config/rs6000/paired.h: Delete.
22896 * config/rs6000/paired.md: Delete.
22897 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
22899 * config/rs6000/rs6000-builtin.def: Remove paired float support.
22900 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
22901 comment. Remove paired float support.
22902 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
22903 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
22905 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
22906 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
22908 * config/rs6000/rs6000.c: Remove paired float support.
22909 (paired_expand_vector_init, paired_expand_vector_move,
22910 paired_emit_vector_compare, paired_emit_vector_cond_expr,
22911 (paired_expand_lv_builtin, paired_expand_stv_builtin,
22912 paired_expand_builtin, paired_expand_predicate_builtin,
22913 paired_init_builtins): Delete.
22914 * config/rs6000/rs6000.h: Remove paired float support.
22915 * config/rs6000/rs6000.md: Remove paired float support.
22916 (move_from_CR_ov_bit): Delete.
22917 * config/rs6000/rs6000.opt (mpaired): Delete.
22918 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
22919 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
22921 2018-05-02 Richard Biener <rguenther@suse.de>
22923 PR middle-end/85567
22924 * gimplify.c (gimplify_save_expr): When in SSA form allow
22925 SAVE_EXPRs to compute to SSA vars.
22927 2018-05-02 Jakub Jelinek <jakub@redhat.com>
22930 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22931 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22932 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
22933 clobber operands[2], instead use a new pseudo. Formatting fixes.
22935 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
22937 PR tree-optimization/85586
22938 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
22939 exit early for statements in the same group if the accesses are
22942 2018-05-02 Tom de Vries <tom@codesourcery.com>
22945 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
22948 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
22950 PR tree-optimization/85143
22951 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
22953 2018-05-01 Tom de Vries <tom@codesourcery.com>
22956 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
22957 not found" error message.
22959 2018-05-01 Tom de Vries <tom@codesourcery.com>
22962 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
22963 * vec.c (test_ordered_remove_if): New function.
22964 (vec_c_tests): Call test_ordered_remove_if.
22965 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
22966 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
22967 * tree-vect-patterns.c (vect_pattern_recog_1): Use
22968 VEC_ORDERED_REMOVE_IF.
22970 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22972 PR tree-optimization/82665
22973 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
22974 pointer subtraction where arguments come from a memchr call.
22976 2018-05-01 Jakub Jelinek <jakub@redhat.com>
22978 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
22979 --push-state --as-needed and --pop-state instead of --as-needed and
22980 --no-as-needed if ld supports it.
22981 * configure: Regenerated.
22984 * doc/install.texi2html: Replace _002d with - and _002a with * in
22985 generated html files using sed.
22987 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22990 * gcc-rich-location.c (blank_line_before_p): New function.
22991 (use_new_line): New function.
22992 (gcc_rich_location::add_fixit_insert_formatted): New function.
22993 * gcc-rich-location.h
22994 (gcc_rich_location::add_fixit_insert_formatted): New function.
22996 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22998 * selftest.c (assert_streq): Rename "expected" and "actual" to
22999 "val1" and "val2". Extend NULL-handling to cover both inputs
23000 symmetrically, while still requiring both to be non-NULL for a pass.
23001 * selftest.h (assert_streq): Rename "expected" and "actual" to
23003 (ASSERT_EQ): Likewise.
23004 (ASSERT_EQ_AT): Likewise.
23005 (ASSERT_KNOWN_EQ): Likewise.
23006 (ASSERT_KNOWN_EQ_AT): Likewise.
23007 (ASSERT_NE): Likewise.
23008 (ASSERT_MAYBE_NE): Likewise.
23009 (ASSERT_MAYBE_NE_AT): Likewise.
23010 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
23011 the assertion to pass.
23012 (ASSERT_STREQ_AT): Likewise.
23014 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
23016 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
23017 interaction with -pie.
23019 2018-04-30 David Malcolm <dmalcolm@redhat.com>
23021 * selftest.h: Fix alphabetization of per-source-file selftest
23024 2018-04-30 Jason Merrill <jason@redhat.com>
23026 PR c++/61982 - dead stores to destroyed objects.
23027 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
23030 2018-04-30 Jason Merrill <jason@redhat.com>
23032 * tree.c (build_clobber): New.
23033 * tree.h: Declare it.
23034 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
23036 2018-04-30 David Malcolm <dmalcolm@redhat.com>
23038 * diagnostic-show-locus.c (layout::layout): Update for
23039 location_get_source_line returning a char_span.
23040 (struct char_span): Move to input.h.
23041 (struct correction): Update for fields in char_span becoming
23043 (struct source_line): Update for location_get_source_line
23044 returning a char_span.
23045 (layout::print_line): Likewise.
23046 * edit-context.c (edited_file::print_content): Likewise.
23047 (edited_file::print_diff_hunk): Likewise.
23048 (edited_file::print_run_of_changed_lines): Likewise.
23049 (edited_file::get_num_lines): Likewise.
23050 (edited_line::edited_line): Likewise.
23051 * final.c (asm_show_source): Likewise.
23052 * input.c (location_get_source_line): Convert return type
23053 from const char * to char_span, losing the final "line_len"
23055 (dump_location_info): Update for the above.
23056 (get_substring_ranges_for_loc): Likewise. Use a char_span
23057 when handling the literal within the line.
23058 (test_reading_source_line): Update for location_get_source_line
23059 returning a char_span.
23060 * input.h (class char_span): Move here from
23061 diagnostic-show-locus.c, converting from a struct to a class.
23062 Make data members private.
23063 (char_span::operator bool): New.
23064 (char_span::length): New.
23065 (char_span::get_buffer): New.
23066 (char_span::operator[]): New.
23067 (char_span::subspan): Make const.
23068 (char_span::xstrdup): New.
23069 (location_get_source_line): Convert return type from const char *
23070 to char_span, losing the final "line_size" param.
23072 2018-04-30 Jan Hubicka <jh@suse.cz>
23074 * lto-wrapper.c (ltrans_priorities): New static var.
23075 (cmp_priority): New.
23076 (run_gcc): Read priorities and if doing parallel build order
23077 the Makefile by them.
23079 2018-04-30 David Malcolm <dmalcolm@redhat.com>
23081 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
23083 2018-04-30 Richard Biener <rguenther@suse.de>
23085 * tree-cfg.c (verify_address): Remove base argument, add
23086 flag whether to check TREE_ADDRESSABLE and do that.
23087 (verify_expr): Remove.
23088 (verify_types_in_gimple_reference): Add pieces from verify_expr.
23089 (verify_gimple_assign_single): Likewise.
23090 (verify_gimple_switch): Likewise.
23091 (verify_expr_location_1): Dereference tp once. Add (disabled)
23092 piece from verify_expr.
23093 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
23095 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
23097 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
23099 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
23101 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
23102 (small_data_pattern): Likewise.
23103 (arc_rewrite_small_data): Likewise.
23104 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
23105 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
23106 (get_symbol_alignment): New function.
23107 (legitimate_small_data_address_p): Likewise.
23108 (legitimate_scaled_address): Update, call
23109 legitimate_small_data_address_p.
23110 (output_sdata): New static variable.
23111 (arc_print_operand): Update how we handle small data operands.
23112 (arc_print_operand_address): Likewise.
23113 (arc_legitimate_address_p): Update, use
23114 legitimate_small_data_address_p.
23115 (arc_rewrite_small_data_p): Remove.
23116 (arc_rewrite_small_data_1): Likewise.
23117 (arc_rewrite_small_data): Likewise.
23118 (small_data_pattern): Likewise.
23119 (compact_sda_memory_operand): Update to use
23120 legitimate_small_data_address_p and get_symbol_alignment.
23121 (prepare_move_operands): Don't rewite sdata pattern.
23122 (prepare_extend_operands): Remove.
23123 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
23125 (zero_extendqisi2): Likewise.
23126 (zero_extendhisi2): Likewise.
23127 (extendqihi2): Likewise.
23128 (extendqisi2): Likewise.
23129 (extendhisi2): Likewise.
23130 (addsi3): Likewise.
23131 (subsi3): Likewise.
23132 (andsi3): Likewise.
23133 * config/arc/constraints.md (Usd): Change it to memory constraint.
23135 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
23137 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
23138 as source of std instructions.
23139 * config/arc/arc.md (movsi_insn): Update pattern predicate to
23140 allow 6-bit constants as source for store instructions.
23141 (movdi_insn): Update instruction pattern to allow 6-bit constants
23142 as source for store instructions.
23144 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
23146 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
23148 2018-04-30 Nathan Sidwell <nathan@acm.org>
23149 Sandra Loosemore <sandra@codesourcery.com>
23151 * dumpfile.c (dump_open): Allow '-' for stdout.
23152 * doc/invoke.texi (Developer Options): Document dump filename
23153 determination early. Document stdin/stdout selection.
23155 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
23157 Microblaze Target: PIC data text relative
23159 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
23160 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
23162 * config/microblaze/microblaze.h (microblaze_constant_address_p):
23163 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
23164 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
23165 New addressing mode for data-text relative position indepenedent code.
23166 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
23167 'ADDRESS_SYMBOLIC_TXT_REL'.
23168 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
23169 (microblaze_legitimate_pic_operand): Exclude function calls from
23170 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
23171 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
23173 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23174 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23175 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
23176 for 'address + offset'.
23177 (microblaze_expand_prologue): Add new function prologue call for
23179 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
23180 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
23181 table in case of TARGET_PIC_DATA_TEXT_REL.
23182 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
23183 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
23184 Add new macros 'UNSPEC_TEXT',
23185 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
23186 + exclude function calls from 'UNSPEC_PLT' in case of data text
23188 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23189 new target hook for generating address diff vector tables in case of
23191 * doc/tm.texi : Regenerate.
23192 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
23193 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
23194 of addr diff vector generation.
23195 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23196 target hook definition.
23197 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
23198 Add default function for generate_pic_addr_diff_vec -> flag_pic.
23199 * doc/invoke.texi (Add new pic option): Add new microblaze pic
23200 option for data text relative.
23202 2018-04-30 Richard Biener <rguenther@suse.de>
23204 * tree-chrec.h (evolution_function_is_constant_p): Remove
23206 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
23208 2018-04-30 Richard Biener <rguenther@suse.de>
23211 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
23213 2018-04-30 Richard Biener <rguenther@suse.de>
23215 PR tree-optimization/28364
23216 PR tree-optimization/85275
23217 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
23218 copying first exit test.
23220 2018-04-28 Mark Wielaard <mark@klomp.org>
23222 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
23223 dwarf_version >= 5.
23224 (dwarf_AT): Handle DW_AT_addr_base.
23225 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
23227 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
23230 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
23231 (*ashl<dwi>3_doubleword_mask_1): Ditto.
23232 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
23233 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
23235 2018-04-28 Richard Biener <rguenther@suse.de>
23237 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
23238 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
23239 to reflect use. Only add interesting stmts.
23241 2018-04-27 Martin Jambor <mjambor@suse.cz>
23244 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
23245 the jump function allows for passing through aggregate values.
23247 2018-04-27 David Malcolm <dmalcolm@redhat.com>
23249 * input.h (in_system_header_at): Convert from macro to inline
23251 (from_macro_expansion_at): Likewise.
23252 (from_macro_definition_at): Likewise.
23254 2018-04-27 Jeff Law <law@redhat.com>
23256 * config.gcc: Mark tile* targets as deprecated/obsolete.
23258 2018-04-27 Richard Biener <rguenther@suse.de>
23260 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
23263 2018-04-27 Richard Biener <rguenther@suse.de>
23265 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
23267 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
23269 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
23270 with Yd constraint. Set "preferred_for_speed" attribute from
23271 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
23272 with Yd constraint.
23273 (*movdi_internal): Ditto.
23274 (movti_interunit splitters): Remove
23275 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
23276 (movdi_interunit splitters): Ditto.
23277 * config/i386/constraints.md (Ye): Remove.
23278 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
23280 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23283 * config/aarch64/constraints.md (Usg): Limit to 31.
23284 (Usj): Limit to 63.
23286 2018-04-27 Jakub Jelinek <jakub@redhat.com>
23288 PR tree-optimization/85529
23289 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
23290 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
23291 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
23292 zero extension or masking of the MSB bit.
23293 (optimize_range_tests): Add FIRST_BB argument, pass it through
23294 to optimize_range_tests_var_bound.
23295 (maybe_optimize_range_tests, reassociate_bb): Adjust
23296 optimize_range_tests callers.
23298 2018-04-26 Richard Biener <rguenther@suse.de>
23299 Jakub Jelinek <jakub@redhat.com>
23301 * cgraph.h (symbol_table): Just declare debug method here.
23302 * symtab.c (symbol_table::debug): Define.
23304 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
23306 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
23308 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
23310 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
23311 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
23312 (*movdi_internal): Substitute Yi and Yj constraint with x
23313 and Ym and Yn constraint with y constraint. Update "isa"
23314 attribute and set "preferred_for_speed" attribute from
23315 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
23316 (*movsi_internal): Ditto.
23317 (*movdf_internal): Ditto.
23318 (*movsf_internal): Ditto.
23319 (*zero_extendsidi2): Ditto.
23320 * config/i386/sse.md (vec_set<mode>_0): Ditto.
23321 (sse2_loadld): Ditto.
23322 (*vec_extract<ssevecmodelower>_0): Ditto.
23323 (*vec_extractv4si_0_zext_sse4): Ditto.
23324 (vec_concatv2di): Ditto.
23325 (*vec_dup<mode>): Ditto.
23326 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
23327 * config/i386/constraints.md (Yi): Remove.
23332 2018-04-26 Nathan Sidwell <nathan@acm.org>
23334 * dumpfile.c (dump_open): New.
23335 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
23336 (dump_finish): Detect stdio/stderr by value not name.
23338 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
23340 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
23342 2018-04-26 Tom de Vries <tom@codesourcery.com>
23345 * config/nvptx/nvptx.c (verify_neutering_jumps)
23346 (verify_neutering_labels): New function
23347 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
23349 2018-04-26 Tom de Vries <tom@codesourcery.com>
23352 * config/nvptx/nvptx.c (needs_neutering_p): New function.
23353 (nvptx_single): Use needs_neutering_p to skip over insns that do not
23356 2018-04-26 Richard Biener <rguenther@suse.de>
23357 Tom de Vries <tom@codesourcery.com>
23360 * lto-streamer-out.c (output_function): Fixup loops if required to match
23361 discovery done in the reader.
23363 2018-04-26 Richard Biener <rguenther@suse.de>
23365 PR tree-optimization/85116
23366 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
23367 have a loop exit from the single latch predecessor. Remove
23368 case of header with just condition.
23369 (ch_base::copy_headers): Exclude infinite loops from any
23371 (pass_ch::execute): Record exits.
23373 2018-04-26 Richard Biener <rguenther@suse.de>
23375 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
23376 prologue cost vector and pass it to vect_get_load_cost.
23377 (vect_get_peeling_costs_all_drs): Likewise.
23378 (vect_peeling_hash_get_lowest_cost): Likewise.
23379 (vect_enhance_data_refs_alignment): Likewise.
23381 2018-04-26 Richard Biener <rguenther@suse.de>
23383 PR middle-end/85450
23384 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
23385 checking of integer<->pointer conversions.
23386 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
23387 sign-/zero-extending pointer types.
23388 (expand_omp_for_static_chunk): Likewise.
23390 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
23391 Jean Lee <xiaoyur347@gmail.com>
23393 * config/mips/mips.c (mips_asan_shadow_offset): New function.
23394 (TARGET_ASAN_SHADOW_OFFSET): Define.
23395 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
23396 true for -fsanitize=address.
23398 2018-04-25 Mark Wielaard <mark@klomp.org>
23400 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
23403 2018-04-25 Jakub Jelinek <jakub@redhat.com>
23405 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
23406 than "alu", remove explicit "memory" and "imm_disp" attributes.
23407 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
23409 PR middle-end/85414
23410 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
23411 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
23412 gen_lowpart_no_emit.
23414 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
23417 * config/i386/i386.c (ix86_expand_builtin): Change memory
23418 operand to XI, extend p0 to Pmode.
23419 * config/i386/i386.md: Change unspec volatile and operand
23420 1 mode to XI, change operand 0 mode to P.
23422 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
23424 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
23425 GET_MODE_MASK before any checking.
23426 (nds32_can_use_bset_p): Likewise.
23427 (nds32_can_use_btgl_p): Likewise.
23429 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
23431 * config/nds32/nds32-doubleword.md: New define_split pattern for
23432 illegal register number.
23434 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
23436 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
23438 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
23440 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
23442 2018-04-25 Richard Biener <rguenther@suse.de>
23444 * lto-streamer.h (LTO_major_version): Bump to 8.
23446 2018-04-25 Jakub Jelinek <jakub@redhat.com>
23448 * BASE-VER: Set to 9.0.0.
23450 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
23452 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
23453 in __abskf2 and __powikf2.
23455 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23458 * config/aarch64/constraints.md (Usg, Usj): New constraints.
23459 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
23460 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
23461 Use the above on operand 2. Reindent.
23462 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
23464 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
23467 * common/config/i386/i386-common.c (ix86_handle_option): Don't
23469 * config/i386/i386.opt (mcet): Removed.
23470 * doc/install.texi: Remove -mcet documentation.
23471 * doc/invoke.texi: Likewise.
23473 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
23476 * doc/install.texi: Remove -mcet from bootstrap-cet.
23478 2018-04-24 Jakub Jelinek <jakub@redhat.com>
23481 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
23482 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
23486 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
23487 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
23488 containing a CONST_VECTOR.
23490 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
23492 * doc/install.texi: Update newlib dependency for nvptx.
23494 2018-04-24 Jakub Jelinek <jakub@redhat.com>
23497 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
23498 instead of INTVAL when shifting x left.
23500 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
23502 PR tree-optimization/85478
23503 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
23504 vect_grouped_store_supported for single element vectors.
23506 2018-04-24 Richard Biener <rguenther@suse.de>
23509 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
23510 load cost increase to the case of non-constant step.
23512 2018-04-24 Jakub Jelinek <jakub@redhat.com>
23515 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
23516 destination if any_malformed_asm.
23518 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
23520 PR middle-end/85496
23521 * expr.c (store_field): In the bitfield case, if the value comes from
23522 a function call and is returned in registers by means of a PARALLEL,
23523 do not change the mode of the temporary unless BLKmode and VOIDmode.
23525 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
23527 PR rtl-optimization/85423
23528 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
23529 dependencies to debug insns when the previous insn is non-debug.
23531 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
23533 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
23534 enums into a single definition.
23535 (fls): Fix predicates and printing.
23538 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
23540 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
23541 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
23542 and short u6 immediate.
23543 (check_if_valid_sleep_operand): Remove.
23544 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
23546 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23548 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
23549 flag_always_save_lp condition.
23550 * config/nds32/nds32.opt (malways-save-lp): New option.
23552 2018-04-22 Shiva Chen <shiva0217@gmail.com>
23554 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
23555 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
23556 * config/nds32/nds32.h
23557 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
23558 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
23560 2018-04-22 Shiva Chen <shiva0217@gmail.com>
23562 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
23563 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
23565 2018-04-22 Shiva Chen <shiva0217@gmail.com>
23566 Chung-Ju Wu <jasonwucj@gmail.com>
23568 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
23570 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
23571 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
23573 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23575 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
23577 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23579 * config/nds32/nds32-protos.h (nds32_data_alignment,
23580 nds32_local_alignment): Declare.
23581 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
23582 nds32_local_alignment): New functions.
23583 (TARGET_CONSTANT_ALIGNMENT): Define.
23584 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
23586 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23588 * config/nds32/nds32.c
23589 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
23590 (TARGET_MODES_TIEABLE_P): Likewise.
23592 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23594 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
23595 level Ofast and Og.
23597 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
23598 Chung-Ju Wu <jasonwucj@gmail.com>
23600 * config/nds32/constants.md (unspec_volatile_element): Add enum values
23601 for unaligned access.
23602 * config/nds32/nds32-intrinsic.c: Implementation of expanding
23604 * config/nds32/nds32-intrinsic.md: Likewise.
23605 * config/nds32/nds32_intrinsic.h: Likewise.
23606 * config/nds32/nds32.h (nds32_builtins): Likewise.
23607 * config/nds32/nds32.opt (munaligned-access): New option.
23608 * config/nds32/nds32.c (nds32_asm_file_start): Display
23609 flag_unaligned_access status.
23611 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
23613 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
23614 -mno-relax is present.
23615 * config/riscv/linux.h (LINK_SPEC): Ditto.
23617 2018-04-20 Martin Sebor <msebor@redhat.com>
23620 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
23622 (gimple_fold_builtin_stxcpy_chk): Same.
23623 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
23625 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
23628 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
23629 __powikf2 when long double is IEEE 128-bit.
23631 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
23633 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
23634 step to make sure stack always aligned.
23636 2018-04-20 Carl Love <cel@us.ibm.com>
23639 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
23640 size check for arg0.
23642 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
23643 Tom de Vries <tom@codesourcery.com>
23646 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
23647 Emit insns for calls too.
23648 (nvptx_find_par): Always look for worker-level predecessor insn.
23649 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
23651 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
23652 (nvptx_process_pars): Propagate frames for calls.
23654 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
23657 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
23659 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
23660 (ix86_handle_option): Don't handle OPT_mibt.
23661 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
23663 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
23665 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
23666 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
23667 (ix86_target_macros): Define __CET__ with flag_cf_protection
23668 for -fcf-protection.
23669 * config/i386/i386.c (isa2_opts): Remove -mibt.
23670 * config/i386/i386.h (TARGET_IBT): Removed.
23671 (TARGET_IBT_P): Likewise.
23672 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
23673 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
23674 * config/i386/i386.opt (mcet): Update help message.
23675 (mshstk): Likewise.
23677 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
23678 -mcet as an alias for -mshstk.
23680 2018-04-20 Richard Biener <rguenther@suse.de>
23682 PR middle-end/85475
23683 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
23684 complexity by forcing a single use of the multiply operand.
23686 2018-04-20 Martin Jambor <mjambor@suse.cz>
23689 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
23690 recursion dependency to only apply to non-clones.
23692 2018-04-20 Martin Jambor <mjambor@suse.cz>
23695 * ipa-cp.c (create_specialized_node): Check that clones of
23696 self-recursive edges exist during IPA-CP.
23698 2018-04-19 Toon Moene <toon@moene.org>
23700 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
23703 2018-04-19 Jakub Jelinek <jakub@redhat.com>
23705 PR tree-optimization/85467
23706 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
23707 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
23708 VECTOR_CST element to type.
23710 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23713 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
23714 * config/i386/i386.md (builtin_setjmp_setup): Removed.
23715 (builtin_longjmp): Likewise.
23716 (save_stack_nonlocal): New pattern.
23717 (restore_stack_nonlocal): Likewise.
23719 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23722 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23723 Replace ASM_OUTPUT_LABEL with fprintf.
23725 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23728 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23729 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
23730 * config/i386/i386-c.c (ix86_target_macros_internal): Also
23731 define __IBT__ and __SHSTK__ for -fcf-protection.
23732 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
23734 (ix86_trampoline_init): Likewise.
23735 (x86_output_mi_thunk): Likewise.
23736 (ix86_notrack_prefixed_insn_p): Likewise.
23737 (ix86_option_override_internal): Don't disallow -fcf-protection.
23738 * config/i386/i386.md (rdssp<mode>): Also enable for
23740 (incssp<mode>): Likewise.
23741 (nop_endbr): Likewise.
23742 * config/i386/i386.opt (mcet): Change help message to built-in
23745 (mshstk): Likewise.
23746 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
23747 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
23748 enable CET built-in functions.
23750 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
23752 * common/config/i386/i386-common.c
23753 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
23754 OPTION_MASK_ISA_MOVDIRI_UNSET,
23755 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
23756 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
23757 * config.gcc (movdirintrin.h): New header.
23758 * config/i386/cpuid.h (bit_MOVDIRI,
23759 bit_MOVDIR64B): New bits.
23760 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
23762 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
23763 (VOID, PVOID, PCVOID)): New function types.
23764 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
23765 __builtin_ia32_directstoreu_u64,
23766 __builtin_ia32_movdir64b): New builtins.
23767 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
23768 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
23770 (ix86_valid_target_attribute_inner_p): Ditto.
23771 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
23772 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
23773 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
23774 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
23775 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
23776 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
23777 (movdiri<mode>, movdir64b_<mode>): New.
23778 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
23779 * config/i386/immintrin.h: Include movdirintrin.h.
23780 * config/i386/movdirintrin.h: New file.
23781 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
23783 2018-04-19 Richard Biener <rguenther@suse.de>
23785 PR middle-end/85455
23786 * cfg.c (clear_bb_flags): When loop state says we have
23787 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
23789 2018-04-19 Richard Biener <rguenther@suse.de>
23791 PR tree-optimization/84737
23792 * tree-vect-data-refs.c (vect_copy_ref_info): New function
23793 copying restrict info.
23794 (vect_setup_realignment): Use it.
23795 * tree-vectorizer.h (vect_copy_ref_info): Declare.
23796 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
23797 the first DR to all generated stores.
23798 (vectorizable_load): Likewise for loads.
23800 2018-04-19 Jakub Jelinek <jakub@redhat.com>
23802 PR tree-optimization/85446
23803 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
23804 the integral and pointer types to have the same precision.
23806 * doc/install.texi: Document --disable-cet being the default and
23809 2018-04-18 Martin Liska <mliska@suse.cz>
23811 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
23814 2018-04-18 Martin Liska <mliska@suse.cz>
23817 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
23820 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23821 arguments if they are comparable.
23823 2018-04-18 Martin Liska <mliska@suse.cz>
23826 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23829 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23832 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
23835 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
23836 ENDBR after calling __morestack.
23838 2018-04-18 David Malcolm <dmalcolm@redhat.com>
23841 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
23842 by using gcc_base_ver to generate a gcc_driver_version, and use
23843 it when generating GCC_DRIVER_NAME.
23844 * configure: Regenerate.
23846 2018-04-18 Jakub Jelinek <jakub@redhat.com>
23849 * config.gcc: Obsolete powerpc*-*-*spe*.
23851 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23854 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
23855 (stabstr_D): Change type of unum from unsigned int to
23856 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
23859 2018-04-17 Jim Wilson <jimw@sifive.com>
23862 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
23863 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
23864 Set arg_pointer_offset after using pretend_args_size.
23866 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23868 PR rtl-optimization/85431
23869 * dse.c (record_store): Ignore zero width stores.
23872 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
23873 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
23874 __builtin_stack_restore rather than after it.
23875 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
23876 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
23877 argument instead of virtual_dynamic_stack_rtx.
23879 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
23881 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
23883 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
23884 Add note to error message to explain internal mapping of overloaded
23885 built-in function name to non-overloaded built-in function name.
23886 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
23889 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23892 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
23893 where the inputs overlap with the output.
23895 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23897 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
23898 (=v, v) alternative and explicit "memory" attribute.
23899 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
23900 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23902 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
23903 "sselog1" type instead of "sselog".
23904 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
23905 "sselog". Remove explicit "memory" attribute.
23906 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
23907 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23909 (vec_extract_hi_v32hi): Merge all alternatives into one, use
23910 "sselog1" type instead of "sselog". Remove explicit "memory"
23912 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
23913 use "sselog1" type instead of "sselog". Remove explicit "memory"
23915 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
23916 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23918 (vec_extract_hi_v64qi): Merge all alternatives into one, use
23919 "sselog1" type instead of "sselog". Remove explicit "memory"
23921 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
23922 use "sselog1" type instead of "sselog". Remove explicit "memory"
23926 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
23928 PR middle-end/85414
23929 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
23932 2018-04-17 Martin Jambor <mjambor@suse.cz>
23935 * ipa-cp.c (create_specialized_node): Call
23936 expand_all_artificial_thunks if necessary.
23938 2018-04-17 Martin Liska <mliska@suse.cz>
23941 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
23942 in message, remote space in between '_G' and '('.
23944 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23947 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
23948 avx512f_vmcmp<mode>3<round_saeonly_name>,
23949 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
23950 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
23951 avx512f_rndscale<mode><round_saeonly_name>,
23952 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
23953 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
23954 Use %<iptr>2 instead of %2 for -masm=intel.
23955 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
23956 avx512f_vcvttss2usi<round_saeonly_name>,
23957 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
23959 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
23960 avx512f_vcvttsd2usi<round_saeonly_name>,
23961 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
23962 Use %q1 instead of %1 for -masm=intel.
23963 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
23964 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
23965 of %3 for -masm=intel.
23966 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
23968 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
23970 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
23972 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
23973 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
23975 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
23977 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
23978 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
23979 %g1 and one with %0 and %1.
23980 (avx512er_vmrcp28<mode><round_saeonly_name>,
23981 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
23982 %1 for -masm=intel.
23983 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
23984 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
23985 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
23986 of %0 and %{%4%} for -masm=intel.
23987 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
23988 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
23989 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
23990 order of %0 and %{%5%}%{z%} for -masm=intel.
23992 2018-04-17 Jan Hubicka <jh@suse.cz>
23995 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
23997 2018-04-17 Martin Liska <mliska@suse.cz>
24000 * multiple_target.c (create_dispatcher_calls): Set apostrophes
24001 for target_clone error message. Make default implementation
24002 clone to be a local declaration.
24003 (separate_attrs): Add new argument and check for an empty
24005 (expand_target_clones): Handle it.
24006 (ipa_target_clone): Make redirection just for target_clones
24009 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
24010 Tom de Vries <tom@codesourcery.com>
24012 PR middle-end/84955
24013 * omp-expand.c (expand_oacc_for): Add dummy false branch for
24014 tiled basic blocks without omp continue statements.
24016 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
24019 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
24020 vec_extract expression as having side effects to make sure it gets
24023 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
24026 * config/i386/i386.c (get_builtin_code_for_version): Check
24029 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
24032 * config.gcc: Support "skylake".
24033 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
24035 * config/i386/i386.c (m_SKYLAKE): Define.
24036 (processor_target_table): Add "skylake".
24037 (ix86_option_override_internal): Add "skylake".
24038 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
24039 PROCESSOR_CANNONLAKE.
24040 (get_builtin_code_for_version): Fix priority for
24041 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
24042 PROCESSOR_SKYLAKE-AVX512.
24043 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
24044 (processor_type): Add PROCESSOR_SKYLAKE.
24046 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
24047 Jason Merrill <jason@redhat.com>
24050 * convert.c (convert_to_integer_1): Use direct recursion for
24051 enumeral types and types with a precision less than the number
24052 of bits in their mode.
24054 2018-04-16 Julia Koval <julia.koval@intel.com>
24057 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
24058 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
24060 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
24063 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
24064 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
24065 and -mno-direct-move.
24067 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
24070 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
24071 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
24072 Ensure negative shifts result in {0}.
24074 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
24076 PR rtl-optimization/79916
24077 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
24078 regs (if any) to define how to gnerate SD moves when LRA is in
24081 2018-04-13 Jakub Jelinek <jakub@redhat.com>
24083 PR rtl-optimization/85393
24084 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
24085 * except.c (expand_dw2_landing_pad_for_region): Make static.
24086 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
24087 a label and unconditional jump to old_bb, rather than
24088 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
24091 PR rtl-optimization/85376
24092 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
24093 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
24094 instead of a specific value.
24096 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
24097 Bin Cheng <bin.cheng@arm.com>
24099 PR tree-optimization/82965
24100 PR tree-optimization/83991
24101 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
24102 by_profile_only parameter.
24103 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
24104 information if the loop was predicted to iterate too many times.
24105 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
24107 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
24110 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
24113 2018-04-13 Martin Liska <mliska@suse.cz>
24114 Jakub Jelinek <jakub@redhat.com>
24116 PR middle-end/81657
24117 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
24118 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
24119 * builtins.c (expand_builtin_memory_copy_args): Use
24120 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
24121 handle dest_addr == pc_rtx.
24123 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
24126 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
24127 asked to not generate direct moves.
24128 (fix_trunc<mode>si2_stfiwx): Similar.
24129 (fix_trunc<mode>si2_internal): Similar.
24131 2018-04-12 Jakub Jelinek <jakub@redhat.com>
24134 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
24135 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
24136 lookup if dest in some wider mode is known to be const0_rtx and
24137 if so, record permanent equivalence for it to be ZERO_EXTEND of
24138 the narrower mode destination.
24140 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
24142 * lto-streamer-out.c (output_function): Revert 259346.
24143 * omp-expand.c (expand_oacc_for): Likewise.
24145 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
24147 PR rtl-optimization/85354
24148 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
24149 * sel-sched.c (sel_global_init): ... here.
24151 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
24154 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
24155 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
24156 mode for PE-COFF targets.
24157 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
24158 (i386_pe_asm_lto_end): Likewise.
24159 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
24160 (TARGET_ASM_LTO_END): Likewise.
24161 * config/i386/winnt.c (saved_debug_info_level): New static variable.
24162 (i386_pe_asm_lto_start): New function.
24163 (i386_pe_asm_lto_end): Likewise.
24165 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
24166 Richard Biener <rguenther@suse.de>
24168 PR middle-end/84955
24169 * lto-streamer-out.c (output_function): Fix CFG loop state before
24171 * omp-expand.c (expand_oacc_for): Handle calls to internal
24172 functions like regular functions.
24174 2018-04-12 Richard Biener <rguenther@suse.de>
24177 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
24178 for the early LTO debug to properly generate references to it
24179 during DIE emission. Do not re-use that for the skeleton for
24181 (dwarf2out_early_finish): Likewise.
24183 2018-04-12 Jakub Jelinek <jakub@redhat.com>
24186 * config/i386/sse.md
24187 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
24188 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
24189 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
24190 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
24191 and output is a reg, avoid creating invalid lowpart subreg, but
24192 instead split into a 512-bit move. Don't split if not AVX512VL,
24193 input is xmm16+ reg and output is a mem.
24194 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
24195 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
24196 xmm16+ reg and output is a mem.
24198 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24200 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
24201 also for flag_dwarf2_cfi_asm.
24203 2018-04-12 Jakub Jelinek <jakub@redhat.com>
24205 PR rtl-optimization/85342
24206 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
24207 a bool scalar var inside of the loop instead. Don't try to update
24208 recog_data.operand after failed apply_change_group.
24210 2018-04-12 Tom de Vries <tom@codesourcery.com>
24213 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
24214 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
24215 array with flexible array member as array without given dimension.
24216 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
24217 argument for undefined param to true.
24219 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
24222 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24223 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
24224 from PowerPC section.
24225 * config/rs6000/sysv4.opt (mcall-): Improve help text.
24226 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
24227 help text that is too long.
24228 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
24229 help text that is too long.
24230 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
24231 help text that is too long.
24233 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
24235 * config/alpha/alpha.md (stack_probe_internal): Rename
24236 from "probe_stack". Update all callers.
24238 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
24240 PR rtl-optimization/84566
24241 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
24242 sched_macro_fuse_insns.
24244 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
24247 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
24248 (compute_block_dependences): ... from here.
24250 2018-04-11 Jakub Jelinek <jakub@redhat.com>
24252 PR tree-optimization/85331
24253 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
24254 from int to HOST_WIDE_INT.
24256 2018-04-11 Martin Jambor <mjambor@suse.cz>
24259 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
24260 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
24261 not the same as the source val.
24262 (cgraph_edge_brings_value_p): New parameter.
24263 (gather_edges_for_value): Pass destination value to
24264 cgraph_edge_brings_value_p.
24265 (perhaps_add_new_callers): Likewise.
24266 (get_info_about_necessary_edges): Likewise and exclude values brought
24267 only by self-recursive edges.
24268 (create_specialized_node): Redirect only clones of self-calling edges.
24269 (+self_recursive_pass_through_p): New function.
24270 (find_more_scalar_values_for_callers_subset): Use it.
24271 (find_aggregate_values_for_callers_subset): Likewise.
24272 (known_aggs_to_agg_replacement_list): Removed.
24273 (decide_whether_version_node): Re-calculate known constants for all
24274 remaining context clones.
24276 2018-04-11 Richard Biener <rguenther@suse.de>
24279 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
24280 from early DWARF output.
24281 (dwarf2out_early_finish): Output line info unconditionally into
24282 early DWARF and add reference to it.
24284 2018-04-11 Jakub Jelinek <jakub@redhat.com>
24287 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
24288 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
24289 other than V2DFmode using iptr mode attribute.
24290 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
24292 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
24294 PR rtl-optimization/84659
24295 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
24297 2018-04-11 Jakub Jelinek <jakub@redhat.com>
24300 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
24302 (output_loc_list): Pass address of a dummy size variable even in the
24303 locview handling loop.
24304 (index_location_lists): Add comment on why skip_loc_list_entry can't
24307 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
24310 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
24313 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
24316 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24317 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
24318 and -mstring-compare-inline-limit.
24320 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
24323 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
24324 for stack clash protection in a register whenever we need it to be in
24327 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
24329 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
24330 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
24332 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
24335 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
24337 (mlong-double-): Ditto.
24338 * config/rs6000/sysv4.opt (msdata=): Ditto.
24339 (mtls-size=): Ditto.
24341 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
24343 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
24344 erroneous entries for
24345 "vector int vec_ldl (int, long int *)", and
24346 "vector unsigned int vec_ldl (int, unsigned long int *)".
24347 Add comments and entries for
24348 "vector bool char vec_ldl (int, bool char *)",
24349 "vector bool short vec_ldl (int, bool short *)",
24350 "vector bool int vec_ldl (int, bool int *)",
24351 "vector bool long long vec_ldl (int, bool long long *)",
24352 "vector pixel vec_ldl (int, pixel *)",
24353 "vector long long vec_ldl (int, long long *)",
24354 "vector unsigned long long vec_ldl (int, unsigned long long *)".
24355 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
24356 type tree bool_long_long_type_node and correct definition of
24357 bool_V2DI_type_node to make reference to this new type tree.
24358 (rs6000_mangle_type): Replace erroneous reference to
24359 bool_long_type_node with bool_long_long_type_node.
24360 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
24361 comments to emphasize sign distinctions for char and int types and
24362 replace RS6000_BTI_bool_long constant with
24363 RS6000_BTI_bool_long_long constant. Also add comment to restrict
24364 use of RS6000_BTI_pixel.
24365 (bool_long_type_node): Remove this macro definition.
24366 (bool_long_long_type_node): New macro definition
24368 2018-04-10 Jakub Jelinek <jakub@redhat.com>
24370 PR rtl-optimization/85300
24371 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
24372 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
24373 simplify_unary_operation fails.
24375 2018-04-10 Martin Liska <mliska@suse.cz>
24377 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
24378 cgraph_edge and ipa_ref.
24380 2018-04-10 Jakub Jelinek <jakub@redhat.com>
24384 * config/i386/sse.md
24385 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
24386 computation of the VEC_MERGE selector from mask.
24387 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
24388 Fix decoding of the VEC_MERGE selector into mask.
24390 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
24392 PR tree-optimization/85286
24393 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
24395 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
24397 * final.c (final_1): Set insn_last_address as well as
24398 insn_current_address.
24400 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24403 * explow.c (emit_stack_probe): Call validize_mem on memory location
24404 before passing it to gen_probe_stack. Create address operand and
24405 legitimize it for the probe_stack_address case.
24407 2018-04-09 Jan Hubicka <jh@suse.cz>
24410 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
24411 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
24412 * tree.c (free_lang_data_in_type): Fix handling of binfos;
24414 (free_lang_data): Rebuild type inheritance graph.
24416 2018-04-09 Martin Sebor <msebor@redhat.com>
24418 * invoke.texi (-finline-small-functions): Mention other optimization
24420 (-findirect-inlining, -fpartial-inlining): Same.
24421 (-finline-functions-called-once): Same.
24422 (-freorder-blocks-and-partition): Same.
24424 2018-04-09 Jan Hubicka <jh@suse.cz>
24427 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
24428 jumps; choose last target that matches the criteria (i.e.
24429 no partition changes for non-crossing jumps).
24430 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
24431 support for redirecting crossing jumps to non-crossing.
24433 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
24435 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
24436 also for naked functions.
24438 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
24440 * config/arc/arc.md (add_shift): New pattern.
24441 (add_shift2): Likewise.
24442 (sub_shift): Likewise.
24443 (sub_shift_cmp0_noout): Likewise.
24444 (compare_si_ashiftsi): Likewise.
24445 (xbfu_cmp0_noout): New combine pattern.
24446 (xbfu_cmp0"): Likewise.
24447 (movsi_set_cc_insn): Place the predicable variant first.
24448 (commutative_binary_cmp0_noout): Remove clobber.
24449 (commutative_binary_cmp0): New pattern.
24450 (noncommutative_binary_cmp0): Likewise.
24451 (noncommutative_binary_cmp0_noout): Likewise.
24452 (noncommutative_binary_comparison_result_used): Removed.
24453 (rsub_cmp0): New pattern.
24454 (rsub_cmp0_noout): Likewise.
24455 (extzvsi): Changed, keep only meaningful variants.
24456 (SQH, SEZ): New iterators.
24457 (SQH_postfix): New mode attribute.
24458 (SEZ_prefix): New code attribute.
24459 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
24460 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
24461 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
24462 of numerical value.
24463 (noncommutative_operator): Check the availability of barrel
24466 2018-04-09 Richard Biener <rguenther@suse.de>
24468 PR tree-optimization/85284
24469 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
24470 Only use the niter constraining form of simple_iv when the exit
24471 is always executed.
24473 2018-04-09 Tom de Vries <tom@codesourcery.com>
24476 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
24477 (define_expand "*memory_barrier"): New define_expand.
24478 (define_insn "memory_barrier"): New insn.
24480 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
24482 PR rtl-optimization/80463
24483 PR rtl-optimization/83972
24484 PR rtl-optimization/83480
24486 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
24487 correct producer for the insn.
24488 (tidy_control_flow): Fixup seqnos in case of debug insns.
24490 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
24492 PR rtl-optimization/83913
24494 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
24495 different sched-times when merging exprs.
24497 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
24499 PR rtl-optimization/83962
24501 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
24502 tidy_fallthru_edge and tidy_control_flow.
24504 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
24506 PR rtl-optimization/83530
24508 * sel-sched.c (force_next_insn): New global variable.
24509 (remove_insn_for_debug): When force_next_insn is true, also leave only
24510 next insn in the ready list.
24511 (sel_sched_region): When the region wasn't scheduled, make another pass
24512 over it with force_next_insn set to 1.
24514 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
24516 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
24518 * config/nds32/constants.md (unspec_volatile_element): Add enum values
24519 for interrupt control.
24520 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24521 functions for interrupt control.
24522 * config/nds32/nds32-intrinsic.md: Likewise.
24523 * config/nds32/nds32_intrinsic.h: Likewise.
24524 * config/nds32/nds32.h (nds32_builtins): Likewise.
24526 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
24528 * config/nds32/nds32.c (nds32_init_machine_status,
24529 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
24530 strict_aligned_p field.
24531 (nds32_expand_to_rtl_hook): New function.
24532 (TARGET_EXPAND_TO_RTL_HOOK): Define.
24533 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
24535 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
24536 Chung-Ju Wu <jasonwucj@gmail.com>
24538 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
24539 * config/nds32/nds32-n7.md: New file.
24540 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
24541 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
24543 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
24544 * config/nds32/nds32.md (pipeline_model): Add n7.
24545 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
24546 * config/nds32/pipelines.md: Include n7 settings.
24548 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
24549 Chung-Ju Wu <jasonwucj@gmail.com>
24551 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
24552 * config/nds32/nds32-e8.md: New file.
24553 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
24554 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
24556 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
24557 * config/nds32/nds32.md (pipeline_model): Add e8.
24558 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
24559 * config/nds32/pipelines.md: Include e8 settings.
24561 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
24562 Chung-Ju Wu <jasonwucj@gmail.com>
24564 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
24565 * config/nds32/nds32-n8.md: New file.
24566 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
24567 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
24569 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
24570 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
24571 * config/nds32/nds32.md (pipeline_model): Add n8.
24572 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
24573 * config/nds32/pipelines.md: Include n8 settings.
24575 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
24576 Chung-Ju Wu <jasonwucj@gmail.com>
24578 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
24579 * config/nds32/nds32-n9-2r1w.md: New file.
24580 * config/nds32/nds32-n9-3r2w.md: New file.
24581 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
24582 nds32_register_ports): New or modify for cpu n9.
24583 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
24585 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
24586 * config/nds32/nds32-utils.c: New file.
24587 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
24588 TARGET_MUL_SLOW): Define.
24589 * config/nds32/nds32.md (pipeline_model): New attribute.
24590 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
24591 New options that support cpu n9.
24592 * config/nds32/pipelines.md: Include n9 settings.
24593 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
24595 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
24597 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
24598 information if necessary.
24599 (output_cond_branch_compare_zero): Likewise.
24600 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
24601 (nds32_target_alignment): Refine for alignment.
24602 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
24603 (FUNCTION_BOUNDARY): Modify.
24604 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
24606 * config/nds32/nds32.opt (malways-align, malign-functions): New.
24608 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
24610 * config/nds32/constants.md (unspec_volatile_element): Add values for
24611 TLB operation and data prefetch.
24612 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24613 functions for TLB operation and data prefetch.
24614 * config/nds32/nds32-intrinsic.md: Likewise.
24615 * config/nds32/nds32_intrinsic.h: Likewise.
24616 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
24617 (nds32_print_operand): Likewise.
24618 * config/nds32/nds32.h (nds32_builtins): Likewise.
24620 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
24621 Andrew Pinski <pinsika@gcc.gnu.org>
24623 PR middle-end/82976
24624 * match.pd: Use constant_boolean_node of correct type instead of
24625 boolean_true_node or boolean_false_node for simplifying
24626 pointer comparisons to zero.
24628 2018-04-07 Jakub Jelinek <jakub@redhat.com>
24630 PR tree-optimization/80021
24631 * tree.c (verify_type_variant): Make error call in verify_variant_match
24632 translatable and remove final full stop.
24634 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24636 * config/nds32/constants.md (unspec_volatile_element): Add
24637 UNSPEC_VOLATILE_EH_RETURN.
24638 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
24639 nds32_output_stack_pop): Support dwarf exception handling process.
24640 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
24641 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
24642 exception handling process.
24643 (nds32_compute_stack_frame): Likewise.
24644 (nds32_return_addr_rtx): Likewise.
24645 (nds32_initial_elimination_offset): Likewise.
24646 (nds32_expand_prologue): Likewise.
24647 (nds32_expand_epilogue): Likewise.
24648 (nds32_dynamic_chain_address): New function.
24649 * config/nds32/nds32.h (machine_function): Add fields for dwarf
24650 exception handling.
24651 (DYNAMIC_CHAIN_ADDRESS): Define.
24652 (EH_RETURN_DATA_REGNO): Define.
24653 (EH_RETURN_STACKADJ_RTX): Define.
24654 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
24655 patterns for dwarf exception handling.
24657 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24659 * config/nds32/nds32.h: Clean up obsolete macros.
24661 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24663 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24664 Add enum values for particular instructions.
24665 * config/nds32/nds32-intrinsic.c: Implementation of expanding
24666 particular intrinsic functions.
24667 * config/nds32/nds32-intrinsic.md: Likewise.
24668 * config/nds32/nds32_intrinsic.h: Likewise.
24669 * config/nds32/nds32.h (nds32_builtins): Likewise.
24670 * config/nds32/nds32.md (type): Add pbsad and pbsada.
24671 (btst, ave): New patterns for particular instructions.
24673 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24675 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24676 Add enum values for atomic load/store and memory sync.
24677 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
24679 * config/nds32/nds32-intrinsic.md: Likewise.
24680 * config/nds32/nds32_intrinsic.h: Likewise.
24681 * config/nds32/nds32.h (nds32_builtins): Likewise.
24683 2018-04-07 Jakub Jelinek <jakub@redhat.com>
24685 PR tree-optimization/85257
24686 * fold-const.c (native_encode_vector): If not all elts could fit
24687 and off is -1, return 0 rather than offset.
24688 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
24689 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
24690 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
24691 adjust buffer in native_interpret_expr call.
24693 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24695 * config/nds32/constants.md (unspec_volatile_element): Add cache
24696 control enum values.
24697 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
24698 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
24699 * config/nds32/nds32.c (nds32_cctl_names): New.
24700 (nds32_print_operand): Handle cache control register names.
24701 * config/nds32/nds32.h (nds32_builtins): New enum values.
24702 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
24704 * config/nds32/nds32.md (type): Add mmu.
24705 * config/nds32/pipelines.md (simple_insn): Add mmu.
24707 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24709 * config/nds32/nds32.md (type): Remove call.
24710 * config/nds32/pipelines.md (simple_insn): Likewise.
24712 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24714 * config/nds32/constants.md (unspec_volatile_element): Add
24715 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
24716 UNSPEC_VOLATILE_FMFCFG.
24717 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
24718 description for fmfcfg and fmfcsr.
24719 (bdesc_1arg): Add fmtcsr.
24720 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
24721 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
24722 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
24723 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
24724 unspec_fmfcfg): New patterns.
24725 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
24726 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
24727 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
24728 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
24729 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
24730 __nds32__fmfcfg): Define.
24732 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24734 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
24735 intrinsic register names.
24736 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
24737 intrinsic register enum values and macros.
24739 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24741 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
24742 for load/store addressing form.
24743 (nds32_print_operand_address): Likewise.
24745 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
24748 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
24749 based on LABEL_REF. Remove useless assertion.
24750 (pic_address_needs_scratch): Fix formatting.
24751 (sparc_legitimize_pic_address): Minor tweaks.
24752 (sparc_delegitimize_address): Adjust assertion accordingly.
24753 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
24754 into symbolic_operand.
24755 (movsi_high_pic_label_ref): Likewise.
24756 (movsi_lo_sum_pic_label_ref): Likewise.
24757 (movdi_pic_label_ref): Likewise.
24758 (movdi_high_pic_label_ref): Likewise.
24759 (movdi_lo_sum_pic_label_ref): Likewise.
24761 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
24763 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
24764 custom LIB_SPEC setup.
24766 2018-04-06 Ruslan Bukin <br@bsdpad.com>
24767 Kito Cheng <kito.cheng@gmail.com>
24769 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
24770 * config/riscv/freebsd.h: New.
24772 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24774 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
24775 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
24778 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24779 Kito Cheng <kito.cheng@gmail.com>
24781 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
24782 nds32_output_call, nds32_symbol_binds_local_p): New functions.
24783 * config/nds32/nds32-protos.h (nds32_output_call,
24784 nds32_output_return): Declare.
24785 * config/nds32/nds32.md: Refine all the call and return patterns.
24787 2018-04-06 Jakub Jelinek <jakub@redhat.com>
24790 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
24791 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
24793 PR rtl-optimization/84872
24794 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
24795 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
24796 EDGE_CROSSING edge.
24798 2018-04-06 Tamar Christina <tamar.christina@arm.com>
24800 * expr.c (copy_blkmode_to_reg): Revert 254862.
24801 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
24803 2018-04-06 Richard Biener <rguenther@suse.de>
24805 PR middle-end/85244
24806 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
24807 after seeing a component reference with an adjacent field. Treat
24808 refs to arrays at struct end of external decls similar to
24809 refs to unconstrained commons.
24811 2018-04-06 Jakub Jelinek <jakub@redhat.com>
24814 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
24815 look through SAVE_EXPRs with non-side-effects argument. Adjust
24817 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
24820 2018-04-06 Richard Biener <rguenther@suse.de>
24822 PR middle-end/85180
24823 * alias.c (find_base_term): New wrapper around find_base_term
24824 unwinding CSELIB_VAL_PTR changes.
24825 (find_base_term): Do not restore CSELIB_VAL_PTR during the
24828 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24830 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
24832 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
24833 constant definitions.
24834 ("nop"): lr 0,0 -> nopr r0
24835 ("nop_lr0", "nop_lr1"): New insn definitions.
24837 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24839 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
24840 NDS32_V3PUSH_AVAILABLE_P macro.
24842 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
24843 Chung-Ju Wu <jasonwucj@gmail.com>
24845 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
24846 (nds32*-*-*): Add float and fpu_config into supported_defaults.
24847 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
24848 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
24849 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
24850 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
24851 * config/nds32/constraints.md: New constraints and checking for hard
24852 float configuration.
24853 * config/nds32/iterators.md: New mode iterator and attribute for hard
24854 float configuration.
24855 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
24857 * config/nds32/nds32-fpu.md: New file.
24858 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
24859 deal with hard float code generation.
24860 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
24862 (abi_type, float_reg_number): New enum type.
24863 * config/nds32/nds32-predicates.c: New predicates for hard float.
24864 * config/nds32/nds32-protos.h: Declare functions for hard float.
24865 * config/nds32/nds32.c: Implementation for hard float configuration.
24866 * config/nds32/nds32.h: Definitions for hard float configuration.
24867 * config/nds32/nds32.md: Include hard float machine description and
24868 modify patterns for hard float configuration.
24869 * config/nds32/nds32.opt: New options for hard float configuration.
24870 * config/nds32/predicates.md: New predicates for hard float
24873 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
24875 * common/config/nds32/nds32-common.c
24876 (nds32_option_optimization_table): Enable -mreleax-hint by default.
24878 2018-04-05 Jakub Jelinek <jakub@redhat.com>
24880 PR middle-end/85195
24881 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
24882 CONSTRUCTOR_ELT (ctor, ...)->value.
24884 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
24887 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
24889 2018-04-05 Tom de Vries <tom@codesourcery.com>
24892 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
24895 2018-04-05 Shiva Chen <shiva0217@gmail.com>
24896 Kito Cheng <kito.cheng@gmail.com>
24898 * config/nds32/constraints.md (U33): Fine-tune checking condition.
24899 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
24900 * config/nds32/nds32.h (nds32_16bit_address_type): Add
24901 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
24903 2018-04-05 Shiva Chen <shiva0217@gmail.com>
24904 Kito Cheng <kito.cheng@gmail.com>
24906 * config/nds32/constraints.md (Ufe): New memory constraint.
24907 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
24908 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
24909 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
24911 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
24912 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
24914 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24916 * config/nds32/nds32.md: Use optimize_size in the condition for
24917 alu-shift instructions.
24919 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24921 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
24923 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24925 * config/nds32/nds32.md (negsi2): Refine pattern.
24927 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
24928 Chung-Ju Wu <jasonwucj@gmail.com>
24930 * config/nds32/iterators.md (shift_rotate): New code iterator.
24931 (shift): New code attribute.
24932 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
24933 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
24934 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
24935 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
24936 bit-wise operations.
24937 (andsi3, *andsi3): Ditto.
24938 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
24939 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
24940 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
24941 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
24942 nds32_ior_operand, nds32_xor_operand): New predicates.
24944 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24946 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
24947 (addsi3, subsi3): ... this.
24949 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24951 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
24953 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24955 * config/nds32/nds32.md: Adjust indention.
24957 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
24959 * config/nds32/nds32.md (feature): New attribute.
24961 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24963 * config/nds32/nds32.md (subtype): New attribute.
24965 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
24968 * config/arm/arm-builtins.c (arm_expand_builtin): Change
24969 expansion to perform a bitwise AND of the argument followed by a
24970 boolean negation of the result.
24972 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
24974 PR rtl-optimization/84878
24975 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
24976 the basic block. Assert the use reference is not artificial and that
24977 it has an associated insn.
24979 2018-04-04 Michael Matz <matz@suse.de>
24981 * builtins.c (compute_objsize): Pass correct operand
24982 to array_at_struct_end_p.
24984 2018-04-04 Richard Biener <rguenther@suse.de>
24987 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
24988 from contexts for DINFO_LEVEL_TERSE and below.
24990 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
24992 * config/nds32/nds32-doubleword.md (move_<mode>): Require
24993 resiter_operand condition.
24994 * config/nds32/nds32.md (*move<mode>): Ditto.
24996 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
24997 Monk Chiang <sh.chiang04@gmail.com>
24999 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
25001 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
25003 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
25005 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
25006 Kito Cheng <kito.cheng@gmail.com>
25008 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
25009 nds32_cond_code_str, output_cond_branch,
25010 output_cond_branch_compare_zero, nds32_expand_cbranch,
25011 nds32_expand_cstore, nds32_expand_movcc,
25012 nds32_output_cbranchsi4_equality_zero,
25013 nds32_output_cbranchsi4_equality_reg,
25014 nds32_output_cbranchsi4_equality_reg_or_const_int,
25015 nds32_output_cbranchsi4_greater_less_zero: New functions.
25016 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
25017 nds32_expand_cstore, nds32_expand_movcc,
25018 nds32_output_cbranchsi4_equality_zero,
25019 nds32_output_cbranchsi4_equality_reg,
25020 nds32_output_cbranchsi4_equality_reg_or_const_int,
25021 nds32_output_cbranchsi4_greater_less_zero): Declare.
25022 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
25023 nds32_rimm11s_operand): New predicates.
25024 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
25025 * config/nds32/nds32.md: Rewrite all the branch and conditional move
25028 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
25030 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
25031 * config/nds32/nds32.md: Ditto.
25032 * config/nds32/pipelines.md: Ditto.
25034 2018-04-04 Richard Biener <rguenther@suse.de>
25036 PR tree-optimization/85168
25037 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
25038 propagating abnormals.
25040 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
25042 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
25044 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
25045 Kito Cheng <kito.cheng@gmail.com>
25047 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
25048 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
25049 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
25050 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
25051 * config/nds32/nds32.md (sibcall_internal): New.
25052 (sibcall_register): Remove.
25053 (sibcall_immediate): Remove.
25054 (sibcall_value_internal): New.
25055 (sibcall_value_register): Remove.
25056 (sibcall_value_immediate): Remove.
25057 * config/nds32/predicates.md (nds32_general_register_operand): New.
25058 (nds32_call_address_operand): New.
25060 2018-04-03 Jakub Jelinek <jakub@redhat.com>
25062 PR rtl-optimization/85167
25063 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
25064 bb_defs if *split_p, instead preinitialize it to NULL.
25066 PR tree-optimization/85156
25067 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
25068 evaluating the argument multiple times.
25070 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
25072 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
25074 (_mm_cvtpd_ps): Likewise.
25075 (_mm_cvttpd_epi32): Likewise.
25076 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
25077 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
25078 vector, pixel, and bool following altivec.h include.
25080 2018-04-03 Martin Sebor <msebor@redhat.com>
25082 * doc/extend.texi (Common Function Attributes): Clarify.
25083 (const attribute): Likewise.
25084 (pure attribute): Likewise.
25086 2018-04-03 Jakub Jelinek <jakub@redhat.com>
25089 * config/i386/i386.c (ix86_expand_vector_set): Use
25090 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
25092 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
25094 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
25095 instructions when changing rounding bits to preserve precision bits
25096 in the x87 control word.
25098 2018-04-03 Martin Liska <mliska@suse.cz>
25100 PR tree-optimization/82491
25101 * rtl.h (strip_offset_and_add): Replace += suboffset with
25102 poly_uint64 () + suboffset.
25104 2018-03-29 Martin Liska <mliska@suse.cz>
25105 Martin Jambor <mjambor@suse.cz>
25108 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
25109 param_type is not an integral or pointer type.
25111 2018-04-03 Richard Biener <rguenther@suse.de>
25113 * sese.h (recompute_all_dominators): Remove.
25115 2018-04-02 Martin Sebor <msebor@redhat.com>
25117 * doc/invoke.texi (-Wrestrict): Fix typos.
25119 2018-04-02 Jim Wilson <jimw@sifive.com>
25121 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
25122 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
25123 (<optab>di3, <optab>si3_extend): Likewise.
25124 (<optab>si3_mask, <optab>si3_mask_1): New.
25125 (<optab>di3_mask, <optab>di3_mask_1): New.
25126 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
25127 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
25128 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
25130 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
25132 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
25135 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
25137 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
25138 (nds32_canonicalize_comparison): New function.
25140 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
25141 Kito Cheng <kito.cheng@gmail.com>
25142 Kuan-Lin Chen <kuanlinchentw@gmail.com>
25144 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
25145 * config/nds32/constants.md (unspec_volatile_element): Add
25146 UNSPEC_VOLATILE_RELAX_GROUP.
25147 * config/nds32/nds32-relax-opt.c: New file.
25148 * config/nds32/nds32-predicates.c
25149 (nds32_symbol_load_store_p): New function.
25150 * config/nds32/nds32-protos.h
25151 (nds32_symbol_load_store_p): Declare function.
25152 (make_pass_nds32_relax_opt): Declare new rtl pass function.
25153 * config/nds32/nds32.c
25154 (nds32_register_pass): New function to register pass.
25155 (nds32_register_passes): New function to register passes.
25156 * config/nds32/nds32.md (relax_group): New pattern.
25157 * config/nds32/nds32.opt (mrelax-hint): New option.
25158 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
25160 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
25162 * config/nds32/t-nds32: Modify files dependency.
25164 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
25166 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
25167 (PROFILE_HOOK): Define its implementation.
25169 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
25171 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
25172 type and 32-bit size.
25174 2018-04-01 Jakub Jelinek <jakub@redhat.com>
25176 PR middle-end/85090
25177 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
25178 (V_128_256): New mode iterator.
25179 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
25180 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
25181 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
25183 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
25184 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
25186 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
25189 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
25190 NaN inputs correctly.
25192 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
25195 * config/rs6000/vsx.md (??r): New mode attribute.
25196 (*vsx_mov<mode>_64bit): Use it.
25197 (*vsx_mov<mode>_32bit): Likewise.
25199 2018-03-30 Martin Sebor <msebor@redhat.com>
25201 PR tree-optimization/84818
25202 * builtins.c (check_access): Use warning_n.
25204 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25207 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
25209 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
25212 2018-03-30 Julia Koval <julia.koval@intel.com>
25215 * x86-tune.def (movx, partial_reg_dependency): Enable for
25218 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
25220 PR inline-asm/84985
25221 * lra-constraints.c (process_alt_operands): Move setting
25222 this_alternative_matches below.
25224 2018-03-29 Martin Liska <mliska@suse.cz>
25227 * doc/invoke.texi: Document how LTO works with debug info.
25228 Describe auto-load support of binutils. Mention 'x86-64'
25229 as valid option value of -march option.
25231 2018-03-29 Jakub Jelinek <jakub@redhat.com>
25233 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
25236 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
25237 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
25238 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
25241 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
25244 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
25245 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
25246 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
25247 for RS6000_BTM_POWERPC64.
25248 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
25249 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
25250 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
25253 (DIVDEU): Likewise.
25255 2018-03-28 Carl Love <cel@us.ibm.com>
25258 2017-09-27 Carl Love <cel@us.ibm.com>
25260 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
25261 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
25262 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
25265 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25267 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
25268 instead of __vector bool.
25269 (_mm_max_pu8): Likewise.
25270 (_mm_min_pi16): Likewise.
25272 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
25275 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
25276 (DIVWEUO): Likewise.
25277 (DIVDEO): Likewise.
25278 (DIVDEUO): Likewise.
25279 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
25280 DIVWEUO and DIVDEUO.
25281 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
25282 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
25283 (div_extend): Likewise.
25284 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
25286 (__builtin_divweuo): Likewise.
25287 (__builtin_divdeo): Likewise.
25288 (__builtin_divdeuo): Likewise.
25290 2018-03-28 Jakub Jelinek <jakub@redhat.com>
25293 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
25294 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
25296 PR tree-optimization/82004
25297 * gimple-match-head.c (optimize_pow_to_exp): New function.
25298 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
25299 Don't fold to exp if optimize_pow_to_exp is false.
25301 2018-03-28 Martin Liska <mliska@suse.cz>
25304 * calls.c (initialize_argument_information): Fix trailing space.
25305 * common.opt: Fix typo and provide better explanation for
25306 -fsanitize-coverage option.
25307 * config/i386/i386.opt: Fix typo.
25309 2018-03-28 Jakub Jelinek <jakub@redhat.com>
25310 Martin Liska <mliska@suse.cz>
25313 * gimplify.c (asan_poison_variable): Don't do the check for
25314 gimplify_omp_ctxp here.
25315 (gimplify_decl_expr): Do it here.
25316 (gimplify_target_expr): Likewise.
25318 2018-03-28 Martin Liska <mliska@suse.cz>
25321 * config/i386/i386.c (ix86_function_arg_advance): Do not call
25322 chkp_type_bounds_count if MPX is not enabled.
25324 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
25326 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
25328 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
25331 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
25332 function to create the function decl for complex long double
25333 multiply and divide for -mabi=ieeelongdouble.
25334 (init_float128_ieee): Call it.
25336 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
25339 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
25340 -fcf-protection=branch -mibt.
25341 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
25343 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
25346 * config/arm/arm.c (arm_valid_symbolic_address): Handle
25347 arm_word_relocations.
25349 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
25352 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
25353 extern array declarations.
25355 2018-03-27 Richard Biener <rguenther@suse.de>
25357 PR middle-end/84067
25358 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
25359 explicit single_use checks.
25361 2018-03-27 Richard Biener <rguenther@suse.de>
25363 PR tree-optimization/85082
25364 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
25367 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
25369 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
25370 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
25371 Turn on fasynchronous-unwind-tables and funwind-tables.
25373 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
25376 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
25377 (*bmi_blsr_<mode>_ccz): Ditto.
25379 2018-03-26 Tom de Vries <tom@codesourcery.com>
25381 PR tree-optimization/85063
25382 * omp-general.c (offloading_function_p): New function. Factor out
25384 * omp-offload.c (pass_omp_target_link::gate): ... here.
25385 * omp-general.h (offloading_function_p): Declare.
25386 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
25387 with attribute omp declare target for offloading functions.
25389 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
25391 PR tree-optimization/84005
25392 * tree-data-ref.h (get_base_for_alignment): Declare.
25393 * tree-data-ref.c (get_base_for_alignment_1): New function.
25394 (get_base_for_alignment): Likewise.
25395 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
25396 get_base_for_alignment to find a suitable base object, instead
25397 of always using drb->base_address.
25399 2018-03-23 Jakub Jelinek <jakub@redhat.com>
25401 PR inline-asm/85022
25402 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
25403 known size by default.
25405 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
25407 PR inline-asm/85030
25408 * lra-constraints.c (process_alt_operands): Don't match BLKmode
25409 and non BLKmode operands.
25411 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25414 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
25415 Clean up attributes.
25417 2018-03-23 Richard Biener <rguenther@suse.de>
25420 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
25421 we are going to emit early debug for LTO.
25423 2018-03-23 Jakub Jelinek <jakub@redhat.com>
25425 PR inline-asm/85034
25426 * function.c (match_asm_constraints_1): Don't optimize if input
25427 doesn't satisfy general_operand predicate for output's mode.
25429 PR inline-asm/85022
25430 * alias.c (write_dependence_p): Don't require for x_canonicalized
25431 non-VOIDmode if x has VOIDmode.
25434 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
25435 just don't try to optimize it rather than assert it never happens.
25437 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
25439 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
25440 macro expansions for definition of ST_INTERNAL_<mode> and
25441 LD_INTERNAL_<mode> builtins.
25442 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
25444 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
25446 (altivec_expand_st_builtin): Likewise.
25447 (altivec_expand_builtin): Remove calls to deleted functions.
25448 (rs6000_address_for_altivec): Delete this function.
25449 * config/rs6000/vector.md: Remove expands for
25450 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
25452 2018-03-22 Sudakshina Das <sudi.das@arm.com>
25455 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
25456 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
25457 re-computing once computed.
25458 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
25459 (arm_init_machine_status): Initialize
25460 machine->static_chain_stack_bytes.
25462 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
25465 * doc/extend.texi: Add four new prototypes for vec_ld.
25466 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
25467 definitions for more logical presentation.
25468 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
25469 entries for V1TI variants of __builtin_altivec_ld builtin.
25470 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
25471 handling of V1TI variant of LVX icode pattern.
25472 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
25473 (rs6000_gimple_fold_builtin): Likewise.
25474 (altivec_init_builtins): Add code to define
25475 __builtin_altivec_lvx_v1ti function.
25477 2018-03-22 Jakub Jelinek <jakub@redhat.com>
25479 PR inline-asm/84941
25480 * function.c (match_asm_constraints_1): Don't do the optimization
25481 if input isn't a REG, SUBREG, MEM or constant.
25483 2018-03-22 Tom de Vries <tom@codesourcery.com>
25485 PR tree-optimization/84956
25486 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
25487 bb_has_abnormal_pred.
25489 2018-03-22 Jakub Jelinek <jakub@redhat.com>
25492 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
25493 DECL_INITIAL (decl) to decl at the end.
25494 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
25495 adjust the comment.
25497 2018-03-21 Joseph Myers <joseph@codesourcery.com>
25499 * doc/extend.texi (__builtin_tgmath): Document when complex
25500 integer types are treated as _Complex _Float64.
25502 2018-03-21 Tom de Vries <tom@codesourcery.com>
25504 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
25506 2018-03-21 Jakub Jelinek <jakub@redhat.com>
25508 PR tree-optimization/84960
25509 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
25510 if it is ENTRY block, move them into single succ of ENTRY in that case.
25512 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
25514 PR tree-optimization/84811
25515 * poly-int.h (poly_span_traits): Remove the T3 parameter and
25516 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
25517 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
25518 (known_subrange_p): Update accordingly. Cast each value involved
25519 in the size comparison, rather than casting the result of the
25522 2018-03-21 Jakub Jelinek <jakub@redhat.com>
25524 PR tree-optimization/84982
25525 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
25526 by flipping the least significant bit rather than all bits from
25527 bitpos to bitpos + bitsize - 1.
25529 2018-03-21 Nathan Sidwell <nathan@acm.org>
25531 * doc/extend.texi (Deprecated Features): Remove mention of
25532 long-deleted deprecations.
25534 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25537 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
25538 * configure: Regenerate.
25540 2018-03-21 Tom de Vries <tom@codesourcery.com>
25542 PR tree-optimization/83126
25543 * tree-parloops.c (num_phis): New function.
25544 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
25546 2018-03-21 Nathan Sidwell <nathan@acm.org>
25548 * doc/extend.texi (Deprecated Features): Update deprecated flags,
25549 mention anon-struct/union members and trailing attributes.
25551 2018-03-21 Bin Cheng <bin.cheng@arm.com>
25553 PR tree-optimization/84969
25554 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
25555 builtin memset partitions if they set different rhs values.
25557 2018-03-21 Jakub Jelinek <jakub@redhat.com>
25559 PR rtl-optimization/84989
25560 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
25561 VEC_DUPLICATE with scalar result mode.
25563 2018-03-21 Martin Liska <mliska@suse.cz>
25566 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
25567 not intended return statement.
25569 2018-03-21 Martin Liska <mliska@suse.cz>
25572 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
25573 (chkp_find_bound_slots_1): Limit number of iterations.
25575 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
25578 * Minor grammar fixes for x86 options.
25580 2018-03-20 Jakub Jelinek <jakub@redhat.com>
25583 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
25584 holding REG_CFA_RESTORE notes, instead turn them into a USE.
25586 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
25589 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
25590 (altivec_lvx_<mode>_1op): Likewise.
25591 (altivec_stvx_<mode>_2op): Likewise.
25592 (altivec_stvx_<mode>_1op): Likewise.
25593 (altivec_lvx_<VM2:mode>): New define_expand.
25594 (altivec_stvx_<VM2:mode>): Likewise.
25595 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
25596 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25597 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
25598 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25599 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
25600 (rs6000_gen_lvx): Likewise.
25601 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
25602 (altivec_expand_stv_builtin): Likewise.
25603 (altivec_expand_builtin): Likewise.
25604 * config/rs6000/vector.md: Likewise.
25606 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25609 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
25612 2018-03-20 Richard Biener <rguenther@suse.de>
25615 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
25616 sign-conversions as zero, fall back to standard scalar_stmt
25619 2018-03-20 Martin Liska <mliska@suse.cz>
25622 * predict.c (rebuild_frequencies): Handle case when we have
25623 PROFILE_ABSENT, but flag_guess_branch_prob is false.
25625 2018-03-20 Jakub Jelinek <jakub@redhat.com>
25628 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
25629 flag_section_anchors.
25630 * varasm.c (use_blocks_for_decl_p): Remove hack for
25631 dw2_force_const_mem.
25634 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
25636 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
25637 be created, use lowpart_subreg of operands[0] rather than operands[0]
25639 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
25640 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
25641 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
25642 and n constraint instead of aarch64_shift_imm_di and Usd.
25643 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
25644 (*aarch64_<optab>_reg_minus<mode>3): ... this.
25646 2018-03-20 Sudakshina Das <sudi.das@arm.com>
25649 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
25650 to favor GPR over NEON registers.
25651 (<shift>di3_neon): Likewise.
25653 2018-03-20 Tom de Vries <tom@codesourcery.com>
25656 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
25657 (nvptx_process_pars): Emit bar.sync asap and alap.
25659 2018-03-20 Tom de Vries <tom@codesourcery.com>
25662 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
25663 seen_label if seen_label is already set.
25665 2018-03-20 Jakub Jelinek <jakub@redhat.com>
25668 * config/i386/i386.c (fold_builtin_cpu): For features above 31
25669 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
25670 Use 1U instead of 1. Formatting fixes.
25673 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
25674 instead of TREE_TYPE (s1) for the return value.
25676 2018-03-19 Jakub Jelinek <jakub@redhat.com>
25678 PR tree-optimization/84946
25679 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
25680 bitsize + bitsize in poly_uint64 rather than poly_int64.
25683 * dwarf2asm.c: Include fold-const.c.
25684 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
25685 of decl rather than decl itself.
25687 PR rtl-optimization/84643
25688 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
25690 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
25693 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
25694 calling assemble_variable.
25696 2018-03-19 Sudakshina Das <sudi.das@arm.com>
25699 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
25700 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
25702 2018-03-19 Jim Wilson <jimw@sifive.com>
25705 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
25706 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
25707 (riscv_first_stack_step): Likewise.
25708 (riscv_option_override): Use STACK_BOUNDARY instead of
25709 MIN_STACK_BOUNDARY.
25710 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
25711 MIN_STACK_BOUNDARY.
25712 (BIGGEST_ALIGNMENT): Set to 128.
25713 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
25714 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
25717 2018-03-19 Richard Biener <rguenther@suse.de>
25719 PR tree-optimization/84933
25720 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
25721 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
25723 2018-03-19 Richard Biener <rguenther@suse.de>
25725 PR tree-optimization/84859
25726 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
25727 (cond_if_else_store_replacement): Perform sinking operation on
25728 single-store BBs regardless of MAX_STORES_TO_SINK setting.
25729 Generalize what a BB with a single eligible store is.
25731 2018-03-19 Richard Biener <rguenther@suse.de>
25733 PR tree-optimization/84929
25734 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
25735 chrec_is_positive against non-chrec arg.
25737 2018-03-19 Tamar Christina <tamar.christina@arm.com>
25740 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
25742 2018-03-18 Martin Liska <mliska@suse.cz>
25744 PR rtl-optimization/84635
25745 * regrename.c (build_def_use): Use matches_mode only when
25748 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
25750 PR tree-optimization/84913
25751 * tree-vect-loop.c (vectorizable_reduction): Don't try to
25752 vectorize chains of COND_EXPRs.
25754 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25756 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
25758 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25760 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
25762 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25764 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
25766 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
25767 Kito Cheng <kito.cheng@gmail.com>
25769 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
25770 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
25771 (nds32_adjust_reg_alloc_order): New function.
25772 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
25774 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
25776 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
25777 nds32_print_operand, nds32_print_operand_address): Use
25778 HOST_WIDE_INT_PRINT_DEC instead.
25780 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
25782 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
25784 2018-03-17 Jakub Jelinek <jakub@redhat.com>
25787 * config/i386/i386.c (initial_ix86_tune_features,
25788 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
25789 unsigned long long.
25790 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
25791 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
25792 rather than 1u << ix86_tune. Formatting fix.
25793 (ix86_option_override_internal): Change ix86_arch_mask from
25794 unsigned int to unsigned HOST_WIDE_INT, initialize to
25795 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
25796 (ix86_function_specific_restore): Likewise.
25798 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25801 * postreload.c (reload_combine_recognize_pattern): Perform
25802 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
25803 truncate_int_for_mode the result for the destination's mode.
25806 * hsa-gen.c (mem_type_for_type): Fix comment typo.
25807 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
25809 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25812 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
25815 * lra-assigns.c (lra_split_hard_reg_for): Don't use
25816 regno_allocno_class_array and sorted_pseudos.
25817 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
25818 insns where regno is used.
25820 2018-03-16 Martin Liska <mliska@suse.cz>
25823 * multiple_target.c (create_dispatcher_calls): Redirect
25824 reference in the symbol table.
25826 2018-03-16 Martin Liska <mliska@suse.cz>
25829 * multiple_target.c (create_dispatcher_calls): Redirect also
25832 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25836 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
25837 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
25838 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
25840 2018-03-16 Julia Koval <julia.koval@intel.com>
25842 * doc/invoke.texi (Skylake Server): Add CLWB.
25843 Cannonlake): Remove CLWB.
25845 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25847 PR tree-optimization/84841
25848 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
25850 (FLOAT_ONE_CONST_TYPE): Define.
25851 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
25852 (sort_by_operand_rank): Put entries with higher constant_type last
25853 rather than first to match comments.
25855 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
25857 * config/nios2/nios2.md (movsi_internal): Fix thinko in
25860 2018-03-15 Jakub Jelinek <jakub@redhat.com>
25863 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
25864 check and use address of target always.
25866 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
25869 * config/i386/i386.c (indirect_thunk_needed): Update comments.
25870 (indirect_thunk_bnd_needed): Likewise.
25871 (indirect_thunks_used): Likewise.
25872 (indirect_thunks_bnd_used): Likewise.
25873 (indirect_return_needed): New.
25874 (indirect_return_bnd_needed): Likewise.
25875 (output_indirect_thunk_function): Add a bool argument for
25877 (output_indirect_thunk_function): Don't generate alias for
25878 function return thunk.
25879 (ix86_code_end): Call output_indirect_thunk_function to generate
25880 function return thunks.
25881 (ix86_output_function_return): Set indirect_return_bnd_needed
25882 and indirect_return_needed instead of indirect_thunk_bnd_needed
25883 and indirect_thunk_needed.
25885 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
25887 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
25888 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
25889 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
25891 2018-03-15 David Malcolm <dmalcolm@redhat.com>
25892 Paul Hua <paul.hua.gm@gmail.com>
25895 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
25897 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
25899 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
25900 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
25901 resp. SFmode cases.
25903 2018-03-15 Tamar Christina <tamar.christina@arm.com>
25906 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
25907 instead of GET_MODE_SIZE when comparing Units.
25909 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
25912 * varasm.c (hash_section): Return an unchangeble hash value
25913 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
25914 Return !aarch64_can_use_per_function_literal_pools_p ().
25916 2018-03-15 Jakub Jelinek <jakub@redhat.com>
25919 * optabs.c (emit_conditional_move): Pass address of cmode's copy
25920 rather than address of cmode as last argument to prepare_cmp_insn.
25922 2018-03-15 Julia Koval <julia.koval@intel.com>
25924 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
25925 F_AVX512VNNI, F_AVX512BITALG): New.
25927 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
25930 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
25931 insn for floating-point loads and stores.
25933 2018-03-14 Carl Love <cel@us.ibm.com>
25935 * config/rs6000/rs6000-c.c: Add macro definitions for
25936 ALTIVEC_BUILTIN_VEC_PERMXOR.
25937 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
25938 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
25939 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
25940 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
25942 * config/doc/extend.texi: Add prototypes for vec_permxor.
25944 2018-03-14 David Malcolm <dmalcolm@redhat.com>
25947 * diagnostic-show-locus.c (class layout_point): Convert m_line
25948 from int to linenum_type.
25949 (line_span::comparator): Use linenum "compare" function when
25950 comparing line numbers.
25951 (test_line_span): New function.
25952 (layout_range::contains_point): Convert param "row" from int to
25954 (layout_range::intersects_line_p): Likewise.
25955 (layout::will_show_line_p): Likewise.
25956 (layout::print_source_line): Likewise.
25957 (layout::should_print_annotation_line_p): Likewise.
25958 (layout::print_annotation_line): Likewise.
25959 (layout::print_leading_fixits): Likewise.
25960 (layout::annotation_line_showed_range_p): Likewise.
25961 (struct line_corrections): Likewise for field m_row.
25962 (line_corrections::line_corrections): Likewise for param "row".
25963 (layout::print_trailing_fixits): Likewise.
25964 (layout::get_state_at_point): Likewise.
25965 (layout::get_x_bound_for_row): Likewise.
25966 (layout::print_line): Likewise.
25967 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
25968 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
25969 * input.c (selftest::test_linenum_comparisons): New function.
25970 (selftest::input_c_tests): Call it.
25971 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
25972 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
25973 * selftest.h (ASSERT_GT): New macro.
25974 (ASSERT_GT_AT): New macro.
25975 (ASSERT_LT): New macro.
25976 (ASSERT_LT_AT): New macro.
25978 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
25980 PR rtl-optimization/84780
25981 * combine.c (distribute_links): Don't make a link based on pc_rtx.
25983 2018-03-14 Martin Liska <mliska@suse.cz>
25985 * tree.c (record_node_allocation_statistics): Use
25986 get_stats_node_kind.
25987 (get_stats_node_kind): New function extracted from
25988 record_node_allocation_statistics.
25989 (free_node): Use get_stats_node_kind.
25991 2018-03-14 Richard Biener <rguenther@suse.de>
25993 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
25994 that the value-set of ANTIC_IN doesn't grow.
25997 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25999 (BB_VISITED_WITH_VISITED_SUCCS): New define.
26000 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26002 2018-03-14 Julia Koval <julia.koval@intel.com>
26004 * config.gcc (icelake-client, icelake-server): New.
26006 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
26007 (initial_ix86_arch_features): Ditto.
26008 (PTA_SKYLAKE): Add SGX.
26009 (PTA_ICELAKE): Remove.
26010 (PTA_ICELAKE_CLIENT): New.
26011 (PTA_ICELAKE_SERVER): New.
26012 (ix86_option_override_internal): Split up icelake on icelake client and
26014 (get_builtin_code_for_version): Ditto.
26015 (fold_builtin_cpu): Ditto.
26016 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
26017 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
26018 * config/i386/i386.h (processor_type): Ditto.
26019 * doc/invoke.texi: Ditto.
26021 2018-03-14 Jakub Jelinek <jakub@redhat.com>
26024 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
26025 INTEGER_CST offset, add it together with bitpos / 8 and
26026 sign extend based on POINTER_SIZE.
26030 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
26033 * config/i386/constraints.md (Yc): New register constraint.
26034 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
26035 Use Yc constraint for alternative 2 of operand 0. Remove
26036 preferred_for_speed attribute.
26038 2018-03-14 Richard Biener <rguenther@suse.de>
26040 PR tree-optimization/84830
26041 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
26042 with the old one to avoid oscillations.
26044 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
26047 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
26049 (assign_by_spills): Return a flag of reload assignment failure.
26050 Do not process the reload assignment failures. Do not spill other
26051 reload pseudos if they has the same reg class. Update n if
26053 (lra_assign): Add a return arg. Set up from the result of
26054 assign_by_spills call.
26055 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26056 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
26057 usage_insns if it is not NULL.
26058 (spill_hard_reg_in_range): New function.
26059 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26060 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26061 function prototypes.
26062 (lra_assign): Change prototype.
26063 * lra.c (lra): Add code to deal with fails by splitting hard reg
26066 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
26068 * config/riscv/riscv.opt (mrelax): New option.
26069 * config/riscv/riscv.c (riscv_file_start): Emit ".option
26070 "norelax" when riscv_mrelax is disabled.
26071 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
26073 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26076 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
26077 reassociation for int modes.
26079 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
26081 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
26082 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
26084 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
26085 * config/aarch64/aarch64-sve.md
26086 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
26087 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
26088 (*extend<mode><Vwide>2): Rename to...
26089 (aarch64_sve_extend<mode><Vwide>2): ...this.
26090 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
26091 renaming the old pattern to...
26092 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
26094 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
26095 define_expand, renaming the old pattern to...
26096 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
26097 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
26098 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
26099 account when deciding which SVE instruction the optab should use.
26100 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
26102 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
26104 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
26105 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
26106 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
26107 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
26108 (tlsdesc_small_<mode>): Turn a define_expand and use
26109 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
26110 (tlsdesc_small_advsimd_<mode>): ...this.
26111 (tlsdesc_small_sve_<mode>): New pattern.
26113 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
26115 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
26116 (UNSPEC_UMUL_HIGHPART): New constants.
26117 (MUL_HIGHPART): New int iteraor.
26118 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
26119 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
26121 (*<su>mul<mode>3_highpart): New define_insn.
26123 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
26126 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
26129 2018-03-13 Martin Liska <mliska@suse.cz>
26132 * (sem_item_optimizer::sem_item_optimizer): Initialize new
26134 (sem_item_optimizer::~sem_item_optimizer): Release it.
26135 (sem_item_optimizer::merge_classes): Register variable aliases.
26136 (sem_item_optimizer::fixup_pt_set): New function.
26137 (sem_item_optimizer::fixup_points_to_sets): Likewise.
26138 * ipa-icf.h: Declare new variables and functions.
26140 2018-03-13 Jakub Jelinek <jakub@redhat.com>
26142 PR middle-end/84834
26143 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
26144 integer_pow2p@2 and test integer_pow2p in condition.
26145 (A < 0 ? C : 0): Similarly for @1.
26147 PR middle-end/84831
26148 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
26149 characters starting at p contain '\0' character, don't look beyond
26153 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
26154 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
26157 * reg-stack.c (change_stack): Change update_end var from int to
26158 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
26159 also call set_block_for_insn on the newly added insns and rescan.
26162 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
26163 on the last operand.
26166 * tree.c (stabilize_reference_1): Return save_expr (e) for
26167 STATEMENT_LIST even if it doesn't have side-effects.
26169 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
26171 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
26173 2018-03-12 Renlin Li <renlin.li@arm.com>
26175 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
26176 aarch64_output_scalar_simd_mov_immediate.
26178 2018-03-12 Martin Sebor <msebor@redhat.com>
26180 PR tree-optimization/83456
26181 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
26182 for perfectly overlapping calls to memcpy.
26183 (gimple_fold_builtin_memory_chk): Same.
26184 (gimple_fold_builtin_strcpy): Handle no-warning.
26185 (gimple_fold_builtin_stxcpy_chk): Same.
26186 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
26188 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
26190 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
26191 parameter. Use it for SFmode.
26192 (rs6000_function_arg_advance_1): Adjust.
26193 (rs6000_function_arg): Adjust.
26194 (rs6000_gimplify_va_arg): Pass false for that new parameter.
26196 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
26198 PR rtl-optimization/84169
26199 PR rtl-optimization/84780
26200 * combine.c (can_combine_p): Check for a 2-insn combination whether
26201 the destination register is used between the two insns, too.
26203 2018-03-12 Richard Biener <rguenther@suse.de>
26205 PR tree-optimization/84803
26206 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
26207 for refs DR analysis didn't process.
26209 2018-03-12 Richard Biener <rguenther@suse.de>
26211 PR tree-optimization/84777
26212 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
26213 force-vectorize loops ignore whether we are optimizing for size.
26215 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
26217 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
26218 (TARGET_MD_ASM_ADJUST): Define.
26220 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
26221 Kito Cheng <kito.cheng@gmail.com>
26222 Chung-Ju Wu <jasonwucj@gmail.com>
26224 * config/nds32/nds32.c (nds32_compute_stack_frame,
26225 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
26226 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
26227 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
26228 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
26229 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
26230 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
26231 * config/nds32/nds32.md (prologue, epilogue): Use macro
26232 NDS32_V3PUSH_AVAILABLE_P to do checking.
26234 2018-03-11 Jakub Jelinek <jakub@redhat.com>
26237 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
26238 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
26239 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
26240 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
26241 addition of most attributes on !orig_type_die or the attribute not
26242 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
26244 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
26245 Chung-Ju Wu <jasonwucj@gmail.com>
26247 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
26248 __NDS32_VH__ macro.
26249 * config/nds32/nds32.opt (mvh): New option.
26251 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
26252 Chung-Ju Wu <jasonwucj@gmail.com>
26254 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
26256 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
26257 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
26260 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
26261 Chung-Ju Wu <jasonwucj@gmail.com>
26263 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
26265 * config/nds32/nds32-multiple.md (strlensi): New pattern.
26266 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
26268 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
26269 Kito Cheng <kito.cheng@gmail.com>
26270 Chung-Ju Wu <jasonwucj@gmail.com>
26272 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
26273 UNSPEC_FFMISM and UNSPEC_FLMISM.
26274 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
26275 for ffb, ffmism and flmism.
26276 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
26277 (unspec_ffmism): Ditto.
26278 (unspec_flmism): Ditto.
26279 (nds32_expand_builtin_impl): Check if string extension is available.
26280 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
26281 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
26283 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
26286 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
26289 * lra-assigns.c (assign_by_spills): Return a flag of reload
26290 assignment failure. Do not process the reload assignment
26291 failures. Do not spill other reload pseudos if they has the same
26293 (lra_assign): Add a return arg. Set up from the result of
26294 assign_by_spills call.
26295 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26296 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
26297 usage_insns if it is not NULL.
26298 (spill_hard_reg_in_range): New function.
26299 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26300 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26301 function prototypes.
26302 (lra_assign): Change prototype.
26303 * lra.c (lra): Add code to deal with fails by splitting hard reg
26306 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
26309 * config/i386/i386.opt: Replace Enforcment with Enforcement.
26311 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
26314 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
26315 (dw_val_node): Add val_symbolic_view.
26316 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
26317 (symview_upper_bound): New.
26318 (new_line_info_table): Initialize symviews_since_reset.
26319 (dwarf2out_source_line): Count symviews_since_reset and set
26320 symview_upper_bound.
26321 (dw_val_equal_p): Handle symview.
26322 (add_AT_symview): New.
26323 (print_dw_val): Handle symview.
26324 (attr_checksum, attr_checksum_ordered): Likewise.
26325 (same_dw_val_p, size_of_die): Likewise.
26326 (value_format, output_die): Likewise.
26327 (add_high_low_attributes): Use add_AT_symview for entry_view.
26328 (dwarf2out_finish): Reset symview_upper_bound, clear
26331 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
26334 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
26335 Add strict argument and use it.
26336 (rs6000_split_multireg_move): Update for new strict argument.
26337 (mem_operand_gpr): Disallow all non-offsettable addresses.
26338 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
26340 2018-03-09 Jakub Jelinek <jakub@redhat.com>
26343 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
26344 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
26345 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
26348 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
26349 decl, use remap_type if we want to use the type.
26351 2018-03-09 Martin Sebor <msebor@redhat.com>
26353 PR tree-optimization/84526
26354 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
26356 (builtin_access::generic_overlap): Be prepared to handle non-array
26359 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
26361 PR rtl-optimization/84682
26362 * lra-constraints.c (process_address_1): Check is_address flag
26363 for address constraints.
26364 (process_alt_operands): Likewise.
26365 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
26366 preprocess_constraints.
26367 * recog.h (preprocess_constraints): Add oploc parameter.
26369 * recog.c (preprocess_constraints): Test address_operand for
26370 CT_ADDRESS constraints.
26372 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
26375 * lra-assigns.c (assign_by_spills): Return a flag of reload
26376 assignment failure. Do not process the reload assignment
26377 failures. Do not spill other reload pseudos if they has the same
26379 (lra_assign): Add a return arg. Set up from the result of
26380 assign_by_spills call.
26381 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26382 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
26383 usage_insns if it is not NULL.
26384 (spill_hard_reg_in_range): New function.
26385 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26386 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26387 function prototypes.
26388 (lra_assign): Change prototype.
26389 * lra.c (lra): Add code to deal with fails by splitting hard reg
26392 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26395 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
26396 Accept complain bool parameter. Only emit errors if it is true.
26397 (arm_parse_cpu_option_name): Likewise.
26398 (arm_target_thumb_only): Adjust callers of the above.
26399 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
26400 prototype to take a default true bool parameter.
26401 (arm_parse_arch_option_name): Likewise.
26403 2018-03-09 David Malcolm <dmalcolm@redhat.com>
26404 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
26408 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
26409 * configure: Regenerate.
26410 * configure.ac ("linker --version-script option"): New.
26411 ("linker soname option"): New.
26413 2018-03-09 Richard Biener <rguenther@suse.de>
26415 PR tree-optimization/84775
26416 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
26417 immediate uses of predicate stmts and mark them modified.
26420 PR tree-optimization/84178
26421 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26423 (version_loop_for_if_conversion): Delay update_ssa call.
26424 (tree_if_conversion): Delay update_ssa until after predicate
26427 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
26430 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
26431 when the function accesses prior frames.
26433 2018-03-08 Jakub Jelinek <jakub@redhat.com>
26436 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
26437 gen_llsym, otherwise call maybe_gen_llsym.
26439 PR inline-asm/84742
26440 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
26441 has ',' character inside of it.
26443 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26446 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
26447 as clobbering CC_REGNUM.
26449 2018-03-08 Richard Biener <rguenther@suse.de>
26451 PR middle-end/84552
26452 * tree-scalar-evolution.c: Include tree-into-ssa.h.
26453 (follow_copies_to_constant): Do not follow SSA names registered
26456 2018-03-08 Richard Biener <rguenther@suse.de>
26458 PR tree-optimization/84178
26459 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26461 (version_loop_for_if_conversion): Delay update_ssa call.
26462 (tree_if_conversion): Delay update_ssa until after predicate
26465 2018-03-08 David Malcolm <dmalcolm@redhat.com>
26467 PR tree-optimization/84178
26468 * tree-if-conv.c (release_bb_predicate): Remove the
26469 the assertion that the stmts have NULL use_ops.
26470 Discard the statements, asserting that they haven't
26471 yet been added to a BB.
26473 2018-03-08 Richard Biener <rguenther@suse.de>
26475 PR tree-optimization/84746
26476 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
26477 (phi_translate): Pass in destination ANTIC_OUT set.
26478 (phi_translate_1): Likewise. For a simplified result lookup
26479 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
26480 (phi_translate_set): Adjust.
26481 (do_pre_regular_insertion): Likewise.
26482 (do_pre_partial_partial_insertion): Likewise.
26484 2018-03-08 Martin Liska <mliska@suse.cz>
26486 PR gcov-profile/84735
26487 * doc/gcov.texi: Document usage of profile files.
26488 * gcov-io.h: Document changes in the format.
26490 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
26494 * dwarf2out.c (struct dw_line_info_table): Update comments for
26496 (FORCE_RESET_NEXT_VIEW): New.
26497 (FORCE_RESETTING_VIEW_P): New.
26498 (RESETTING_VIEW_P): Check for -1 too.
26499 (ZERO_VIEW_P): Likewise.
26500 (new_line_info_table): Force-reset next view.
26501 (dwarf2out_begin_function): Likewise.
26502 (dwarf2out_source_line): Simplify zero_view_p initialization.
26503 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
26504 view directly. Omit view when omitting .loc at line 0.
26506 2018-03-08 Jakub Jelinek <jakub@redhat.com>
26508 PR tree-optimization/84740
26509 * tree-switch-conversion.c (process_switch): Call build_constructors
26510 only if info.phi_count is non-zero.
26512 PR tree-optimization/84739
26513 * tree-tailcall.c (find_tail_calls): Check call arguments against
26514 DECL_ARGUMENTS (current_function_decl) rather than
26515 DECL_ARGUMENTS (func) when checking for tail recursion.
26517 2018-03-07 Jakub Jelinek <jakub@redhat.com>
26519 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
26520 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
26521 Volker Reichelt's entry and add entries for people that perform
26522 GCC fuzzy testing and report numerous bugs.
26524 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
26527 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
26528 readonly data in sdata, if that is disabled.
26529 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
26530 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
26531 -mreadonly-in-sdata option.
26533 2018-03-07 Martin Sebor <msebor@redhat.com>
26535 PR tree-optimization/84468
26536 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
26537 basic block when looking for nul assignment.
26539 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
26542 * except.h (output_function_exception_table): Adjust prototype.
26543 * except.c (output_function_exception_table): Remove FNNAME parameter
26544 and add SECTION parameter. Ouput one part of the table at a time.
26545 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
26546 the first part of the exception table and emit unwind directives.
26547 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
26548 (i386_pe_seh_cold_init): Likewise.
26549 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
26550 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
26551 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
26552 (ix86_output_call_insn): Emit a nop in one more case for SEH.
26553 * config/i386/winnt.c: Include except.h.
26554 (struct seh_frame_state): Add reg_offset, after_prologue and
26555 in_cold_section fields.
26556 (i386_pe_seh_end_prologue): Set seh->after_prologue.
26557 (i386_pe_seh_cold_init): New function.
26558 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
26559 to seh->in_cold_section.
26560 (seh_emit_push): Record the offset of the push.
26561 (seh_emit_save): Record the offet of the save.
26562 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
26563 Test seh->after_prologue to disregard the epilogue.
26564 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
26565 (i386_pe_end_cold_function): New function.
26567 2018-03-07 Jakub Jelinek <jakub@redhat.com>
26570 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
26571 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
26574 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
26576 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
26577 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
26579 PR middle-end/84723
26580 * multiple_target.c: Include tree-inline.h and intl.h.
26581 (expand_target_clones): Diagnose and fail if node->definition and
26582 !tree_versionable_function_p (node->decl).
26584 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
26586 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
26588 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
26589 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
26590 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
26592 2018-03-06 Jakub Jelinek <jakub@redhat.com>
26595 * combine.c (try_combine): Use reg_or_subregno instead of handling
26596 just paradoxical SUBREGs and REGs.
26598 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
26600 * config/arc/arc.c (arc_finalize_pic): Remove function.
26601 (arc_must_save_register): We use single base PIC register, remove
26602 checks to save/restore the PIC register.
26603 (arc_expand_prologue): Likewise.
26604 * config/arc/arc-protos.h (arc_set_default_type_attributes):
26606 (arc_verify_short): Likewise.
26607 (arc_attr_type): Likewise.
26608 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
26609 (walk_stores): Likewise.
26610 (arc_address_cost): Make it static.
26611 (arc_verify_short): Likewise.
26612 (branch_dest): Likewise.
26613 (arc_attr_type): Likewise.
26614 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
26615 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
26616 (arc_final_prescan_insn): Remove inserting the nops due to
26617 hardware hazards. It is done in reorg step.
26618 (insn_length_variant_t): Remove.
26619 (insn_length_parameters_t): Likewise.
26620 (arc_insn_length_parameters): Likewise.
26621 (arc_get_insn_variants): Likewise.
26622 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
26624 2018-03-06 Jakub Jelinek <jakub@redhat.com>
26626 PR inline-asm/84683
26627 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
26630 PR tree-optimization/84687
26631 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
26633 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
26635 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26637 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
26638 Rename to ppc_speculation_barrier.
26639 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
26640 __builtin_ppc_speculation_barrier.
26642 2018-03-05 Jakub Jelinek <jakub@redhat.com>
26645 * combine.c (combine_simplify_rtx): Don't try to simplify if
26646 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
26649 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
26651 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
26652 to 32 bytes when compiling for POWER9.
26654 2018-03-05 Jakub Jelinek <jakub@redhat.com>
26657 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
26658 regparm >= 3 with no arg reg available also for calls with
26659 flag_force_indirect_call. Pass decl to ix86_function_regparm.
26662 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
26664 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
26666 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
26669 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
26671 2018-03-05 Richard Biener <rguenther@suse.de>
26673 PR tree-optimization/84486
26674 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
26675 When inserting a __builtin_assume_aligned call set the LHS
26676 SSA name alignment info accordingly.
26678 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
26680 PR tree-optimization/84114
26681 * config/aarch64/aarch64.c (aarch64_reassociation_width)
26682 Avoid reassociation of FLOAT_MODE addition.
26684 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
26686 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
26687 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
26688 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
26689 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
26690 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
26691 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
26692 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
26694 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
26695 __builtin_ia32_wbinvd): New builtins.
26696 (SPECIAL_ARGS2): New.
26697 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
26698 (SPECIAL_ARGS2): New.
26699 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
26700 (ix86_valid_target_attribute_inner_p): Ditto.
26701 (ix86_init_mmx_sse_builtins): Add special_args2.
26702 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
26703 TARGET_WBNOINVD_P): New.
26704 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
26705 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
26706 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
26707 * config/i386/immintrin.h (_wbinvd): New intrinsic.
26708 * config/i386/pconfigintrin.h: New file.
26709 * config/i386/wbnoinvdintrin.h: Ditto.
26710 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
26712 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
26714 2018-03-05 Richard Biener <rguenther@suse.de>
26716 PR tree-optimization/84670
26717 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
26719 (BB_VISITED_WITH_VISITED_SUCCS): New define.
26720 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26721 (compute_antic_aux): Only assert the number of values in ANTIC_IN
26722 doesn't grow if all successors (recursively) were visited at least
26725 2018-03-05 Richard Biener <rguenther@suse.de>
26727 PR tree-optimization/84650
26728 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
26729 if executed in the loop pipeline.
26731 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
26733 * doc/configfiles.texi (Configuration Files): Move info about
26734 conditionalizing $target-protos.h to...
26735 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
26736 differs from $target-protos.h.
26738 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
26739 Chung-Ju Wu <jasonwucj@gmail.com>
26741 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
26742 * config/nds32/nds32-multiple.md (setmemsi): Define.
26743 * config/nds32/nds32-memory-manipulation.c
26744 (nds32_gen_dup_4_byte_to_word_value): New.
26745 (emit_setmem_word_loop): New.
26746 (emit_setmem_byte_loop): New.
26747 (nds32_expand_setmem_loop): New.
26748 (nds32_expand_setmem_loop_v3m): New.
26749 (nds32_expand_setmem_unroll): New.
26750 (nds32_expand_setmem): New.
26752 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26753 Chung-Ju Wu <jasonwucj@gmail.com>
26755 * config/nds32/nds32-memory-manipulation.c
26756 (nds32_emit_load_store): New.
26757 (nds32_emit_post_inc_load_store): New.
26758 (nds32_emit_mem_move): New.
26759 (nds32_emit_mem_move_block): New.
26760 (nds32_expand_movmemsi_loop_unknown_size): New.
26761 (nds32_expand_movmemsi_loop_known_size): New.
26762 (nds32_expand_movmemsi_loop): New.
26763 (nds32_expand_movmemsi_unroll): New.
26764 (nds32_expand_movmemqi): Rename ...
26765 (nds32_expand_movmemsi): ... to this.
26766 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
26767 (movmemsi): ... to this.
26768 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
26769 (nds32_expand_movmemsi): ... to this.
26771 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26772 Monk Chiang <sh.chiang04@gmail.com>
26773 Chung-Ju Wu <jasonwucj@gmail.com>
26775 * config/nds32/nds32-protos.h
26776 (nds32_expand_load_multiple): New arguments.
26777 (nds32_expand_store_multiple): Ditto.
26778 (nds32_valid_multiple_load_store): Rename ...
26779 (nds32_valid_multiple_load_store_p): ... to this.
26780 * config/nds32/nds32-memory-manipulation.c
26781 (nds32_expand_load_multiple): Refine implementation.
26782 (nds32_expand_store_multiple): Ditto.
26783 * config/nds32/nds32-multiple.md
26784 (load_multiple): Update nds32_expand_load_multiple interface.
26785 (store_multiple): Update nds32_expand_store_multiple interface.
26786 * config/nds32/nds32-predicates.c
26787 (nds32_valid_multiple_load_store): Rename ...
26788 (nds32_valid_multiple_load_store_p): ... to this and refine
26790 * config/nds32/predicates.md
26791 (nds32_load_multiple_and_update_address_operation): New predicate.
26792 (nds32_store_multiple_and_update_address_operation): New predicate.
26794 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26795 Chung-Ju Wu <jasonwucj@gmail.com>
26797 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
26798 (combo): New attribute.
26799 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
26801 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
26803 * config/nds32/nds32.opt: Change -mcmodel= default value.
26805 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
26806 Monk Chiang <sh.chiang04@gmail.com>
26807 Chung-Ju Wu <jasonwucj@gmail.com>
26809 * config/nds32/constants.md (unspec_element): New enum.
26810 * config/nds32/constraints.md (Umw): New constraint.
26811 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
26812 * config/nds32/nds32-intrinsic.md: Likewise.
26813 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
26814 (nds32_valid_smw_lwm_base_p): New.
26815 (nds32_output_smw_single_word): New.
26816 (nds32_output_lmw_single_word): New.
26817 (nds32_expand_unaligned_load): New.
26818 (nds32_expand_unaligned_store): New.
26819 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
26820 (nds32_output_smw_single_word): Declare.
26821 (nds32_output_lmw_single_word): Declare.
26822 (nds32_expand_unaligned_load): Declare.
26823 (nds32_expand_unaligned_store): Declare.
26824 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
26825 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
26826 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
26827 NDS32_BUILTIN_UASTORE_DW.
26828 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
26831 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
26832 Kito Cheng <kito.cheng@gmail.com>
26833 Chung-Ju Wu <jasonwucj@gmail.com>
26835 * config/nds32/nds32-intrinsic.c
26836 (nds32_expand_builtin_null_ftype_reg): Delete.
26837 (nds32_expand_builtin_reg_ftype_imm): Ditto.
26838 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
26839 (nds32_read_argument): New.
26840 (nds32_legitimize_target): Ditto.
26841 (nds32_legitimize_argument): Ditto.
26842 (nds32_check_constant_argument): Ditto.
26843 (nds32_expand_unop_builtin): Ditto.
26844 (nds32_expand_unopimm_builtin): Ditto.
26845 (nds32_expand_binop_builtin): Ditto.
26846 (nds32_builtin_decl_impl): Ditto.
26847 (builtin_description): Ditto.
26848 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
26849 (nds32_init_builtins_impl): Ditto.
26850 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
26851 (nds32_builtin_decl): New.
26852 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
26853 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
26855 2018-03-02 Jeff Law <law@redhat.com>
26857 * reorg.c (stop_search_p): Handle DEBUG_INSN.
26858 (redundant_insn, fill_simple_delay_slots): Likewise.
26859 (fill_slots_from_thread): Likewise.
26860 * resource.c (mark_referenced_resources): Likewise.
26861 (mark_set_resources, find_dead_or_set_registers): Likewise.
26863 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26865 * substring-locations.h (format_warning_va): Formatting fix for
26866 ATTRIBUTE_GCC_DIAG.
26867 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
26869 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
26870 * substring-locations.c: Include intl.h.
26871 (format_warning_va): Turned into small wrapper around
26872 format_warning_n_va, renamed to ...
26873 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
26874 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
26876 (format_warning_at_substring_n): New function.
26877 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
26878 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
26879 format_warning_at_substring with just a shorter name instead of
26880 const function pointer.
26881 (fmtwarn_n): New function.
26882 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
26883 appropriate, get rid of all the fmtstr temporaries, move conditionals
26884 with G_() wrapped string literals directly into fmtwarn arguments,
26885 cast dir.len to (int), formatting fixes.
26887 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
26889 * doc/invoke.texi: Remove "Cilk Plus" references.
26891 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26892 Richard Biener <rguenther@suse.de>
26895 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
26896 for error or warning attributes if CALL_FROM_THUNK_P is set.
26899 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26902 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
26903 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
26906 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
26907 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
26909 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
26910 instead of -1U in last predictors element's probability member.
26912 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
26915 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
26916 arguments if they are comparable.
26918 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
26920 PR tree-optimization/84634
26921 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
26922 masks and masked_loop_p with a single loop_masks, making sure it's
26923 null for bb vectorization.
26925 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
26927 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
26928 (vect_analyze_data_ref_access): Use loop->safe_len rather than
26929 loop->force_vectorize to check whether there is no alias.
26931 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26934 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
26936 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
26938 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
26939 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
26940 instead of a loop around prev_real_insn.
26941 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
26944 PR inline-asm/84625
26945 * config/i386/i386.c (ix86_print_operand): Use conditional
26946 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
26949 2018-03-02 Richard Biener <rguenther@suse.de>
26951 PR tree-optimization/84427
26952 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
26953 (bitmap_set_subtract_values): Rewrite to handle multiple
26956 (prune_clobbered_mems): Likewise.
26957 (phi_translate): Take edge instead of pred/phiblock.
26958 (phi_translate_1): Likewise.
26959 (phi_translate_set): Likewise. Insert all translated
26960 exprs for a value into the set, keeping possibly multiple
26961 expressions per value.
26962 (compute_antic_aux): Adjust for phi_translate changes.
26963 When intersecting union the expressions and prune those
26964 not in the final value set, keeping possibly multiple
26965 expressions per value. Do not use value-insertion
26966 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
26967 all expressions. Add verification that the value-sets
26968 only shrink during iteration.
26969 (compute_partial_antic_aux): Adjust for the phi_translate changes.
26970 (do_pre_regular_insertion): Likewise.
26971 (do_pre_partial_partial_insertion): Likewise.
26973 2018-03-02 Richard Biener <rguenther@suse.de>
26976 * config/darwin.c (saved_debug_info_level): New static global.
26977 (darwin_asm_lto_start): Disable debug info generation for LTO out.
26978 (darwin_asm_lto_end): Restore debug info generation settings.
26980 2018-03-01 Martin Liska <mliska@suse.cz>
26983 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
26984 volatile arguments.
26986 2018-03-01 Richard Biener <rguenther@suse.de>
26989 * dwarf2out.c (gen_variable_die): Properly handle late VLA
26990 type annotation with LTO when debug was disabled at compile-time.
26992 2018-03-01 Matthew Fortune <mfortune@gmail.com>
26994 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
26996 (mips_final_postscan_insn): Likewise.
26998 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
27000 PR rtl-optimization/84528
27001 * alias.c (init_alias_target): Add commentary.
27002 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
27003 a unique base value if the frame pointer is not eliminated
27004 to the stack pointer.
27006 2018-03-01 Tom de Vries <tom@codesourcery.com>
27008 PR rtl-optimization/83327
27009 * lra-int.h (hard_regs_spilled_into): Declare.
27010 * lra.c (hard_regs_spilled_into): Define.
27011 (init_reg_info): Init hard_regs_spilled_into.
27012 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
27013 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
27014 (process_bb_lives): Handle hard_regs_spilled_into.
27015 (lra_create_live_ranges_1): Before doing liveness propagation, clear
27016 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
27018 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
27020 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
27021 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
27022 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
27023 * config/rs6000/aix72.h: New file.
27025 2018-02-28 Jakub Jelinek <jakub@redhat.com>
27027 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
27028 instead of warning_at with conditional singular and plural messages
27032 * stor-layout.c (update_alignment_for_field): For
27033 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
27034 && !DECL_PACKED (field), do the alignment update, just use
27035 only desired_align instead of MAX (type_align, desired_align)
27037 (place_field): Don't do known_align < desired_align handling
27038 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
27039 is non-NULL, instead do it after rli->prev_field handling and
27040 only if not within a bitfield word. For DECL_PACKED (field)
27041 use type_align of BITS_PER_UNIT.
27043 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
27045 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
27046 superfluous parentheses and trailing spaces.
27048 2018-02-28 Richard Biener <rguenther@suse.de>
27050 PR tree-optimization/84584
27051 * graphite-scop-detection.c (scop_detection::add_scop): Discard
27052 SCoPs with fake exit edge.
27054 2018-02-28 Martin Liska <mliska@suse.cz>
27057 * timevar.c (timer::print): Fix format to properly print 100%
27060 2018-02-28 Richard Biener <rguenther@suse.de>
27062 PR middle-end/84607
27063 * genmatch.c (capture_info::walk_match): Do not mark
27064 captured expressions without operands as expr_p given
27065 they act more like predicates and should be subject to
27066 "lost tail" side-effect preserving.
27068 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
27070 PR rtl-optimization/81611
27071 * auto-inc-dec.c (attempt_change): Move dead note from
27072 mem_insn if it's the next use of regno
27073 (find_address): Take address use of reg holding
27074 non-incremented value. Add parm to limit search to the named
27076 (merge_in_block): Attempt to use a mem insn that is the next
27077 use of the original regno.
27079 2018-02-27 Martin Sebor <msebor@redhat.com>
27082 * doc/invoke.texi (-Wmissing-attributes): New option.
27083 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
27085 2018-02-27 Martin Sebor <msebor@redhat.com>
27087 PR translation/84207
27088 * diagnostic-core.h (warning_n, error_n, inform_n): Change
27089 n argument to unsigned HOST_WIDE_INT.
27090 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
27091 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
27092 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
27093 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
27095 2018-02-27 Richard Biener <rguenther@suse.de>
27097 PR tree-optimization/84512
27098 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
27099 Do not use the estimate returned from record_stmt_cost for
27100 the scalar iteration cost but sum properly using add_stmt_cost.
27102 2018-02-27 Richard Biener <rguenther@suse.de>
27104 PR tree-optimization/84466
27105 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27106 Adjust last change to less strictly validate use operands.
27108 2018-02-27 Martin Liska <mliska@suse.cz>
27110 PR gcov-profile/84548
27111 * gcov.c (process_file): Allow partial overlap and consider it
27112 also as group functions.
27113 (output_lines): Properly calculate range of lines for a group.
27115 2018-02-27 Martin Liska <mliska@suse.cz>
27117 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
27118 'ggc' suffixes. Change first column width.
27119 (timer::print): Fix formatting of the column.
27121 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
27123 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
27124 preserve inline entry blocks for the sake of debug inline
27125 entry point markers alone.
27126 (remove_unused_locals): Suggest in comments a better place to
27127 force the preservation of inline entry blocks that are
27128 otherwise unused, but do not preserve them.
27130 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
27132 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
27134 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
27137 * config/i386/constraints.md (Bs): Replace
27138 ix86_indirect_branch_register with
27139 TARGET_INDIRECT_BRANCH_REGISTER.
27141 * config/i386/i386.md (indirect_jump): Likewise.
27142 (tablejump): Likewise.
27143 (*sibcall_memory): Likewise.
27144 (*sibcall_value_memory): Likewise.
27145 Peepholes of indirect call and jump via memory: Likewise.
27146 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
27147 (*sibcall_value_GOT_32): Likewise.
27148 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27149 (GOT_memory_operand): Likewise.
27150 (call_insn_operand): Likewise.
27151 (sibcall_insn_operand): Likewise.
27152 (GOT32_symbol_operand): Likewise.
27153 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
27155 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
27157 PR rtl-optimization/83496
27158 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
27159 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
27160 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
27161 redundant insn, if any.
27162 (relax_delay_slots): Likewise.
27163 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
27165 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
27167 PR tree-optimization/83965
27168 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
27169 that grouped statements are part of a reduction chain. Return
27170 true if the statement is not marked as a reduction itself but
27171 is part of a group.
27172 (vect_recog_dot_prod_pattern): Don't check whether the statement
27173 is part of a group here.
27174 (vect_recog_sad_pattern): Likewise.
27175 (vect_recog_widen_sum_pattern): Likewise.
27177 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
27180 * final.c (rest_of_clean_state): Also look for calls inside sequences.
27182 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
27185 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
27187 (ix86_output_indirect_function_return): New prototype.
27188 (ix86_split_simple_return_pop_internal): Likewise.
27189 * config/i386/i386.c (indirect_return_via_cx): New.
27190 (indirect_return_via_cx_bnd): Likewise.
27191 (indirect_thunk_name): Handle return va CX_REG.
27192 (output_indirect_thunk_function): Create alias for
27193 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
27194 (ix86_output_indirect_jmp): Remove the bool argument.
27195 (ix86_output_indirect_function_return): New function.
27196 (ix86_split_simple_return_pop_internal): Likewise.
27197 * config/i386/i386.md (*indirect_jump): Don't pass false
27198 to ix86_output_indirect_jmp.
27199 (*tablejump_1): Likewise.
27200 (simple_return_pop_internal): Change it to define_insn_and_split.
27201 Call ix86_split_simple_return_pop_internal to split it for
27202 -mfunction-return=.
27203 (simple_return_indirect_internal): Call
27204 ix86_output_indirect_function_return instead of
27205 ix86_output_indirect_jmp.
27207 2018-02-26 Jakub Jelinek <jakub@redhat.com>
27210 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
27211 memset and value initialization afterwards.
27213 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
27215 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
27217 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
27220 * common/config/aarch64/aarch64-common.c
27221 (aarch_option_optimization_table[]): Switch
27222 off fomit-frame-pointer
27224 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
27225 Chung-Ju Wu <jasonwucj@gmail.com>
27227 * config/nds32/nds32-multiple.md (load_multiple): Disallow
27229 (store_multiple): Ditto.
27231 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
27233 * config.gcc: Add --with-cpu support for nds32 target.
27234 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
27235 * config/nds32/nds32.opt: Add -mcpu= option.
27237 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
27239 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
27240 isel=yes): Warn for these deprecated options.
27242 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
27244 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
27245 ISA_2_5_MASKS_EMBEDDED.
27247 2018-02-23 Jakub Jelinek <jakub@redhat.com>
27249 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
27250 p->max as pointers rather than using iterative_hash_expr.
27252 2018-02-23 Carl Love <cel@us.ibm.com>
27254 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
27255 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
27257 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
27258 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
27259 P8V_BUILTIN_VEC_VUNSIGNED2.
27261 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
27264 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
27265 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
27267 * lra-constraints.c (curr_insn_transform): Set up
27268 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
27270 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
27271 * lra-eliminations.c (spill_pseudos): Ditto.
27272 (process_insn_for_elimination): Ditto.
27273 * lra-lives.c (reg_early_clobber_p): Use the new macros.
27274 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
27275 LRA_NON_CLOBBERED_ALT.
27277 2018-02-22 Martin Sebor <msebor@redhat.com>
27279 PR tree-optimization/84480
27280 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
27281 to maybe_diag_stxncpy_trunc. Call it.
27282 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
27283 from gimple_fold_builtin_strcpy. Print inlining stack.
27284 (handle_builtin_stxncpy): Print inlining stack.
27285 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
27287 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
27290 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
27291 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
27292 and -fcheck-pointer-bounds are used together.
27293 (indirect_thunk_prefix): New enum.
27294 (indirect_thunk_need_prefix): New function.
27295 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
27296 "_nt" instead of "_bnd" for NOTRACK prefix.
27297 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
27298 (output_indirect_thunk_function): Likewise.
27300 (ix86_code_end): Update output_indirect_thunk_function calls.
27301 (ix86_output_indirect_branch_via_reg): Replace
27302 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
27303 (ix86_output_indirect_branch_via_push): Likewise.
27304 (ix86_output_function_return): Likewise.
27305 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
27306 incompatible with -fcf-protection=branch and
27307 -fcheck-pointer-bounds.
27309 2018-02-22 Steve Ellcey <sellcey@cavium.com>
27312 * config/aarch64/aarch64.c (aarch64_print_address_internal):
27313 Change gcc_assert call to output_operand_lossage.
27315 2018-02-22 Steve Ellcey <sellcey@cavium.com>
27317 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
27319 2018-02-22 DJ Delorie <dj@redhat.com>
27320 Sebastian Perta <sebastian.perta@renesas.com>
27321 Oleg Endo <olegendo@gcc.gnu.org>
27323 * config/rx/rx.c (rx_rtx_costs): New function.
27324 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
27326 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
27328 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
27330 2018-02-22 Martin Liska <mliska@suse.cz>
27333 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
27334 Add "native" as a possible value.
27336 2018-02-22 Martin Liska <mliska@suse.cz>
27339 * config/i386/i386.c (ix86_option_override_internal):
27340 Add "native" as a possible value for -march and -mtune.
27342 2018-02-22 Jakub Jelinek <jakub@redhat.com>
27345 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
27346 to all type variants.
27348 PR tree-optimization/84503
27349 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
27350 width as info->bitpos + info->bitsize - start.
27351 (merged_store_group::merge_overlapping): Simplify width computation.
27352 (check_no_overlap): New function.
27353 (imm_store_chain_info::try_coalesce_bswap): Compute expected
27354 start + width and last_order of the group, fail if check_no_overlap
27356 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
27357 to group if check_no_overlap fails.
27359 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
27361 * config/rs6000/altivec.md: Delete contraint arguments to
27362 define_expand, define_split, and define_peephole2, and in
27363 define_insn_and_split if always unused.
27364 * config/rs6000/darwin.md: Ditto.
27365 * config/rs6000/dfp.md: Ditto.
27366 * config/rs6000/rs6000.md: Ditto.
27367 * config/rs6000/sync.md: Ditto.
27368 * config/rs6000/vector.md: Ditto.
27369 * config/rs6000/vsx.md: Ditto.
27371 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
27373 * config/rs6000/altivec.md: Write output control strings as braced
27374 blocks instead of double-quoted strings.
27375 * config/rs6000/darwin.md: Ditto.
27376 * config/rs6000/rs6000.md: Ditto.
27377 * config/rs6000/vector.md: Ditto.
27378 * config/rs6000/vsx.md: Ditto.
27380 2018-02-21 Jason Merrill <jason@redhat.com>
27382 PR c++/84314 - ICE with templates and fastcall attribute.
27383 * attribs.c (build_type_attribute_qual_variant): Remove assert.
27385 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
27387 * ipa-cp.c (determine_versionability): Fix comment typos.
27389 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
27392 * ipa-cp.c (determine_versionability): Do not version functions caling
27395 2018-02-21 Martin Liska <mliska@suse.cz>
27398 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
27399 Add "native" as a possible value.
27400 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
27401 the macro when native cpu detection is available.
27403 2018-02-21 Martin Liska <mliska@suse.cz>
27406 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
27407 Add "native" as a possible value.
27408 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
27409 when native cpu detection is available.
27411 2018-02-21 Jakub Jelinek <jakub@redhat.com>
27412 Martin Sebor <msebor@redhat.com>
27414 PR tree-optimization/84478
27415 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
27417 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
27418 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
27419 support which is conservatively correct, for 2 only stay conservative
27420 for maxlen. Formatting and comment capitalization fixes. Add STRICT
27421 argument to the 2 argument get_range_strlen, adjust 6 arg
27422 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
27424 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
27425 (gimple_fold_builtin_strlen): Pass true as last argument to
27428 2018-02-20 Martin Sebor <msebor@redhat.com>
27430 PR middle-end/84095
27431 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
27432 (builtin_memref::set_base_and_offset): Same. Handle inner references.
27433 (builtin_memref::builtin_memref): Factor out parts into
27434 set_base_and_offset and call it.
27436 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
27438 PR middle-end/84406
27439 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
27440 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
27441 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
27442 search at the associated MODE_INT.
27444 2018-02-20 Jeff Law <law@redhat.com>
27446 PR middle-end/82123
27447 PR tree-optimization/81592
27448 PR middle-end/79257
27449 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
27450 for range data rather than using global data.
27451 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
27452 range data rather than using global data.
27453 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
27454 pass it to children as needed.
27455 (struct directive::fmtresult): Similarly.
27456 (struct directive::set_width): Similarly.
27457 (struct directive::set_precision): Similarly.
27458 (format_integer, format_directive, parse_directive): Similarly.
27459 (format_none): Accept unnamed vr_values parameter.
27460 (format_percent, format_floating, format_character): Similarly.
27461 (format_string, format_plain): Similarly.
27462 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
27463 the EVRP range analyzer for range data rather than using global data.
27464 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
27465 gimple-ssa-evrp-analyze.h
27466 (class sprintf_dom_walker): Add after_dom_children member function.
27467 Add evrp_range_analyzer member.
27468 (sprintf_dom_walker::before_dom_children): Call into the EVRP
27469 range analyzer as needed.
27470 (sprintf_dom_walker::after_dom_children): New member function.
27471 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
27473 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
27474 (evrp_range_analyzer::pop_to_marker): Likewise.
27476 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
27478 PR tree-optimization/84419
27479 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
27480 with the required type if its current type is compatible but
27483 2018-02-20 Jakub Jelinek <jakub@redhat.com>
27485 PR middle-end/82004
27486 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
27487 after vectorization.
27489 2018-02-20 Martin Liska <mliska@suse.cz>
27492 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
27493 possible values if we don't have a hint.
27495 2018-02-20 Martin Liska <mliska@suse.cz>
27499 * final.c (shorten_branches): Build align_tab array with one
27501 * opts.c (finish_options): Add alignment option limit check.
27502 (MAX_CODE_ALIGN): Likewise.
27503 (MAX_CODE_ALIGN_VALUE): Likewise.
27504 * doc/invoke.texi: Document maximum allowed option value for
27505 all -falign-* options.
27507 2018-02-19 Jakub Jelinek <jakub@redhat.com>
27510 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
27511 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
27512 * var-tracking.c (emit_note_insn_var_location): Remove all references
27513 to NOTE_INSN_CALL_ARG_LOCATION.
27514 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
27515 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
27516 Use copy_rtx_if_shared.
27517 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
27518 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
27519 (dwarf2out_var_location): Remove handling of
27520 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
27522 * final.c (final_scan_insn): Remove all references to
27523 NOTE_INSN_CALL_ARG_LOCATION.
27524 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
27525 before dumping final insns.
27526 * except.c (emit_note_eh_region_end): Remove all references to
27527 NOTE_INSN_CALL_ARG_LOCATION.
27528 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
27529 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
27530 * config/arc/arc.c (hwloop_optimize): Likewise.
27531 * config/arm/arm.c (create_fix_barrier): Likewise.
27532 * config/s390/s390.c (s390_chunkify_start): Likewise.
27533 * config/sh/sh.c (find_barrier): Likewise.
27534 * config/i386/i386.c (rest_of_insert_endbranch,
27535 ix86_seh_fixup_eh_fallthru): Likewise.
27536 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
27537 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
27538 * config/frv/frv.c (frv_function_prologue): Likewise.
27539 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
27541 (note_outside_basic_block_p): Remove all references to
27542 NOTE_INSN_CALL_ARG_LOCATION.
27543 * gengtype.c (adjust_field_rtx_def): Likewise.
27544 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
27546 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
27547 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
27550 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
27553 PR tree-optimization/84452
27554 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
27555 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
27558 2018-02-19 Martin Liska <mliska@suse.cz>
27561 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
27563 2018-02-19 Martin Liska <mliska@suse.cz>
27564 Richard Sandiford <richard.sandiford@linaro.org>
27566 PR tree-optimization/82491
27567 * gimple-fold.c (get_base_constructor): Make earlier bail out
27570 2018-02-19 Carl Love <cel@us.ibm.com>
27572 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
27573 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
27575 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
27576 P8V_BUILTIN_VEC_NEG.
27578 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
27580 * config/rl78/rl78.md (movdf): New define expand.
27582 2018-02-19 Martin Liska <mliska@suse.cz>
27585 * doc/invoke.texi: Fix typo.
27586 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
27588 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
27590 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
27591 handle rs6000_single_float and rs6000_double_float specially for
27594 2018-02-16 Jeff Law <law@redhat.com>
27596 * config/rx/rx.c (add_pop_cfi_notes): New function.;
27597 (pop_regs): Use it.
27599 2018-02-16 Jakub Jelinek <jakub@redhat.com>
27602 * ipa-inline.c (inline_small_functions): Fix a typo.
27604 2018-02-16 Nathan Sidwell <nathan@acm.org>
27606 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
27608 2018-02-16 Carl Love <cel@us.ibm.com>
27610 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
27611 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
27612 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
27613 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
27614 expansion to P8V_BUILTIN_VEC_FLOAT2.
27616 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
27618 PR rtl-optimization/70023
27619 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
27620 src_regno into account.
27622 2018-02-16 Carl Love <cel@us.ibm.com>
27624 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
27625 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
27626 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
27627 * config/rs6000/rs6000.c: Remove case statements for
27628 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
27629 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
27630 and P9V_BUILTIN_VEC_VINSERT4B.
27631 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
27632 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
27633 * config/rs6000/vsx.md:
27634 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
27637 2018-02-16 Carl Love <cel@us.ibm.com>
27639 * config/rs6000/altivec.h: Add builtin names vec_extract4b
27641 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
27643 * config/rs6000/rs6000-c.c: Add the definitions for
27644 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
27645 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
27646 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
27647 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
27648 definition for insert4b and define insn *insert3b_internal.
27649 * doc/extend.texi: Add documentation for vec_extract4b.
27651 2018-02-16 Nathan Sidwell <nathan@acm.org>
27653 * doc/extend.texi (Backwards Compatibility): Mention friend
27654 injection. Note for-scope is deprecated.
27655 * doc/invoke.texi (-ffriend-injection): Deprecate.
27657 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
27659 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
27660 that moved to I2, also allow destinations that are a paradoxical
27661 subreg (instead of a normal reg).
27663 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
27666 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
27669 2018-02-16 Richard Biener <rguenther@suse.de>
27671 PR tree-optimization/84037
27672 PR tree-optimization/84016
27674 * config/i386/i386.c (ix86_builtin_vectorization_cost):
27675 Adjust vec_construct for the fact we need additional higher latency
27676 128bit inserts for AVX256 and AVX512 vector builds.
27677 (ix86_add_stmt_cost): Scale vector construction cost for
27680 2018-02-16 Richard Biener <rguenther@suse.de>
27682 PR tree-optimization/84417
27683 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
27684 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
27685 (non_rewritable_lvalue_p): Likewise, use poly-ints.
27687 2018-02-16 Martin Liska <mliska@suse.cz>
27690 * internal-fn.def (ASAN_CHECK): Set proper flags.
27691 (ASAN_MARK): Likewise.
27693 2018-02-16 Julia Koval <julia.koval@intel.com>
27695 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
27696 from PTA_CANNONLAKE.
27698 2018-02-16 Jakub Jelinek <jakub@redhat.com>
27701 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
27702 Use ++iter rather than iter++ for std::list iterators.
27703 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
27704 defer deleting them until all nodes in the forest are processed. Do
27705 free even leaf nodes. Change to_process into auto_vec.
27708 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
27709 * vec.h (vec_default_construct): Use memset instead of placement new
27710 if BROKEN_VALUE_INITIALIZATION is defined.
27711 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
27712 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
27715 PR rtl-optimization/83723
27716 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
27717 * lra.c (lra_substitute_pseudo): Likewise. If true, use
27718 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
27720 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
27722 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
27724 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
27726 PR rtl-optimization/81443
27727 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
27728 from inner REGs to paradoxical SUBREGs.
27730 2018-02-16 Richard Biener <rguenther@suse.de>
27732 PR tree-optimization/84399
27733 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27734 For operands we can analyze at their definition make sure we can
27735 analyze them at each use as well.
27737 2018-02-16 Richard Biener <rguenther@suse.de>
27739 PR tree-optimization/84190
27740 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
27741 volatile accesses if the decl isn't volatile.
27743 2018-02-15 Jason Merrill <jason@redhat.com>
27745 PR c++/84314 - ICE with templates and fastcall attribute.
27746 * attribs.c (build_type_attribute_qual_variant): Don't clobber
27747 TYPE_CANONICAL on an existing type.
27749 2018-02-15 Jakub Jelinek <jakub@redhat.com>
27751 PR tree-optimization/84383
27752 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
27753 dstoff nor call operand_equal_p if dstbase is NULL.
27755 PR tree-optimization/84334
27756 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
27757 also a CONSTANT_CLASS_P, punt.
27759 2018-02-14 Jim Wilson <jimw@sifive.com>
27761 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
27762 first SMALL_OPERAND check. New local min_second_step. Move assert
27763 to where locals are set. Add TARGET_RVC support.
27764 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
27766 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
27768 * doc/invoke.texi: Correct -Wformat-overflow code sample.
27770 2018-02-14 Martin Sebor <msebor@redhat.com>
27772 PR tree-optimization/83698
27773 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
27774 arrays constrain the offset range to their bounds.
27775 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
27776 (builtin_access::overlap): Avoid setting the size of overlap if it's
27778 (maybe_diag_overlap): Also consider arrays when deciding what values
27779 of offsets to include in diagnostics.
27781 2018-02-14 Martin Sebor <msebor@redhat.com>
27784 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
27785 that correspond to the kind of a declaration.
27787 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
27790 * config/pa/pa.md: Load address of PIC label using the linkage table
27791 if the label is nonlocal.
27793 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
27795 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
27796 warning message if user requests -maltivec=be.
27797 * doc/invoke.texi: Document deprecation of -maltivec=be.
27799 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
27802 * config/rs6000/rs6000-c.c: Update definitions for
27803 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
27804 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
27806 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27809 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
27810 add _get_ssp intrinsics. Remove argument from
27811 __builtin_ia32_rdssp[d|q].
27812 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
27813 * config/i386/i386-builtin.def: Remove argument from
27814 __builtin_ia32_rdssp[d|q].
27815 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
27816 ix86_expand_special_args_builtin for _rdssp[d|q].
27817 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
27818 Clear register before usage.
27819 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
27820 Add documentation for new _get_ssp and _inc_ssp intrinsics.
27822 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
27824 PR tree-optimization/84357
27825 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
27826 operand 1 of an ARRAY_REF too.
27828 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
27831 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
27832 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27834 (set_of_reg): New struct.
27835 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
27836 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
27837 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27839 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
27840 Split into bitclr, bitset, bitinvert patterns if appropriate.
27841 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
27842 use rx_fuse_in_memory_bitop.
27843 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
27844 to named insn, correct maximum insn length.
27846 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
27849 * machmode.def: Define a complex mode for PARTIAL_INT.
27850 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
27852 * doc/rtl.texi: Document CSPImode.
27853 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
27855 (msp430_hard_regno_nregs_with_padding): Likewise.
27857 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
27860 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
27862 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
27864 PR rtl-optimization/84169
27865 * combine.c (try_combine): New variable split_i2i3. Set it to true if
27866 we generated a parallel as new i3 and we split that to new i2 and i3
27867 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
27868 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
27869 those to i2, not i1. Partially rewrite this scan code.
27871 2018-02-13 Jakub Jelinek <jakub@redhat.com>
27874 * stor-layout.c (place_field): For variable length fields, adjust
27875 offset_align afterwards not just based on the field's alignment,
27876 but also on the size.
27878 PR middle-end/84309
27879 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
27880 of exps and logs in the use_exp2 case.
27882 2018-02-13 Jeff Law <law@redhat.com>
27884 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
27885 entry for "vector".
27887 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
27890 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
27894 * common.opt (gas-loc-support, gas-locview-support): New.
27895 (ginline-points, ginternal-reset-location-views): New.
27896 * doc/invoke.texi: Document them. Use @itemx where intended.
27897 (gvariable-location-views): Adjust.
27898 * target.def (reset_location_view): New.
27899 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
27900 (TARGET_RESET_LOCATION_VIEW): New.
27901 * doc/tm.texi: Rebuilt.
27902 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
27903 (dwarf2out_default_as_locview_support): New.
27904 (output_asm_line_debug_info): Use option variables.
27905 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
27906 (output_loc_list): Likewise.
27907 (add_high_low_attributes): Check option variables.
27908 Don't output entry view attribute in strict mode.
27909 (gen_inlined_subroutine_die): Check option variables.
27910 (dwarf2out_inline_entry): Likewise.
27911 (init_sections_and_labels): Likewise.
27912 (dwarf2out_early_finish): Likewise.
27913 (maybe_reset_location_view): New, from...
27914 (dwarf2out_var_location): ... here. Call it.
27915 * debug.h (dwarf2out_default_as_loc_support): Declare.
27916 (dwarf2out_default_as_locview_support): Declare.
27917 * hooks.c (hook_int_rtx_insn_0): New.
27918 * hooks.h (hook_int_rtx_insn_0): Declare.
27919 * toplev.c (process_options): Take -gas-loc-support and
27920 -gas-locview-support from dwarf2out. Enable
27921 -gvariable-location-views by default only with locview
27922 assembler support. Enable -ginternal-reset-location-views by
27923 default only if the target defines the corresponding hook.
27924 Enable -ginline-points by default if location views are
27925 enabled; force it disabled if statement frontiers are
27927 * tree-inline.c (expand_call_inline): Check option variables.
27928 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
27930 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
27932 PR tree-optimization/84321
27933 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
27934 handling. Also check whether the anti-range contains any values
27935 that satisfy the mask; switch to a VR_RANGE if not.
27937 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
27940 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
27942 2018-02-13 Martin Jambor <mjambor@suse.cz>
27945 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
27946 of call statements, also set location of a load to a temporary.
27948 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
27950 * config/rl78/rl78.c (add_vector_labels): New function.
27951 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
27952 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
27953 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
27954 which checks that no arguments are passed.
27955 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
27956 * doc/extend.texi: Documentation for the new attribute.
27958 2018-02-13 Andreas Schwab <schwab@suse.de>
27960 * config/riscv/linux.h (CPP_SPEC): Define.
27962 2018-02-13 Jakub Jelinek <jakub@redhat.com>
27965 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
27966 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
27967 OPTION_MASK_ISA_AES as first argument to def_builtin_const
27968 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
27969 instead of OPTION_MASK_ISA_PCLMUL as first argument to
27970 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
27971 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
27972 temporarily for AES and PCLMUL builtins.
27974 PR tree-optimization/84339
27975 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
27976 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
27979 PR middle-end/84309
27980 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
27981 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
27982 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
27984 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
27986 * omp-simd-clone.h: New file.
27987 * omp-simd-clone.c: Include omp-simd-clone.h.
27988 (expand_simd_clones): No longer static.
27989 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
27990 cgraph.h and omp-simd-clone.h.
27991 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
27992 (vect_recog_widen_shift_pattern): Formatting fix.
27993 (vect_pattern_recog_1): Don't check optab for calls.
27996 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
27997 operands[2] into a REG before using gen_lowpart on it.
27999 2018-02-12 Jeff Law <law@redhat.com>
28002 * config/sh/sh.c (find_barrier): Consider a sibling call
28005 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
28006 successfully back substituting a reg.
28008 2018-02-12 Richard Biener <rguenther@suse.de>
28010 PR tree-optimization/84037
28011 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
28012 parameter, move visited init to caller.
28013 (vect_slp_analyze_operations): Separate cost from validity
28014 check, initialize visited once for all instances.
28015 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
28017 * tree-vect-stmts.c (vect_model_simple_cost): Make early
28019 (vect_model_promotion_demotion_cost): Likewise.
28020 (vectorizable_bswap): Guard cost modeling with !slp_node
28021 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
28023 (vectorizable_call): Likewise.
28024 (vectorizable_conversion): Likewise.
28025 (vectorizable_assignment): Likewise.
28026 (vectorizable_shift): Likewise.
28027 (vectorizable_operation): Likewise.
28028 (vectorizable_store): Likewise.
28029 (vectorizable_load): Likewise.
28030 (vectorizable_condition): Likewise.
28031 (vectorizable_comparison): Likewise.
28033 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
28036 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
28037 (ASAN_MARK): Fix fnspec to account for return value, change pointer
28038 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
28040 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
28042 PR middle-end/83665
28043 * params.def (inline-min-speedup): Increase from 8 to 15.
28044 (max-inline-insns-auto): Decrease from 40 to 30.
28045 * ipa-split.c (consider_split): Add some buffer for function to
28046 be considered inlining candidate.
28047 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
28050 2018-02-12 Richard Biener <rguenther@suse.de>
28052 PR tree-optimization/84037
28053 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
28054 matched stmts if we cannot swap the non-matched ones.
28056 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
28058 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
28059 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
28060 _mm_maskz_scalef_round_ss): New intrinsics.
28061 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
28062 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
28063 __builtin_ia32_scalefss_round): Remove.
28064 (__builtin_ia32_scalefsd_mask_round,
28065 __builtin_ia32_scalefss_mask_round): New intrinsics.
28066 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
28067 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
28068 ((match_operand:VF_128 2 "<round_nimm_predicate>"
28069 "<round_constraint>")): Changed to ...
28070 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
28071 "<round_scalar_constraint>")): ... this.
28072 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
28073 %0, %1, %2<round_op3>}"): Changed to ...
28074 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
28075 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
28076 %2<round_scalar_mask_op3>}"): ... this.
28077 * config/i386/subst.md (round_scalar_nimm_predicate): New.
28079 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
28081 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
28082 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
28083 (_mm_maskz_sqrt_round_ss): New intrinsics.
28084 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
28085 (__builtin_ia32_sqrtsd_mask_round)
28086 (__builtin_ia32_sqrtss_mask_round): New builtins.
28087 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
28088 (__builtin_ia32_sqrtss_round): Remove.
28089 (__builtin_ia32_sqrtsd_mask_round)
28090 (__builtin_ia32_sqrtss_mask_round): New builtins.
28091 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
28092 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
28093 ((match_operand:VF_128 1 "vector_operand"
28094 "xBm,<round_constraint>")): Changed to ...
28095 ((match_operand:VF_128 1 "vector_operand"
28096 "xBm,<round_scalar_constraint>")): ... this.
28097 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
28098 %0, %2, %<iptr>1<round_op3>}): Changed to ...
28099 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
28100 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
28101 %<iptr>1<round_scalar_mask_op3>}): ... this.
28102 ((set_attr "prefix" "<round_prefix>")): Changed to ...
28103 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
28105 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
28108 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
28109 Cast vec_cmpeq result to correct type.
28110 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
28111 Cast vec_cmpgt result to correct type.
28113 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
28115 * final.c (final_scan_insn_1): Renamed from...
28116 (final_scan_insn): ... this. New wrapper, to recover
28117 seen from the outermost call in recursive ones.
28118 * config/sparc/sparc.c (output_return): Drop seen from call.
28119 (output_sibcall): Likewise.
28120 * config/visium/visium.c (output_branch): Likewise.
28122 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
28124 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
28127 2018-02-10 Alan Modra <amodra@gmail.com>
28130 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
28131 Specify LR as an input.
28133 2018-02-10 Jakub Jelinek <jakub@redhat.com>
28136 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
28137 remove_member_access_dummy_vars): New functions.
28138 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
28139 lower_omp_1, execute_lower_omp): Use them.
28141 PR rtl-optimization/84308
28142 * shrink-wrap.c (spread_components): Release todo vector.
28144 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
28146 PR rtl-optimization/57193
28147 * ira-color.c (struct allocno_color_data): Add member
28148 conflict_allocno_hard_prefs.
28149 (update_conflict_allocno_hard_prefs): New.
28150 (bucket_allocno_compare_func): Add a preference based on
28151 conflict_allocno_hard_prefs.
28152 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
28153 (color_allocnos): Remove a dead code. Initiate
28154 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
28156 2018-02-09 Jakub Jelinek <jakub@redhat.com>
28159 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
28160 constraint from =wa to wa. Avoid a subreg on the output operand,
28161 instead use a pseudo and subreg it in a move.
28162 (p9_xxbrd_<mode>): Changed to ...
28163 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
28164 (p9_xxbrd_v2df): New expander.
28165 (p9_xxbrw_<mode>): Changed to ...
28166 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
28167 (p9_xxbrw_v4sf): New expander.
28169 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
28171 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
28173 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
28176 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
28177 multiply in 32-bit mode.
28178 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
28179 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
28182 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
28184 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
28185 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
28186 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
28187 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
28189 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
28192 * dwarf2out.c (is_trivial_indirect_ref): New function.
28193 (dwarf2out_late_global_decl): Do not generate a location
28194 attribute for variables that have a non-trivial DECL_VALUE_EXPR
28195 and that are not defined in the current unit.
28197 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
28199 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
28200 instead of a libcall for UNORDERED.
28202 2018-02-09 Tamar Christina <tamar.christina@arm.com>
28205 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
28206 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
28208 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28211 * config/s390/s390.c (s390_set_current_function): Invoke
28212 s390_indirect_branch_settings also if fndecl didn't change.
28214 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
28216 * config/rs6000/rs6000.md (blockage): Set length to zero.
28218 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
28220 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
28222 2018-02-09 Jakub Jelinek <jakub@redhat.com>
28225 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
28226 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
28230 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
28231 PARALLEL incoming that failed vt_get_decl_and_offset check.
28233 PR middle-end/84237
28234 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
28235 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
28237 (get_variable_section): For decls in named .bss* sections pass true as
28238 second argument to bss_initializer_p.
28240 2018-02-09 Marek Polacek <polacek@redhat.com>
28241 Jakub Jelinek <jakub@redhat.com>
28244 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
28245 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
28246 Sync some changes from cxx_fold_indirect_ref.
28248 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
28250 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
28252 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
28253 (BLOCK_INLINE_ENTRY_LABEL): New.
28254 (dwarf2out_var_location): Disregard inline entry markers.
28255 (inline_entry_data): New struct.
28256 (inline_entry_data_hasher): New hashtable type.
28257 (inline_entry_data_hasher::hash): New.
28258 (inline_entry_data_hasher::equal): New.
28259 (inline_entry_data_table): New variable.
28260 (add_high_low_attributes): Add DW_AT_entry_pc and
28261 DW_AT_GNU_entry_view attributes if a pending entry is found
28262 in inline_entry_data_table. Add old entry_pc attribute only
28263 if debug nonbinding markers are disabled.
28264 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
28265 markers are enabled.
28266 (block_within_block_p, dwarf2out_inline_entry): New.
28267 (dwarf2out_finish): Check that no entries remained in
28268 inline_entry_data_table.
28269 * final.c (reemit_insn_block_notes): Handle inline entry notes.
28270 (final_scan_insn, notice_source_line): Likewise.
28271 (rest_of_clean_state): Skip inline entry markers.
28272 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
28274 * gimple.c (gimple_build_debug_inline_entry): New.
28275 * gimple.h (enum gimple_debug_subcode): Add
28276 GIMPLE_DEBUG_INLINE_ENTRY.
28277 (gimple_build_debug_inline_entry): Declare.
28278 (gimple_debug_inline_entry_p): New.
28279 (gimple_debug_nonbind_marker_p): Adjust.
28280 * insn-notes.def (INLINE_ENTRY): New.
28281 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
28282 inline entry marker notes.
28283 (print_insn): Likewise.
28284 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
28285 (INSN_DEBUG_MARKER_KIND): Likewise.
28286 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
28287 * tree-inline.c (expand_call_inline): Build and insert
28288 debug_inline_entry stmt.
28289 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
28290 inline entry blocks early, if nonbind markers are enabled.
28291 (dump_scope_block): Dump fragment info.
28292 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
28293 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
28294 (gimple_build_debug_inline_entry): New.
28295 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
28296 Enable/disable inline entry points too.
28297 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
28298 (DEBUG_INSN): Describe inline entry markers.
28300 * common.opt (gvariable-location-views): New.
28301 (gvariable-location-views=incompat5): New.
28302 * config.in: Rebuilt.
28303 * configure: Rebuilt.
28304 * configure.ac: Test assembler for view support.
28305 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
28306 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
28307 * dwarf2out.c (var_loc_view): New typedef.
28308 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
28309 (dwarf2out_locviews_in_attribute): New.
28310 (dwarf2out_locviews_in_loclist): New.
28311 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
28312 (enum dw_line_info_opcode): Add LI_adv_address.
28313 (struct dw_line_info_table): Add view.
28314 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
28315 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
28316 (zero_view_p): New variable.
28317 (ZERO_VIEW_P): New macro.
28318 (output_asm_line_debug_info): New.
28319 (struct var_loc_node): Add view.
28320 (add_AT_view_list, AT_loc_list): New.
28321 (add_var_loc_to_decl): Add view param. Test it against last.
28322 (new_loc_list): Add view params. Record them.
28323 (AT_loc_list_ptr): Handle loc and view lists.
28324 (view_list_to_loc_list_val_node): New.
28325 (print_dw_val): Handle dw_val_class_view_list.
28326 (size_of_die): Likewise.
28327 (value_format): Likewise.
28328 (loc_list_has_views): New.
28329 (gen_llsym): Set vl_symbol too.
28330 (maybe_gen_llsym, skip_loc_list_entry): New.
28331 (dwarf2out_maybe_output_loclist_view_pair): New.
28332 (output_loc_list): Output view list or entries too.
28333 (output_view_list_offset): New.
28334 (output_die): Handle dw_val_class_view_list.
28335 (output_dwarf_version): New.
28336 (output_compilation_unit_header): Use it.
28337 (output_skeleton_debug_sections): Likewise.
28338 (output_rnglists, output_line_info): Likewise.
28339 (output_pubnames, output_aranges): Update version comments.
28340 (output_one_line_info_table): Output view numbers in asm comments.
28341 (dw_loc_list): Determine current endview, pass it to new_loc_list.
28342 Call maybe_gen_llsym.
28343 (loc_list_from_tree_1): Adjust.
28344 (add_AT_location_description): Create view list attribute if
28345 needed, check it's absent otherwise.
28346 (convert_cfa_to_fb_loc_list): Adjust.
28347 (maybe_emit_file): Call output_asm_line_debug_info for test.
28348 (dwarf2out_var_location): Reset views as needed. Precompute
28349 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
28350 attribute. Set view.
28351 (new_line_info_table): Reset next view.
28352 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
28353 (dwarf2out_source_line): Likewise. Output view resets and labels to
28354 the assembler, or select appropriate line info opcodes.
28355 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
28356 (optimize_string_length): Catch it. Adjust.
28357 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
28358 dw_val_class_view_list, and remove it if no longer needed.
28359 (hash_loc_list): Hash view numbers.
28360 (loc_list_hasher::equal): Compare them.
28361 (optimize_location_lists): Check whether a view list symbol is
28362 needed, and whether the locview attribute is present, and
28363 whether they match. Remove the locview attribute if no longer
28365 (index_location_lists): Call skip_loc_list_entry for test.
28366 (dwarf2out_finish): Call output_asm_line_debug_info for test.
28367 Use output_dwarf_version.
28368 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
28369 (struct dw_val_node): Add val_view_list.
28370 * final.c (SEEN_NEXT_VIEW): New.
28371 (set_next_view_needed): New.
28372 (clear_next_view_needed): New.
28373 (maybe_output_next_view): New.
28374 (final_start_function): Rename to...
28375 (final_start_function_1): ... this. Take pointer to FIRST,
28376 add SEEN parameter. Emit param bindings in the initial view.
28377 (final_start_function): Reintroduce SEEN-less interface.
28378 (final): Rename to...
28379 (final_1): ... this. Take SEEN parameter. Output final pending
28380 next view at the end.
28381 (final): Reintroduce seen-less interface.
28382 (final_scan_insn): Output pending next view before switching
28383 sections or ending a block. Mark the next view as needed when
28384 outputting variable locations. Notify debug backend of section
28385 changes, and of location view changes.
28386 (rest_of_handle_final): Adjust.
28387 * toplev.c (process_options): Autodetect value for debug variable
28388 location views option. Warn on incompat5 without -gdwarf-5.
28389 * doc/invoke.texi (gvariable-location-views): New.
28390 (gvariable-location-views=incompat5): New.
28391 (gno-variable-location-views): New.
28393 2018-02-08 David Malcolm <dmalcolm@redhat.com>
28395 PR tree-optimization/84136
28396 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
28397 that the result of find_edge is non-NULL.
28399 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
28402 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
28403 storing integer register in SImode. Fix cost of 256 and 512
28404 byte aligned SSE register store.
28406 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
28408 * config/i386/i386.c (ix86_multiplication_cost): Fix
28409 multiplication cost for TARGET_AVX512DQ.
28411 2018-02-08 Marek Polacek <polacek@redhat.com>
28413 PR tree-optimization/84238
28414 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
28417 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
28419 PR tree-optimization/84265
28420 * tree-vect-stmts.c (vectorizable_store): Don't treat
28421 VMAT_CONTIGUOUS accesses as grouped.
28422 (vectorizable_load): Likewise.
28424 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
28426 PR tree-optimization/81635
28427 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
28428 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
28429 (test_round_for_mask): New functions.
28430 (wide_int_cc_tests): Call test_round_for_mask.
28431 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
28432 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
28433 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
28434 range returned by get_range_info.
28436 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
28439 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
28440 * symtab.c: Include builtins.h
28441 (symtab_node::output_to_lto_symbol_table_p): Move here
28442 from lto-streamer-out.c:output_symbol_p.
28443 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
28444 (output_symbol_p): Move all logic to symtab.c
28445 (produce_symtab): Update.
28447 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28449 * config/s390/s390-opts.h (enum indirect_branch): Define.
28450 * config/s390/s390-protos.h (s390_return_addr_from_memory)
28451 (s390_indirect_branch_via_thunk)
28452 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
28453 (enum s390_indirect_branch_type): Define.
28454 * config/s390/s390.c (struct s390_frame_layout, struct
28455 machine_function): Remove.
28456 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
28457 (indirect_branch_table_label_no, indirect_branch_table_name):
28459 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
28460 (enum s390_indirect_branch_option): Define.
28461 (s390_return_addr_from_memory): New function.
28462 (s390_handle_string_attribute): New function.
28463 (s390_attribute_table): Add new attribute handler.
28464 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
28465 (s390_indirect_branch_via_thunk): New function.
28466 (s390_indirect_branch_via_inline_thunk): New function.
28467 (s390_function_ok_for_sibcall): When jumping via thunk disallow
28468 sibling call optimization for non z10 compiles.
28469 (s390_emit_call): Force indirect branch target to be a single
28470 register. Add r1 clobber for non-z10 compiles.
28471 (s390_emit_epilogue): Emit return jump via return_use expander.
28472 (s390_reorg): Handle JUMP_INSNs as execute targets.
28473 (s390_option_override_internal): Perform validity checks for the
28474 new command line options.
28475 (s390_indirect_branch_attrvalue): New function.
28476 (s390_indirect_branch_settings): New function.
28477 (s390_set_current_function): Invoke s390_indirect_branch_settings.
28478 (s390_output_indirect_thunk_function): New function.
28479 (s390_code_end): Implement target hook.
28480 (s390_case_values_threshold): Implement target hook.
28481 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
28483 * config/s390/s390.h (struct s390_frame_layout)
28484 (struct machine_function): Move here from s390.c.
28485 (TARGET_INDIRECT_BRANCH_NOBP_RET)
28486 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
28487 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
28488 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
28489 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
28490 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
28491 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
28492 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
28493 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
28494 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
28495 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
28496 (mnemonic attribute): Add values which aren't recognized
28498 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
28499 pattern for branch conversion. Fix mnemonic attribute.
28500 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
28501 indirect branch via thunk if requested.
28502 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
28503 ("*indirect_jump"): Disable for branch conversion using out of
28505 ("indirect_jump_via_thunk<mode>_z10")
28506 ("indirect_jump_via_thunk<mode>")
28507 ("indirect_jump_via_inlinethunk<mode>_z10")
28508 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
28509 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
28510 ("casesi_jump_via_inlinethunk<mode>_z10")
28511 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
28512 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
28513 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
28514 ("*indirect2_jump"): Disable for branch conversion.
28515 ("casesi_jump"): Turn into expander and expand patterns for branch
28517 ("return_use"): New expander.
28518 ("*return"): Emit return via thunk and rename it to ...
28519 ("*return<mode>"): ... this one.
28520 * config/s390/s390.opt: Add new options and and enum for the
28523 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
28525 * lra-constraints.c (match_reload): Unconditionally use
28526 gen_lowpart_SUBREG, rather than selecting between that
28527 and equivalent gen_rtx_SUBREG code.
28529 2018-02-08 Richard Biener <rguenther@suse.de>
28531 PR tree-optimization/84233
28532 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
28533 changed flag instead of boguously re-using phi_inserted.
28535 2018-02-08 Martin Jambor <mjambor@suse.cz>
28537 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
28538 static local variables.
28540 2018-02-08 Richard Biener <rguenther@suse.de>
28542 PR tree-optimization/84278
28543 * tree-vect-stmts.c (vectorizable_store): When looking for
28544 smaller vector types to perform grouped strided loads/stores
28545 make sure the mode is supported by the target.
28546 (vectorizable_load): Likewise.
28548 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
28550 * config/aarch64/aarch64.c (aarch64_components_for_bb):
28551 Increase LDP/STP opportunities by adding adjacent callee-saves.
28553 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
28555 PR rtl-optimization/84068
28556 PR rtl-optimization/83459
28557 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
28559 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
28561 PR tree-optimization/84224
28562 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
28563 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
28564 non-zero arguments.
28566 2018-02-07 Iain Sandoe <iain@codesourcery.com>
28569 * config/rs6000/altivec.md (*restore_world): Remove LR use.
28570 * config/rs6000/predicates.md (restore_world_operation): Adjust op
28571 count, remove one USE.
28573 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
28575 * doc/install.texi (Configuration): Document the
28576 --with-long-double-format={ibm,ieee} PowerPC configuration
28580 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
28581 Convert from define_expand to be define_insn_and_split. Rework
28582 float/double/_Float128 conversions to QI/HI/SImode to work with
28583 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
28584 conversions to QI/HImode types did a store and then a load to
28585 truncate the value. For conversions to VSX registers, don't split
28586 the insn, instead emit the code directly. Use the code iterator
28587 any_fix to combine signed and unsigned conversions.
28588 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
28589 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
28590 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28591 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
28592 (fix_<mode>di2_hw): Likewise.
28593 (fixuns_<mode>di2_hw): Likewise.
28594 (fix_<mode>si2_hw): Likewise.
28595 (fixuns_<mode>si2_hw): Likewise.
28596 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
28597 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28598 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
28599 fix<uns>_trunc<SFDF:mode>si2_p8.
28600 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
28601 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
28602 (fix<uns>_<mode>_mem): Likewise.
28603 (fctiw<u>z_<mode>_mem): Likewise.
28604 (fix<uns>_<mode>_mem): Likewise.
28605 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
28606 the register allocator from doing a direct move to the GPRs to do
28607 a store, and instead use the ISA 3.0 store byte/half-word from
28608 vector register instruction. For IEEE 128-bit floating point,
28609 also optimize stores of 32-bit ints.
28610 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
28612 2018-02-07 Alan Hayward <alan.hayward@arm.com>
28614 * genextract.c (push_pathstr_operand): New function to support
28616 (walk_rtx): Call push_pathstr_operand.
28617 (print_path): Support [a-zA-Z].
28619 2018-02-07 Richard Biener <rguenther@suse.de>
28621 PR tree-optimization/84037
28622 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
28623 (cse_and_gimplify_to_preheader): Declare.
28624 (vect_get_place_in_interleaving_chain): Likewise.
28625 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28627 (_loop_vec_info::~_loop_vec_info): Delete it.
28628 (cse_and_gimplify_to_preheader): New function.
28629 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
28630 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
28631 (vectorizable_load): Likewise. For grouped stores always base
28632 the IV on the first element.
28633 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
28634 condition before gimplifying.
28636 2018-02-07 Jakub Jelinek <jakub@redhat.com>
28638 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
28639 *DIV_EXPR and *MOD_EXPR.
28641 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
28644 * config/i386/i386.c (ix86_option_override_internal): Mask out
28645 the CF_SET bit when checking -fcf-protection.
28647 2018-02-07 Tom de Vries <tom@codesourcery.com>
28650 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
28653 2018-02-07 Richard Biener <rguenther@suse.de>
28655 PR tree-optimization/84204
28656 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
28659 PR tree-optimization/84205
28660 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
28661 special-case isl_ast_op_zdiv_r.
28663 PR tree-optimization/84223
28664 * graphite-scop-detection.c (gather_bbs::before_dom_children):
28665 Only add conditions from within the region.
28666 (gather_bbs::after_dom_children): Adjust.
28668 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
28671 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
28672 * config/avr/avr.md: Only post-reload split REG-REG moves if
28673 either register is GENERAL_REG_P.
28675 2018-02-07 Jakub Jelinek <jakub@redhat.com>
28677 PR tree-optimization/84235
28678 * tree-ssa-scopedtables.c
28679 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
28680 if the subtraction is performed in floating point type where NaNs are
28681 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
28682 build 1. Formatting fix.
28684 2018-02-06 Jakub Jelinek <jakub@redhat.com>
28687 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
28688 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
28689 and skip it regardless of bb boundaries. Use CALL_P macro,
28690 don't test INSN_P (insn) together with CALL_P or JUMP_P check
28691 unnecessarily, formatting fix.
28693 2018-02-06 Michael Collison <michael.collison@arm.com>
28695 * config/arm/thumb2.md:
28696 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
28697 (*thumb_mov_notscc): Ditto.
28699 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
28702 * config/rs6000/rs6000.md (su code attribute): Use "u" for
28703 unsigned_fix, not "s".
28705 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28707 * configure.ac (gcc_fn_eh_frame_ro): New function.
28708 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
28709 correct .eh_frame permissions.
28710 * configure: Regenerate.
28712 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
28714 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
28715 irrelevant options.
28717 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28719 * config/rs6000/rs6000.c (rs6000_option_override_internal):
28720 Display warning message for -mno-speculate-indirect-jumps.
28722 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
28724 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
28726 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
28728 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
28730 PR tree-optimization/84225
28731 * tree-eh.c (find_trapping_overflow): Only call
28732 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
28734 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
28737 * config/i386/i386.c: Reimplement the check of possible options
28738 -mibt/-mshstk conbination. Change error messages.
28739 * doc/invoke.texi: Fix a typo: remove extra '='.
28741 2018-02-06 Marek Polacek <polacek@redhat.com>
28743 PR tree-optimization/84228
28744 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
28746 2018-02-06 Tamar Christina <tamar.christina@arm.com>
28749 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
28750 emitted arch directives.
28751 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
28752 __ARM_FEATURE_COPROC before changing architectures.
28754 2018-02-06 Richard Biener <rguenther@suse.de>
28756 * config/i386/i386.c (print_reg): Fix typo.
28757 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
28759 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
28761 * configure: Regenerate.
28763 2018-02-05 Martin Sebor <msebor@redhat.com>
28765 PR tree-optimization/83369
28766 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
28769 2018-02-05 Martin Liska <mliska@suse.cz>
28771 * doc/invoke.texi: Cherry-pick upstream r323995.
28773 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
28775 * ira.c (ira_init_register_move_cost): Adjust comment.
28777 2018-02-05 Martin Liska <mliska@suse.cz>
28779 PR gcov-profile/84137
28780 * doc/gcov.texi: Fix typo in documentation.
28782 2018-02-05 Martin Liska <mliska@suse.cz>
28784 PR gcov-profile/83879
28785 * doc/gcov.texi: Document necessity of --dynamic-list-data when
28786 using dlopen functionality.
28788 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
28790 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
28791 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
28792 _mm_maskz_range_ss, _mm_mask_range_round_ss,
28793 _mm_maskz_range_round_ss): New intrinsics.
28794 (__builtin_ia32_rangesd128_round)
28795 (__builtin_ia32_rangess128_round): Remove.
28796 (__builtin_ia32_rangesd128_mask_round,
28797 __builtin_ia32_rangess128_mask_round): New builtins.
28798 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
28799 __builtin_ia32_rangess128_round): Remove.
28800 (__builtin_ia32_rangesd128_mask_round,
28801 __builtin_ia32_rangess128_mask_round): New builtins.
28802 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
28803 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
28804 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
28805 "<round_saeonly_constraint>")): Changed to ...
28806 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
28807 "<round_saeonly_scalar_constraint>")): ... this.
28808 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
28809 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
28810 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
28811 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
28812 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
28814 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
28816 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
28818 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
28819 Remove all values except native, 8540 and 8548.
28821 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
28823 * config/i386/i386.c (ix86_output_function_return): Pass
28824 INVALID_REGNUM, instead of -1, as invalid register number to
28825 indirect_thunk_name and output_indirect_thunk.
28827 2018-02-02 Julia Koval <julia.koval@intel.com>
28829 * config.gcc: Add -march=icelake.
28830 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
28831 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
28832 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
28833 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
28834 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
28835 (processor_target_table): Add icelake.
28836 (ix86_option_override_internal): Handle new PTAs.
28837 (get_builtin_code_for_version): Handle icelake.
28838 (M_INTEL_COREI7_ICELAKE): New.
28839 (fold_builtin_cpu): Handle icelake.
28840 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
28841 * doc/invoke.texi: Add -march=icelake.
28843 2018-02-02 Julia Koval <julia.koval@intel.com>
28845 * config/i386/i386.c (ix86_option_override_internal): Change flags type
28846 to wide_int_bitmask.
28847 * wide-int-bitmask.h: New.
28849 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
28852 * config/i386/i386.md: Replace Pmode with word_mode in
28853 builtin_setjmp_setup and builtin_longjmp to support x32.
28855 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
28859 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
28861 (rs6000_supported_cpu_names): New static variable.
28862 (linux_cpu_translation_table): Likewise.
28863 (elf_platform) <cpu>: Define new static variable and use it.
28864 Translate kernel AT_PLATFORM name to canonical name if needed.
28865 Error if platform name is unknown.
28867 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
28870 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
28872 2018-02-01 Jeff Law <law@redhat.com>
28875 * config/i386/i386.c (release_scratch_register_on_entry): Add new
28876 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
28877 the scratch if RELEASE_VIA_POP is false.
28878 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
28879 If we have to save a temporary register, decrement SIZE appropriately.
28880 Pass new arguments to release_scratch_register_on_entry.
28881 (ix86_adjust_stack_and_probe): Likewise.
28882 (ix86_emit_probe_stack_range): Pass new arguments to
28883 release_scratch_register_on_entry.
28885 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
28887 PR rtl-optimization/84157
28888 * combine.c (change_zero_ext): Use REG_P predicate in
28889 front of HARD_REGISTER_P predicate.
28891 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
28893 * config/avr/avr.c (avr_option_override): Move disabling of
28894 -fdelete-null-pointer-checks to...
28895 * common/config/avr/avr-common.c (avr_option_optimization_table):
28898 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28900 PR tree-optimization/81635
28901 * tree-data-ref.c (split_constant_offset_1): For types that
28902 wrap on overflow, try to use range info to prove that wrapping
28905 2018-02-01 Renlin Li <renlin.li@arm.com>
28908 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
28909 TAILCALL_ADDR_REGS.
28910 (aarch64_register_move_cost): Likewise.
28911 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
28912 TAILCALL_ADDR_REGS.
28913 (REG_CLASS_NAMES): Likewise.
28914 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
28915 TAILCALL_ADDR_REGS. Remove IP registers.
28916 * config/aarch64/aarch64.md (Ucs): Update register constraint.
28918 2018-02-01 Richard Biener <rguenther@suse.de>
28920 * domwalk.h (dom_walker::dom_walker): Add additional constructor
28921 for specifying RPO order and allow NULL for that.
28922 * domwalk.c (dom_walker::dom_walker): Likewise.
28923 (dom_walker::walk): Handle NULL RPO order.
28924 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
28926 (rewrite_update_dom_walker): Likewise.
28927 (mark_def_dom_walker): Likewise.
28929 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28931 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
28932 (aarch64_maybe_expand_sve_subreg_move): Declare.
28933 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
28934 * config/aarch64/predicates.md (aarch64_any_register_operand): New
28936 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
28937 that are semantically a reverse operation.
28938 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
28939 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
28940 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
28942 (aarch64_can_change_mode_class): For big-endian, forbid changes
28943 between two SVE modes if they have different element sizes.
28945 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28947 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
28948 the TImode handling for big-endian targets.
28950 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28952 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
28953 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
28955 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
28956 Remove BSWAP handing for big-endian targets and use the form of
28957 LD1RQ appropariate for the mode.
28959 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28961 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
28962 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
28963 duplicated element.
28965 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28968 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
28969 check for operands that need to go through aarch64_sve_reload_be.
28971 2018-02-01 Jakub Jelinek <jakub@redhat.com>
28973 PR tree-optimization/81661
28974 PR tree-optimization/84117
28975 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
28976 * tree-eh.c: Include gimplify.h.
28977 (find_trapping_overflow, replace_trapping_overflow,
28978 rewrite_to_non_trapping_overflow): New functions.
28979 * tree-vect-loop.c: Include tree-eh.h.
28980 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
28981 * tree-data-ref.c: Include tree-eh.h.
28982 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
28984 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
28986 PR rtl-optimization/84123
28987 * combine.c (change_zero_ext): Check if hard register satisfies
28988 can_change_dest_mode before calling gen_lowpart_SUBREG.
28990 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
28993 * ira.c (ira_init_register_move_cost): Remove assert.
28995 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
28997 PR rtl-optimization/84071
28998 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
28999 * doc/tm.texi: Regenerate.
29001 2018-01-31 Richard Biener <rguenther@suse.de>
29003 PR tree-optimization/84132
29004 * tree-data-ref.c (analyze_miv_subscript): Properly
29005 check whether evolution_function_is_affine_multivariate_p
29006 before calling gcd_of_steps_may_divide_p.
29008 2018-01-31 Julia Koval <julia.koval@intel.com>
29011 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
29012 * config/i386/i386.md (rdpid_rex64) New.
29013 (rdpid): Make 32bit only.
29015 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
29018 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
29019 an IDENTIFIER_NODE for FUNCTION_TYPE's.
29021 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
29024 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29026 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29028 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
29030 PR rtl-optimization/84071
29031 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
29032 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
29034 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
29036 * config/arc/arc.c (arc_handle_aux_attribute): New function.
29037 (arc_attribute_table): Add 'aux' attribute.
29038 (arc_in_small_data_p): Consider aux like variables.
29039 (arc_is_aux_reg_p): New function.
29040 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
29041 (arc_get_aux_arg): New function.
29042 (prepare_move_operands): Handle aux-register access.
29043 (arc_handle_aux_attribute): New function.
29044 * doc/extend.texi (ARC Variable attributes): Add subsection.
29046 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
29048 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
29049 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
29050 (arc_attribute_table): Add 'uncached' attribute.
29051 (arc_print_operand): Print '.di' flag for uncached memory
29053 (arc_in_small_data_p): Do not consider for small data the uncached
29055 (arc_is_uncached_mem_p): New function.
29056 * config/arc/predicates.md (compact_store_memory_operand): Check
29057 for uncached memory accesses.
29058 (nonvol_nonimm_operand): Likewise.
29059 * doc/extend.texi (ARC Type Attribute): New subsection.
29061 2018-01-31 Jakub Jelinek <jakub@redhat.com>
29064 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
29065 falign-loops=): Add Optimization flag.
29067 2018-01-30 Jeff Law <law@redhat.com>
29070 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
29071 INT_REGISTERS_SAVED. Check it prior to calling
29072 get_scratch_register_on_entry.
29073 (ix86_adjust_stack_and_probe): Similarly.
29074 (ix86_emit_probe_stack_range): Similarly.
29075 (ix86_expand_prologue): Corresponding changes.
29077 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29080 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
29081 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
29083 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
29086 * lra-constraints.c (curr_insn_transform): Process AND in the
29089 2018-01-30 Jakub Jelinek <jakub@redhat.com>
29091 PR rtl-optimization/83986
29092 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
29093 dependence against last_pending_memory_flush in addition to
29094 pending_jump_insns.
29096 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
29098 PR tree-optimization/81611
29099 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
29102 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29105 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
29108 2018-01-30 Richard Biener <rguenther@suse.de>
29109 Jakub Jelinek <jakub@redhat.com>
29111 PR tree-optimization/84111
29112 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
29113 inner loops added during recursion, as they don't have up-to-date
29116 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
29119 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
29120 (can_inline_edge_by_limits_p): ... here.
29121 (can_early_inline_edge_p, check_callers,
29122 update_caller_keys, update_callee_keys, recursive_inlining,
29123 add_new_edges_to_heap, speculation_useful_p,
29124 inline_small_functions,
29125 inline_small_functions, flatten_function,
29126 inline_to_all_callers_1): Update.
29128 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
29130 * profile-count.c (profile_count::combine_with_ipa_count): Handle
29133 2018-01-30 Richard Biener <rguenther@suse.de>
29135 PR tree-optimization/83008
29136 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
29137 invariant and constant vector uses in stmts when they need
29138 more than one stmt.
29140 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29143 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
29144 * configure: Regenerate.
29146 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
29148 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
29150 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
29151 Use gen_rtx_REG rather than gen_lowpart.
29153 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
29155 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
29156 rather than 0 when creating partial subregs.
29158 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
29160 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
29163 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
29166 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
29167 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
29168 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
29169 flags. This restores the settings used before the 2017-07-24.
29170 Turning off pre increment/decrement/modify allows IVOPTS to
29171 optimize DF/SF loops where the index is an int.
29173 2018-01-29 Richard Biener <rguenther@suse.de>
29174 Kelvin Nilsen <kelvin@gcc.gnu.org>
29177 * tree-vect-stmts.c (vectorizable_call): Don't call
29178 targetm.vectorize_builtin_md_vectorized_function if callee is
29181 2018-01-22 Carl Love <cel@us.ibm.com>
29183 * doc/extend.tex: Fix typo in second arg in
29184 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
29186 2018-01-29 Richard Biener <rguenther@suse.de>
29188 PR tree-optimization/84086
29189 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
29190 (flush_ssaname_freelist): When SSA names were released reset
29191 the SCEV hash table.
29193 2018-01-29 Richard Biener <rguenther@suse.de>
29195 PR tree-optimization/84057
29196 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
29197 removed paths when removing edges.
29199 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
29201 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
29202 -mfunction-return=@var{choice}.
29204 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
29206 PR diagnostic/84034
29207 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
29208 Handle CR like TAB.
29209 (layout::print_source_line): Likewise.
29210 (test_get_line_width_without_trailing_whitespace): Add test cases.
29212 2018-01-27 Jakub Jelinek <jakub@redhat.com>
29214 PR middle-end/84040
29215 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
29218 2018-01-26 Jim Wilson <jimw@sifive.com>
29220 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
29222 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
29225 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29227 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
29228 and CMP + SUB-immediate -> SUBS.
29230 2018-01-26 Martin Sebor <msebor@redhat.com>
29232 PR tree-optimization/83896
29233 * tree-ssa-strlen.c (get_string_len): Rename...
29234 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
29235 Avoid assuming length is constant.
29236 (handle_char_store): Use HOST_WIDE_INT for string length.
29238 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
29241 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
29242 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
29244 2018-01-26 Richard Biener <rguenther@suse.de>
29246 PR rtl-optimization/84003
29247 * dse.c (record_store): Only record redundant stores when
29248 the earlier store aliases at least all accesses the later one does.
29250 2018-01-26 Jakub Jelinek <jakub@redhat.com>
29252 PR rtl-optimization/83985
29253 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
29254 REG_CFA_RESTORE insns.
29255 (delete_unmarked_insns): Don't ignore separate shrink wrapping
29256 REG_CFA_RESTORE insns here.
29259 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
29260 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
29262 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29264 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
29265 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
29266 (arc_init): Likewise.
29267 (arc_override_options): Likewise.
29268 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
29270 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
29272 * config/arc/arc.h (TARGET_DBNZ): Define.
29273 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
29274 properly set the tune attribute.
29275 (dbnz): Use TARGET_DBNZ guard.
29276 * config/arc/arc.opt (mtune): Add core3 option.
29278 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29280 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
29281 recognize new pic like addresses.
29282 (arc_delegitimize_address): Clean up.
29284 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29286 * config/arc/arc-arches.def: Option mrf16 valid for all
29288 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
29289 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
29290 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
29291 * config/arc/arc-tables.opt: Regenerate.
29292 * config/arc/arc.c (arc_conditional_register_usage): Handle
29293 reduced register file case.
29294 (arc_file_start): Set must have build attributes.
29295 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
29296 mrf16 option value.
29297 * config/arc/arc.opt (mrf16): Add new option.
29298 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
29299 * config/arc/genmultilib.awk: Handle new mrf16 option.
29300 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
29301 * config/arc/t-multilib: Regenerate.
29302 * doc/invoke.texi (ARC Options): Document mrf16 option.
29304 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29306 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
29307 * config/arc/arc.c (arc_handle_secure_attribute): New function.
29308 (arc_attribute_table): Add 'secure_call' attribute.
29309 (arc_print_operand): Print secure call operand.
29310 (arc_function_ok_for_sibcall): Don't optimize tail calls when
29312 (arc_is_secure_call_p): New function. * config/arc/arc.md
29313 (call_i): Add support for sjli instruction.
29314 (call_value_i): Likewise.
29315 * config/arc/constraints.md (Csc): New constraint.
29317 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29318 John Eric Martin <John.Martin@emmicro-us.com>
29320 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
29321 * config/arc/arc.c (_arc_jli_section): New struct.
29322 (arc_jli_section): New type.
29323 (rc_jli_sections): New static variable.
29324 (arc_handle_jli_attribute): New function.
29325 (arc_attribute_table): Add jli_always and jli_fixed attribute.
29326 (arc_file_end): New function.
29327 (TARGET_ASM_FILE_END): Define.
29328 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
29329 (arc_add_jli_section): New function.
29330 (jli_call_scan): Likewise.
29331 (arc_reorg): Call jli_call_scan.
29332 (arc_output_addsi): Remove 'S' from printing asm operand.
29333 (arc_is_jli_call_p): New function.
29334 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
29336 (movhi_insn): Likewise.
29337 (movsi_insn): Likewise.
29338 (movsi_set_cc_insn): Likewise.
29339 (loadqi_update): Likewise.
29340 (load_zeroextendqisi_update): Likewise.
29341 (load_signextendqisi_update): Likewise.
29342 (loadhi_update): Likewise.
29343 (load_zeroextendhisi_update): Likewise.
29344 (load_signextendhisi_update): Likewise.
29345 (loadsi_update): Likewise.
29346 (loadsf_update): Likewise.
29347 (movsicc_insn): Likewise.
29348 (bset_insn): Likewise.
29349 (bxor_insn): Likewise.
29350 (bclr_insn): Likewise.
29351 (bmsk_insn): Likewise.
29352 (bicsi3_insn): Likewise.
29353 (cmpsi_cc_c_insn): Likewise.
29354 (movsi_ne): Likewise.
29355 (movsi_cond_exec): Likewise.
29356 (clrsbsi2): Likewise.
29357 (norm_f): Likewise.
29367 (call_i): Remove 'S' asm letter, add jli instruction.
29368 (call_value_i): Likewise.
29369 * config/arc/arc.op (mjli-always): New option.
29370 * config/arc/constraints.md (Cji): New constraint.
29371 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
29373 (subsf3_fpx): Likewise.
29374 (mulsf3_fpx): Likewise.
29375 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
29377 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
29378 function attrbutes.
29379 * doc/invoke.texi (ARC): Document mjli-always option.
29381 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
29383 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
29384 avoid addition with 0 and use incw and decw where possible.
29386 2018-01-26 Richard Biener <rguenther@suse.de>
29388 PR tree-optimization/81082
29389 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
29390 association if it requires casting to unsigned.
29391 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
29392 from fold_plusminus_mult_expr to catch important cases late when
29393 range info is available.
29395 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29397 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
29398 * configure.ac (hidden_linkonce): New test.
29399 * configure: Regenerate.
29400 * config.in: Regenerate.
29402 2018-01-26 Julia Koval <julia.koval@intel.com>
29404 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
29405 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
29406 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
29407 _mm_mask_bitshuffle_epi64_mask): Fix type.
29408 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
29409 USI_FTYPE_V4DI_V4DI_USI): Remove.
29410 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
29411 __builtin_ia32_vpshufbitqmb256_mask,
29412 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
29413 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
29414 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
29416 2018-01-26 Alan Modra <amodra@gmail.com>
29419 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
29420 UNSPEC_VBPERMQ. Sort other unspecs.
29422 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
29424 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
29426 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
29428 PR middle-end/83055
29429 * predict.c (drop_profile): Do not push/pop cfun; update also
29431 (handle_missing_profiles): Fix logic looking for zero profiles.
29433 2018-01-25 Jakub Jelinek <jakub@redhat.com>
29435 PR middle-end/83977
29436 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
29437 on functions with #pragma omp declare simd or functions with simd
29439 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
29440 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
29441 Remove trailing \n from warning_at calls.
29443 2018-01-25 Tom de Vries <tom@codesourcery.com>
29446 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29447 for neutered workers.
29449 2018-01-24 Joseph Myers <joseph@codesourcery.com>
29452 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
29453 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
29455 2018-01-24 Jeff Law <law@redhat.com>
29458 * i386.c (get_probe_interval): Move to earlier point.
29459 (ix86_compute_frame_layout): If -fstack-clash-protection and
29460 the frame is larger than the probe interval, then use pushes
29461 to save registers rather than reg->mem moves.
29462 (ix86_expand_prologue): Remove conditional for int_registers_saved
29465 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
29468 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
29469 min/max for never referenced object.
29471 2018-01-24 Jakub Jelinek <jakub@redhat.com>
29473 PR middle-end/83977
29474 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
29476 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
29477 attributes from DECL_ATTRIBUTES (decl) without affecting
29478 DECL_ATTRIBUTES (current_function_decl).
29479 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
29480 functions with non-NULL DECL_ABSTRACT_ORIGIN.
29482 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
29484 PR tree-optimization/83979
29485 * fold-const.c (fold_comparison): Use constant_boolean_node
29486 instead of boolean_{true,false}_node.
29488 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
29490 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
29493 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29495 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29496 Simplify the clause that sets the length attribute.
29497 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29498 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
29499 clause that sets the length attribute.
29500 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29502 2018-01-24 Tom de Vries <tom@codesourcery.com>
29505 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
29506 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
29507 Add strict parameter.
29508 (prevent_branch_around_nothing): Insert dummy insn between branch to
29509 label and label with no ptx insn inbetween.
29510 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
29512 2018-01-24 Tom de Vries <tom@codesourcery.com>
29515 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29516 for neutered threads in warp.
29517 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
29519 2018-01-24 Richard Biener <rguenther@suse.de>
29521 PR tree-optimization/83176
29522 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
29525 2018-01-24 Richard Biener <rguenther@suse.de>
29527 PR tree-optimization/82819
29528 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
29529 code generating pluses that are no-ops in the target precision.
29531 2018-01-24 Richard Biener <rguenther@suse.de>
29533 PR middle-end/84000
29534 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
29536 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
29538 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
29539 to merge probabilities.
29540 * predict.c (probably_never_executed): Also mark as cold functions
29541 with global 0 profile and guessed local profile.
29542 * profile-count.c (profile_probability::combine_with_count): New
29544 * profile-count.h (profile_probability::operator*,
29545 profile_probability::operator*=, profile_probability::operator/,
29546 profile_probability::operator/=): Reduce precision to adjusted
29547 and set value to guessed on contradictory divisions.
29548 (profile_probability::combine_with_freq): Remove.
29549 (profile_probability::combine_wiht_count): Declare.
29550 (profile_count::force_nonzero):: Set to adjusted.
29551 (profile_count::probability_in):: Set quality to adjusted.
29552 * tree-ssa-tail-merge.c (replace_block_by): Use
29553 combine_with_count.
29555 2018-01-23 Andrew Waterman <andrew@sifive.com>
29556 Jim Wilson <jimw@sifive.com>
29558 * config/riscv/riscv.c (riscv_stack_boundary): New.
29559 (riscv_option_override): Set riscv_stack_boundary. Handle
29560 riscv_preferred_stack_boundary_arg.
29561 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
29562 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
29563 (STACK_BOUNDARY): Set to riscv_stack_boundary.
29564 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
29565 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
29566 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
29568 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
29571 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
29572 of struct ix86_frame.
29573 (ix86_expand_epilogue): Likewise. Add a local variable for
29574 the reg_save_offset field in struct ix86_frame.
29576 2018-01-23 Bin Cheng <bin.cheng@arm.com>
29578 PR tree-optimization/82604
29579 * tree-loop-distribution.c (enum partition_kind): New enum item
29580 PKIND_PARTIAL_MEMSET.
29581 (partition_builtin_p): Support above new enum item.
29582 (generate_code_for_partition): Ditto.
29583 (compute_access_range): Differentiate cases that equality can be
29584 proven at all loops, the innermost loops or no loops.
29585 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
29586 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
29587 (finalize_partitions, distribute_loop): Don't fuse partition of
29588 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
29589 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
29590 parloop is enabled.
29592 2018-01-23 Martin Liska <mliska@suse.cz>
29594 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
29595 order to ignore the predictor.
29596 (PRED_POLYMORPHIC_CALL): Likewise.
29597 (PRED_RECURSIVE_CALL): Likewise.
29599 2018-01-23 Martin Liska <mliska@suse.cz>
29601 * tree-profile.c (tree_profiling): Print function header to
29602 aware reader which function we are working on.
29603 * value-prof.c (gimple_find_values_to_profile): Do not print
29604 not interesting value histograms.
29606 2018-01-23 Martin Liska <mliska@suse.cz>
29608 * profile-count.h (enum profile_quality): Add
29609 profile_uninitialized as the first value. Do not number values
29610 as they are zero based.
29611 (profile_count::verify): Update sanity check.
29612 (profile_probability::verify): Likewise.
29614 2018-01-23 Nathan Sidwell <nathan@acm.org>
29616 * doc/invoke.texi (ffor-scope): Deprecate.
29618 2018-01-23 David Malcolm <dmalcolm@redhat.com>
29620 PR tree-optimization/83510
29621 * domwalk.c (set_all_edges_as_executable): New function.
29622 (dom_walker::dom_walker): Convert bool param
29623 "skip_unreachable_blocks" to enum reachability. Move setup of
29624 edge flags to set_all_edges_as_executable and only do it when
29625 reachability is REACHABLE_BLOCKS.
29626 * domwalk.h (enum dom_walker::reachability): New enum.
29627 (dom_walker::dom_walker): Convert bool param
29628 "skip_unreachable_blocks" to enum reachability.
29629 (set_all_edges_as_executable): New decl.
29630 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
29631 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
29633 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
29634 but converting true to REACHABLE_BLOCKS.
29635 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
29637 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
29638 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
29639 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
29641 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
29642 if check_all_array_refs will be called.
29644 2018-01-23 David Malcolm <dmalcolm@redhat.com>
29646 * tree.c (selftest::test_location_wrappers): Add more test
29649 2018-01-23 David Malcolm <dmalcolm@redhat.com>
29651 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
29652 (selftest::test_bit_in_range): Likewise.
29654 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
29657 * doc/sourcebuild.texi (vect_float): Say that the selector
29658 only describes the situation when -funsafe-math-optimizations is on.
29659 (vect_float_strict): Document.
29661 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
29663 PR tree-optimization/83965
29664 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
29665 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
29666 instead of checking only for a reduction.
29667 (vect_recog_widen_sum_pattern): Likewise.
29669 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
29671 * predict.c (probably_never_executed): Only use precise profile info.
29672 (compute_function_frequency): Skip after inlining hack since we now
29673 have quality checking.
29675 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
29677 * profile-count.h (profile_probability::very_unlikely,
29678 profile_probability::unlikely, profile_probability::even): Set
29679 precision to guessed.
29681 2018-01-23 Richard Biener <rguenther@suse.de>
29683 PR tree-optimization/83963
29684 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
29685 Properly terminate dominator walk when crossing the exit edge not
29686 when visiting its source block.
29688 2018-01-23 Jakub Jelinek <jakub@redhat.com>
29691 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
29692 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
29694 2018-01-22 Jakub Jelinek <jakub@redhat.com>
29696 PR tree-optimization/83957
29697 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
29698 semicolon after for body surrounded by braces.
29700 PR tree-optimization/83081
29701 * profile-count.h (profile_probability::split): New method.
29702 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
29703 Use profile_probability::split.
29704 (do_compare_rtx_and_jump): Fix adjustment of probabilities
29705 when splitting a single conditional jump into 2.
29707 2018-01-22 David Malcolm <dmalcolm@redhat.com>
29709 PR tree-optimization/69452
29710 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
29713 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29715 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
29716 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
29717 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
29719 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29721 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
29723 * config/rl78/rl78.md (movdi): New define_expand.
29724 * config/rl78/rl78.c (rl78_split_movdi): New function.
29726 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
29729 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
29731 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
29732 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
29733 128-bit to produce an UNSPEC move to get the double word with the
29734 signbit and then a shift directly to do signbit.
29735 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
29736 implementation with a new version that just does either a direct
29737 move or a regular move. Move memory interface to separate insns.
29738 Move insns so they are next to the expander.
29739 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
29740 with signbit move. Split big and little endian case.
29741 (signbit<mode>2_dm_mem_le): Likewise.
29742 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
29743 (signbit<mode>2_dm2): Likewise.
29745 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29747 * config/rl78/rl78.md (anddi3): New define_expand.
29749 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29751 * config/rl78/rl78.md (umindi3): New define_expand.
29753 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29755 * config/rl78/rl78.md (smindi3): New define_expand.
29757 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29759 * config/rl78/rl78.md (smaxdi3): New define_expand.
29761 2018-01-22 Carl Love <cel@us.ibm.com>
29763 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
29764 LVX_V1TI): Add macro expansion.
29765 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
29766 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
29767 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
29768 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
29769 Change check to determine if the instruction is a byte reversing
29770 entry. Fix typo in comment.
29771 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
29772 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
29773 Add def_builtin calls for new builtins.
29774 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
29775 Add define_insn expansion.
29777 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29779 * config/rl78/rl78.md (umaxdi3): New define_expand.
29781 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29783 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
29784 for non-QImode registers.
29786 2018-01-22 Richard Biener <rguenther@suse.de>
29788 PR tree-optimization/83963
29789 * graphite-scop-detection.c (scop_detection::get_sese): Delay
29790 including the loop exit block.
29791 (scop_detection::merge_sese): Likewise.
29792 (scop_detection::add_scop): Do it here instead.
29794 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29796 * doc/sourcebuild.texi (arm_softfloat): Document.
29798 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
29801 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
29802 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
29803 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
29805 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29806 David Edelsohn <dje.gcc@gmail.com>
29809 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29810 Change "crset eq" to "crset 2".
29811 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29812 (*call_indirect_aix<mode>_nospec): Likewise.
29813 (*call_value_indirect_aix<mode>_nospec): Likewise.
29814 (*call_indirect_elfv2<mode>_nospec): Likewise.
29815 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
29816 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
29817 change assembly output from . to $.
29818 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29819 (indirect_jump<mode>_nospec): Change assembly output from . to $.
29820 (*tablejump<mode>_internal1_nospec): Likewise.
29822 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
29825 * config/sh/sh_optimize_sett_clrt.cc:
29826 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
29828 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
29830 PR tree-optimization/83940
29831 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
29832 offset_dt to vect_constant_def rather than vect_unknown_def_type.
29833 (vect_check_load_store_mask): Add a mask_dt_out parameter and
29834 use it to pass back the definition type.
29835 (vect_check_store_rhs): Likewise rhs_dt_out.
29836 (vect_build_gather_load_calls): Add a mask_dt argument and use
29837 it instead of a call to vect_is_simple_use.
29838 (vectorizable_store): Update calls to vect_check_load_store_mask
29839 and vect_check_store_rhs. Use the dt returned by the latter instead
29840 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
29841 instead of calls to vect_is_simple_use. Pass the scalar rather
29842 than the vector operand to vect_is_simple_use when handling
29843 second and subsequent copies of an rhs value.
29844 (vectorizable_load): Update calls to vect_check_load_store_mask
29845 and vect_build_gather_load_calls. Use the cached mask_dt and
29846 gs_info.offset_dt instead of calls to vect_is_simple_use.
29848 2018-01-20 Jakub Jelinek <jakub@redhat.com>
29850 PR middle-end/83945
29851 * tree-emutls.c: Include gimplify.h.
29852 (lower_emutls_2): New function.
29853 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
29854 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
29855 it before further processing.
29858 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
29859 UINTVAL (trueop1) instead of INTVAL (op1).
29861 2018-01-19 Jakub Jelinek <jakub@redhat.com>
29865 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
29866 INCOMING_FRAME_SP_OFFSET if not defined.
29867 (scan_trace): Add ENTRY argument. If true and
29868 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
29869 emit a note to adjust the CFA offset.
29870 (create_cfi_notes): Adjust scan_trace callers.
29871 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
29872 INCOMING_FRAME_SP_OFFSET in the CIE.
29873 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
29874 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
29876 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
29877 * doc/tm.texi: Regenerated.
29879 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29881 PR rtl-optimization/83147
29882 * lra-constraints.c (remove_inheritance_pseudos): Use
29883 lra_substitute_pseudo_within_insn.
29885 2018-01-19 Tom de Vries <tom@codesourcery.com>
29886 Cesar Philippidis <cesar@codesourcery.com>
29889 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
29891 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
29894 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
29895 spaces for function labels.
29897 2018-01-19 Martin Liska <mliska@suse.cz>
29899 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
29900 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
29901 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
29902 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
29903 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
29904 (PRED_CONST_RETURN): Change from 69 to 65.
29905 (PRED_NULL_RETURN): Change from 91 to 71.
29906 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
29907 (PRED_LOOP_GUARD): Change from 66 to 73.
29909 2018-01-19 Martin Liska <mliska@suse.cz>
29911 * predict.c (predict_insn_def): Add new assert.
29912 (struct branch_predictor): Change type to signed integer.
29913 (test_prediction_value_range): Amend test to cover
29914 PROB_UNINITIALIZED.
29915 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
29916 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
29917 (PRED_LOOP_ITERATIONS_MAX): Likewise.
29918 (PRED_LOOP_IV_COMPARE): Likewise.
29919 * predict.h (PROB_UNINITIALIZED): Define new constant.
29921 2018-01-19 Martin Liska <mliska@suse.cz>
29923 * predict.c (dump_prediction): Add new format for
29924 analyze_brprob.py script which is enabled with -details
29926 * profile-count.h (precise_p): New function.
29928 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
29930 PR tree-optimization/83922
29931 * tree-vect-loop.c (vect_verify_full_masking): Return false if
29932 there are no statements that need masking.
29933 (vect_active_double_reduction_p): New function.
29934 (vect_analyze_loop_operations): Use it when handling phis that
29935 are not in the loop header.
29937 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
29939 PR tree-optimization/83914
29940 * tree-vect-loop.c (vectorizable_induction): Don't convert
29941 init_expr or apply the peeling adjustment for inductions
29942 that are nested within the vectorized loop.
29944 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29946 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
29949 2018-01-18 Jakub Jelinek <jakub@redhat.com>
29953 * function.h (gimplify_parameters): Add gimple_seq * argument.
29954 * function.c: Include gimple.h and options.h.
29955 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
29956 for the added local temporaries if needed.
29957 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
29958 if there are any parameter cleanups, wrap whole body into a
29959 try/finally with the cleanups.
29961 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
29964 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
29965 Use GET_MODE_CLASS for scalar floating point.
29967 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
29971 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
29972 Fix call of call_cgraph_insertion_hooks.
29974 2018-01-18 Martin Sebor <msebor@redhat.com>
29976 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
29978 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
29981 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
29984 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
29987 * common.opt: (-ffile-prefix-map): New option.
29988 * opts.c (common_handle_option): Defer it.
29989 * opts-global.c (handle_common_deferred_options): Handle it.
29990 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
29991 * file-prefix-map.h: New file.
29992 (remap_debug_filename, add_debug_prefix_map): ...here.
29993 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
29994 * final.c (debug_prefix_map, add_debug_prefix_map
29995 remap_debug_filename): Move to...
29996 * file-prefix-map.c: New file.
29997 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
29998 generalize, get rid of alloca(), use strrchr() instead of strchr().
29999 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
30000 Implement in terms of add_prefix_map().
30001 (remap_macro_filename, remap_debug_filename): Implement in term of
30003 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
30004 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
30005 * dbxout.c: Include file-prefix-map.h.
30006 * varasm.c: Likewise.
30007 * vmsdbgout.c: Likewise.
30008 * xcoffout.c: Likewise.
30009 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
30010 * doc/cppopts.texi (-fmacro-prefix-map): Document.
30011 * doc/invoke.texi (-ffile-prefix-map): Document.
30012 (-fdebug-prefix-map): Update description.
30014 2018-01-18 Martin Liska <mliska@suse.cz>
30016 * config/i386/i386.c (indirect_thunk_name): Document that also
30018 (output_indirect_thunk): Document why both instructions
30019 (pause and lfence) are generated.
30021 2018-01-18 Richard Biener <rguenther@suse.de>
30023 PR tree-optimization/83887
30024 * graphite-scop-detection.c
30025 (scop_detection::get_nearest_dom_with_single_entry): Remove.
30026 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
30027 (scop_detection::merge_sese): Re-implement with a flood-fill
30028 algorithm that properly finds a SESE region if it exists.
30030 2018-01-18 Jakub Jelinek <jakub@redhat.com>
30033 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
30034 pointer_diff optimizations use view_convert instead of convert.
30036 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30038 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30039 Generate different code for -mno-speculate-indirect-jumps.
30040 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30041 (*call_indirect_aix<mode>): Disable for
30042 -mno-speculate-indirect-jumps.
30043 (*call_indirect_aix<mode>_nospec): New define_insn.
30044 (*call_value_indirect_aix<mode>): Disable for
30045 -mno-speculate-indirect-jumps.
30046 (*call_value_indirect_aix<mode>_nospec): New define_insn.
30047 (*sibcall_nonlocal_sysv<mode>): Generate different code for
30048 -mno-speculate-indirect-jumps.
30049 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30051 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
30053 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
30054 long double type, set the flags for noting the default long double
30055 type, even if we don't pass or return a long double type.
30057 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
30060 * ipa-inline.c (flatten_function): Do not overwrite final inlining
30063 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
30065 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
30066 support for merge[hl].
30067 (fold_mergehl_helper): New helper function.
30068 (tree-vector-builder.h): New #include for tree_vector_builder usage.
30069 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
30070 (altivec_vmrglw_direct): Add xxmrglw insn.
30072 2018-01-17 Andrew Waterman <andrew@sifive.com>
30074 * config/riscv/riscv.c (riscv_conditional_register_usage): If
30075 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
30077 2018-01-17 David Malcolm <dmalcolm@redhat.com>
30080 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
30081 call the lto_location_cache before reading the
30082 DECL_SOURCE_LOCATION of the types.
30084 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
30085 Richard Sandiford <richard.sandiford@linaro.org>
30087 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
30088 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
30089 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
30090 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
30091 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
30093 * config/aarch64/constraints.md (aarch64_movti_operand):
30095 * config/aarch64/predicates.md (Uti): Add new constraint.
30097 2018-01-17 Carl Love <cel@us.ibm.com>
30099 * config/rs6000/vsx.md (define_expand xl_len_r,
30100 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
30101 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
30103 (define_expand, define_insn): Move the shift left from the
30104 define_insn to the define_expand for lxvl and stxvl instructions.
30105 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
30106 and XL_LEN_R definitions to PURE.
30108 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
30110 * config/i386/i386.c (indirect_thunk_name): Declare regno
30111 as unsigned int. Compare regno with INVALID_REGNUM.
30112 (output_indirect_thunk): Ditto.
30113 (output_indirect_thunk_function): Ditto.
30114 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
30115 in the call to output_indirect_thunk_function.
30117 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
30119 PR middle-end/83884
30120 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
30121 rather than the size of inner_type to determine the stack slot size
30122 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
30124 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
30127 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
30130 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
30132 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
30133 endian Linux systems to optionally enable multilibs for selecting
30134 the long double type if the user configured an explicit type.
30135 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
30136 have no long double multilibs if not defined.
30137 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
30138 warn if the user used -mabi={ieee,ibm}longdouble and we built
30139 multilibs for long double.
30140 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
30141 appropriate multilib option.
30142 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
30144 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
30145 for building long double multilibs.
30146 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
30148 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
30150 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
30153 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
30155 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
30158 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
30161 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
30164 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
30166 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
30167 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
30169 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
30171 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
30172 different rtl trees depending on TARGET_64BIT.
30173 (rs6000_gen_lvx): Likewise.
30175 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
30177 * config/visium/visium.md (nop): Tweak comment.
30178 (hazard_nop): Likewise.
30180 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30182 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
30183 -mspeculate-indirect-jumps.
30184 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
30185 for -mno-speculate-indirect-jumps.
30186 (*call_indirect_elfv2<mode>_nospec): New define_insn.
30187 (*call_value_indirect_elfv2<mode>): Disable for
30188 -mno-speculate-indirect-jumps.
30189 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
30190 (indirect_jump): Emit different RTL for
30191 -mno-speculate-indirect-jumps.
30192 (*indirect_jump<mode>): Disable for
30193 -mno-speculate-indirect-jumps.
30194 (*indirect_jump<mode>_nospec): New define_insn.
30195 (tablejump): Emit different RTL for
30196 -mno-speculate-indirect-jumps.
30197 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
30198 (tablejumpsi_nospec): New define_expand.
30199 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
30200 (tablejumpdi_nospec): New define_expand.
30201 (*tablejump<mode>_internal1): Disable for
30202 -mno-speculate-indirect-jumps.
30203 (*tablejump<mode>_internal1_nospec): New define_insn.
30204 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
30207 2018-01-16 Artyom Skrobov tyomitch@gmail.com
30209 * caller-save.c (insert_save): Drop unnecessary parameter. All
30212 2018-01-16 Jakub Jelinek <jakub@redhat.com>
30213 Richard Biener <rguenth@suse.de>
30216 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
30217 return early, inline manually is_gimple_sizepos. Make sure if we
30218 call gimplify_expr we don't end up with a gimple constant.
30219 * tree.c (variably_modified_type_p): Don't return true for
30220 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
30221 * gimplify.h (is_gimple_sizepos): Remove.
30223 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
30225 PR tree-optimization/83857
30226 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
30227 vectorizable_live_operation for pure SLP statements.
30228 (vectorizable_live_operation): Handle PHIs.
30230 2018-01-16 Richard Biener <rguenther@suse.de>
30232 PR tree-optimization/83867
30233 * tree-vect-stmts.c (vect_transform_stmt): Precompute
30234 nested_in_vect_loop_p since the scalar stmt may get invalidated.
30236 2018-01-16 Jakub Jelinek <jakub@redhat.com>
30239 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
30240 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
30241 If off is not INTEGER_CST, issue a may not be aligned warning
30242 rather than isn't aligned. Use isn%'t rather than isn't.
30243 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
30245 <case MULT_EXPR>: Improve the case when bottom and one of the
30246 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
30247 operand, in that case check if the other operand is multiple of
30248 bottom divided by the INTEGER_CST operand.
30250 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
30253 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
30254 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
30255 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
30256 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
30257 * config/pa/pa.c (pa_function_arg_advance): Likewise.
30258 (pa_function_arg, pa_arg_partial_bytes): Likewise.
30259 (pa_function_arg_size): New function.
30261 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
30263 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
30264 in a separate statement.
30266 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
30268 PR tree-optimization/83847
30269 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
30270 group gathers and scatters.
30272 2018-01-16 Jakub Jelinek <jakub@redhat.com>
30274 PR rtl-optimization/86620
30275 * params.def (max-sched-ready-insns): Bump minimum value to 1.
30277 PR rtl-optimization/83213
30278 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
30279 to last if both are JUMP_INSNs.
30281 PR tree-optimization/83843
30282 * gimple-ssa-store-merging.c
30283 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
30284 store_immediate_info for bswap/nop orig_stores.
30286 2018-01-15 Andrew Waterman <andrew@sifive.com>
30288 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
30290 <UDIV>: Increase cost if !TARGET_DIV.
30292 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
30294 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
30295 (define_attr "cr_logical_3op"): New.
30296 (cceq_ior_compare): Adjust.
30297 (cceq_ior_compare_complement): Adjust.
30298 (*cceq_rev_compare): Adjust.
30299 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
30300 (is_cracked_insn): Adjust.
30301 (insn_must_be_first_in_group): Adjust.
30302 * config/rs6000/40x.md: Adjust.
30303 * config/rs6000/440.md: Adjust.
30304 * config/rs6000/476.md: Adjust.
30305 * config/rs6000/601.md: Adjust.
30306 * config/rs6000/603.md: Adjust.
30307 * config/rs6000/6xx.md: Adjust.
30308 * config/rs6000/7450.md: Adjust.
30309 * config/rs6000/7xx.md: Adjust.
30310 * config/rs6000/8540.md: Adjust.
30311 * config/rs6000/cell.md: Adjust.
30312 * config/rs6000/e300c2c3.md: Adjust.
30313 * config/rs6000/e500mc.md: Adjust.
30314 * config/rs6000/e500mc64.md: Adjust.
30315 * config/rs6000/e5500.md: Adjust.
30316 * config/rs6000/e6500.md: Adjust.
30317 * config/rs6000/mpc.md: Adjust.
30318 * config/rs6000/power4.md: Adjust.
30319 * config/rs6000/power5.md: Adjust.
30320 * config/rs6000/power6.md: Adjust.
30321 * config/rs6000/power7.md: Adjust.
30322 * config/rs6000/power8.md: Adjust.
30323 * config/rs6000/power9.md: Adjust.
30324 * config/rs6000/rs64.md: Adjust.
30325 * config/rs6000/titan.md: Adjust.
30327 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30329 * config/i386/predicates.md (indirect_branch_operand): Rewrite
30330 ix86_indirect_branch_register logic.
30332 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30334 * config/i386/constraints.md (Bs): Update
30335 ix86_indirect_branch_register check. Don't check
30336 ix86_indirect_branch_register with GOT_memory_operand.
30338 * config/i386/predicates.md (GOT_memory_operand): Don't check
30339 ix86_indirect_branch_register here.
30340 (GOT32_symbol_operand): Likewise.
30342 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30344 * config/i386/predicates.md (constant_call_address_operand):
30345 Rewrite ix86_indirect_branch_register logic.
30346 (sibcall_insn_operand): Likewise.
30348 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30350 * config/i386/constraints.md (Bs): Replace
30351 ix86_indirect_branch_thunk_register with
30352 ix86_indirect_branch_register.
30354 * config/i386/i386.md (indirect_jump): Likewise.
30355 (tablejump): Likewise.
30356 (*sibcall_memory): Likewise.
30357 (*sibcall_value_memory): Likewise.
30358 Peepholes of indirect call and jump via memory: Likewise.
30359 * config/i386/i386.opt: Likewise.
30360 * config/i386/predicates.md (indirect_branch_operand): Likewise.
30361 (GOT_memory_operand): Likewise.
30362 (call_insn_operand): Likewise.
30363 (sibcall_insn_operand): Likewise.
30364 (GOT32_symbol_operand): Likewise.
30366 2018-01-15 Jakub Jelinek <jakub@redhat.com>
30368 PR middle-end/83837
30369 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
30370 type rather than type addr's type points to.
30371 (expand_omp_atomic_mutex): Likewise.
30372 (expand_omp_atomic): Likewise.
30374 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30377 * config/i386/i386.c (output_indirect_thunk_function): Use
30378 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
30379 for __x86_return_thunk.
30381 2018-01-15 Richard Biener <rguenther@suse.de>
30383 PR middle-end/83850
30384 * expmed.c (extract_bit_field_1): Fix typo.
30386 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30389 * config/arm/iterators.md (VF): New mode iterator.
30390 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
30391 Remove integer-related logic from pattern.
30392 (neon_vabd<mode>_3): Likewise.
30394 2018-01-15 Jakub Jelinek <jakub@redhat.com>
30396 PR middle-end/82694
30397 * common.opt (fstrict-overflow): No longer an alias.
30398 (fwrapv-pointer): New option.
30399 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
30400 also for pointer types based on flag_wrapv_pointer.
30401 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
30402 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
30403 opts->x_flag_wrapv got set.
30404 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
30405 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
30406 POINTER_TYPE_OVERFLOW_UNDEFINED.
30407 * match.pd: Likewise in address comparison pattern.
30408 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
30410 2018-01-15 Richard Biener <rguenther@suse.de>
30413 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
30414 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
30415 Reset type names to their identifier if their TYPE_DECL doesn't
30416 have linkage (and thus is used for ODR and devirt).
30417 (save_debug_info_for_decl): Remove.
30418 (save_debug_info_for_type): Likewise.
30419 (add_tree_to_fld_list): Adjust.
30420 * tree-pretty-print.c (dump_generic_node): Make dumping of
30421 type names more robust.
30423 2018-01-15 Richard Biener <rguenther@suse.de>
30425 * BASE-VER: Bump to 8.0.1.
30427 2018-01-14 Martin Sebor <msebor@redhat.com>
30430 * builtins.c (check_access): Avoid warning when the no-warning bit
30433 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
30435 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
30436 * ira-color (allocno_hard_regs_compare): Likewise.
30438 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
30441 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
30442 Use .pushsection/.popsection.
30444 2018-01-14 Martin Sebor <msebor@redhat.com>
30447 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
30449 2018-01-14 Jakub Jelinek <jakub@redhat.com>
30451 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
30452 entry from extra_headers.
30453 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
30454 extra_headers, make the list bitwise identical to the i?86-*-* one.
30456 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30458 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
30459 -mcmodel=large with -mindirect-branch=thunk,
30460 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
30461 -mfunction-return=thunk-extern.
30462 * doc/invoke.texi: Document -mcmodel=large is incompatible with
30463 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
30464 -mfunction-return=thunk and -mfunction-return=thunk-extern.
30466 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30468 * config/i386/i386.c (print_reg): Print the name of the full
30469 integer register without '%'.
30470 (ix86_print_operand): Handle 'V'.
30471 * doc/extend.texi: Document 'V' modifier.
30473 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30475 * config/i386/constraints.md (Bs): Disallow memory operand for
30476 -mindirect-branch-register.
30478 * config/i386/predicates.md (indirect_branch_operand): Likewise.
30479 (GOT_memory_operand): Likewise.
30480 (call_insn_operand): Likewise.
30481 (sibcall_insn_operand): Likewise.
30482 (GOT32_symbol_operand): Likewise.
30483 * config/i386/i386.md (indirect_jump): Call convert_memory_address
30484 for -mindirect-branch-register.
30485 (tablejump): Likewise.
30486 (*sibcall_memory): Likewise.
30487 (*sibcall_value_memory): Likewise.
30488 Disallow peepholes of indirect call and jump via memory for
30489 -mindirect-branch-register.
30490 (*call_pop): Replace m with Bw.
30491 (*call_value_pop): Likewise.
30492 (*sibcall_pop_memory): Replace m with Bs.
30493 * config/i386/i386.opt (mindirect-branch-register): New option.
30494 * doc/invoke.texi: Document -mindirect-branch-register option.
30496 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30498 * config/i386/i386-protos.h (ix86_output_function_return): New.
30499 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
30500 set function_return_type.
30501 (indirect_thunk_name): Add ret_p to indicate thunk for function
30503 (output_indirect_thunk_function): Pass false to
30504 indirect_thunk_name.
30505 (ix86_output_indirect_branch_via_reg): Likewise.
30506 (ix86_output_indirect_branch_via_push): Likewise.
30507 (output_indirect_thunk_function): Create alias for function
30508 return thunk if regno < 0.
30509 (ix86_output_function_return): New function.
30510 (ix86_handle_fndecl_attribute): Handle function_return.
30511 (ix86_attribute_table): Add function_return.
30512 * config/i386/i386.h (machine_function): Add
30513 function_return_type.
30514 * config/i386/i386.md (simple_return_internal): Use
30515 ix86_output_function_return.
30516 (simple_return_internal_long): Likewise.
30517 * config/i386/i386.opt (mfunction-return=): New option.
30518 (indirect_branch): Mention -mfunction-return=.
30519 * doc/extend.texi: Document function_return function attribute.
30520 * doc/invoke.texi: Document -mfunction-return= option.
30522 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30524 * config/i386/i386-opts.h (indirect_branch): New.
30525 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
30526 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
30527 with local indirect jump when converting indirect call and jump.
30528 (ix86_set_indirect_branch_type): New.
30529 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
30530 (indirectlabelno): New.
30531 (indirect_thunk_needed): Likewise.
30532 (indirect_thunk_bnd_needed): Likewise.
30533 (indirect_thunks_used): Likewise.
30534 (indirect_thunks_bnd_used): Likewise.
30535 (INDIRECT_LABEL): Likewise.
30536 (indirect_thunk_name): Likewise.
30537 (output_indirect_thunk): Likewise.
30538 (output_indirect_thunk_function): Likewise.
30539 (ix86_output_indirect_branch_via_reg): Likewise.
30540 (ix86_output_indirect_branch_via_push): Likewise.
30541 (ix86_output_indirect_branch): Likewise.
30542 (ix86_output_indirect_jmp): Likewise.
30543 (ix86_code_end): Call output_indirect_thunk_function if needed.
30544 (ix86_output_call_insn): Call ix86_output_indirect_branch if
30546 (ix86_handle_fndecl_attribute): Handle indirect_branch.
30547 (ix86_attribute_table): Add indirect_branch.
30548 * config/i386/i386.h (machine_function): Add indirect_branch_type
30549 and has_local_indirect_jump.
30550 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
30552 (tablejump): Likewise.
30553 (*indirect_jump): Use ix86_output_indirect_jmp.
30554 (*tablejump_1): Likewise.
30555 (simple_return_indirect_internal): Likewise.
30556 * config/i386/i386.opt (mindirect-branch=): New option.
30557 (indirect_branch): New.
30560 (thunk-inline): Likewise.
30561 (thunk-extern): Likewise.
30562 * doc/extend.texi: Document indirect_branch function attribute.
30563 * doc/invoke.texi: Document -mindirect-branch= option.
30565 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
30568 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
30570 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
30572 * ipa-inline.c (want_inline_small_function_p): Return false if
30573 inlining has already failed with CIF_FINAL_ERROR.
30574 (update_caller_keys): Call want_inline_small_function_p before
30576 (update_callee_keys): Likewise.
30578 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
30580 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
30582 (rs6000_quadword_masked_address_p): Likewise.
30583 (quad_aligned_load_p): Likewise.
30584 (quad_aligned_store_p): Likewise.
30585 (const_load_sequence_p): Add comment to describe the outer-most loop.
30586 (mimic_memory_attributes_and_flags): New function.
30587 (rs6000_gen_stvx): Likewise.
30588 (replace_swapped_aligned_store): Likewise.
30589 (rs6000_gen_lvx): Likewise.
30590 (replace_swapped_aligned_load): Likewise.
30591 (replace_swapped_load_constant): Capitalize argument name in
30592 comment describing this function.
30593 (rs6000_analyze_swaps): Add a third pass to search for vector loads
30594 and stores that access quad-word aligned addresses and replace
30595 with stvx or lvx instructions when appropriate.
30596 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
30597 New function prototype.
30598 (rs6000_quadword_masked_address_p): Likewise.
30599 (rs6000_gen_lvx): Likewise.
30600 (rs6000_gen_stvx): Likewise.
30601 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
30602 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
30603 when memory address is aligned.
30604 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
30605 this split to select lvx instruction when memory address is aligned.
30606 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
30607 instruction when memory address is aligned.
30608 (*vsx_le_perm_load_v16qi): Likewise.
30609 (four unnamed splitters): Modify to select the stvx instruction
30610 when memory is aligned.
30612 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
30614 * predict.c (determine_unlikely_bbs): Handle correctly BBs
30615 which appears in the queue multiple times.
30617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30618 Alan Hayward <alan.hayward@arm.com>
30619 David Sherwood <david.sherwood@arm.com>
30621 * tree-vectorizer.h (vec_lower_bound): New structure.
30622 (_loop_vec_info): Add check_nonzero and lower_bounds.
30623 (LOOP_VINFO_CHECK_NONZERO): New macro.
30624 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
30625 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
30626 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
30627 fields. Make seg_len the distance travelled, not including the
30629 (dr_direction_indicator): Declare.
30630 (dr_zero_step_indicator): Likewise.
30631 (dr_known_forward_stride_p): Likewise.
30632 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
30634 (runtime_alias_check_p): Allow runtime alias checks with
30636 (operator ==): Compare access_size and align.
30637 (prune_runtime_alias_test_list): Rework for new distinction between
30638 the access_size and seg_len.
30639 (create_intersect_range_checks_index): Likewise. Cope with polynomial
30641 (get_segment_min_max): New function.
30642 (create_intersect_range_checks): Use it.
30643 (dr_step_indicator): New function.
30644 (dr_direction_indicator): Likewise.
30645 (dr_zero_step_indicator): Likewise.
30646 (dr_known_forward_stride_p): Likewise.
30647 * tree-loop-distribution.c (data_ref_segment_size): Return
30648 DR_STEP * (niters - 1).
30649 (compute_alias_check_pairs): Update call to the dr_with_seg_len
30651 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
30652 (vect_preserves_scalar_order_p): New function, split out from...
30653 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
30654 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
30655 (vect_vfa_access_size): New function.
30656 (vect_vfa_align): Likewise.
30657 (vect_compile_time_alias): Take access_size_a and access_b arguments.
30658 (dump_lower_bound): New function.
30659 (vect_check_lower_bound): Likewise.
30660 (vect_small_gap_p): Likewise.
30661 (vectorizable_with_step_bound_p): Likewise.
30662 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
30663 depencies if the vectorization factor is 1. Convert the checks
30664 for nonzero steps into checks on the bounds of DR_STEP. Try using
30665 a bunds check for variable steps if the minimum required step is
30666 relatively small. Update calls to the dr_with_seg_len
30667 constructor and to vect_compile_time_alias.
30668 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
30670 (vect_loop_versioning): Call it.
30671 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
30673 (vect_estimate_min_profitable_iters): Account for any bounds checks.
30675 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30676 Alan Hayward <alan.hayward@arm.com>
30677 David Sherwood <david.sherwood@arm.com>
30679 * doc/sourcebuild.texi (vect_scatter_store): Document.
30680 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
30682 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
30684 * genopinit.c (main): Add supports_vec_scatter_store and
30685 supports_vec_scatter_store_cached to target_optabs.
30686 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
30687 IFN_MASK_SCATTER_STORE.
30688 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
30690 * internal-fn.h (internal_store_fn_p): Declare.
30691 (internal_fn_stored_value_index): Likewise.
30692 * internal-fn.c (scatter_store_direct): New macro.
30693 (expand_scatter_store_optab_fn): New function.
30694 (direct_scatter_store_optab_supported_p): New macro.
30695 (internal_store_fn_p): New function.
30696 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
30697 IFN_MASK_SCATTER_STORE.
30698 (internal_fn_mask_index): Likewise.
30699 (internal_fn_stored_value_index): New function.
30700 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
30701 for scatter stores.
30702 * optabs-query.h (supports_vec_scatter_store_p): Declare.
30703 * optabs-query.c (supports_vec_scatter_store_p): New function.
30704 * tree-vectorizer.h (vect_get_store_rhs): Declare.
30705 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
30706 true for scatter stores.
30707 (vect_gather_scatter_fn_p): Handle scatter stores too.
30708 (vect_check_gather_scatter): Consider using scatter stores if
30709 supports_vec_scatter_store_p.
30710 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
30711 scatter stores too.
30712 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30713 internal_fn_stored_value_index.
30714 (check_load_store_masking): Handle scatter stores too.
30715 (vect_get_store_rhs): Make public.
30716 (vectorizable_call): Use internal_store_fn_p.
30717 (vectorizable_store): Handle scatter store internal functions.
30718 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
30719 when deciding whether the end of the group has been reached.
30720 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
30721 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
30722 (mask_scatter_store<mode>): New insns.
30724 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30725 Alan Hayward <alan.hayward@arm.com>
30726 David Sherwood <david.sherwood@arm.com>
30728 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
30729 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
30730 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
30732 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
30733 Use vect_truncate_gather_scatter_offset if we can't treat the
30734 operation as a normal gather load or scatter store.
30735 (get_group_load_store_type): Take the gather_scatter_info
30736 as argument. Try using a gather load or scatter store for
30737 single-element groups.
30738 (get_load_store_type): Update calls to get_group_load_store_type
30739 and vect_use_strided_gather_scatters_p.
30741 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30742 Alan Hayward <alan.hayward@arm.com>
30743 David Sherwood <david.sherwood@arm.com>
30745 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
30746 optional tree argument.
30747 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
30749 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
30750 but continue to use the current value as a fallback.
30751 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
30752 to compare the updates.
30753 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
30754 (get_load_store_type): Use it when handling a strided access.
30755 (vect_get_strided_load_store_ops): New function.
30756 (vect_get_data_ptr_increment): Likewise.
30757 (vectorizable_load): Handle strided gather loads. Always pass
30758 a step to vect_create_data_ref_ptr and bump_vector_ptr.
30760 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30761 Alan Hayward <alan.hayward@arm.com>
30762 David Sherwood <david.sherwood@arm.com>
30764 * doc/md.texi (gather_load@var{m}): Document.
30765 (mask_gather_load@var{m}): Likewise.
30766 * genopinit.c (main): Add supports_vec_gather_load and
30767 supports_vec_gather_load_cached to target_optabs.
30768 * optabs-tree.c (init_tree_optimization_optabs): Use
30769 ggc_cleared_alloc to allocate target_optabs.
30770 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
30771 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
30773 * internal-fn.h (internal_load_fn_p): Declare.
30774 (internal_gather_scatter_fn_p): Likewise.
30775 (internal_fn_mask_index): Likewise.
30776 (internal_gather_scatter_fn_supported_p): Likewise.
30777 * internal-fn.c (gather_load_direct): New macro.
30778 (expand_gather_load_optab_fn): New function.
30779 (direct_gather_load_optab_supported_p): New macro.
30780 (direct_internal_fn_optab): New function.
30781 (internal_load_fn_p): Likewise.
30782 (internal_gather_scatter_fn_p): Likewise.
30783 (internal_fn_mask_index): Likewise.
30784 (internal_gather_scatter_fn_supported_p): Likewise.
30785 * optabs-query.c (supports_at_least_one_mode_p): New function.
30786 (supports_vec_gather_load_p): Likewise.
30787 * optabs-query.h (supports_vec_gather_load_p): Declare.
30788 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
30789 and memory_type field.
30790 (NUM_PATTERNS): Bump to 15.
30791 * tree-vect-data-refs.c: Include internal-fn.h.
30792 (vect_gather_scatter_fn_p): New function.
30793 (vect_describe_gather_scatter_call): Likewise.
30794 (vect_check_gather_scatter): Try using internal functions for
30795 gather loads. Recognize existing calls to a gather load function.
30796 (vect_analyze_data_refs): Consider using gather loads if
30797 supports_vec_gather_load_p.
30798 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
30799 (vect_get_gather_scatter_offset_type): Likewise.
30800 (vect_convert_mask_for_vectype): Likewise.
30801 (vect_add_conversion_to_patterm): Likewise.
30802 (vect_try_gather_scatter_pattern): Likewise.
30803 (vect_recog_gather_scatter_pattern): New pattern recognizer.
30804 (vect_vect_recog_func_ptrs): Add it.
30805 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30806 internal_fn_mask_index and internal_gather_scatter_fn_p.
30807 (check_load_store_masking): Take the gather_scatter_info as an
30808 argument and handle gather loads.
30809 (vect_get_gather_scatter_ops): New function.
30810 (vectorizable_call): Check internal_load_fn_p.
30811 (vectorizable_load): Likewise. Handle gather load internal
30813 (vectorizable_store): Update call to check_load_store_masking.
30814 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
30815 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
30816 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
30817 (aarch64_gather_scale_operand_d): New predicates.
30818 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
30819 (mask_gather_load<mode>): New insns.
30821 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30822 Alan Hayward <alan.hayward@arm.com>
30823 David Sherwood <david.sherwood@arm.com>
30825 * optabs.def (fold_left_plus_optab): New optab.
30826 * doc/md.texi (fold_left_plus_@var{m}): Document.
30827 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
30828 * internal-fn.c (fold_left_direct): Define.
30829 (expand_fold_left_optab_fn): Likewise.
30830 (direct_fold_left_optab_supported_p): Likewise.
30831 * fold-const-call.c (fold_const_fold_left): New function.
30832 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
30833 * tree-parloops.c (valid_reduction_p): New function.
30834 (gather_scalar_reductions): Use it.
30835 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
30836 (vect_finish_replace_stmt): Declare.
30837 * tree-vect-loop.c (fold_left_reduction_fn): New function.
30838 (needs_fold_left_reduction_p): New function, split out from...
30839 (vect_is_simple_reduction): ...here. Accept reductions that
30840 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
30841 (vect_force_simple_reduction): Also store the reduction type in
30842 the assignment's STMT_VINFO_REDUC_TYPE.
30843 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
30844 (merge_with_identity): New function.
30845 (vect_expand_fold_left): Likewise.
30846 (vectorize_fold_left_reduction): Likewise.
30847 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
30848 scalar phi in place for it. Check for target support and reject
30849 cases that would reassociate the operation. Defer the transform
30850 phase to vectorize_fold_left_reduction.
30851 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
30852 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
30853 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
30855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30857 * tree-if-conv.c (predicate_mem_writes): Remove redundant
30858 call to ifc_temp_var.
30860 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30861 Alan Hayward <alan.hayward@arm.com>
30862 David Sherwood <david.sherwood@arm.com>
30864 * target.def (legitimize_address_displacement): Take the original
30865 offset as a poly_int.
30866 * targhooks.h (default_legitimize_address_displacement): Update
30868 * targhooks.c (default_legitimize_address_displacement): Likewise.
30869 * doc/tm.texi: Regenerate.
30870 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
30871 as an argument, moving assert of ad->disp == ad->disp_term to...
30872 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
30873 Try calling targetm.legitimize_address_displacement before expanding
30874 the address rather than afterwards, and adjust for the new interface.
30875 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
30876 Match the new hook interface. Handle SVE addresses.
30877 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
30878 new hook interface.
30880 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30882 * Makefile.in (OBJS): Add early-remat.o.
30883 * target.def (select_early_remat_modes): New hook.
30884 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
30885 * doc/tm.texi: Regenerate.
30886 * targhooks.h (default_select_early_remat_modes): Declare.
30887 * targhooks.c (default_select_early_remat_modes): New function.
30888 * timevar.def (TV_EARLY_REMAT): New timevar.
30889 * passes.def (pass_early_remat): New pass.
30890 * tree-pass.h (make_pass_early_remat): Declare.
30891 * early-remat.c: New file.
30892 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
30894 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
30896 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30897 Alan Hayward <alan.hayward@arm.com>
30898 David Sherwood <david.sherwood@arm.com>
30900 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
30901 vfm1 with a bound_epilog parameter.
30902 (vect_do_peeling): Update calls accordingly, and move the prologue
30903 call earlier in the function. Treat the base bound_epilog as 0 for
30904 fully-masked loops and retain vf - 1 for other loops. Add 1 to
30905 this base when peeling for gaps.
30906 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
30907 with fully-masked loops.
30908 (vect_estimate_min_profitable_iters): Handle the single peeled
30909 iteration in that case.
30911 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30912 Alan Hayward <alan.hayward@arm.com>
30913 David Sherwood <david.sherwood@arm.com>
30915 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
30916 single-element interleaving even if the size is not a power of 2.
30917 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
30918 accesses for single-element interleaving if the group size is
30921 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30922 Alan Hayward <alan.hayward@arm.com>
30923 David Sherwood <david.sherwood@arm.com>
30925 * doc/md.texi (fold_extract_last_@var{m}): Document.
30926 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
30927 * optabs.def (fold_extract_last_optab): New optab.
30928 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
30929 * internal-fn.c (fold_extract_direct): New macro.
30930 (expand_fold_extract_optab_fn): Likewise.
30931 (direct_fold_extract_optab_supported_p): Likewise.
30932 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
30933 * tree-vect-loop.c (vect_model_reduction_cost): Handle
30934 EXTRACT_LAST_REDUCTION.
30935 (get_initial_def_for_reduction): Do not create an initial vector
30936 for EXTRACT_LAST_REDUCTION reductions.
30937 (vectorizable_reduction): Leave the scalar phi in place for
30938 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
30939 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
30940 epilogue code for EXTRACT_LAST_REDUCTION and defer the
30941 transform phase to vectorizable_condition.
30942 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
30944 (vect_finish_stmt_generation): ...here.
30945 (vect_finish_replace_stmt): New function.
30946 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
30947 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
30949 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
30951 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30952 Alan Hayward <alan.hayward@arm.com>
30953 David Sherwood <david.sherwood@arm.com>
30955 * doc/md.texi (extract_last_@var{m}): Document.
30956 * optabs.def (extract_last_optab): New optab.
30957 * internal-fn.def (EXTRACT_LAST): New internal function.
30958 * internal-fn.c (cond_unary_direct): New macro.
30959 (expand_cond_unary_optab_fn): Likewise.
30960 (direct_cond_unary_optab_supported_p): Likewise.
30961 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
30962 loops using EXTRACT_LAST.
30963 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
30964 (extract_last_<mode>): ...this optab.
30965 (vec_extract<mode><Vel>): Update accordingly.
30967 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30968 Alan Hayward <alan.hayward@arm.com>
30969 David Sherwood <david.sherwood@arm.com>
30971 * target.def (empty_mask_is_expensive): New hook.
30972 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
30973 * doc/tm.texi: Regenerate.
30974 * targhooks.h (default_empty_mask_is_expensive): Declare.
30975 * targhooks.c (default_empty_mask_is_expensive): New function.
30976 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
30977 if the target says that empty masks are expensive.
30978 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
30980 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
30982 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30983 Alan Hayward <alan.hayward@arm.com>
30984 David Sherwood <david.sherwood@arm.com>
30986 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
30987 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
30988 (vect_use_loop_mask_for_alignment_p): New function.
30989 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
30990 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
30991 niters_skip argument. Make sure that the first niters_skip elements
30992 of the first iteration are inactive.
30993 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
30994 Update call to vect_set_loop_masks_directly.
30995 (get_misalign_in_elems): New function, split out from...
30996 (vect_gen_prolog_loop_niters): ...here.
30997 (vect_update_init_of_dr): Take a code argument that specifies whether
30998 the adjustment should be added or subtracted.
30999 (vect_update_init_of_drs): Likewise.
31000 (vect_prepare_for_masked_peels): New function.
31001 (vect_do_peeling): Skip prologue peeling if we're using a mask
31002 instead. Update call to vect_update_inits_of_drs.
31003 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
31005 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
31006 alignment. Do not include the number of peeled iterations in
31007 the minimum threshold in that case.
31008 (vectorizable_induction): Adjust the start value down by
31009 LOOP_VINFO_MASK_SKIP_NITERS iterations.
31010 (vect_transform_loop): Call vect_prepare_for_masked_peels.
31011 Take the number of skipped iterations into account when calculating
31013 * tree-vect-stmts.c (vect_gen_while_not): New function.
31015 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31016 Alan Hayward <alan.hayward@arm.com>
31017 David Sherwood <david.sherwood@arm.com>
31019 * doc/sourcebuild.texi (vect_fully_masked): Document.
31020 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
31021 default value to 0.
31022 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
31024 (vect_analyze_loop_2): ...here. Don't check the vectorization
31025 factor against the number of loop iterations if the loop is
31028 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31029 Alan Hayward <alan.hayward@arm.com>
31030 David Sherwood <david.sherwood@arm.com>
31032 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
31033 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
31034 (dump_groups): Update accordingly.
31035 (iv_use::mem_type): New member variable.
31036 (address_p): New function.
31037 (record_use): Add a mem_type argument and initialize the new
31039 (record_group_use): Add a mem_type argument. Use address_p.
31040 Remove obsolete null checks of base_object. Update call to record_use.
31041 (find_interesting_uses_op): Update call to record_group_use.
31042 (find_interesting_uses_cond): Likewise.
31043 (find_interesting_uses_address): Likewise.
31044 (get_mem_type_for_internal_fn): New function.
31045 (find_address_like_use): Likewise.
31046 (find_interesting_uses_stmt): Try find_address_like_use before
31047 calling find_interesting_uses_op.
31048 (addr_offset_valid_p): Use the iv mem_type field as the type
31049 of the addressed memory.
31050 (add_autoinc_candidates): Likewise.
31051 (get_address_cost): Likewise.
31052 (split_small_address_groups_p): Use address_p.
31053 (split_address_groups): Likewise.
31054 (add_iv_candidate_for_use): Likewise.
31055 (autoinc_possible_for_pair): Likewise.
31056 (rewrite_groups): Likewise.
31057 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
31058 (determine_group_iv_cost): Update after split of USE_ADDRESS.
31059 (get_alias_ptr_type_for_ptr_address): New function.
31060 (rewrite_use_address): Rewrite address uses in calls that were
31061 identified by find_address_like_use.
31063 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31064 Alan Hayward <alan.hayward@arm.com>
31065 David Sherwood <david.sherwood@arm.com>
31067 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
31069 * gimple-expr.h (is_gimple_addressable: Likewise.
31070 * gimple-expr.c (is_gimple_address): Likewise.
31071 * internal-fn.c (expand_call_mem_ref): New function.
31072 (expand_mask_load_optab_fn): Use it.
31073 (expand_mask_store_optab_fn): Likewise.
31075 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31076 Alan Hayward <alan.hayward@arm.com>
31077 David Sherwood <david.sherwood@arm.com>
31079 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
31080 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
31081 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
31082 (cond_umax@var{mode}): Document.
31083 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
31084 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
31085 (cond_umin_optab, cond_umax_optab): New optabs.
31086 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
31087 (COND_IOR, COND_XOR): New internal functions.
31088 * internal-fn.h (get_conditional_internal_fn): Declare.
31089 * internal-fn.c (cond_binary_direct): New macro.
31090 (expand_cond_binary_optab_fn): Likewise.
31091 (direct_cond_binary_optab_supported_p): Likewise.
31092 (get_conditional_internal_fn): New function.
31093 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
31094 Cope with reduction statements that are vectorized as calls rather
31096 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
31097 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
31098 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
31099 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
31100 (UNSPEC_COND_EOR): New unspecs.
31101 (optab): Add mappings for them.
31102 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
31103 (sve_int_op, sve_fp_op): New int attributes.
31105 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31106 Alan Hayward <alan.hayward@arm.com>
31107 David Sherwood <david.sherwood@arm.com>
31109 * optabs.def (while_ult_optab): New optab.
31110 * doc/md.texi (while_ult@var{m}@var{n}): Document.
31111 * internal-fn.def (WHILE_ULT): New internal function.
31112 * internal-fn.h (direct_internal_fn_supported_p): New override
31113 that takes two types as argument.
31114 * internal-fn.c (while_direct): New macro.
31115 (expand_while_optab_fn): New function.
31116 (convert_optab_supported_p): Likewise.
31117 (direct_while_optab_supported_p): New macro.
31118 * wide-int.h (wi::udiv_ceil): New function.
31119 * tree-vectorizer.h (rgroup_masks): New structure.
31120 (vec_loop_masks): New typedef.
31121 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
31122 and fully_masked_p.
31123 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
31124 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
31125 (vect_max_vf): New function.
31126 (slpeel_make_loop_iterate_ntimes): Delete.
31127 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
31128 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
31129 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
31130 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
31131 internal-fn.h, stor-layout.h and optabs-query.h.
31132 (vect_set_loop_mask): New function.
31133 (add_preheader_seq): Likewise.
31134 (add_header_seq): Likewise.
31135 (interleave_supported_p): Likewise.
31136 (vect_maybe_permute_loop_masks): Likewise.
31137 (vect_set_loop_masks_directly): Likewise.
31138 (vect_set_loop_condition_masked): Likewise.
31139 (vect_set_loop_condition_unmasked): New function, split out from
31140 slpeel_make_loop_iterate_ntimes.
31141 (slpeel_make_loop_iterate_ntimes): Rename to..
31142 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
31143 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
31144 (vect_do_peeling): Update call accordingly.
31145 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
31147 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
31148 mask_compare_type, can_fully_mask_p and fully_masked_p.
31149 (release_vec_loop_masks): New function.
31150 (_loop_vec_info): Use it to free the loop masks.
31151 (can_produce_all_loop_masks_p): New function.
31152 (vect_get_max_nscalars_per_iter): Likewise.
31153 (vect_verify_full_masking): Likewise.
31154 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
31155 retries, and free the mask rgroups before retrying. Check loop-wide
31156 reasons for disallowing fully-masked loops. Make the final decision
31157 about whether use a fully-masked loop or not.
31158 (vect_estimate_min_profitable_iters): Do not assume that peeling
31159 for the number of iterations will be needed for fully-masked loops.
31160 (vectorizable_reduction): Disable fully-masked loops.
31161 (vectorizable_live_operation): Likewise.
31162 (vect_halve_mask_nunits): New function.
31163 (vect_double_mask_nunits): Likewise.
31164 (vect_record_loop_mask): Likewise.
31165 (vect_get_loop_mask): Likewise.
31166 (vect_transform_loop): Handle the case in which the final loop
31167 iteration might handle a partial vector. Call vect_set_loop_condition
31168 instead of slpeel_make_loop_iterate_ntimes.
31169 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
31170 (check_load_store_masking): New function.
31171 (prepare_load_store_mask): Likewise.
31172 (vectorizable_store): Handle fully-masked loops.
31173 (vectorizable_load): Likewise.
31174 (supportable_widening_operation): Use vect_halve_mask_nunits for
31176 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
31177 (vect_gen_while): New function.
31178 * config/aarch64/aarch64.md (umax<mode>3): New expander.
31179 (aarch64_uqdec<mode>): New insn.
31181 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31182 Alan Hayward <alan.hayward@arm.com>
31183 David Sherwood <david.sherwood@arm.com>
31185 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
31186 (reduc_xor_scal_optab): New optabs.
31187 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
31188 (reduc_xor_scal_@var{m}): Document.
31189 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
31190 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
31191 internal functions.
31192 * fold-const-call.c (fold_const_call): Handle them.
31193 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
31194 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
31195 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
31196 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
31197 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
31198 (UNSPEC_XORV): New unspecs.
31199 (optab): Add entries for them.
31200 (BITWISEV): New int iterator.
31201 (bit_reduc_op): New int attributes.
31203 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31204 Alan Hayward <alan.hayward@arm.com>
31205 David Sherwood <david.sherwood@arm.com>
31207 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
31208 * internal-fn.def (VEC_SHL_INSERT): New internal function.
31209 * optabs.def (vec_shl_insert_optab): New optab.
31210 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
31211 (duplicate_and_interleave): Likewise.
31212 * tree-vect-loop.c: Include internal-fn.h.
31213 (neutral_op_for_slp_reduction): New function, split out from
31214 get_initial_defs_for_reduction.
31215 (get_initial_def_for_reduction): Handle option 2 for variable-length
31216 vectors by loading the neutral value into a vector and then shifting
31217 the initial value into element 0.
31218 (get_initial_defs_for_reduction): Replace the code argument with
31219 the neutral value calculated by neutral_op_for_slp_reduction.
31220 Use gimple_build_vector for constant-length vectors.
31221 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
31222 but the first group_size elements have a neutral value.
31223 Use duplicate_and_interleave otherwise.
31224 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
31225 Update call to get_initial_defs_for_reduction. Handle SLP
31226 reductions for variable-length vectors by creating one vector
31227 result for each scalar result, with the elements associated
31228 with other scalar results stubbed out with the neutral value.
31229 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
31230 Require IFN_VEC_SHL_INSERT for double reductions on
31231 variable-length vectors, or SLP reductions that have
31232 a neutral value. Require can_duplicate_and_interleave_p
31233 support for variable-length unchained SLP reductions if there
31234 is no neutral value, such as for MIN/MAX reductions. Also require
31235 the number of vector elements to be a multiple of the number of
31236 SLP statements when doing variable-length unchained SLP reductions.
31237 Update call to vect_create_epilog_for_reduction.
31238 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
31239 and remove initial values.
31240 (duplicate_and_interleave): Make public.
31241 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
31242 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
31244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31245 Alan Hayward <alan.hayward@arm.com>
31246 David Sherwood <david.sherwood@arm.com>
31248 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
31249 (can_duplicate_and_interleave_p): New function.
31250 (vect_get_and_check_slp_defs): Take the vector of statements
31251 rather than just the current one. Remove excess parentheses.
31252 Restriction rejectinon of vect_constant_def and vect_external_def
31253 for variable-length vectors to boolean types, or types for which
31254 can_duplicate_and_interleave_p is false.
31255 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
31256 (duplicate_and_interleave): New function.
31257 (vect_get_constant_vectors): Use gimple_build_vector for
31258 constant-length vectors and suitable variable-length constant
31259 vectors. Use duplicate_and_interleave for other variable-length
31260 vectors. Don't defer the update when inserting new statements.
31262 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31263 Alan Hayward <alan.hayward@arm.com>
31264 David Sherwood <david.sherwood@arm.com>
31266 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
31267 min_profitable_iters doesn't go negative.
31269 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31270 Alan Hayward <alan.hayward@arm.com>
31271 David Sherwood <david.sherwood@arm.com>
31273 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
31274 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
31275 * optabs.def (vec_mask_load_lanes_optab): New optab.
31276 (vec_mask_store_lanes_optab): Likewise.
31277 * internal-fn.def (MASK_LOAD_LANES): New internal function.
31278 (MASK_STORE_LANES): Likewise.
31279 * internal-fn.c (mask_load_lanes_direct): New macro.
31280 (mask_store_lanes_direct): Likewise.
31281 (expand_mask_load_optab_fn): Handle masked operations.
31282 (expand_mask_load_lanes_optab_fn): New macro.
31283 (expand_mask_store_optab_fn): Handle masked operations.
31284 (expand_mask_store_lanes_optab_fn): New macro.
31285 (direct_mask_load_lanes_optab_supported_p): Likewise.
31286 (direct_mask_store_lanes_optab_supported_p): Likewise.
31287 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
31289 (vect_load_lanes_supported): Likewise.
31290 * tree-vect-data-refs.c (strip_conversion): New function.
31291 (can_group_stmts_p): Likewise.
31292 (vect_analyze_data_ref_accesses): Use it instead of checking
31293 for a pair of assignments.
31294 (vect_store_lanes_supported): Take a masked_p parameter.
31295 (vect_load_lanes_supported): Likewise.
31296 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
31297 vect_store_lanes_supported and vect_load_lanes_supported.
31298 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
31299 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
31300 parameter. Don't allow gaps for masked accesses.
31301 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
31302 and vect_load_lanes_supported.
31303 (get_load_store_type): Take a masked_p parameter and update
31304 call to get_group_load_store_type.
31305 (vectorizable_store): Update call to get_load_store_type.
31306 Handle IFN_MASK_STORE_LANES.
31307 (vectorizable_load): Update call to get_load_store_type.
31308 Handle IFN_MASK_LOAD_LANES.
31310 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31311 Alan Hayward <alan.hayward@arm.com>
31312 David Sherwood <david.sherwood@arm.com>
31314 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
31316 * config/aarch64/aarch64-protos.h
31317 (aarch64_sve_struct_memory_operand_p): Declare.
31318 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
31319 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
31320 (VPRED, vpred): Handle SVE structure modes.
31321 * config/aarch64/constraints.md (Utx): New constraint.
31322 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
31323 (aarch64_sve_struct_nonimmediate_operand): New predicates.
31324 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
31325 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
31326 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
31327 structure modes. Split into pieces after RA.
31328 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
31329 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
31331 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
31332 SVE structure modes.
31333 (aarch64_classify_address): Likewise.
31334 (sizetochar): Move earlier in file.
31335 (aarch64_print_operand): Handle SVE register lists.
31336 (aarch64_array_mode): New function.
31337 (aarch64_sve_struct_memory_operand_p): Likewise.
31338 (TARGET_ARRAY_MODE): Redefine.
31340 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31341 Alan Hayward <alan.hayward@arm.com>
31342 David Sherwood <david.sherwood@arm.com>
31344 * target.def (array_mode): New target hook.
31345 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
31346 * doc/tm.texi: Regenerate.
31347 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
31348 * hooks.c (hook_optmode_mode_uhwi_none): New function.
31349 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
31350 targetm.array_mode.
31351 * stor-layout.c (mode_for_array): Likewise. Support polynomial
31354 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31355 Alan Hayward <alan.hayward@arm.com>
31356 David Sherwood <david.sherwood@arm.com>
31358 * fold-const.c (fold_binary_loc): Check the argument types
31359 rather than the result type when testing for a vector operation.
31361 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31363 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
31364 * doc/tm.texi: Regenerate.
31366 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31367 Alan Hayward <alan.hayward@arm.com>
31368 David Sherwood <david.sherwood@arm.com>
31370 * doc/invoke.texi (-msve-vector-bits=): Document new option.
31371 (sve): Document new AArch64 extension.
31372 * doc/md.texi (w): Extend the description of the AArch64
31373 constraint to include SVE vectors.
31374 (Upl, Upa): Document new AArch64 predicate constraints.
31375 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
31377 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
31378 (msve-vector-bits=): New option.
31379 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
31380 SVE when these are disabled.
31381 (sve): New extension.
31382 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
31383 modes. Adjust their number of units based on aarch64_sve_vg.
31384 (MAX_BITSIZE_MODE_ANY_MODE): Define.
31385 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
31386 aarch64_addr_query_type.
31387 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
31388 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
31389 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
31390 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
31391 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
31392 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
31393 (aarch64_simd_imm_zero_p): Delete.
31394 (aarch64_check_zero_based_sve_index_immediate): Declare.
31395 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31396 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31397 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31398 (aarch64_sve_float_mul_immediate_p): Likewise.
31399 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31400 rather than an rtx.
31401 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
31402 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
31403 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
31404 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
31405 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
31406 (aarch64_regmode_natural_size): Likewise.
31407 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
31408 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
31410 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
31411 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
31412 for VG and the SVE predicate registers.
31413 (V_ALIASES): Add a "z"-prefixed alias.
31414 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
31415 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
31416 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
31417 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
31418 (REG_CLASS_NAMES): Add entries for them.
31419 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
31420 and the predicate registers.
31421 (aarch64_sve_vg): Declare.
31422 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
31423 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
31424 (REGMODE_NATURAL_SIZE): Define.
31425 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
31427 * config/aarch64/aarch64.c: Include cfgrtl.h.
31428 (simd_immediate_info): Add a constructor for series vectors,
31429 and an associated step field.
31430 (aarch64_sve_vg): New variable.
31431 (aarch64_dbx_register_number): Handle VG and the predicate registers.
31432 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
31433 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
31434 (VEC_ANY_DATA, VEC_STRUCT): New constants.
31435 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
31436 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
31437 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
31438 (aarch64_get_mask_mode): New functions.
31439 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
31440 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
31441 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
31442 predicate modes and predicate registers. Explicitly restrict
31443 GPRs to modes of 16 bytes or smaller. Only allow FP registers
31444 to store a vector mode if it is recognized by
31445 aarch64_classify_vector_mode.
31446 (aarch64_regmode_natural_size): New function.
31447 (aarch64_hard_regno_caller_save_mode): Return the original mode
31449 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
31450 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
31451 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
31452 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
31454 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
31455 does not overlap dest if the function is frame-related. Handle
31457 (aarch64_split_add_offset): New function.
31458 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
31459 them aarch64_add_offset.
31460 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
31461 and update call to aarch64_sub_sp.
31462 (aarch64_add_cfa_expression): New function.
31463 (aarch64_expand_prologue): Pass extra temporary registers to the
31464 functions above. Handle the case in which we need to emit new
31465 DW_CFA_expressions for registers that were originally saved
31466 relative to the stack pointer, but now have to be expressed
31467 relative to the frame pointer.
31468 (aarch64_output_mi_thunk): Pass extra temporary registers to the
31470 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
31471 IP0 and IP1 values for SVE frames.
31472 (aarch64_expand_vec_series): New function.
31473 (aarch64_expand_sve_widened_duplicate): Likewise.
31474 (aarch64_expand_sve_const_vector): Likewise.
31475 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
31476 Handle SVE constants. Use emit_move_insn to move a force_const_mem
31477 into the register, rather than emitting a SET directly.
31478 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
31479 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
31480 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
31481 (offset_9bit_signed_scaled_p): New functions.
31482 (aarch64_replicate_bitmask_imm): New function.
31483 (aarch64_bitmask_imm): Use it.
31484 (aarch64_cannot_force_const_mem): Reject expressions involving
31485 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
31486 (aarch64_classify_index): Handle SVE indices, by requiring
31487 a plain register index with a scale that matches the element size.
31488 (aarch64_classify_address): Handle SVE addresses. Assert that
31489 the mode of the address is VOIDmode or an integer mode.
31490 Update call to aarch64_classify_symbol.
31491 (aarch64_classify_symbolic_expression): Update call to
31492 aarch64_classify_symbol.
31493 (aarch64_const_vec_all_in_range_p): New function.
31494 (aarch64_print_vector_float_operand): Likewise.
31495 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
31496 "vN" for FP registers with SVE modes. Handle (const ...) vectors
31497 and the FP immediates 1.0 and 0.5.
31498 (aarch64_print_address_internal): Handle SVE addresses.
31499 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
31500 (aarch64_regno_regclass): Handle predicate registers.
31501 (aarch64_secondary_reload): Handle big-endian reloads of SVE
31503 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
31504 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
31505 (aarch64_convert_sve_vector_bits): New function.
31506 (aarch64_override_options): Use it to handle -msve-vector-bits=.
31507 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31508 rather than an rtx.
31509 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
31510 Handle SVE vector and predicate modes. Accept VL-based constants
31511 that need only one temporary register, and VL offsets that require
31512 no temporary registers.
31513 (aarch64_conditional_register_usage): Mark the predicate registers
31514 as fixed if SVE isn't available.
31515 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
31516 Return true for SVE vector and predicate modes.
31517 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
31518 rather than an unsigned int. Handle SVE modes.
31519 (aarch64_preferred_simd_mode): Update call accordingly. Handle
31521 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
31523 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31524 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31525 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31526 (aarch64_sve_float_mul_immediate_p): New functions.
31527 (aarch64_sve_valid_immediate): New function.
31528 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
31529 Explicitly reject structure modes. Check for INDEX constants.
31530 Handle PTRUE and PFALSE constants.
31531 (aarch64_check_zero_based_sve_index_immediate): New function.
31532 (aarch64_simd_imm_zero_p): Delete.
31533 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
31534 vector modes. Accept constants in the range of CNT[BHWD].
31535 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
31536 ask for an Advanced SIMD mode.
31537 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
31538 (aarch64_simd_vector_alignment): Handle SVE predicates.
31539 (aarch64_vectorize_preferred_vector_alignment): New function.
31540 (aarch64_simd_vector_alignment_reachable): Use it instead of
31542 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
31543 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
31545 (MAX_VECT_LEN): Delete.
31546 (expand_vec_perm_d): Add a vec_flags field.
31547 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
31548 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
31549 (aarch64_evpc_ext): Don't apply a big-endian lane correction
31551 (aarch64_evpc_rev): Rename to...
31552 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
31553 (aarch64_evpc_rev_global): New function.
31554 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
31555 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
31557 (aarch64_evpc_sve_tbl): New function.
31558 (aarch64_expand_vec_perm_const_1): Update after rename of
31559 aarch64_evpc_rev. Handle SVE permutes too, trying
31560 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
31561 than aarch64_evpc_tbl.
31562 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
31563 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
31564 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
31565 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
31566 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
31567 (aarch64_expand_sve_vcond): New functions.
31568 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
31569 of aarch64_vector_mode_p.
31570 (aarch64_dwarf_poly_indeterminate_value): New function.
31571 (aarch64_compute_pressure_classes): Likewise.
31572 (aarch64_can_change_mode_class): Likewise.
31573 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
31574 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
31575 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
31576 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
31577 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
31578 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
31579 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
31580 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
31582 (Dn, Dl, Dr): Accept const as well as const_vector.
31583 (Dz): Likewise. Compare against CONST0_RTX.
31584 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
31585 of "vector" where appropriate.
31586 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
31587 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
31588 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
31589 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
31590 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
31591 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
31592 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
31593 (v_int_equiv): Extend to SVE modes.
31594 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
31596 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
31597 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
31598 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
31599 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
31600 (SVE_COND_FP_CMP): New int iterators.
31601 (perm_hilo): Handle the new unpack unspecs.
31602 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
31604 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
31605 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
31606 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
31607 (aarch64_equality_operator, aarch64_constant_vector_operand)
31608 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
31609 (aarch64_sve_nonimmediate_operand): Likewise.
31610 (aarch64_sve_general_operand): Likewise.
31611 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
31612 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
31613 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
31614 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
31615 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
31616 (aarch64_sve_float_arith_immediate): Likewise.
31617 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
31618 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
31619 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
31620 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
31621 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
31622 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
31623 (aarch64_sve_float_arith_operand): Likewise.
31624 (aarch64_sve_float_arith_with_sub_operand): Likewise.
31625 (aarch64_sve_float_mul_operand): Likewise.
31626 (aarch64_sve_vec_perm_operand): Likewise.
31627 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
31628 (aarch64_mov_operand): Accept const_poly_int and const_vector.
31629 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
31630 as well as const_vector.
31631 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
31632 in file. Use CONST0_RTX and CONSTM1_RTX.
31633 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
31634 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
31635 Use aarch64_simd_imm_zero.
31636 * config/aarch64/aarch64-sve.md: New file.
31637 * config/aarch64/aarch64.md: Include it.
31638 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
31639 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
31640 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
31641 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
31642 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
31643 (sve): New attribute.
31644 (enabled): Disable instructions with the sve attribute unless
31646 (movqi, movhi): Pass CONST_POLY_INT operaneds through
31647 aarch64_expand_mov_immediate.
31648 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
31649 CNT[BHSD] immediates.
31650 (movti): Split CONST_POLY_INT moves into two halves.
31651 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
31652 Split additions that need a temporary here if the destination
31653 is the stack pointer.
31654 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
31655 (*add<mode>3_poly_1): New instruction.
31656 (set_clobber_cc): New expander.
31658 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31660 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
31661 parameter and use it instead of GET_MODE_SIZE (innermode). Use
31662 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
31663 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
31664 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
31665 Change innermode from fixed_mode_size to machine_mode.
31666 (simplify_subreg): Update call accordingly. Handle a constant-sized
31667 subreg of a variable-length CONST_VECTOR.
31669 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31670 Alan Hayward <alan.hayward@arm.com>
31671 David Sherwood <david.sherwood@arm.com>
31673 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
31674 (add_offset_to_base): New function, split out from...
31675 (create_mem_ref): ...here. When handling a scale other than 1,
31676 check first whether the address is valid without the offset.
31677 Add it into the base if so, leaving the index and scale as-is.
31679 2018-01-12 Jakub Jelinek <jakub@redhat.com>
31682 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
31683 fold_for_warn before checking if arg2 is INTEGER_CST.
31685 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
31687 * config/rs6000/predicates.md (load_multiple_operation): Delete.
31688 (store_multiple_operation): Delete.
31689 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
31690 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
31691 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
31692 guarded by TARGET_STRING.
31693 (rs6000_output_load_multiple): Delete.
31694 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
31695 OPTION_MASK_STRING / TARGET_STRING handling.
31696 (print_operand) <'N', 'O'>: Add comment that these are unused now.
31697 (const rs6000_opt_masks) <"string">: Change mask to 0.
31698 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
31699 (MASK_STRING): Delete.
31700 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
31702 (load_multiple): Delete.
31709 (store_multiple): Delete.
31716 (movmemsi_8reg): Delete.
31717 (corresponding unnamed define_insn): Delete.
31718 (movmemsi_6reg): Delete.
31719 (corresponding unnamed define_insn): Delete.
31720 (movmemsi_4reg): Delete.
31721 (corresponding unnamed define_insn): Delete.
31722 (movmemsi_2reg): Delete.
31723 (corresponding unnamed define_insn): Delete.
31724 (movmemsi_1reg): Delete.
31725 (corresponding unnamed define_insn): Delete.
31726 * config/rs6000/rs6000.opt (mno-string): New.
31727 (mstring): Replace by deprecation warning stub.
31728 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
31730 2018-01-12 Jakub Jelinek <jakub@redhat.com>
31732 * regrename.c (regrename_do_replace): If replacing the same
31733 reg multiple times, try to reuse last created gen_raw_REG.
31736 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
31737 main to workaround a bug in GDB.
31739 2018-01-12 Tom de Vries <tom@codesourcery.com>
31742 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
31744 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
31746 PR rtl-optimization/80481
31747 * ira-color.c (get_cap_member): New function.
31748 (allocnos_conflict_by_live_ranges_p): Use it.
31749 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
31750 (setup_slot_coalesced_allocno_live_ranges): Ditto.
31752 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
31755 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
31756 (*saddl_se_1): Ditto.
31757 (*ssubsi_1): Ditto.
31758 (*ssubl_se_1): Ditto.
31760 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31762 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
31763 rather than wi::to_widest for DR_INITs.
31764 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
31765 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
31766 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
31768 (vect_analyze_group_access_1): Note that here.
31770 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31772 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
31773 polynomial type sizes.
31775 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31777 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
31778 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
31779 (gimple_add_tmp_var): Likewise.
31781 2018-01-12 Martin Liska <mliska@suse.cz>
31783 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
31784 (gimple_alloc_sizes): Likewise.
31785 (dump_gimple_statistics): Use PRIu64 in printf format.
31786 * gimple.h: Change uint64_t to int.
31788 2018-01-12 Martin Liska <mliska@suse.cz>
31790 * tree-core.h: Use uint64_t instead of int.
31791 * tree.c (tree_node_counts): Likewise.
31792 (tree_node_sizes): Likewise.
31793 (dump_tree_statistics): Use PRIu64 in printf format.
31795 2018-01-12 Martin Liska <mliska@suse.cz>
31797 * Makefile.in: As qsort_chk is implemented in vec.c, add
31798 vec.o to linkage of gencfn-macros.
31799 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
31800 passing the info to record_node_allocation_statistics.
31801 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
31803 * ggc-common.c (struct ggc_usage): Add operator== and use
31804 it in operator< and compare function.
31805 * mem-stats.h (struct mem_usage): Likewise.
31806 * vec.c (struct vec_usage): Remove operator< and compare
31807 function. Can be simply inherited.
31809 2018-01-12 Martin Jambor <mjambor@suse.cz>
31812 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
31813 * tree-ssa-math-opts.c: Include domwalk.h.
31814 (convert_mult_to_fma_1): New function.
31815 (fma_transformation_info): New type.
31816 (fma_deferring_state): Likewise.
31817 (cancel_fma_deferring): New function.
31818 (result_of_phi): Likewise.
31819 (last_fma_candidate_feeds_initial_phi): Likewise.
31820 (convert_mult_to_fma): Added deferring logic, split actual
31821 transformation to convert_mult_to_fma_1.
31822 (math_opts_dom_walker): New type.
31823 (math_opts_dom_walker::after_dom_children): New method, body moved
31824 here from pass_optimize_widening_mul::execute, added deferring logic
31826 (pass_optimize_widening_mul::execute): Moved most of code to
31827 math_opts_dom_walker::after_dom_children.
31828 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
31829 * config/i386/i386.c (ix86_option_override_internal): Added
31830 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
31832 2018-01-12 Richard Biener <rguenther@suse.de>
31835 * dwarf2out.c (gen_variable_die): Do not reset old_die for
31836 inline instance vars.
31838 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
31841 * config/rx/rx.c (rx_is_restricted_memory_address):
31842 Handle SUBREG case.
31844 2018-01-12 Richard Biener <rguenther@suse.de>
31846 PR tree-optimization/80846
31847 * target.def (split_reduction): New target hook.
31848 * targhooks.c (default_split_reduction): New function.
31849 * targhooks.h (default_split_reduction): Declare.
31850 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
31851 target requests first reduce vectors by combining low and high
31853 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
31854 (get_vectype_for_scalar_type_and_size): Export.
31855 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
31856 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
31857 * doc/tm.texi: Regenerate.
31858 * config/i386/i386.c (ix86_split_reduction): Implement
31859 TARGET_VECTORIZE_SPLIT_REDUCTION.
31861 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
31864 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
31865 in PIC mode except for TARGET_VXWORKS_RTP.
31866 * config/sparc/sparc.c: Include cfgrtl.h.
31867 (TARGET_INIT_PIC_REG): Define.
31868 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
31869 (sparc_pic_register_p): New predicate.
31870 (sparc_legitimate_address_p): Use it.
31871 (sparc_legitimize_pic_address): Likewise.
31872 (sparc_delegitimize_address): Likewise.
31873 (sparc_mode_dependent_address_p): Likewise.
31874 (gen_load_pcrel_sym): Remove 4th parameter.
31875 (load_got_register): Adjust call to above. Remove obsolete stuff.
31876 (sparc_expand_prologue): Do not call load_got_register here.
31877 (sparc_flat_expand_prologue): Likewise.
31878 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
31879 (sparc_use_pseudo_pic_reg): New function.
31880 (sparc_init_pic_reg): Likewise.
31881 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
31882 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
31884 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
31886 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
31887 Add item for branch_cost.
31889 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
31891 PR rtl-optimization/83565
31892 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
31893 not extend the result to a larger mode for rotate operations.
31894 (num_sign_bit_copies1): Likewise.
31896 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31899 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
31901 Use values-Xc.o for -pedantic.
31902 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
31904 2018-01-12 Martin Liska <mliska@suse.cz>
31907 * ipa-devirt.c (final_warning_record::grow_type_warnings):
31909 (possible_polymorphic_call_targets): Use it.
31910 (ipa_devirt): Likewise.
31912 2018-01-12 Martin Liska <mliska@suse.cz>
31914 * profile-count.h (enum profile_quality): Use 0 as invalid
31915 enum value of profile_quality.
31917 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
31919 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
31920 -mext-string options.
31922 2018-01-12 Richard Biener <rguenther@suse.de>
31924 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
31925 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
31926 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
31928 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
31930 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
31932 * configure.ac (--with-long-double-format): Add support for the
31933 configuration option to change the default long double format on
31935 * config.gcc (powerpc*-linux*-*): Likewise.
31936 * configure: Regenerate.
31937 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
31938 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
31939 used without modification.
31941 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31943 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
31944 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
31945 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
31946 MISC_BUILTIN_SPEC_BARRIER.
31947 (rs6000_init_builtins): Likewise.
31948 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
31950 (speculation_barrier): New define_insn.
31951 * doc/extend.texi: Document __builtin_speculation_barrier.
31953 2018-01-11 Jakub Jelinek <jakub@redhat.com>
31956 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
31957 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
31958 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
31960 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
31961 integral modes instead of "ss" and "sd".
31962 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
31963 vectors with 32-bit and 64-bit elements.
31964 (vecdupssescalarmodesuffix): New mode attribute.
31965 (vec_dup<mode>): Use it.
31967 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
31970 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
31971 frame if argument is passed on stack.
31973 2018-01-11 Jakub Jelinek <jakub@redhat.com>
31976 * ree.c (combine_reaching_defs): Optimize also
31977 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
31978 reg2=any_extend(exp); reg1=reg2;, formatting fix.
31980 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
31982 PR middle-end/83189
31983 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
31985 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
31987 PR middle-end/83718
31988 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
31989 after they are computed.
31991 2018-01-11 Bin Cheng <bin.cheng@arm.com>
31993 PR tree-optimization/83695
31994 * gimple-loop-linterchange.cc
31995 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
31996 reset cached scev information after interchange.
31997 (pass_linterchange::execute): Remove call to scev_reset_htab.
31999 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32001 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
32002 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
32003 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
32004 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
32005 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
32006 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
32007 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
32008 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
32009 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
32010 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
32011 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
32012 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
32013 (V_lane_reg): Likewise.
32014 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
32016 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
32017 (vfmal_lane_low<mode>_intrinsic,
32018 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
32019 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
32020 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
32021 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
32022 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
32023 vfmsl_lane_high<mode>_intrinsic): New define_insns.
32025 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32027 * config/arm/arm-cpus.in (fp16fml): New feature.
32028 (ALL_SIMD): Add fp16fml.
32029 (armv8.2-a): Add fp16fml as an option.
32030 (armv8.3-a): Likewise.
32031 (armv8.4-a): Add fp16fml as part of fp16.
32032 * config/arm/arm.h (TARGET_FP16FML): Define.
32033 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
32035 * config/arm/arm-modes.def (V2HF): Define.
32036 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
32037 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
32038 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
32039 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
32040 vfmsl_low, vfmsl_high): New set of builtins.
32041 * config/arm/iterators.md (PLUSMINUS): New code iterator.
32042 (vfml_op): New code attribute.
32043 (VFMLHALVES): New int iterator.
32044 (VFML, VFMLSEL): New mode attributes.
32045 (V_reg): Define mapping for V2HF.
32046 (V_hi, V_lo): New mode attributes.
32047 (VF_constraint): Likewise.
32048 (vfml_half, vfml_half_selector): New int attributes.
32049 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
32051 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
32052 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
32054 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
32055 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
32056 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
32057 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
32059 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
32060 Document new effective target and option set.
32062 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32064 * config/arm/arm-cpus.in (armv8_4): New feature.
32065 (ARMv8_4a): New fgroup.
32066 (armv8.4-a): New arch.
32067 * config/arm/arm-tables.opt: Regenerate.
32068 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
32069 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
32070 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
32071 Add matching rules for -march=armv8.4-a and extensions.
32072 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
32074 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
32077 * config/rx/rx.md (BW): New mode attribute.
32078 (sync_lock_test_and_setsi): Add mode suffix to insn output.
32080 2018-01-11 Richard Biener <rguenther@suse.de>
32082 PR tree-optimization/83435
32083 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
32084 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
32085 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
32087 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32088 Alan Hayward <alan.hayward@arm.com>
32089 David Sherwood <david.sherwood@arm.com>
32091 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
32093 (aarch64_classify_address): Initialize it. Track polynomial offsets.
32094 (aarch64_print_address_internal): Use it to check for a zero offset.
32096 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32097 Alan Hayward <alan.hayward@arm.com>
32098 David Sherwood <david.sherwood@arm.com>
32100 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
32101 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
32102 Return a poly_int64 rather than a HOST_WIDE_INT.
32103 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
32104 rather than a HOST_WIDE_INT.
32105 * config/aarch64/aarch64.h (aarch64_frame): Protect with
32106 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
32107 hard_fp_offset, frame_size, initial_adjust, callee_offset and
32108 final_offset from HOST_WIDE_INT to poly_int64.
32109 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
32110 to_constant when getting the number of units in an Advanced SIMD
32112 (aarch64_builtin_vectorized_function): Check for a constant number
32114 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
32116 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
32117 attribute instead of GET_MODE_NUNITS.
32118 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
32119 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
32120 GET_MODE_SIZE for fixed-size registers.
32121 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
32122 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
32123 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
32124 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
32125 (aarch64_print_operand, aarch64_print_address_internal)
32126 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
32127 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
32128 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
32129 Handle polynomial GET_MODE_SIZE.
32130 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
32131 wider than SImode without modification.
32132 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
32133 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
32134 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
32135 passing and returning SVE modes.
32136 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
32137 rather than GEN_INT.
32138 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
32139 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
32140 (aarch64_allocate_and_probe_stack_space): Likewise.
32141 (aarch64_layout_frame): Cope with polynomial offsets.
32142 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
32143 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
32144 polynomial offsets.
32145 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
32146 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
32147 poly_int64 rather than a HOST_WIDE_INT.
32148 (aarch64_get_separate_components, aarch64_process_components)
32149 (aarch64_expand_prologue, aarch64_expand_epilogue)
32150 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
32151 (aarch64_anchor_offset): New function, split out from...
32152 (aarch64_legitimize_address): ...here.
32153 (aarch64_builtin_vectorization_cost): Handle polynomial
32154 TYPE_VECTOR_SUBPARTS.
32155 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
32157 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
32158 number of elements from the PARALLEL rather than the mode.
32159 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
32160 rather than GET_MODE_BITSIZE.
32161 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
32162 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
32163 (aarch64_expand_vec_perm_const_1): Handle polynomial
32164 d->perm.length () and d->perm elements.
32165 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
32166 Apply to_constant to d->perm elements.
32167 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
32168 polynomial CONST_VECTOR_NUNITS.
32169 (aarch64_move_pointer): Take amount as a poly_int64 rather
32171 (aarch64_progress_pointer): Avoid temporary variable.
32172 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
32173 the mode attribute instead of GET_MODE.
32175 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32176 Alan Hayward <alan.hayward@arm.com>
32177 David Sherwood <david.sherwood@arm.com>
32179 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
32180 x exists before using it.
32181 (aarch64_add_constant_internal): Rename to...
32182 (aarch64_add_offset_1): ...this. Replace regnum with separate
32183 src and dest rtxes. Handle the case in which they're different,
32184 including when the offset is zero. Replace scratchreg with an rtx.
32185 Use 2 additions if there is no spare register into which we can
32186 move a 16-bit constant.
32187 (aarch64_add_constant): Delete.
32188 (aarch64_add_offset): Replace reg with separate src and dest
32189 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
32190 Use aarch64_add_offset_1.
32191 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
32192 an rtx rather than an int. Take the delta as a poly_int64
32193 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
32194 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
32195 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
32196 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
32197 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
32198 and aarch64_add_sp.
32199 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
32200 aarch64_add_constant.
32202 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32204 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
32205 Use scalar_float_mode.
32207 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32209 * config/aarch64/aarch64-simd.md
32210 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
32211 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
32212 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
32213 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
32214 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
32215 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
32216 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
32217 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
32218 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
32219 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
32221 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
32224 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
32225 targ_options->x_arm_arch_string is non NULL.
32227 2018-01-11 Tamar Christina <tamar.christina@arm.com>
32229 * config/aarch64/aarch64.h
32230 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
32232 2018-01-11 Sudakshina Das <sudi.das@arm.com>
32235 * expmed.c (emit_store_flag_force): Swap if const op0
32236 and change VOIDmode to mode of op0.
32238 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32240 PR rtl-optimization/83761
32241 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
32242 than bytes to mode_for_size.
32244 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
32246 PR middle-end/83189
32247 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
32248 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
32251 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
32253 PR middle-end/83575
32254 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
32255 when in layout mode.
32256 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
32257 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
32260 2018-01-10 Michael Collison <michael.collison@arm.com>
32262 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
32263 * config/aarch64/aarch64-option-extension.def: Add
32264 AARCH64_OPT_EXTENSION of 'fp16fml'.
32265 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32266 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
32267 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
32268 * config/aarch64/constraints.md (Ui7): New constraint.
32269 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
32270 (VFMLA_SEL_W): Ditto.
32273 (VFMLA16_LOW): New int iterator.
32274 (VFMLA16_HIGH): Ditto.
32275 (UNSPEC_FMLAL): New unspec.
32276 (UNSPEC_FMLSL): Ditto.
32277 (UNSPEC_FMLAL2): Ditto.
32278 (UNSPEC_FMLSL2): Ditto.
32279 (f16mac): New code attribute.
32280 * config/aarch64/aarch64-simd-builtins.def
32281 (aarch64_fmlal_lowv2sf): Ditto.
32282 (aarch64_fmlsl_lowv2sf): Ditto.
32283 (aarch64_fmlalq_lowv4sf): Ditto.
32284 (aarch64_fmlslq_lowv4sf): Ditto.
32285 (aarch64_fmlal_highv2sf): Ditto.
32286 (aarch64_fmlsl_highv2sf): Ditto.
32287 (aarch64_fmlalq_highv4sf): Ditto.
32288 (aarch64_fmlslq_highv4sf): Ditto.
32289 (aarch64_fmlal_lane_lowv2sf): Ditto.
32290 (aarch64_fmlsl_lane_lowv2sf): Ditto.
32291 (aarch64_fmlal_laneq_lowv2sf): Ditto.
32292 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
32293 (aarch64_fmlalq_lane_lowv4sf): Ditto.
32294 (aarch64_fmlsl_lane_lowv4sf): Ditto.
32295 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
32296 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
32297 (aarch64_fmlal_lane_highv2sf): Ditto.
32298 (aarch64_fmlsl_lane_highv2sf): Ditto.
32299 (aarch64_fmlal_laneq_highv2sf): Ditto.
32300 (aarch64_fmlsl_laneq_highv2sf): Ditto.
32301 (aarch64_fmlalq_lane_highv4sf): Ditto.
32302 (aarch64_fmlsl_lane_highv4sf): Ditto.
32303 (aarch64_fmlalq_laneq_highv4sf): Ditto.
32304 (aarch64_fmlsl_laneq_highv4sf): Ditto.
32305 * config/aarch64/aarch64-simd.md:
32306 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
32307 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32308 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
32309 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32310 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
32311 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
32312 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
32313 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
32314 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
32315 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
32316 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
32317 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
32318 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
32319 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
32320 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
32321 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
32322 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
32323 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
32324 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
32325 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
32326 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
32327 (vfmlsl_low_u32): Ditto.
32328 (vfmlalq_low_u32): Ditto.
32329 (vfmlslq_low_u32): Ditto.
32330 (vfmlal_high_u32): Ditto.
32331 (vfmlsl_high_u32): Ditto.
32332 (vfmlalq_high_u32): Ditto.
32333 (vfmlslq_high_u32): Ditto.
32334 (vfmlal_lane_low_u32): Ditto.
32335 (vfmlsl_lane_low_u32): Ditto.
32336 (vfmlal_laneq_low_u32): Ditto.
32337 (vfmlsl_laneq_low_u32): Ditto.
32338 (vfmlalq_lane_low_u32): Ditto.
32339 (vfmlslq_lane_low_u32): Ditto.
32340 (vfmlalq_laneq_low_u32): Ditto.
32341 (vfmlslq_laneq_low_u32): Ditto.
32342 (vfmlal_lane_high_u32): Ditto.
32343 (vfmlsl_lane_high_u32): Ditto.
32344 (vfmlal_laneq_high_u32): Ditto.
32345 (vfmlsl_laneq_high_u32): Ditto.
32346 (vfmlalq_lane_high_u32): Ditto.
32347 (vfmlslq_lane_high_u32): Ditto.
32348 (vfmlalq_laneq_high_u32): Ditto.
32349 (vfmlslq_laneq_high_u32): Ditto.
32350 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
32351 (AARCH64_FL_FOR_ARCH8_4): New.
32352 (AARCH64_ISA_F16FML): New ISA flag.
32353 (TARGET_F16FML): New feature flag for fp16fml.
32354 (doc/invoke.texi): Document new fp16fml option.
32356 2018-01-10 Michael Collison <michael.collison@arm.com>
32358 * config/aarch64/aarch64-builtins.c:
32359 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
32360 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32361 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
32362 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
32363 (AARCH64_ISA_SHA3): New ISA flag.
32364 (TARGET_SHA3): New feature flag for sha3.
32365 * config/aarch64/iterators.md (sha512_op): New int attribute.
32366 (CRYPTO_SHA512): New int iterator.
32367 (UNSPEC_SHA512H): New unspec.
32368 (UNSPEC_SHA512H2): Ditto.
32369 (UNSPEC_SHA512SU0): Ditto.
32370 (UNSPEC_SHA512SU1): Ditto.
32371 * config/aarch64/aarch64-simd-builtins.def
32372 (aarch64_crypto_sha512hqv2di): New builtin.
32373 (aarch64_crypto_sha512h2qv2di): Ditto.
32374 (aarch64_crypto_sha512su0qv2di): Ditto.
32375 (aarch64_crypto_sha512su1qv2di): Ditto.
32376 (aarch64_eor3qv8hi): Ditto.
32377 (aarch64_rax1qv2di): Ditto.
32378 (aarch64_xarqv2di): Ditto.
32379 (aarch64_bcaxqv8hi): Ditto.
32380 * config/aarch64/aarch64-simd.md:
32381 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
32382 (aarch64_crypto_sha512su0qv2di): Ditto.
32383 (aarch64_crypto_sha512su1qv2di): Ditto.
32384 (aarch64_eor3qv8hi): Ditto.
32385 (aarch64_rax1qv2di): Ditto.
32386 (aarch64_xarqv2di): Ditto.
32387 (aarch64_bcaxqv8hi): Ditto.
32388 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
32389 (vsha512h2q_u64): Ditto.
32390 (vsha512su0q_u64): Ditto.
32391 (vsha512su1q_u64): Ditto.
32392 (veor3q_u16): Ditto.
32393 (vrax1q_u64): Ditto.
32394 (vxarq_u64): Ditto.
32395 (vbcaxq_u16): Ditto.
32396 * config/arm/types.md (crypto_sha512): New type attribute.
32397 (crypto_sha3): Ditto.
32398 (doc/invoke.texi): Document new sha3 option.
32400 2018-01-10 Michael Collison <michael.collison@arm.com>
32402 * config/aarch64/aarch64-builtins.c:
32403 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
32404 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32405 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
32406 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
32407 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
32408 (AARCH64_ISA_SM4): New ISA flag.
32409 (TARGET_SM4): New feature flag for sm4.
32410 * config/aarch64/aarch64-simd-builtins.def
32411 (aarch64_sm3ss1qv4si): Ditto.
32412 (aarch64_sm3tt1aq4si): Ditto.
32413 (aarch64_sm3tt1bq4si): Ditto.
32414 (aarch64_sm3tt2aq4si): Ditto.
32415 (aarch64_sm3tt2bq4si): Ditto.
32416 (aarch64_sm3partw1qv4si): Ditto.
32417 (aarch64_sm3partw2qv4si): Ditto.
32418 (aarch64_sm4eqv4si): Ditto.
32419 (aarch64_sm4ekeyqv4si): Ditto.
32420 * config/aarch64/aarch64-simd.md:
32421 (aarch64_sm3ss1qv4si): Ditto.
32422 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
32423 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
32424 (aarch64_sm4eqv4si): Ditto.
32425 (aarch64_sm4ekeyqv4si): Ditto.
32426 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
32427 (sm3part_op): Ditto.
32428 (CRYPTO_SM3TT): Ditto.
32429 (CRYPTO_SM3PART): Ditto.
32430 (UNSPEC_SM3SS1): New unspec.
32431 (UNSPEC_SM3TT1A): Ditto.
32432 (UNSPEC_SM3TT1B): Ditto.
32433 (UNSPEC_SM3TT2A): Ditto.
32434 (UNSPEC_SM3TT2B): Ditto.
32435 (UNSPEC_SM3PARTW1): Ditto.
32436 (UNSPEC_SM3PARTW2): Ditto.
32437 (UNSPEC_SM4E): Ditto.
32438 (UNSPEC_SM4EKEY): Ditto.
32439 * config/aarch64/constraints.md (Ui2): New constraint.
32440 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
32441 * config/arm/types.md (crypto_sm3): New type attribute.
32442 (crypto_sm4): Ditto.
32443 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
32444 (vsm3tt1aq_u32): Ditto.
32445 (vsm3tt1bq_u32): Ditto.
32446 (vsm3tt2aq_u32): Ditto.
32447 (vsm3tt2bq_u32): Ditto.
32448 (vsm3partw1q_u32): Ditto.
32449 (vsm3partw2q_u32): Ditto.
32450 (vsm4eq_u32): Ditto.
32451 (vsm4ekeyq_u32): Ditto.
32452 (doc/invoke.texi): Document new sm4 option.
32454 2018-01-10 Michael Collison <michael.collison@arm.com>
32456 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
32457 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
32458 (AARCH64_FL_FOR_ARCH8_4): New.
32459 (AARCH64_FL_V8_4): New flag.
32460 (doc/invoke.texi): Document new armv8.4-a option.
32462 2018-01-10 Michael Collison <michael.collison@arm.com>
32464 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32465 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
32466 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
32467 * config/aarch64/aarch64-option-extension.def: Add
32468 AARCH64_OPT_EXTENSION of 'sha2'.
32469 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
32470 (crypto): Disable sha2 and aes if crypto disabled.
32471 (crypto): Enable aes and sha2 if enabled.
32472 (simd): Disable sha2 and aes if simd disabled.
32473 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
32475 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
32476 (TARGET_SHA2): New feature flag for sha2.
32477 (TARGET_AES): New feature flag for aes.
32478 * config/aarch64/aarch64-simd.md:
32479 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
32480 conditional on TARGET_AES.
32481 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
32482 (aarch64_crypto_sha1hsi): Make pattern conditional
32484 (aarch64_crypto_sha1hv4si): Ditto.
32485 (aarch64_be_crypto_sha1hv4si): Ditto.
32486 (aarch64_crypto_sha1su1v4si): Ditto.
32487 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
32488 (aarch64_crypto_sha1su0v4si): Ditto.
32489 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
32490 (aarch64_crypto_sha256su0v4si): Ditto.
32491 (aarch64_crypto_sha256su1v4si): Ditto.
32492 (doc/invoke.texi): Document new aes and sha2 options.
32494 2018-01-10 Martin Sebor <msebor@redhat.com>
32496 PR tree-optimization/83781
32497 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
32500 2018-01-11 Martin Sebor <msebor@gmail.com>
32501 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
32503 PR tree-optimization/83501
32504 PR tree-optimization/81703
32506 * tree-ssa-strlen.c (get_string_cst): Rename...
32507 (get_string_len): ...to this. Handle global constants.
32508 (handle_char_store): Adjust.
32510 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
32511 Jim Wilson <jimw@sifive.com>
32513 * config/riscv/riscv-protos.h (riscv_output_return): New.
32514 * config/riscv/riscv.c (struct machine_function): New naked_p field.
32515 (riscv_attribute_table, riscv_output_return),
32516 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
32517 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
32518 (riscv_compute_frame_info): Only compute frame->mask if not a naked
32520 (riscv_expand_prologue): Add early return for naked function.
32521 (riscv_expand_epilogue): Likewise.
32522 (riscv_function_ok_for_sibcall): Return false for naked function.
32523 (riscv_set_current_function): New.
32524 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
32525 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
32526 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
32527 * doc/extend.texi (RISC-V Function Attributes): New.
32529 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
32531 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
32532 check for 128-bit long double before checking TCmode.
32533 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
32534 128-bit long doubles before checking TFmode or TCmode.
32535 (FLOAT128_IBM_P): Likewise.
32537 2018-01-10 Martin Sebor <msebor@redhat.com>
32539 PR tree-optimization/83671
32540 * builtins.c (c_strlen): Unconditionally return zero for the empty
32542 Use -Warray-bounds for warnings.
32543 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
32544 for non-constant array indices with COMPONENT_REF, arrays of
32545 arrays, and pointers to arrays.
32546 (gimple_fold_builtin_strlen): Determine and set length range for
32547 non-constant character arrays.
32549 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
32551 PR middle-end/81897
32552 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
32555 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
32557 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
32559 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
32562 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
32563 VECTOR_MEM_ALTIVEC_OR_VSX_P.
32564 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
32565 indexed_or_indirect_operand predicate.
32566 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
32567 (*vsx_le_perm_load_v8hi): Likewise.
32568 (*vsx_le_perm_load_v16qi): Likewise.
32569 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
32570 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
32571 (*vsx_le_perm_store_v8hi): Likewise.
32572 (*vsx_le_perm_store_v16qi): Likewise.
32573 (eight unnamed splitters): Likewise.
32575 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
32577 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
32578 * config/rs6000/emmintrin.h: Likewise.
32579 * config/rs6000/mmintrin.h: Likewise.
32580 * config/rs6000/xmmintrin.h: Likewise.
32582 2018-01-10 David Malcolm <dmalcolm@redhat.com>
32585 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
32587 * tree.c (tree_nop_conversion): Return true for location wrapper
32589 (maybe_wrap_with_location): New function.
32590 (selftest::check_strip_nops): New function.
32591 (selftest::test_location_wrappers): New function.
32592 (selftest::tree_c_tests): Call it.
32593 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
32594 (maybe_wrap_with_location): New decl.
32595 (EXPR_LOCATION_WRAPPER_P): New macro.
32596 (location_wrapper_p): New inline function.
32597 (tree_strip_any_location_wrapper): New inline function.
32599 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
32602 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
32603 stack_realign_offset for the largest alignment of stack slot
32605 (ix86_find_max_used_stack_alignment): New function.
32606 (ix86_finalize_stack_frame_flags): Use it. Set
32607 max_used_stack_alignment if we don't realign stack.
32608 * config/i386/i386.h (machine_function): Add
32609 max_used_stack_alignment.
32611 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
32613 * config/arm/arm.opt (-mbranch-cost): New option.
32614 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
32617 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
32620 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
32621 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
32623 2018-01-10 Richard Biener <rguenther@suse.de>
32626 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
32627 early out so it also covers the case where we have a non-NULL
32630 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
32632 PR tree-optimization/83753
32633 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
32634 for non-strided grouped accesses if the number of elements is 1.
32636 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
32639 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
32640 * i386.h (TARGET_USE_GATHER): Define.
32641 * x86-tune.def (X86_TUNE_USE_GATHER): New.
32643 2018-01-10 Martin Liska <mliska@suse.cz>
32646 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
32647 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
32649 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
32650 CLEANUP_NO_PARTITIONING is not set.
32652 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
32654 * doc/rtl.texi: Remove documentation of (const ...) wrappers
32655 for vectors, as a partial revert of r254296.
32656 * rtl.h (const_vec_p): Delete.
32657 (const_vec_duplicate_p): Don't test for vector CONSTs.
32658 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
32659 * expmed.c (make_tree): Likewise.
32662 * common.md (E, F): Use CONSTANT_P instead of checking for
32664 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
32665 checking for CONST_VECTOR.
32667 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
32669 PR middle-end/83575
32670 * predict.c (force_edge_cold): Handle in more sane way edges
32671 with no prediction.
32673 2018-01-09 Carl Love <cel@us.ibm.com>
32675 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
32677 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
32678 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
32679 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
32680 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
32681 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
32682 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
32683 * config/rs6000/rs6000-protos.h: Add extern defition for
32684 rs6000_generate_float2_double_code.
32685 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
32687 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
32688 (float2_v2df): Add define_expand.
32690 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
32693 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
32694 op_mode in the force_to_mode call.
32696 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32698 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
32699 instead of checking each element individually.
32700 (aarch64_evpc_uzp): Likewise.
32701 (aarch64_evpc_zip): Likewise.
32702 (aarch64_evpc_ext): Likewise.
32703 (aarch64_evpc_rev): Likewise.
32704 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
32705 instead of checking each element individually. Return true without
32707 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
32708 whether all selected elements come from the same input, instead of
32709 checking each element individually. Remove calls to gen_rtx_REG,
32710 start_sequence and end_sequence and instead assert that no rtl is
32713 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32715 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
32716 order of HIGH and CONST checks.
32718 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32720 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
32721 if the destination isn't an SSA_NAME.
32723 2018-01-09 Richard Biener <rguenther@suse.de>
32725 PR tree-optimization/83668
32726 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
32728 (canonicalize_loop_form): ... here, renamed from ...
32729 (canonicalize_loop_closed_ssa_form): ... this and amended to
32730 swap successor edges for loop exit blocks to make us use
32731 the RPO order we need for initial schedule generation.
32733 2018-01-09 Joseph Myers <joseph@codesourcery.com>
32735 PR tree-optimization/64811
32736 * match.pd: When optimizing comparisons with Inf, avoid
32737 introducing or losing exceptions from comparisons with NaN.
32739 2018-01-09 Martin Liska <mliska@suse.cz>
32742 * asan.c (shadow_mem_size): Add gcc_assert.
32744 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
32746 Don't save registers in main().
32749 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
32750 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
32751 * config/avr/avr.c (avr_set_current_function): Don't error if
32752 naked, OS_task or OS_main are specified at the same time.
32753 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
32755 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
32757 * common/config/avr/avr-common.c (avr_option_optimization_table):
32758 Switch on -mmain-is-OS_task for optimizing compilations.
32760 2018-01-09 Richard Biener <rguenther@suse.de>
32762 PR tree-optimization/83572
32763 * graphite.c: Include cfganal.h.
32764 (graphite_transform_loops): Connect infinite loops to exit
32765 and remove fake edges at the end.
32767 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
32769 * ipa-inline.c (edge_badness): Revert accidental checkin.
32771 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
32774 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
32775 symbols; not inline clones.
32777 2018-01-09 Jakub Jelinek <jakub@redhat.com>
32780 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
32781 hard registers. Formatting fixes.
32783 PR preprocessor/83722
32784 * gcc.c (try_generate_repro): Pass
32785 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
32786 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
32789 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
32790 Kito Cheng <kito.cheng@gmail.com>
32792 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
32793 (riscv_leaf_function_p): Delete.
32794 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
32796 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32798 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
32800 (do_ifelse): New function.
32801 (do_isel): New function.
32802 (do_sub3): New function.
32803 (do_add3): New function.
32804 (do_load_mask_compare): New function.
32805 (do_overlap_load_compare): New function.
32806 (expand_compare_loop): New function.
32807 (expand_block_compare): Call expand_compare_loop() when appropriate.
32808 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
32809 option description.
32810 (-mblock-compare-inline-loop-limit): New option.
32812 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32815 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
32816 Reverse order of second and third operands in first alternative.
32817 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
32818 of first and second elements in UNSPEC_VPERMR vector.
32819 (altivec_expand_vec_perm_le): Likewise.
32821 2018-01-08 Jeff Law <law@redhat.com>
32823 PR rtl-optimizatin/81308
32824 * tree-switch-conversion.c (cfg_altered): New file scoped static.
32825 (process_switch): If group_case_labels makes a change, then set
32827 (pass_convert_switch::execute): If a switch is converted, then
32828 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
32830 PR rtl-optimization/81308
32831 * recog.c (split_all_insns): Conditionally cleanup the CFG after
32834 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
32836 PR target/83663 - Revert r255946
32837 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
32838 generation for cases where splatting a value is not useful.
32839 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
32840 across a vec_duplicate and a paradoxical subreg forming a vector
32841 mode to a vec_concat.
32843 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32845 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
32846 -march=armv8.3-a variants.
32847 * config/arm/t-multilib: Likewise.
32848 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
32850 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32852 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
32854 (cceq_ior_compare_complement): Give it a name so I can use it, and
32855 change boolean_or_operator predicate to boolean_operator so it can
32856 be used to generate a crand.
32857 (eqne): New code iterator.
32858 (bd/bd_neg): New code_attrs.
32859 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
32860 a single define_insn.
32861 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
32862 decrement (bdnzt/bdnzf/bdzt/bdzf).
32863 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
32864 with the new names of the branch decrement patterns, and added the
32865 names of the branch decrement conditional patterns.
32867 2018-01-08 Richard Biener <rguenther@suse.de>
32869 PR tree-optimization/83563
32870 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
32873 2018-01-08 Richard Biener <rguenther@suse.de>
32875 PR middle-end/83713
32876 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
32878 2018-01-08 Richard Biener <rguenther@suse.de>
32880 PR tree-optimization/83685
32881 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
32882 references to abnormals.
32884 2018-01-08 Richard Biener <rguenther@suse.de>
32887 * dwarf2out.c (output_indirect_strings): Handle empty
32888 skeleton_debug_str_hash.
32889 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
32891 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
32893 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
32894 (emit_store_direct): Likewise.
32895 (arc_trampoline_adjust_address): Likewise.
32896 (arc_asm_trampoline_template): New function.
32897 (arc_initialize_trampoline): Use asm_trampoline_template.
32898 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
32899 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
32900 * config/arc/arc.md (flush_icache): Delete pattern.
32902 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
32904 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
32905 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
32908 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
32911 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
32912 by not USED_FOR_TARGET.
32913 (make_pass_resolve_sw_modes): Likewise.
32915 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
32917 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
32920 2018-01-08 Richard Biener <rguenther@suse.de>
32922 PR middle-end/83580
32923 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
32925 2018-01-08 Richard Biener <rguenther@suse.de>
32927 PR middle-end/83517
32928 * match.pd ((t * 2) / 2) -> t): Add missing :c.
32930 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
32932 PR middle-end/81897
32933 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
32934 basic blocks with a small number of successors.
32935 (convert_control_dep_chain_into_preds): Improve handling of
32937 (dump_predicates): Split apart into...
32938 (dump_pred_chain): ...here...
32939 (dump_pred_info): ...and here.
32940 (can_one_predicate_be_invalidated_p): Add debugging printfs.
32941 (can_chain_union_be_invalidated_p): Improve check for invalidation
32943 (uninit_uses_cannot_happen): Avoid unnecessary if
32944 convert_control_dep_chain_into_preds yielded nothing.
32946 2018-01-06 Martin Sebor <msebor@redhat.com>
32948 PR tree-optimization/83640
32949 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
32950 subtracting negative offset from size.
32951 (builtin_access::overlap): Adjust offset bounds of the access to fall
32952 within the size of the object if possible.
32954 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
32956 PR rtl-optimization/83699
32957 * expmed.c (extract_bit_field_1): Restrict the vector usage of
32958 extract_bit_field_as_subreg to cases in which the extracted
32959 value is also a vector.
32961 * lra-constraints.c (process_alt_operands): Test for the equivalence
32962 substitutions when detecting a possible reload cycle.
32964 2018-01-06 Jakub Jelinek <jakub@redhat.com>
32967 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
32968 by default if flag_selective_schedling{,2}. Formatting fixes.
32970 PR rtl-optimization/83682
32971 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
32972 if it has non-VECTOR_MODE element mode.
32973 (vec_duplicate_p): Likewise.
32975 PR middle-end/83694
32976 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
32977 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
32979 2018-01-05 Jakub Jelinek <jakub@redhat.com>
32982 * config/i386/i386-builtin.def
32983 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
32984 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
32985 Require also OPTION_MASK_ISA_AVX512F in addition to
32986 OPTION_MASK_ISA_GFNI.
32987 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
32988 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
32989 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
32990 to OPTION_MASK_ISA_GFNI.
32991 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
32992 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
32993 OPTION_MASK_ISA_AVX512BW.
32994 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
32995 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
32996 addition to OPTION_MASK_ISA_GFNI.
32997 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
32998 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
32999 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
33000 to OPTION_MASK_ISA_GFNI.
33001 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
33002 a requirement for all ISAs rather than any of them with a few
33004 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
33006 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
33007 bitmasks to be enabled with 3 exceptions, instead of requiring any
33008 enabled ISA with lots of exceptions.
33009 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
33010 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
33011 Change avx512bw in isa attribute to avx512f.
33012 * config/i386/sgxintrin.h: Add license boilerplate.
33013 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
33014 to __AVX512F__ and __AVX512VL to __AVX512VL__.
33015 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
33016 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
33018 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
33019 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
33020 temporarily sse2 rather than sse if not enabled already.
33023 * config/i386/sse.md (VI248_VLBW): Rename to ...
33024 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
33025 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
33026 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
33027 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
33028 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
33029 mode iterator instead of VI248_VLBW.
33031 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
33033 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
33034 (record_modified): Skip clobbers; add debug output.
33035 (param_change_prob): Use sreal frequencies.
33037 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
33039 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
33040 punt for user-aligned variables.
33042 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
33044 * tree-chrec.c (chrec_contains_symbols): Return true for
33047 2018-01-05 Sudakshina Das <sudi.das@arm.com>
33050 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
33051 of (x|y) == x for BICS pattern.
33053 2018-01-05 Jakub Jelinek <jakub@redhat.com>
33055 PR tree-optimization/83605
33056 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
33057 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
33060 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
33062 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
33063 * config/epiphany/rtems.h: New file.
33065 2018-01-04 Jakub Jelinek <jakub@redhat.com>
33066 Uros Bizjak <ubizjak@gmail.com>
33069 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
33070 QIreg_operand instead of register_operand predicate.
33071 * config/i386/i386.c (ix86_rop_should_change_byte_p,
33072 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
33073 comments instead of -fmitigate[-_]rop.
33075 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
33078 * cgraphunit.c (symbol_table::compile): Switch to text_section
33079 before calling assembly_start debug hook.
33080 * run-rtl-passes.c (run_rtl_passes): Likewise.
33083 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33085 * tree-vrp.c (extract_range_from_binary_expr_1): Check
33086 range_int_cst_p rather than !symbolic_range_p before calling
33087 extract_range_from_multiplicative_op_1.
33089 2018-01-04 Jeff Law <law@redhat.com>
33091 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
33092 redundant test in assertion.
33094 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33096 * doc/rtl.texi: Document machine_mode wrapper classes.
33098 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33100 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
33101 using tree_to_uhwi.
33103 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33105 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
33106 the VEC_PERM_EXPR fold to fail.
33108 2018-01-04 Jakub Jelinek <jakub@redhat.com>
33111 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
33112 to switched_sections.
33114 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33117 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
33118 test for d.testing.
33120 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
33123 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
33124 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
33126 2018-01-04 Jakub Jelinek <jakub@redhat.com>
33129 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
33130 is BLKmode and bitpos not zero or mode change is needed.
33132 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33135 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
33138 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
33141 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
33142 instead of MULT rtx. Update all corresponding splitters.
33143 (*saddl_se): Ditto.
33144 (*ssub<modesuffix>): Ditto.
33145 (*ssubl_se): Ditto.
33146 (*cmp_sadd_di): Update split patterns.
33147 (*cmp_sadd_si): Ditto.
33148 (*cmp_sadd_sidi): Ditto.
33149 (*cmp_ssub_di): Ditto.
33150 (*cmp_ssub_si): Ditto.
33151 (*cmp_ssub_sidi): Ditto.
33152 * config/alpha/predicates.md (const23_operand): New predicate.
33153 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
33154 Look for ASHIFT, not MULT inner operand.
33155 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
33157 2018-01-04 Martin Liska <mliska@suse.cz>
33159 PR gcov-profile/83669
33160 * gcov.c (output_intermediate_file): Add version to intermediate
33162 * doc/gcov.texi: Document new field 'version' in intermediate
33163 file format. Fix location of '-k' option of gcov command.
33165 2018-01-04 Martin Liska <mliska@suse.cz>
33168 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
33170 2018-01-04 Jakub Jelinek <jakub@redhat.com>
33172 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
33174 2018-01-03 Martin Sebor <msebor@redhat.com>
33176 PR tree-optimization/83655
33177 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
33178 checking calls with invalid arguments.
33180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33182 * tree-vect-stmts.c (vect_get_store_rhs): New function.
33183 (vectorizable_mask_load_store): Delete.
33184 (vectorizable_call): Return false for masked loads and stores.
33185 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
33186 instead of gimple_assign_rhs1.
33187 (vectorizable_load): Handle IFN_MASK_LOAD.
33188 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
33190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33192 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
33194 (vectorizable_mask_load_store): ...here.
33195 (vectorizable_load): ...and here.
33197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33199 * tree-vect-stmts.c (vect_build_all_ones_mask)
33200 (vect_build_zero_merge_argument): New functions, split out from...
33201 (vectorizable_load): ...here.
33203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33205 * tree-vect-stmts.c (vect_check_store_rhs): New function,
33207 (vectorizable_mask_load_store): ...here.
33208 (vectorizable_store): ...and here.
33210 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33212 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
33214 (vectorizable_mask_load_store): ...here.
33216 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33218 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
33219 (vect_model_store_cost): Take a vec_load_store_type instead of a
33221 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
33222 (vect_model_store_cost): Take a vec_load_store_type instead of a
33224 (vectorizable_mask_load_store): Update accordingly.
33225 (vectorizable_store): Likewise.
33226 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
33228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33230 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
33231 IFN_MASK_LOAD calls here rather than...
33232 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
33234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33235 Alan Hayward <alan.hayward@arm.com>
33236 David Sherwood <david.sherwood@arm.com>
33238 * expmed.c (extract_bit_field_1): For vector extracts,
33239 fall back to extract_bit_field_as_subreg if vec_extract
33242 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33243 Alan Hayward <alan.hayward@arm.com>
33244 David Sherwood <david.sherwood@arm.com>
33246 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
33247 they are variable or constant sized.
33248 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
33249 slots for constant-sized data.
33251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33252 Alan Hayward <alan.hayward@arm.com>
33253 David Sherwood <david.sherwood@arm.com>
33255 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
33256 handling COND_EXPRs with boolean comparisons, try to find a better
33257 basis for the mask type than the boolean itself.
33259 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33261 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
33262 is calculated and how it can be overridden.
33263 * genmodes.c (max_bitsize_mode_any_mode): New variable.
33264 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
33266 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
33269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33270 Alan Hayward <alan.hayward@arm.com>
33271 David Sherwood <david.sherwood@arm.com>
33273 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
33274 Remove the mode argument.
33275 (aarch64_simd_valid_immediate): Remove the mode and inverse
33277 * config/aarch64/iterators.md (bitsize): New iterator.
33278 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
33279 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
33280 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
33281 aarch64_simd_valid_immediate.
33282 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
33283 (aarch64_reg_or_bic_imm): Likewise.
33284 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
33285 with an insn_type enum and msl with a modifier_type enum.
33286 Replace element_width with a scalar_mode. Change the shift
33287 to unsigned int. Add constructors for scalar_float_mode and
33288 scalar_int_mode elements.
33289 (aarch64_vect_float_const_representable_p): Delete.
33290 (aarch64_can_const_movi_rtx_p)
33291 (aarch64_simd_scalar_immediate_valid_for_move)
33292 (aarch64_simd_make_constant): Update call to
33293 aarch64_simd_valid_immediate.
33294 (aarch64_advsimd_valid_immediate_hs): New function.
33295 (aarch64_advsimd_valid_immediate): Likewise.
33296 (aarch64_simd_valid_immediate): Remove mode and inverse
33297 arguments. Rewrite to use the above. Use const_vec_duplicate_p
33298 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
33299 and aarch64_float_const_representable_p on the result.
33300 (aarch64_output_simd_mov_immediate): Remove mode argument.
33301 Update call to aarch64_simd_valid_immediate and use of
33302 simd_immediate_info.
33303 (aarch64_output_scalar_simd_mov_immediate): Update call
33306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33307 Alan Hayward <alan.hayward@arm.com>
33308 David Sherwood <david.sherwood@arm.com>
33310 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
33311 (mode_nunits): Likewise CONST_MODE_NUNITS.
33312 * machmode.def (ADJUST_NUNITS): Document.
33313 * genmodes.c (mode_data::need_nunits_adj): New field.
33314 (blank_mode): Update accordingly.
33315 (adj_nunits): New variable.
33316 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
33318 (emit_mode_size_inline): Set need_bytesize_adj for all modes
33319 listed in adj_nunits.
33320 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
33321 listed in adj_nunits. Don't emit case statements for such modes.
33322 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
33323 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
33324 nothing if adj_nunits is nonnull.
33325 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
33326 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
33327 (emit_mode_fbit): Update use of print_maybe_const_decl.
33328 (emit_move_size): Likewise. Treat the array as non-const
33330 (emit_mode_adjustments): Handle adj_nunits.
33332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33334 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
33335 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
33336 (VECTOR_MODES): Use it.
33337 (make_vector_modes): Take the prefix as an argument.
33339 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33340 Alan Hayward <alan.hayward@arm.com>
33341 David Sherwood <david.sherwood@arm.com>
33343 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
33344 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
33345 for MODE_VECTOR_BOOL.
33346 * machmode.def (VECTOR_BOOL_MODE): Document.
33347 * genmodes.c (VECTOR_BOOL_MODE): New macro.
33348 (make_vector_bool_mode): New function.
33349 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
33351 * lto-streamer-in.c (lto_input_mode_table): Likewise.
33352 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
33354 * stor-layout.c (int_mode_for_mode): Likewise.
33355 * tree.c (build_vector_type_for_mode): Likewise.
33356 * varasm.c (output_constant_pool_2): Likewise.
33357 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
33358 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
33359 for MODE_VECTOR_BOOL.
33360 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
33361 of mode class checks.
33362 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
33363 instead of a list of mode class checks.
33364 (expand_vector_scalar_condition): Likewise.
33365 (type_for_widest_vector_mode): Handle BImode as an inner mode.
33367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33368 Alan Hayward <alan.hayward@arm.com>
33369 David Sherwood <david.sherwood@arm.com>
33371 * machmode.h (mode_size): Change from unsigned short to
33373 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
33374 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33375 or if measurement_type is not polynomial.
33376 (fixed_size_mode::includes_p): Check for constant-sized modes.
33377 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
33378 return a poly_uint16 rather than an unsigned short.
33379 (emit_mode_size): Change the type of mode_size from unsigned short
33380 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
33381 (emit_mode_adjustments): Cope with polynomial vector sizes.
33382 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33384 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33386 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
33387 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
33388 * caller-save.c (setup_save_areas): Likewise.
33389 (replace_reg_with_saved_mem): Likewise.
33390 * calls.c (emit_library_call_value_1): Likewise.
33391 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
33392 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
33393 (gen_lowpart_for_combine): Likewise.
33394 * convert.c (convert_to_integer_1): Likewise.
33395 * cse.c (equiv_constant, cse_insn): Likewise.
33396 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
33397 (cselib_subst_to_values): Likewise.
33398 * dce.c (word_dce_process_block): Likewise.
33399 * df-problems.c (df_word_lr_mark_ref): Likewise.
33400 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
33401 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
33402 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
33403 (rtl_for_decl_location): Likewise.
33404 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
33405 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
33406 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
33407 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
33408 (expand_expr_real_1): Likewise.
33409 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
33410 (pad_below): Likewise.
33411 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33412 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
33413 * ira.c (get_subreg_tracking_sizes): Likewise.
33414 * ira-build.c (ira_create_allocno_objects): Likewise.
33415 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
33416 (ira_sort_regnos_for_alter_reg): Likewise.
33417 * ira-costs.c (record_operand_costs): Likewise.
33418 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
33419 (resolve_simple_move): Likewise.
33420 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
33421 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
33422 (lra_constraints): Likewise.
33423 (CONST_POOL_OK_P): Reject variable-sized modes.
33424 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
33425 (add_pseudo_to_slot, lra_spill): Likewise.
33426 * omp-low.c (omp_clause_aligned_alignment): Likewise.
33427 * optabs-query.c (get_best_extraction_insn): Likewise.
33428 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33429 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
33430 (expand_mult_highpart, valid_multiword_target_p): Likewise.
33431 * recog.c (offsettable_address_addr_space_p): Likewise.
33432 * regcprop.c (maybe_mode_change): Likewise.
33433 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
33434 * regrename.c (build_def_use): Likewise.
33435 * regstat.c (dump_reg_info): Likewise.
33436 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
33437 (find_reloads, find_reloads_subreg_address): Likewise.
33438 * reload1.c (eliminate_regs_1): Likewise.
33439 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
33440 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
33441 (simplify_binary_operation_1, simplify_subreg): Likewise.
33442 * targhooks.c (default_function_arg_padding): Likewise.
33443 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
33444 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
33445 (verify_gimple_assign_ternary): Likewise.
33446 * tree-inline.c (estimate_move_cost): Likewise.
33447 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33448 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
33449 (get_address_cost_ainc): Likewise.
33450 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
33451 (vect_supportable_dr_alignment): Likewise.
33452 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33453 (vectorizable_reduction): Likewise.
33454 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
33455 (vectorizable_operation, vectorizable_load): Likewise.
33456 * tree.c (build_same_sized_truth_vector_type): Likewise.
33457 * valtrack.c (cleanup_auto_inc_dec): Likewise.
33458 * var-tracking.c (emit_note_insn_var_location): Likewise.
33459 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
33460 (ADDR_VEC_ALIGN): Likewise.
33462 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33463 Alan Hayward <alan.hayward@arm.com>
33464 David Sherwood <david.sherwood@arm.com>
33466 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
33468 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33469 or if measurement_type is polynomial.
33470 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
33471 * combine.c (make_extraction): Likewise.
33472 * dse.c (find_shift_sequence): Likewise.
33473 * dwarf2out.c (mem_loc_descriptor): Likewise.
33474 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
33475 (extract_bit_field, extract_low_bits): Likewise.
33476 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
33477 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
33478 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
33479 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
33480 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33481 * reload.c (find_reloads): Likewise.
33482 * reload1.c (alter_reg): Likewise.
33483 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
33484 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
33485 * tree-if-conv.c (predicate_mem_writes): Likewise.
33486 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
33487 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
33488 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
33489 * valtrack.c (dead_debug_insert_temp): Likewise.
33490 * varasm.c (mergeable_constant_section): Likewise.
33491 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
33493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33494 Alan Hayward <alan.hayward@arm.com>
33495 David Sherwood <david.sherwood@arm.com>
33497 * expr.c (expand_assignment): Cope with polynomial mode sizes
33498 when assigning to a CONCAT.
33500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33501 Alan Hayward <alan.hayward@arm.com>
33502 David Sherwood <david.sherwood@arm.com>
33504 * machmode.h (mode_precision): Change from unsigned short to
33506 (mode_to_precision): Return a poly_uint16 rather than an unsigned
33508 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
33509 or if measurement_type is not polynomial.
33510 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
33511 in which the mode is already known to be a scalar_int_mode.
33512 * genmodes.c (emit_mode_precision): Change the type of mode_precision
33513 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
33515 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33516 for GET_MODE_PRECISION.
33517 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33518 for GET_MODE_PRECISION.
33519 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
33521 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
33522 (expand_field_assignment, make_extraction): Likewise.
33523 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
33524 (get_last_value): Likewise.
33525 * convert.c (convert_to_integer_1): Likewise.
33526 * cse.c (cse_insn): Likewise.
33527 * expr.c (expand_expr_real_1): Likewise.
33528 * lra-constraints.c (simplify_operand_subreg): Likewise.
33529 * optabs-query.c (can_atomic_load_p): Likewise.
33530 * optabs.c (expand_atomic_load): Likewise.
33531 (expand_atomic_store): Likewise.
33532 * ree.c (combine_reaching_defs): Likewise.
33533 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
33534 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
33535 * tree.h (type_has_mode_precision_p): Likewise.
33536 * ubsan.c (instrument_si_overflow): Likewise.
33538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33539 Alan Hayward <alan.hayward@arm.com>
33540 David Sherwood <david.sherwood@arm.com>
33542 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
33543 polynomial numbers of units.
33544 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
33545 (valid_vector_subparts_p): New function.
33546 (build_vector_type): Remove temporary shim and take the number
33547 of units as a poly_uint64 rather than an int.
33548 (build_opaque_vector_type): Take the number of units as a
33549 poly_uint64 rather than an int.
33550 * tree.c (build_vector_from_ctor): Handle polynomial
33551 TYPE_VECTOR_SUBPARTS.
33552 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
33553 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
33554 (build_vector_from_val): If the number of units is variable,
33555 use build_vec_duplicate_cst for constant operands and
33556 VEC_DUPLICATE_EXPR otherwise.
33557 (make_vector_type): Remove temporary is_constant ().
33558 (build_vector_type, build_opaque_vector_type): Take the number of
33559 units as a poly_uint64 rather than an int.
33560 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
33562 * cfgexpand.c (expand_debug_expr): Likewise.
33563 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
33564 (store_constructor, expand_expr_real_1): Likewise.
33565 (const_scalar_mask_from_tree): Likewise.
33566 * fold-const-call.c (fold_const_reduction): Likewise.
33567 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
33568 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
33569 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
33570 (fold_relational_const): Likewise.
33571 (native_interpret_vector): Likewise. Change the size from an
33572 int to an unsigned int.
33573 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
33574 TYPE_VECTOR_SUBPARTS.
33575 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
33576 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
33577 duplicating a non-constant operand into a variable-length vector.
33578 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
33579 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
33580 * ipa-icf.c (sem_variable::equals): Likewise.
33581 * match.pd: Likewise.
33582 * omp-simd-clone.c (simd_clone_subparts): Likewise.
33583 * print-tree.c (print_node): Likewise.
33584 * stor-layout.c (layout_type): Likewise.
33585 * targhooks.c (default_builtin_vectorization_cost): Likewise.
33586 * tree-cfg.c (verify_gimple_comparison): Likewise.
33587 (verify_gimple_assign_binary): Likewise.
33588 (verify_gimple_assign_ternary): Likewise.
33589 (verify_gimple_assign_single): Likewise.
33590 * tree-pretty-print.c (dump_generic_node): Likewise.
33591 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33592 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
33593 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
33594 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
33595 (vect_shift_permute_load_chain): Likewise.
33596 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
33597 (expand_vector_condition, optimize_vector_constructor): Likewise.
33598 (lower_vec_perm, get_compute_type): Likewise.
33599 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33600 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
33601 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
33602 (vect_recog_mask_conversion_pattern): Likewise.
33603 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
33604 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
33605 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33606 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
33607 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
33608 (vectorizable_shift, vectorizable_operation, vectorizable_store)
33609 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
33610 (supportable_widening_operation): Likewise.
33611 (supportable_narrowing_operation): Likewise.
33612 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
33614 * varasm.c (output_constant): Likewise.
33616 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33617 Alan Hayward <alan.hayward@arm.com>
33618 David Sherwood <david.sherwood@arm.com>
33620 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
33621 so that both the length == 3 and length != 3 cases set up their
33622 own permute vectors. Add comments explaining why we know the
33623 number of elements is constant.
33624 (vect_permute_load_chain): Likewise.
33626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33627 Alan Hayward <alan.hayward@arm.com>
33628 David Sherwood <david.sherwood@arm.com>
33630 * machmode.h (mode_nunits): Change from unsigned char to
33632 (ONLY_FIXED_SIZE_MODES): New macro.
33633 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
33634 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
33635 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
33637 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
33638 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
33639 or if measurement_type is not polynomial.
33640 * genmodes.c (ZERO_COEFFS): New macro.
33641 (emit_mode_nunits_inline): Make mode_nunits_inline return a
33643 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
33644 Use ZERO_COEFFS when emitting initializers.
33645 * data-streamer.h (bp_pack_poly_value): New function.
33646 (bp_unpack_poly_value): Likewise.
33647 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33648 for GET_MODE_NUNITS.
33649 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33650 for GET_MODE_NUNITS.
33651 * tree.c (make_vector_type): Remove temporary shim and make
33652 the real function take the number of units as a poly_uint64
33653 rather than an int.
33654 (build_vector_type_for_mode): Handle polynomial nunits.
33655 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
33656 * emit-rtl.c (const_vec_series_p_1): Likewise.
33657 (gen_rtx_CONST_VECTOR): Likewise.
33658 * fold-const.c (test_vec_duplicate_folding): Likewise.
33659 * genrecog.c (validate_pattern): Likewise.
33660 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
33661 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33662 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
33663 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
33664 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
33665 * rtlanal.c (subreg_get_info): Likewise.
33666 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33667 (vect_grouped_load_supported): Likewise.
33668 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
33669 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
33670 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
33671 (simplify_const_unary_operation, simplify_binary_operation_1)
33672 (simplify_const_binary_operation, simplify_ternary_operation)
33673 (test_vector_ops_duplicate, test_vector_ops): Likewise.
33674 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
33675 instead of CONST_VECTOR_NUNITS.
33676 * varasm.c (output_constant_pool_2): Likewise.
33677 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
33678 explicit-encoded elements in the XVEC for variable-length vectors.
33680 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33682 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
33684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33685 Alan Hayward <alan.hayward@arm.com>
33686 David Sherwood <david.sherwood@arm.com>
33688 * coretypes.h (fixed_size_mode): Declare.
33689 (fixed_size_mode_pod): New typedef.
33690 * builtins.h (target_builtins::x_apply_args_mode)
33691 (target_builtins::x_apply_result_mode): Change type to
33692 fixed_size_mode_pod.
33693 * builtins.c (apply_args_size, apply_result_size, result_vector)
33694 (expand_builtin_apply_args_1, expand_builtin_apply)
33695 (expand_builtin_return): Update accordingly.
33697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33699 * cse.c (hash_rtx_cb): Hash only the encoded elements.
33700 * cselib.c (cselib_hash_rtx): Likewise.
33701 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
33702 CONST_VECTOR encoding.
33704 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33705 Jeff Law <law@redhat.com>
33708 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
33709 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
33710 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
33711 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
33714 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
33715 explicitly probe *sp in a noreturn function if there were any callee
33716 register saves or frame pointer is needed.
33718 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33721 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
33722 BLKmode for ternary, binary or unary expressions.
33725 * var-tracking.c (delete_vta_debug_insn): New inline function.
33726 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
33727 insns from get_insns () to NULL instead of each bb separately.
33728 Use delete_vta_debug_insn. No longer static.
33729 (vt_debug_insns_local, variable_tracking_main_1): Adjust
33730 delete_vta_debug_insns callers.
33731 * rtl.h (delete_vta_debug_insns): Declare.
33732 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
33733 instead of variable_tracking_main.
33735 2018-01-03 Martin Sebor <msebor@redhat.com>
33737 PR tree-optimization/83603
33738 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
33739 arguments past the endof the argument list in functions declared
33740 without a prototype.
33741 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
33742 Avoid checking when arguments are null.
33744 2018-01-03 Martin Sebor <msebor@redhat.com>
33747 * doc/extend.texi (attribute const): Fix a typo.
33748 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
33749 issuing -Wsuggest-attribute for void functions.
33751 2018-01-03 Martin Sebor <msebor@redhat.com>
33753 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
33754 offset_int::from instead of wide_int::to_shwi.
33755 (maybe_diag_overlap): Remove assertion.
33756 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
33757 * gimple-ssa-sprintf.c (format_directive): Same.
33758 (parse_directive): Same.
33759 (sprintf_dom_walker::compute_format_length): Same.
33760 (try_substitute_return_value): Same.
33762 2018-01-03 Jeff Law <law@redhat.com>
33764 PR middle-end/83654
33765 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
33766 non-constant residual for zero at runtime and avoid probing in
33767 that case. Reorganize code for trailing problem to mirror handling
33770 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33772 PR tree-optimization/83501
33773 * tree-ssa-strlen.c (get_string_cst): New.
33774 (handle_char_store): Call get_string_cst.
33776 2018-01-03 Martin Liska <mliska@suse.cz>
33778 PR tree-optimization/83593
33779 * tree-ssa-strlen.c: Include tree-cfg.h.
33780 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
33781 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
33782 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
33784 (strlen_dom_walker::before_dom_children): Call
33785 gimple_purge_dead_eh_edges. Dump tranformation with details
33787 (strlen_dom_walker::before_dom_children): Update call by adding
33788 new argument cleanup_eh.
33789 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
33791 2018-01-03 Martin Liska <mliska@suse.cz>
33794 * cif-code.def (VARIADIC_THUNK): New enum value.
33795 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
33798 2018-01-03 Jan Beulich <jbeulich@suse.com>
33800 * sse.md (mov<mode>_internal): Tighten condition for when to use
33801 vmovdqu<ssescalarsize> for TI and OI modes.
33803 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33805 Update copyright years.
33807 2018-01-03 Martin Liska <mliska@suse.cz>
33810 * ipa-visibility.c (function_and_variable_visibility): Skip
33811 functions with noipa attribure.
33813 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33815 * gcc.c (process_command): Update copyright notice dates.
33816 * gcov-dump.c (print_version): Ditto.
33817 * gcov.c (print_version): Ditto.
33818 * gcov-tool.c (print_version): Ditto.
33819 * gengtype.c (create_file): Ditto.
33820 * doc/cpp.texi: Bump @copying's copyright year.
33821 * doc/cppinternals.texi: Ditto.
33822 * doc/gcc.texi: Ditto.
33823 * doc/gccint.texi: Ditto.
33824 * doc/gcov.texi: Ditto.
33825 * doc/install.texi: Ditto.
33826 * doc/invoke.texi: Ditto.
33828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33830 * vector-builder.h (vector_builder::m_full_nelts): Change from
33831 unsigned int to poly_uint64.
33832 (vector_builder::full_nelts): Update prototype accordingly.
33833 (vector_builder::new_vector): Likewise.
33834 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
33835 (vector_builder::operator ==): Likewise.
33836 (vector_builder::finalize): Likewise.
33837 * int-vector-builder.h (int_vector_builder::int_vector_builder):
33838 Take the number of elements as a poly_uint64 rather than an
33840 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
33841 from unsigned int to poly_uint64.
33842 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
33843 (vec_perm_indices::new_vector): Likewise.
33844 (vec_perm_indices::length): Likewise.
33845 (vec_perm_indices::nelts_per_input): Likewise.
33846 (vec_perm_indices::input_nelts): Likewise.
33847 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
33848 number of elements per input as a poly_uint64 rather than an
33849 unsigned int. Use the original encoding for variable-length
33850 vectors, rather than clamping each individual element.
33851 For the second and subsequent elements in each pattern,
33852 clamp the step and base before clamping their sum.
33853 (vec_perm_indices::series_p): Handle polynomial element counts.
33854 (vec_perm_indices::all_in_range_p): Likewise.
33855 (vec_perm_indices_to_tree): Likewise.
33856 (vec_perm_indices_to_rtx): Likewise.
33857 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
33858 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
33859 (tree_vector_builder::new_binary_operation): Handle polynomial
33860 element counts. Return false if we need to know the number
33861 of elements at compile time.
33862 * fold-const.c (fold_vec_perm): Punt if the number of elements
33863 isn't known at compile time.
33865 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33867 * vec-perm-indices.h (vec_perm_builder): Change element type
33868 from HOST_WIDE_INT to poly_int64.
33869 (vec_perm_indices::element_type): Update accordingly.
33870 (vec_perm_indices::clamp): Handle polynomial element_types.
33871 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33872 (vec_perm_indices::all_in_range_p): Likewise.
33873 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
33875 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
33876 polynomial vec_perm_indices element types.
33877 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
33878 * fold-const.c (fold_vec_perm): Likewise.
33879 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
33880 * tree-vect-generic.c (lower_vec_perm): Likewise.
33881 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33882 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
33883 element type to HOST_WIDE_INT.
33885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33886 Alan Hayward <alan.hayward@arm.com>
33887 David Sherwood <david.sherwood@arm.com>
33889 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
33890 rather than an int. Use plus_constant.
33891 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
33892 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
33894 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33895 Alan Hayward <alan.hayward@arm.com>
33896 David Sherwood <david.sherwood@arm.com>
33898 * calls.c (emit_call_1, expand_call): Change struct_value_size from
33899 a HOST_WIDE_INT to a poly_int64.
33901 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33902 Alan Hayward <alan.hayward@arm.com>
33903 David Sherwood <david.sherwood@arm.com>
33905 * calls.c (load_register_parameters): Cope with polynomial
33906 mode sizes. Require a constant size for BLKmode parameters
33907 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
33908 forces a parameter to be padded at the lsb end in order to
33909 fill a complete number of words, require the parameter size
33910 to be ordered wrt UNITS_PER_WORD.
33912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33913 Alan Hayward <alan.hayward@arm.com>
33914 David Sherwood <david.sherwood@arm.com>
33916 * reload1.c (spill_stack_slot_width): Change element type
33917 from unsigned int to poly_uint64_pod.
33918 (alter_reg): Treat mode sizes as polynomial.
33920 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33921 Alan Hayward <alan.hayward@arm.com>
33922 David Sherwood <david.sherwood@arm.com>
33924 * reload.c (complex_word_subreg_p): New function.
33925 (reload_inner_reg_of_subreg, push_reload): Use it.
33927 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33928 Alan Hayward <alan.hayward@arm.com>
33929 David Sherwood <david.sherwood@arm.com>
33931 * lra-constraints.c (process_alt_operands): Reject matched
33932 operands whose sizes aren't ordered.
33933 (match_reload): Refer to this check here.
33935 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33936 Alan Hayward <alan.hayward@arm.com>
33937 David Sherwood <david.sherwood@arm.com>
33939 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
33940 that the mode size is in the set {1, 2, 4, 8, 16}.
33942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33943 Alan Hayward <alan.hayward@arm.com>
33944 David Sherwood <david.sherwood@arm.com>
33946 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
33947 Use plus_constant instead of gen_rtx_PLUS.
33949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33950 Alan Hayward <alan.hayward@arm.com>
33951 David Sherwood <david.sherwood@arm.com>
33953 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
33954 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
33955 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
33956 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
33957 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
33958 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
33959 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
33960 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
33961 * config/i386/i386.c (ix86_push_rounding): ...this new function.
33962 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
33964 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
33965 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
33966 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
33967 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
33968 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
33969 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
33970 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
33971 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
33972 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
33973 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
33975 * expr.c (emit_move_resolve_push): Treat the input and result
33976 of PUSH_ROUNDING as a poly_int64.
33977 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
33978 (emit_push_insn): Likewise.
33979 * lra-eliminations.c (mark_not_eliminable): Likewise.
33980 * recog.c (push_operand): Likewise.
33981 * reload1.c (elimination_effects): Likewise.
33982 * rtlanal.c (nonzero_bits1): Likewise.
33983 * calls.c (store_one_arg): Likewise. Require the padding to be
33984 known at compile time.
33986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33987 Alan Hayward <alan.hayward@arm.com>
33988 David Sherwood <david.sherwood@arm.com>
33990 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
33991 Use plus_constant instead of gen_rtx_PLUS.
33993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33994 Alan Hayward <alan.hayward@arm.com>
33995 David Sherwood <david.sherwood@arm.com>
33997 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
33998 rather than an int.
34000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34001 Alan Hayward <alan.hayward@arm.com>
34002 David Sherwood <david.sherwood@arm.com>
34004 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
34005 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
34006 via stack temporaries. Treat the mode size as polynomial too.
34008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34009 Alan Hayward <alan.hayward@arm.com>
34010 David Sherwood <david.sherwood@arm.com>
34012 * expr.c (expand_expr_real_2): When handling conversions involving
34013 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
34014 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
34015 as a poly_uint64 too.
34017 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34018 Alan Hayward <alan.hayward@arm.com>
34019 David Sherwood <david.sherwood@arm.com>
34021 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
34023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34024 Alan Hayward <alan.hayward@arm.com>
34025 David Sherwood <david.sherwood@arm.com>
34027 * combine.c (can_change_dest_mode): Handle polynomial
34028 REGMODE_NATURAL_SIZE.
34029 * expmed.c (store_bit_field_1): Likewise.
34030 * expr.c (store_constructor): Likewise.
34031 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
34032 and polynomial REGMODE_NATURAL_SIZE.
34033 (gen_lowpart_common): Likewise.
34034 * reginfo.c (record_subregs_of_mode): Likewise.
34035 * rtlanal.c (read_modify_subreg_p): Likewise.
34037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34038 Alan Hayward <alan.hayward@arm.com>
34039 David Sherwood <david.sherwood@arm.com>
34041 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
34042 numbers of elements.
34044 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34045 Alan Hayward <alan.hayward@arm.com>
34046 David Sherwood <david.sherwood@arm.com>
34048 * match.pd: Cope with polynomial numbers of vector elements.
34050 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34051 Alan Hayward <alan.hayward@arm.com>
34052 David Sherwood <david.sherwood@arm.com>
34054 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
34055 in a POINTER_PLUS_EXPR.
34057 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34058 Alan Hayward <alan.hayward@arm.com>
34059 David Sherwood <david.sherwood@arm.com>
34061 * omp-simd-clone.c (simd_clone_subparts): New function.
34062 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
34063 (ipa_simd_modify_function_body): Likewise.
34065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34066 Alan Hayward <alan.hayward@arm.com>
34067 David Sherwood <david.sherwood@arm.com>
34069 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
34070 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
34071 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
34072 (expand_vector_condition, vector_element): Likewise.
34073 (subparts_gt): New function.
34074 (get_compute_type): Use subparts_gt.
34075 (count_type_subparts): Delete.
34076 (expand_vector_operations_1): Use subparts_gt instead of
34077 count_type_subparts.
34079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34080 Alan Hayward <alan.hayward@arm.com>
34081 David Sherwood <david.sherwood@arm.com>
34083 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
34084 (vect_compile_time_alias): ...this new function. Do the calculation
34085 on poly_ints rather than trees.
34086 (vect_prune_runtime_alias_test_list): Update call accordingly.
34088 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34089 Alan Hayward <alan.hayward@arm.com>
34090 David Sherwood <david.sherwood@arm.com>
34092 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
34094 (vect_schedule_slp_instance): Likewise.
34096 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34097 Alan Hayward <alan.hayward@arm.com>
34098 David Sherwood <david.sherwood@arm.com>
34100 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
34101 constant and extern definitions for variable-length vectors.
34102 (vect_get_constant_vectors): Note that the number of units
34103 is known to be constant.
34105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34106 Alan Hayward <alan.hayward@arm.com>
34107 David Sherwood <david.sherwood@arm.com>
34109 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
34110 of units as polynomial. Choose between WIDE and NARROW based
34113 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34114 Alan Hayward <alan.hayward@arm.com>
34115 David Sherwood <david.sherwood@arm.com>
34117 * tree-vect-stmts.c (simd_clone_subparts): New function.
34118 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
34120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34121 Alan Hayward <alan.hayward@arm.com>
34122 David Sherwood <david.sherwood@arm.com>
34124 * tree-vect-stmts.c (vectorizable_call): Treat the number of
34125 vectors as polynomial. Use build_index_vector for
34126 IFN_GOMP_SIMD_LANE.
34128 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34129 Alan Hayward <alan.hayward@arm.com>
34130 David Sherwood <david.sherwood@arm.com>
34132 * tree-vect-stmts.c (get_load_store_type): Treat the number of
34133 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
34134 for variable-length vectors.
34135 (vectorizable_mask_load_store): Treat the number of units as
34136 polynomial, asserting that it is constant if the condition has
34137 already been enforced.
34138 (vectorizable_store, vectorizable_load): Likewise.
34140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34141 Alan Hayward <alan.hayward@arm.com>
34142 David Sherwood <david.sherwood@arm.com>
34144 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
34145 of units as polynomial. Punt if we can't tell at compile time
34146 which vector contains the final result.
34148 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34149 Alan Hayward <alan.hayward@arm.com>
34150 David Sherwood <david.sherwood@arm.com>
34152 * tree-vect-loop.c (vectorizable_induction): Treat the number
34153 of units as polynomial. Punt on SLP inductions. Use an integer
34154 VEC_SERIES_EXPR for variable-length integer reductions. Use a
34155 cast of such a series for variable-length floating-point
34158 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34159 Alan Hayward <alan.hayward@arm.com>
34160 David Sherwood <david.sherwood@arm.com>
34162 * tree.h (build_index_vector): Declare.
34163 * tree.c (build_index_vector): New function.
34164 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
34165 of units as polynomial, forcibly converting it to a constant if
34166 vectorizable_reduction has already enforced the condition.
34167 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
34168 to create a {1,2,3,...} vector.
34169 (vectorizable_reduction): Treat the number of units as polynomial.
34170 Choose vectype_in based on the largest scalar element size rather
34171 than the smallest number of units. Enforce the restrictions
34174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34175 Alan Hayward <alan.hayward@arm.com>
34176 David Sherwood <david.sherwood@arm.com>
34178 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
34179 number of units as polynomial.
34181 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34182 Alan Hayward <alan.hayward@arm.com>
34183 David Sherwood <david.sherwood@arm.com>
34185 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
34186 * target.def (autovectorize_vector_sizes): Return the vector sizes
34187 by pointer, using vector_sizes rather than a bitmask.
34188 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
34189 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
34190 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
34192 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
34193 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
34194 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
34195 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
34196 * omp-general.c (omp_max_vf): Likewise.
34197 * omp-low.c (omp_clause_aligned_alignment): Likewise.
34198 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
34199 * tree-vect-loop.c (vect_analyze_loop): Likewise.
34200 * tree-vect-slp.c (vect_slp_bb): Likewise.
34201 * doc/tm.texi: Regenerate.
34202 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
34204 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
34205 the vector size as a poly_uint64 rather than an unsigned int.
34206 (current_vector_size): Change from an unsigned int to a poly_uint64.
34207 (get_vectype_for_scalar_type): Update accordingly.
34208 * tree.h (build_truth_vector_type): Take the size and number of
34209 units as a poly_uint64 rather than an unsigned int.
34210 (build_vector_type): Add a temporary overload that takes
34211 the number of units as a poly_uint64 rather than an unsigned int.
34212 * tree.c (make_vector_type): Likewise.
34213 (build_truth_vector_type): Take the number of units as a poly_uint64
34214 rather than an unsigned int.
34216 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34217 Alan Hayward <alan.hayward@arm.com>
34218 David Sherwood <david.sherwood@arm.com>
34220 * target.def (get_mask_mode): Take the number of units and length
34221 as poly_uint64s rather than unsigned ints.
34222 * targhooks.h (default_get_mask_mode): Update accordingly.
34223 * targhooks.c (default_get_mask_mode): Likewise.
34224 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
34225 * doc/tm.texi: Regenerate.
34227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34228 Alan Hayward <alan.hayward@arm.com>
34229 David Sherwood <david.sherwood@arm.com>
34231 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
34232 * omp-general.c (omp_max_vf): Likewise.
34233 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
34234 (expand_omp_simd): Handle polynomial safelen.
34235 * omp-low.c (omplow_simd_context): Add a default constructor.
34236 (omplow_simd_context::max_vf): Change from int to poly_uint64.
34237 (lower_rec_simd_input_clauses): Update accordingly.
34238 (lower_rec_input_clauses): Likewise.
34240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34241 Alan Hayward <alan.hayward@arm.com>
34242 David Sherwood <david.sherwood@arm.com>
34244 * tree-vectorizer.h (vect_nunits_for_cost): New function.
34245 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
34246 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
34247 (vect_analyze_slp_cost): Likewise.
34248 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
34249 (vect_model_load_cost): Likewise.
34251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34252 Alan Hayward <alan.hayward@arm.com>
34253 David Sherwood <david.sherwood@arm.com>
34255 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
34256 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
34257 from an unsigned int * to a poly_uint64_pod *.
34258 (calculate_unrolling_factor): New function.
34259 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
34261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34262 Alan Hayward <alan.hayward@arm.com>
34263 David Sherwood <david.sherwood@arm.com>
34265 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
34266 from an unsigned int to a poly_uint64.
34267 (_loop_vec_info::slp_unrolling_factor): Likewise.
34268 (_loop_vec_info::vectorization_factor): Change from an int
34270 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
34271 (vect_get_num_vectors): New function.
34272 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
34273 (vect_get_num_copies): Use vect_get_num_vectors.
34274 (vect_analyze_data_ref_dependences): Change max_vf from an int *
34275 to an unsigned int *.
34276 (vect_analyze_data_refs): Change min_vf from an int * to a
34278 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34279 than an unsigned HOST_WIDE_INT.
34280 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
34281 (vect_analyze_data_ref_dependence): Change max_vf from an int *
34282 to an unsigned int *.
34283 (vect_analyze_data_ref_dependences): Likewise.
34284 (vect_compute_data_ref_alignment): Handle polynomial vf.
34285 (vect_enhance_data_refs_alignment): Likewise.
34286 (vect_prune_runtime_alias_test_list): Likewise.
34287 (vect_shift_permute_load_chain): Likewise.
34288 (vect_supportable_dr_alignment): Likewise.
34289 (dependence_distance_ge_vf): Take the vectorization factor as a
34290 poly_uint64 rather than an unsigned HOST_WIDE_INT.
34291 (vect_analyze_data_refs): Change min_vf from an int * to a
34293 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
34294 vfm1 as a poly_uint64 rather than an int. Make the same change
34295 for the returned bound_scalar.
34296 (vect_gen_vector_loop_niters): Handle polynomial vf.
34297 (vect_do_peeling): Likewise. Update call to
34298 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
34299 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
34301 * tree-vect-loop.c (vect_determine_vectorization_factor)
34302 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
34303 (vect_get_known_peeling_cost): Likewise.
34304 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
34305 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
34306 (vect_transform_loop): Likewise. Use the lowest possible VF when
34307 updating the upper bounds of the loop.
34308 (vect_min_worthwhile_factor): Make static. Return an unsigned int
34309 rather than an int.
34310 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
34311 polynomial unroll factors.
34312 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
34313 (vect_make_slp_decision): Likewise.
34314 (vect_supported_load_permutation_p): Likewise, and polynomial
34316 (vect_analyze_slp_cost): Handle polynomial vf.
34317 (vect_slp_analyze_node_operations): Likewise.
34318 (vect_slp_analyze_bb_1): Likewise.
34319 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34320 than an unsigned HOST_WIDE_INT.
34321 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
34322 (vectorizable_load): Handle polynomial vf.
34323 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
34325 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
34327 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34328 Alan Hayward <alan.hayward@arm.com>
34329 David Sherwood <david.sherwood@arm.com>
34331 * match.pd: Handle bit operations involving three constants
34332 and try to fold one pair.
34334 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34336 * tree-vect-loop-manip.c: Include gimple-fold.h.
34337 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
34338 niters_maybe_zero parameters. Handle other cases besides a step of 1.
34339 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
34340 Add a path that uses a step of VF instead of 1, but disable it
34342 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
34343 and niters_no_overflow parameters. Update calls to
34344 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
34345 Create a new SSA name if the latter choses to use a ste other
34346 than zero, and return it via niters_vector_mult_vf_var.
34347 * tree-vect-loop.c (vect_transform_loop): Update calls to
34348 vect_do_peeling, vect_gen_vector_loop_niters and
34349 slpeel_make_loop_iterate_ntimes.
34350 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
34351 (vect_gen_vector_loop_niters): Update declarations after above changes.
34353 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
34355 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
34356 128-bit round to integer instructions.
34357 (ceil<mode>2): Likewise.
34358 (btrunc<mode>2): Likewise.
34359 (round<mode>2): Likewise.
34361 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34363 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
34364 unaligned VSX load/store on P8/P9.
34365 (expand_block_clear): Allow the use of unaligned VSX
34366 load/store on P8/P9.
34368 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
34370 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
34372 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
34373 swap associated with both a load and a store.
34375 2018-01-02 Andrew Waterman <andrew@sifive.com>
34377 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
34378 * config/riscv/riscv.md (clear_cache): Use it.
34380 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
34382 * web.c: Remove out-of-date comment.
34384 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34386 * expr.c (fixup_args_size_notes): Check that any existing
34387 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
34388 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
34389 (emit_single_push_insn): ...here.
34391 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34393 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
34394 (const_vector_encoded_nelts): New function.
34395 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
34396 (const_vector_int_elt, const_vector_elt): Declare.
34397 * emit-rtl.c (const_vector_int_elt_1): New function.
34398 (const_vector_elt): Likewise.
34399 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
34400 of CONST_VECTOR_ELT.
34402 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34404 * expr.c: Include rtx-vector-builder.h.
34405 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
34406 directly on the tree encoding.
34407 (const_vector_from_tree): Likewise.
34408 * optabs.c: Include rtx-vector-builder.h.
34409 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
34410 sequence of "u" values.
34411 * vec-perm-indices.c: Include rtx-vector-builder.h.
34412 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
34413 directly on the vec_perm_indices encoding.
34415 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34417 * doc/rtl.texi (const_vector): Describe new encoding scheme.
34418 * Makefile.in (OBJS): Add rtx-vector-builder.o.
34419 * rtx-vector-builder.h: New file.
34420 * rtx-vector-builder.c: Likewise.
34421 * rtl.h (rtx_def::u2): Add a const_vector field.
34422 (CONST_VECTOR_NPATTERNS): New macro.
34423 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
34424 (CONST_VECTOR_DUPLICATE_P): Likewise.
34425 (CONST_VECTOR_STEPPED_P): Likewise.
34426 (CONST_VECTOR_ENCODED_ELT): Likewise.
34427 (const_vec_duplicate_p): Check for a duplicated vector encoding.
34428 (unwrap_const_vec_duplicate): Likewise.
34429 (const_vec_series_p): Check for a non-duplicated vector encoding.
34430 Say that the function only returns true for integer vectors.
34431 * emit-rtl.c: Include rtx-vector-builder.h.
34432 (gen_const_vec_duplicate_1): Delete.
34433 (gen_const_vector): Call gen_const_vec_duplicate instead of
34434 gen_const_vec_duplicate_1.
34435 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
34436 (gen_const_vec_duplicate): Use rtx_vector_builder.
34437 (gen_const_vec_series): Likewise.
34438 (gen_rtx_CONST_VECTOR): Likewise.
34439 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
34440 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34441 Build a new vector rather than modifying a CONST_VECTOR in-place.
34442 (handle_special_swappables): Update call accordingly.
34443 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
34444 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34445 Build a new vector rather than modifying a CONST_VECTOR in-place.
34446 (handle_special_swappables): Update call accordingly.
34448 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34450 * simplify-rtx.c (simplify_const_binary_operation): Use
34451 CONST_VECTOR_ELT instead of XVECEXP.
34453 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34455 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
34456 the selector elements to be different from the data elements
34457 if the selector is a VECTOR_CST.
34458 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
34459 ssizetype for the selector.
34461 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34463 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
34464 before testing each element individually.
34465 * tree-vect-generic.c (lower_vec_perm): Likewise.
34467 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34469 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
34470 * selftest-run-tests.c (selftest::run_tests): Call it.
34471 * vector-builder.h (vector_builder::operator ==): New function.
34472 (vector_builder::operator !=): Likewise.
34473 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
34474 (vec_perm_indices::all_from_input_p): New function.
34475 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
34476 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
34477 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
34478 instead of reading the VECTOR_CST directly. Detect whether both
34479 vector inputs are the same before constructing the vec_perm_indices,
34480 and update the number of inputs argument accordingly. Use the
34481 utility functions added above. Only construct sel2 if we need to.
34483 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34485 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
34486 the broadcast of the low byte.
34487 (expand_mult_highpart): Use an explicit encoding for the permutes.
34488 * optabs-query.c (can_mult_highpart_p): Likewise.
34489 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
34490 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34491 (vectorizable_bswap): Likewise.
34492 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
34493 explicit encoding for the power-of-2 permutes.
34494 (vect_permute_store_chain): Likewise.
34495 (vect_grouped_load_supported): Likewise.
34496 (vect_permute_load_chain): Likewise.
34498 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34500 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
34501 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
34502 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
34503 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
34504 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
34505 (vect_gen_perm_mask_any): Likewise.
34507 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34509 * int-vector-builder.h: New file.
34510 * vec-perm-indices.h: Include int-vector-builder.h.
34511 (vec_perm_indices): Redefine as an int_vector_builder.
34512 (auto_vec_perm_indices): Delete.
34513 (vec_perm_builder): Redefine as a stand-alone class.
34514 (vec_perm_indices::vec_perm_indices): New function.
34515 (vec_perm_indices::clamp): Likewise.
34516 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
34517 (vec_perm_indices::new_vector): New function.
34518 (vec_perm_indices::new_expanded_vector): Update for new
34519 vec_perm_indices class.
34520 (vec_perm_indices::rotate_inputs): New function.
34521 (vec_perm_indices::all_in_range_p): Operate directly on the
34522 encoded form, without computing elided elements.
34523 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
34524 encoding. Update for new vec_perm_indices class.
34525 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
34526 the given vec_perm_builder.
34527 (expand_vec_perm_var): Update vec_perm_builder constructor.
34528 (expand_mult_highpart): Use vec_perm_builder instead of
34529 auto_vec_perm_indices.
34530 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
34531 vec_perm_indices instead of auto_vec_perm_indices. Use a single
34532 or double series encoding as appropriate.
34533 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
34534 vec_perm_indices instead of auto_vec_perm_indices.
34535 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34536 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34537 (vect_permute_store_chain): Likewise.
34538 (vect_grouped_load_supported): Likewise.
34539 (vect_permute_load_chain): Likewise.
34540 (vect_shift_permute_load_chain): Likewise.
34541 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34542 (vect_transform_slp_perm_load): Likewise.
34543 (vect_schedule_slp_instance): Likewise.
34544 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34545 (vectorizable_mask_load_store): Likewise.
34546 (vectorizable_bswap): Likewise.
34547 (vectorizable_store): Likewise.
34548 (vectorizable_load): Likewise.
34549 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
34550 vec_perm_indices instead of auto_vec_perm_indices. Use
34551 tree_to_vec_perm_builder to read the vector from a tree.
34552 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
34553 vec_perm_builder instead of a vec_perm_indices.
34554 (have_whole_vector_shift): Use vec_perm_builder and
34555 vec_perm_indices instead of auto_vec_perm_indices. Leave the
34556 truncation to calc_vec_perm_mask_for_shift.
34557 (vect_create_epilog_for_reduction): Likewise.
34558 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
34559 from auto_vec_perm_indices to vec_perm_indices.
34560 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34561 instead of changing individual elements.
34562 (aarch64_vectorize_vec_perm_const): Use new_vector to install
34563 the vector in d.perm.
34564 * config/arm/arm.c (expand_vec_perm_d::perm): Change
34565 from auto_vec_perm_indices to vec_perm_indices.
34566 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34567 instead of changing individual elements.
34568 (arm_vectorize_vec_perm_const): Use new_vector to install
34569 the vector in d.perm.
34570 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
34571 Update vec_perm_builder constructor.
34572 (rs6000_expand_interleave): Likewise.
34573 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
34574 (rs6000_expand_interleave): Likewise.
34576 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34578 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
34579 to qimode could truncate the indices.
34580 * optabs.c (expand_vec_perm_var): Likewise.
34582 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34584 * Makefile.in (OBJS): Add vec-perm-indices.o.
34585 * vec-perm-indices.h: New file.
34586 * vec-perm-indices.c: Likewise.
34587 * target.h (vec_perm_indices): Replace with a forward class
34589 (auto_vec_perm_indices): Move to vec-perm-indices.h.
34590 * optabs.h: Include vec-perm-indices.h.
34591 (expand_vec_perm): Delete.
34592 (selector_fits_mode_p, expand_vec_perm_var): Declare.
34593 (expand_vec_perm_const): Declare.
34594 * target.def (vec_perm_const_ok): Replace with...
34595 (vec_perm_const): ...this new hook.
34596 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
34597 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
34598 * doc/tm.texi: Regenerate.
34599 * optabs.def (vec_perm_const): Delete.
34600 * doc/md.texi (vec_perm_const): Likewise.
34601 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
34602 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
34603 expand_vec_perm for constant permutation vectors. Assert that
34604 the mode of variable permutation vectors is the integer equivalent
34605 of the mode that is being permuted.
34606 * optabs-query.h (selector_fits_mode_p): Declare.
34607 * optabs-query.c: Include vec-perm-indices.h.
34608 (selector_fits_mode_p): New function.
34609 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
34610 is defined, instead of checking whether the vec_perm_const_optab
34611 exists. Use targetm.vectorize.vec_perm_const instead of
34612 targetm.vectorize.vec_perm_const_ok. Check whether the indices
34613 fit in the vector mode before using a variable permute.
34614 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
34615 vec_perm_indices instead of an rtx.
34616 (expand_vec_perm): Replace with...
34617 (expand_vec_perm_const): ...this new function. Take the selector
34618 as a vec_perm_indices rather than an rtx. Also take the mode of
34619 the selector. Update call to shift_amt_for_vec_perm_mask.
34620 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
34621 Use vec_perm_indices::new_expanded_vector to expand the original
34622 selector into bytes. Check whether the indices fit in the vector
34623 mode before using a variable permute.
34624 (expand_vec_perm_var): Make global.
34625 (expand_mult_highpart): Use expand_vec_perm_const.
34626 * fold-const.c: Includes vec-perm-indices.h.
34627 * tree-ssa-forwprop.c: Likewise.
34628 * tree-vect-data-refs.c: Likewise.
34629 * tree-vect-generic.c: Likewise.
34630 * tree-vect-loop.c: Likewise.
34631 * tree-vect-slp.c: Likewise.
34632 * tree-vect-stmts.c: Likewise.
34633 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
34635 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
34636 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
34637 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
34638 (aarch64_vectorize_vec_perm_const): ...this new function.
34639 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34640 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34641 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
34642 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
34643 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34644 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34645 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
34647 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
34648 check for NEON modes.
34649 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
34650 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
34651 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
34652 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
34654 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
34655 the old VEC_PERM_CONST conditions.
34656 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
34657 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
34658 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
34659 (ia64_vectorize_vec_perm_const_ok): Merge into...
34660 (ia64_vectorize_vec_perm_const): ...this new function.
34661 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
34662 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
34663 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
34664 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
34665 * config/mips/mips.c (mips_expand_vec_perm_const)
34666 (mips_vectorize_vec_perm_const_ok): Merge into...
34667 (mips_vectorize_vec_perm_const): ...this new function.
34668 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
34669 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
34670 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
34671 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
34672 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
34673 (rs6000_expand_vec_perm_const): Delete.
34674 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
34676 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34677 (altivec_expand_vec_perm_const_le): Take each operand individually.
34678 Operate on constant selectors rather than rtxes.
34679 (altivec_expand_vec_perm_const): Likewise. Update call to
34680 altivec_expand_vec_perm_const_le.
34681 (rs6000_expand_vec_perm_const): Delete.
34682 (rs6000_vectorize_vec_perm_const_ok): Delete.
34683 (rs6000_vectorize_vec_perm_const): New function.
34684 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34685 an element count and rtx array.
34686 (rs6000_expand_extract_even): Update call accordingly.
34687 (rs6000_expand_interleave): Likewise.
34688 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
34689 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
34690 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
34691 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
34692 (rs6000_expand_vec_perm_const): Delete.
34693 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34694 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34695 (altivec_expand_vec_perm_const_le): Take each operand individually.
34696 Operate on constant selectors rather than rtxes.
34697 (altivec_expand_vec_perm_const): Likewise. Update call to
34698 altivec_expand_vec_perm_const_le.
34699 (rs6000_expand_vec_perm_const): Delete.
34700 (rs6000_vectorize_vec_perm_const_ok): Delete.
34701 (rs6000_vectorize_vec_perm_const): New function. Remove stray
34702 reference to the SPE evmerge intructions.
34703 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34704 an element count and rtx array.
34705 (rs6000_expand_extract_even): Update call accordingly.
34706 (rs6000_expand_interleave): Likewise.
34707 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
34708 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
34710 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34712 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34714 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
34715 vector mode and that that mode matches the mode of the data
34717 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
34718 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
34719 directly using expand_vec_perm_1 when forcing selectors into
34721 (expand_vec_perm_var): New function, split out from expand_vec_perm.
34723 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34725 * optabs-query.h (can_vec_perm_p): Delete.
34726 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
34727 * optabs-query.c (can_vec_perm_p): Split into...
34728 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
34729 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
34730 particular selector is valid.
34731 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34732 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34733 (vect_grouped_load_supported): Likewise.
34734 (vect_shift_permute_load_chain): Likewise.
34735 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34736 (vect_transform_slp_perm_load): Likewise.
34737 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34738 (vectorizable_bswap): Likewise.
34739 (vect_gen_perm_mask_checked): Likewise.
34740 * fold-const.c (fold_ternary_loc): Likewise. Don't take
34741 implementations of variable permutation vectors into account
34742 when deciding which selector to use.
34743 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
34744 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
34745 with a false third argument.
34746 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
34747 to test whether the constant selector is valid and can_vec_perm_var_p
34748 to test whether a variable selector is valid.
34750 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34752 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
34753 * optabs-query.c (can_vec_perm_p): Likewise.
34754 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
34755 instead of vec_perm_indices.
34756 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
34757 (vect_gen_perm_mask_checked): Likewise,
34758 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
34759 (vect_gen_perm_mask_checked): Likewise,
34761 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34763 * optabs-query.h (qimode_for_vec_perm): Declare.
34764 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
34765 (qimode_for_vec_perm): ...this new function.
34766 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
34768 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34770 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
34771 does not have a conditional at the top.
34773 2018-01-02 Richard Biener <rguenther@suse.de>
34775 * ipa-inline.c (big_speedup_p): Fix expression.
34777 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
34780 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
34783 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
34787 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
34788 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
34789 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
34790 cond_taken_branch_cost 3->4.
34792 2018-01-01 Jakub Jelinek <jakub@redhat.com>
34794 PR tree-optimization/83581
34795 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
34796 TODO_cleanup_cfg if any changes have been made.
34798 PR middle-end/83608
34799 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
34800 convert_modes if target mode has the right side, but different mode
34803 PR middle-end/83609
34804 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
34805 last argument when extracting from CONCAT. If either from_real or
34806 from_imag is NULL, use expansion through memory. If result is not
34807 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
34808 the parts directly to inner mode, if even that fails, use expansion
34811 PR middle-end/83623
34812 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
34813 check for bswap in mode rather than HImode and use that in expand_unop
34816 Copyright (C) 2018 Free Software Foundation, Inc.
34818 Copying and distribution of this file, with or without modification,
34819 are permitted in any medium without royalty provided the copyright
34820 notice and this notice are preserved.