1 2018-12-09 John David Anglin <danglin@gcc.gnu.org>
3 * config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define
5 * config/pa/pa-protos.h (pa_d_target_versions): New prototype.
6 * config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define.
7 * config/pa/pa-d.c: New file.
8 * config/pa/t-pa: New file.
10 2018-12-08 Bin Cheng <bin.cheng@linux.alibaba.com>
12 * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
15 2018-12-08 Jakub Jelinek <jakub@redhat.com>
18 * tree-nested.c (convert_local_reference_stmt): Handle clobbers where
19 lhs is not a decl normally, don't call use_pointer_in_frame on that
22 2018-12-08 Eric Botcazou <ebotcazou@adacore.com>
24 PR rtl-optimization/88390
25 * dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
26 (cfi_row_equal_p): Compare it.
27 (dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
28 If FAKE is false, set window_save of the current row.
29 (dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
30 function with FAKE parameter set to true.
31 <REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
32 (change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
34 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
37 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
38 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
39 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
40 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
41 require -mlong-double-128.
43 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
45 * config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
47 (aarch64_parse_sve_width_string): Define.
49 2018-12-07 Jeff Law <law@redhat.com>
52 * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
53 m_update_global_ranges member. Add corresponding argument to ctor.
54 * gimple-ssa-evrp-analyze.c
55 (evrp_range_analyzer::evrp_range_analyzer): Add new argument and
56 initialize m_update_global_ranges.
57 (evrp_range_analyzer::set_ssa_range_info): Assert that we are
58 updating global ranges.
59 (evrp_range_analyzer::record_ranges_from_incoming_edge): Only
60 update global ranges if explicitly requested.
61 (evrp_range_analyzer::record_ranges_from_phis): Similarly.
62 (evrp_range_analyzer::record_ranges_from_stmt): Similarly.
63 * gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
64 evrp_range_analyzer ctor.
65 * gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
66 * tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
68 2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
70 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
71 Add SVE_NOT_IMPLEMENTED value.
72 * config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
74 * config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
75 cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
76 cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
77 thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
78 saphira_tunings, thunderx2t99_tunings, emag_tunings):
80 (aarch64_estimated_poly_value): Define.
81 (TARGET_ESTIMATED_POLY_VALUE): Define.
83 2018-12-07 Paul A. Clarke <pc@us.ibm.com>
86 * config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
88 2018-12-07 Vladimir Makarov <vmakarov@redhat.com>
90 PR rtl-optimization/88349
91 * ira-costs.c (record_operand_costs): Check bigger reg class on
94 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
96 * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
97 Split the patterns after reload if we don't need the predicate
99 (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
101 2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
103 * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
105 (sve_fp_op): Handle minus and mult.
106 * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
107 (*mul<mode>3): Split the patterns after reload if we don't
108 need the predicate operand.
109 (*post_ra_<sve_fp_op><mode>3): New pattern.
111 2018-12-07 Bin Cheng <bin.cheng@linux.alibaba.com>
113 * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
114 return condition when *this is precise zero.
116 2018-12-07 Jakub Jelinek <jakub@redhat.com>
119 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
120 for functions with naked attribute.
123 * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
124 with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
125 is non-NULL and offset is known to have most significant bit clear.
126 * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
127 of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
128 most significant bit clear. If offset does have most significant bit
129 set and -fno-delete-null-pointer-checks, don't return true even if
130 the base pointer is non-NULL.
132 2018-12-06 Alexandre Oliva <aoliva@redhat.com>
134 * cselib.c (cselib_record_sets): Skip strict low part sets
137 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
140 * config/rs6000/smmintrin.h: New file.
141 * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
143 2018-12-06 Paul A. Clarke <pc@us.ibm.com>
146 * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
147 (_mm_unpacklo_pi8): Likewise.
148 (_mm_mulhi_pi16): Likewise.
149 (_mm_packs_pi16): Fix for big-endian. Use preferred API.
150 (_mm_packs_pi32): Likewise.
151 (_mm_packs_pu16): Likewise.
152 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
153 (_mm_cvtss_si64): Likewise.
154 (_mm_cvtpi32x2_ps): Likewise.
155 (_mm_shuffle_ps): Likewise.
156 (_mm_movemask_pi8): Likewise.
157 (_mm_mulhi_pu16): Likewise.
158 (_mm_sad_pu8): Likewise.
159 (_mm_sad_pu8): Likewise.
160 (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
161 (_mm_cvtpu8_ps): Likewise.
162 (_mm_movemask_ps): Better #else case for big-endian (no functional
164 (_mm_shuffle_pi16): Likewise.
165 * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
166 Better #else case for big-endian (no functional change).
167 (_mm_movemask_epi8): Likewise.
168 (_mm_shufflehi_epi16): Likewise.
169 (_mm_shufflelo_epi16): Likewise.
170 (_mm_shuffle_epi32): Likewise.
171 (_mm_mul_epu32): Fix for big-endian.
172 (_mm_bsrli_si128): Likewise.
173 (_mm_cvtps_pd): Better #else case for big endian.
174 (_mm_mulhi_epi16): Likewise.
175 (_mm_mul_epu32): Likewise.
176 (_mm_slli_si128): Likewise.
177 (_mm_sll_epi16): Likewise.
178 (_mm_sll_epi32): Likewise.
179 (_mm_sra_epi16): Likewise.
180 (_mm_sra_epi32): Likewise.
181 (_mm_srl_epi16): Likewise.
182 (_mm_srl_epi32): Likewise.
183 (_mm_mulhi_epu16): Likewise.
184 (_mm_sad_epu8): Likewise.
185 * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
186 (_mm_sub_ps): Likewise.
187 * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
188 * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
189 macros consistently (no functional changes).
190 (_mm_alignr_pi8): Likewise.
192 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
195 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
197 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
199 2018-12-06 Vladimir Makarov <vmakarov@redhat.com>
202 * ira.c (ira_init_register_move_cost): Use info from
203 hard_regno_mode_ok instead of contains_reg_of_mode.
204 * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
205 hard register class for some fixed hard registers.
207 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
209 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
210 (Size of an asm): Fix typo. Document asm inline.
211 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
212 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
213 (gimple_asm_set_volatile): Fix typo.
214 (gimple_asm_inline_p): New.
215 (gimple_asm_set_inline): New.
216 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
218 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
219 gimple_asm_inline_p flag, too.
220 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
222 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
223 a minimum size for an asm.
224 * tree.h (ASM_INLINE_P): New.
226 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
229 * doc/extend.texi (Basic Asm): Update grammar.
230 (Extended Asm): Update grammar.
232 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
235 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
236 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
237 stack alignment in non-leaf functions.
239 2018-12-06 Jakub Jelinek <jakub@redhat.com>
242 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
243 call output_operand_lossage on VOIDmode CONST_INTs. After
244 output_operand_lossage do return false.
246 2018-12-06 Richard Biener <rguenther@suse.de>
248 * df-problems.c (df_rd_local_compute): Use bitmap_release.
249 (df_live_free): Likewise.
250 (df_md_local_compute): Likewise.
251 (df_md_free): Release df_md_scratch bitmap.
252 * loop-invariant.c (calculate_loop_reg_pressure): Use
254 * sched-deps.c (true_dependency_cache, output_dependency_cache,
255 anti_dependency_cache, control_dependency_cache,
256 spec_dependency_cache): Use bitmap instead of bitmap_head *.
257 * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
258 dont_calc_deps as bitmap allocated from obstack not GC.
259 (schedule_ebbs_finish): Use bitmap_release.
260 * sched-rgn.c (schedule_insns): Initialize non-GTY
261 not_in_df as bitmap allocated from obstack not GC.
263 * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
264 (sel_region_init): Allocate forced_ebb_heads.
265 (sel_region_finish): Free forced_ebb_heads.
267 2018-12-06 Richard Biener <rguenther@suse.de>
269 * bitmap.c (bitmap_head::crashme): Define.
270 * bitmap.h (bitmap_head): Add constexpr default constructor
271 poisoning the obstack member.
272 (bitmap_head::crashme): Declare.
273 (bitmap_release): New function clearing a bitmap and poisoning
275 * gengtype.c (main): Make it recognize CONSTEXPR.
276 * lra-constraints.c (lra_inheritance): Use bitmap_release
277 instead of bitmap_clear.
278 * ira.c (ira): Work around class-memaccess warning.
279 * regrename.c (create_new_chain): Likewise.
281 2018-12-06 Jakub Jelinek <jakub@redhat.com>
283 PR tree-optimization/85726
284 * generic-match-head.c (optimize_successive_divisions_p): New function.
285 * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
286 * match.pd: Don't combine successive divisions if they aren't exact
287 and optimize_successive_divisions_p is false.
290 * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
291 for non-local automatic decls.
293 2018-12-05 David Edelsohn <dje.gcc@gmail.com>
295 * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
298 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
300 * dwarf2out.c (field_byte_offset): Remove
301 #ifdef PCC_BITFIELD_TYPE_MATTERS check.
303 2018-12-05 Richard Biener <rguenther@suse.de>
304 Martin Sebor <msebor@redhat.com>
307 * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
309 * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
310 * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
312 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
314 * configure.ac (gcc_cv_otool): Set.
315 * configure: Regenerate.
317 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
319 * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
320 (GROUP_BITFIELDS_BY_ALIGN): Ditto.
322 2018-12-05 Richard Sandiford <richard.sandiford@arm.com>
324 PR tree-optimization/88064
325 * tree-vect-patterns.c (vect_convert_input): Convert the result of
326 an existing cast if it has the right width but the wrong sign.
327 Do not test the signedness of the required result when
328 considering whether to split an existing cast; instead split to
329 a type with the same signedness as the source of the cast, then
330 convert it to the opposite signedness where necessary.
331 (vect_recog_over_widening_pattern): Handle sign changes between
332 the final PLUS_EXPR and the RSHIFT_EXPR.
333 (vect_recog_average_pattern): Use an unsigned operation when
334 truncating an addition, subtraction or multiplication. Cast the
335 result back to the "real" signedness before promoting.
337 2018-12-05 Richard Biener <rguenther@suse.de>
339 PR tree-optimization/86637
340 * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
341 vect_location at the end.
343 2018-12-05 Jakub Jelinek <jakub@redhat.com>
345 PR tree-optimization/87360
346 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
347 data dependencies, don't return false, just continue. Formatting
349 (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
350 fuse_loops): Formatting fixes.
353 * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
354 aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
356 2018-12-05 Xianmiao Qu <xianmiao_qu@c-sky.com>
358 * config.gcc (csky-*-linux-gnu*): Force .init_array support.
360 2018-12-05 Segher Boessenkool <segher@kernel.crashing.org>
362 * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
363 aggregate handling on actual AIX, not on somewhat similar systems.
364 (rs6000_arg_partial_bytes): Ditto.
366 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
368 PR rtl-optimization/88317
369 * lra-constraints.c (split_reg): Don't set up check_only_regs if
370 we are outside the inheritance pass.
372 2018-12-04 Jan Hubicka <hubicka@ucw.cz>
374 * ipa-prop.c (jump_function_useful_p): New.
375 (ipa_read_node_info): Do not allocated useless jump functions.
377 2018-12-04 David Malcolm <dmalcolm@redhat.com>
380 * spellcheck.c (selftest::test_suggestions): Add another assertion.
382 2018-12-04 Martin Sebor <msebor@redhat.com>
384 * doc/extend.texi (__builtin_has_attribute): Fix typo.
386 2018-12-04 Jakub Jelinek <jakub@redhat.com>
389 * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
391 (print_operand): Use REG_P instead of GET_CODE == REG.
392 <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
393 <case 't'>: Likewise. Remove GET_MODE check.
394 * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
397 2018-12-04 Martin Sebor <msebor@redhat.com>
399 * doc/extend.texi (attribute aligned): Expand.
401 2018-12-04 David Edelsohn <dje.gcc@gmail.com>
404 * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
406 (rs6000_arg_partial_bytes): Same.
408 2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
411 * ira-costs.c (exec): Try bigger class to use smaller register
414 2018-12-04 Michael Ploujnikov <michael.ploujnikov@oracle.com>
417 * ipa-cp.c (create_specialized_node): Track clone counters by
418 node assembler names.
419 (ipcp_driver): Change type of clone_num_suffixes key to const char*.
421 2018-12-04 Richard Biener <rguenther@suse.de>
423 * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
424 for epilogue vectorization.
426 2018-12-04 Richard Biener <rguenther@suse.de>
428 PR tree-optimization/88301
429 * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
430 issues in last commit.
432 2018-12-04 Richard Biener <rguenther@suse.de>
434 PR tree-optimization/88315
435 * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
436 and fix initialization vector for SAD and DOT_PROD SLP reductions.
438 2018-12-03 Sandra Loosemore <sandra@codesourcery.com>
441 * doc/extend.texi (Nonlocal gotos): New section.
443 2018-12-03 Uros Bizjak <ubizjak@gmail.com>
445 * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
446 alternative to (v,vm,c).
448 2018-12-03 Segher Boessenkool <segher@kernel.crashing.org>
450 * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
451 (powerpc*-*-linux*): Don't handle it here.
453 2018-12-03 Jeff Law <law@redhat.com>
455 * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
458 * config/h8300/h8300.md (low byte masking peepholes): Only accept
459 nonimmediate_operand for the to-be-masked operand.
461 2018-12-03 Richard Biener <rguenther@suse.de>
463 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
464 allow expected function-pointer cast re-instantiation.
466 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
468 * common/config/s390/s390-common.c (s390_option_init_struct):
469 Use section anchors by default.
470 * config/s390/s390.c (s390_check_symref_alignment): Handle
472 (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
473 * output.h (assemble_align): Pass `align' as unsigned int, so
474 that the value 0x80000000, which corresponds to `aligned(1 <<
475 28)', would pass the `align > BITS_PER_UNIT' check.
476 * varasm.c (assemble_align): Likewise.
478 2018-12-03 Julian Brown <julian@codesourcery.com>
480 * tree-pretty-print.c (dump_omp_clause): Make default case
483 2018-12-03 Richard Biener <rguenther@suse.de>
485 PR tree-optimization/88301
486 * tree-vrp.c (register_edge_assert_for_2): Handle conversions
487 that do not change the value by registering the same assert
490 2018-12-03 Richard Biener <rguenther@suse.de>
492 * tree-vect-loop.c (vect_transform_loop): Properly compute
493 upper bound for the epilogue when doing epilogue vectorization.
495 2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
498 * cfgcleanup.c (class pass_postreload_jump): New pass.
499 (pass_postreload_jump::execute): Likewise.
500 (make_pass_postreload_jump): Likewise.
501 * passes.def: Add pass_postreload_jump before
503 * tree-pass.h (make_pass_postreload_jump): New pass.
505 2018-12-02 Uros Bizjak <ubizjak@gmail.com>
507 * config/i386/i386.c (inline_memory_move_cost): Correctly
508 compute number of TFmode GPR moves.
510 2018-12-02 Jakub Jelinek <jakub@redhat.com>
513 * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
515 2018-12-02 Jeff Law <law@redhat.com>
517 * config/h8300/h8300.md (call, call_value): Drop mode from
518 operand containing number of bytes pushed.
519 (call_insn, call_value_insn): Use mode iterator for number
520 of bytes pushed operand. Make pattern name vary appropriately.
522 2018-12-02 Jan Hubicka <jh@suse.cz>
524 * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
525 trust precise profiles.
527 2018-12-02 Jakub Jelinek <jakub@redhat.com>
529 * tree-nested.c (convert_nonlocal_omp_clauses,
530 convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
531 OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
532 (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
533 Convert clauses for GIMPLE_OMP_TASKGROUP.
535 * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
536 cancellation point with taskgroup clause inside of taskloop. Consider
537 a taskloop construct without nogroup clause as implicit taskgroup for
538 diagnostics if cancel/cancellation point with taskgroup clause is
539 closely nested inside of taskgroup region.
542 * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
543 to the start of the function.
544 (asan_emit_stack_protection): When emitting clearing sequence for
545 epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
546 add last_size_aligned which is last_size padded to multiples of
547 ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
550 2018-12-01 Jakub Jelinek <jakub@redhat.com>
553 * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
554 an off-by-one for BYTES_BIG_ENDIAN.
557 * combine.c (find_split_point): For invalid memory address
558 nonobj + obj + const, if reg + obj + const is valid addressing
559 mode, split at nonobj. Use if rather than else if for the
560 fallback. Comment fixes.
562 2018-11-30 Indu Bhagat <indu.bhagat@oracle.com>
564 * coverage.c (get_coverage_counts): Use from_function_decl for precise
566 * profile-count.c (profile_count::dump): Add handling for precise
568 * profile.c (compute_branch_probabilities): Rely on exec_counts instead
569 of profile_info to set profile_status of function.
570 (branch_prob): Do not set profile_status of function based on
571 profile_info. Done above based on exec_counts.
573 2018-11-30 Jakub Jelinek <jakub@redhat.com>
575 PR tree-optimization/88274
576 * tree-ssa-reassoc.c (optimize_range_tests_xor,
577 optimize_range_tests_diff): If type has smaller precision than
578 corresponding mode or if it has non-standard min/max, compute
579 everything in a standard type for the precision.
582 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
583 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
584 --param logical-op-non-short-circuit is present, override
585 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
586 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
588 2018-11-30 Jeff Law <law@redhat.com>
590 * optabs.c (expand_binop): Use "machine_mode" rather than
591 "enum machine mode" in most recent change.
593 2018-11-30 Wilco Dijkstra <wdijkstr@arm.com>
596 * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
598 (expand_builtin_nonlocal_goto): Likewise.
600 2018-11-30 David Malcolm <dmalcolm@redhat.com>
602 * diagnostic-core.h (emit_diagnostic): New decl.
603 * diagnostic.c (emit_diagnostic): New overload, taking a
606 2018-11-30 David Malcolm <dmalcolm@redhat.com>
608 * pretty-print.c (class selftest::test_pretty_printer): New
609 subclass of pretty_printer.
610 (selftest::test_prefixes_and_wrapping): New test.
611 (selftest::pretty_print_c_tests): Call it.
613 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
615 Minimize clone counter memory usage in create_virtual_clone.
616 * cgraph.h (clone_function_name): Add a variant that takes a
618 * cgraph.h (cgraph_node::create_virtual_clone): Add a new
619 argument: num_suffix.
620 * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
621 num_suffix to clone_function_name.
622 (clone_function_name): Add a variant that takes a tree decl.
623 * ipa-cp.c (create_specialized_node): Keep track of clone
624 counters in clone_num_suffixes hash map.
625 (ipcp_driver): Free the counter hash map.
626 * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
629 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
630 Make function assembly more independent.
632 This is achieved by having clone_function_name assign unique clone
633 numbers for each function independently.
635 * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
637 (clone_function_name_numbered): Use clone_fn_ids.
639 2018-11-30 Vladimir Makarov <vmakarov@redhat.com>
641 PR rtl-optimization/88179
642 * lra-constraints.c (address_eliminator::address_eliminator):
643 Don't eleminate regs in illegitimate address.
645 2018-11-30 David Malcolm <dmalcolm@redhat.com>
647 PR preprocessor/88257
648 * input.c (get_substring_ranges_for_loc): Fix indentation.
649 Bulletproof against getting a different files back from
650 linemap_resolve_location and expand_location_to_spelling_point.
652 2018-11-30 Alexander Monakov <amonakov@ispras.ru>
654 PR gcov-profile/88279
655 * tree-profile.c (init_ic_make_global_vars): Call
656 decl_default_tls_model for variable and not it's type.
658 2018-11-30 Sam Tebbs <sam.tebbs@arm.com>
660 * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
662 2018-11-30 Martin Liska <mliska@suse.cz>
665 * asan.c (asan_shadow_cst): Remove, partially transform
666 into flush_redzone_payload.
667 (RZ_BUFFER_SIZE): New.
668 (struct asan_redzone_buffer): New.
669 (asan_redzone_buffer::emit_redzone_byte): Likewise.
670 (asan_redzone_buffer::flush_redzone_payload): Likewise.
671 (asan_redzone_buffer::flush_if_full): Likewise.
672 (asan_emit_stack_protection): Use asan_redzone_buffer class
673 that is responsible for proper aligned stores and flushing
674 of shadow memory payload.
675 * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
676 (asan_var_and_redzone_size): Likewise.
677 * cfgexpand.c (expand_stack_vars): Use smaller alignment
678 (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
679 for automatic variables more compact.
681 2018-11-30 Alan Modra <amodra@gmail.com>
683 * config/rs6000/predicates.md (easy_fp_constant): Avoid long
684 dependent insn sequences.
685 * config/rs6000/rs6000.c (num_insns_constant): Support long
687 * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
690 2018-11-30 Alan Modra <amodra@gmail.com>
692 * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
693 num_insns_constant_wide. Make static. Revise comment.
694 (num_insns_constant_multi): New function.
695 (num_insns_constant): Formatting. Correct CONST_WIDE_INT
696 calculation. Simplify and extract code common to both
697 CONST_INT and CONST_DOUBLE. Add gcc_unreachable for unhandled
699 * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
701 2018-11-30 Richard Biener <rguenther@suse.de>
703 PR tree-optimization/88274
704 * tree-vrp.c (ranges_from_anti_range): Fix handling of
707 2018-11-29 Andi Kleen <ak@linux.intel.com>
709 * config/i386/i386.c (current_fentry_section): Add.
710 (x86_function_profiler): Handle fentry section.
711 (ix86_attribute_table): Add fentry section.
712 * config/i386/i386.opt: Add -mfentry-section.
713 * doc/extend.texi: Document fentry_section attribute.
714 * doc/invoke.texi: Document -mfentry-section.
716 2018-11-29 Andi Kleen <ak@linux.intel.com>
718 * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
719 (current_fentry_name): Add.
720 (x86_function_profiler): Handle fentry_name attribute.
721 (ix86_handle_fentry_name): Add.
722 (ix86_attribute_table): Add fentry_name.
723 * config/i386/i386.opt: Add -mfentry-name
724 * doc/extend.texi: Document fentry_name.
725 * doc/invoke.texi: Document minstrument-return.
727 2018-11-29 Andi Kleen <ak@linux.intel.com>
729 * config/i386/i386-opts.h (enum instrument_return): Add.
730 * config/i386/i386.c (output_return_instrumentation): Add.
731 (ix86_output_function_return): Call output_return_instrumentation.
732 (ix86_output_call_insn): Call output_return_instrumentation.
733 * config/i386/i386.opt: Add -minstrument-return=.
734 * doc/invoke.texi (-minstrument-return): Document.
736 2018-11-29 Eric Botcazou <ebotcazou@adacore.com>
739 * config/sparc/sparc-modes.def: Minor tweak.
740 * config/sparc/sparc.c: Minor reordering.
741 (sparc_pass_by_reference): Move around.
742 (traverse_record_type): Change offset from HOST_WIDE_INT to int.
743 (classify_registers): Likewise for bitpos.
744 (function_arg_slotno): Remove dead test and tweak comments.
745 <MODE_RANDOM>: Remove useless assertion and test whether the
746 parameter is named in order to pass it in FP registers. Return
747 the regno for floating-point vector types.
748 (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
749 (compute_fp_layout): Likewise.
750 (count_registers): Likewise.
751 (assign_int_registers): Likewise.
752 (assign_fp_registers): Likewise.
753 (assign_registers): Likewise.
754 (function_arg_record_value): Change size from HOST_WIDE_INT to int
755 and use CEIL_NWORDS to compute the number of registers.
756 (function_arg_union_value): Minor tweaks.
757 (function_arg_vector_value): Add slotno and named parameters, use
758 CEIL_NWORDS to compute the number of registers.
759 (sparc_function_arg_1): Rework handling of vector types. Change
760 size from HOST_WIDE_INT to int.
761 (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
762 with vector types for the 64-bt ABI.
763 (sparc_function_arg_advance): Likewise.
764 (sparc_return_in_memory): Add reference to -fpcc-struct-return.
765 (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
766 (sparc_function_value_1): Rework handling of vector types. Change
767 size from HOST_WIDE_INT to int.
769 2018-11-29 Jakub Jelinek <jakub@redhat.com>
772 * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
773 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
774 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
775 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
776 *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
777 define_insn_and_split patterns.
781 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
782 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
783 *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
784 define_insn_and_split.
786 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
789 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
790 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
792 2018-11-29 Uros Bizjak <ubizjak@gmail.com>
794 * config/i386/i386.c (inline_memory_move_cost):
795 Check "in" for 2 in MMX_CLASS_P case.
796 * config/i386/mmx.md (*mov<mode>_internal): Correct
797 TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
798 alternatives in preferred_for_speed attribute calculation.
800 2018-11-29 Martin Sebor <msebor@redhat.com>
804 * doc/extend.texi (attribute constructor): Clarify.
806 2018-11-29 Martin Liska <mliska@suse.cz>
809 * builtins.c (expand_movstr): Fix thinko introduced
810 when switching to the new enum.
812 2018-11-29 qing zhao <qing.zhao@oracle.com>
814 * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
815 * common.opt: Add -flive-patching flag.
816 * doc/invoke.texi: Document -flive-patching.
817 * flag-types.h (enum live_patching_level): New enum.
818 * ipa-inline.c (can_inline_edge_p): Disable external functions from
819 inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
820 * opts.c (control_options_for_live_patching): New function.
821 (finish_options): Make flag_live_patching incompatible with flag_lto.
822 Control IPA optimizations based on different levels of
825 2018-11-29 Giuliano Belinassi <giuliano.belinassi@usp.br>
827 * match.pd (sinh (atanh (x))): New simplification rules.
828 (cosh (atanh (x))): Likewise.
830 2018-11-29 Jakub Jelinek <jakub@redhat.com>
833 * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
834 (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
835 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
836 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
837 *<sse4_1_avx2>_pblendvb_lt): New define_insns.
840 * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
841 * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
842 * match.pd (define_predicates): Add uniform_integer_cst_p.
843 (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
844 so that it works also for vector comparisons with uniform constants
845 with INTEGER_CST element.
848 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
849 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
850 in unsigned_type_for instead of vector integral type where overflow
853 2018-11-29 Michael Ploujnikov <michael.ploujnikov@oracle.com>
855 There can be at most one .resolver clone per function
856 * config/rs6000/rs6000.c (make_resolver_func): Generate
857 resolver symbol with clone_function_name instead of
858 clone_function_name_numbered.
860 2018-11-29 Richard Biener <rguenther@suse.de>
862 PR tree-optimization/88243
863 * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
864 type of all pattern-sequence stmts to vect_internal_def.
866 2018-11-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
869 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
870 (cortex-r7, cortex-r8): Update default and add new configuration.
871 * doc/invoke.texi (armv7-r): Add two new vfp options.
872 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
875 2018-11-29 Alan Modra <amodra@gmail.com>
877 * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
878 double split for targets other than Darwin.
880 2018-11-29 Alan Modra <amodra@gmail.com>
882 * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
884 2018-11-29 Alan Modra <amodra@gmail.com>
886 * config/rs6000/predicates.md (easy_fp_constant): Remove code
887 dealing with integers in const_double. Assert on unexpected
888 modes. Delete superfluous ABI_V4 test.
889 * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
890 Don't call easy_fp_constant for Pmode.
891 (rs6000_hash_constant): Remove code dealing with integers in
893 (rs6000_legitimate_constant_p): Likewise.
894 (output_toc): Formatting, use CONST_DOUBLE_P.
896 2018-11-29 Alan Modra <amodra@gmail.com>
898 * config/rs6000/constraints.md (G, H): Comment on purpose of
899 constraint. Correct mode comments and "G" mode test.
900 * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
901 alternative handling "F". Add length attr. Formatting.
902 (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
903 alternative, and move "F" to separate alternative. Correct
906 2018-11-29 Alan Modra <amodra@gmail.com>
908 * config/rs6000/predicates.md (easy_vector_constant): Don't call
911 2018-11-29 Alan Modra <amodra@gmail.com>
913 * config.in (HAVE_AS_PLTSEQ): Add.
914 * config/rs6000/predicates.md (indirect_call_operand): New.
915 * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
916 (rs6000_sibcall_sysv): Declare.
917 * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
918 CALL_LONG for -fno-plt.
919 (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
920 (rs6000_indirect_call_template_1): Emit .reloc directives for
922 (rs6000_pltseq_template): New function.
923 (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
924 relocs supported by assembler. Move SYMBOL_REF test to callers.
925 (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
926 insns in UNSPEC_PLTSEQ, preserving original func_desc.
927 (rs6000_call_sysv): Likewise.
928 (rs6000_sibcall_sysv): New function.
929 * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
930 * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
931 UNSPEC_PLT16_LO): New.
932 (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
933 (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
934 cookie in constraints. Test explicitly for flags in length attr.
935 Handle unspec operand 1.
936 (call_value_indirect_nonlocal_sysv): Likewise.
937 (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
938 (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
939 (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
940 (sibcall_indirect_nonlocal_sysv): New pattern.
941 (sibcall_value_indirect_nonlocal_sysv): Likewise.
942 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
944 * configure.ac: Check for gas plt sequence marker support.
945 * configure: Regenerate.
947 2018-11-29 Alan Modra <amodra@gmail.com>
949 * config/rs6000/predicates.md (unspec_tls): New.
950 * config/rs6000/rs6000-protos.h (rs6000_call_template),
951 (rs6000_sibcall_template): Update prototype.
952 (rs6000_longcall_ref): Delete.
953 (rs6000_call_sysv): Declare.
954 * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
955 (global_tlsarg): New variable.
956 (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
958 (print_operand): Extract UNSPEC_TLSGD address operand.
959 (rs6000_call_template, rs6000_sibcall_template): Remove arg
960 parameter, extract from second call operand instead.
961 (rs6000_longcall_ref): Make static, localize vars.
962 (rs6000_call_aix): Rename parameter to reflect new usage. Take
963 tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
964 (rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
965 tlsarg from global_tlsarg.
966 (rs6000_call_sysv): New function.
967 * config/rs6000/rs6000.md: Adjust rs6000_call_template and
968 rs6000_sibcall_template throughout.
969 (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
970 (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
971 (tls_gdld_nomark): New insn.
972 (tls_gd): Swap operand order. Simplify mode selection.
973 (tls_gd_high, tls_gd_low): Swap operand order.
974 (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
975 Simplify mode selection.
976 (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
977 (call, call_value): Don't assert for second call operand.
978 Use rs6000_call_sysv.
980 2018-11-29 Alan Modra <amodra@gmail.com>
982 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
983 (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
984 (call_value_nonlocal_darwin64): Remove constraints from second call
985 arg, the rounded_stack_size_rtx arg.
986 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
987 (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
988 (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
989 (call_value_local64, call_indirect_nonlocal_sysv),
990 (call_nonlocal_sysv, call_nonlocal_sysv_secure),
991 (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
992 (call_value_nonlocal_sysv_secure, call_local_aix),
993 (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
994 (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
995 (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
996 (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
997 (sibcall_value_aix): Likewise.
999 2018-11-29 Alan Modra <amodra@gmail.com>
1001 * config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
1002 with P throughout except for call mems which should use SI.
1003 (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
1004 attributes. Replace with bits, mode and ptrload respectively.
1006 2018-11-29 Alan Modra <amodra@gmail.com>
1008 * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
1009 (rs6000_indirect_sibcall_template): Declare.
1010 * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
1011 (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
1013 * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
1014 (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
1015 (call_indirect_aix, call_value_indirect_aix): Use
1016 rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
1017 call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
1018 handle both speculation and non-speculation cases.
1019 (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
1020 (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
1022 2018-11-29 Alan Modra <amodra@gmail.com>
1024 * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
1025 (rs6000_sibcall_template): Declare.
1026 (macho_call_template): Rename from output_call.
1027 * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
1028 (rs6000_call_template, rs6000_sibcall_template): Likewise.
1029 (macho_call_template): Rename from output_call.
1030 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
1031 (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
1032 (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
1033 (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
1034 (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
1035 (call_value_nonlocal_aix): Use rs6000_call_template and update
1036 occurrences of output_call to macho_call_template.
1037 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
1038 (sibcall_value_aix): Use rs6000_sibcall_template.
1040 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
1042 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
1043 we determine if unaligned vsx is ok.
1045 2018-11-28 Jan Hubicka <jh@suse.cz>
1047 * predict.c (determine_unlikely_bbs): Forward declare; also determine
1048 edges that are always known to be taken because it is only likely
1049 edge out of given BB.
1050 (tree_estimate_probability): Call before profile guessing to get bit
1053 2018-11-28 Jan Hubicka <jh@suse.cz>
1055 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
1056 profile_probability::always better.
1058 2018-11-28 Jan Hubicka <jh@suse.cz>
1060 * profile-count.h (profile_count::split): Give better result when
1061 splitting profile_probability::always.
1063 2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
1066 * ira-costs.c (scan_one_insn): Process subregs when updating costs
1067 for pseudos and allocnos from insn.
1069 2018-11-28 David Edelsohn <dje.gcc@gmail.com>
1071 * config/rs6000/aix72.h: Update to match aix71.h changes.
1073 2018-11-28 Jeff Law <law@redhat.com>
1075 * config/h8300/constraints.md: Add "C" constraint for call insns.
1076 * config/h8300/h8300.md (call, call_value): Turn into a define_expand
1077 and define_insn pair. Move invalid call targets into a register in
1078 the expander and fix constraints in the matching pattern.
1079 * config/h8300/predicates.md (call_expander_operand): Renamed from
1080 call_insn_operand. Reject things we shouldn't be trying to handle.
1081 (call_insn_operand): New predicate for use by the call/call_value
1083 (small_call_insn_operand): Update appropriately.
1085 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
1087 * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
1088 calls to strtok with strtok_r.
1090 2018-11-28 Richard Biener <rguenther@suse.de>
1092 PR tree-optimization/88223
1093 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
1094 over a stored-same value may-alias store make sure to consider
1095 partial overlaps which are valid when TBAA reasonings do not
1096 apply and byte-granular overlaps are possible at all.
1098 2018-11-28 Richard Biener <rguenther@suse.de>
1100 PR tree-optimization/88217
1101 * vr-values.c (vr_values::extract_range_from_phi_node): Make
1102 sure to handle results > +INF and < -INF correctly when
1103 trying to drop down to +INF - 1 or -INF + 1.
1105 2018-11-28 Alan Modra <amodra@gmail.com>
1107 * xcoffout.c (do_block): Signed/unsigned warning fix.
1109 2018-11-28 Richard Biener <rguenther@suse.de>
1111 PR tree-optimization/79351
1112 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
1113 empty CONSTRUCTORs ensure the store is at a constant position.
1115 2018-11-28 Richard Biener <rguenther@suse.de>
1117 PR tree-optimization/88229
1118 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
1119 is an INTEGER_CST before accessing it so.
1121 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
1123 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
1125 2018-11-28 Jakub Jelinek <jakub@redhat.com>
1128 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
1129 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
1130 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
1132 2018-11-27 Martin Liska <mliska@suse.cz>
1134 * gcov.c (generate_results): Append current_working_directory
1137 2018-11-27 Mike Gulick <mgulick@mathworks.com>
1139 PR preprocessor/83173
1140 * input.c (dump_location_info): Dump reason and included_from
1141 fields from line_map_ordinary struct. Fix indentation when
1142 location > 5 digits.
1143 * diagnostic-show-locus.c (num_digits, num_digits): Move to
1144 diagnostic.c to allow it to be utilized by input.c.
1145 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
1147 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
1148 * diagnostic.h (num_digits): Add extern definition.
1150 2018-11-27 Fredrik Noring <noring@nocrew.org>
1152 * config/mips/mips.c (mips_reorg_process_insns)
1153 (mips_option_override): Handle `-mfix-r5900'.
1154 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
1156 * config/mips/mips.opt (mfix-r5900): New option.
1157 * doc/invoke.texi: Document the `r5900' processor name, and
1158 `-mfix-r5900' and `-mno-fix-r5900' options.
1160 2018-11-27 Jakub Jelinek <jakub@redhat.com>
1163 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
1164 output_operand_lossage instead of gcc_assert.
1165 <case 't'>: Likewise.
1166 <case 'z'>: Likewise.
1167 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
1169 2018-11-27 Jeff Law <law@redhat.com>
1171 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
1172 in call to move_by_pieces.
1174 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
1177 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
1178 call to move_by_pieces.
1180 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
1181 in call to move_by_pieces.
1183 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
1184 RETURN_BEGIN in call to move_by_pieces.
1185 (microblaze_expand_block_move): Likewise.
1187 2018-11-27 Tamar Christina <tamar.christina@arm.com>
1189 * doc/md.texi (xorsign): Document it.
1191 2018-11-27 Martin Liska <mliska@suse.cz>
1193 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
1194 * gcc.c (find_fortran_preinclude_file): New function
1195 to handle Fortran pre-include.
1197 2018-11-27 Martin Liska <mliska@suse.cz>
1199 * asan.c (asan_emit_stack_protection): Use new enum values
1200 instead of int constants.
1201 * builtins.c (expand_builtin_memory_copy_args): Replace int
1202 type with memop_ret enum type.
1203 (expand_builtin_mempcpy_args): Likewise.
1204 (expand_builtin_memcpy): Use new enum values
1205 instead of int constants. Likewise.
1206 (expand_builtin_mempcpy): Likewise.
1207 (expand_movstr): Likewise.
1208 (expand_builtin_strcpy_args): Likewise.
1209 (expand_builtin_stpcpy_1): Likewise.
1210 (expand_builtin_strncpy): Likewise.
1211 (expand_builtin_memset_args): Likewise.
1212 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
1213 (move_by_pieces_d::finish_retmode): ... this.
1214 (move_by_pieces): Change last argument type to memop_ret.
1215 (store_by_pieces): Use new enum values
1216 instead of int constants.
1217 (emit_block_move_hints): Likewise.
1218 (emit_push_insn): Likewise.
1219 (store_expr): Likewise.
1220 * expr.h (store_by_pieces): Change int to newly added enum
1222 * rtl.h (enum memop_ret): Define.
1223 (move_by_pieces): Use the enum type.
1225 2018-11-27 Alan Modra <amodra@gmail.com>
1227 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
1229 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
1230 form. Error on missing -mcpu case.
1231 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
1232 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
1233 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
1234 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
1235 else if .. specs form. Error on missing -mcpu case. Don't output
1236 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
1238 2018-11-26 David Malcolm <dmalcolm@redhat.com>
1240 * dump-context.h (dump_context::dump_loc): Convert 1st param from
1241 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
1242 const dump_location_t & to const dump_user_location_t &.
1243 (dump_context::dump_loc_immediate): Convert 2nd param from
1244 const dump_location_t & to const dump_user_location_t &.
1245 (dump_context::dump_gimple_stmt): Convert 1st param from
1246 dump_flags_t to const dump_metadata_t &.
1247 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1248 2nd param from const dump_location_t & to
1249 const dump_user_location_t &.
1250 (dump_context::dump_gimple_expr): Convert 1st param from
1251 dump_flags_t to const dump_metadata_t &.
1252 (dump_context::dump_gimple_expr_loc): Likewise; convert
1253 2nd param from const dump_location_t & to
1254 const dump_user_location_t &.
1255 (dump_context::dump_generic_expr): Convert 1st param from
1256 dump_flags_t to const dump_metadata_t &.
1257 (dump_context::dump_generic_expr_loc): Likewise; convert
1258 2nd param from const dump_location_t & to
1259 const dump_user_location_t &.
1260 (dump_context::dump_printf_va): Convert 1st param from
1261 dump_flags_t to const dump_metadata_t &.
1262 (dump_context::dump_printf_loc_va): Likewise; convert
1263 2nd param from const dump_location_t & to
1264 const dump_user_location_t &.
1265 (dump_context::dump_dec): Convert 1st param from
1266 dump_flags_t to const dump_metadata_t &.
1267 (dump_context::dump_symtab_node): Likewise.
1268 (dump_context::begin_scope): Split out 2nd param into
1269 user and impl locations.
1270 (dump_context::ensure_pending_optinfo): Add metadata param.
1271 (dump_context::begin_next_optinfo): Replace dump_location_t param
1272 with metadata and user location.
1273 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
1274 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
1275 const dump_location_t & to const dump_user_location_t &.
1276 (dump_context::dump_loc_immediate): Convert 2nd param from
1277 const dump_location_t & to const dump_user_location_t &.
1278 (dump_context::dump_gimple_stmt): Convert 1st param from
1279 dump_flags_t to const dump_metadata_t &.
1280 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1281 2nd param from const dump_location_t & to
1282 const dump_user_location_t &.
1283 (dump_context::dump_gimple_expr): Convert 1st param from
1284 dump_flags_t to const dump_metadata_t &.
1285 (dump_context::dump_gimple_expr_loc): Likewise; convert
1286 2nd param from const dump_location_t & to
1287 const dump_user_location_t &.
1288 (dump_context::dump_generic_expr): Convert 1st param from
1289 dump_flags_t to const dump_metadata_t &.
1290 (dump_context::dump_generic_expr_loc): Likewise; convert
1291 2nd param from const dump_location_t & to
1292 const dump_user_location_t &.
1293 (dump_context::dump_printf_va): Convert 1st param from
1294 dump_flags_t to const dump_metadata_t &.
1295 (dump_context::dump_printf_loc_va): Likewise; convert
1296 2nd param from const dump_location_t & to
1297 const dump_user_location_t &.
1298 (dump_context::dump_dec): Convert 1st param from
1299 dump_flags_t to const dump_metadata_t &.
1300 (dump_context::dump_symtab_node): Likewise.
1301 (dump_context::begin_scope): Split out 2nd param into
1302 user and impl locations.
1303 (dump_context::ensure_pending_optinfo): Add metadata param.
1304 (dump_context::begin_next_optinfo): Replace dump_location_t param
1305 with metadata and user location.
1306 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1307 const dump_metadata_t &.
1308 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1309 const dump_location_t & to const dump_user_location_t &.
1310 (dump_gimple_expr): Convert 1st param from dump_flags_t to
1311 const dump_metadata_t &.
1312 (dump_gimple_expr_loc): Likewise; convert 2nd param from
1313 const dump_location_t & to const dump_user_location_t &.
1314 (dump_generic_expr): Convert 1st param from dump_flags_t to
1315 const dump_metadata_t &.
1316 (dump_generic_expr_loc): Likewise; convert 2nd param from
1317 const dump_location_t & to const dump_user_location_t &.
1318 (dump_printf): Convert 1st param from dump_flags_t to
1319 const dump_metadata_t &.
1320 (dump_printf_loc): Likewise; convert 2nd param from
1321 const dump_location_t & to const dump_user_location_t &.
1322 (dump_dec): Convert 1st param from dump_flags_t to
1323 const dump_metadata_t &.
1324 (dump_symtab_node): Likewise.
1325 (dump_begin_scope): Split out 2nd param into user and impl
1327 (selftest::assert_impl_location_eq): New function.
1328 (ASSERT_IMPL_LOCATION_EQ): New macro.
1329 (selftest::test_impl_location): Update to use
1330 ASSERT_IMPL_LOCATION_EQ.
1331 (selftest::test_capture_of_dump_calls): Convert "loc" to
1332 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
1333 verifying line numbers of dump emissions.
1334 * dumpfile.h (class dump_metadata_t): New class.
1335 (dump_printf): Convert 1st param from dump_flags_t to
1336 const dump_metadata_t &.
1337 (dump_printf_loc): Likewise; convert 2nd param from
1338 const dump_location_t & to const dump_user_location_t &.
1339 (dump_generic_expr_loc): Likewise.
1340 (dump_generic_expr): Convert 1st param from dump_flags_t to
1341 const dump_metadata_t &.
1342 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1343 const dump_location_t & to const dump_user_location_t &.
1344 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1345 const dump_metadata_t &.
1346 (dump_gimple_expr_loc): Likewise; convert 2nd param from
1347 const dump_location_t & to const dump_user_location_t &.
1348 (dump_gimple_expr): Convert 1st param from dump_flags_t to
1349 const dump_metadata_t &.
1350 (dump_symtab_node): Likewise.
1351 (dump_dec): Likewise.
1352 (dump_begin_scope): Split out 2nd param into user and impl
1354 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
1355 location and impl_location, and capture the impl_location.
1356 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
1357 * loop-unroll.c (report_unroll): Update for changes to
1358 dump_printf_loc and dump_printf.
1359 * opt-problem.cc (opt_problem::opt_problem): Update for change to
1361 * optinfo-emit-json.cc
1362 (selftest::test_building_json_from_dump_calls): Convert "loc" from
1363 dump_location_t to dump_user_location_t.
1364 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
1366 * profile.c (compute_branch_probabilities): Update for change to
1368 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
1369 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
1372 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1374 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
1375 and check_effective_target_ptr_eq_long.
1377 2018-11-27 Alan Modra <amodra@gmail.com>
1379 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
1380 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
1381 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
1382 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
1383 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
1384 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
1385 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1386 (ASM_APP_ON, ASM_APP_OFF): Don't define.
1387 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1388 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1389 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1390 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
1391 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1392 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1393 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
1394 (GNU_USER_TARGET_CRTN): Redefine.
1395 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
1396 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
1397 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
1398 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
1399 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
1400 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
1401 (LINK_EH_SPEC): Don't define.
1403 2018-11-26 Martin Sebor <msebor@redhat.com>
1406 * expr.c (string_constant): Handle top-level decls of all character
1407 types and subobjects of narrow character type.
1409 2018-11-27 Alan Modra <amodra@gmail.com>
1411 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
1412 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
1413 GNU_USER_TARGET_OS_CPP_BUILTINS.
1414 (RS6000_ABI_NAME): Define.
1415 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
1416 GNU_USER_TARGET_OS_CPP_BUILTINS.
1417 (MUSL_DYNAMIC_LINKER32): Undef before defining.
1418 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
1419 (CHOOSE_DYNAMIC_LINKER): Don't define.
1420 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
1421 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
1422 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
1423 not already defined.
1424 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
1425 TARGET_OS_CPP_BUILTINS.
1427 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1429 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
1431 2018-11-26 Jakub Jelinek <jakub@redhat.com>
1434 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
1435 and !TARGET_64BIT, return NULL_TREE.
1438 * dwarf2out.c (secname_for_decl): For functions with
1439 DECL_SECTION_NAME if in_cold_section_p, try to return
1440 current_function_section's name if it is a named section.
1442 2018-11-26 Maya Rashish <coypu@sdf.org>
1445 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
1446 * config/x-netbsd: New file.
1447 * config/host-netbsd: New file.
1449 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1451 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
1452 Clarify documentation for check_effective_target_size32plus.
1454 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1456 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
1457 and modify expand_strncmp_vec_sequence.
1458 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
1459 (generate_6432_conversion): New function.
1460 (expand_block_compare): Add support for vsx.
1461 (expand_block_compare_gpr): New function.
1462 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
1463 default limit to 63 because of more compact vsx code.
1465 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
1468 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
1469 for registers for which no debug information can be generated.
1470 Use INVALID_REGNUM for non-existent registers.
1471 (dbx64_register_map): Ditto.
1472 (svr4_dbx_register_map): Ditto.
1474 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
1477 * doc/invoke.texi (Optimize Options): Document that
1478 -freorder-functions also uses "hot" and "cold" attributes.
1480 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1482 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
1484 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1486 * config/arm/types.md (mul64): Rename to...
1487 (widen_mul64): ... This.
1488 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
1489 * config/arm/cortex-a15.md: Likewise.
1490 * config/arm/cortex-a5.md: Likewise.
1491 * config/arm/cortex-a53.md: Likewise.
1492 * config/arm/cortex-a57.md: Likewise.
1493 * config/arm/cortex-a7.md: Likewise.
1494 * config/arm/cortex-m4.md: Likewise.
1495 * config/arm/exynos-m1.md: Likewise.
1496 * config/arm/marvell-pj4.md: Likewise.
1497 * config/arm/xgene1.md: Likewise.
1499 2018-11-26 Richard Biener <rguenther@suse.de>
1501 PR tree-optimization/88182
1502 * tree-vect-loop.c (vectorizable_reduction): Pick up single
1503 correct reduc_def_info.
1504 * tree-vect-slp.c (vect_analyze_slp_instance): Set
1505 STMT_VINFO_REDUC_DEF of the first stmt.
1507 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
1509 * doc/invoke.texi: Document z14/arch12 -march option.
1511 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
1514 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
1515 (Warning Options): Likewise.
1517 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
1520 * doc/extend.texi (Common Function Attributes): Clarify that
1521 functions with "const" attribute can read const global variables.
1523 2018-11-26 Alan Modra <amodra@gmail.com>
1525 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
1527 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
1530 * doc/extend.texi (Common Variable Attributes): Use preferred
1531 placement of type attributes in examples, plus whitespace fixes.
1532 (Type Attributes): Clarify why placement of attributes
1533 immediately after struct/union/enum keyword is preferred.
1534 (Common Type Attributes): Use preferred placement of type
1535 attributes in examples, plus more whitespace fixes.
1537 2018-11-25 Paul Koning <ni1d@arrl.net>
1539 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
1541 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1543 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
1544 attributes): Document d_runtime.
1546 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
1549 * ira-costs.c (record_operand_costs): Initiate register move cost
1552 2018-11-23 Jeff Law <law@redhat.com>
1554 PR rtl-optimization/87468
1555 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
1556 EDGE_IGNORE on all outgoing edges of the duplicate block.
1558 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
1561 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
1562 its mode does not fit to the original class.
1564 2018-11-23 Martin Sebor <msebor@redhat.com>
1566 PR tree-optimization/87756
1567 * expr.c (string_constant): Synthesize a string literal from
1568 the address of a constant character.
1569 * tree.c (build_string_literal): Add an argument.
1570 * tree.h (build_string_literal): Same.
1572 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
1574 * config/aarch64/aarch64-cores.def: Define emag.
1575 * config/aarch64/aarch64-tune.md: Regenerated with emag.
1576 * config/aarch64/aarch64.c (emag_tunings): New struct.
1577 * doc/invoke.texi: Document mtune value.
1579 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
1580 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
1582 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
1584 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
1586 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
1588 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
1591 2018-11-23 Richard Biener <rguenther@suse.de>
1593 PR tree-optimization/88149
1594 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
1595 the case where there are two different def types for the
1596 same operand at different operand position in the same stmt.
1598 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
1600 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
1601 gen_atomic_compare_swap_1.
1602 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
1603 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
1604 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
1605 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
1606 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
1608 * config/arm/arm.md (neon_vext<mode>),
1609 (neon_vrev64<mode>, neon_vrev32<mode>),
1610 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
1611 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
1612 before the pattern name.
1613 * config/arm/sync.md:
1614 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
1615 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
1617 2018-11-23 Jakub Jelinek <jakub@redhat.com>
1619 PR tree-optimization/86614
1620 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
1621 if TREE_NO_WARNING is set on ref.ref.
1623 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
1624 Alan Coopersmith <alan.coopersmith@oracle.com>
1627 * doc/extend.texi (Designated Inits): Clarify handling of multiple
1628 initializers for unions.
1630 2018-11-22 Jan Hubicka <jh@suse.cz>
1633 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
1634 parameters; do not warn here.
1635 (odr_subtypes_equivalent_p): Likewise.
1636 (warn_odr): Fix typo.
1637 (warn_types_mismatch): Do not output confused warnings on integer types.
1638 (odr_types_equivalent_p): Update.
1640 2018-11-22 Jakub Jelinek <jakub@redhat.com>
1642 * config/i386/i386.c (ix86_option_override_internal,
1643 ix86_can_inline_p, classify_argument, construct_container,
1644 ix86_expand_prologue, ix86_expand_split_stack_prologue,
1645 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
1646 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
1647 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
1650 * config/i386/i386.c (ix86_option_override_internal): For
1651 stack_protector_guard related options, use opts_set->x_ instead
1652 of global_options_set. and prefix options with opts->x_ . Move
1653 defaults for offset and reg into else block.
1655 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
1657 * config/i386/i386.c (ix86_check_avx_upper_register):
1658 Return true for all SSE registers with mode bitsize > 128.
1660 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
1662 PR rtl-optimization/87718
1663 * ira-costs.c: Remove trailing white-spaces.
1664 (record_operand_costs): Add a special treatment for moves
1665 involving a hard register.
1667 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
1669 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
1670 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
1672 2018-11-22 Martin Liska <mliska@suse.cz>
1674 * common/config/i386/i386-common.c (processor_names): Add
1675 static assert and add missing "znver2".
1676 (ix86_get_valid_option_values): Add checking assert for null
1677 values and add "native" value if feasible.
1678 * config/i386/i386.h: Do not declare size of processor_names.
1679 * common/config/i386/i386-common.c:
1680 * config/i386/i386.c: Add static assert for size
1681 of processor_cost_table.
1683 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1685 * target-insns.def (stack_protect_combined_set): Define new standard
1687 (stack_protect_combined_test): Likewise.
1688 * cfgexpand.c (stack_protect_prologue): Try new
1689 stack_protect_combined_set pattern first.
1690 * function.c (stack_protect_epilogue): Try new
1691 stack_protect_combined_test pattern first.
1692 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
1693 parameters to control which register to use as PIC register and force
1694 reloading PIC register respectively. Insert in the stream of insns if
1696 (legitimize_pic_address): Expose above new parameters in prototype and
1697 adapt recursive calls accordingly. Use pic_reg if non null instead of
1699 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
1700 (arm_legitimize_address): Adapt to new legitimize_pic_address
1702 (thumb_legitimize_address): Likewise.
1703 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
1704 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
1705 (thumb1_expand_prologue): Likewise.
1706 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
1708 (arm_load_pic_register): Likewise.
1709 * config/arm/predicated.md (guard_addr_operand): New predicate.
1710 (guard_operand): New predicate.
1711 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
1713 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
1715 (stack_protect_combined_set): New expander..
1716 (stack_protect_combined_set_insn): New insn_and_split pattern.
1717 (stack_protect_set_insn): New insn pattern.
1718 (stack_protect_combined_test): New expander.
1719 (stack_protect_combined_test_insn): New insn_and_split pattern.
1720 (arm_stack_protect_test_insn): New insn pattern.
1721 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
1722 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
1723 (UNSPEC_SP_TEST): Likewise.
1724 * doc/md.texi (stack_protect_combined_set): Document new standard
1726 (stack_protect_set): Clarify that the operand for guard's address is
1728 (stack_protect_combined_test): Document new standard pattern name.
1729 (stack_protect_test): Clarify that the operand for guard's address is
1732 2018-11-22 Richard Biener <rguenther@suse.de>
1734 PR tree-optimization/88148
1735 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
1736 valueization callback parameter and handle it.
1737 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
1738 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
1740 2018-11-22 Richard Biener <rguenther@suse.de>
1744 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1745 which can appear in size expressions.
1746 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1747 CALL_EXPR_BY_DESCRIPTOR.
1748 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1749 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1750 CALL_EXPR_BY_DESCRIPTOR.
1751 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1755 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1758 2018-11-22 Richard Biener <rguenther@suse.de>
1760 PR tree-optimization/88069
1761 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
1762 apply to default defs.
1764 2018-11-22 Jakub Jelinek <jakub@redhat.com>
1768 * config/i386/i386.c (ix86_option_override_internal): Default
1769 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
1771 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
1772 stack_protect_test, stack_protect_test_<mode>): Use empty condition
1773 instead of TARGET_SSP_TLS_GUARD.
1775 2018-11-22 Martin Liska <mliska@suse.cz>
1778 * config/i386/i386.c (ix86_option_override_internal): Error
1779 about usage -mabi=ms and -fsanitize=thread.
1781 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
1784 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
1787 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
1789 * lra-spills.c (lra_final_code_change): Remove useless move insns.
1791 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
1794 * function.c (expand_function_end): Do not emit extra blockage insn.
1796 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
1799 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
1800 of FIRST_SSE_REG for 4 or 8 byte modes.
1802 2018-11-21 Jan Hubicka <jh@suse.cz>
1805 * tree.c (fld_decl_context): Break out from ...
1806 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
1807 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
1808 (fld_incomplete_type_of): Build copy of TYP_DECL.
1809 * ipa-devirt.c (free_enum_values): Rename to ...
1810 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
1811 and TREE_TYPEs of TYPE_DECLs.
1812 (get_odr_type): Initialize odr_vtable_hash if needed.
1814 2018-11-21 Alexandre Oliva <oliva@adacore.com>
1816 * final.c (compute_discriminator): Declare. Renamed from...
1817 (maybe_set_discriminator): ... this. Set and return a local.
1818 (override_discriminator): New.
1819 (final_scan_insn_1): Set it.
1820 (notice_source_line): Adjust. Always set discriminator.
1822 2018-11-21 Jakub Jelinek <jakub@redhat.com>
1825 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
1826 rIJ constraint for aarch64_plus_operand rather than rn.
1828 2018-11-21 Renlin Li <renlin.li@arm.com>
1831 * explow.h (get_dynamic_stack_size): Declare it as external.
1832 * explow.c (record_new_stack_level): Remove function static attribute.
1833 * function.c (assign_stack_local_1): Dynamically align the stack slot
1834 addr for parameter copy on the stack.
1836 2018-11-21 Richard Biener <rguenther@suse.de>
1839 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
1840 * Makefile.in (bitmap.o-warn): Remove again.
1842 2018-11-20 Jeff Law <law@redhat.com>
1844 PR tree-optimization/88069
1845 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
1846 degenerate virtual PHIs.
1848 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
1851 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
1852 nonimmediate_operand with register_operand.
1853 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
1854 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
1855 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
1856 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
1857 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
1858 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
1859 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
1860 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
1861 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
1862 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
1863 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
1864 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
1865 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
1866 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
1867 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
1868 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
1869 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
1870 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
1871 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
1872 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
1873 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
1874 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
1875 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
1876 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
1877 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
1878 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
1879 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
1881 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
1883 * read-rtl.c (apply_subst_iterator): Handle define_split and
1884 define_insn_and_split.
1886 2018-11-21 Jakub Jelinek <jakub@redhat.com>
1888 PR rtl-optimization/87817
1889 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
1890 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
1891 in the pattern to avoid triggering UB when operands[2] is zero.
1892 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
1893 (*tbm_bextri_<mode>): ... this.
1895 2018-11-21 Tom de Vries <tdevries@suse.de>
1898 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
1901 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
1903 * configure.ac: Add check for Binutils to determine whether vector
1904 load/store alignments hints are being supported.
1905 * config.in: Regenerate.
1906 * configure: Regenerate.
1907 * config/s390/s390.c (print_operand): Support new output
1909 * config/s390/s390.md ("movti"): Append alignment hint output
1910 using the new output modifier 'A'.
1911 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
1912 ("*vec_ti_to_v1ti"): Likewise.
1914 2018-11-20 Martin Sebor <msebor@redhat.com>
1916 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
1918 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1921 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
1922 compare ENUM values.
1924 2018-11-20 Jakub Jelinek <jakub@redhat.com>
1926 PR tree-optimization/87895
1927 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1928 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1929 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1930 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1931 has any preds and always use EDGE_PRED (, 0).
1933 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
1936 * mode-switching.c (create_pre_exit): After reload, always split the
1937 fallthrough edge to the exit block.
1939 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1941 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
1942 * tree.c (build_array_type_1): Forward declare.
1943 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
1944 (fld_type_variant): Likewise.
1945 (fld_simplified_types): New hash.
1946 (fld_process_array_type): New function.
1947 (fld_incomplete_type_of): Handle array and enumeration types.
1948 (fld_simplified_type): Handle simplification of arrays.
1949 (free_lang_data): Allocate and free simplified types hash.
1951 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1954 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
1955 when sybtype already violates ODR.
1956 (get_odr_type): Do not ICE when insert is false and type duplicate
1957 is not registered yet.
1958 (register_odr_type): Be sure to register subtypes first.
1960 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
1962 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
1963 DImode parts of the target operand.
1965 2018-11-20 Nathan Sidwell <nathan@acm.org>
1968 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
1970 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1973 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
1975 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
1977 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1980 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
1981 * ipa.c (possible_inline_candidate_p): Break out from ..
1982 (process_references): ... here ; drop before_inlining_p;
1983 cleanup handling of alises.
1984 (walk_polymorphic_call_targets): Likewise.
1985 (symbol_table::remove_unreachable_nodes): Likewise.
1986 * passes.c (pass_data_ipa_remove_symbols): New structure.
1987 (pass_ipa_remove_symbols): New pass.
1988 (make_pass_ipa_remove_symbols): New function.
1989 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
1990 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
1992 2018-11-20 Richard Biener <rguenther@suse.de>
1994 * tree-vect-stmts.c (vectorizable_condition): Do not get
1995 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
1996 pointless vect_is_simple_use calls.
1998 2018-11-20 Richard Biener <rguenther@suse.de>
2000 PR tree-optimization/88074
2001 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
2004 2018-11-20 Richard Biener <rguenther@suse.de>
2006 PR tree-optimization/88069
2007 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
2008 virtual PHI arguments.
2010 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
2013 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
2015 * rtl.h (contains_constant_pool_address_p): New function.
2016 * rtlanal.c (contains_constant_pool_address_p): Likewise.
2018 2018-11-20 Richard Biener <rguenther@suse.de>
2021 * alias.c (component_uses_parent_alias_set_from): Remove
2022 alias-set zero and TYPE_TYPELESS_STORAGE case both already
2023 handled in other ways.
2025 2018-11-20 Richard Biener <rguenther@suse.de>
2027 PR tree-optimization/88087
2028 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
2030 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
2033 2018-11-20 Richard Biener <rguenther@suse.de>
2036 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
2038 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
2041 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
2043 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
2046 * doc/invoke.texi (Link Options): Mention shared libraries
2047 in documentation for the -l option. Simplify discussion and
2048 point to the system linker documentation for details.
2050 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
2052 PR rtl-optimization/88033
2053 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
2054 to itself. Use HARD_REGISTER_NUM_P.
2056 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2058 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
2059 of the loop if vf is non-constant.
2061 2018-11-19 David Malcolm <dmalcolm@redhat.com>
2063 PR tree-optimization/87025
2064 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
2065 immediately after creating the scope optinfo.
2066 (selftest::test_pr87025): New function.
2067 (selftest::dumpfile_c_tests): Call it.
2068 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
2069 that we're not popping the top-level records array.
2070 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
2071 not changing the kind of a "scope" optinfo.
2073 2018-11-19 David Malcolm <dmalcolm@redhat.com>
2075 PR tree-optimization/87025
2076 * dump-context.h: Include "optinfo.h".
2077 (class optrecord_json_writer): New forward decl.
2078 (dump_context::forcibly_enable_optinfo_p): Delete.
2079 (dump_context::optinfo_enabled_p): New member function.
2080 (dump_context::optimization_records_enabled_p): New member
2082 (dump_context::set_json_writer): New member function.
2083 (dump_context::emit_optinfo): New member function.
2084 (dump_context::m_forcibly_enable_optinfo): Delete.
2085 (dump_context::m_json_writer): New member data.
2086 * dumpfile.c (dump_context::set_json_writer): New member function.
2087 (dump_context::finish_any_json_writer): New member function.
2088 (dump_context::end_scope): Replace call to
2089 optimization_records_maybe_pop_dump_scope with call to
2090 m_json_writer->pop_scope.
2091 (dump_context::optinfo_enabled_p): New member function.
2092 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
2093 to dump_context::emit_optinfo.
2094 (dump_context::emit_optinfo): New member function.
2095 (temp_dump_context::temp_dump_context): Replace
2096 m_forcibly_enable_optinfo with call to set_json_writer.
2097 (temp_dump_context::~temp_dump_context): Clean up any json writer.
2098 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
2100 (the_json_writer): Delete.
2101 (optimization_records_start): Delete.
2102 (optimization_records_finish): Delete.
2103 (optimization_records_enabled_p): Delete, in favor of
2104 dump_context::optimization_records_enabled_p.
2105 (optimization_records_maybe_record_optinfo): Delete.
2106 (optimization_records_maybe_pop_dump_scope): Delete.
2107 * optinfo-emit-json.h: Include "json.h". Delete forward
2109 (optimization_records_start): Delete.
2110 (optimization_records_finish): Delete.
2111 (optimization_records_enabled_p): Delete.
2112 (optimization_records_maybe_record_optinfo): Delete.
2113 (optimization_records_maybe_pop_dump_scope): Delete.
2114 (class optrecord_json_writer): Move here from
2115 optinfo-emit-json.cc.
2116 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
2117 to optinfo::emit with call to dump_context::emit_optinfo.
2118 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2119 (optinfo_enabled_p): Delete, in favor of
2120 dump_context::optinfo_enabled_p.
2121 (optinfo_wants_inlining_info_p): Update for conversion o
2122 optimization_records_enabled_p to a member function of
2124 * optinfo.h (optinfo_enabled_p): Delete, in favor of
2125 dump_context::optinfo_enabled_p.
2126 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2127 * toplev.c: Include "dump-context.h".
2128 (compile_file): Replace call to optimization_records_finish with
2129 dump_context::finish_any_json_writer.
2130 (do_compile): Replace call to optimization_records_start with
2131 conditionally creating a optrecord_json_writer for the
2134 2018-11-19 Jakub Jelinek <jakub@redhat.com>
2136 PR tree-optimization/88071
2137 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
2138 of false as last argument to gsi_remove.
2139 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
2140 false as last argument to gsi_replace.
2143 * omp-expand.c: Don't include debug.h.
2144 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
2145 from innermost outer parallel, task, teams or target that has a
2146 child_fn set, or, if there is no such outer region, use
2147 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
2148 whether a suitable BLOCK is found or not.
2149 (expand_parallel_call, expand_teams_call): Don't call
2150 adjust_context_and_scope here.
2151 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
2152 (expand_omp_taskreg, expand_omp_target): Likewise. Call
2153 adjust_context_and_scope.
2154 * dwarf2out.c (dwarf2out_early_global_decl): For
2155 decl_function_context recurse instead of calling dwarf2out_decl.
2157 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
2159 PR rtl-optimization/85925
2160 * rtl.h (word_register_operation_p): New predicate.
2161 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
2162 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
2163 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
2164 (num_sign_bit_copies1): Likewise.
2166 2018-11-19 Richard Biener <rguenther@suse.de>
2169 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
2172 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
2174 * compare-elim.c (struct comparison): Add not_in_a field.
2175 (is_not): New static function.
2176 (strip_not): Likewise.
2177 (conforming_compare): Handle a NOT in the first operand.
2178 (can_eliminate_compare): Likewise.
2179 (find_comparison_dom_walker::before_dom_children): Likewise.
2180 (try_eliminate_compare): Likewise.
2181 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
2182 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
2184 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
2186 * doc/extend.texi (Common Type Attributes): Fix typos.
2188 2018-11-19 Martin Liska <mliska@suse.cz>
2190 PR gcov-profile/88045
2191 * coverage.c (coverage_begin_function): Add assert.
2193 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
2196 * doc/extend.texi (Common Function Attributes): Document that
2197 no_instrument_function applies to -p and -pg, too.
2198 * doc/invoke.texi (Instrumentation Options): Add cross-references
2199 to docs for -p, -pg, and -finstrument-functions.
2201 2018-11-18 Alan Modra <amodra@gmail.com>
2203 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
2204 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
2205 (GNU_USER_TARGET_CRTN): Define.
2206 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
2207 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
2209 2018-11-18 Alan Modra <amodra@gmail.com>
2211 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
2212 !HAVE_LD_PIE variant.
2213 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
2215 2018-11-17 Nick Clifton <nickc@redhat.com>
2216 Sandra Loosemore <sandra@codesourcery.com>
2219 * doc/invoke.texi (Overall Options): Document that --help and
2220 --help=<value> options cannot be combined.
2222 2018-11-17 Jim Wilson <jimw@sifive.com>
2224 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
2225 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
2226 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
2227 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
2228 to step2 if frame_pointer_needed and step1 is 0.
2230 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
2233 * doc/cpp.texi (System Headers): Add note about implicit
2234 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
2236 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
2239 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
2240 -fno-implicit-templates.
2242 2018-11-17 Jakub Jelinek <jakub@redhat.com>
2244 PR tree-optimization/87546
2245 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
2246 min_precision variable, initially set it to orig_precision, only does
2247 something if op_type's precision is <= min_precision and update
2248 min_precision whenever calling set_op.
2250 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
2253 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
2255 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
2257 * doc/invoke.texi (Option Summary): Fix whitespace and line
2258 breaks in @gccoptlist environments.
2259 (Warning Options): Likewise.
2260 (Optimize Options): Likewise.
2261 (PowerPC SPE Options): Likewise.
2262 (RS/6000 and PowerPC Options): Likewise.
2264 2018-11-16 Jeff Law <law@redhat.com>
2266 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
2269 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
2272 * doc/invoke.texi (Optimize Options): Update options enabled by
2273 fprofile-generate, -fprofile-use, and -fauto-profile.
2275 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2278 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
2279 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
2280 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
2282 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
2283 * targhooks.c (default_print_patchable_function_entry): Assert
2284 asm_int_op does not return a NULL string.
2285 * varasm.c (integer_asm_op): Return the op for a partial int type
2286 when the requested size does not correspond to an integer type.
2287 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
2288 * doc/tm.texi: Regenerate.
2290 2018-11-12 Jason Merrill <jason@redhat.com>
2292 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
2294 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
2296 * config/rs6000/constraints.md (wF constraint): Remove power9
2297 fusion documentation. Just document wF's use for power8 fusion.
2298 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
2299 (fusion_gpr_addis): Delete power9 fusion support. Change power8
2300 fusion support to require the upper 12 bits to be all 0's or all
2302 (fusion_gpr_mem_load): Add comment.
2303 (fusion_addis_mem_combo_load): Remove power9 fusion support.
2304 (fusion_addis_mem_combo_store): Delete.
2305 (fusion_offsettable_mem_operand): Delete.
2306 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
2308 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
2309 (POWERPC_MASKS): Delete power9 fusion.
2310 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
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.c (rs6000_debug_reg_global): Delete power9
2318 (rs6000_option_override_internal): Set power8 fusion based on
2319 whether we are tuning for power8. Delete power9 fusion support.
2320 (rs6000_opt_masks): Delete -mpower9-fusion switch.
2321 (emit_fusion_load): Rename emit_fusion_load_store to
2322 emit_fusion_load, and drop fusion store support. Update callers.
2323 (emit_fusion_load_store): Likewise.
2324 (emit_fusion_gpr_load): Likewise.
2325 (fusion_p9_p): Delete.
2326 (expand_fusion_p9_load): Delete.
2327 (expand_fusion_p9_store): Delete.
2328 (emit_fusion_p9_load): Delete.
2329 (emit_fusion_p9_store): Delete.
2330 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
2331 (GPR_FUSION): Delete.
2332 (FPR_FUSION): Delete.
2333 (power9 fusion peephole2s): Delete.
2334 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
2335 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
2336 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
2337 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
2338 (fusion_p9_<mode>_constant): Delete.
2339 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
2340 power9 fusion switch.
2341 * doc/md.texi (PowerPC constraints): Update wF constraint
2342 documentation for power8 fusion only.
2344 2018-11-16 Jakub Jelinek <jakub@redhat.com>
2346 PR rtl-optimization/87475
2347 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
2348 CROSSING_JUMP_P insns.
2349 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
2351 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
2354 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
2355 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
2356 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2358 2018-11-16 Jakub Jelinek <jakub@redhat.com>
2361 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
2362 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
2364 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
2366 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
2367 location_t parameter.
2368 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2369 (switch_decision_tree::do_jump_if_equal): Likewise.
2370 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
2371 of switch statement to emit_case_nodes.
2372 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
2373 set it on the newly built GIMPLE comparison statement.
2374 (switch_decision_tree::do_jump_if_equal): Likewise.
2375 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
2376 in calls to do_jump_if_equal as well as recursive calls.
2378 2018-11-16 Andi Kleen <ak@linux.intel.com>
2380 * config/i386/i386.md: Allow memory operands to ptwrite.
2382 2018-11-16 Michael Matz <matz@suse.de>
2384 * system.h (PRsa): New macro.
2385 (SIZE_AMOUNT): Cast number to uint64_t.
2386 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
2387 (pool_usage::dump_footer): Likewise and also use PRIu64.
2388 * bitmap.h (bitmap_usage::dump): Likewise.
2389 * ggc-common.c (ggc_usage::dump): Likewise.
2390 * ggc-page.c (ggc_print_statistics): Likewise.
2391 * input.c (dump_line_table_statistics): Likewise.
2392 * mem-stats.h (mem_usage::dump): Likewise.
2393 (mem_usage::dump_footer): Likewise.
2394 * rtl.c (dump_rtx_statistics): Likewise.
2395 * tree-cfg.c (dump_cfg_stats): Likewise.
2396 * tree-dfa.c (dump_dfa_stats): Likewise.
2397 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2398 * tree-ssanames (ssanames_print_statistics): Likewise.
2399 * vec.c (vec_usage::dump): Likewise.
2400 (vec_usage::dump_footer): Likewise.
2402 2018-11-16 Richard Biener <rguenther@suse.de>
2404 PR tree-optimization/88011
2405 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
2406 replacing set_value_range_to_undefined and
2407 set_value_range_to_varying with method calls.
2409 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
2411 * config/s390/s390.md
2412 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
2414 (*r<noxa>sbg_<mode>_sll): Likewise.
2415 (*r<noxa>sbg_<mode>_srl): Likewise.
2416 (*r<noxa>sbg_sidi_srl): New pattern.
2418 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
2420 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
2421 Default to TARGET_VXWORKS_RTP.
2422 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2423 of TARGET_VXWORKS_RTP.
2424 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
2425 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2426 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
2428 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
2431 * doc/extend.texi (Common Type Attributes): Make it explicit
2432 that attribute "packed" can apply to C++ classes.
2434 2018-11-15 Martin Sebor <msebor@redhat.com>
2438 * tree.c (type_argument_type): New function.
2439 * tree.h (type_argument_type): Declare it.
2440 * gcc/doc/extend.texi (alloc_align): Update and clarify.
2441 (alloc_size, nonnull, sentinel): Same.
2443 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
2444 Kwok Cheung Yeung <kcy@codesourcery.com>
2446 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
2447 int_mode_for_size fails.
2448 (vectorizable_load): Likewise.
2450 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2452 * doc/ux.texi (Group logically-related diagnostics): Move
2453 discussion of auto_diagnostic_group into this new subsection.
2454 Give an example of where this grouping is used.
2456 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2459 * Makefile.in (OBJS): Move json.o to...
2460 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
2461 * common.opt (fdiagnostics-format=): New option.
2462 (diagnostics_output_format): New enum.
2463 * diagnostic-format-json.cc: New file.
2464 * diagnostic.c (default_diagnostic_final_cb): New function, taken
2465 from start of diagnostic_finish.
2466 (diagnostic_initialize): Initialize final_cb to
2467 default_diagnostic_final_cb.
2468 (diagnostic_finish): Move "being treated as errors" messages to
2469 default_diagnostic_final_cb. Call any final_cb.
2470 (default_diagnostic_finalizer): Add diagnostic_t param.
2471 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
2472 diagnostic_finalizer callback.
2473 * diagnostic.h (enum diagnostics_output_format): New enum.
2474 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
2475 (struct diagnostic_context): Add "final_cb".
2476 (default_diagnostic_finalizer): Add diagnostic_t param.
2477 (diagnostic_output_format_init): New decl.
2478 * doc/invoke.texi (-fdiagnostics-format): New option.
2479 * dwarf2out.c (gen_producer_string): Ignore
2480 OPT_fdiagnostics_format_.
2481 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
2482 * lto-wrapper.c (append_diag_options): Ignore it.
2483 * opts.c (common_handle_option): Handle it.
2485 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2487 PR tree-optimization/88015
2488 * graphite-isl-ast-to-gimple.c
2489 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
2491 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
2493 2018-11-15 Richard Biener <rguenther@suse.de>
2496 * gimple.c (gimple_call_flags): Union flags from decl, type
2498 * trans-mem.c (is_tm_pure_call): Simplify.
2500 2018-11-15 Richard Biener <rguenther@suse.de>
2502 PR tree-optimization/88031
2503 * tree-vect-loop.c (vectorizable_reduction): Move check
2504 for multiple types earlier so we get the expected dump.
2505 Simplify calls to vectorizable_condition.
2506 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
2507 * tree-vect-stmts.c (vectorizable_condition): Instead of
2508 reduc_def and reduc_index take just a flag. Simplify
2509 code-generation now that we can rely on the defs being set up.
2510 (vectorizable_comparison): Remove unused argument.
2512 2018-11-15 Richard Biener <rguenther@suse.de>
2514 PR tree-optimization/88030
2515 * tree-complex.c (need_eh_cleanup): New global.
2516 (update_complex_assignment): Mark blocks that need EH update.
2517 (expand_complex_comparison): Likewise.
2518 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
2519 perform EH cleanup and schedule CFG cleanup if that did anything.
2521 2018-11-15 Jakub Jelinek <jakub@redhat.com>
2523 PR rtl-optimization/88018
2524 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
2525 on the presence of fallthru edge, rather than if it is a USE or not.
2527 2018-11-15 Richard Biener <rguenther@suse.de>
2530 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
2531 analyze_subscript_affine_affine properly.
2533 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
2535 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
2536 (GLIBC_DYNAMIC_LINKER): Define.
2537 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
2539 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
2541 PR tree-optimization/84648
2542 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
2543 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
2544 by calling adjust_cond_for_loop_until_wrap.
2546 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
2549 * doc/extend.texi (Common Function Attributes): Clarify linker
2550 restrictions on "aligned" attribute.
2551 (Common Variable Attributes): Likewise. Mention that linker
2552 restrictions don't apply to stack-allocated variables.
2554 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
2556 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
2559 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
2563 * doc/invoke.texi (Optimize Options): Remove bad example about
2564 interaction between -flto and -O. Replace it with a note that
2565 you need to compile with -O and not just link. Copy-edit -flto
2566 discussion to reduce verbiage and improve flow.
2568 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
2571 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
2572 also suppress many optimizations. Alphabetize option lists for
2573 -O1, -O2, and -Os. Add list of options disabled with -Og, and
2574 correct documentation for those options to say that.
2575 * opts.c (default_options_table): Sort table by level and option
2576 name, to make it easier to correlate to the manual.
2578 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
2580 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
2581 printing of the names of segment registers.
2583 2018-11-14 Nathan Sidwell <nathan@acm.org>
2587 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
2590 2018-11-14 David Malcolm <dmalcolm@redhat.com>
2592 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
2594 2018-11-14 Jakub Jelinek <jakub@redhat.com>
2596 P1236R1 - Signed integers are two's complement
2597 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
2600 * hash-map.h (hash_map::iterator::reference_pair): New class.
2601 (hash_map::iterator::operator*): Return it rather than std::pair.
2603 2018-11-14 Jeff Law <law@redhat.com>
2605 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
2606 iff the operand is a constant.
2608 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
2610 * gimple-ssa-evrp-analyze.c
2611 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
2612 ignore_equivs_equal_p to equal_p.
2613 * ipa-cp.c (meet_with_1): Use equal_p instead of
2614 ignore_equivs_equal_p.
2615 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
2616 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
2617 (value_range::operator==): Remove.
2618 (value_range::operator!=): Remove.
2619 (vrp_prop::visit_stmt): Use equal_p.
2620 * tree-vrp.h (value_range): Remove operator==, operator!=,
2621 ignore_equivs_equal_p.
2622 * vr-values.c (update_value_range): Use equal_p.
2624 2018-11-14 Michael Matz <matz@suse.de>
2627 * gimplify.c (collect_fallthrough_labels): Add new argument,
2628 return location via that, don't modify statements.
2629 (warn_implicit_fallthrough_r): Adjust call, don't use
2630 statement location directly.
2632 2018-11-14 Richard Biener <rguenther@suse.de>
2635 * tree-data-ref.c (split_constant_offset): Add wrapper
2636 allocating a cache hash-map.
2637 (split_constant_offset_1): Cache results of expanding
2638 expressions from SSA def stmts.
2640 2018-11-14 Richard Biener <rguenther@suse.de>
2643 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
2645 (lambda_vector_mult_const): Likewise.
2646 (lambda_matrix_right_hermite): Use lambda_int temporaries.
2648 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
2649 Jackson Woodruff <jackson.woodruff@arm.com>
2651 PR 71026/tree-optimization
2652 * match.pd: Simplify floating point comparisons.
2654 2018-11-14 Jakub Jelinek <jakub@redhat.com>
2656 PR rtl-optimization/87817
2657 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
2658 last argument has low 8 bits clear, fold to 0.
2660 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
2662 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
2663 MAX_OFILE_ALIGNMENT as needed.
2665 2018-11-14 Richard Biener <rguenther@suse.de>
2667 PR tree-optimization/88019
2668 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
2669 COND_EXPR arguments to non-trapping overflow.
2671 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2673 * config/arc/arc.h (reg_class): Reorder registers classes, remove
2674 unused register classes.
2675 (REG_CLASS_NAMES): Likewise.
2676 (REG_CLASS_CONTENTS): Likewise.
2677 (FIXED_REGISTERS): Make lp_count fixed.
2678 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
2679 (PROGRAM_COUNTER_REGNO): Remove.
2680 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
2681 register classes, use constants for register numbers, remove
2682 reg_class_contents references.
2683 (arc_process_double_reg_moves): Add asserts.
2684 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
2685 lra_in_progress predicate.
2686 (arc_init_reg_tables): Remove unused register classes.
2687 (arc_register_move_cost): Likewise.
2688 (arc_preferred_reload_class): Likewise.
2689 (hwloop_optimize): Update rtx patterns involving lp_count register.
2690 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
2691 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
2692 CHEAP_CORE_REGS. Former one will be used for LRA.
2693 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
2694 one will be used for LRA.
2695 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
2696 one will be used for LRA.
2697 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
2698 Former one will be used for LRA.
2699 ("f"): Delete constraint.
2702 ("l"): Change it from register constraint to constraint.
2703 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
2704 (movhi_insn): Likewise.
2705 (movsi_insn): Update pattern.
2708 (stack_tie): Remove 'b' constraint letter.
2710 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
2711 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
2712 (R57_REG, R59_REG, PCL_REG): Likewise.
2713 (ILINK1_REGNUM): Renamed to ILINK1_REG.
2714 (ILINK2_REGNUM): Renamed to ILINK2_REG.
2716 (SP_REGS): Likewise.
2717 (Rcw): Remove unused reg classes.
2718 * config/arc/predicates.md (dest_reg_operand): Just default on
2719 register_operand predicate.
2720 (mpy_dest_reg_operand): Likewise.
2721 (move_dest_operand): Use macros instead of constants.
2722 * config/arc/arc.opt (mlra): Switch to lra as default.
2724 2018-11-14 Richard Biener <rguenther@suse.de>
2726 PR tree-optimization/87974
2727 * tree-vect-loop.c (vectorizable_reduction): When computing
2728 the vectorized reduction PHI vector type ignore constant
2731 2018-11-14 Jakub Jelinek <jakub@redhat.com>
2733 PR tree-optimization/87977
2734 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
2735 stmt, build a new one and replace the old one with it. Formatting fix.
2736 Call release_ssa_name (x) if !has_other_use and !delete_div.
2737 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
2738 verify lhs of stmt is still def.
2740 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
2742 PR rtl-optimization/87507
2743 * lower-subreg.c (operand_for_swap_move_operator): New function.
2744 (simple_move): Strip simple operators.
2745 (find_pseudo_copy): Likewise.
2746 (resolve_operand_for_swap_move_operator): New function.
2747 (resolve_simple_move): Strip simple operators and swap operands.
2749 2018-11-13 Jakub Jelinek <jakub@redhat.com>
2751 PR tree-optimization/87898
2752 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
2753 (ipa_simd_modify_function_body): Remove debug stmts where the first
2754 argument was changed into a non-decl.
2756 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
2758 PR rtl-optimization/87899
2759 * lra-lives.c (start_living): Update white space in comment.
2760 (enum point_type): New.
2761 (sparseset_contains_pseudos_p): New function.
2762 (update_pseudo_point): Likewise.
2763 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
2764 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
2765 handling. Move early exit after adding conflicts.
2766 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
2767 if regno is already live. Remove all handling of program points.
2768 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
2769 after adding conflicts. Remove all handling of program points and
2770 ignore_reg_for_conflicts.
2771 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
2772 and do not guard call to mark_pseudo_live.
2773 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
2774 and do not guard call to mark_pseudo_dead.
2775 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
2776 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
2777 Use new function update_pseudo_point. Handle register copies by
2778 removing the source register from the live set. Handle INOUT operands.
2779 Update to the next program point using the unused_set, dead_set and
2781 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
2783 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2785 * builtins.c: Replace "source_location" with "location_t".
2786 * diagnostic-show-locus.c: Likewise.
2787 * diagnostic.c: Likewise.
2788 * dumpfile.c: Likewise.
2789 * gcc-rich-location.h: Likewise.
2790 * genmatch.c: Likewise.
2791 * gimple.h: Likewise.
2792 * gimplify.c: Likewise.
2793 * input.c: Likewise.
2794 * input.h: Likewise. Eliminate the typedef.
2795 * omp-expand.c: Likewise.
2796 * selftest.h: Likewise.
2797 * substring-locations.h (get_source_location_for_substring):
2799 (get_location_within_string): ...this.
2800 * tree-cfg.c: Replace "source_location" with "location_t".
2801 * tree-cfgcleanup.c: Likewise.
2802 * tree-diagnostic.c: Likewise.
2803 * tree-into-ssa.c: Likewise.
2804 * tree-outof-ssa.c: Likewise.
2805 * tree-parloops.c: Likewise.
2806 * tree-phinodes.c: Likewise.
2807 * tree-phinodes.h: Likewise.
2808 * tree-ssa-loop-ivopts.c: Likewise.
2809 * tree-ssa-loop-manip.c: Likewise.
2810 * tree-ssa-phiopt.c: Likewise.
2811 * tree-ssa-phiprop.c: Likewise.
2812 * tree-ssa-threadupdate.c: Likewise.
2813 * tree-ssa.c: Likewise.
2814 * tree-ssa.h: Likewise.
2815 * tree-vect-loop-manip.c: Likewise.
2817 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2819 * doc/extend.texi: Fix typo in the weakref description.
2821 2018-11-13 Richard Biener <rguenther@suse.de>
2823 PR tree-optimization/86991
2824 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
2825 group building until we have successfully detected the SLP
2827 (vect_is_simple_reduction): Remove fixup code here.
2829 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2831 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
2832 (dump_gimple_stmt): Use it.
2833 (dump_gimple_stmt_loc): Likewise.
2834 (dump_gimple_expr): Likewise.
2835 (dump_gimple_expr_loc): Likewise.
2836 (dump_generic_expr): Likewise.
2837 (dump_generic_expr_loc): Likewise.
2838 (dump_printf): Likewise.
2839 (dump_printf_loc): Likewise.
2840 (dump_dec): Likewise.
2841 (dump_dec): Likewise.
2842 (dump_hex): Likewise.
2843 (dump_symtab_node): Likewise.
2844 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
2845 Guard dump call with dump_enabled_p.
2846 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
2847 * graphite-optimize-isl.c (optimize_isl): Likewise.
2848 * graphite.c (graphite_transform_loops): Likewise.
2849 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
2850 * tree-parloops.c (parallelize_loops): Likewise.
2851 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
2852 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
2853 (vect_prune_runtime_alias_test_list): Likewise.
2854 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
2855 (vect_estimate_min_profitable_iters): Likewise.
2856 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
2857 (vect_build_slp_tree_2): Likewise.
2858 (vect_supported_load_permutation_p): Likewise.
2859 (vect_slp_analyze_operations): Likewise.
2860 (vect_slp_analyze_bb_1): Likewise.
2861 (vect_slp_bb): Likewise.
2862 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
2863 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
2864 (pass_slp_vectorize::execute): Likewise.
2865 (increase_alignment): Likewise.
2867 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2870 * ipa-inline.c (report_inline_failed_reason): Guard calls to
2871 cl_target_option_print_diff and cl_optimization_print_diff with
2874 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2876 * doc/invoke.texi (-fsave-optimization-record): Note that the
2877 output is compressed.
2878 * optinfo-emit-json.cc: Include <zlib.h>.
2879 (optrecord_json_writer::write): Compress the output.
2881 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
2883 * tree-vrp.c (value_range_base::dump): Dump type.
2884 Do not use INF nomenclature for 1-bit types.
2885 (dump_value_range): Group all variants to common dumping code.
2886 (debug): New overloaded functions for value_ranges.
2887 (value_range_base::dump): Remove no argument version.
2888 (value_range::dump): Same.
2890 2018-11-13 Richard Biener <rguenther@suse.de>
2892 PR tree-optimization/87931
2893 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
2894 nested cycles we support to latch computations vectorizable_reduction
2897 2018-11-13 Martin Liska <mliska@suse.cz>
2899 PR tree-optimization/87885
2900 * cfghooks.c (account_profile_record): Rename
2902 (profile_record_check_consistency): ... this.
2903 Calculate missing num_mismatched_freq_in.
2904 (profile_record_account_profile): New function
2905 that calculates time and size of a function.
2906 * cfghooks.h (struct profile_record): Remove
2908 (struct cfg_hooks): Remove after_pass flag.
2909 (account_profile_record): Rename to ...
2910 (profile_record_check_consistency): ... this.
2911 (profile_record_account_profile): New.
2912 * cfgrtl.c (rtl_account_profile_record): Remove
2914 * passes.c (check_profile_consistency): Do only
2916 (account_profile): Calculate size and time of
2918 (pass_manager::dump_profile_report): Reformat
2920 (execute_one_ipa_transform_pass): Call
2921 consistency check before clean upand call account_profile
2922 after a clean up is done.
2923 (execute_one_pass): Call check_profile_consistency and
2924 account_profile instead of using after_pass flag..
2925 * tree-cfg.c (gimple_account_profile_record): Likewise.
2927 2018-11-13 Martin Liska <mliska@suse.cz>
2930 * config/i386/i386.c (ix86_option_override_internal): Error
2931 about usage -mabi=ms and -fsanitize={,kernel-}address.
2933 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
2935 * config/aarch64/aarch64.c
2936 (aarch64_vectorize_preferred_vector_alignment): Change return type to
2938 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
2939 alignment being a poly int.
2940 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
2941 return type to poly_uint64.
2942 * target.def (default_preferred_vector_alignment): Likewise.
2943 * targhooks.c (default_preferred_vector_alignment): Likewise.
2944 * targhooks.h (default_preferred_vector_alignment): Likewise.
2945 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
2946 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
2948 (vect_update_misalignment_for_peel): Likewise.
2949 (vect_enhance_data_refs_alignment): Likewise.
2950 (vect_find_same_alignment_drs): Likewise.
2951 (vect_duplicate_ssa_name_ptr_info): Likewise.
2952 (vect_setup_realignment): Likewise.
2953 (vect_can_force_dr_alignment_p): Change alignment parameter type to
2955 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
2956 mask with a compile time variable vector alignment.
2957 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
2959 (vect_do_peeling): Exit early if vector alignment is not constant.
2960 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
2962 (vectorizable_store): Likewise.
2963 (vectorizable_load): Likweise.
2964 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
2966 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
2968 (vect_can_force_dr_alignment_p): Change alignment parameter type to
2971 2018-11-13 Richard Biener <rguenther@suse.de>
2973 PR tree-optimization/87962
2974 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
2975 detect outer reduction for disqualifying in-loop uses.
2977 2018-11-13 Richard Biener <rguenther@suse.de>
2979 PR tree-optimization/87967
2980 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
2981 for constants for the scalar loop.
2983 2018-11-13 Alan Modra <amodra@gmail.com>
2985 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
2986 integer constants when -mcmodel=medium.
2988 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2990 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2991 * config/arc/elf.h (PROFILE_HOOK): Define.
2992 * config/arc/linux.h (PROFILE_HOOK): Likewise.
2994 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2996 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2997 jump table data in the text section.
2999 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
3001 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
3002 to fit the eh_return pattern.
3003 * config/arc/arc.md (eh_return): Define.
3004 (VUNSPEC_ARC_EH_RETURN): Likewise.
3005 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
3007 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
3010 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
3012 * common/config/arc/arc-common.c (arc_option_optimization_table):
3013 Millicode optimization is default on for size optimizations.
3014 * config/arc/arc-protos.h (arc_check_multi): New function.
3015 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
3016 (ENTER_LEAVE_START_REG): Define.
3017 (ENTER_LEAVE_END_REG): Likewise.
3018 (arc_override_options): Disable millicode when long calls option
3020 (arc_frame_info): Change it from int to bool.
3021 (arc_compute_frame_size): Clean up.
3022 (arc_save_restore): Remove.
3023 (frame_save_reg): New function.
3024 (frame_restore_reg): Likewise.
3025 (arc_enter_leave_p): Likewise.
3026 (arc_save_callee_saves): Likewise.
3027 (arc_restore_callee_saves): Likewise.
3028 (arc_save_callee_enter): Likewise.
3029 (arc_restore_callee_leave): Likewise.
3030 (arc_save_callee_milli): Likewise.
3031 (arc_restore_callee_milli): Likewise.
3032 (arc_expand_prologue): Reimplement to emit enter/leave
3034 (arc_expand_epilogue): Likewise.
3035 (arc_check_multi): New function.
3036 * config/arc/arc.md (push_multi_fp): New pattern.
3037 (push_multi_fp_blink): Likewise.
3038 (pop_multi_fp): Likewise.
3039 (pop_multi_fp_blink): Likewise.
3040 (pop_multi_fp_ret): Likewise.
3041 (pop_multi_fp_blink_ret): Likewise.
3042 * config/arc/arc.opt (mmillicode): Update option.
3043 (mcode-density-frame): New option.
3044 * config/arc/predicates.md (push_multi_operand): New predicate.
3045 (pop_multi_operand): Likewise.
3046 * doc/invoke.texi (ARC): Update ARC options information.
3049 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
3051 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
3052 * config/arc/arc.c (operands_ok_ldd_std): New function.
3053 (mem_ok_for_ldd_std): Likewise.
3054 (gen_operands_ldd_std): Likewise.
3055 * config/arc/arc.md: Add peephole2 rules for std/ldd.
3057 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
3059 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
3060 test on stack_usage_file.
3061 (lang_dependent_init): Do not open the .su file if generating LTO.
3063 2018-11-13 Jakub Jelinek <jakub@redhat.com>
3065 PR rtl-optimization/87918
3066 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
3067 simplify_gen_relational rather than simplify_gen_binary.
3069 2018-11-13 Richard Biener <rguenther@suse.de>
3071 * tree-ssanames.h (set_range_info): Use value_range_base.
3072 (get_range_info): Likewise.
3073 * tree-ssanames.c (set_range_info): Likewise.
3074 (get_range_info): Likewise.
3075 * tree-vrp.c (value_range_base::union_helper): Split
3076 out common parts of value_range[_base]::union_.
3077 (value_range_base::union_): Update.
3078 (value_range::union_): Likewise.
3079 (determine_value_range_1): Use value_range_base.
3080 (determine_value_range): Likewise.
3081 * tree-vrp.h (value_range_base::union_helper): Move ...
3082 (value_range::union_helper): ... from here.
3084 2018-11-13 Alan Modra <amodra@gmail.com>
3086 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
3088 (rs6000_secondary_reload_gpr): Don't call find_replacement.
3090 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
3093 * doc/invoke.texi (Optimize Options): Clarify that the
3094 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
3095 apply to data cache size.
3097 2018-11-13 Alan Modra <amodra@gmail.com>
3099 * config/rs6000/predicates.md (logical_const_operand),
3100 (logical_operand): Correct comment.
3101 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
3103 2018-11-13 Alan Modra <amodra@gmail.com>
3105 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
3107 2018-11-13 Alan Modra <amodra@gmail.com>
3109 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
3111 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
3112 covered by alternative.
3113 (movcc_internal1): Ignore h for register preference.
3114 (mov<mode>_hardfloat64): Likewise.
3115 (mov<mode>_softfloat): Ignore c, l, h for register preference.
3117 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
3119 PR preprocessor/47823
3120 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
3123 * doc/extend.texi (Pragmas): Note additional pragmas documented
3126 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
3130 * tree-scalar-evolution.c (expression_expensive_p): Make
3131 BUILTIN POPCOUNT as expensive when backend does not define it.
3133 2018-11-12 Fredrik Noring <noring@nocrew.org>
3135 * config.gcc: Update with-llsc defaults for MIPS r5900.
3137 2018-11-12 Martin Liska <mliska@suse.cz>
3139 PR gcov-profile/87442
3140 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
3142 * doc/invoke.texi: Document them.
3143 * tree-profile.c (parse_profile_filter): New.
3144 (parse_profile_file_filtering): Likewise.
3145 (release_profile_file_filtering): Likewise.
3146 (include_source_file_for_profile): Likewise.
3147 (tree_profiling): Filter source files based on the
3148 newly added options.
3150 2018-11-12 Martin Liska <mliska@suse.cz>
3153 * doc/extend.texi: Add missing values for __builtin_cpu_is and
3154 __builtin_cpu_supports for x86 target.
3156 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
3159 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
3161 (Arithmetic): Likewise for "lo_sum".
3163 2018-11-12 Renlin Li <renlin.li@arm.com>
3166 * dse.c (get_stored_val): Add check for compile-time constantness
3169 2018-11-12 Sudakshina Das <sudi.das@arm.com>
3171 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
3172 (ARMv8_5a): New fgroup.
3173 (armv8.5-a): New arch.
3174 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
3176 * config/arm/arm-tables.opt: Regenerate.
3177 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
3178 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
3179 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
3180 Add matching rules for -march=armv8.5-a and extensions.
3181 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
3182 Add sb and predres to all armv8-a except armv8.5-a.
3184 2018-11-12 Richard Biener <rguenther@suse.de>
3186 * tree-vrp.h (value_range[_base]::set): Make public. Provide
3187 overload for single value.
3188 (value_range[_base]::set_nonnull): New.
3189 (value_range[_base]::set_null): Likewise.
3190 (value_range): Document bitmap copying behavior, mark
3191 copy constructor and assignment operator deleted.
3192 (value_range::move): New.
3193 (value_range::set_and_canonicalize): Default bitmap to zero.
3194 (set_value_range_to_nonnull): Remove.
3195 (set_value_range_to_null): Likewise.
3196 (set_value_range): Likewise.
3197 (set_value_range_to_value): Likewise.
3198 (extract_range_from_unary_expr): Work on value_range_base.
3199 (extract_range_from_binary_expr_1): Likewise. Rename to...
3200 (extract_range_from_binary_expr): ... this.
3201 * tree-vrp.c (value_range::update): Clear equiv bitmap
3203 (value_range::move): New, move equiv bitmap.
3204 (value_range_base::set_undefined): Avoid assignment.
3205 (value_range::set_undefined): Likewise.
3206 (value_range_base::set_varying): Likewise.
3207 (value_range::set_varying): Likewise.
3208 (set_value_range): Remove.
3209 (value_range_base::set): New overload for value.
3210 (value_range::set): Likewise.
3211 (set_value_range_to_nonnull): Remove.
3212 (value_range_base::set_nonnull): New.
3213 (value_range::set_nonnull): Likewise.
3214 (set_value_range_to_null): Remove.
3215 (value_range_base::set_null): New.
3216 (value_range::set_null): Likewise.
3217 (range_is_null): Work on value_range_base.
3218 (range_is_nonnull): Likewise.
3219 (ranges_from_anti_range): Likewise.
3220 (extract_range_into_wide_ints): Likewise.
3221 (extract_range_from_multiplicative_op): Likewise.
3222 (extract_range_from_binary_expr): Likewise. Update for API changes.
3223 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
3225 (value_range::intersect_helper): Avoid copy and assignment.
3226 (value_range::union_helper): Likewise.
3227 (determine_value_range_1): Adjust.
3228 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
3229 Avoid assignment by using move.
3230 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
3231 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3233 * tree-ssanames.c (get_range_info): Likewise.
3234 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
3235 * vr-values.c (vr_values::get_value_range): Adjust.
3236 (vr_values::update_value_range): Likewise.
3237 (symbolic_range_based_on_p): Work on value_range_base.
3238 (vr_values::extract_range_from_binary_expr): Use value_range_base.
3239 (vr_values::extract_range_from_unary_expr): Likewise.
3240 (vr_values::extract_range_from_cond_expr): Avoid assignment.
3241 (vr_values::extract_range_from_comparison): Adjust.
3242 (vr_values::check_for_binary_op_overflow): Use value_range_base.
3243 (vr_values::extract_range_basic): Adjust.
3244 (vr_values::adjust_range_with_scev): Likewise.
3245 (vr_values::vrp_visit_assignment_or_call): Likewise.
3246 (vr_values::get_vr_for_comparison): Change API to avoid
3247 assignment and copy construction.
3248 (vr_values::compare_name_with_value): Adjust accordingly.
3249 (vr_values::compare_names): Likewise.
3250 (vr_values::extract_range_from_phi_node): Avoid assignment and
3251 bogus in-place modify of equiv bitmap.
3252 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
3253 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
3254 for extract_range_from_unary_expr API change.
3255 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
3257 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
3259 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
3261 2018-11-12 Richard Biener <rguenther@suse.de>
3263 * tree-vrp.h (value_range_base::symbolic_p,
3264 value_range_base::constant_p, value_range_base::zero_p,
3265 value_range_base::singleton_p): Move from value_range.
3266 (value_range::dump): Add.
3267 * gimple-ssa-evrp-analyze.c
3268 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
3269 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
3270 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3272 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
3273 (value_range::constant_p): Likewise.
3274 (value_range::singleton_p): Likewise.
3275 (value_range_base::dump): Add.
3276 (set_value_range_to_undefined): Remove.
3277 (set_value_range_to_varying): Likewise.
3278 (range_int_cst_p): Take value_range_base argument.
3279 (range_int_cst_singleton_p): Likewise.
3280 (value_range_constant_singleton): Likewise.
3281 (vrp_set_zero_nonzero_bits): Likewise.
3282 (extract_range_from_multiplicative_op): Use set_varying.
3283 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
3284 (extract_range_from_unary_expr): Likewise.
3285 (dump_value_range_base): Change to overload of dump_value_range.
3286 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
3287 (vrp_prop::visit_stmt): Likewise.
3288 (value_range::intersect_helper): Likewise.
3289 (value_range::union_helper): Likewise.
3290 (determine_value_range_1): Likewise.
3292 2018-11-12 Richard Biener <rguenther@suse.de>
3294 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
3295 (set_value_range_to_null): Likewise.
3296 * vr-values.c (vr_values::extract_range_from_comparison):
3297 Clear equiv for constant singleton ranges.
3299 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
3301 * config/i386/sse.md: Combine VFIXUPIMM* patterns
3302 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3303 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3304 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
3305 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3306 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3307 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
3309 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
3312 * doc/extend.texi (Common Type Attributes): For the align type
3313 attribute, copy language about decreasing alignment from the
3314 corresponding variable attribute.
3316 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
3318 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
3321 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
3324 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
3325 -frtti and -fno-rtti code.
3327 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
3330 * doc/extend.texi (Other Builtins): Document probability associated
3331 with __builtin_expect.
3333 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
3336 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
3337 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
3338 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
3339 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
3341 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
3343 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
3345 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
3347 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
3349 2018-11-11 Richard Biener <rguenther@suse.de>
3351 * tree-vrp.h (class value_range_base): New base class for
3352 value_range containing all but the m_equiv member.
3353 (dump_value_range_base): Add.
3354 (range_includes_zero_p): Work on value_range_base.
3355 * tree-vrp.c (value_range_base::set): Split out base handling
3357 (value_range::set): this.
3358 (value_range::set_equiv): New.
3359 (value_range_base::value_range_base): New constructors.
3360 (value_range_base::check): Split out base handling from...
3361 (value_range::check): this.
3362 (value_range::equal_p): Refactor in terms of
3363 ignore_equivs_equal_p which is now member of the base.
3364 (value_range_base::set_undefined): New.
3365 (value_range_base::set_varying): Likewise.
3366 (value_range_base::dump):Split out base handling from...
3367 (value_range::dump): this.
3368 (value_range_base::set_and_canonicalize): Split out base handling
3370 (value_range::set_and_canonicalize): this.
3371 (value_range_base::union_): New.
3372 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
3374 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
3375 instead of value_range everywhere.
3376 (ipcp_vr_lattice::print): Use dump_value_range_base.
3377 (ipcp_vr_lattice::meet_with): Adjust.
3378 (ipcp_vr_lattice::meet_with_1): Likewise.
3379 (ipa_vr_operation_and_type_effects): Likewise.
3380 (propagate_vr_across_jump_function): Likewise.
3381 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
3382 (ipa_get_value_range): Likewise.
3383 (ipa_set_jfunc_vr): Likewise.
3384 (ipa_compute_jump_functions_for_edge): Likewise.
3386 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
3389 * doc/invoke.texi (Optimize Options): Add @opindex entries
3390 for the positive forms of -fno-xxx and -mno-xxx options
3391 that were lacking them.
3393 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
3395 * combine.c (make_more_copies): Only make an intermediate copy if the
3396 dest of a move is a pseudo.
3398 2018-11-09 Maya Rashish <coypu@sdf.org>
3401 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
3402 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
3404 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
3408 * doc/invoke.texi (Optimize Options): Clarify default behavior
3409 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
3411 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
3413 PR tree-optimization/87940
3414 * expr.c (string_constant): Don't strip NOPS in subexpressions.
3415 Fold PLUS_EXPR correctly.
3417 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
3420 * config/s390/s390.c (s390_safe_relative_long_p): New function.
3421 (annotate_constant_pool_refs): Skip insns which support
3422 relative addressing.
3423 (annotate_constant_pool_refs_1): New helper function.
3424 (find_constant_pool_ref): Skip insns which support relative
3426 (find_constant_pool_ref_1): New helper function.
3427 (replace_constant_pool_ref): Skip insns which support
3428 relative addressing.
3429 (replace_constant_pool_ref_1): New helper function.
3430 (s390_mainpool_start): Adapt to the new signature.
3431 (s390_mainpool_finish): Likewise.
3432 (s390_chunkify_start): Likewise.
3433 (s390_chunkify_finish): Likewise.
3434 (pass_s390_early_mach::execute): Likewise.
3435 (s390_prologue_plus_offset): Likewise.
3436 (s390_emit_prologue): Likewise.
3437 (s390_emit_epilogue): Likewise.
3439 2018-11-09 Jakub Jelinek <jakub@redhat.com>
3441 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
3442 but unsupported lastprivate with conditional modifier.
3444 2018-11-09 Jeff Law <law@redhat.com>
3446 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
3447 unused argument better. Add gcc_unreachable to silence warning.
3449 2018-11-09 Martin Sebor <msebor@redhat.com>
3452 * attribs.c (has_attribute): New helper function.
3453 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
3454 * attribs.h (decls_mismatched_attributes): Declare.
3455 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
3456 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
3457 * common.opt (-Wattribute-alias): Take an argument.
3458 (-Wno-attribute-alias): New option.
3459 * doc/extend.texi (Common Function Attributes): Document copy.
3460 (Common Variable Attributes): Same.
3461 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
3462 (-Wattribute-alias): Document new option argument.
3464 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
3466 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
3467 matching criteria. Remove unused array initializer.
3469 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
3470 Jinsong Ji <jji@us.ibm.com>
3472 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
3473 constraints by introducing a new temporary.
3474 (_mm_cvtss_si64): Likewise.
3476 2018-11-09 Martin Liska <mliska@suse.cz>
3478 * common.opt: Add -fipa-stack-alignment flag.
3479 * doc/invoke.texi: Document it.
3480 * final.c (rest_of_clean_state): Guard stack
3481 shrinking with flag.
3483 2018-11-09 Martin Liska <mliska@suse.cz>
3485 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
3487 (ipa_discover_variable_flags): ... this.
3488 * common.opt: Come up with new flag -fipa-reference-addressable.
3489 * doc/invoke.texi: Document it.
3490 * ipa-reference.c (propagate): Call the renamed fn.
3491 * ipa-visibility.c (whole_program_function_and_variable_visibility):
3493 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
3495 (ipa_discover_variable_flags): ... this. Discover
3496 non-addressable variables only with the newly added flag.
3497 * opts.c: Enable the newly added flag with -O1 and higher
3500 2018-11-09 David Malcolm <dmalcolm@redhat.com>
3502 * json.cc (selftest::test_writing_literals): Fix comment.
3504 2018-11-09 Martin Liska <mliska@suse.cz>
3506 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
3507 string to a stack buffer.
3508 (aarch64_parse_cpu): Likewise.
3509 (aarch64_parse_tune): Likewise.
3511 2018-11-09 Richard Biener <rguenther@suse.de>
3513 PR tree-optimization/87953
3514 * tree-vect-loop.c (vectorizable_reduction): For analysis
3515 always pass ops[0] to vectorizable_condition.
3517 2018-11-09 Stafford Horne <shorne@gmail.com>
3518 Richard Henderson <rth@twiddle.net>
3519 Joel Sherrill <joel@rtems.org>
3521 * common/config/or1k/or1k-common.c: New file.
3522 * config/or1k/*: New.
3523 * config.gcc (or1k*-*-*): New.
3524 * configure.ac (or1k*-*-*): New test for openrisc tls.
3525 * configure: Regenerated.
3526 * doc/install.texi: Document OpenRISC triplets.
3527 * doc/invoke.texi: Document OpenRISC arguments.
3528 * doc/md.texi: Document OpenRISC.
3530 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
3532 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
3533 (arm7tdmi-s): Delete CPU.
3534 (arm710t): Add aliases for arm720t and arm740t.
3535 (arm720t, arm740t): Delete CPUs.
3536 (arm920t): Add aliases for arm920, arm922t and arm940t.
3537 (arm920, arm922t, arm940t): Delete CPUs.
3538 (arm10tdmi): Add alias for arm1020t.
3539 (arm1020t): Delete CPU.
3540 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
3541 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
3542 (arm10e): Add aliases for arm1020e and arm1022e.
3543 (arm1020e, arm1022e): Delete CPU.
3544 * config/arm/arm.md (generic_sched): Remove entries that are now
3546 (generic_vfp): Likewise.
3547 * config/arm/arm1020e.md: Simplify tuning selection based on alias
3549 * config/arm/arm-tune.md: Regenerated.
3550 * config/arm/arm-tables.opt: Regenerated.
3552 2018-11-09 Richard Biener <rguenther@suse.de>
3554 PR tree-optimization/87621
3555 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
3556 op with only phi inputs.
3557 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
3558 (ch_base::copy_headers): Run CSE on copied loop headers.
3559 (pass_ch_vect::process_loop_p): Simplify.
3561 2018-11-09 Alexandre Oliva <oliva@adacore.com>
3563 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
3564 for non-w64 x86_64 biarch.
3566 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
3568 PR rtl-optimization/86438
3569 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
3570 of in_b for the compare if in_b is SET_DEST.
3573 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
3574 non-toplevel UNSPEC.
3576 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
3578 * tree-vrp.c (value_range::check): Do not access internals
3580 (value_range::singleton_p): Same.
3581 (value_range::type): Same.
3582 (vrp_finalize): Use value_range API.
3584 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
3586 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
3588 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
3590 * vr-values.c (vr_values::get_value_range): Use value_range API
3591 instead of piecing together ranges.
3592 (vr_values::update_value_range): Same.
3594 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
3596 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
3597 of performing ad-hoc calculations.
3598 * tree-ssanames.c (set_range_info): New overloaded function
3599 accepting value_range &.
3600 (get_range_info): Same.
3601 * tree-ssanames.h (set_range_info_raw): Remove.
3602 (set_range_info): New prototype.
3603 (get_range_info): Same.
3604 * tree-vrp.h (value_range::null_p): Rename to zero_p.
3605 * tree-vrp.c (value_range::null_p): Same.
3607 2018-11-09 Jan Hubicka <jh@suse.cz>
3609 * tree.c (fld_type_variant_equal_p): Test user align flag.
3610 (flt_type_variant): Copy user align flag.
3611 (fld_incomplete_type_of): Clear it.
3613 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3615 * config/arm/neon.md (div<mode>3): New pattern.
3617 2018-11-08 Andi Kleen <ak@linux.intel.com>
3619 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
3620 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
3621 (ix86_handle_option): Handle OPT_mptwrite.
3622 * config/i386/cpuid.h (bit_PTWRITE): Add.
3623 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
3624 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
3625 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
3626 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
3627 (ix86_option_override_internal): Handle PTA_PTWRITE.
3628 (ix86_valid_target_attribute_inner_p): Define ptwrite.
3629 (def_builtin2): Force UINT64 to be 64bit only.
3630 * config/i386/i386.h (TARGET_PTWRITE): Add.
3631 (TARGET_PTWRITE_P): Add.
3633 * config/i386/i386.md: Define ptwrite.
3634 * config/i386/i386.opt: Add -mptwrite.
3635 * config/i386/immintrin.h (_ptwrite64): Add.
3637 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
3638 * doc/invoke.texi: Document -mptwrite.
3640 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
3642 PR rtl-optimization/87600
3643 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
3644 * lra-constraints.c (process_alt_operands): Skip illegal hard
3645 register usage. Prefer reloading non hard register operands.
3647 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
3650 * doc/invoke.texi (Optimize Options): Clarify default behavior
3651 for -fno-sched-interblock and -fno-sched-spec.
3653 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
3655 * collect2.c (linker_select): Add USE_LLD_LD.
3656 (ld_suffixes): Add ld.lld.
3657 (main): Handle -fuse-ld=lld.
3658 * common.opt (-fuse-ld=lld): New option.
3659 * doc/invoke.texi (-fuse-ld=lld): Document.
3660 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
3662 2018-11-08 Paul Koning <ni1d@arrl.net>
3664 * config/pdp11/constraints.md: Add "Z" series constraints for use
3665 with pre-dec and post-inc addressing.
3666 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
3667 (pdp11_expand_operands): Add int argument (word count).
3668 (pdp11_sp_frame_offset): Delete.
3669 (pdp11_cmp_length): New function.
3670 (pushpop_regeq): New function.
3671 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
3673 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
3675 (pdp11_initial_elimination_offset): Ditto.
3676 (pdp11_expand_operands): Add word count argument. Bugfixes.
3677 (output_move_multiple): Change how pointer adjustment is done.
3678 (pdp11_gen_int_label): Correct format.
3679 (output_ascii): Ditto.
3680 (pdp11_asm_output_var): Add code for DEC assembler case.
3681 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
3683 (legitimate_const_double_p): Ditto.
3684 (pdp11_register_move_cost): Adjust for new register classes.
3685 (pdp11_regno_reg_class): Ditto.
3686 (expand_block_move): Delete.
3687 (pushpop_regeq): New function.
3688 (pdp11_legitimate_address_p): Bugfix in check for constant
3690 (pdp11_sp_frame_offset): Delete.
3691 (pdp11_reg_save_size): New helper function for new frame layout.
3692 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
3693 (pdp11_expand_shift): Bugfix in check for constant shift count.
3694 (pdp11_shift_length): Ditto.
3695 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
3696 (pdp11_cmp_length): New function.
3697 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
3698 some compile options.
3699 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
3700 (CALL_USED_REGISTERS): Ditto.
3701 (ELIMINABLE_REGS): Ditto.
3702 (REGISTER_NAMES): Ditto.
3703 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
3705 (REG_CLASS_NAMES): Ditto.
3706 (REG_CLASS_CONTENTS): Ditto. Also remove
3707 HARD_FRAME_POINTER_REGNUM.
3708 (CPU_REG_CLASS): New macro.
3709 (CLASS_MAX_NREGS): Adjust for new register classes.
3710 (FUNCTION_PROFILER): Make no-op.
3711 (may_call_alloca): Remove unused declaration.
3712 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
3713 (ASM_OUTPUT_SKIP): Fix format.
3714 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
3715 (HARD_FRAME_POINTER_REGNUM): Remove.
3717 (*rts): Rename. Remove epilogue related checks.
3718 (cmpsi, cmpdi): New insn.
3719 (cbranch<mode>4): Change to apply to SI and DI modes as well.
3720 (mov<mode>): Change constraints to enforce that push/pop
3721 destination cannot use the same register as source.
3722 (*mov<mode><cc_cc>): Ditto.
3723 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
3724 at assembly output rather than as RTL expander.
3725 (zero_extendqihi2): Bugfix in check for same registers.
3726 (adddi3_nocc): Bugfix in check for constant operand.
3727 (addsi3_nocc): Ditto.
3728 (subdi3_nocc): Ditto.
3729 (subsi3_nocc): Ditto.
3730 (negdi2_nocc): Copy input to pdp11_expand_operands.
3731 (negsi2_nocc): Ditto.
3732 (bswap2_nocc): Ditto.
3733 * config/pdp11/pdp11.opt (mlra): Fix documentation.
3734 * config/pdp11/t-pdp11: Use -Os.
3736 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
3738 * config/arm/parsecpu.awk (/alias/): New parsing rule.
3739 (/begin cpu/): Check that the cpu name hasn't been previously defined.
3740 (gen_comm_data): Print out CPU alias tables.
3741 (check_cpu): Match aliases when checking the CPU name.
3742 * config/arm/arm-protos.h (cpu_alias): New structure.
3743 (cpu_option): Add entry for aliases.
3744 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
3745 strongarm1100 and strongarm1110.
3746 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
3747 (config/arm/arm-generic.md): Remove redundant references to
3748 strongarm110, strongarm1100 and strongarm1110.
3749 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
3750 Scan aliases for additional hints.
3751 (arm_parse_cpu_option_name): Also match a cpu name against the list
3753 * config/arm/arm-tables.opt: Regenerated.
3754 * config/arm/arm-tune.md: Regenerated.
3756 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3758 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
3759 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
3760 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3761 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
3762 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3763 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
3764 * gengtype.c (open_base_files): Add omp-general.h.
3765 * gimple.c (gimple_build_omp_critical):
3766 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
3767 gimple_omp_taskgroup_set_clauses.
3768 (gimple_build_omp_atomic_load): Add mo argument, call
3769 gimple_omp_atomic_set_memory_order.
3770 (gimple_build_omp_atomic_store): Likewise.
3771 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
3772 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
3774 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
3775 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
3776 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
3777 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
3778 different value for GF_OMP_ATOMIC_NEED_VALUE.
3779 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
3781 (struct gimple_statement_omp_single_layout): And remove here.
3782 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
3783 than gimple_statement_omp_single_layout.
3784 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
3786 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
3787 (gimple_omp_subcode): Formatting fix.
3788 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
3789 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
3790 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
3791 gimple_omp_teams_host, gimple_omp_teams_set_host,
3792 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
3793 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
3794 gimple_omp_taskgroup_set_clauses): New inline functions.
3795 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
3796 (gimple_build_omp_atomic_store): Likewise.
3797 (gimple_omp_atomic_seq_cst_p): Remove.
3798 (gimple_omp_atomic_memory_order): New function.
3799 (gimple_omp_atomic_set_seq_cst): Remove.
3800 (gimple_omp_atomic_set_memory_order): New function.
3801 (gimple_build_omp_taskgroup): Add clauses argument.
3802 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
3803 (dump_gimple_omp_task): Print taskwait with depend clauses.
3804 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
3805 dump_omp_atomic_memory_order.
3806 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
3807 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
3808 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
3809 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
3810 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
3811 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
3812 ORT_UNTIED_TASKLOOP enumerators.
3813 (enum gimplify_defaultmap_kind): New.
3814 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
3815 target_map_pointers_as_0len_arrays members, add defaultmap.
3816 (new_omp_context): Initialize defaultmap member.
3817 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3818 (maybe_fold_stmt): Don't fold even in host teams regions.
3819 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
3820 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
3821 ctx->omp_firstprivatize_variable.
3822 (omp_add_variable): Don't add private/firstprivate for VLAs in
3824 (omp_default_clause): Print "taskloop" rather than "task" if
3826 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3827 Handle new defaultmap clause kinds.
3828 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
3829 iterator to be lastprivate or private. Fix up diagnostics if linear
3830 is used on collapse>1 simd iterator.
3831 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3832 (gimplify_omp_depend): New function.
3833 (gimplify_scan_omp_clauses): Add shared clause on parallel for
3834 combined parallel master taskloop{, simd} if taskloop has
3835 firstprivate, lastprivate or reduction clause. Handle
3836 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
3837 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
3838 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
3839 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
3840 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
3842 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
3843 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
3844 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
3845 OMP_CLAUSE_{TASK,IN}_REDUCTION.
3846 (gimplify_omp_task): Handle taskwait with depend clauses.
3847 (gimplify_omp_for): Add shared clause on parallel for combined
3848 parallel master taskloop{, simd} if taskloop has firstprivate,
3849 lastprivate or reduction clause. Use ORT_TASKLOOP or
3850 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
3851 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
3852 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
3853 __for_end and __for_range temporaries on OMP_PARALLEL for
3854 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
3855 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
3856 sandwiched in between two taskloops.
3857 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
3858 instead of ctx->omp_firstprivatize_variable.
3859 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
3860 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
3861 host teams, use gimplify_and_return_first etc. for body like
3862 for target or target data constructs, and at the end call
3863 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
3864 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
3865 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
3866 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
3867 gimple_omp_atomic_set_seq_cst calls.
3868 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
3869 case, handle taskgroup clauses.
3870 * lto-streamer-out.c (hash_tree): Handle
3871 OMP_CLAUSE_{TASK,IN}_REDUCTION.
3872 * Makefile.in (GTFILES): Add omp-general.h.
3873 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
3874 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
3875 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
3876 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
3877 BUILT_IN_GOMP_LOOP_DOACROSS_START,
3878 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
3879 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3880 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
3881 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
3882 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
3883 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
3884 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
3885 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3886 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
3887 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
3888 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
3889 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
3890 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
3891 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
3892 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
3893 * omp-expand.c (workshare_safe_to_combine_p): Return false for
3894 non-worksharing loops.
3895 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
3896 (determine_parallel_type): Don't combine parallel with worksharing
3897 which has _reductemp_ clause.
3898 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
3899 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
3900 if there is nonmonotonic modifier or if there is no modifier and no
3901 ordered clause. For dynamic and guided schedule without monotonic
3902 and nonmonotonic modifier, default to nonmonotonic.
3903 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
3904 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
3906 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
3907 there are any reduction clauses.
3908 (expand_taskwait_call): New function.
3909 (expand_teams_call): New function.
3910 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
3911 expand_teams_call for it. Formatting fix. Handle taskwait with
3913 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
3914 of worksharing loops with task reductions.
3915 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
3916 expansion of worksharing loops with task reductions.
3917 (expand_omp_sections): Handle expansion of sections with task
3919 (expand_omp_synch): For host teams call expand_omp_taskreg.
3920 (omp_memory_order_to_memmodel): New function.
3921 (expand_omp_atomic_load, expand_omp_atomic_store,
3922 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
3923 instead of gimple_omp_atomic_seq_cst_p.
3924 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
3925 depend clauses as a standalone directive.
3926 * omp-general.c (enum omp_requires): New variable.
3927 (omp_extract_for_data): Initialize have_reductemp member. Allow
3928 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
3929 GT_EXPR loops depending on incr sign. Formatting fixes.
3930 * omp-general.h (struct omp_for_data): Add have_reductemp member.
3931 (enum omp_requires): New enum.
3932 (omp_requires_mask): Declare.
3933 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
3935 * omp-low.c (struct omp_context): Add task_reductions and
3936 task_reduction_map fields.
3937 (is_host_teams_ctx): New function.
3938 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
3939 (use_pointer_for_field): Use is_global_var instead of
3940 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
3942 (build_outer_var_ref): Ignore taskgroup outer contexts.
3943 (delete_omp_context): Release task_reductions and task_reduction_map.
3944 (scan_sharing_clauses): Don't add any fields for reduction clause on
3945 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
3946 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
3947 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
3948 Handle OMP_CLAUSE_NONTEMPORAL.
3949 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
3951 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
3952 clauses with task modifier.
3953 (scan_omp_task): Handle taskwait with depend clauses.
3954 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
3955 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
3956 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
3957 (scan_omp_for): Fix comment formatting.
3958 (scan_omp_teams): Handle host teams constructs.
3959 (check_omp_nesting_restrictions): Allow teams with no outer
3960 OpenMP context. Adjust diagnostics for teams strictly nested into
3961 some explicit OpenMP construct other than target. Allow OpenMP atomics
3962 inside of simd regions.
3963 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
3964 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
3965 taskreg_nesting_level while scanning host teams construct.
3966 (task_reduction_read): New function.
3967 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
3968 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
3969 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
3970 second argument create_tmp_var if it is NULL. Don't ignore shared
3971 clauses in is_host_teams_ctx contexts. Handle
3972 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
3974 (lower_reduction_clauses): Ignore reduction clauses with task
3975 modifier. Remove second argument create_tmp_var if it is NULL.
3976 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
3977 (lower_send_clauses): Ignore reduction clauses with task modifier.
3978 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
3979 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
3980 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
3981 rely that it is the last stmt in body so far. Ignore outer taskgroup
3983 (omp_task_reductions_find_first, omp_task_reduction_iterate,
3984 lower_omp_task_reductions): New functions.
3985 (lower_omp_sections): Handle reduction clauses with taskgroup
3986 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
3987 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
3988 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
3990 (lower_omp_taskgroup): Handle taskgroup reductions.
3991 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
3992 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
3993 (lower_depend_clauses): If there are any
3994 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3995 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
3996 seen, assume lowering is done already and return early. Set kind
3997 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
3998 (lower_omp_taskreg): Handle reduction clauses with task modifier on
3999 parallel construct. Handle reduction clause on taskloop construct.
4000 Handle taskwait with depend clauses.
4001 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
4002 for host teams constructs.
4003 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
4004 nontemporal and _reductemp_ clause entries.
4005 (omp_clause_code_name): Likewise.
4006 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
4007 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
4008 * tree-core.h (enum omp_clause_code): Add
4009 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
4010 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
4011 (struct tree_base): Add omp_atomic_memory_order field into union.
4012 Remove OMP_ATOMIC_SEQ_CST comment.
4013 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
4014 and OMP_CLAUSE_DEPEND_DEPOBJ.
4015 (struct tree_omp_clause): Add subcode.defaultmap_kind.
4016 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
4017 OpenMP constructs with body and clauses operands.
4018 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
4019 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
4020 (OMP_TASKGROUP_CLAUSES): Define.
4021 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
4022 OMP_CLAUSE__LOOPTEMP_.
4023 (OMP_ATOMIC_SEQ_CST): Remove.
4024 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
4025 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
4026 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
4027 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
4028 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
4029 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
4030 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
4031 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
4032 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
4033 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
4035 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
4036 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4037 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
4038 (convert_local_omp_clauses): Likewise. Remove useless test.
4039 * tree-parloops.c (create_call_for_reduction_1): Pass
4040 OMP_MEMORY_ORDER_RELAXED as new argument to
4041 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
4042 * tree-pretty-print.c (dump_omp_iterators): New function.
4043 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
4044 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
4045 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
4046 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
4047 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
4048 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
4049 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
4050 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4051 (dump_omp_atomic_memory_order): New function.
4052 (dump_generic_node): Use it. Print taskgroup clauses. Print
4053 taskwait with depend clauses.
4054 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
4055 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
4056 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
4057 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
4058 write_ts_omp_clause_tree_pointers): Likewise.
4060 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4063 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
4064 "-missed", "-note", and "-all" sub-options.
4065 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
4067 (can_early_inline_edge_p): Likewise.
4068 (want_early_inline_function_p): Likewise.
4069 (want_inline_self_recursive_call_p): Likewise.
4070 (recursive_inlining): Likewise.
4071 (inline_small_functions): Likewise.
4072 (flatten_function): Likewise.
4073 (ipa_inline): Likewise.
4074 (inline_always_inline_functions): Likewise.
4075 (early_inline_small_functions): Likewise.
4076 (early_inliner): Likewise.
4077 * tree-inline.c (expand_call_inline): Likewise.
4079 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4081 * pretty-print.c (pp_format): Handle %f.
4082 (selftest::test_pp_format): Add test of %f.
4083 * pretty-print.h (pp_double): New macro.
4085 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4087 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
4088 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
4089 (dump_pretty_printer::decode_format): Implement "%C" for
4091 (selftest::test_capture_of_dump_calls): Rename "where" to
4092 "stmt_loc". Convert test_decl to a function decl and set its
4093 location. Add a symbol_table_test RAII instance and a
4094 cgraph_node, using it to test "%C" and dump_symtab_node.
4096 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
4099 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
4101 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4103 * cgraph.c: Include "selftest.h".
4104 (saved_symtab): New variable.
4105 (selftest::symbol_table_test::symbol_table_test): New ctor.
4106 (selftest::symbol_table_test::~symbol_table_test): New dtor.
4107 (selftest::test_symbol_table_test): New test.
4108 (selftest::cgraph_c_tests): New.
4109 * cgraph.h (saved_symtab): New decl.
4110 (selftest::symbol_table_test): New class.
4111 * selftest-run-tests.c (selftest::run_tests): Call
4112 selftest::cgraph_c_tests.
4113 * selftest.h (selftest::cgraph_c_tests): New decl.
4115 2018-11-08 Richard Biener <rguenther@suse.de>
4117 * tree-data-ref.h (lambda_int): New typedef.
4118 (lambda_vector_gcd): Adjust.
4119 (lambda_vector_new): Likewise.
4120 (lambda_matrix_new): Likewise.
4121 * tree-data-ref.c (print_lambda_vector): Adjust.
4123 2018-11-08 Richard Biener <rguenther@suse.de>
4125 PR tree-optimization/87929
4126 * tree-complex.c (expand_complex_comparison): Clean EH.
4128 2018-11-08 Martin Liska <mliska@suse.cz>
4130 * doc/extend.texi: Reword.
4131 * predict.c (expr_expected_value_1): Likewise.
4133 2018-11-08 Richard Biener <rguenther@suse.de>
4135 PR tree-optimization/87913
4136 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
4137 of extreme values to ordered comparisons.
4139 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
4142 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
4144 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
4146 * doc/invoke.texi: Remove leading dash from @opindex entries
4147 throughout the file.
4149 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
4152 * doc/invoke.texi (Option Summary): Add -e and --entry.
4153 (Link Options): Likewise.
4155 2018-11-07 Nathan Sidwell <nathan@acm.org>
4158 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
4159 --disable-checking bootstrap.
4161 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
4163 * configure: Regenerated.
4165 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4168 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
4169 to the mode of the widest field iff the widest field has mode class
4170 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
4173 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
4175 * common.opt: Add -Wattribute-warning.
4176 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
4177 * expr.c (expand_expr_real_1): Add new attribute to warning_at
4178 call to allow user configure behavior of "warning" attribute.
4180 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
4182 * target.def: Put @: after every vs., e.g., and i.e. where it is
4183 followed by whitespace.
4184 * doc/extend.texi: Ditto.
4185 * doc/fragments.texi: Ditto.
4186 * doc/gimple.texi: Ditto.
4187 * doc/implement-c.texi: Ditto.
4188 * doc/install.texi: Ditto.
4189 * doc/invoke.texi: Ditto.
4190 * doc/md.texi: Ditto.
4191 * doc/plugins.texi: Ditto.
4192 * doc/rtl.texi: Ditto.
4193 * doc/sourcebuild.texi: Ditto.
4194 * doc/tm.texi.in: Ditto.
4195 * doc/ux.texi: Ditto.
4196 * doc/tm.texi: Regenerate.
4198 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4200 * config/arm/arm-cpus.in (ares): New entry.
4201 * config/arm/arm-tables.opt: Regenerate.
4202 * config/arm/arm-tune.md: Likewise.
4203 * doc/invoke.texi (ARM Options): Document ares.
4205 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4207 * config/aarch64/aarch64-cores.def (ares): Define.
4208 * config/aarch64/aarch64-tune.md: Regenerate.
4209 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
4211 2018-11-07 Jan Hubicka <jh@suse.cz>
4213 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
4214 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
4215 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
4218 2018-11-07 Richard Biener <rguenther@suse.de>
4220 PR tree-optimization/87914
4221 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
4223 (vectorizable_reduction): Handle shifts and rotates by dispatching
4224 to vectorizable_shift.
4225 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
4226 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
4228 (vectorizable_shift): Export and handle being called as
4230 (vect_analyze_stmt): Call vectorizable_shift after
4231 vectorizable_reduction.
4232 * tree-vectorizer.h (vectorizable_shift): Declare.
4234 2018-11-07 Jan Hubicka <jh@suse.cz>
4236 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
4237 than const decls in TREE_VALUE of enum.
4238 (dump_type_inheritance_graph): Improve duplicate dumping.
4239 (free_enum_values): New.
4240 (build_type_inheritance_graph): Use it.
4241 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
4242 which are not main variants or not ODR types.
4243 (verify_type_variant): Expect variants to have no TYPE_VALUES.
4245 2018-11-07 Richard Biener <rguenther@suse.de>
4247 * ipa-inline.c (want_inline_small_function_p): Compute
4248 big_speedup_p lazily and last.
4250 2018-11-07 Jan Hubicka <jh@suse.cz>
4252 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
4253 building incomplete variant of complete type.
4254 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
4255 variant of complete type.
4257 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4259 * config/mips/mips.c: Fix typo in documentation of
4260 mips_loongson_ext2_prefetch_cookie.
4261 (mips_option_override): fix brain twister logical.
4262 * config/mips/mips.h: Fix typo in documentation of
4263 ISA_HAS_CTZ_CTO and define pattern.
4264 * config/mips/mips.md (prefetch): Hoist EXT2 above
4266 (prefetch_indexed): Hoist EXT2 above the EXT block.
4268 2018-11-07 Jan Hubicka <jh@suse.cz>
4270 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
4271 return and parameter types of function and method types.
4272 (free_lang_data_in_cgraph): Update.
4274 2018-11-07 Martin Liska <mliska@suse.cz>
4276 PR rtl-optimization/87868
4277 * postreload-gcse.c (eliminate_partially_redundant_load): Set
4278 threshold to max_count if we would overflow.
4279 * profile-count.h: Make max_count a public constant.
4281 2018-11-07 Martin Liska <mliska@suse.cz>
4283 * mem-stats.h: Fix GNU coding style.
4285 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4287 * config/mips/gs264e.md: New.
4288 * config/mips/mips-cpus.def: Define gs264e.
4289 * config/mips/mips-tables.opt: Regenerate.
4290 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4292 (mips_issue_rate): Add support for gs264e.
4293 (mips_multipass_dfa_lookahead): Likewise.
4294 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
4295 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
4296 (MIPS_ASE_MSA_SPEC): New.
4297 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
4298 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
4299 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
4300 * config/mips/mips.md: Include gs264e.md.
4301 (processor): Add gs264e.
4302 * config/mips/mips.opt (MSA): Use Mask instead of Var.
4303 * doc/invoke.texi: Add gs264e to supported architectures.
4305 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4307 * config/mips/gs464e.md: New.
4308 * config/mips/mips-cpus.def: Define gs464e.
4309 * config/mips/mips-tables.opt: Regenerate.
4310 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4312 (mips_issue_rate): Add support for gs464e.
4313 (mips_multipass_dfa_lookahead): Likewise.
4314 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
4315 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
4316 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
4317 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
4318 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
4319 * config/mips/mips.md: Include gs464e.md.
4320 (processor): Add gs464e.
4321 * doc/invoke.texi: Add gs464e to supported architectures.
4323 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4325 * config/mips/loongson3a.md: Rename to ...
4326 * config/mips/gs464.md: ... here.
4327 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
4328 as an alias of gs464 processor.
4329 * config/mips/mips-tables.opt: Regenerate.
4330 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
4331 instead of PROCESSOR_LOONGSON_3A.
4332 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
4334 (mips_option_override): Enable MMI and EXT for gs464.
4335 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
4336 Rename TUNE_LOONGSON_3A to TUNE_GS464.
4337 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
4338 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
4339 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
4341 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
4342 (processor): Add gs464;
4343 * doc/invoke.texi: Add gs464 to supported architectures.
4345 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4347 * config/mips/mips-protos.h
4348 (mips_loongson_ext2_prefetch_cookie): New prototype.
4349 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
4350 (mips_option_override): Enable TARGET_LOONGSON_EXT when
4351 TARGET_LOONGSON_EXT2 is true.
4352 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
4353 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
4354 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
4355 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
4356 TARGET_LOONGSON_EXT2.
4357 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
4358 (define_insn "ctz<mode>2"): New insn pattern.
4359 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
4360 (define_insn "prefetch_indexed_<mode>"): Include
4361 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
4362 * config/mips/mips.opt (-mloongson-ext2): Add option.
4363 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
4365 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4367 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
4368 __mips_loongson_ext.
4369 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
4370 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
4372 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
4373 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
4374 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
4375 instead of TARGET_LOONGSON_3A.
4376 * config/mips/mips.opt (-mloongson-ext): Add option.
4377 * gcc/doc/invoke.texi (-mloongson-ext): Document.
4379 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
4381 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
4382 * config/mips/loongson.md: Move to ...
4383 * config/mips/loongson-mmi.md: here; Adjustment.
4384 * config/mips/loongson.h: Move to ...
4385 State as deprecated. Include loongson-mmiintrin.h for back
4386 compatibility and warning.
4387 * config/mips/loongson-mmiintrin.h: ... here.
4388 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
4389 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
4390 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4391 (mips_option_override): Make sure MMI use hard float;
4392 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
4393 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
4394 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
4395 TARGET_LOONGSON_VECTORS.
4396 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
4397 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
4398 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
4399 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
4401 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
4402 TARGET_LOONGSON_VECTORS.
4403 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
4404 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4405 (Loongson MMI patterns): Include loongson-mmi.md instead of
4407 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
4408 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
4410 2018-11-07 Richard Biener <rguenther@suse.de>
4413 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
4414 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
4416 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
4418 PR rtl-optimization/87874
4419 * lra.c (lra_substitute_pseudo): Do not create a subreg for
4422 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
4424 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
4425 if not in indexed or indirect form.
4426 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
4427 (bswap<mode>2_store): Ditto.
4429 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
4431 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
4434 2018-11-06 Richard Biener <rguenther@suse.de>
4436 PR tree-optimization/86850
4437 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
4438 instead of src.m_vec.
4440 2018-11-06 Jan Hubicka <jh@suse.cz>
4442 * tree.c (fld_simplified_type_name): Break out form ...
4443 (free_lang_data_in_type): ... here.
4444 (fld_type_variant_equal_p): Use it.
4446 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4448 * config/default-d.c: Include memmodel.h.
4450 * config/sol2-d.c: New file.
4451 * config/t-sol2 (sol2-d.o): New rule.
4452 * config.gcc <*-*-solaris2*>: Set d_target_objs,
4453 target_has_targetdm.
4455 2018-11-06 Jan Hubicka <jh@suse.cz>
4457 * tree.c (fld_type_variant): Also copy alignment; be sure that
4458 new variant is equal.
4460 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
4463 * config/s390/s390.md: Add relative_long attribute.
4465 2018-11-06 Jan Hubicka <jh@suse.cz>
4467 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
4468 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
4469 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
4470 stream TYPE_NEEDS_CONSTRUCTING.
4471 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
4472 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
4474 2018-11-06 Richard Biener <rguenther@suse.de>
4476 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
4478 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
4480 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4482 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
4483 REG_CLASS_CONTENTS[GEN_REGS].
4484 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
4486 2018-11-06 Jan Hubicka <jh@suse.cz>
4488 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
4490 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4493 * config/sol2.h (ASAN_CC1_SPEC): Define.
4494 (LD_WHOLE_ARCHIVE_OPTION): Define.
4495 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
4496 (ASAN_REJECT_SPEC): Provide default.
4497 (LIBASAN_EARLY_SPEC): Define.
4498 (LIBTSAN_EARLY_SPEC): Define.
4499 (LIBLSAN_EARLY_SPEC): Define.
4500 * config/i386/sol2.h (CC1_SPEC): Redefine.
4501 (ASAN_REJECT_SPEC): Define.
4503 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
4504 (TARGET_ASAN_SHADOW_OFFSET): Define.
4505 (sparc_asan_shadow_offset): New function.
4506 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
4507 (ASAN_REJECT_SPEC): Define.
4509 2018-11-06 Jan Hubicka <jh@suse.cz>
4511 * tree.c (fld_type_variant): Copy canonical type.
4512 (fld_incomplete_type_of): Check that canonical types looks sane;
4513 copy canonical type.
4514 (verify_type): Accept when incomplete type has complete canonical type.
4516 2018-11-06 Jan Hubicka <jh@suse.cz>
4518 * tree.c (free_lang_data): Reset overwite_assembler_name,
4519 print_xnode, print_decl, print_type and print_identifier of
4522 2018-11-06 Richard Biener <rguenther@suse.de>
4524 PR tree-optimization/87889
4525 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4526 Do nothing if old and new arg are the same
4528 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
4531 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
4532 attributes for operands 3 and 4.
4534 2018-11-06 Richard Biener <rguenther@suse.de>
4537 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
4538 matching bitfield insertion.
4540 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
4542 * auto-inc-dec.c: Include valtrack.h. Improve comments.
4543 (reg_next_debug_use): New.
4544 (attempt_change): Propagate adjusted expression into affected
4546 (merge_in_block): Track uses in debug insns.
4547 (pass_inc_dec::execute): Allocate and release
4550 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
4552 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
4553 (_mm512_fixupimm_round_pd): Update parameters and builtin.
4554 (_mm512_maskz_fixupimm_round_pd): Ditto.
4555 (_mm512_fixupimm_round_ps): Ditto.
4556 (_mm512_maskz_fixupimm_round_ps): Ditto.
4557 (_mm_fixupimm_round_sd): Ditto.
4558 (_mm_maskz_fixupimm_round_sd): Ditto.
4559 (_mm_fixupimm_round_ss): Ditto.
4560 (_mm_maskz_fixupimm_round_ss): Ditto.
4561 (_mm512_fixupimm_pd): Ditto.
4562 (_mm512_maskz_fixupimm_pd): Ditto.
4563 (_mm512_fixupimm_ps): Ditto.
4564 (_mm512_maskz_fixupimm_ps): Ditto.
4565 (_mm_fixupimm_sd): Ditto.
4566 (_mm_maskz_fixupimm_sd): Ditto.
4567 (_mm_fixupimm_ss): Ditto.
4568 (_mm_maskz_fixupimm_ss): Ditto.
4569 (_mm512_mask_fixupimm_round_pd): Update builtin.
4570 (_mm512_mask_fixupimm_round_ps): Ditto.
4571 (_mm_mask_fixupimm_round_sd): Ditto.
4572 (_mm_mask_fixupimm_round_ss): Ditto.
4573 (_mm512_mask_fixupimm_pd): Ditto.
4574 (_mm512_mask_fixupimm_ps): Ditto.
4575 (_mm_mask_fixupimm_sd): Ditto.
4576 (_mm_mask_fixupimm_ss): Ditto.
4577 * config/i386/avx512vlintrin.h:
4578 (_mm256_fixupimm_pd): Update parameters and builtin.
4579 (_mm256_maskz_fixupimm_pd): Ditto.
4580 (_mm256_fixupimm_ps): Ditto.
4581 (_mm256_maskz_fixupimm_ps): Ditto.
4582 (_mm_fixupimm_pd): Ditto.
4583 (_mm_maskz_fixupimm_pd): Ditto.
4584 (_mm_fixupimm_ps): Ditto.
4585 (_mm_maskz_fixupimm_ps): Ditto.
4586 (_mm256_mask_fixupimm_pd): Update builtin.
4587 (_mm256_mask_fixupimm_ps): Ditto.
4588 (_mm_mask_fixupimm_pd): Ditto.
4589 (_mm_mask_fixupimm_ps): Ditto.
4590 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
4591 * config/i386/i386-builtin.def: Update builtin definitions.
4592 * config/i386/i386.c: Handle new builtin types and remove useless ones.
4593 * config/i386/sse.md: Update VFIXUPIMM* patterns.
4594 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4595 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4596 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
4597 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4598 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4599 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
4600 * config/i386/subst.md:
4601 (round_saeonly_sd_mask_operand4): Add new subst_attr.
4602 (round_saeonly_sd_mask_op4): Ditto.
4603 (round_saeonly_expand_operand5): Ditto.
4604 (round_saeonly_expand): Update.
4606 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
4608 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
4610 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
4612 PR rtl-optimization/87871
4613 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
4615 2018-11-05 Paul Koning <ni1d@arrl.net>
4617 * doc/sourcebuild.texi (target attributes): Document new "inf"
4618 effective target keyword.
4620 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
4622 * config/s390/s390.c (s390_register_move_cost): Increase costs for
4623 moves involving the CC reg.
4625 2018-11-05 Richard Biener <rguenther@suse.de>
4627 PR tree-optimization/87873
4628 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
4630 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
4631 * tree-vect-loop.c (vect_transform_loop): When splitting the
4632 loop exit also create forwarder PHIs for constants.
4633 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4634 Handle constant to_arg, add extra checking we match up the correct
4637 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
4639 * config/s390/s390.md: QImode and HImode for load on condition.
4641 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
4643 * config/s390/predicates.md: Fix typo.
4644 * config/s390/s390.md: Allow immediates for load on condition.
4646 2018-11-05 Martin Liska <mliska@suse.cz>
4648 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
4649 * bitmap.h (struct bitmap_usage): Likewise.
4650 * ggc-common.c (SCALE): Remove.
4652 (struct ggc_usage): Use SIZE_AMOUNT. And update
4654 * ggc-page.c (SCALE): Remove.
4655 (STAT_LABEL): Remove.
4656 (ggc_print_statistics): Use SIZE_AMOUNT.
4657 * gimple.h (SCALE): Remove.
4659 * input.c (ONE_K): Remove.
4662 (STAT_LABEL): Likewise.
4663 (FORMAT_AMOUNT): Likewise.
4664 (dump_line_table_statistics): Use SIZE_AMOUNT.
4665 * mem-stats.h (struct mem_usage): Likewise.
4666 * rtl.c (dump_rtx_statistics): Likewise.
4667 (rtx_alloc_counts): Change type to size_t.
4668 (rtx_alloc_sizes): Likewise.
4669 (rtx_count_cmp): New.
4670 (dump_rtx_statistics): Sort first based on counts.
4671 * tree.c (tree_nodes_cmp): New.
4672 (tree_codes_cmp): New.
4673 (dump_tree_statistics): Sort first based on counts.
4674 * system.h (ONE_K): New.
4676 (SIZE_SCALE): Likewise.
4677 (SIZE_LABEL): Likewise.
4678 (SIZE_AMOUNT): Likewise.
4679 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
4680 * tree-dfa.c (dump_dfa_stats): Likewise.
4681 * tree-phinodes.c (phinodes_print_statistics): Likewise.
4682 * tree-ssanames.c (ssanames_print_statistics): Likewise.
4683 * tree.c (dump_tree_statistics): Likewise.
4684 * vec.c (struct vec_usage): Likewise.
4685 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
4686 trigger a -Werror=format-overflow with
4687 --enable-gather-detailed-stats.
4689 2018-11-05 Martin Liska <mliska@suse.cz>
4691 * mem-stats.h (mem_alloc_description::release_instance_overhead):
4693 * vec.c (struct vec_usage): Register m_element_size.
4694 (vec_prefix::register_overhead): New arguments: elements and
4696 (vec_prefix::release_overhead): Subtract elements.
4697 * vec.h (struct vec_prefix): Change signature.
4698 (va_heap::reserve): Pass proper arguments.
4699 (va_heap::release): Likewise.
4701 2018-11-05 Martin Liska <mliska@suse.cz>
4703 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
4707 2018-11-05 Richard Biener <rguenther@suse.de>
4709 * tree-scalar-evolution.h (final_value_replacement_loop): Update
4711 * tree-scalar-evolution.c (final_value_replacement_loop): Return
4712 whether anything was done.
4713 (scev_const_prop): Remove constant propagation part, fold
4715 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
4716 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
4719 2018-11-05 Jakub Jelinek <jakub@redhat.com>
4721 PR tree-optimization/87859
4722 * gimple-ssa-store-merging.c (struct merged_store_group): Add
4723 only_constants and first_nonmergeable_order members.
4724 (merged_store_group::merged_store_group): Initialize them.
4725 (merged_store_group::do_merge): Clear only_constants member if
4726 adding something other than INTEGER_CST store.
4727 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
4728 stores with order >= first_nonmergeable_order. Use
4729 merged_store->only_constants instead of always recomputing it.
4730 Set merged_store->first_nonmergeable_order if we've skipped any
4731 stores. Attempt to merge overlapping INTEGER_CST stores that
4732 we would otherwise skip.
4735 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
4737 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
4740 * config/i386/emmintrin.h (__v16qs): New to cope with option
4742 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
4743 (_mm_cmplt_epi8): Likewise.
4744 (_mm_cmpgt_epi8): Likewise.
4746 2018-11-05 Richard Biener <rguenther@suse.de>
4748 PR rtl-optimization/87852
4749 * fwprop.c (use_killed_between): Only consider single-defs of the
4750 use whose definition statement dominates the use.
4752 2018-11-05 Martin Liska <mliska@suse.cz>
4755 * doc/invoke.texi: Remove options that are
4756 not disabled with -Os.
4758 2018-11-05 Martin Liska <mliska@suse.cz>
4761 * doc/extend.texi: Update constrain about the last argument
4762 of __builtin_expect_with_probability.
4764 2018-11-05 Martin Liska <mliska@suse.cz>
4767 * predict.c (expr_expected_value_1): Verify
4768 that last argument is a real constants and emit
4771 2018-11-05 Martin Liska <mliska@suse.cz>
4773 PR gcov-profile/77698
4774 * ipa-profile.c (ipa_profile): Adjust hotness threshold
4777 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4779 PR tree-optimization/86572
4780 * builtins.c (c_strlen): Handle negative offsets in a safe way.
4782 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4784 PR tree-optimization/87672
4785 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
4786 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
4788 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
4791 * cfgexpand.c (pass_expand::execute): Move the call to
4792 finish_eh_generation in front of the call to expand_stack_alignment.
4794 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
4796 * common/config/i386/i386-common.c (processor_alias_table): Add
4798 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
4799 (case ${target}): Add znver2.
4800 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
4801 -march=native recognize znver2 processors.
4802 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
4803 * config/i386/i386.c (m_znver2): New definition.
4804 (m_ZNVER): New definition.
4805 (m_AMD_MULTIPLE): Includes m_znver2.
4806 (processor_cost_table): Add znver2 entry.
4807 (processor_target_table): Add znver2 entry.
4808 (get_builtin_code_for_version): Set priority for
4810 (processor_model): Add M_AMDFAM17H_ZNVER2.
4811 (arch_names_table): Ditto.
4812 (ix86_reassociation_width): Include znver2.
4813 * config/i386/i386.h (TARGET_znver2): New definition.
4814 (struct ix86_size_cost): Add TARGET_ZNVER2.
4815 (enum processor_type): Add PROCESSOR_ZNVER2.
4816 * config/i386/i386.md (define_attr "cpu"): Add znver2.
4817 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
4818 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
4819 (ix86_adjust_cost): Add znver2.
4820 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
4821 * gcc/doc/extend.texi: Add details about znver2.
4822 * gcc/doc/invoke.texi: Add details about znver2.
4824 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
4828 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
4831 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4833 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
4834 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
4836 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
4838 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
4839 shrink-wrapping when -mtrack-speculation.
4841 2018-11-02 Richard Biener <rguenther@suse.de>
4843 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
4844 (pop_cost_one_pair): Do not free pair.
4845 (pop_best_coalesce): Likewise.
4846 (create_coalesce_list): Initialize obstack.
4847 (delete_coalesce_list): Free obstack.
4848 (find_coalesce_pair): Obstack-allocate coalesce pairs.
4849 (add_cost_one_coalesce): Likewise.
4850 (struct live_track): Remove bitmap pointer indirections.
4851 (new_live_track): Adjust.
4852 (delete_live_track): Likewise.
4853 (live_track_remove_partition): Likewise.
4854 (live_track_add_partition): Likewise.
4855 (live_track_live_p): Likewise.
4856 (live_track_process_def): Likewise.
4857 (live_track_clear_base_vars): Likewise.
4859 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4861 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
4862 * configure: Regenerate.
4863 * config.in: Regenerate.
4864 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
4865 HAVE_AS_REGISTER_PSEUDO_OP guard.
4866 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
4867 !HAVE_AS_REGISTER_PSEUDO_OP support.
4868 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
4871 2018-11-02 Richard Biener <rguenther@suse.de>
4873 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
4876 2018-11-02 Richard Biener <rguenther@suse.de>
4878 PR tree-optimization/87776
4879 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
4880 executable when iterating but running into rpo-vn-max-loop-depth
4881 and not eliding the iteration.
4883 2018-11-30 Jan Hubicka <jh@suse.cz>
4885 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
4888 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
4890 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
4892 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
4893 Combine with rs6000_address_for_fpconvert.
4894 (rs6000_address_for_fpconvert): Combine with
4895 rs6000_force_indexed_or_indirect_mem.
4896 (rs6000_expand_vector_init): Change function call from
4897 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4898 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
4899 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4900 (floatsi<mode>2_lfiwax_mem): Ditto.
4901 (floatunssi<mode>2_lfiwzx): Ditto.
4902 (floatunssi<mode>2_lfiwzx_mem): Ditto.
4903 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
4904 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
4905 (fix_trunc<mode>si2_stfiwx): Ditto.
4906 (fixuns_trunc<mode>si2_stfiwx): Ditto.
4907 (float_<mode>si2_hw): Ditto.
4908 (floatuns_<mode>si2_hw): Ditto.
4909 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
4910 (vsx_splat_<mode>): Ditto.
4912 2018-11-01 Joseph Myers <joseph@codesourcery.com>
4914 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4915 at end of assembler input text.
4916 * configure: Regenerate.
4918 2018-11-01 Jakub Jelinek <jakub@redhat.com>
4920 PR tree-optimization/87826
4921 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
4922 negative or larger or equal to type's precision.
4924 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
4926 * opts.c (default_options_table): Do not enable
4927 OPT_fdelayed_branch at -Og.
4928 * doc/invoke.texi (-fdelayed-branch): Document it.
4930 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
4932 * optabs-libfuncs.c (build_libfunc_function_visibility):
4933 New, split out from...
4934 (build_libfunc_function): ... here.
4935 (init_one_libfunc_visibility): New, split out from ...
4936 (init_one_libfunc): ... here.
4938 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
4939 scratch register need not be early-clobber. Document the reason
4940 why we cannot use ST<OP>.
4942 2018-10-31 Joseph Myers <joseph@codesourcery.com>
4945 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
4946 line for second argument of AC_DEFINE_UNQUOTED.
4947 * doc/install.texi (Tools/packages necessary for modifying GCC):
4948 Update to autoconf 2.69 and automake 1.15.1.
4949 * aclocal.m4, config.in, configure: Regenerate.
4951 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
4953 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
4956 2018-10-31 Martin Liska <mliska@suse.cz>
4959 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
4960 Add new argument invalid_extension.
4961 (aarch64_get_all_extension_candidates): New function.
4962 (aarch64_rewrite_selected_cpu): Add NULL to function call.
4963 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
4965 (aarch64_get_all_extension_candidates): New function.
4966 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
4967 argument invalid_extension.
4968 (aarch64_parse_cpu): Likewise.
4969 (aarch64_print_hint_for_extensions): New function.
4970 (aarch64_validate_mcpu): Provide hint about invalid extension.
4971 (aarch64_validate_march): Likewise.
4972 (aarch64_handle_attr_arch): Pass new argument.
4973 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
4974 (aarch64_handle_attr_isa_flags): Likewise.
4976 2018-10-31 Richard Biener <rguenther@suse.de>
4980 * tree-outof-ssa.c (insert_backedge_copies): Restrict
4981 copy generation to useful cases. Place the copy before
4982 the definition of the backedge value when possible.
4984 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4986 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
4987 * config/arc/arc.c (arc_active_insn): New function.
4988 (check_store_cacheline_hazard): Likewise.
4989 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
4990 (arc_override_options): Disable delay slot scheduler for older
4992 (arc_store_addr_hazard_p): New implementation, old one renamed to
4994 (arc_store_addr_hazard_internal_p): Renamed.
4995 (arc_reorg): Don't combine into brcc instructions which are part
4996 of hardware hazard solution.
4997 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
4998 (tune_arc700): Likewise.
4999 * config/arc/arc.opt (arc7xx): New tune value.
5000 * config/arc/arc700.md: Improve A7 scheduler.
5002 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
5004 * config/arc/arc.c (arc_override_options): Remove
5005 TARGET_COMPACT_CASESI.
5006 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
5007 (CASE_VECTOR_MODE): Likewise.
5008 (CASE_VECTOR_PC_RELATIVE): Likewise.
5009 (CASE_VECTOR_SHORTEN_MODE): Likewise.
5010 (CASE_VECTOR_SHORTEN_MODE1): Delete.
5011 (ADDR_VEC_ALIGN): Update.
5012 (ASM_OUTPUT_CASE_LABEL): Undefine.
5013 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
5014 (TARGET_BI_BIH): Define.
5015 (DEFAULT_BRANCH_INDEX): Likewise.
5016 * config/arc/arc.md (casesi): Rework to accept BI/BIH
5017 instructions, remove compact_casesi use case.
5018 (casesi_compact_jump): Remove.
5019 (casesi_dispatch): New pattern.
5020 * config/arc/arc.opt: Add mbranch-index option. Deprecate
5021 compact_casesi option.
5022 * doc/invoke.texi: Document mbranch-index option.
5024 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
5026 * config/arc/arc.c (arc_get_tp): Remove function.
5027 (arc_emit_call_tls_get_addr): Likewise.
5028 (arc_call_tls_get_addr): New function.
5029 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
5030 * config/arc/arc.md (tls_load_tp_soft): Remove.
5031 (tls_gd_get_addr): Likewise.
5033 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
5035 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
5036 (mulsi3_600_lib): Remove pattern.
5037 (umulsi3_highpart_600_lib_le): Likewise.
5038 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
5039 (umulsidi3): Remove call to umulsidi3_600_lib.
5040 (umulsidi3_600_lib): Remove pattern.
5041 (peephole2): Remove peephole using the above deprecated patterns.
5043 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5046 * config/arm/arm.c (arm_option_check_internal): Disable the combined
5047 use of -mslow-flash-data and -mword-relocations.
5048 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
5049 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
5051 * doc/invoke.texi (-mword-relocations): Mention conflict with
5053 (-mslow-flash-data): Reciprocally.
5055 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
5057 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
5058 16-byte modes held in GP registers to use an even regno.
5060 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
5061 (aarch64_atomic_ldop_supported_p): Remove.
5062 (aarch64_gen_atomic_ldop): Remove.
5063 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
5064 Fully expand LSE operations here.
5065 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
5066 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
5067 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
5068 and use ATOMIC_LDOP instead; use register_operand for the input;
5069 drop the split and emit insns directly.
5070 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
5071 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
5072 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
5074 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
5075 (aarch64_gen_atomic_ldop): Don't call it.
5076 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
5077 Use aarch64_reg_or_zero.
5078 (aarch64_atomic_exchange<ALLI>): Likewise.
5079 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
5080 operand 0; use aarch64_reg_or_zero for input; merge ...
5081 (@aarch64_atomic_swp<ALLI>): ... this and remove.
5083 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
5084 (aarch64_split_compare_and_swap): Use it.
5085 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
5086 test oldval against the proper predicate.
5087 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
5088 Use nonmemory_operand for expected.
5089 (cas_short_expected_pred): New.
5090 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
5091 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
5092 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
5093 (aarch64_plushi_operand): New.
5095 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
5096 Force oldval into the rval register for TARGET_LSE; emit the compare
5097 during initial expansion so that it may be deleted if unused.
5098 (aarch64_gen_atomic_cas): Remove.
5099 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
5100 Change =&r to +r for operand 0; use match_dup for operand 2;
5101 remove is_weak and mod_f operands as unused. Drop the split
5103 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
5104 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
5105 (@aarch64_atomic_cas<GPI>): Similarly.
5107 2018-10-31 Richard Biener <rguenther@suse.de>
5109 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
5112 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5114 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
5115 * config/aarch64/aarch64.md: Include saphira.md
5116 * config/aarch64/saphira.md: New file for pipeline description.
5118 2018-10-30 Martin Sebor <msebor@redhat.com>
5121 * gimple-ssa-sprintf.c (format_directive): Use %G to include
5123 (sprintf_dom_walker::compute_format_length):
5124 Avoid setting POSUNDER4K here.
5125 (get_destination_size): Handle null argument values.
5126 (get_user_idx_format): New function.
5127 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
5128 functions, including user-defined with attribute format printf.
5129 Use %G to include inlining context.
5130 Set POSUNDER4K here.
5132 2018-10-30 Jan Hubicka <jh@suse.cz>
5134 * params.def (lto-partitions): Bump from 32 to 128.
5136 2018-10-30 Jan Hubicka <jh@suse.cz>
5139 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
5141 (free_lang_data_in_type): Forward declare.
5142 (fld_type_variant_equal_p): New function.
5143 (fld_type_variant): New function
5144 (fld_incomplete_types): New hash.
5145 (fld_incomplete_type_of): New function
5146 (fld_simplfied-type): New function.
5147 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
5148 (free_lang_data): Allocate and free fld_incomplete_type; update call
5149 of free_lang_data_in_decl.
5151 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
5153 * gcov.c (output_lines): Remove duplicate line.
5155 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5157 * config/rs6000/rs6000.md (bswapdi2): Force address into register
5158 if not in indexed or indirect form.
5159 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
5160 (bswapdi2_store): Ditto.
5161 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
5163 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
5164 Prototype for helper function.
5166 2018-10-30 Martin Sebor <msebor@redhat.com>
5168 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
5169 (target, pragma GCC optimize, pragma GCC target): Ditto.
5171 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
5173 * doc/extend.texi: Fix prototype and description of
5174 __builtin_expect_with_probability.
5176 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
5178 * cgraph.h (clone_function_name_1): Replaced by new
5179 clone_function_name_numbered that takes name as string; for
5180 privatize_symbol_name_1 use only.
5181 (clone_function_name): Renamed to
5182 clone_function_name_numbered to be explicit about numbering.
5183 (clone_function_name): New two-argument function that does
5184 not number its output.
5185 (clone_function_name): New three-argument function that
5186 takes a number to append to its output.
5187 * cgraphclones.c (duplicate_thunk_for_node):
5188 (clone_function_name_1): Renamed.
5189 (clone_function_name_numbered): Two new functions.
5190 (clone_function_name): Improved documentation.
5191 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
5192 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
5193 * final.c (final_scan_insn_1): Use the new clone_function_name
5195 * multiple_target.c (create_dispatcher_calls): Ditto.
5196 (create_target_clone): Ditto.
5197 * omp-expand.c (grid_expand_target_grid_body): Ditto.
5198 * omp-low.c (create_omp_child_function_name): Ditto.
5199 * omp-simd-clone.c (simd_clone_create): Ditto.
5200 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
5201 new clone_function_name without numbering.
5203 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
5205 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
5206 Assert that the allocation size is not zero.
5208 2018-10-30 Richard Biener <rguenther@suse.de>
5210 PR tree-optimization/87800
5211 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
5212 non-induction or reduction PHIs.
5214 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
5216 * config/aarch64/falkor-tag-collision-avoidance.c
5217 (execute_tag_collision_avoidance): Call df_note_add_problem.
5219 2018-10-30 Martin Liska <mliska@suse.cz>
5221 * doc/extend.texi: Fix typo in documentation
5222 of __builtin_expect_with_probability.
5224 2018-10-29 David Malcolm <dmalcolm@redhat.com>
5227 * input.c (get_substring_ranges_for_loc): Detect if
5228 linemap_resolve_location gives us a NULL map, and reject
5231 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
5233 * config.gcc (xstormy16-*-elf): Set tm_d_file.
5235 2018-10-29 David Malcolm <dmalcolm@redhat.com>
5236 Martin Sebor <msebor@redhat.com>
5237 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5239 * doc/ux.texi (Quoting): New subsection, adapted from material at
5240 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
5241 MartinSebor and ManuelLopezIbanez.
5242 (Fix-it hints): Note that fix-it hints shouldn't be marked for
5245 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
5248 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
5251 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
5253 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
5255 2018-10-29 Paul Koning <ni1d@arrl.net>
5257 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
5259 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
5261 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
5262 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
5263 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
5264 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
5265 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
5266 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
5267 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
5268 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
5269 Change 'vector' to '__vector'.
5270 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
5271 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
5272 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
5273 _mm_avg_pu16): Likewise. And, whitespace corrections.
5275 2018-10-29 Richard Biener <rguenther@suse.de>
5277 PR tree-optimization/87785
5278 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
5281 2018-10-29 Olivier Hainque <hainque@adacore.com>
5283 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
5285 2018-10-29 Olivier Hainque <hainque@adacore.com>
5287 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
5288 ports configuration macro, defaults to "gnu".
5289 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
5290 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
5292 2018-10-29 Olivier Hainque <hainque@adacore.com>
5294 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
5296 2018-10-29 Richard Biener <rguenther@suse.de>
5298 PR tree-optimization/87790
5299 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
5300 (vect_make_slp_decision): Adjust.
5301 (vect_slp_analyze_bb_1): Likewise.
5302 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
5305 2018-10-29 Richard Biener <rguenther@suse.de>
5307 PR tree-optimization/87785
5308 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
5310 (vect_build_slp_tree): Likewise.
5311 (vect_gather_slp_loads): New function.
5312 (vect_analyze_slp_instance): Gather loads separately from the
5315 2018-10-29 Martin Liska <mliska@suse.cz>
5317 * Makefile.in: Make dependency to json.o.
5318 * doc/gcov.texi: Document new JSON format, remove
5319 old intermediate format documentation.
5320 * gcov.c (struct function_info): Come up with m_name and
5322 (function_info::function_info): Initialize it.
5323 (function_info::~function_info): Release it.
5324 (main): Rename flag_intermediate_format to flag_json_format.
5325 (print_usage): Describe --json-format.
5326 (process_args): Set flag_json_format.
5327 (output_intermediate_line): Remove.
5328 (output_intermediate_json_line): Likewise.
5329 (get_gcov_intermediate_filename): Return new extension
5331 (output_intermediate_file): Implement JSON emission.
5332 (output_json_intermediate_file): Implement JSON emission.
5333 (generate_results): Use ::get_name for function name.
5334 Handle JSON output file.
5335 (read_graph_file): Use ::get_name instead of cplus_demangle.
5336 (read_count_file): Likewise.
5337 (solve_flow_graph): Likewise.
5338 (add_line_counts): Likewise.
5339 (accumulate_line_counts): Use new flag_json_format.
5340 (output_function_details): Use ::get_name instead of cplus_demangle.
5341 (output_lines): Likewise.
5342 * json.cc (test_writing_literals): Add new tests.
5343 * json.h (class literal): Add new boolean constructor.
5345 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
5347 PR rtl-optimization/87701
5348 PR rtl-optimization/87780
5349 * combine.c (make_more_copies): Rewrite.
5351 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
5353 * doc/generic.texi (ABSU_EXPR): Document.
5354 * match.pd (absu(x)*absu(x) -> x*x): Handle.
5355 (absu(absu(X)) -> absu(X)): Likewise.
5356 (absu(-X) -> absu(X)): Likewise.
5357 (absu(X) where X is nonnegative -> X): Likewise.
5359 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
5361 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
5362 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
5363 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
5364 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
5365 (s-tm-texi): Also check timestamp on d-target.def.
5366 (generated_files): Add TM_D_H and d-target-hooks-def.h.
5367 (build/genhooks.o): Also depend on D_TARGET_DEF.
5368 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
5370 * config/aarch64/aarch64-d.c: New file.
5371 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
5373 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
5375 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
5376 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
5377 * config/arm/arm-d.c: New file.
5378 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
5379 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
5380 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5381 * config/arm/t-arm (arm-d.o): New rule.
5382 * config/default-d.c: New file.
5383 * config/glibc-d.c: New file.
5384 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5385 * config/i386/i386-d.c: New file.
5386 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
5387 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
5388 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5389 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
5390 * config/i386/t-i386 (i386-d.o): New rule.
5391 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5392 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5393 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
5394 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5395 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5396 * config/mips/mips-d.c: New file.
5397 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
5398 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
5399 * config/mips/t-mips (mips-d.o): New rule.
5400 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5401 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5402 * config/powerpcspe/powerpcspe-d.c: New file.
5403 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
5405 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5406 Support GNU D by using 0 as the language type.
5407 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
5408 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
5409 * config/riscv/riscv-d.c: New file.
5410 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
5412 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
5413 * config/riscv/t-riscv (riscv-d.o): New rule.
5414 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5415 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5416 * config/rs6000/rs6000-d.c: New file.
5417 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
5419 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5420 Support GNU D by using 0 as the language type.
5421 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
5422 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
5423 * config/s390/s390-d.c: New file.
5424 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
5425 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
5426 * config/s390/t-s390 (s390-d.o): New rule.
5427 * config/sparc/sparc-d.c: New file.
5428 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
5430 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
5431 * config/sparc/t-sparc (sparc-d.o): New rule.
5432 * config/t-glibc (glibc-d.o): New rule.
5433 * configure: Regenerated.
5434 * configure.ac (tm_d_file): New variable.
5435 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
5436 * doc/contrib.texi (Contributors): Add self for the D frontend.
5437 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
5438 * doc/install.texi (Configuration): Mention libphobos as an option for
5439 --enable-shared. Mention d as an option for --enable-languages.
5440 (Testing): Mention check-d as a target.
5441 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
5442 name suffixes. Mention d as a -x option.
5443 * doc/sourcebuild.texi (Top Level): Mention libphobos.
5444 * doc/standards.texi (Standards): Add section on D language.
5445 * doc/tm.texi: Regenerated.
5446 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
5447 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
5448 * dwarf2out.c (is_dlang): New function.
5449 (gen_compile_unit_die): Use DW_LANG_D for D.
5450 (declare_in_namespace): Return module die for D, instead of adding
5451 extra declarations into the namespace.
5452 (gen_namespace_die): Generate DW_TAG_module for D.
5453 (gen_decl_die): Handle CONST_DECLSs for D.
5454 (dwarf2out_decl): Likewise.
5455 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
5456 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
5457 kinds of aggregates.
5458 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
5459 * genhooks.c: Include d/d-target.def.
5461 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
5464 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
5465 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
5466 (STACK_DYNAMIC_OFFSET): Likewise.
5468 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
5471 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
5474 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
5476 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
5477 return type and other typos.
5479 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
5481 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
5482 a shorter sequence with fewer branches.
5483 (emit_final_str_compare_gpr): Ditto.
5485 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
5487 * config/rs6000/tmmintrin.h: New file.
5488 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
5490 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
5492 * config/rs6000/mmintrin.h: Enable 32bit compilation.
5493 * config/rs6000/xmmintrin.h: Likewise.
5495 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
5497 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
5499 2018-10-26 Richard Biener <rguenther@suse.de>
5501 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
5503 (vect_mark_slp_stmts_relevant): Likewise.
5504 (vect_detect_hybrid_slp_stmts): Likewise.
5505 (vect_bb_slp_scalar_cost): Likewise.
5506 (vect_remove_slp_scalar_calls): Likewise.
5508 2018-10-26 Jan Hubicka <jh@suse.cz>
5510 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
5511 (warn_types_mismatch): Fix walk of DECL_NAME.
5512 (odr_types_equivalent_p): Fix overactive assert.
5514 2018-10-26 Richard Biener <rguenther@suse.de>
5516 PR tree-optimization/87105
5517 * tree-vectorizer.h (_slp_tree::refcnt): New member.
5518 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
5520 (vect_create_new_slp_node): Initialize refcnt to one.
5522 (scalar_stmts_set_t, bst_fail): Remove.
5523 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
5524 (vect_build_slp_tree): Add bst_map argument and lookup
5525 already created SLP nodes.
5526 (vect_print_slp_tree): Handle a SLP graph, print SLP node
5528 (vect_slp_rearrange_stmts): Handle a SLP graph.
5529 (vect_analyze_slp_instance): Adjust and free SLP nodes from
5530 the CSE map. Fix indenting.
5531 (vect_schedule_slp_instance): Add short-cut.
5533 2018-10-26 Martin Liska <mliska@suse.cz>
5536 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
5537 addr_expr and not with pointers.
5539 2018-10-26 Jan Hubicka <jh@suse.cz>
5541 * tree.c (free_lang_data_in_type): Only check main variants.
5542 * ipa-devirt.c (warn_odr): Make static.
5543 (types_same_for_odr): Drop strict variant.
5544 (types_odr_comparable): Likewise.
5545 (odr_or_derived_type_p): Look for main variants.
5546 (odr_name_hasher::equal): Cleanup comment.
5547 (odr_subtypes_equivalent): Add warn and warned arguments; check main
5549 (type_variants_equivalent_p): break out from ...
5550 (odr_types_equivalent): ... here; go for main variants where needed.
5551 (warn_odr): ... here; turn static.
5552 (warn_types_mismatch): Compare mangled names of main variants.
5553 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
5554 (type_with_linkage_p): Sanity check that we look at main variant.
5555 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
5556 * tree.h (types_same_for_odr): Drop strict argument.
5558 2018-10-26 Richard Biener <rguenther@suse.de>
5560 PR tree-optimization/87746
5561 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
5562 Simplify and fix WRT strided store groups with size not
5563 equal to step in element count.
5564 (vect_analyze_group_access_1): Dump the whole group.
5566 2018-10-25 Carl Love <cel@us.ibm.com>
5568 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
5569 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
5570 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
5571 precicion entry for each overloaded builtin.
5572 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
5573 VSCEDPUO): Rename overloaded name.
5574 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
5575 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
5576 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
5577 define_expand for xscmpexqp instruction.
5578 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
5580 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
5581 Jinsong Ji <jji@us.ibm.com>
5583 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
5584 function with vec_sl.
5585 (_mm_slli_epi32): Likewise.
5586 (_mm_slli_epi64): Likewise.
5587 (_mm_srai_epi16): Replace deprecated function with vec_sra.
5588 (_mm_srai_epi32): Likewise.
5589 (_mm_srli_epi16): Replace deprecated function with vec_sr.
5590 (_mm_srli_epi32): Likewise.
5591 (_mm_srli_epi64): Likewise.
5592 (_mm_sll_epi16): Replace deprecated function with vec_sl.
5593 (_mm_sll_epi32): Likewise.
5594 (_mm_sll_epi64): Likewise.
5595 (_mm_sra_epi16): Replace deprecated function with vec_sra.
5596 (_mm_sra_epi32): Likewise.
5597 (_mm_srl_epi16): Replace deprecated function with vec_sr.
5598 (_mm_srl_epi32): Likewise.
5599 (_mm_srl_epi64): Likewise.
5601 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
5602 Jinsong Ji <jji@us.ibm.com>
5604 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
5605 comparison operators with vec_cmp* for compatibility due to
5606 unfortunate history; clean up formatting and use types more
5608 (_mm_sll_epi32): Likewise.
5609 (_mm_sll_epi64): Likewise.
5610 (_mm_srl_epi16): Likewise.
5611 (_mm_srl_epi32): Likewise.
5612 (_mm_srl_epi64): Likewise.
5614 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
5615 Jinsong Ji <jji@us.ibm.com>
5617 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
5618 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
5619 __vector __bool int. Use vec_cmpgt in preference to deprecated
5620 function vec_vcmpgtfp.
5621 (_mm_max_ps): Likewise.
5623 2018-10-25 Jeff Law <law@redhat.com>
5625 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
5628 2018-10-25 Martin Sebor <msebor@redhat.com>
5630 * doc/extend.texi (aligned): Expand attribute description.
5631 (Alignment): Rename section. Discuss function arguments.
5633 2018-10-25 Jan Hubicka <jh@suse.cz>
5635 * ipa-devirt.c (main_odr_variant): Remove.
5636 (hash_odr_name, types_same_for_odr, types_odr_comparable,
5637 odr_name_hasher::equal, odr_subtypes_equivalent_p):
5638 Drop use of main_odr_variant.
5639 (add_type_duplicate): Silence confused warnings on integer types.
5640 (get_odr_type): Always look for main variant.
5641 (register_odr_type): Simplify.
5643 2018-10-25 Richard Biener <rguenther@suse.de>
5645 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
5646 Initialize ng to silence error with release checking bootstrap.
5648 2018-10-25 Richard Biener <rguenther@suse.de>
5650 * tree-if-conv.c: Include tree-ssa-sccvn.h.
5651 (tree_if_conversion): Run CSE on the if-converted loop body.
5653 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
5655 * config/s390/constraints.md (ZL): New constraint.
5656 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
5658 * config/s390/s390.md (movdi_larl): Remove.
5659 (movdi_64): Add the LARL alternative.
5661 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
5664 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
5665 (RTX_CODE_HWINT_P): New macro.
5666 (rtx_code_size): Use RTX_CODE_HWINT_P ().
5668 2018-10-25 Jan Hubicka <jh@suse.cz>
5670 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
5673 2018-10-25 Richard Biener <rguenther@suse.de>
5675 PR tree-optimization/87665
5676 PR tree-optimization/87745
5677 * tree-vectorizer.h (get_earlier_stmt): Remove.
5678 (get_later_stmt): Pick up UID from the original non-pattern stmt.
5680 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
5682 * options.texi (Deprecated): Move list to Var section.
5684 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
5685 Jinsong Ji <jji@us.ibm.com>
5687 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
5688 __vector long to __vector long long.
5689 (_mm_cvtpd_ps): Likewise.
5690 (_mm_cvttpd_epi32): Likewise.
5691 (_mm_cvtpi32_pd): Likewise.
5692 (_mm_unpackhi_epi64): Likewise.
5693 (_mm_unpacklo_epi64): Likewise.
5695 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
5697 PR rtl-optimization/87720
5698 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
5700 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
5702 * gimple-ssa-isolate-paths.c
5703 (find_implicit_erroneous_behavior): Do not change code if the
5704 pass is running for warnings only.
5705 (find_explicit_erroneous_behavior): Likewise.
5707 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
5709 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
5710 Define as rs6000_mangle_decl_assembler_name.
5711 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
5712 long double to IEEE long double, switch the names of the long
5713 double built-in functions to be <func>f128 instead of <func>l.
5715 2018-10-24 Martin Sebor <msebor@redhat.com>
5717 * doc/extend.texi (nonnull): List no-argument form. Reference
5718 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
5720 2018-10-24 Richard Biener <rguenther@suse.de>
5722 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
5724 2018-10-24 Martin Liska <mliska@suse.cz>
5726 PR tree-optimization/84436
5727 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
5729 (switch_conversion::contains_linear_function_p): New.
5730 (switch_conversion::build_one_array): Support linear
5731 transformation on input.
5732 * tree-switch-conversion.h (struct switch_conversion): Add
5733 contains_linear_function_p declaration.
5735 2018-10-24 Richard Biener <rguenther@suse.de>
5737 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
5738 if its argument is CONSTANT_CLASS_P.
5740 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
5742 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
5743 it is wrong for forward declarations.
5745 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
5747 * config/s390/s390.c (s390_check_qrst_address): Add the missing
5748 SYMBOL_REF_P () check.
5750 2018-10-24 Richard Biener <rguenther@suse.de>
5752 PR tree-optimization/87105
5753 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
5754 dump classification.
5755 (vect_analyze_data_ref_accesses): Handle duplicate loads and
5756 stores by splitting the affected group after the fact.
5757 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
5758 fail the SLP build because of size constraints.
5760 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5762 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
5763 * configure: Regenerate.
5764 * config.in: Regenerate.
5765 * varasm.c (mergeable_string_section): Use readonly_data_section
5766 if linker doesn't support SHF_MERGE with alignment > 8.
5767 (mergeable_constant_section): Likewise.
5769 2018-10-24 Richard Biener <rguenther@suse.de>
5771 PR tree-optimization/84013
5772 * tree-ssa-structalias.c (struct msdi_data): New struct for
5773 marshalling data to walk_stmt_load_store_ops.
5774 (maybe_set_dependence_info): Refactor as callback for
5775 walk_stmt_load_store_ops.
5776 (compute_dependence_clique): Set restrict info on all stmt kinds.
5778 2018-10-24 Martin Liska <mliska@suse.cz>
5780 * cgraph.c (cgraph_node::dump):
5781 Remove reduntant dumps and make tp_first_run dump more compact.
5783 2018-10-24 Richard Biener <rguenther@suse.de>
5785 PR tree-optimization/87665
5786 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
5789 2018-10-12 Jeff Law <law@redhat.com>
5791 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
5794 2018-10-23 Richard Biener <rguenther@suse.de>
5796 * tree-vrp.c (add_assert_info): Guard dump_printf with
5798 * gimple-ssa-evrp-analyze.c
5799 (evrp_range_analyzer::record_ranges_from_incoming_edge):
5800 Use value_range::ignore_equivs_equal_p.
5802 2018-10-23 Richard Biener <rguenther@suse.de>
5804 PR tree-optimization/87105
5805 PR tree-optimization/87608
5806 * passes.def (pass_all_early_optimizations): Add early phi-opt
5808 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
5809 addition to debug stmts.
5810 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
5811 and abs replacement early.
5812 * tree-cfg.c (gimple_empty_block_p): Likewise.
5814 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
5817 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
5818 specified to configure.
5819 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
5821 2018-10-23 Richard Biener <rguenther@suse.de>
5823 PR tree-optimization/87700
5824 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
5826 2018-10-23 Jakub Jelinek <jakub@redhat.com>
5829 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
5830 second argument from __mmask16 to __mmask8.
5831 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
5832 _mm_mask_packs_epi32): Likewise.
5833 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
5835 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
5837 2018-10-23 Richard Biener <rguenther@suse.de>
5839 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
5841 2018-10-23 Richard Biener <rguenther@suse.de>
5843 PR tree-optimization/86144
5844 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
5845 over simd attribute.
5847 2018-10-23 Richard Biener <rguenther@suse.de>
5849 PR tree-optimization/87693
5850 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
5851 the case we do not find the taken edge.
5853 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
5854 Jinsong Ji <jji@us.ibm.com>
5856 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
5857 (_mm_store_pd): Use unaligned vector type for pointer cast.
5858 (_mm_maskmoveu_si128): Likewise.
5859 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
5860 (_mm_store_ps): Use unaligned vector type for pointer cast.
5862 2018-10-22 Paul Koning <ni1d@arrl.net>
5864 * symtab.c (symtab_node::increase_alignment): Correct max
5867 2018-10-22 Yury Gribov <tetra2005@gmail.com>
5869 PR tree-optimization/87633
5870 * match.pd: Do not generate unordered integer comparisons.
5872 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
5874 PR rtl-optimization/87600
5875 * combine.c: Add include of expr.h.
5876 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
5877 register to a pseudo.
5878 (make_more_copies): New function, add a copy to a new pseudo after
5879 the moves from hard registers into pseudos.
5880 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
5881 later. Call make_more_copies.
5883 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
5885 * lra-constraints.c (process_alt_operands): New local array,
5886 matching_early_clobber. Check matching_early_clobber before
5887 decrementing reject, and set matching_early_clobber after.
5889 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
5892 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
5893 call output_addr_const and hope for the best.
5895 2018-10-22 Richard Biener <rguenther@suse.de>
5897 * gimple-ssa-evrp-analyze.c
5898 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
5899 smarter about what ranges to use.
5900 * tree-vrp.c (add_assert_info): Dump here.
5901 (register_edge_assert_for_2): Instead of here at multiple but
5904 * gcc.dg/tree-ssa/evrp12.c: New testcase.
5905 * gcc.dg/predict-6.c: Adjust.
5906 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
5907 * gcc.dg/tree-ssa/vrp02.c: Likewise.
5908 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
5910 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
5911 Richard Biener <rguenther@suse.de>
5913 * bitmap.h: Update data structure documentation, including a
5914 description of bitmap views as either linked-lists or splay trees.
5915 (struct bitmap_element_def): Update comments for splay tree bitmaps.
5916 (struct bitmap_head_def): Likewise.
5917 (bitmap_list_view, bitmap_tree_view): New prototypes.
5918 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
5920 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
5921 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
5922 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
5923 released bitmap element here.
5924 (bitmap_element_free): Remove.
5925 (bitmap_elt_clear_from): Work on splay tree bitmaps.
5926 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
5927 this function similar ones such that linked-list bitmap implementation
5928 functions are grouped.
5929 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
5930 and moved for grouping.
5931 (bitmap_list_insert_element_after): Renamed from
5932 bitmap_elt_insert_after, and moved for grouping.
5933 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
5934 (bitmap_tree_link_left, bitmap_tree_link_right,
5935 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
5936 bitmap_tree_link_element, bitmap_tree_unlink_element,
5937 bitmap_tree_find_element): New functions for splay-tree bitmap
5939 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
5940 Renamed and moved, see above entries.
5941 (bitmap_tree_listify_from): New function to convert part of a splay
5942 tree bitmap to a linked-list bitmap.
5943 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
5944 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
5945 (bitmap_find_bit): Remove.
5946 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
5947 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
5948 Handle splay tree bitmaps.
5949 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
5950 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
5951 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
5952 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
5953 bitmap_intersect_compl_p, bitmap_ior_and_compl,
5954 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
5955 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
5956 corresponding changes to use linked-list specific bitmap_element
5957 manipulation functions as applicable for efficiency.
5958 (bitmap_tree_to_vec): New function.
5959 (debug_bitmap_elt_file): New function split out from ...
5960 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
5961 (bitmap_print): Likewise.
5963 PR tree-optimization/63155
5964 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
5966 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
5969 2018-10-22 Martin Liska <mliska@suse.cz>
5971 PR tree-optimization/87686
5973 2018-08-29 Martin Liska <mliska@suse.cz>
5975 * tree-switch-conversion.c (switch_conversion::expand):
5976 Strenghten assumption about gswitch statements.
5978 2018-10-22 Martin Liska <mliska@suse.cz>
5980 * ipa-icf.c (sem_item::compare_attributes): Remove.
5981 (sem_item::compare_referenced_symbol_properties): Use
5982 attribute_list_equal instead.
5983 (sem_function::equals_wpa): Likewise.
5984 * ipa-icf.h: Remove compare_attributes.
5986 2018-10-22 Richard Biener <rguenther@suse.de>
5989 * mem-stats.h (mem_usage::operator==): Fix pasto.
5991 2018-10-22 Richard Biener <rguenther@suse.de>
5993 PR tree-optimization/87640
5994 * tree-vrp.c (set_value_range_with_overflow): Decompose
5996 (extract_range_from_binary_expr_1): Adjust.
5998 2018-10-22 Martin Jambor <mjambor@suse.cz>
6000 * tree-eh.h (stmt_could_throw_p): Add function parameter.
6001 (stmt_can_throw_external): Likewise.
6002 (stmt_can_throw_internal): Likewise.
6003 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
6004 (lower_eh_constructs_2): Likewise.
6005 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
6006 (stmt_can_throw_external): Likewise.
6007 (stmt_can_throw_internal): Likewise.
6008 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
6009 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
6010 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
6011 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
6012 (pass_lower_eh_dispatch::execute): Pass cfun to
6013 stmt_can_throw_external.
6014 (cleanup_empty_eh): Likewise.
6015 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
6016 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
6017 stmt_can_throw_external instead of pushing it to cfun.
6018 (symbol_table::create_edge): Likewise.
6019 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
6020 stmt_can_throw_internal.
6021 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
6022 to stmt_could_throw_p.
6023 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
6024 stmt_can_throw_internal.
6025 (pass_store_merging::execute): Likewise.
6026 * gimple-ssa-strength-reduction.c
6027 (find_candidates_dom_walker::before_dom_children): Pass cfun to
6029 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
6030 stmt_can_throw_internal.
6031 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
6032 to stmt_can_throw_external.
6033 (check_stmt): Pass cfun to stmt_could_throw_p.
6034 (check_stmt): Pass cfun to stmt_can_throw_external.
6035 (pass_nothrow::execute): Likewise.
6036 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
6037 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
6038 stmt_can_throw_internal.
6039 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
6040 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
6041 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
6042 * tree-complex.c (expand_complex_libcall): Pass cfun to
6043 stmt_could_throw_p and to stmt_can_throw_internal.
6044 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
6045 * tree-inline.c (copy_edges_for_bb): Likewise.
6046 (maybe_move_debug_stmts_to_successors): Likewise.
6047 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
6049 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
6050 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
6051 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
6052 stmt_can_throw_internal.
6053 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
6054 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
6056 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
6057 stmt_can_throw_internal.
6058 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
6059 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
6061 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
6062 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
6063 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6064 (convert_mult_to_fma_1): Likewise.
6065 (convert_to_divmod): Likewise.
6066 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
6067 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
6068 * tree-ssa-propagate.c
6069 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
6070 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
6071 (maybe_optimize_range_tests): Likewise.
6072 (linearize_expr_tree): Likewise.
6073 (reassociate_bb): Likewise.
6074 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6075 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
6076 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
6077 (handle_char_store): Likewise.
6078 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
6079 stmt_can_throw_internal.
6080 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
6082 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6083 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
6084 (vectorizable_simd_clone_call): Likewise.
6085 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
6086 (gimple_stringop_fixed_value): Likewise.
6088 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
6090 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
6091 literal pool references.
6092 (s390_check_qrst_address): Adapt to the new behavior of
6093 s390_loadrelative_operand_p ().
6095 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
6098 * config/i386/sse.md (*andnot<mode>3_bcst): New.
6100 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
6103 * config/i386/sse.md (*<code><mode>3_bcst): New.
6105 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
6108 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
6109 V4DI, V16SI and V8DI.
6110 (*sub<mode>3<mask_name>_bcst): New.
6111 (*add<mode>3<mask_name>_bcst): Likewise.
6113 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
6114 Jinsong Ji <jji@us.ibm.com>
6116 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
6117 __m64 with __vector unsigned long long for compatibility.
6118 (_mm_movemask_epi8): Likewise.
6119 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
6120 (_mm_cvttps_pi32): Likewise.
6121 (_mm_cvtpi32_ps): Likewise.
6122 (_mm_cvtps_pi16): Likewise.
6123 (_mm_loadh_pi): Likewise.
6124 (_mm_storeh_pi): Likewise.
6125 (_mm_movehl_ps): Likewise.
6126 (_mm_movelh_ps): Likewise.
6127 (_mm_loadl_pi): Likewise.
6128 (_mm_storel_pi): Likewise.
6129 (_mm_movemask_ps): Likewise.
6130 (_mm_shuffle_pi16): Likewise.
6132 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6135 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
6136 __builtin_ia32_vfnmsubpd512_mask.
6137 (_mm512_mask_fnmsub_round_pd): Likewise.
6138 (_mm512_fnmsub_pd): Likewise.
6139 (_mm512_mask_fnmsub_pd): Likewise.
6140 (_mm512_maskz_fnmsub_round_pd): Use
6141 __builtin_ia32_vfnmsubpd512_maskz.
6142 (_mm512_maskz_fnmsub_pd): Likewise.
6143 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
6144 (_mm512_mask_fnmsub_round_ps): Likewise.
6145 (_mm512_fnmsub_ps): Likewise.
6146 (_mm512_mask_fnmsub_ps): Likewise.
6147 (_mm512_maskz_fnmsub_round_ps): Use
6148 __builtin_ia32_vfnmsubps512_maskz.
6149 (_mm512_maskz_fnmsub_ps): Likewise.
6150 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
6151 __builtin_ia32_vfnmsubpd256_mask.
6152 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
6153 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6154 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
6155 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6156 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6157 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
6158 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
6159 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
6160 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
6161 __builtin_ia32_vfnmsubpd.
6162 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
6163 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
6164 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
6165 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
6166 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
6167 * config/i386/i386-builtin.def: Add
6168 __builtin_ia32_vfnmsubpd256_mask,
6169 __builtin_ia32_vfnmsubpd256_maskz,
6170 __builtin_ia32_vfnmsubpd128_mask,
6171 __builtin_ia32_vfnmsubpd128_maskz,
6172 __builtin_ia32_vfnmsubps256_mask,
6173 __builtin_ia32_vfnmsubps256_maskz,
6174 __builtin_ia32_vfnmsubps128_mask,
6175 __builtin_ia32_vfnmsubps128_maskz,
6176 __builtin_ia32_vfnmsubpd512_mask,
6177 __builtin_ia32_vfnmsubpd512_maskz,
6178 __builtin_ia32_vfnmsubps512_mask,
6179 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
6180 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
6181 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
6182 __builtin_ia32_vfnmsubpd256.
6183 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
6184 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
6185 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
6187 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
6189 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
6191 (fmai_vmfnmsub_<mode><round_name>): Likewise.
6193 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6196 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
6197 __builtin_ia32_vfnmaddpd512_mask.
6198 (_mm512_mask_fnmadd_round_pd): Likewise.
6199 (_mm512_fnmadd_pd): Likewise.
6200 (_mm512_mask_fnmadd_pd): Likewise.
6201 (_mm512_maskz_fnmadd_round_pd): Use
6202 __builtin_ia32_vfnmaddpd512_maskz.
6203 (_mm512_maskz_fnmadd_pd): Likewise.
6204 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
6205 (_mm512_mask_fnmadd_round_ps): Likewise.
6206 (_mm512_fnmadd_ps): Likewise.
6207 (_mm512_mask_fnmadd_ps): Likewise.
6208 (_mm512_maskz_fnmadd_round_ps): Use
6209 __builtin_ia32_vfnmaddps512_maskz.
6210 (_mm512_maskz_fnmadd_ps): Likewise.
6211 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
6212 __builtin_ia32_vfnmaddpd256_mask.
6213 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
6214 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
6215 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
6216 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6217 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6218 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
6219 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
6220 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
6221 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
6222 __builtin_ia32_vfnmaddpd.
6223 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
6224 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
6225 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
6226 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
6227 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
6228 * config/i386/i386-builtin.def: Add
6229 __builtin_ia32_vfnmaddpd256_mask,
6230 __builtin_ia32_vfnmaddpd256_maskz,
6231 __builtin_ia32_vfnmaddpd128_mask,
6232 __builtin_ia32_vfnmaddpd128_maskz,
6233 __builtin_ia32_vfnmaddps256_mask,
6234 __builtin_ia32_vfnmaddps256_maskz,
6235 __builtin_ia32_vfnmaddps128_mask,
6236 __builtin_ia32_vfnmaddps128_maskz,
6237 __builtin_ia32_vfnmaddpd512_mask,
6238 __builtin_ia32_vfnmaddpd512_maskz,
6239 __builtin_ia32_vfnmaddps512_mask,
6240 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
6241 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
6242 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
6243 __builtin_ia32_vfnmaddpd256.
6244 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
6245 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
6246 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
6248 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
6250 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
6252 (fmai_vmfnmadd_<mode><round_name>): Likewise.
6254 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6257 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
6258 __builtin_ia32_vfmsubpd512_mask.
6259 (_mm512_mask_fmsub_round_pd): Likewise.
6260 (_mm512_fmsub_pd): Likewise.
6261 (_mm512_mask_fmsub_pd): Likewise.
6262 (_mm512_maskz_fmsub_round_pd): Use
6263 __builtin_ia32_vfmsubpd512_maskz.
6264 (_mm512_maskz_fmsub_pd): Likewise.
6265 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
6266 (_mm512_mask_fmsub_round_ps): Likewise.
6267 (_mm512_fmsub_ps): Likewise.
6268 (_mm512_mask_fmsub_ps): Likewise.
6269 (_mm512_maskz_fmsub_round_ps): Use
6270 __builtin_ia32_vfmsubps512_maskz.
6271 (_mm512_maskz_fmsub_ps): Likewise.
6272 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
6273 __builtin_ia32_vfmsubpd256_mask.
6274 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
6275 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6276 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
6277 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6278 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6279 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
6280 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
6281 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
6282 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
6283 __builtin_ia32_vfmsubpd.
6284 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
6285 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
6286 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
6287 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
6288 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
6289 * config/i386/i386-builtin.def: Add
6290 __builtin_ia32_vfmsubpd256_mask,
6291 __builtin_ia32_vfmsubpd256_maskz,
6292 __builtin_ia32_vfmsubpd128_mask,
6293 __builtin_ia32_vfmsubpd128_maskz,
6294 __builtin_ia32_vfmsubps256_mask,
6295 __builtin_ia32_vfmsubps256_maskz,
6296 __builtin_ia32_vfmsubps128_mask,
6297 __builtin_ia32_vfmsubps128_maskz,
6298 __builtin_ia32_vfmsubpd512_mask,
6299 __builtin_ia32_vfmsubpd512_maskz,
6300 __builtin_ia32_vfmsubps512_mask,
6301 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
6302 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
6303 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
6304 __builtin_ia32_vfmsubpd256.
6305 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
6306 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
6307 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
6309 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
6311 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
6313 (fmai_vmfmsub_<mode><round_name>): Likewise.
6315 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6317 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
6318 Remove plus. Renamed to ...
6319 (*sub<mode>3<mask_name>_bcst): This.
6320 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
6321 (*add<mode>3<mask_name>_bcst): This.
6323 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6326 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
6328 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
6331 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
6332 (_mm_or_epi32): Likewise.
6333 (_mm256_xor_epi32): Likewise.
6334 (_mm_xor_epi32): Likewise.
6335 (_mm256_or_epi64): Likewise.
6336 (_mm_or_epi64): Likewise.
6337 (_mm256_xor_epi64): Likewise.
6338 (_mm_xor_epi64): Likewise.
6340 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
6343 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
6345 2018-10-20 Jakub Jelinek <jakub@redhat.com>
6348 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
6350 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
6352 * doc/ux.texi: Move @section directly after @node.
6354 2018-10-19 Jakub Jelinek <jakub@redhat.com>
6358 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
6359 depend closely nested inside of loop with ordered clause with
6362 2018-10-19 David Malcolm <dmalcolm@redhat.com>
6364 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
6365 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
6366 * doc/ux.texi: New file.
6368 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
6370 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
6371 be the first CR field allocated.
6373 2018-10-19 Richard Biener <rguenther@suse.de>
6376 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
6377 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
6379 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
6382 * config/i386/sse.md
6383 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
6384 (*add<mode>3<mask_name>_bcst_2): Likewise.
6386 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
6388 * config/i386/sse.md
6389 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6390 Replace nonimmediate_operand with register_operand.
6391 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6393 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6396 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
6398 PR rtl-optimization/87596
6399 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
6400 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
6401 for instructions in FROM..TO range.
6403 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
6405 * cfgexpand.c (expand_one_var): Use specific wording in error message
6406 for non-local frame variables.
6407 * stor-layout.c (layout_decl): Do not issue a warning for them.
6409 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
6411 * haifa-sched.c (priority): Add force_recompute parameter.
6412 (apply_replacement): Call priority () with force_recompute = true.
6413 (restore_pattern): Likewise.
6415 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
6417 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
6418 HOST_BITS_PER_WIDE_INT.
6419 (test_vector_ops_duplicate): Likewise.
6421 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
6424 * config/i386/sse.md (VF_AVX512): New.
6425 (avx512bcst): Likewise.
6426 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6428 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6430 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6433 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
6435 * doc/invoke.texi (-dumpversion): Improve grammar.
6436 (-dumpfullversion): Make more consistent with -dumpversion.
6438 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
6440 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
6441 Set JUMP_LABEL to the jump insn.
6442 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
6443 Predict emitted jump and add label to jump insn.
6445 2018-10-18 David Malcolm <dmalcolm@redhat.com>
6447 PR tree-optimization/87562
6448 * input.c (get_substring_ranges_for_loc): Use
6449 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
6450 getting the linemap for the endpoint. Verify that it's either
6451 in the same linemap as the start point's spelling location, or
6452 at least in the same file.
6454 2018-10-18 Richard Biener <rguenther@suse.de>
6456 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
6457 feed width-specific load/store costs through ix86_vec_cost.
6458 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
6459 (k8_cost): Likewise.
6460 (bdver_cost): Likewise.
6461 (znver1_cost): Likewise.
6462 (btver1_cost): Likewise.
6463 (btver2_cost): Likewise.
6465 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
6467 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
6468 to simplify subreg of vec_merge.
6470 2018-10-18 Richard Biener <rguenther@suse.de>
6472 * config/i386/i386.c: Fix costing of vector FMA.
6474 2018-10-18 Richard Biener <rguenther@suse.de>
6476 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
6478 (ix86_builtin_vectorization_cost): For vec_construct properly
6479 cost insertion into SSE regs.
6480 (...): Adjust calls to ix86_vec_cost.
6482 2018-10-18 Richard Biener <rguenther@suse.de>
6486 2018-02-07 Richard Biener <rguenther@suse.de>
6488 PR tree-optimization/84204
6489 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
6492 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
6495 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
6497 (test_vector_ops_duplicate): Add test for a scalar subreg of a
6498 VEC_MERGE of a VEC_DUPLICATE.
6500 2018-10-17 Joseph Myers <joseph@codesourcery.com>
6502 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
6503 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
6504 * doc/standards.texi (C Language): Document C2X.
6505 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
6506 (rl78_option_override): Handle "GNU C2X" language name.
6508 2018-10-17 Joseph Myers <joseph@codesourcery.com>
6510 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
6511 Document C17 as published in 2018.
6513 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
6516 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
6517 bail out if both sides do not have the same storage order.
6519 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
6521 * bitmap.c (bitmap_head::dump): New.
6522 * bitmap.h (bitmap_head): Add dump().
6523 * gimple-ssa-evrp-analyze.c
6524 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
6525 (evrp_range_analyzer::set_ssa_range_info): Same.
6526 (evrp_range_analyzer::record_ranges_from_phis): Same.
6527 (evrp_range_analyzer::record_ranges_from_stmt): Same.
6528 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
6529 * gimple-ssa-sprintf.c (get_int_range): Same.
6530 (format_integer): Same.
6531 (sprintf_dom_walker::handle_gimple_call): Same.
6532 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
6533 (ipcp_vr_lattice::top_p): Same.
6534 (ipcp_vr_lattice::bottom_p): Same.
6535 (ipcp_vr_lattice::set_to_bottom): Same.
6536 (ipa_vr_operation_and_type_effects): Same.
6537 (propagate_vr_across_jump_function): Same.
6538 (ipcp_store_vr_results): Same.
6539 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
6540 (ipa_print_node_jump_functions_for_edge): Same.
6541 (ipa_get_value_range): Same.
6542 (ipa_compute_jump_functions_for_edge): Same.
6543 (ipa_write_jump_function): Same.
6544 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
6545 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
6547 * vr-values.c (set_value_range_to_nonnegative): Same.
6548 (set_value_range_to_truthvalue): Same.
6549 (vr_values::get_value_range): Same.
6550 (vr_values::set_defs_to_varying): Same.
6551 (vr_values::update_value_range): Same.
6552 (symbolic_range_based_on_p): Same.
6553 (vr_values::op_with_boolean_value_range_p): Same.
6554 (vr_values::extract_range_for_var_from_comparison_expr): Same.
6555 (vr_values::extract_range_from_ssa_name): Same.
6556 (vr_values::extract_range_from_binary_expr): Same.
6557 (vr_values::extract_range_from_unary_expr): Same.
6558 (vr_values::extract_range_from_cond_expr): Same.
6559 (vr_values::extract_range_from_comparison): Same.
6560 (vr_values::check_for_binary_op_overflow): Same.
6561 (vr_values::extract_range_basic): Same.
6562 (vr_values::extract_range_from_assignment): Same.
6563 (compare_ranges): Same.
6564 (compare_range_with_value): Same.
6565 (vr_values::adjust_range_with_scev): Same.
6566 (vrp_valueize): Same.
6567 (vrp_valueize_1): Same.
6568 (vr_values::get_vr_for_comparison): Same.
6569 (vr_values::compare_name_with_value): Same.
6570 (vr_values::compare_names): Same.
6571 (vr_values::vrp_evaluate_conditional): Same.
6572 (find_case_label_ranges): Same.
6573 (vr_values::vrp_visit_switch_stmt): Same.
6574 (vr_values::extract_range_from_phi_node): Same.
6575 (vr_values::simplify_div_or_mod_using_ranges): Same.
6576 (vr_values::simplify_bit_ops_using_ranges): Same.
6577 (test_for_singularity): Same.
6578 (range_fits_type_p): Same.
6579 (vr_values::simplify_cond_using_ranges_1): Same.
6580 (vr_values::simplify_switch_using_ranges): Same.
6581 (vr_values::simplify_float_conversion_using_ranges): Same.
6582 (vr_values::two_valued_val_range_p): Same.
6583 (vr_values::add_equivalence): Move to value_range::equiv_add.
6584 * vr-values.h (vr_values::add_equivalence): Remove.
6585 (VR_INITIALIZER): Remove.
6586 * tree-vrp.c (value_range::set): New.
6587 (value_range::equiv_add): New.
6588 (value_range::value_range): New.
6589 (value_range::deep_copy): New.
6590 (value_range::check): New.
6591 (value_range::equal_p): New.
6592 (value_range::ignore_equivs_equal_p): New.
6593 (value_range::operator==): New.
6594 (value_range::operator!=): New.
6595 (value_range::symbolic_p): New.
6596 (value_range::numeric_p): New.
6597 (value_range::set_undefined): New.
6598 (value_range::set_varying): New.
6599 (value_range::may_contain_p): New.
6600 (value_range::equiv_clear): New.
6601 (value_range::singleton_p): New.
6602 (value_range::intersect): New.
6603 (value_range::dump): New.
6604 (value_range::set_and_canonicalize): New.
6605 (set_value_range): Adjust for value_range API.
6606 (set_value_range_to_undefined): Same.
6607 (set_value_range_to_varying): Same.
6608 (set_and_canonicalize_value_range): Same.
6609 (set_value_range_to_nonnull): Same.
6610 (set_value_range_to_null): Same.
6611 (range_is_null): Same.
6612 (range_is_nonnull): Same.
6613 (range_int_cst_p): Same.
6614 (range_int_cst_singleton_p): Same.
6615 (symbolic_range_p): Same.
6616 (range_includes_zero_p): Same.
6617 (value_range_constant_singleton): Same.
6618 (vrp_set_zero_nonzero_bits): Same.
6619 (ranges_from_anti_range): Same.
6620 (extract_range_into_wide_ints): Same.
6621 (extract_range_from_multiplicative_op): Same.
6622 (set_value_range_with_overflow): Same.
6623 (extract_range_from_binary_expr_1): Same.
6624 (extract_range_from_unary_expr): Same.
6625 (dump_value_range): Same.
6626 (debug_value_range): Same.
6627 (vrp_prop::check_array_ref): Same.
6628 (vrp_prop::check_mem_ref): Same.
6629 (vrp_prop::vrp_initialize): Same.
6630 (vrp_prop::visit_stmt): Same.
6631 (intersect_ranges): Same.
6632 (vrp_prop::visit_phi): Same.
6633 (vrp_prop::vrp_finalize): Same.
6634 (determine_value_range_1): Same.
6635 (determine_value_range): Same.
6636 (vrp_intersect_ranges_1): Rename to...
6637 (vrp_intersect_1): this.
6638 (vrp_intersect_ranges): Rename to...
6639 (value_range::intersect_helper): ...this.
6640 (vrp_meet_1): Rename to...
6641 (value_range::union_helper): ...this.
6642 (vrp_meet): Rename to...
6643 (value_range::union_): ...this.
6644 (copy_value_range): Remove.
6645 * tree-vrp.h (struct value_range): Rewrite into a proper class.
6646 (value_range::vrtype): New.
6647 (value_range::type): New.
6648 (value_range::equiv): New.
6649 (value_range::min): New.
6650 (value_range::max): New.
6651 (value_range::varying_p): New.
6652 (value_range::undefined_p): New.
6653 (value_range::null_p): New.
6654 (value_range::equiv_add): New.
6655 (copy_value_range): Remove.
6657 2018-10-17 David Malcolm <dmalcolm@redhat.com>
6659 * Makefile.in (SELFTEST_TARGETS): New.
6660 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
6661 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
6662 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
6664 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
6665 (selftest-c++-gdb, selftest-c++-valgrind): Move to
6667 * configure: Regenerate.
6668 * configure.ac (selftest_languages): New.
6670 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
6672 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
6673 overflow wraps argument.
6674 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
6675 wide_int_range_multiplicative_op.
6676 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
6677 overflow wraps argument.
6678 (wide_int_range_multiplicative_op): Same.
6679 (wide_int_range_lshift): Same.
6680 (wide_int_range_div): Same.
6681 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
6682 (wide_int_range_lshift): Same.
6683 (wide_int_range_div): Same.
6685 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
6687 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
6688 use sign as argument.
6689 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
6690 wide_int_range_shift_undefined_p.
6692 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6694 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
6696 (@despeculate_copy<ALLI_TI:mode>): ... This.
6697 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
6700 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6702 * config.gcc: Obsolete *-*-solaris2.10*.
6703 * doc/install.texi (Specific, *-*-solaris2*): Document it.
6705 2018-10-12 Jeff Law <law@redhat.com>
6707 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
6708 reg + sym +- const_int addressing modes.
6710 2018-10-15 David Malcolm <dmalcolm@redhat.com>
6712 * common.opt (fdiagnostics-minimum-margin-width=): New option.
6713 * diagnostic-show-locus.c (layout::layout): Apply the minimum
6715 (layout::start_annotation_line): Only print up to 3 of the
6716 margin character, to avoid touching the left-hand side.
6717 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
6718 minimum margin width, as set by test_diagnostic_context's ctor.
6719 (selftest::test_fixit_insert_containing_newline): Likewise.
6720 (selftest::test_fixit_insert_containing_newline_2): Likewise.
6721 (selftest::test_line_numbers_multiline_range): Clear
6722 dc.min_margin_width.
6723 * diagnostic.c (diagnostic_initialize): Initialize
6725 * diagnostic.h (struct diagnostic_context): Add field
6727 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
6728 * opts.c (common_handle_option): Handle
6729 OPT_fdiagnostics_minimum_margin_width_.
6730 * selftest-diagnostic.c
6731 (selftest::test_diagnostic_context::test_diagnostic_context):
6732 Initialize min_margin_width to 6.
6733 * toplev.c (general_init): Initialize global_dc->min_margin_width.
6735 2018-10-15 David Malcolm <dmalcolm@redhat.com>
6737 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
6738 Fix usage of "error_at_rich_loc" in the comment.
6740 2018-10-15 Renlin Li <renlin.li@arm.com>
6743 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
6744 if-conversioned loop when it contains ifn with types not
6745 supported by backend.
6746 * internal-fn.c (expand_direct_optab_fn): Add an assert.
6747 (direct_internal_fn_supported_p): New helper function.
6748 * internal-fn.h (direct_internal_fn_supported_p): Declare.
6750 2018-10-15 Jakub Jelinek <jakub@redhat.com>
6753 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6754 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6755 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6757 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
6759 PR tree-optimization/87022
6760 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
6761 bits in dist vector rather than the first one.
6763 2018-10-15 Richard Biener <rguenther@suse.de>
6766 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
6767 (visit_loadstore): When a used restrict tag escaped verify that
6768 the points-to solution of "other" pointers do not include
6770 (compute_dependence_clique): If a used restrict tag escaped
6771 communicated that down to visit_loadstore.
6773 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
6775 * config/s390/s390.c (s390_expand_vec_init): Force vector element
6776 into reg if it isn't a general operand.
6778 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
6781 * config/i386/sse.md (*vec_dupv2di): Add register source to
6784 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
6787 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6788 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
6789 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6790 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6792 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
6794 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
6795 (notice_args_size): Set it in the current trace if no insn that can
6796 throw internally has been seen yet.
6797 (connect_traces): When connecting args_size between traces, allow the
6798 incoming values not to match if there is an insn setting it before the
6799 first insn that can throw internally; in that case, force the creation
6800 of a CFI note on this latter insn.
6802 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
6804 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
6805 the base class, because using the injected-class-name was not clearly
6806 specified until DR 176.
6808 2018-10-12 Paul Koning <ni1d@arrl.net>
6810 * config/pdp11/pdp11.md (doloop_end): New expander.
6811 (doloop_end_insn): renamed from "doloop_end".
6812 (addqi3): New pattern.
6813 (subqi3): New pattern.
6814 * config/pdp11/predicates.md (incdec_operand): New predicate.
6816 2018-10-12 Yury Gribov <tetra2005@gmail.com>
6819 * real.c (format_helper::can_represent_integral_type_p): New function
6820 * real.h (format_helper::can_represent_integral_type_p): Ditto.
6821 * match.pd: New pattern.
6823 2018-10-12 Alexandre Oliva <oliva@adacore.com>
6825 * configure.ac: Introduce --enable-large-address-aware
6826 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
6827 * doc/install.texi: Document it.
6828 * configure, config.in: Rebuilt.
6829 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
6830 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
6831 (LINK_SPEC): Insert it.
6832 * config/i386/mingw-w64.h: Likewise.
6834 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
6836 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
6838 PR rtl-optimization/87600
6839 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
6841 2018-10-12 Paul Koning <ni1d@arrl.net>
6843 * doc/md.texi (doloop_end): Document that the pattern code may
6844 need to check operand mode.
6846 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
6848 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
6849 to zero-extend between int and floating-point registers.
6850 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
6851 ldp into floating-point registers. Add type and arch attributes.
6852 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
6853 Use f_loads for type attribute.
6855 2018-10-11 Martin Sebor <msebor@redhat.com>
6857 * doc/extend.texi (attribute packed): Correct typos.
6859 2018-10-11 Martin Sebor <msebor@redhat.com>
6861 * doc/extend.texi (attribute flatten): Mention interaction with
6864 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
6867 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
6868 Set new_decl virtual flag to zero.
6870 2018-10-11 Martin Sebor <msebor@redhat.com>
6873 * doc/extend.texi (attribute format_arg): Discuss using multiple
6874 attributes on a single function.
6876 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
6878 PR tree-optimization/86829
6879 * match.pd (sin (atan (x))): New simplification rules.
6880 (cos (atan (x))): Likewise.
6881 * real.c (build_sinatan_real): New function.
6882 * real.h (build_sinatan_real): Prototype.
6884 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
6886 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
6888 (fold_mergeeo_helper): New helper function.
6889 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
6890 intrinsics. Correct some whitespace indentation issues.
6892 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
6895 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
6896 Use HOST_WIDE_INT_1U for shift.
6898 2018-10-11 Doug Rupp <rupp@adacore.com>
6899 Olivier Hainque <hainque@adacore.com>
6901 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
6902 Pass --relax to the linker for RTPs.
6903 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
6905 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
6906 Jan Hubicka <jh@suse.cz>
6907 Martin Jambor <mjambor@suse.cz>
6909 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
6910 the same elements are repeated rather than printing all of them.
6911 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
6912 "repeated" elements.
6913 * read-rtl-function.c (test_loading_repeat): New function.
6914 (read_rtl_function_c_tests): Call test_loading_repeat.
6915 * rtl-tests.c (test_dumping_repeat): New function.
6916 (rtl_tests_c_tests): Call test_dumping_repeat.
6918 2018-10-11 Richard Biener <rguenther@suse.de>
6920 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
6921 bdver?_cost): Unify to ...
6922 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
6923 * config/i386/i386.c (processor_cost_table): Adjust.
6925 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
6928 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
6929 the thunk when expanding to GIMPLE.
6931 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6934 * varasm.c (mergeable_string_section): Don't try to move zero-length
6935 strings to the merge section.
6937 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
6940 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
6942 2018-10-10 Jakub Jelinek <jakub@redhat.com>
6945 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
6946 to special_args set.
6948 2018-10-10 Richard Biener <rguenther@suse.de>
6950 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
6951 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
6952 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
6953 and recursing and pattern terminating the recursion on SSE
6954 vector width using ix86_expand_reduc.
6955 (reduc_sminmax_scal_<mode>): Split into part reducing to half
6956 width and recursing and SSE2 vector variant doing the final
6957 reduction with ix86_expand_reduc.
6958 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
6959 with terminating the recursion at AVX level, splitting that
6962 2018-10-09 David Malcolm <dmalcolm@redhat.com>
6964 * genmatch.c (error_cb): Rename to...
6965 (diagnostic_cb): ...this, converting int params to enums.
6966 (fatal_at): Update for renaming.
6967 (warning_at): Likewise.
6969 * input.c (selftest::ebcdic_execution_charset::apply):
6970 Update for renaming of...
6971 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
6973 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
6974 converting level and reason to enums.
6975 (class selftest::lexer_error_sink): Rename to...
6976 (class selftest::lexer_test_options): ...this, renaming field
6977 "m_errors" to "m_diagnostics".
6978 (selftest::lexer_test_options::apply): Update for renaming of...
6979 (selftest::lexer_test_options::on_error): ...this, renaming to...
6980 (selftest::lexer_test_options::on_diagnostic): ...this
6981 converting level and reason to enums.
6982 (selftest::test_lexer_string_locations_raw_string_unterminated):
6983 Update for renamings.
6984 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
6987 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
6989 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
6990 * config/rs6000/pmmintrin.h: New file.
6992 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
6994 PR tree-optimization/86659
6995 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6997 2018-10-09 Richard Biener <rguenther@suse.de>
6999 PR tree-optimization/63155
7000 * tree-ssa-structalias.c: Include tree-ssa.h.
7001 (get_constraint_for_ssa_var): For undefs return nothing_id.
7002 (find_func_aliases): Cleanup PHI handling.
7004 2018-10-09 Richard Biener <rguenther@suse.de>
7006 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
7009 2018-10-09 Martin Liska <mliska@suse.cz>
7011 * asan.c (asan_emit_stack_protection): If a stack variable
7012 is located in a same file as current function, then emit
7013 line info into variable definition string.
7015 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
7017 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
7020 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
7022 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
7025 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
7027 PR tree-optimization/86659
7028 * gimple-match.h (struct gimple_match_op): Add reverse field.
7029 (gimple_match_op::set_op): New overloaded method.
7030 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
7031 the REF_REVERSE_STORAGE_ORDER flag on the value.
7032 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
7033 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
7035 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
7038 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
7039 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
7041 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
7044 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
7045 Defined with __builtin_ia32_vfmaddsubpd512_mask.
7047 2018-10-08 Richard Biener <rguenther@suse.de>
7049 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
7050 cost the same as AVX128 ones.
7052 2018-10-08 Paul Koning <ni1d@arrl.net>
7054 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
7055 (expand_block_move): New function.
7056 * config/pdp11/pdp11.c (output_block_move): Remove.
7057 (expand_block_move): New function.
7058 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
7059 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
7060 (*movmemhi1): Remove.
7062 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
7064 * config/s390/2827.md: Increase latencies for some FP instructions.
7066 2018-10-08 Richard Biener <rguenther@suse.de>
7068 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7070 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
7071 * tree-vectorizer.h (dump_stmt_cost): Adjust.
7072 (add_stmt_cost): Dump return value of the hook.
7074 2018-10-08 Richard Biener <rguenther@suse.de>
7076 PR tree-optimization/63155
7077 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
7078 (ssa_propagation_engine::ssa_propagate): Remove redundant
7079 bitmap bit clearing.
7081 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
7083 PR rtl-optimization/86939
7084 PR rtl-optimization/87479
7085 * ira.h (non_conflicting_reg_copy_p): New prototype.
7086 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
7087 (make_hard_regno_dead): Don't add conflicts for register
7088 ignore_reg_for_conflicts.
7089 (make_object_dead): Likewise.
7090 (non_conflicting_reg_copy_p): New function.
7091 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
7092 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
7093 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
7094 (make_hard_regno_dead): Don't add conflicts for register
7095 ignore_reg_for_conflicts. Remove special conflict handling of
7096 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
7097 check_pic_pseudo_p and update callers.
7098 (mark_pseudo_dead): Don't add conflicts for register
7099 ignore_reg_for_conflicts.
7100 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
7102 2018-10-05 Andrew Waterman <andrew@sifive.com>
7103 Jim Wilson <jimw@sifive.com>
7105 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
7106 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
7107 new pattern using HONOR_SNANS that emits one extra instruction.
7109 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
7111 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
7112 patterns): Merge SI and DI patterns to a GPR pattern.
7113 (unnamed define_insn and define_split for record form of that): Merge
7114 to a single define_insn_and_split pattern.
7116 2018-10-05 David Malcolm <dmalcolm@redhat.com>
7119 * input.c (expand_location_to_spelling_point): Add param "aspect"
7120 and use rather than hardcoding LOCATION_ASPECT_CARET.
7121 (get_substring_ranges_for_loc): Handle the case of a single token
7122 within a macro expansion.
7123 * input.h (expand_location_to_spelling_point): Add "aspect" param,
7124 defaulting to LOCATION_ASPECT_CARET.
7126 2018-10-05 Paul Koning <ni1d@arrl.net>
7128 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
7129 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
7130 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
7131 (pdp11_guard_type): New function.
7133 2018-10-05 Paul Koning <ni1d@arrl.net>
7135 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
7136 * config/pdp11/pdp11.opt (mfloat32): Remove.
7138 * doc/invoke.texi (pdp11 -mfloat32): Remove:
7139 (pdp11 -mfloat64): Remove.
7141 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
7143 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
7144 (*cmp<mode>_cc_i387): Ditto.
7145 (*cmpu<mode>_cc_i387): Ditto.
7146 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7147 * config/i386/i386.c (ix86_expand_fp_compare): Remove
7149 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
7150 Emit x86_sahf_1 pattern.
7151 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
7152 (ix86_expand_carry_flag_compare): Ditto.
7154 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
7156 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
7157 to reg_or_0_operand. Add "C" constraint.
7158 (*cmpxf_cc_i387): Ditto.
7159 (*cmp<mode>_i387): Change operand 2 predicate
7160 to nonimm_or_0_operand. Add "C" constraint.
7161 (*cmp<mode>_cc_i387): Ditto.
7162 (*cmp<mode>_0_i387): Remove insn pattern.
7163 (*cmp<mode>_0_cc_i387): Ditto.
7165 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
7167 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
7168 * config/i386/predicates.md (nonimm_or_0_operand): Rename
7169 from vector_move_operand. Update all uses.
7171 2018-10-05 Martin Sebor <msebor@redhat.com>
7173 PR tree-optimization/87490
7174 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
7177 2018-10-05 Richard Biener <rguenther@suse.de>
7179 PR tree-optimization/63155
7180 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
7181 vertical space in dumpfiles.
7182 * tree-ssa-propagate.h
7183 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
7184 * tree-ssa-propagate.c (cfg_blocks_back): New global.
7185 (ssa_edge_worklist_back): Likewise.
7186 (curr_order): Likewise.
7187 (cfg_blocks_get): Remove abstraction.
7188 (cfg_blocks_add): Likewise.
7189 (cfg_blocks_empty_p): Likewise.
7190 (add_ssa_edge): Add to current or next worklist based on
7192 (add_control_edge): Likewise.
7193 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
7195 (ssa_propagation_engine::ssa_propagate): ... here. Unify
7196 iteration from CFG and SSA edge worklist so we process
7197 everything in RPO order, prioritizing forward progress
7199 (ssa_prop_init): Allocate new worklists, do not dump
7201 (ssa_prop_fini): Free new worklists.
7203 2018-10-05 Richard Biener <rguenther@suse.de>
7205 * tree-core.h (tree_block::abstract_flag): Remove.
7206 (tree_block::block_num): Make full 32bits.
7207 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
7208 * tree.h (BLOCK_ABSTRACT): Remove.
7209 * dwarf2out.c (gen_lexical_block_die): Remove dead code
7210 resulting from BLOCK_ABSTRACT being always false.
7211 (gen_inlined_subroutine_die): Likewise.
7212 (gen_block_die): Likewise.
7213 * tree.c (block_ultimate_origin): Likewise.
7214 * tree-pretty-print.c (dump_block_node): Remove code dealing
7215 with BLOCK_ABSTRACT.
7216 * tree-ssa-live.c (dump_scope_block): Likewise.
7217 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
7218 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
7220 2018-10-05 Richard Biener <rguenther@suse.de>
7222 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
7223 is asked for initialize mode to the component mode of the
7226 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
7229 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
7230 assembler for -mavx.
7231 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
7233 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
7236 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
7238 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
7239 to be DImode. When using mffscrn, force the operand to a register.
7241 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
7243 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
7244 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
7245 X87MODEF mode iterator.
7246 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
7247 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
7248 X87MODEF mode iterator.
7250 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
7252 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
7253 -Wno-prio-ctor-dtor.
7255 2018-10-04 David Malcolm <dmalcolm@redhat.com>
7257 * Makefile.in (OBJS): Add opt-problem.o.
7258 * dump-context.h: Include "selftest.h.
7259 (selftest::temp_dump_context): New forward decl.
7260 (class dump_context): Make friend of class
7261 selftest::temp_dump_context.
7262 (dump_context::dump_loc_immediate): New decl.
7263 (class dump_pretty_printer): Move here from dumpfile.c.
7264 (class temp_dump_context): Move to namespace selftest.
7265 (temp_dump_context::temp_dump_context): Add param
7266 "forcibly_enable_dumping".
7267 (selftest::verify_dumped_text):
7268 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
7269 (selftest::verify_item):
7270 (ASSERT_IS_TEXT): Move here from dumpfile.c.
7271 (ASSERT_IS_TREE): Likewise.
7272 (ASSERT_IS_GIMPLE): Likewise.
7273 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
7275 (dump_context::dump_loc_immediate): ...this new function.
7276 (class dump_pretty_printer): Move to dump-context.h.
7277 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
7278 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
7279 (temp_dump_context::temp_dump_context): Move to "selftest"
7280 namespace. Add param "forcibly_enable_dumping", and use it to
7281 conditionalize the use of m_pp;
7282 (selftest::verify_dumped_text): Make non-static.
7283 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
7284 (selftest::verify_item): Make non-static.
7285 (ASSERT_IS_TEXT): Move to dump-context.h.
7286 (ASSERT_IS_TREE): Likewise.
7287 (ASSERT_IS_GIMPLE): Likewise.
7288 (selftest::test_capture_of_dump_calls): Pass "true" for new
7289 param of temp_dump_context.
7290 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
7291 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
7293 * opt-problem.cc: New file.
7294 * opt-problem.h: New file.
7295 * optinfo-emit-json.cc
7296 (selftest::test_building_json_from_dump_calls): Pass "true" for
7297 new param of temp_dump_context.
7298 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
7299 (optinfo::emit_for_opt_problem): New function.
7300 (optinfo::emit): Clarity which emit_item is used.
7301 * optinfo.h (optinfo::get_dump_location): New accessor.
7302 (optinfo::emit_for_opt_problem): New decl.
7303 (optinfo::emit): Make const.
7304 * selftest-run-tests.c (selftest::run_tests): Call
7305 selftest::opt_problem_cc_tests.
7306 * selftest.h (selftest::opt_problem_cc_tests): New decl.
7307 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
7308 bool to opt_result, converting fprintf messages to
7309 opt_result::failure_at calls. Add "stmt" param for use by the
7311 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
7312 (runtime_alias_check_p): Convert return type from bool to
7313 opt_result, converting dump_printf calls to
7314 opt_result::failure_at, using the statement DDR_A for their
7316 (find_data_references_in_stmt): Convert return type from bool to
7317 opt_result, converting "return false" to opt_result::failure_at
7319 * tree-data-ref.h: Include "opt-problem.h".
7320 (dr_analyze_innermost): Convert return type from bool to opt_result,
7321 and add a const gimple * param.
7322 (find_data_references_in_stmt): Convert return type from bool to
7324 (runtime_alias_check_p): Likewise.
7325 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
7326 dr_analyze_innermost.
7327 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
7328 Convert return type from bool to opt_result, adding a message for
7329 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
7330 (vect_analyze_data_ref_dependence): Convert return type from bool
7331 to opt_result. Change sense of return type from "false"
7332 effectively meaning "no problems" to "false" meaning a problem,
7333 so that "return false" becomes "return opt_result::success".
7334 Convert "return true" calls to opt_result::failure_at, using
7335 the location of statement A rather than vect_location.
7336 (vect_analyze_data_ref_dependences): Convert return type from bool
7338 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
7339 calls to opt_result::failure_at, using the stmt location rather
7341 (vect_verify_datarefs_alignment): Convert return type from bool
7343 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
7344 into multiple more-tightly-scoped copies.
7345 (vect_analyze_data_refs_alignment): Convert return type from bool
7347 (vect_analyze_data_ref_accesses): Likewise, converting a
7348 "return false" to a "return opt_result::failure_at", adding a
7350 (vect_prune_runtime_alias_test_list): Convert return type from
7351 bool to opt_result, converting dump_printf_loc to
7352 opt_result::failure_at. Add a %G to show the pertinent statement,
7353 and use the stmt's location rather than vect_location.
7354 (vect_find_stmt_data_reference): Convert return type from
7355 bool to opt_result, converting dump_printf_loc to
7356 opt_result::failure_at, using stmt's location.
7357 (vect_analyze_data_refs): Convert return type from bool to
7358 opt_result. Convert "return false" to "return
7359 opt_result::failure_at", adding messages as needed.
7360 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
7361 type from bool to opt_result.
7362 (vect_determine_vf_for_stmt): Likewise.
7363 (vect_determine_vectorization_factor): Likewise, converting
7364 dump_printf_loc to opt_result::failure_at, using location of phi
7365 rather than vect_location.
7366 (vect_analyze_loop_form_1): Convert return type from bool to
7367 opt_result, converting dump_printf_loc calls, retaining the use of
7369 (vect_analyze_loop_form): Convert return type from loop_vec_info
7370 to opt_loop_vec_info.
7371 (vect_analyze_loop_operations): Convert return type from bool to
7372 opt_result, converting dump_printf_loc calls, using the location
7373 of phi/stmt rather than vect_location where available. Convert
7374 various "return false" to "return opt_result::failure_at" with
7375 "unsupported phi" messages.
7376 (vect_get_datarefs_in_loop): Convert return type from bool to
7377 opt_result. Add a message for the
7378 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
7379 (vect_analyze_loop_2): Convert return type from bool to
7380 opt_result. Ensure "ok" is set to a opt_result::failure_at before
7381 each "goto again;", adding new messages where needed.
7382 Add "unsupported grouped {store|load}" messages.
7383 (vect_analyze_loop): Convert return type from loop_vec_info to
7385 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
7387 * tree-vect-stmts.c (process_use): Likewise, converting
7388 dump_printf_loc call and using stmt location, rather than
7390 (vect_mark_stmts_to_be_vectorized): Likeise.
7391 (vect_analyze_stmt): Likewise, adding a %G.
7392 (vect_get_vector_types_for_stmt): Convert return type from bool to
7393 opt_result, converting dump_printf_loc calls and using stmt
7394 location, rather than vect_location.
7395 (vect_get_mask_type_for_stmt): Convert return type from tree to
7396 opt_tree, converting dump_printf_loc calls and using stmt location.
7397 * tree-vectorizer.c: Include "opt-problem.h.
7398 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
7399 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
7400 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
7401 enabled, use it to report at the top level "couldn't vectorize
7402 loop" followed by the problem.
7403 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
7404 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
7406 (vect_analyze_stmt): Likewise.
7407 (vect_get_vector_types_for_stmt): Likewise.
7408 (tree vect_get_mask_type_for_stmt): Likewise.
7409 (vect_analyze_data_ref_dependences): Likewise.
7410 (vect_enhance_data_refs_alignment): Likewise.
7411 (vect_analyze_data_refs_alignment): Likewise.
7412 (vect_verify_datarefs_alignment): Likewise.
7413 (vect_analyze_data_ref_accesses): Likewise.
7414 (vect_prune_runtime_alias_test_list): Likewise.
7415 (vect_find_stmt_data_reference): Likewise.
7416 (vect_analyze_data_refs): Likewise.
7417 (vect_analyze_loop): Convert return type from loop_vec_info to
7419 (vect_analyze_loop_form): Likewise.
7420 (vect_analyze_slp): Convert return type from bool to opt_result.
7422 2018-10-04 David Malcolm <dmalcolm@redhat.com>
7424 * doc/invoke.texi (-fopt-info): Document new "internals"
7426 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
7427 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
7429 (optinfo_verbosity_options): Add "internals".
7430 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
7431 (dump_context::apply_dump_filter_p): New member function.
7432 (dump_context::dump_loc): Use apply_dump_filter_p rather than
7433 explicitly masking the dump_kind.
7434 (dump_context::begin_scope): Increment the scope depth first. Use
7435 apply_dump_filter_p rather than explicitly masking the dump_kind.
7436 (dump_context::emit_item): Use apply_dump_filter_p rather than
7437 explicitly masking the dump_kind.
7438 (dump_dec): Likewise.
7439 (dump_hex): Likewise.
7440 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
7441 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
7442 (opt_info_switch_p): Update handling of default
7443 MSG_OPTIMIZED_LOCATIONS to cope with default of
7444 MSG_PRIORITY_USER_FACING.
7445 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
7446 masking the dump_kind.
7447 (selftest::test_capture_of_dump_calls): Update test_dump_context
7448 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
7449 than MSG_ALL. Generalize scope test to be run at all four
7450 combinations of with/without MSG_PRIORITY_USER_FACING and
7451 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
7452 for each of the two values.
7453 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
7454 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
7455 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
7456 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
7457 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
7458 with MSG_PRIORITY_*.
7459 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
7460 dump messages as MSG_PRIORITY_USER_FACING.
7461 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
7462 about the interaction with MSG_PRIORITY_*.
7464 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
7466 * varasm.c (output_constant): Add new parameter merge_strings.
7467 Make strings properly zero terminated in merge string sections.
7468 (mergeable_string_section): Don't fail if the last char is non-zero.
7469 (assemble_variable_contents): Handle merge string sections.
7470 (assemble_variable): Likewise.
7471 (assemble_constant_contents): Likewise.
7472 (output_constant_def_contents): Likewise.
7473 (output_constructor_array_range,
7474 output_constructor_regular_field): Adjust call to output_constant.
7475 (output_object_block): Adjust call to assemble_constant_contents
7476 and assemble_variable_contents.
7478 2018-10-04 Martin Liska <mliska@suse.cz>
7481 * cgraphunit.c (process_function_and_variable_attributes):
7482 Warn about a function with alias attribute and a body.
7484 2018-10-04 Martin Liska <mliska@suse.cz>
7487 * multiple_target.c (redirect_to_specific_clone): New function.
7488 (ipa_target_clone): Use it.
7489 * tree-inline.c: Fix comment.
7491 2018-10-04 David Malcolm <dmalcolm@redhat.com>
7493 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
7495 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
7496 (gcc::dump_manager::register_pass): New member function, adapted
7497 from loop body in gcc::pass_manager::register_pass, adding a
7498 call to update_dfi_for_opt_info.
7499 (gcc::dump_manager::opt_info_enable_passes): Store the
7500 -fopt-info options into the new fields. Move the loop
7502 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
7504 * dumpfile.h (struct opt_pass): New forward decl.
7505 (gcc::dump_manager::register_pass): New decl.
7506 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
7507 (class gcc::dump_manager): Add fields "m_optgroup_flags",
7508 "m_optinfo_flags", and "m_optinfo_filename".
7509 * passes.c (gcc::pass_manager::register_pass): Move all of the
7510 dump-handling code to gcc::dump_manager::register_pass.
7512 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
7514 PR rtl-optimization/87466
7515 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
7516 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
7517 * doc/tm.texi: Regenerate.
7518 * ira-lives.c (process_bb_node_lives): Use the new target hook.
7519 * lra-lives.c (process_bb_lives): Likewise.
7520 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
7523 2018-10-04 Tamar Christina <tamar.christina@arm.com>
7525 * params.c (add_params): Fix initialization.
7527 2018-10-04 Martin Liska <mliska@suse.cz>
7529 PR gcov-profile/84107
7530 * tree-profile.c (init_ic_make_global_vars):
7531 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
7532 Come up with new ic_tuple* variables. Emit
7533 __gcov_indirect_call{,_topn} variables.
7534 (gimple_gen_ic_profiler): Access the variable
7536 (gimple_gen_ic_func_profiler): Access
7537 __gcov_indirect_call.callee field.
7538 (gimple_init_gcov_profiler): Use ptr_type_node.
7539 * value-prof.c (gimple_ic): Use ptr_type_node.
7541 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7543 PR tree-optimization/85787
7544 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
7545 malloc_candidate_p into this function and add support for
7546 detecting multiple phis.
7547 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
7549 2018-10-04 Martin Liska <mliska@suse.cz>
7552 * ipa-inline.c (inline_to_all_callers_1):
7553 Call ultimate_alias_target for node being inlined.
7555 2018-10-03 Jeff Law <law@redhat.com>
7557 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
7559 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
7560 * tree.h (get_typenode_from_name): Prototype.
7562 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
7564 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
7565 Change operand 2 predicate to nonimmediate_operand.
7566 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7568 2018-10-03 Martin Sebor <msebor@redhat.com>
7569 Jeff Law <law@redhat.com>
7571 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
7573 (get_string_length): Detect unterminated arrays.
7574 (format_string): Same.
7575 (format_directive): Warn about unterminated arrays.
7576 (handle_gimple_call): Mark statements with no_warning as needed.
7578 2018-10-03 Jim Wilson <jimw@sifive.com>
7580 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
7581 also define __riscv_abi_rve. Delete trailing white space.
7583 2018-10-03 Paul Koning <ni1d@arrl.net>
7585 Enable LRA register allocator for PDP11.
7586 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
7589 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
7590 * config/pdp11/pdp11.opt (-mlra): New option.
7591 * doc/invoke.texi (PDP-11 Options): Document -mlra.
7593 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
7595 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
7596 (*<absneg:code>extend<mode>xf2): Ditto.
7598 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
7600 PR tree-optimization/87415
7601 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
7604 2018-10-02 Jeff Law <law@redhat.com>
7606 * gimple-fold.c (get_range_strlen): Only set *nonstr when
7607 an unterminated string is discovered. Bubble up range
7608 even for unterminated strings.
7609 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
7610 indicates the string was not terminated via NONSTR.
7612 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
7614 * tree-vrp.c (extract_range_from_unary_expr): Special case all
7615 pointer conversions.
7616 Do not do anything special for anti-ranges.
7618 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
7620 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
7621 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
7623 2018-10-03 Martin Liska <mliska@suse.cz>
7625 PR gcov-profile/86109
7626 * coverage.c (coverage_begin_function): Do not
7627 mark lambdas as artificial.
7628 * tree-core.h (struct GTY): Remove tm_clone_flag
7629 and introduce new lambda_function.
7630 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
7632 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7635 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
7636 P8_VECTOR and VSX are enabled.
7638 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
7640 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
7641 0x3907 as CPU model number.
7643 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
7645 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
7646 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
7647 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
7648 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
7649 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
7650 * config/s390/s390.md: Likewise. Rename also the cpu attribute
7651 value from arch12 to z14.
7653 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
7655 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
7657 (isinf<mode>2): Ditto.
7659 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
7661 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
7662 before emitting fxam. Perform calculations in XFmode.
7664 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
7666 * match.pd (((X /[ex] A) +- B) * A): New transformation.
7668 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
7671 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
7672 * tree.c (signed_or_unsigned_type_for): Handle complex.
7674 2018-10-02 Jeff Law <law@redhat.com>
7676 * gimple-fold.c (get_range_strlen): Remove dead code.
7678 2018-10-02 Martin Sebor <msebor@redhat.com>
7679 Jeff Law <law@redhat.com>
7681 * builtins.c (unterminated_array): Add new arguments.
7682 If argument is not terminated, bubble up size and exact
7684 (expand_builtin_strnlen): Detect, avoid expanding
7685 and diagnose unterminated arrays.
7686 (c_strlen): Fill in offset of start of unterminated strings.
7687 * builtins.h (unterminated_array): Update prototype.
7689 2018-10-02 Richard Biener <rguenther@suse.de>
7691 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
7692 of haddv4df, first reduce to SSE width and exploit the fact
7693 that we only need element zero with the reduction result.
7694 (reduc_plus_scal_v2df): Likewise.
7696 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
7698 * dojump.h (do_jump): Delete.
7699 (do_jump_1): Likewise.
7700 (split_comparison): Move around.
7701 * dojump.c (do_jump): Make static.
7702 (do_jump_1): Likewise.
7703 (jumpifnot): Move around.
7704 (jumpifnot_1): Likewise.
7706 (jumpif_1): Likewise.
7707 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
7709 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
7711 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
7712 insns in the delay slot and add_insn_after for the jump insn.
7714 2018-10-02 Richard Biener <rguenther@suse.de>
7716 * tree-inline.c (expand_call_inline): Use the location of
7717 the callee declaration for the inline-entry marker.
7718 * final.c (notice_source_line): Remove special-casing of
7719 NOTE_INSN_INLINE_ENTRY.
7721 2018-10-01 Carl Love <cel@us.ibm.com>
7724 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
7725 (__builtin_mtfsb0): New.
7726 (__builtin_mtfsb1): New.
7727 ( __builtin_set_fpscr_rn): New.
7728 (__builtin_set_fpscr_drn): New.
7729 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
7730 (rs6000_expand_set_fpscr_rn_builtin): Add.
7731 (rs6000_expand_set_fpscr_drn_builtin): Add.
7732 (rs6000_expand_builtin): Add case statement entries for
7733 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
7734 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
7735 RS6000_BUILTIN_MFFSL.
7736 (rs6000_init_builtins): Add ftype initialization and def_builtin
7737 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
7738 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
7739 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
7740 rs6000_mffscdrn): Add define_insn.
7741 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
7742 * doc/extend.texi: Add documentation for the builtins.
7744 2018-10-01 Richard Biener <rguenther@suse.de>
7746 PR tree-optimization/87465
7747 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
7748 causing branch miscounts.
7750 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7752 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
7753 aarch64_option_default_param): New.
7754 (params.h): Include.
7755 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
7756 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
7757 stack-clash protection validation code.
7759 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7761 * params.c (validate_param): New.
7762 (add_params): Use it.
7763 (set_param_value): Refactor param validation into validate_param.
7764 (diagnostic.h): Include.
7765 * diagnostic.h (diagnostic_ready_p): New.
7767 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7769 * params.c (set_param_value):
7770 Add index of parameter being validated.
7771 * common/common-target.def (option_validate_param): New.
7772 * common/common-targhooks.h (default_option_validate_param): New.
7773 * common/common-targhooks.c (default_option_validate_param): New.
7774 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
7775 * doc/tm.texi: Regenerate.
7777 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7780 * config/aarch64/aarch64.c (aarch64_override_options_internal):
7781 Add validation for stack-clash parameters and set defaults.
7783 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7786 * configure.ac: Add stack-clash-protection-guard-size.
7787 * doc/install.texi: Document it.
7788 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
7789 * params.def: Update comment for guard-size.
7790 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
7791 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
7792 * configure: Regenerate.
7794 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7797 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
7798 STACK_DYNAMIC_OFFSET): New.
7799 * config/aarch64/aarch64.c (aarch64_layout_frame):
7800 Update outgoing args size.
7801 (aarch64_stack_clash_protection_alloca_probe_range,
7802 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7804 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7807 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
7809 * target.def (stack_clash_protection_alloca_probe_range): New.
7810 (stack_clash_protection_final_dynamic_probe): Remove.
7811 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
7812 (default_stack_clash_protection_final_dynamic_probe): Remove.
7813 * targhooks.c: Likewise.
7814 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7815 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
7816 * doc/tm.texi: Regenerate.
7818 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7821 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
7822 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
7823 aarch64_clamp_to_uimm12_shift): New.
7824 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
7825 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
7827 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7830 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
7832 2018-10-01 Jeff Law <law@redhat.com>
7833 Richard Sandiford <richard.sandiford@linaro.org>
7834 Tamar Christina <tamar.christina@arm.com>
7837 * config/aarch64/aarch64.md
7838 (probe_stack_range): Add k (SP) constraint.
7839 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
7840 STACK_CLASH_MAX_UNROLL_PAGES): New.
7841 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
7842 stack probes for stack clash.
7843 (aarch64_allocate_and_probe_stack_space): New.
7844 (aarch64_expand_prologue): Use it.
7845 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
7846 (aarch64_sub_sp): Add emit_move_imm optional param.
7848 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
7850 PR tree-optimization/87261
7851 * match.pd: Remove trailing whitespace.
7852 Add (x & y) | ~(x | y) -> ~(x ^ y),
7853 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
7855 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
7857 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
7859 (ashlsi3_insn): Update instruction constraints.
7860 (ashrsi3_insn): Likewise.
7861 (rotrsi3): Likewise.
7862 (add_shift): Likewise.
7863 * config/arc/constraints.md (Csz): New 32 bit constraint. It
7864 avoids placing in the limm field small constants which, otherwise,
7865 could end into a small instruction.
7867 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
7869 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
7870 destination register is not odd-even.
7871 (umaddsidi4_split): Likewise.
7873 2018-10-01 Richard Biener <rguenther@suse.de>
7875 * tree-inline.c (expand_call_inline): Store origin of fn
7876 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
7877 * tree.c (block_ultimate_origin): Simplify and do some
7880 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
7882 * config/i386/mmx.md (EMMS): New int iterator.
7883 (emms): New int attribute.
7884 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
7885 EMMS int iterator. Explicitly declare clobbers.
7886 (mmx_emms): Remove expander.
7888 * config/i386/predicates.md (emms_operation): Remove predicate.
7889 (vzeroall_pattern): New predicate.
7890 (vzeroupper_pattern): Rename from vzeroupper_operation.
7891 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
7892 vzeroupper_pattern and vzeroall_pattern predicates.
7894 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
7896 PR rtl-optimization/86939
7897 * ira-lives.c (make_hard_regno_born): Rename from this...
7898 (make_hard_regno_live): ... to this. Remove update to conflict
7899 information. Update function comment.
7900 (make_hard_regno_dead): Add conflict information update. Update
7902 (make_object_born): Rename from this...
7903 (make_object_live): ... to this. Remove update to conflict information.
7904 Update function comment.
7905 (make_object_dead): Add conflict information update. Update function
7907 (mark_pseudo_regno_live): Call make_object_live.
7908 (mark_pseudo_regno_subword_live): Likewise.
7909 (mark_hard_reg_dead): Update function comment.
7910 (mark_hard_reg_live): Call make_hard_regno_live.
7911 (process_bb_node_lives): Likewise.
7912 * lra-lives.c (make_hard_regno_born): Rename from this...
7913 (make_hard_regno_live): ... to this. Remove update to conflict
7914 information. Remove now uneeded check_pic_pseudo_p argument.
7915 Update function comment.
7916 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
7917 to conflict information. Update function comment.
7918 (mark_pseudo_live): Remove update to conflict information. Update
7920 (mark_pseudo_dead): Add conflict information update.
7921 (mark_regno_live): Call make_hard_regno_live.
7922 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
7923 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
7925 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
7928 * config/i386/i386.c (construct_container): Use TImode for
7929 BLKmode values in 2 integer registers.
7931 2018-09-29 Jeff Law <law@redhat.com>
7933 * builtins.c (unterminated_array): Pass in c_strlen_data * to
7934 c_strlen rather than just a tree *.
7935 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
7936 Update recursive calls appropriately. If caller did not provide a
7937 suitable data pointer, create a local one. When a non-terminated
7938 string is discovered, bubble up information about the string via the
7939 c_strlen_data object.
7940 * builtins.h (c_strlen): Update prototype.
7941 (c_strlen_data): New structure.
7942 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
7943 For a type 2 call, if c_strlen indicates a non-terminated string
7944 use the length of the non-terminated string.
7945 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
7947 2018-09-29 Jakub Jelinek <jakub@redhat.com>
7950 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
7951 __m512d type for __A argument rather than __m512.
7953 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
7955 * match.pd (simple_comparison): Don't optimize if either operand is
7956 a function pointer when target needs function pointer canonicalization.
7958 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7960 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
7961 power5 .. power9 to remove indirection.
7962 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
7963 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
7964 ASM_CPU_476_SPEC): Delete.
7965 (ASM_CPU_SPEC): Adjust.
7966 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
7967 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
7969 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7971 * config.in: Delete HAVE_AS_DCI.
7972 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
7973 * config/rs6000/rs6000.h: Ditto.
7974 * configure.ac: Delete HAVE_AS_DCI.
7975 * configure: Regenerate.
7977 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7979 * config.in (HAVE_AS_LWSYNC): Delete.
7980 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7981 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
7983 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7984 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
7986 * configure.ac: Delete HAVE_AS_LWSYNC.
7987 * configure: Regenerate.
7989 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
7990 Pierre-Marie de Rodat <derodat@adacore.com>
7992 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
7993 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
7994 (cgraph_node::create_thunk): Add indirect_offset parameter.
7995 (thunk_adjust): Likewise.
7996 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
7997 and initialize the corresponding field with it.
7998 (cgraph_node::dump): Dump indirect_offset field.
7999 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
8000 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
8001 (thunk_adjust): Add indirect_offset parameter and deal with it.
8002 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
8003 pass it to thunk_adjust. Do not call the target hook if it's non-zero
8004 or if the thunk is external or local. Fix formatting. Do not chain
8005 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
8006 if any, in the GIMPLE representation.
8007 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
8008 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
8009 (input_node): Read indirect_offset field.
8010 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
8011 call to thunk_adjust.
8012 * tree-nested.c (struct nesting_info): Add thunk_p field.
8013 (create_nesting_tree): Set it.
8014 (convert_all_function_calls): Copy static chain from targets to thunks.
8015 (finalize_nesting_tree_1): Return early for thunks.
8016 (unnest_nesting_tree_1): Do not finalize thunks.
8017 (gimplify_all_functions): Do not gimplify thunks.
8019 2018-09-28 David Malcolm <dmalcolm@redhat.com>
8021 * opt-suggestions.c (option_proposer::build_option_suggestions):
8022 Release "option_values".
8024 2018-09-28 David Malcolm <dmalcolm@redhat.com>
8026 * coverage.c (get_coverage_counts): Convert problem-reporting dump
8027 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
8028 * dumpfile.c (kind_as_string): New function.
8029 (dump_loc): Rather than a hardcoded prefix of "note: ", use
8030 kind_as_string to vary the prefix based on dump_kind.
8031 (selftest::test_capture_of_dump_calls): Update for above.
8033 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
8035 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
8036 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
8038 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
8040 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
8041 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
8042 INVALID_REGNUM instead of FPSR_REG.
8043 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
8044 * config/i386/i386.md: Update comment of FP compares.
8045 (fldenv): Do not clobber FPSR_REG.
8047 2018-09-28 Richard Biener <rguenther@suse.de>
8049 * tree.h (BLOCK_ORIGIN): New.
8050 * omp-expand.c (grid_expand_target_grid_body): Assign
8051 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
8052 * tree-inline.c (remap_block): Likewise.
8053 * auto-profile.c (get_function_decl_from_block): Simplify
8054 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
8055 * langhooks.c (lhd_print_error_function): Likewise.
8056 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
8058 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
8059 * tree.c (block_nonartificial_location): Likewise.
8060 (block_ultimate_origin): Likewise.
8061 * tree-pretty-print.c (percent_K_format): Likewise. Remove
8062 no longer needed LTO case.
8064 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
8065 Jan Hubicka <jh@suse.cz>
8066 Martin Jambor <mjambor@suse.cz>
8068 * simplify-rtx.c (simplify_merge_mask): New function.
8069 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
8070 same masks are used in op1 or op2.
8071 (test_vec_merge): New function.
8072 (test_vector_ops): Call test_vec_merge.
8074 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
8076 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
8077 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
8078 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
8079 (cypress_costs): Set it.
8080 (supersparc_costs): Likewise.
8081 (hypersparc_costs): Likewise.
8082 (leon_cost): Likewise.
8083 (leon3_costs): Likewise.
8084 (sparclet_costs): Likewise.
8085 (ultrasparc_costs): Likewise.
8086 (ultrasparc_costs): Likewise.
8087 (niagara_costs): Likewise.
8088 (niagara2_costs): Likewise.
8089 (niagara3_costs): Likewise.
8090 (niagara4_costs): Likewise.
8091 (niagara7_costs): Likewise.
8092 (m8_costs): Likewise.
8093 (TARGET_CAN_FOLLOW_JUMP): Define.
8094 (pass_work_around_errata::gate): Minor tweak.
8095 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
8096 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
8097 Automaitcally clear MASK_FSMULD mask for V7 processors.
8098 (sparc_can_follow_jump): New static function.
8099 (output_ubranch): Deal with CROSSING_JUMP_P.
8100 (sparc_use_sched_lookahead): Rewrite using switch statement.
8101 (sparc_issue_rate): Reorder.
8102 (sparc_branch_cost): New function.
8104 2018-09-27 Martin Sebor <msebor@redhat.com>
8106 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
8107 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
8108 (int_fits_type_p): Same.
8110 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
8112 * config/i386/i386.md (FPCR_REG): Remove.
8113 (UNSPEC_FLDCW): Remove.
8114 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
8115 (x86_fldcw_1): Remove insn pattern.
8116 (fnstenv): Do not clobber FPCR_REG.
8118 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
8119 (CALL_USED_REGISTERS): Ditto.
8120 (REG_ALLOC_ORDER): Ditto.
8121 (REG_CLASS_CONTENTS): Ditto.
8122 (HI_REGISTER_NAMES): Ditto.
8123 (ADDITIONAL_REGISTER_NAMES): Use defines instead
8124 of numerical constants.
8125 * config/i386/i386.c (regclass_map): Remove fpsr register.
8126 (dbx_register_map): Ditto.
8127 (dbx64_register_map): Ditto.
8128 (svr4_dbx_register_map): Ditto.
8129 (print_reg): Do not handle FPCR_REG.
8131 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
8134 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
8135 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
8136 Delete, always treat as true.
8137 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8138 Ditto. Simplify remaining code.
8139 * config/powerpcspe/powerpcspe.h: Ditto.
8140 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
8141 Simplify remaining code.
8142 (rs6000_expand_builtin): Ditto.
8143 * config/rs6000/rs6000.h: Ditto.
8144 * configure.ac: Ditto.
8145 * configure: Regenerate.
8147 2018-09-27 Martin Liska <mliska@suse.cz>
8149 * coverage.c (get_coverage_counts): Revert the formatting
8150 of missing profile opt info.
8152 2018-09-27 Richard Biener <rguenther@suse.de>
8156 * dwarf2out.c (set_block_origin_self): Do not mark outermost
8157 block as we do not output that.
8158 (gen_inlined_subroutine_die): Elide the originally outermost
8159 block, matching what we do for concrete instances.
8160 (decls_for_scope): Add parameter specifying whether to recurse
8163 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
8164 Tom de Vries <tom@codesourcery.com>
8168 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
8169 STORE_FLAG_VALUE == 1.
8171 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
8173 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
8174 constant definitions.
8175 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
8176 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
8177 ("speculation_barrier"): New expander definition.
8179 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
8181 PR gcov-profile/86957
8182 * common.opt: New warning option -Wmissing-profile.
8183 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
8184 * doc/invoke.texi: Document -Wmissing-profile.
8186 2018-09-26 Jim Wilson <jimw@sifive.com>
8188 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
8189 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
8191 2018-09-26 Martin Sebor <msebor@redhat.com>
8193 * tree.c (zerop): Change return type to bool.
8194 (integer_zerop, integer_onep, integer_each_onep): Same.
8195 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8196 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8197 (real_onep, real_minus_onep, chain_index): Same.
8198 (print_type_hash_statistics, type_list_equal): Same.
8199 * tree.h (zerop): Same.
8200 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
8201 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8202 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8203 (real_onep, real_minus_onep, chain_index): Same.
8204 (print_type_hash_statistics, type_list_equal): Same.
8206 2018-09-26 Jim Wilson <jimw@sifive.com>
8208 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
8210 2018-09-26 Jakub Jelinek <jakub@redhat.com>
8213 * config/i386/i386.c: Include debug.h and dwarf2out.h.
8214 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
8217 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
8219 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
8221 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
8223 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
8224 and FP_SECOND_SSE_REGS.
8225 (REG_CLASS_NAMES): Ditto.
8226 (REG_CLASS_CONTENTS): Ditto.
8227 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
8228 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
8229 (ix86_preferred_output_reload_class): Ditto.
8230 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
8231 clobber constraint to "=&f".
8232 (fix_truncdi_i387): Ditto.
8233 (lrintxfdi2): Ditto.
8234 (fistdi2_<rounding>): Ditto.
8235 (fpremxf4_i387): Change "=u" constraint to "=f".
8236 (fprem1xf4_i387): Ditto.
8238 (fptanxf4_i387): Ditto.
8239 (fxtractxf3_i387): Ditto.
8240 (fscalexf4_i387): Ditto.
8241 (atan2xf3): Change "u" constraint to "f".
8242 (fyl2xxf3_i387): Ditto.
8243 (fyl2xp1xf3_i387): Ditto.
8245 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
8248 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
8249 for removed I387_MASK_PM entity.
8252 2018-09-26 Jeff Law <law@redhat.com>
8254 2018-09-26 Alexey Neyman <stilor@att.net>
8256 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8257 headers are no longer pulled in by <isl/val.h>.
8259 2018-09-26 Richard Biener <rguenther@suse.de>
8262 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
8263 or concrete instance DIE to the tree. Create abstract origin
8264 attributes also for concrete instances.
8266 2018-09-26 Alexey Neyman <stilor@att.net>
8268 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8269 headers are no longer pulled in by <isl/val.h>.
8271 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
8273 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
8274 Use new helper functions.
8275 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
8276 Use new helper functions.
8277 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
8278 aarch_mm_needs_release): New declarations.
8279 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
8280 aarch_mm_needs_release): New.
8282 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
8284 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
8285 (arm32_output_mi_thunk): Deal with long calls.
8287 2018-09-26 Richard Biener <rguenther@suse.de>
8291 * tree-inline.c (expand_call_inline): When the location
8292 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
8293 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
8294 the inserted BLOCK to make inlined_function_outer_scope_p
8296 * dwarf2out.c (add_call_src_coords_attributes): Do not add
8297 coords for reserved locations.
8299 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
8301 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
8302 (*call_indirect_nonlocal_sysv<mode>): Ditto.
8303 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
8304 (*sibcall_nonlocal_sysv<mode>): Ditto.
8305 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
8306 (<bd>_<mode>): Ditto.
8307 (<bd>tf_<mode>): Ditto.
8309 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
8311 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
8312 control string as a list of templates instead of as C code.
8313 (*altivec_movti): Ditto.
8314 * config/rs6000/darwin.md (movdf_low_di): Ditto.
8316 2018-09-25 Jim Wilson <jimw@sifive.com>
8318 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
8319 when target symbol is weak.
8321 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
8324 * builtins.c (unterminated_array): Simplify.
8325 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
8326 where pointer arithmetic is safe.
8328 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
8331 * config/rs6000/altivec.md (altivec_vspltb): Use
8332 const_0_to_15_operand instead of u5bit_cint_operand.
8333 (*altivec_vspltb_internal): Ditto.
8334 (altivec_vspltb_direct): Ditto.
8335 (altivec_vsplth): Use const_0_to_7_operand instead of
8337 (*altivec_vsplth_internal): Ditto.
8338 (altivec_vsplth_direct): Ditto.
8339 (altivec_vspltw): Use const_0_to_3_operand instead of
8341 (*altivec_vspltw_internal): Ditto.
8342 (altivec_vspltw_direct): Ditto.
8343 (altivec_vspltsf): Ditto.
8344 (*altivec_vspltsf_internal): Ditto.
8345 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
8346 various splats with the proper size immediate. Reorder the various
8347 cases by ascending size of immediate, and put all such together.
8349 2018-09-25 Richard Biener <rguenther@suse.de>
8352 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
8354 (maybe_create_die_with_external_ref): Do not create
8355 DW_TAG_imported_unit here.
8356 (add_abstract_origin_attribute): Handle external BLOCK refs.
8357 (dwarf2out_abstract_function): Simplify LTO case.
8358 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
8359 rather than using maybe_create_die_with_external_ref.
8361 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
8364 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
8365 (frndintxf2_mask_pm_i387): Ditto.
8366 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
8367 Enable for !flag_trapping_math.
8368 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
8369 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
8370 Change operand 1 predicate to nonimmediate_operand.
8371 (attr "i387_cw"): Remove mask_pm.
8372 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
8373 (enum ix86_entity): Remove I387_MASK_PM.
8374 * config/i386/i386.c (ix86_i387_mode_needed): Do not
8375 handle I387_MASK_PM.
8376 (ix86_mode_needed): Ditto.
8377 (ix86_mode_after): Ditto.
8378 (ix86_mode_entry): Ditto.
8379 (ix86_mode_exit): Ditto.
8380 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
8382 2018-09-25 Jakub Jelinek <jakub@redhat.com>
8384 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
8385 to_update_switch_stmts to vNULL instead of calling create on them
8388 2018-09-25 Richard Biener <rguenther@suse.de>
8390 PR tree-optimization/87402
8391 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
8392 (visit_phi): Re-instantiate handling of supposed to be VARYING
8393 but non-VARYING backedge value.
8395 2018-09-25 Richard Biener <rguenther@suse.de>
8398 * dwarf2out.c (struct sym_off_pair): New.
8399 (external_die_map): New global.
8400 (lookup_decl_die): When in LTO create DIEs lazily from the
8402 (lookup_block_die): New function, create DIEs lazily in LTO.
8403 (equate_block_to_die): New function.
8404 (dwarf2out_die_ref_for_decl): During WPA get the association
8405 from the external DIE map.
8406 (dwarf2out_register_external_die): Record mapping into the
8408 (maybe_create_die_with_external_ref): New function split out from
8409 DIE generation part of old dwarf2out_register_external_die.
8410 (add_abstract_origin_attribute): Do not return the DIE. When
8411 in LTO reference externals directly.
8412 (dwarf2out_abstract_function): When in LTO ignore calls for
8413 decls with external DIEs (already present abstract instances).
8414 (gen_call_site_die): Adjust.
8415 (add_high_low_attributes): Likewise.
8416 (gen_lexical_block_die): Likewise.
8417 (gen_inlined_subroutine_die): Likewie.
8418 (gen_block_die): Likewise.
8419 (dwarf2out_inline_entry): Likewise.
8420 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
8423 2018-09-25 Martin Liska <mliska@suse.cz>
8425 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
8426 integers and not by a float value.
8428 2018-09-25 Martin Liska <mliska@suse.cz>
8431 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
8433 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
8434 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
8435 * godump.c (go_format_type): Remove extra parenthesis.
8437 2018-09-25 Martin Liska <mliska@suse.cz>
8439 * alias.c (set_dest_equal_p): Remove unused function.
8440 * config/i386/i386.c (def_builtin_pure2): Likewise.
8441 * diagnostic-show-locus.c (class layout): Remove
8443 (layout::layout): Likewise here.
8444 * dump-context.h (class temp_dump_context): Likewise.
8445 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
8446 (add_AT_loclistsptr): Likewise.
8447 (add_AT_offset): Likewise.
8448 (get_AT_hi_pc): Likewise.
8449 (is_comdat_die): Likewise.
8450 (type_is_enum): Likewise.
8451 (ceiling): Likewise.
8452 (add_AT_vms_delta): Likewise.
8453 (is_class_die): Likewise.
8454 * edit-context.c (class line_event): Remove unused field.
8455 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
8457 * ipa-cp.c (ipa_get_vr_lat): Likewise.
8458 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
8459 (ok_for_base_p_nonstrict): Likewise.
8460 * tree-chrec.c (is_not_constant_evolution): Likewise.
8461 (chrec_fold_poly_cst): Likewise.
8462 * tree-if-conv.c (has_pred_critical_p): Likewise.
8463 * tree-ssa-coalesce.c (print_exprs): Likewise.
8464 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
8465 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
8466 * tree-vrp.c (value_ranges_intersect_p): Likewise.
8467 (value_range_nonnegative_p): Likewise.
8469 2018-09-25 Martin Liska <mliska@suse.cz>
8471 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
8472 Do not handle "GNU Pascal".
8473 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
8475 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
8476 from documentation. Likewise.
8477 * dbxout.c (dbxout_range_type): Likewise.
8478 * doc/cpp.texi: Likewise.
8479 * doc/extend.texi: Likewise.
8480 * doc/frontends.texi: Likewise.
8481 * doc/invoke.texi: Remove Pascal entry.
8482 * tree.def (CLEANUP_POINT_EXPR): Likewise.
8483 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
8485 2018-09-25 Martin Liska <mliska@suse.cz>
8488 * doc/invoke.texi: Document all parameters and remove default
8491 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
8494 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
8495 contains HOST_WIDE_INTs when computing its size.
8497 2018-09-24 Jim Wilson <jimw@sifive.com>
8500 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
8502 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
8504 2018-09-24 Andrew Pinski <apinski@marvell.com>
8506 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
8507 access prev before checking it for NULLness in the
8508 AARCH64_FUSE_CMP_BRANCH case.
8510 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
8513 * config/i386/i386.c (rest_of_insert_endbranch): Set
8514 endbr_queued_at_entrance to true and don't insert ENDBR if
8515 x86_function_profiler will be called.
8516 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
8518 * config/i386/i386.h (machine_function): Add
8519 endbr_queued_at_entrance.
8521 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
8523 * genattrtab.c (mk_attr_alt): Use alternative_mask.
8524 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
8526 (check_attr_test): Use alternative_mask.
8527 (get_attr_value): Likewise.
8528 (compute_alternative_mask): Use alternative_mask and XWINT.
8529 (make_alternative_compare): Use alternative_mask.
8530 (attr_alt_subset_p): Use XWINT.
8531 (attr_alt_subset_of_compl_p): Likewise.
8532 (attr_alt_intersection): Use alternative_mask and XWINT.
8533 (attr_alt_union): Likewise.
8534 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
8535 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
8536 (simplify_test_exp): Use alternative_mask and XWINT.
8537 (write_test_expr): Use alternative_mask and XWINT, adjust bit
8538 number calculation to support 64 bits. Generate code that
8539 checks 64-bit masks.
8540 (main): Use alternative_mask.
8541 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
8543 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
8546 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
8547 RETURN+USE when returning via %r14.
8549 2018-09-24 Martin Liska <mliska@suse.cz>
8551 * gcov.c (output_lines): Print colorization legend
8552 for both flag_use_colors and flag_use_hotness_colors.
8555 2018-09-24 Martin Liska <mliska@suse.cz>
8557 * coverage.c (get_coverage_counts): Use warning_at
8558 with current_function_decl location. Use %qD in warning
8561 2018-09-24 Martin Liska <mliska@suse.cz>
8563 * memory-block.h (memory_block_pool::release): Annotate with
8564 valgrind that the memory is not accessible.
8566 2018-09-24 Martin Liska <mliska@suse.cz>
8569 * asan.c: Make asan_handled_variables extern.
8571 * cfgexpand.c (expand_stack_vars): Make sure
8572 a representative is unpoison if another
8573 variable in the partition is handled by
8574 use-after-scope sanitization.
8576 2018-09-24 Richard Biener <rguenther@suse.de>
8578 PR tree-optimization/63155
8579 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
8580 the worklist when the edge of the respective argument isn't
8583 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
8585 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
8586 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
8587 (MASK_CLASS_P): Update for rename.
8588 (MAYBE_MASK_CLASS_P): Ditto.
8589 (REG_CLASS_NAMES): Update.
8590 (REG_CLASS_CONTENT): Update.
8591 * config/i386/i386.c (regclass_map): Update for MASK_REG
8592 and ALL_MASK_REGS rename.
8593 * config/i386/constraints.md (Yk): Update for rename.
8596 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
8598 * config/i386/i386.h (enum reg_class): Remove
8599 EVEX_SSE_REGS and MOD4_SSE_REGS.
8600 (REG_CLASS_NAMES): Update.
8601 (REG_CLASS_CONTENT): Update.
8602 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
8603 registers as ALL_SSE_REGS.
8604 (ix86_additional_allocno_class_p): Remove.
8605 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
8606 (ix86_register_priority): Lower priority of EVEX SSE registers.
8607 Use IN_RANGE macro where appropriate.
8608 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
8609 AVX-5124VNNIW checks.
8610 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
8611 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
8612 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
8613 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
8614 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
8615 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
8616 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
8617 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
8618 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
8619 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
8620 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
8621 * config/i386/constraints.md (Yh): Remove.
8623 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
8625 * config/i386/i386.c (regclass_map): Declare integer REX registers
8628 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
8630 * doc/service.texi (Service): Switch the fsf.org link to https.
8632 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
8635 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8636 Define to speculation_safe_value_not_needed.
8638 2018-09-21 Florian Weimer <fweimer@redhat.com>
8641 * doc/extend.texi (Common Function Attributes): Mention that
8642 noreturn suppresses tail call optimization.
8644 2018-09-21 Jeff Law <law@redhat.com>
8646 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
8647 vr_values::cleanup_edges_and_switches.
8648 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
8650 (identify_jump_threads): Remove EDGE_IGNORE handling.
8651 (execute_vrp): Move handling of to_remove_edges and
8652 to_update_switch_stmts into vr_values class member functions.
8653 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
8654 (to_update_switch_stmts): Likewise.
8655 * vr-values.c: Include cfghooks.h.
8656 (vr_values::vr_values): Initialize to_remove_edges and
8657 to_update_switch_stmts.
8658 (vr_values::~vr_values): Verify to_remove_edges and
8659 to_update_switch_stmts are empty.
8660 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
8661 (vr_values::cleanup_edges_and_switches): New member function.
8662 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
8663 function. Add new data members.
8665 2018-09-21 David Malcolm <dmalcolm@redhat.com>
8667 PR tree-optimization/87309
8668 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
8669 calls with pflags and alt_flags.
8670 (selftest::test_capture_of_dump_calls): Add test of interaction of
8671 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
8673 2018-09-21 Olivier Hainque <hainque@adacore.com>
8675 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
8677 2018-09-21 Olivier Hainque <hainque@adacore.com>
8679 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
8681 2018-09-21 Olivier Hainque <hainque@adacore.com>
8683 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
8684 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
8685 (VXWORKS_LIBS_RTP): Minor reordering.
8687 2018-09-21 Olivier Hainque <hainque@adacore.com>
8689 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
8690 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
8692 2018-09-21 Olivier Hainque <hainque@adacore.com>
8694 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
8695 (PTRDIFF_TYPE): Likewise.
8697 2018-09-21 Olivier Hainque <hainque@adacore.com>
8699 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
8700 triplet, similar to support for VxWorks7.
8701 * config/vxworks-dummy.h: Provide a default definition
8702 of TARGET_VXWORKS64 to 0.
8704 2018-09-21 Olivier Hainque <hainque@adacore.com>
8706 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
8707 * config/vxworks-dummy.h: here.
8709 2018-09-21 Olivier Hainque <hainque@adacore.com>
8711 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
8713 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
8714 Bo Zhou <zbo.zhou@hisilicon.com>
8716 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
8717 * config/aarch64/aarch64-tune.md: Regenerated.
8718 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
8719 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
8720 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
8722 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
8723 Julian Brown <julian@codesourcery.com>
8725 * builtins.c (get_builtin_sync_mem): Handle address spaces.
8727 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
8729 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
8730 if the call takes a static chain.
8732 2018-09-21 Martin Liska <mliska@suse.cz>
8734 * auto-profile.c (autofdo_source_profile::read): Do not
8736 (read_profile): Do not add working sets.
8737 (read_autofdo_file): Remove sum_all.
8738 (afdo_callsite_hot_enough_for_early_inline): Remove const
8740 * coverage.c (struct counts_entry): Remove gcov_summary.
8741 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
8742 do not support GCOV_TAG_PROGRAM_SUMMARY.
8743 (get_coverage_counts): Remove summary and expected
8745 * coverage.h (get_coverage_counts): Likewise.
8746 * doc/gcov-dump.texi: Remove -w option.
8747 * gcov-dump.c (dump_working_sets): Remove.
8748 (main): Do not support '-w' option.
8749 (print_usage): Likewise.
8750 (tag_summary): Likewise.
8751 * gcov-io.c (gcov_write_summary): Do not dump
8753 (gcov_read_summary): Likewise.
8754 (gcov_histo_index): Remove.
8755 (gcov_histogram_merge): Likewise.
8756 (compute_working_sets): Likewise.
8757 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
8759 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
8760 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
8761 (GCOV_HISTOGRAM_SIZE): Remove.
8762 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
8763 (struct gcov_summary): Simplify rapidly just
8764 to runs and sum_max fields.
8765 (gcov_histo_index): Remove.
8766 (NUM_GCOV_WORKING_SETS): Likewise.
8767 (compute_working_sets): Likewise.
8768 * gcov-tool.c (print_overlap_usage_message): Remove
8769 trailing empty line.
8770 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
8771 (output_lines): Remove program related line.
8772 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
8773 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
8775 (input_profile_summary): Do not read it.
8776 (merge_profile_summaries): And do not merge it.
8777 (input_symtab): Do not call removed function.
8778 * modulo-sched.c (sms_schedule): Do not print sum_max.
8779 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
8780 removed when histogram method was invented.
8781 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
8783 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
8785 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
8786 and dump selected value.
8787 * profile.c (add_working_set): Remove.
8788 (get_working_sets): Likewise.
8789 (find_working_set): Likewise.
8790 (get_exec_counts): Do not work with working sets.
8791 (read_profile_edge_counts): Do not inform as sum_max is removed.
8792 (compute_branch_probabilities): Likewise.
8793 (compute_value_histograms): Remove argument for call of
8794 get_coverage_counts.
8795 * profile.h: Do not make gcov_summary const.
8797 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
8799 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
8801 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
8803 PR tree-optimization/86990
8804 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
8805 Check that the entire merged store group is made of constants only for
8808 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
8810 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
8811 (VTABLE_VERIFICATION_SPEC): Likewise.
8812 (SANITIZER_EARLY_SPEC): Likewise.
8813 (SANITIZER_SPEC): Likewise.
8814 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
8815 * doc/invoke.texi (Link Options): Document -r.
8817 2018-09-20 Richard Biener <rguenther@suse.de>
8820 * gimplify.c (gimplify_expr): Retain alignment of
8821 addressable lvalue in dereference.
8823 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
8826 * configure.ac: Check for .loc is_stmt support.
8827 * configure, config.in: Rebuilt.
8828 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
8831 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
8833 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
8834 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
8837 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
8839 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8841 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
8844 2018-09-20 Marek Polacek <polacek@redhat.com>
8846 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
8848 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
8850 PR tree-optimization/87288
8851 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
8852 into account when determining PEELING_FOR_NITERS.
8854 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
8856 PR tree-optimization/86877
8857 * tree-vect-loop.c (vect_analyze_loop_2): Call
8858 vect_verify_datarefs_alignment.
8860 2018-09-19 Marek Polacek <polacek@redhat.com>
8862 * doc/invoke.texi: Document -Wclass-conversion.
8864 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
8866 * config/pa/pa.c (pa_adjust_priority): Delete.
8867 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
8869 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
8870 (atomic_storehi): Likewise.
8871 (atomic_storesi): Likewise.
8872 (atomic_loaddi): Restore compare and swap exchange loop code.
8874 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
8876 PR rtl-optimization/86902
8877 * combine.c (try_combine): When changing the CC mode used, don't change
8878 an unrelated mode in other_insn to that new CC mode.
8880 2018-09-19 David Malcolm <dmalcolm@redhat.com>
8882 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
8883 with %T in place of calls to dump_generic_expr.
8884 (prune_runtime_alias_test_list): Likewise.
8885 (create_runtime_alias_checks): Likewise.
8886 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
8887 (vect_analyze_data_ref_dependence): Likewise.
8888 (vect_slp_analyze_data_ref_dependence): Likewise.
8889 (vect_record_base_alignment): Likewise. Use %G in place of call
8890 to dump_gimple_stmt.
8891 (vect_compute_data_ref_alignment): Likewise.
8892 (verify_data_ref_alignment): Likewise.
8893 (vect_find_same_alignment_drs): Likewise.
8894 (vect_analyze_group_access_1): Likewise.
8895 (vect_analyze_data_ref_accesses): Likewise.
8896 (dependence_distance_ge_vf): Likewise.
8897 (dump_lower_bound): Likewise.
8898 (vect_prune_runtime_alias_test_list): Likewise.
8899 (vect_find_stmt_data_reference): Likewise.
8900 (vect_analyze_data_refs): Likewise.
8901 (vect_create_addr_base_for_vector_ref): Likewise.
8902 (vect_create_data_ref_ptr): Likewise.
8903 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
8904 (vect_can_advance_ivs_p): Likewise.
8905 (vect_update_ivs_after_vectorizer): Likewise.
8906 (vect_gen_prolog_loop_niters): Likewise.
8907 (vect_prepare_for_masked_peels): Likewise.
8908 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8909 (vect_determine_vectorization_factor): Likewise.
8910 (vect_is_simple_iv_evolution): Likewise.
8911 (vect_analyze_scalar_cycles_1): Likewise.
8912 (vect_analyze_loop_operations): Likewise.
8913 (report_vect_op): Likewise.
8914 (vect_is_slp_reduction): Likewise.
8915 (check_reduction_path): Likewise.
8916 (vect_is_simple_reduction): Likewise.
8917 (vect_create_epilog_for_reduction): Likewise.
8918 (vect_finalize_reduction:): Likewise.
8919 (vectorizable_induction): Likewise.
8920 (vect_transform_loop_stmt): Likewise.
8921 (vect_transform_loop): Likewise.
8922 (optimize_mask_stores): Likewise.
8923 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
8924 (vect_split_statement): Likewise.
8925 (vect_recog_over_widening_pattern): Likewise.
8926 (vect_recog_average_pattern): Likewise.
8927 (vect_determine_min_output_precision_1): Likewise.
8928 (vect_determine_precisions_from_range): Likewise.
8929 (vect_determine_precisions_from_users): Likewise.
8930 (vect_mark_pattern_stmts): Likewise.
8931 (vect_pattern_recog_1): Likewise.
8932 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8933 (vect_record_max_nunits): Likewise.
8934 (vect_build_slp_tree_1): Likewise.
8935 (vect_build_slp_tree_2): Likewise.
8936 (vect_print_slp_tree): Likewise.
8937 (vect_analyze_slp_instance): Likewise.
8938 (vect_detect_hybrid_slp_stmts): Likewise.
8939 (vect_detect_hybrid_slp_1): Likewise.
8940 (vect_slp_analyze_operations): Likewise.
8941 (vect_slp_analyze_bb_1): Likewise.
8942 (vect_transform_slp_perm_load): Likewise.
8943 (vect_schedule_slp_instance): Likewise.
8944 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8945 (vect_mark_stmts_to_be_vectorized): Likewise.
8946 (vect_init_vector_1): Likewise.
8947 (vect_get_vec_def_for_operand): Likewise.
8948 (vect_finish_stmt_generation_1): Likewise.
8949 (vect_check_load_store_mask): Likewise.
8950 (vectorizable_call): Likewise.
8951 (vectorizable_conversion): Likewise.
8952 (vectorizable_operation): Likewise.
8953 (vectorizable_load): Likewise.
8954 (vect_analyze_stmt): Likewise.
8955 (vect_is_simple_use): Likewise.
8956 (vect_get_vector_types_for_stmt): Likewise.
8957 (vect_get_mask_type_for_stmt): Likewise.
8958 * tree-vectorizer.c (increase_alignment): Likewise.
8960 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
8962 * doc/rtl.texi: Adjust vec_select description.
8963 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
8964 non-constant selectors.
8966 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
8968 * config/aarch64/aarch64-protos.h
8969 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
8970 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
8971 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
8972 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
8973 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
8974 (AARCH64_FL_PROFILE): Move index so flags are ordered.
8975 (AARCH64_ISA_RCPC8_4): New flag.
8976 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
8977 to aarch64_offset_9bit_signed_unscaled_p.
8978 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
8980 * config/aarch64/constraints.md (Ust): New constraint.
8981 * config/aarch64/predicates.md.
8982 (aarch64_9bit_offset_memory_operand): New predicate.
8983 (aarch64_rcpc_memory_operand): New predicate.
8985 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
8987 PR rtl-optimization/87361
8988 * rtlanal.c (nonzero_bits1): Revert accidental change.
8990 2018-09-19 Richard Biener <rguenther@suse.de>
8992 PR tree-optimization/87349
8993 PR tree-optimization/87342
8994 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
8996 2018-09-18 Marek Polacek <polacek@redhat.com>
8998 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
8999 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
9001 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
9003 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
9005 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
9007 PR rtl-optimization/86882
9008 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
9010 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
9012 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
9013 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
9015 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
9018 * doc/invoke.texi (Link Options): Fix formatting and grammar.
9020 2018-09-18 Richard Biener <rguenther@suse.de>
9023 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
9024 (compute_samebase_partition_bases): Likewise.
9025 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
9026 (gimple_can_coalesce_p): Simplify.
9028 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
9030 Handle a library implementation of ffs calling __builtin_ffs.
9031 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
9032 (mmix_init_libfuncs): New function: make __builtin_ffs expand
9035 2018-09-17 David Malcolm <dmalcolm@redhat.com>
9037 * diagnostic-show-locus.c (class layout_range): Add field
9039 (layout_range::layout_range): Add "original_idx" param and use it
9040 to initialize new field.
9041 (make_range): Use 0 for original_idx.
9042 (layout::layout): Pass in index to calls to
9043 maybe_add_location_range.
9044 (layout::maybe_add_location_range): Add param "original_idx" and
9045 pass it on to layout_range.
9046 (layout::print_any_labels): Pass on range->m_original_idx to
9048 (gcc_rich_location::add_location_if_nearby): Use 0 for
9050 * gcc-rich-location.h (text_range_label::get_text): Update for new
9052 (range_label_for_type_mismatch::get_text): Likewise.
9054 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
9056 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
9058 2018-09-17 David Malcolm <dmalcolm@redhat.com>
9060 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
9061 format_string_diagnostic_t.
9062 (fmtwarn_n): Likewise.
9063 * substring-locations.c
9064 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
9065 (format_warning_n_va): Convert to...
9066 (format_string_diagnostic_t::emit_warning_n_va): ...this.
9067 (format_warning_va): Convert to...
9068 (format_string_diagnostic_t::emit_warning_va): ...this.
9069 (format_warning_at_substring): Convert to...
9070 (format_string_diagnostic_t::emit_warning): ...this.
9071 (format_warning_at_substring_n): Convert to...
9072 (format_string_diagnostic_t::emit_warning_n): ...this.
9073 * substring-locations.h (class format_string_diagnostic_t): New
9075 (format_warning_va): Convert to
9076 format_string_diagnostic_t::emit_warning_va.
9077 (format_warning_n_va): Convert to
9078 format_string_diagnostic_t::emit_warning_n_va.
9079 (format_warning_at_substring): Convert to
9080 format_string_diagnostic_t::emit_warning.
9081 (format_warning_at_substring_n): Convert to
9082 format_string_diagnostic_t::emit_warning_n.
9084 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
9085 Bernd Schmidt <bernds_cb1@t-online.de>
9087 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
9090 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
9092 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
9093 operand 0 predicate to nonimmediate operand.
9094 (rint<mode>2_frndint): Remove insn pattern.
9095 (rint<mode>2): Change operand 1 predicate to general_operand.
9096 Extend operand 1 to XFmode and generate rintxf2 insn.
9097 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
9098 Do not use X87MODEF mode macro.
9099 (frndintxf2_<rounding>_i387): Rename from
9100 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
9101 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
9102 to XFmode and generate significandxf3 insn.
9104 2018-09-17 Richard Biener <rguenther@suse.de>
9106 PR tree-optimization/87328
9107 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
9108 visiting unexecutable backedges when not iterating.
9109 (do_rpo_vn): Mark all edges not executable even when not
9112 2018-09-17 Martin Jambor <mjambor@suse.cz>
9115 * doc/invoke.texi (Warning Options): Likewise.
9117 2018-09-17 Richard Biener <rguenther@suse.de>
9119 PR tree-optimization/87301
9120 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
9121 clean EH info from leftover copy assignments.
9123 2018-09-17 Martin Liska <mliska@suse.cz>
9125 PR gcov-profile/85871
9126 * gcov.c (output_intermediate_file): Fix out of bounds
9129 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
9131 * config/arc/arc.c: Object attributes for core4 not reflected
9133 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
9136 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
9138 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
9140 2018-09-17 Martin Liska <mliska@suse.cz>
9142 * doc/gcov.texi: Document new option --use-hotness-colors.
9143 * gcov.c (struct source_info): Declare new field.
9144 (source_info::source_info): Set default for maximum_count.
9145 (print_usage): Add new -q option.
9146 (process_args): Process it.
9147 (accumulate_line_info): Save src->maximum_count.
9148 (output_line_beginning): Make color line number if
9149 flag_use_hotness_colors is set.
9150 (output_line_details): Pass default argument value.
9151 (output_lines): Pass src->maximum_count.
9153 2018-09-17 Martin Liska <mliska@suse.cz>
9155 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
9156 Use processor_names table.
9157 * config/i386/i386.c (ix86_default_align): Use
9158 processor_cost_table for alignment values.
9159 (ix86_option_override_internal): Use processor_names.
9160 (ix86_function_specific_print): Likewise.
9161 * config/i386/i386.h (struct processor_costs):
9162 Add alignment values.
9163 (struct ptt): Remove and replace with const char *.
9164 * config/i386/x86-tune-costs.h (struct processor_costs):
9165 Declare default alignments for all costs.
9167 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
9169 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
9170 symbolics or VR_VARYING ranges for ABS_EXPR.
9171 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
9172 when range will wrap.
9174 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
9177 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
9178 before and after a JUMP_TABLE_DATA.
9180 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
9183 * dojump.c (do_compare_and_jump): Canonicalize function pointers
9184 when one operand is a function pointer. Use POINTER_TYPE_P and
9185 FUNC_OR_METHOD_TYPE_P.
9186 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
9187 * fold-const.c (build_range_check): Likewise.
9188 * match.pd (simple_comparison): Likewise.
9190 2018-09-14 David Malcolm <dmalcolm@redhat.com>
9193 * spellcheck.c (get_edit_distance_cutoff): New function.
9194 (selftest::test_edit_distance_unit_test_oneway): Rename to...
9195 (selftest::test_get_edit_distance_one_way): ...this.
9196 (selftest::test_get_edit_distance_unit): Rename to...
9197 (selftest::test_get_edit_distance_both_ways): ...this.
9198 (selftest::test_edit_distances): Move tests to this new function,
9199 and test some more pairs of strings. Update for above renaming.
9200 (selftest::get_old_cutoff): New function.
9201 (selftest::test_get_edit_distance_cutoff): New function.
9202 (selftest::assert_suggested_for): New function.
9203 (ASSERT_SUGGESTED_FOR): New macro.
9204 (selftest::assert_not_suggested_for): New function.
9205 (ASSERT_NOT_SUGGESTED_FOR): New macro.
9206 (selftest::test_suggestions): New function.
9207 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
9208 tests to selftest::test_edit_distances and call it. Add calls to
9209 selftest::test_get_edit_distance_cutoff and
9210 selftest::test_suggestions.
9211 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
9212 (best_match::consider): Replace hard-coded cutoff calculation with
9214 (best_match::get_cutoff): New declaration.
9215 (best_match::get_best_meaningful_candidate): Likewise.
9217 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9219 * builtins.c (fold_builtin_strlen): Remove TODO comment.
9221 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9224 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9226 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9227 terminated string literal.
9229 2018-09-14 Martin Sebor <msebor@redhat.com>
9231 * builtins.c (unterminated_array): Handle ARRAY_REF.
9232 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
9233 * builtins.h (unterminated_array): Declare extern.
9234 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
9236 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
9239 2018-09-14 Martin Sebor <msebor@redhat.com>
9240 Jeff Law <law@redhat.com>
9242 * builtins.c (unterminated_array): New.
9243 (expand_builtin_strcpy): Adjust.
9244 (expand_builtin_strcpy_args): Detect unterminated arrays.
9245 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
9246 unterminated arrays.
9247 * gimple-fold.h (get_maxval_strlen): Add argument.
9248 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
9250 * gimple-fold.c (get_range_strlen): Add argument.
9251 (get_maxval_strlen): Adjust.
9252 * gimple-fold.h (get_range_strlen): Add argument.
9254 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
9256 * config/i386/movdirintrin.h: Fix copyright year.
9258 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
9260 * reg-stack.c: Include regs.h.
9261 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
9262 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
9263 FIRST_STACK_REG, not DFmode.
9264 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
9265 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
9266 (change stack): Default register mode to the reg_raw_mode of
9267 FIRST_STACK_REG, not DFmode.
9268 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
9269 (*swapxf): Rename from swapxf.
9271 2018-09-14 Carl Love <cel@us.ibm.com>
9273 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
9274 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
9276 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
9279 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
9282 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
9285 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
9287 2018-09-14 Jason Merrill <jason@redhat.com>
9289 Fix --enable-gather-detailed-mem-stats.
9290 * hash-table.c (hash_table_usage): Change from variable to function.
9291 * hash-table.h: Adjust.
9292 * Makefile.in: Add missing dependencies on hash-table.h.
9294 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9296 PR tree-optimization/87259
9298 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
9299 execute_cse_reciprocals_1 has tried transforming.
9301 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
9303 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
9304 VR_VARYING for PLUS/MINUS_EXPR.
9306 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
9308 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
9311 2018-09-14 Richard Biener <rguenther@suse.de>
9314 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
9315 bits for the merged partition.
9317 2018-09-13 Martin Sebor <msebor@redhat.com>
9318 Bernd Edlinger <bernd.edlinger@hotmail.de>
9320 * builtins.h (c_srlen): Add argument.
9321 * builtins.c (warn_string_no_nul): New function.
9322 (c_strlen): Add argument and use it. Update recursive calls.
9323 Pass DECL argument to string_constant to get info on non
9324 terminated strings. Update *NONSTR as needed.
9325 (fold_builtin_strlen): Add argument to calls to c_strlen.
9326 Warn for unterminated arrays.
9327 (warn_string_no_null): Add prototype.
9328 * expr.c (string_constant): Update arguments. Update recursive
9329 calls appropriately. Detect missing NUL terminator and outermost
9330 declaration its missing in.
9331 Improve checks for arrays with nonzero lower bound or elements
9332 that are not a single byte. Simplify offset computation.
9333 Simplify checks for non-NUL terminated strings.
9334 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
9335 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
9337 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
9339 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
9341 * fold-const.c (c_getstr): Fix function comment. Remove unused third
9342 argument. Fix range checks.
9343 * fold-const.h (c_getstr): Adjust protoype.
9344 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
9345 string is constant but contains no NUL byte.
9347 * expr.c (string_constant): Adjust function comment.
9348 Remove bogus check for zero termination.
9350 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
9352 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
9353 (get_constant_size): Don't make STRING_CSTs larger than they are.
9354 (check_string_literal): New check function for STRING_CSTs.
9355 (output_constant): Use it.
9357 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
9360 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
9362 2018-09-13 Richard Biener <rguenther@suse.de>
9364 PR tree-optimization/87263
9365 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
9366 (struct unwind_state): Add max_rpo field.
9367 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
9368 Compute max_rpo, the max RPO number a block can be backwards reached
9369 from. Re-write non-iterating mode to a RPO ordered worklist approach,
9370 separating it from the iterating mode.
9372 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
9374 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
9375 (rfs_decision): New scheduling decision.
9377 2018-09-13 Richard Biener <rguenther@suse.de>
9380 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
9381 (vn_nary_op_insert_pieces_predicated): Do not write useless
9382 valid_dominated_by_p entry outside of the allocated storage.
9384 2018-09-13 Omar Sandoval <osandov@osandov.com>
9385 Tom de Vries <tdevries@suse.de>
9388 * dwarf2out.c (is_c): New function.
9389 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
9391 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
9394 * config/aarch64/aarch64.md (*aarch64_bfxil):
9396 * config/aarch64/constraints.md (Ulc): Define.
9397 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
9399 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
9402 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
9404 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
9405 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
9406 aarch64_layout_frame call.
9407 (aarch64_expand_epilogue): Likewise.
9408 (aarch64_initial_elimination_offset): Likewise.
9409 (aarch64_get_separate_components): Likewise.
9410 (aarch64_use_return_insn_p): Likewise.
9411 (aarch64_layout_frame): Remove unneeded check.
9413 2018-09-13 Jakub Jelinek <jakub@redhat.com>
9415 * configure.ac: Only append
9416 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
9417 gcc_config_arguments if it was never reconfigured or last reconfigure
9418 was with different arguments.
9419 * configure: Regenerated.
9421 2018-09-13 Jakub Jelinek <jakub@redhat.com>
9422 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9425 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
9426 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
9428 2018-09-13 Jakub Jelinek <jakub@redhat.com>
9430 PR tree-optimization/87287
9431 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
9432 X % C == 0 to X % (unsigned) C == 0 optimization to ...
9433 * match.pd (X % C == 0): ... here. New optimization.
9435 2018-09-12 Jakub Jelinek <jakub@redhat.com>
9438 * expr.h (maybe_optimize_mod_cmp): Declare.
9439 * expr.c (mod_inv): New function.
9440 (maybe_optimize_mod_cmp): New function.
9441 (do_store_flag): Use it.
9442 * cfgexpand.c (expand_gimple_cond): Likewise.
9444 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
9445 Julian Brown <julian@codesourcery.com>
9448 * gimplify.c (gimplify_scan_omp_clauses): Set
9449 target_firstprivatize_array_bases in OpenACC parallel and kernels
9450 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
9451 OpenACC data regions.
9453 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
9455 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
9456 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
9458 2018-09-12 Richard Biener <rguenther@suse.de>
9460 PR tree-optimization/87280
9461 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
9462 edge but unreachable target.
9463 (do_rpo_vn): For conservatively handling a PHI only mark
9464 the backedge executable but not the block reachable.
9466 2018-09-12 Richard Biener <rguenther@suse.de>
9468 PR tree-optimization/87266
9469 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
9472 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
9474 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
9476 ("trunc<BFP:mode><DFP_ALL:mode>2")
9477 ("trunc<DFP_ALL:mode><BFP:mode>2")
9478 ("extend<BFP:mode><DFP_ALL:mode>2")
9479 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
9480 according to the target operand type.
9482 2018-09-12 Jakub Jelinek <jakub@redhat.com>
9483 Andreas Krebbel <krebbel@linux.ibm.com>
9485 PR tree-optimization/86844
9486 * gimple-ssa-store-merging.c
9487 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
9488 there are any overlapping stores in between them, make sure they are
9489 also coalesced or we give up completely.
9491 2018-09-12 Jakub Jelinek <jakub@redhat.com>
9494 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
9495 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
9497 2018-09-12 Tom de Vries <tdevries@suse.de>
9499 * common.opt (gdescribe-dies): Add option.
9500 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
9501 attribute for artifical and nameless decls.
9502 (dwarf2out_register_external_die): Add description attribute to
9503 external reference die.
9504 (add_desc_attribute): New functions.
9505 (gen_subprogram_die): Add description attribute to
9506 DW_TAG_call_site_parameter.
9507 * tree-pretty-print.c (print_generic_expr_to_str): New function.
9508 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
9509 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
9511 (@item -gdescribe-dies): Add.
9513 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
9515 * tree-vrp.c (vrp_shift_undefined_p): Remove.
9516 (extract_range_from_binary_expr_1: Call
9517 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
9518 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
9521 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
9523 * gimple-ssa-warn-alloca.c
9524 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
9525 field for ALLOCA_BOUND_*_LARGE.
9527 2018-09-11 Nathan Sidwell <nathan@acm.org>
9529 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
9531 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
9533 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
9534 for clobbers. Remove obsolete comment.
9536 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
9538 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
9539 mpxchk, mpxld and mpxst types.
9540 (define_attr length_immediate): Remove all processing of mpx types.
9541 (define_attr prefix_0f): Ditto.
9542 (define_attr memory): Ditto.
9544 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
9546 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
9547 (log<mode>2): Change operand 1 predicate to general_operand.
9548 Extend operand 1 to XFmode and generate logxf3 insn.
9549 (log10<mode>2): Change operand 1 predicate to general_operand.
9550 Extend operand 1 to XFmode and generate log10xf3 insn.
9551 (log2<mode>2): Change operand 1 predicate to general_operand.
9552 Extend operand 1 to XFmode and generate log2xf3 insn.
9553 (fyl2xp1_extend<mode>xf3_i387): Remove.
9554 (log1p<mode>2): Change operand 1 predicate to general_operand.
9555 Extend operand 1 to XFmode and generate log1pxf3 insn.
9556 (fxtract_extend<mode>xf3_i387): Remove.
9557 (logb<mode>2): Change operand 1 predicate to general_operand.
9558 Extend operand 1 to XFmode and generate logbxf3 insn.
9559 (ilogb<mode>2): Change operand 1 predicate to general_operand.
9560 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
9561 (significand<mode>2): Change operand 1 predicate to general_operand.
9562 Extend operand 1 to XFmode and generate significandxf3 insn.
9564 2018-09-11 Nathan Sidwell <nathan@acm.org>
9566 * gcc.c (perror_with_name, pfatal_with_name): Delete.
9567 (load_specs): Use fatal_error.
9568 (DELETE_IF_ORDINARY, process_command): Use error.
9569 (execute, run_attempt): Use fatal_error.
9571 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
9573 * diagnostic-core.h (sorry_at): New prototype.
9574 * diagnostic.c (sorry_at): New function.
9576 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
9578 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
9579 by zero as VR_UNDEFINED.
9581 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
9583 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
9584 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
9585 (<sincos>mode2): New expander.
9586 (sincos_extend<mode>xf3_i387): Remove insn pattern.
9587 (sincos -> sin, cos splitters): Remove splitter patterns.
9588 (sincos<mode>3): Change operand 2 predicate to general_operand.
9589 Extend operand 2 to XFmode and generate sincosxf3 insn.
9590 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
9591 Change operand 3 predicate to const1_operand.
9592 (fptan_extend<mode>xf4_i387): Remove insn pattern.
9593 (tanxf2): Update operands in the call to fptanxf4_i387.
9594 (tan<mode>2): Change operand 1 predicate to general_operand.
9595 Extend operand 1 to XFmode and generate tanxf3 insn.
9596 (atan2xf3): Rename from *fpatanxf3_i387.
9597 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
9598 (atan2xf3): Remove expander.
9599 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
9600 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
9601 (atan<mode>2): Change operand 1 predicate to general_operand.
9602 Extend operand 1 to XFmode and generate atanxf3 insn.
9604 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
9606 * config/i386/i386.md (x87/SSE constant load splitter): Use
9607 memory_operand instead of nonimmediate_operand for input operand
9610 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
9612 * config/i386/i386.md (float partial SSE register stall splitter): Move
9613 splitter near its instruction pattern.
9614 (float_extend partial SSE register stall splitter): Ditto.
9615 (float_truncate partial SSE register stall splitter): Ditto.
9617 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
9620 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9621 to speculation_safe_value_not_needed.
9624 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
9625 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
9626 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
9627 leaf_function_p, instead use has_hard_reg_initial_val.
9629 2018-09-09 Nathan Sidwell <nathan@acm.org>
9631 * gcc.h (pfatal_with_name): Don't declare here.
9632 * gcc.c (pfatal_with_name): Make static.
9634 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
9636 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
9639 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
9641 PR rtl-optimization/85458
9642 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
9643 priority hook to reduce the priority of EXPR.
9645 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
9647 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
9648 DImode for x87 on 32bit targets. Conditionally disable x87 modes
9649 with X87_ENABLE_FLOAT. Remove preparation code.
9650 (*float<SWI48:mode><MODEF:mode>2): Rename from
9651 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
9652 math using "enabled" attribute.
9653 (*floatdi<MODEF:mode>2_i387): Rename from
9654 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
9655 enable for 32bit targets only.
9656 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
9658 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
9659 as operand 1 predicate. Rewrite as define_insn_and_split.
9660 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
9662 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
9664 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
9665 to fallthru to FLOAT case.
9667 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
9670 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
9671 around folding of vec_sl to handle out of range shift values.
9673 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
9675 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
9676 Update callers to gen_fix_trunc<mode>_i387_fisttp
9677 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
9678 nonimmediate_operand.
9679 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
9680 and corresponding splitters.
9681 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
9682 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
9683 (fix_truncdi_i387_with_temp): Remove insn pattern
9684 and corresponding splitters.
9685 (fix_trunc<mode>_i387): Change operand 0 predicate to
9686 nonimmediate_operand.
9687 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
9688 and corresponding splitters.
9689 (*fistdi2_1): Remove.
9691 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
9692 (lrintxfdi2): Remove expander. Reimplement as define_insn.
9693 (*fist<mode>2_1): Remove.
9694 (fist<mode>2): Ditto.
9695 (fist<mode>2_with_temp): Remove insn pattern and corresponding
9697 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
9698 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
9699 (fistdi2_<rounding>): Change operand 0 predicate to
9700 nonimmediate_operand.
9701 (fistdi2_<rounding>_with_temp): Remove insn pattern
9702 and corresponding splitters.
9703 (fist<mode>2_<rounding>): Change operand 0 predicate to
9704 nonimmediate_operand.
9705 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
9706 and corresponding splitters.
9708 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
9710 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
9712 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
9715 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
9717 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9718 early gimple folding of vec_splat().
9719 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
9720 * gimple-fold.h: Add an extern define for tree_vec_extract().
9722 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
9724 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
9725 wrappers around TREE_TYPE comparisons.
9727 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9730 * config/s390/predicates.md: Add nonsym_memory_operand.
9731 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
9732 contains a SYMBOL_REF, load it into an intermediate pseudo.
9733 (s390_emit_compare_and_swap): Legitimize operand.
9734 * config/s390/s390.md: Use the new nonsym_memory_operand
9735 with UNSPECV_CAS patterns.
9737 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9740 * config/s390/s390-passes.def: New file.
9741 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
9743 (make_pass_s390_early_mach): Add declaration.
9744 * config/s390/s390.c (make_pass_s390_early_mach):
9745 (s390_option_override): Remove dynamic registration.
9746 * config/s390/t-s390: Add s390-passes.def.
9748 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9750 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9751 Remove UNSPEC_LTREL_BASE check.
9752 (annotate_constant_pool_refs): Likewise.
9753 (find_constant_pool_ref): Likewise.
9754 (find_ltrel_base): Removed.
9755 (replace_ltrel_base): Removed.
9756 (s390_mainpool_finish): Remove replace_ltrel_base call.
9757 (s390_chunkify_start): Remove pending LTREL_BASE logic.
9758 (s390_chunkify_finish): Remove replace_ltrel_base call.
9759 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
9761 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
9764 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9765 to speculation_safe_value_not_needed.
9767 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
9768 Bernd Schmidt <bernds_cb1@t-online.de>
9770 * config/nvptx/nvptx-opts.h: New file.
9771 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
9772 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
9774 (TARGET_SM35): New macro.
9775 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
9777 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
9779 (misa=): New option.
9780 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
9782 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
9784 * config/i386/i386.md (truncdfsf2): Remove expander.
9785 (truncdfsf2_with_temp): Ditto.
9786 (truncxf<mode>2): Ditto.
9787 (*truncdfsf_fast_mixed): Remove insn pattern.
9788 (*truncdfsf_fast_i387): Ditto.
9789 (*truncdfsf_mixed): Ditto.
9790 (*truncdfsf_i387): Ditto.
9791 (*truncdfsf2_i387_1): Ditto.
9792 (*truncxfsf2_mixed): Ditto.
9793 (*truncxfdf2_mixed): Ditto.
9794 (*truncxf<mode>2_i387_noop): Ditto. Update callers
9795 to call gen_truncxf<mode>2 instead.
9796 (*truncxf<mode>2_i387): Remove.
9797 (reg->reg splitters): Remove splitter pattern.
9798 (reg->mem splitters): Ditto.
9800 (truncdfsf2): New insn pattern.
9801 (truncxf<mode>2): Ditto.
9803 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9805 * tree-ssa-math-opts.c (is_mult_by): New function.
9806 (is_square_of): Use the above.
9807 (optimize_recip_sqrt): New function.
9808 (pass_cse_reciprocals::execute): Use the above.
9810 2018-09-05 Richard Biener <rguenther@suse.de>
9813 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
9814 to zero-init the emplaced vec.
9816 2018-09-05 Martin Liska <mliska@suse.cz>
9818 PR tree-optimization/87205
9819 * tree-switch-conversion.c (pass_lower_switch::execute):
9820 Group cases for switch statements.
9822 2018-09-05 Richard Biener <rguenther@suse.de>
9824 PR tree-optimization/87217
9825 * tree-ssa-sccvn.c (vuse_valueize): New.
9826 (vn_reference_lookup_pieces): Use it.
9827 (vn_reference_lookup): Likewise.
9829 2018-09-05 Nathan Sidwell <nathan@acm.org>
9832 * stor-layout.c (place_field): Scan forwards to check last
9833 bitfield when ms_bitfield_placement is in effect.
9835 2018-09-05 Richard Biener <rguenther@suse.de>
9838 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
9841 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
9842 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
9844 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
9845 * config.gcc (extra_objs): Build it.
9846 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
9848 * config/aarch64/aarch64-passes.def
9849 (pass_tag_collision_avoidance): New pass.
9850 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
9851 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
9852 (aarch64_classify_address): Remove static qualifier.
9853 (aarch64_address_info, aarch64_address_type): Move to...
9854 * config/aarch64/aarch64-protos.h: ... here.
9855 (make_pass_tag_collision_avoidance): New function.
9856 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
9859 2018-09-05 Martin Liska <mliska@suse.cz>
9861 * doc/gcov.texi: Update documentation of humar
9863 * gcov.c (format_count): Print one decimal place, it provides
9864 more fine number of situations like '1G' vs. '1.4G'.
9866 2018-09-05 Martin Liska <mliska@suse.cz>
9869 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
9870 * optc-gen.awk: Allow 'Var' for Deprecated options in order
9871 to generate a MASK value.
9873 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
9876 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
9877 if frame pointer isn't used.
9878 (compute_frame_pointer_to_fb_displacement): Likewise.
9880 2018-09-04 Jakub Jelinek <jakub@redhat.com>
9883 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
9884 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
9885 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
9886 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
9887 and OPTION_MASK_ISA_XSAVEC_UNSET.
9889 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
9891 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
9892 XOR operations in NAND case.
9894 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
9896 * wide-int-range.cc (wide_int_range_convert): New.
9897 * wide-int-range.h (wide_int_range_convert): New.
9898 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
9899 code into wide_int_range_convert.
9900 (extract_range_into_wide_ints): Do not munge anti range constants
9901 into the entire domain. Just return the range back.
9903 2018-09-04 Martin Liska <mliska@suse.cz>
9905 * genmatch.c (output_line_directive): Add new argument
9907 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
9909 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
9911 * doc/invoke.texi (Option Summary): Add whitespace.
9913 * doc/invoke.texi (Option Summary): Add -Waligned-new.
9915 2018-09-04 Richard Biener <rguenther@suse.de>
9917 PR tree-optimization/87211
9918 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
9919 backedge value we're supposed to treat as VARYING also number
9920 the PHI to VARYING in case it got a different value-number already.
9922 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
9924 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
9925 (extract_range_from_binary_expr_1): Do not call
9926 vrp_can_optimize_bit_op.
9927 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
9929 (wide_int_range_get_mask_and_bounds): New.
9930 (wide_int_range_optimize_bit_op): New.
9931 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
9932 (wide_int_range_bit_and): Same.
9933 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
9934 (wide_int_range_optimize_bit_op): New.
9935 (wide_int_range_get_mask_and_bounds): New.
9937 2018-09-04 Richard Biener <rguenther@suse.de>
9939 PR tree-optimization/87176
9940 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
9941 variable. When value-numbering a virtual PHI node make sure
9942 to not value-number to the backedge value.
9944 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
9946 * doc/extend.texi (Long Long, Hex Floats): Document support for
9947 long long and hex floats in more recent versions of ISO C++.
9949 2018-09-03 Richard Biener <rguenther@suse.de>
9951 PR tree-optimization/87177
9952 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
9955 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9957 * bb-reorder.c (edge_order): Convert to C-qsort-style
9958 tri-state comparator.
9959 (reorder_basic_blocks_simple): Change std::stable_sort to
9962 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9964 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
9965 tri-state comparator.
9966 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
9968 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9970 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
9971 (mergesort): ... here as maximum count for using netsort.
9972 (gcc_qsort): Set nlim to 3 if stable sort is requested.
9973 (gcc_stablesort): New.
9974 * system.h (gcc_stablesort): Declare.
9976 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9978 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
9979 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
9980 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
9982 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
9984 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
9985 lxsdx and stxsdx alternatives.
9986 (*mov<mode>_hardfloat64): Ditto.
9987 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
9989 2018-09-03 Richard Biener <rguenther@suse.de>
9991 PR tree-optimization/87200
9992 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
9995 2018-09-03 Martin Liska <mliska@suse.cz>
9997 PR tree-optimization/87201
9998 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9999 Fix parenthesis in an expression.
10001 2018-09-03 Richard Biener <rguenther@suse.de>
10003 PR tree-optimization/87197
10004 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
10005 visited. CSE the VN_INFO hashtable lookup.
10007 PR tree-optimization/87169
10008 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
10009 iterating make sure there's no extra backedges from irreducible
10010 regions feeding the header. Mark the destination block
10013 2018-09-03 Martin Liska <mliska@suse.cz>
10016 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
10017 * common/common-targhooks.c (default_get_valid_option_values):
10019 * common/common-targhooks.h (default_get_valid_option_values):
10021 * common/config/i386/i386-common.c: Move processor_target_table
10023 (ix86_get_valid_option_values): New function.
10024 (TARGET_GET_VALID_OPTION_VALUES): New macro.
10025 * config/i386/i386.c (struct ptt): Move to i386-common.c.
10026 (PTA_*): Move all defined masks into i386-common.c.
10027 (ix86_function_specific_restore): Use new processor_cost_table.
10028 * config/i386/i386.h (struct ptt): Moved from i386.c.
10029 (struct pta): Likewise.
10030 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
10031 * doc/tm.texi.in: Likewise.
10032 * opt-suggestions.c (option_proposer::suggest_option):
10033 Pass prefix to build_option_suggestions.
10034 (option_proposer::get_completions): Likewise.
10035 (option_proposer::build_option_suggestions): Use the new target
10037 * opts.c (struct option_help_tuple): New struct.
10038 (print_filtered_help): Use the new target hook.
10040 2018-09-03 Martin Liska <mliska@suse.cz>
10042 PR middle-end/59521
10043 * predict.c (set_even_probabilities): Add likely_edges
10044 argument and handle cases where we have precisely one
10046 (combine_predictions_for_bb): Catch also likely_edges.
10047 (tree_predict_by_opcode): Handle gswitch statements.
10048 * tree-cfg.h (find_case_label_for_value): New declaration.
10049 (find_taken_edge_switch_expr): Likewise.
10050 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
10051 Find pivot in decision tree based on probabily, not by number of
10054 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
10056 * doc/standards.texi (Standards): Update Objective-C reference.
10058 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
10060 * doc/install.texi (Prerequisites): Update link for MPC.
10062 2018-09-01 Michael Matz <matz@suse.de>
10064 PR tree-optimization/87074
10065 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
10066 PHIs for outer-loop uses.
10068 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
10070 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
10071 * doc/invoke.texi (C Dialect Options): Ditto.
10073 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
10075 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
10077 2018-08-31 Richard Biener <rguenther@suse.de>
10079 PR tree-optimization/87168
10080 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
10081 (rpo_elim::eliminate_avail): When OP was not visited it must
10084 2018-08-31 David Malcolm <dmalcolm@redhat.com>
10086 * tree-vrp.c (copy_value_range): Convert param "from" from
10087 "value_range *" to "const value_range *".
10088 (range_is_null): Likewise for param "vr".
10089 (range_int_cst_p): Likewise.
10090 (range_int_cst_singleton_p): Likewise.
10091 (symbolic_range_p): Likewise.
10092 (value_ranges_intersect_p): Likewise for both params.
10093 (value_range_nonnegative_p): Likewise for param "vr".
10094 (value_range_constant_singleton): Likewise.
10095 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
10096 (extract_range_into_wide_ints): Likewise for param "vr".
10097 (extract_range_from_multiplicative_op): Likewise for params "vr0"
10099 (vrp_can_optimize_bit_op): Likewise.
10100 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
10102 (extract_range_from_unary_expr): Likewise.
10103 (debug_value_range): Likewise for param "vr".
10104 (value_range::dump): Add "const" qualifier.
10105 (vrp_prop::check_array_ref): Convert local "vr" from
10106 "value_range *" to "const value_range *".
10107 (vrp_prop::check_mem_ref): Likewise.
10108 (vrp_prop::visit_stmt): Likewise for local "old_vr".
10109 (vrp_intersect_ranges_1): Likewise for param "vr_1".
10110 (vrp_intersect_ranges): Likewise.
10111 (simplify_stmt_for_jump_threading): Likewise for local "vr".
10112 (vrp_prop::vrp_finalize): Likewise.
10113 * tree-vrp.h (value_range::dump): Add "const" qualifier.
10114 (vrp_intersect_ranges): Add "const" qualifier to params as above.
10115 (extract_range_from_unary_expr): Likewise.
10116 (value_range_constant_singleton): Likewise.
10117 (symbolic_range_p): Likewise.
10118 (copy_value_range): Likewise.
10119 (extract_range_from_binary_expr_1): Likewise.
10120 (range_int_cst_p): Likewise.
10121 (vrp_set_zero_nonzero_bits): Likewise.
10122 (range_int_cst_singleton_p): Likewise.
10124 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
10126 * config/aarch64/arm_neon.h (vabsd_s64): New.
10127 (vnegd_s64): Likewise.
10129 2018-08-31 Martin Jambor <mjambor@suse.cz>
10131 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
10133 2018-08-31 Martin Liska <mliska@suse.cz>
10135 * ipa-icf.c (sem_item::add_type): Use
10136 sem_item::m_type_hash_cache.
10137 * ipa-icf.h: Move the cache from sem_item_optimizer
10140 2018-08-31 Nathan Sidwell <nathan@acm.org>
10142 * doc/extend.texi (Backwards Compatibility): Remove implicit
10143 extern C leeway of () being (...).
10145 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10147 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
10149 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
10153 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
10155 2018-08-31 Jakub Jelinek <jakub@redhat.com>
10157 PR middle-end/87138
10158 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
10159 gen_int_mode. Formatting fixes.
10161 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
10163 * target.def (custom_function_descriptors): Improve documentation.
10164 * doc/tm.texi.in (Trampolines): Expand discussion of function
10165 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
10166 beginning of the section.
10167 * doc/tm.texi: Regenerated.
10169 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
10171 * cfg.h (class auto_edge_flag): Spell out the template-id of the
10172 base class in the initializer list. This is a workaround for
10173 building with older GCC.
10174 (class auto_bb_flag): Likewise.
10176 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
10178 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
10179 (altivec_vcmpequ<VI_char>_p): Remove star.
10180 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
10182 (expand_strncmp_vec_sequence): New function.
10183 (emit_final_str_compare_vec): New function.
10184 (expand_strn_compare): Add support for vector strncmp.
10185 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
10186 length specification to bytes.
10187 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
10188 (vcmpnezb_p): New pattern.
10189 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
10190 for option -mstring-compare-inline-limit.
10192 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
10194 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
10195 (PTA_SKYLAKE): Add PTA_AES.
10196 (PTA_GOLDMONT): Likewise.
10198 2018-08-29 Jan Hubicka <jh@suse.cz>
10201 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
10202 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
10204 2018-08-29 Jan Hubicka <jh@suse.cz>
10206 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
10208 (hash_tree): Do not visit TYPE_STUB_DECL.
10209 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
10210 stream TYPE_STUB_DECL.
10211 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
10212 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
10213 after free_lang_data.
10214 (type_in_anonymous_namespace_p): Likewise.
10216 2018-08-29 Jan Hubicka <jh@suse.cz>
10218 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10219 comment that it has to be even number.
10220 (class sreal): Change m_sig type to int32_t.
10221 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10222 int64_t for temporary calculations.
10223 (sreal_verify_basics): Drop one bit from minimum and maximum.
10225 2018-08-30 Richard Biener <rguenther@suse.de>
10227 PR tree-optimization/87147
10228 * tree-ssa-sccvn.c (SSA_VISITED): New function.
10229 (visit_phi): When the degenerate result is from the backedge and
10230 we didn't visit its definition yet drop to VARYING.
10231 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
10233 2018-08-29 Jan Hubicka <jh@suse.cz>
10235 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
10237 (hash_tree): Likewise.
10239 2018-08-29 Jan Hubicka <jh@suse.cz>
10241 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
10242 and TYPE_NEXT_REF_TO.
10244 2018-08-29 Jan Hubicka <jh@suse.cz>
10246 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10247 comment that it has to be even number.
10248 (class sreal): Change m_sig type to int32_t.
10249 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10250 int64_t for temporary calculations.
10251 (sreal_verify_basics): Drop one bit from minimum and maximum.
10253 2018-08-30 Tamar Christina <tamar.christina@arm.com>
10255 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
10257 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
10259 PR middle-end/86995
10260 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
10261 if to_add is negative.
10263 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
10265 PR middle-end/87053
10266 * builtins.c (c_strlen): Improve range checks.
10268 2018-08-29 Martin Sebor <msebor@redhat.com>
10269 Jeff Law <law@redhat.com>
10271 PR tree-optimization/86714
10272 PR tree-optimization/86711
10273 * builtins.c (c_strlen): Add arguments to call to string_constant.
10274 * expr.c (string_constant): Add argument. Detect missing nul
10275 terminator and outermost declaration it's missing in.
10276 * expr.h (string_constant): Add argument.
10277 * fold-const.c (read_from_constant_string): Add arguments to call to
10279 (c_getstr): Likewise.
10280 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10281 to string_constant.
10282 * tree-ssa-strlen.c (get_stridx): Likewise.
10284 2018-08-29 Jan Hubicka <jh@suse.cz>
10286 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
10287 Do not stream DECL_VINDEX.
10288 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
10289 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
10290 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
10292 2018-08-29 Richard Biener <rguenther@suse.de>
10294 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
10295 virtual operands that are not default defs to honor region
10297 (rpo_vn_valueize): Remove ineffective code here.
10299 2018-08-29 Richard Biener <rguenther@suse.de>
10301 PR tree-optimization/87132
10302 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
10303 when skipping defs reachable over backedges.
10305 2018-08-29 Richard Biener <rguenther@suse.de>
10307 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
10308 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
10309 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
10310 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
10311 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
10312 (vn_reference_lookup_3): Remove use of const_parms.
10313 (free_rpo_vn): Do not free const_parms.
10314 (do_rpo_vn): Do not call init_const_parms.
10315 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
10316 SSA_NAME_POINTS_TO_READONLY_MEMORY.
10317 (call_may_clobber_ref_p_1): Likewise.
10319 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
10322 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
10324 (-ftree-scev-cprop): Document.
10326 2018-08-29 Jan Hubicka <jh@suse.cz>
10328 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
10330 (sreal constructor): Update.
10331 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
10332 sreal:operator/): Update.
10334 2018-08-29 Martin Liska <mliska@suse.cz>
10336 * tree-switch-conversion.c (switch_conversion::expand):
10337 Strenghten assumption about gswitch statements.
10339 2018-08-29 Richard Biener <rguenther@suse.de>
10341 PR tree-optimization/87117
10342 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
10343 re-value-number released SSA VDEFs.
10345 2018-08-29 Richard Biener <rguenther@suse.de>
10347 PR tree-optimization/87126
10348 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
10350 2018-08-28 Jim Wilson <jimw@sifive.com>
10352 * config/riscv/pic.md: Rewrite.
10353 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
10355 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
10356 (SOFTF, default_load, softload, softstore): New.
10358 2018-08-28 Jeff Law <law@redhat.com>
10360 * fold-const.c (fold_binary_loc): Remove recently added assert.
10362 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
10364 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
10365 to OP parmeter of generated function.
10367 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
10369 PR tree-optimization/87009
10370 * match.pd: Add boolean optimizations.
10372 2018-08-28 Martin Sebor <msebor@redhat.com>
10374 PR middle-end/86631
10375 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
10376 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
10377 (pass_walloca::gate): Use it.
10378 (alloca_call_type): Same.
10379 (pass_walloca::execute): Same.
10380 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
10382 2018-08-28 David Malcolm <dmalcolm@redhat.com>
10384 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
10385 GCC_VERSION for usage of "__gcc_dump_printf__" format from
10386 >= 3005 to >= 9000.
10388 2018-08-28 Richard Biener <rguenther@suse.de>
10390 PR tree-optimization/87124
10391 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
10392 constants before looking up avail.
10394 2018-08-28 Jakub Jelinek <jakub@redhat.com>
10396 PR middle-end/87099
10397 * calls.c (maybe_warn_nonstring_arg): Punt early if
10398 warn_stringop_overflow is zero. Don't call get_range_strlen
10399 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
10400 Swap comparison operands to have constants on rhs. Only use
10401 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
10402 increment lenrng[0].
10404 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
10406 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
10407 use of tree_to_shwi. Remove duplicated test for the size being
10408 a whole number of bytes.
10410 2018-08-28 Richard Biener <rguenther@suse.de>
10412 PR tree-optimization/87117
10413 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
10414 Handle removed stmt without LHS (GIMPLE_NOP).
10416 2018-08-28 Richard Biener <rguenther@suse.de>
10418 PR tree-optimization/87117
10419 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
10420 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
10422 2018-08-28 Richard Biener <rguenther@suse.de>
10424 PR tree-optimization/87117
10425 * tree-ssa-pre.c (compute_avail): Do not make expressions
10426 with predicated values available.
10427 (get_expr_value_id): Assert we do not run into predicated value
10430 2018-08-28 Richard Biener <rguenther@suse.de>
10432 PR tree-optimization/87117
10433 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
10434 get virtual operands.
10435 (get_expr_operands): Handle STRING_CST like other decls.
10437 2018-08-28 Martin Liska <mliska@suse.cz>
10439 * tree.h: Update documentation of fndecl_built_in_p
10443 2018-08-27 Jeff Law <law@redhat.com>
10444 PR tree-optimization/87110
10445 * tree-ssa-dse.c (compute_trims): Handle non-constant
10448 2018-08-27 Martin Sebor <msebor@redhat.com>
10450 PR tree-optimization/86914
10451 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
10453 2018-08-27 Martin Sebor <msebor@redhat.com>
10455 PR tree-optimization/87112
10456 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
10457 the type of the bound argument.
10459 2018-08-27 Jeff Law <law@redhat.com>
10461 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
10462 type does not have a TYPE_SIZE_UNIT.
10464 2018-08-27 Steve Ellcey <sellcey@cavium.com>
10466 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
10467 with include of backend.h.
10469 2018-08-27 Richard Biener <rguenther@suse.de>
10471 PR tree-optimization/86927
10472 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
10473 use const cond reduction code.
10475 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
10477 PR tree-optimization/85758
10478 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
10480 2018-08-27 David Malcolm <dmalcolm@redhat.com>
10483 * diagnostic-show-locus.c (class layout_range): Update for
10484 conversion of show_caret_p to a tri-state.
10485 (layout_range::layout_range): Likewise.
10486 (make_range): Likewise.
10487 (layout::maybe_add_location_range): Likewise.
10488 (layout::should_print_annotation_line_p): Don't show annotation
10489 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
10490 (layout::get_state_at_point): Update for conversion of
10491 show_caret_p to a tri-state. Bail out early for
10492 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
10493 underlining or source colorization.
10494 (gcc_rich_location::add_location_if_nearby): Update for conversion
10495 of show_caret_p to a tri-state.
10496 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
10497 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
10499 (selftest::test_one_liner_labels): Likewise.
10500 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
10501 conversion of show_caret_p to a tri-state.
10502 * pretty-print.c (text_info::set_location): Likewise.
10503 * pretty-print.h (text_info::set_location): Likewise.
10504 * substring-locations.c (format_warning_n_va): Likewise.
10505 * tree-diagnostic.c (default_tree_printer): Likewise.
10506 * tree-pretty-print.c (newline_and_indent): Likewise.
10508 2018-08-27 David Malcolm <dmalcolm@redhat.com>
10511 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
10512 line above for line-insertion fix-it hints.
10513 (selftest::test_fixit_insert_containing_newline): Update the
10514 expected results, and add a test with line-numbering enabled.
10516 2018-08-27 Martin Liska <mliska@suse.cz>
10519 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
10520 params with DECL_HAS_VALUE_EXPR_P.
10522 2018-08-27 Martin Liska <mliska@suse.cz>
10524 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
10525 selected expansion strategy.
10527 2018-08-27 Martin Liska <mliska@suse.cz>
10529 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
10530 * builtins.c (is_builtin_fn): Likewise.
10531 * attribs.c (diag_attr_exclusions): Use new function
10532 fndecl_built_in_p and remove check for FUNCTION_DECL if
10534 (builtin_mathfn_code): Likewise.
10535 (fold_builtin_expect): Likewise.
10536 (fold_call_expr): Likewise.
10537 (fold_builtin_call_array): Likewise.
10538 (fold_call_stmt): Likewise.
10539 (set_builtin_user_assembler_name): Likewise.
10540 (is_simple_builtin): Likewise.
10541 * calls.c (gimple_alloca_call_p): Likewise.
10542 (maybe_warn_nonstring_arg): Likewise.
10543 * cfgexpand.c (expand_call_stmt): Likewise.
10544 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
10545 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
10546 (cgraph_node::verify_node): Likewise.
10547 * cgraphclones.c (build_function_decl_skip_args): Likewise.
10548 (cgraph_node::create_clone): Likewise.
10549 * config/arm/arm.c (arm_insert_attributes): Likewise.
10550 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
10551 * dse.c (scan_insn): Likewise.
10552 * expr.c (expand_expr_real_1): Likewise.
10553 * fold-const.c (operand_equal_p): Likewise.
10554 (fold_binary_loc): Likewise.
10555 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
10556 * gimple-low.c (lower_stmt): Likewise.
10557 * gimple-pretty-print.c (dump_gimple_call): Likewise.
10558 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
10560 * gimple.c (gimple_build_call_from_tree): Likewise.
10561 (gimple_call_builtin_p): Likewise.
10562 (gimple_call_combined_fn): Likewise.
10563 * gimplify.c (gimplify_call_expr): Likewise.
10564 (gimple_boolify): Likewise.
10565 (gimplify_modify_expr): Likewise.
10566 (gimplify_addr_expr): Likewise.
10567 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
10568 * ipa-cp.c (determine_versionability): Likewise.
10569 * ipa-fnsummary.c (compute_fn_summary): Likewise.
10570 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
10571 * ipa-split.c (visit_bb): Likewise.
10572 (split_function): Likewise.
10573 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10574 * lto-cgraph.c (input_node): Likewise.
10575 * lto-streamer-out.c (write_symbol): Likewise.
10576 * omp-low.c (setjmp_or_longjmp_p): Likewise.
10577 (lower_omp_1): Likewise.
10578 * predict.c (strip_predict_hints): Likewise.
10579 * print-tree.c (print_node): Likewise.
10580 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
10581 * trans-mem.c (is_tm_irrevocable): Likewise.
10582 (is_tm_load): Likewise.
10583 (is_tm_simple_load): Likewise.
10584 (is_tm_store): Likewise.
10585 (is_tm_simple_store): Likewise.
10586 (is_tm_abort): Likewise.
10587 (tm_region_init_1): Likewise.
10588 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
10589 * tree-cfg.c (verify_gimple_call): Likewise.
10590 (move_stmt_r): Likewise.
10591 (stmt_can_terminate_bb_p): Likewise.
10592 * tree-eh.c (lower_eh_constructs_2): Likewise.
10593 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
10594 * tree-inline.c (remap_gimple_stmt): Likewise.
10595 (copy_bb): Likewise.
10596 (estimate_num_insns): Likewise.
10597 (fold_marked_statements): Likewise.
10598 * tree-sra.c (scan_function): Likewise.
10599 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
10600 (optimize_stack_restore): Likewise.
10601 (pass_fold_builtins::execute): Likewise.
10602 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
10603 (mark_all_reaching_defs_necessary_1): Likewise.
10604 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
10605 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10606 (pass_forwprop::execute): Likewise.
10607 * tree-ssa-loop-im.c (stmt_cost): Likewise.
10608 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
10609 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
10610 * tree-ssa-strlen.c (get_string_length): Likewise.
10611 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
10612 (find_func_aliases_for_call): Likewise.
10613 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
10614 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
10615 * tree-tailcall.c (find_tail_calls): Likewise.
10616 * tree.c (need_assembler_name_p): Likewise.
10617 (free_lang_data_in_decl): Likewise.
10618 (get_call_combined_fn): Likewise.
10619 * ubsan.c (is_ubsan_builtin_p): Likewise.
10620 * varasm.c (incorporeal_function_p): Likewise.
10621 * tree.h (DECL_BUILT_IN): Remove and replace with
10623 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
10624 (fndecl_built_in_p): New.
10626 2018-08-27 Martin Liska <mliska@suse.cz>
10628 PR tree-optimization/86847
10629 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
10630 Dump also subtree probability.
10631 (switch_decision_tree::do_jump_if_equal): New function.
10632 (switch_decision_tree::emit_case_nodes): Handle special
10633 situations in balanced tree that can be emitted much simpler.
10634 Fix calculation of probabilities that happen in tree expansion.
10635 * tree-switch-conversion.h (struct cluster): Add
10637 (struct simple_cluster): Likewise.
10638 (struct case_tree_node): Add new function has_child.
10639 (do_jump_if_equal): New.
10641 2018-08-27 Martin Liska <mliska@suse.cz>
10643 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
10644 Add new argument to bit_test_cluster constructor.
10645 (bit_test_cluster::emit): Set bits really number of values
10647 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
10648 probability argument.
10649 * tree-switch-conversion.h (struct bit_test_cluster):
10650 Add m_handles_entire_switch.
10652 2018-08-27 Martin Liska <mliska@suse.cz>
10654 PR tree-optimization/86702
10655 * tree-switch-conversion.c (jump_table_cluster::emit):
10656 Make probabilities even for values in jump table
10657 according to number of cases handled.
10658 (switch_decision_tree::compute_cases_per_edge): Pass
10659 argument to reset_out_edges_aux function.
10660 (switch_decision_tree::analyze_switch_statement): Likewise.
10661 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
10664 2018-08-27 Martin Liska <mliska@suse.cz>
10666 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
10667 cfun argument explicitly.
10668 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
10669 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
10670 function gimple_switch_default_bb.
10671 (convert_switch_statements):
10673 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
10674 * stmt.c (label_to_block_fn): Use label_to_block and pass
10675 cfun argument explicitly and use gimple_switch_label_bb.
10676 (expand_case): Likewise.
10677 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
10678 cfun argument explicitly. Likewise.
10679 (make_edges_bb): Likewise.
10680 (make_cond_expr_edges): Likewise.
10681 (get_cases_for_edge): Likewise.
10682 (make_gimple_switch_edges): Likewise.
10683 (label_to_block_fn): Likewise.
10684 (label_to_block): Likewise.
10685 (make_goto_expr_edges): Likewise.
10686 (make_gimple_asm_edges): Likewise.
10687 (main_block_label): Likewise.
10688 (group_case_labels_stmt): Likewise.
10689 (find_taken_edge_computed_goto): Likewise.
10690 (find_taken_edge_switch_expr): Likewise.
10691 (gimple_verify_flow_info): Likewise.
10692 (gimple_redirect_edge_and_branch): Likewise.
10693 (gimple_switch_label_bb): New function.
10694 (gimple_switch_default_bb): Likewise.
10695 (gimple_switch_edge): Likewise.
10696 (gimple_switch_default_edge): Likewise.
10697 * tree-cfg.h (label_to_block_fn): Remove and replace ...
10698 (label_to_block): ... with this.
10699 (gimple_switch_label_bb): New.
10700 (gimple_switch_default_bb): Likewise.
10701 (gimple_switch_edge): Likewise.
10702 (gimple_switch_default_edge): Likewise.
10703 * tree-cfgcleanup.c (convert_single_case_switch): Use
10704 new gimple functions and pass new argument to label_to_block.
10705 (cleanup_control_flow_bb):
10706 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
10707 cfun argument explicitly.
10708 (make_eh_edges): Likewise.
10709 (redirect_eh_dispatch_edge): Likewise.
10710 (lower_resx): Likewise.
10711 (lower_eh_dispatch): Likewise.
10712 (maybe_remove_unreachable_handlers): Likewise.
10713 (unsplit_eh): Likewise.
10714 (cleanup_empty_eh): Likewise.
10715 (verify_eh_edges): Likewise.
10716 (verify_eh_dispatch_edge): Likewise.
10717 * tree-ssa-dom.c (record_edge_info): Likewise.
10718 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
10719 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
10720 (thread_through_normal_block): Likewise.
10721 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
10722 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
10723 * tree-switch-conversion.c (switch_conversion::collect): Use new
10725 (switch_conversion::check_final_bb): Likewise.
10726 (switch_conversion::gather_default_values): Pass new argument
10728 (switch_conversion::build_constructors): Likewise.
10729 (switch_decision_tree::compute_cases_per_edge): Use new
10730 gimple_switch_edge function.
10731 (switch_decision_tree::analyze_switch_statement): Pass new argument
10733 (switch_decision_tree::try_switch_expansion): Use
10734 gimple_switch_default_edge.
10735 * tree-vrp.c (find_switch_asserts): Pass new argument
10737 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
10738 (vr_values::simplify_switch_using_ranges): Likewise.
10740 2018-08-27 Richard Biener <rguenther@suse.de>
10742 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
10743 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
10745 * tree-ssa-sccvn.h (struct vn_pval): New structure.
10746 (struct vn_nary_op_s): Add unwind_to member. Add
10747 predicated_values flag and put result into a union together
10748 with a linked list of vn_pval.
10749 (struct vn_ssa_aux): Add name member to make maintaining
10750 a map of SSA name to vn_ssa_aux possible. Remove no longer
10751 needed info, dfsnum, low, visited, on_sccstack, use_processed
10752 and range_info_anti_range_p members.
10753 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
10754 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
10756 (vn_valueize): New global.
10757 (vn_context_bb): Likewise.
10758 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
10759 VN_INFO_PTR_INFO): Remove.
10760 * tree-ssa-sccvn.c: ... (rewrite)
10761 (pass_fre::execute): For -O2+ initialize loops and run
10762 RPO VN in optimistic mode (iterating). For -O1 and -Og
10763 run RPO VN in non-optimistic mode.
10764 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
10765 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
10766 * doc/invoke.texi (sccvn-max-scc-size): Remove.
10767 (rpo-vn-max-loop-depth): Document.
10768 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
10769 when valuezing the VUSE signals we walked out of the region.
10770 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
10771 (phi_translate): Set VN context block to use for availability
10773 (compute_avail): Likewise.
10774 (pre_valueize): New function.
10775 (pass_pre::execute): Adjust to the RPO VN API.
10777 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
10778 (propagate_constants_for_unrolling): Remove.
10779 (tree_unroll_loops_completely): Perform value-numbering
10780 on the unrolled bodies loop parent.
10782 2018-08-27 Richard Biener <rguenther@suse.de>
10784 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
10785 for partial antic compute.
10787 2018-08-27 Jakub Jelinek <jakub@redhat.com>
10789 PR rtl-optimization/87065
10790 * combine.c (simplify_if_then_else): Formatting fix.
10791 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
10793 (known_cond): Don't return const_true_rtx for vector modes. Use
10794 CONST0_RTX instead of const0_rtx. Formatting fixes.
10796 2018-08-27 Martin Liska <mliska@suse.cz>
10798 PR gcov-profile/87069
10799 * gcov.c (process_file): Record files already processed
10800 and warn about a file being processed multiple times.
10802 2018-08-27 Martin Liska <mliska@suse.cz>
10805 * config/aarch64/aarch64.c (aarch64_override_options_internal):
10806 Set default values for x_aarch64_*_string strings.
10807 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
10808 prefix. For -mabi do not print '=ABI' in help and use
10809 <option_value> format for -msve-vector-bits and -moverride
10812 2018-08-26 Jeff Law <law@redhat.com>
10814 * config/mips/frame-header-opt.c: Include "backend.h" rather than
10817 2018-08-26 Marek Polacek <polacek@redhat.com>
10819 PR c++/87029, Implement -Wredundant-move.
10820 * doc/invoke.texi: Document -Wredundant-move.
10822 2018-08-25 Martin Sebor <msebor@redhat.com>
10824 PR tree-optimization/87059
10825 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
10826 to the same type as the other.
10827 * fold-const.c (fold_binary_loc): Assert expectation.
10829 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
10831 * config/darwin.c (machopic_legitimize_pic_address): Clean up
10832 extraneous parentheses, dead code section and formatting.
10834 2018-08-24 David Malcolm <dmalcolm@redhat.com>
10837 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
10838 wide enough for jumps in the line-numbering to be visible.
10839 (layout::print_gap_in_line_numbering): New member function.
10840 (layout::calculate_line_spans): When using line numbering, merge
10841 line spans that are only 1 line apart.
10842 (diagnostic_show_locus): When printing line numbers, show gaps in
10843 line numbering directly, rather than printing headers.
10844 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
10845 line-numbering with multiple line spans.
10846 (selftest::test_fixit_insert_containing_newline_2): Add test of
10847 line-numbering, in which the spans are close enough to be merged.
10849 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
10851 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
10852 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
10853 * tree-vrp.c (range_is_nonnull): Remove.
10854 (range_includes_zero_p): Accept value_range instead of min/max.
10855 (extract_range_from_binary_expr_1): Do not early bail on
10857 Use range_includes_zero_p instead of range_is_nonnull.
10858 (extract_range_from_unary_expr): Use range_includes_zero_p instead
10859 of range_is_nonnull.
10860 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
10861 special case VR_ANTI_RANGE.
10862 (vrp_finalize): Same.
10863 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
10864 instead of min/max.
10865 (range_is_nonnull): Remove.
10866 * vr-values.c (vrp_stmt_computes_nonzero): Use
10867 range_includes_zero_p instead of range_is_nonnull.
10868 (extract_range_basic): Pass value_range to range_includes_zero_p
10869 instead of range_is_nonnull.
10871 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
10873 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
10874 * emit-rtl.h (rtl_data): Remove return_bnd.
10875 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
10876 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
10877 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
10878 (POINTER_BOUNDS_MODE): Remove definition.
10879 (make_pointer_bounds_mode): Remove.
10880 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
10881 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
10882 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
10883 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
10884 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
10885 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
10886 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
10888 * config/i386/i386-modes.def (BND32, BND64): Remove.
10889 * config/i386/i386.c (dbx_register_map): Remove bound registers.
10890 (dbx64_register_map): Ditto.
10891 (svr4_dbx_register_map): Ditto.
10892 (indirect_thunk_bnd_needed): Remove.
10893 (indirect_thunks_bnd_used): Ditto.
10894 (indirect_return_bnd_needed): Ditto.
10895 (indirect_return_via_cx_bnd): Ditto.
10896 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
10897 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
10898 (output_indirect_thunk): Ditto. Remove need_prefix argument.
10899 (output_indirect_thunk_function): Remove handling of
10900 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
10901 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
10902 (ix86_save_reg): Remove handling of crtl->return_bnd.
10903 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
10904 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
10905 and UNSPEC_BNDLX_ADDR.
10906 (ix86_output_indirect_branch_via_reg): Remove handling of
10907 indirect_thunk_prefix_bnd.
10908 (ix86_output_indirect_branch_via_push): Ditto.
10909 (ix86_output_function_return): Ditto.
10910 (ix86_output_indirect_function_return): Ditto.
10911 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
10912 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
10913 (CALL_USED_REGISTERS): Ditto.
10914 (REG_ALLOC_ORDER): Update for removal of bound registers.
10915 (HI_REGISTER_NAMES): Ditto.
10916 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
10917 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
10918 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
10919 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
10920 (FIRST_PSEUDO_REG): Update.
10921 (BND): Remove mode iterator.
10922 * config/i386/predicates.md (bnd_mem_operator): Remove.
10924 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
10926 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
10929 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
10931 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
10932 the case in which the permute needs only a single element and
10933 repeats for every vector of the result. Extend that case to
10934 handle variable-length vectors.
10935 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10937 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
10940 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
10941 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
10943 2018-08-24 Richard Biener <rguenther@suse.de>
10945 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
10946 bb_flags_allocated members.
10947 (auto_flag): New RAII class for allocating flags.
10948 (auto_edge_flag): New RAII class for allocating edge flags.
10949 (auto_bb_flag): New RAII class for allocating bb flags.
10950 * cfgloop.c (verify_loop_structure): Allocate temporary edge
10952 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
10953 in favor of temporarily allocated BB flag.
10954 * hsa-brig.c: Re-order includes.
10955 * hsa-dump.c: Likewise.
10956 * hsa-regalloc.c: Likewise.
10957 * print-rtl.c: Likewise.
10958 * profile-count.c: Likewise.
10960 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
10963 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
10966 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
10969 * wide-int-range.cc (wide_int_range_div): Do not ignore result
10970 from wide_int_range_multiplicative_op.
10972 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10974 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
10977 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
10979 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
10982 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
10984 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
10985 full GENERIC expression used for replacement.
10987 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
10989 * tree-vrp.c (abs_extent_range): Remove.
10990 (extract_range_into_wide_ints): Pass wide ints by reference.
10991 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
10992 Pass wide ints by reference in all calls to
10993 extract_range_into_wide_ints.
10994 * wide-int-range.cc (wide_int_range_div): New.
10995 * wide-int-range.h (wide_int_range_div): New.
10996 (wide_int_range_includes_zero_p): New.
10997 (wide_int_range_zero_p): New.
10999 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
11001 * config/aarch64/aarch64.md (arches): New enum.
11002 (arch): New enum attr.
11003 (arch_enabled): New attr.
11004 (enabled): Now uses arch_enabled only.
11005 (simd, sve, fp16): Removed attribute.
11006 (fp): Attr now defined in terms of 'arch'.
11007 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
11008 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
11009 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
11010 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
11011 attributes into 'arch'.
11012 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
11013 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
11014 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
11015 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
11016 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
11017 'simd' attribute into 'arch'.
11018 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
11019 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
11020 Convert use of 'fp' attribute to 'arch'.
11021 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
11022 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
11024 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
11025 (different modes) Merge 'fp' and 'simd' into 'arch'.
11026 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
11027 'simd' into 'arch'.
11029 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
11031 PR rtl-optimization/87026
11032 * expmed.c (canonicalize_comparison): If we can no longer create
11033 pseudoregisters, don't.
11035 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
11038 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
11040 * config/arm/arm.c (speculation_barrier_libfunc): New static
11042 (arm_init_libfuncs): Initialize it.
11043 (arm_emit_speculation_barrier): New function.
11044 * config/arm/arm.md (speculation_barrier): Call
11045 arm_emit_speculation_barrier for architectures that do not have
11047 (speculation_barrier_insn): Only match on Armv7 or later.
11049 2018-08-23 Richard Biener <rguenther@suse.de>
11051 PR middle-end/87024
11052 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
11055 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
11057 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
11058 of single-vector TBLs.
11059 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
11060 one input is given.
11062 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
11065 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
11066 aarch64_evpc_tbl guard.
11068 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
11070 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
11073 2018-08-22 Martin Sebor <msebor@redhat.com>
11075 PR middle-end/87052
11076 * tree-pretty-print.c (pretty_print_string): Add argument.
11077 (dump_generic_node): Call to pretty_print_string with string size.
11079 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
11081 PR rtl-optimization/86771
11082 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
11083 of two SETs into those two SETs, one to be placed at i2, if that SETs
11084 destination is modified between i2 and i3.
11086 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
11088 PR tree-optimization/86725
11089 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
11091 (vect_analyze_scalar_cycles_1): Check it.
11093 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
11095 PR tree-optimization/86725
11096 * tree-vect-loop.c (vect_is_simple_reduction): When treating
11097 an outer loop phi as a double reduction, make sure that the
11098 single user of the phi result is an inner loop phi.
11100 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
11102 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
11103 grouped stores with gaps to a strided group.
11105 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
11107 * tree-vect-stmts.c (get_group_load_store_type)
11108 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
11109 first statement in a group.
11111 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11113 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
11114 the sequence used in gcc/gcc.c.
11116 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11119 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
11122 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11124 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
11125 Darwin10-specific unwinder-shim.
11126 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
11127 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
11128 New to cater for Darwin10 Rosetta.
11130 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11132 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
11133 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
11135 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
11140 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
11141 (dwarf2out_switch_text_section): Generate a local label for the
11142 second function sub-section and apply it as the second FDE start
11144 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
11145 second sub-section start.
11147 2018-08-22 Richard Biener <rguenther@suse.de>
11149 PR tree-optimization/86988
11150 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
11152 2018-08-22 Richard Biener <rguenther@suse.de>
11154 PR tree-optimization/86945
11155 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
11157 2018-08-22 Alexandre Oliva <oliva@adacore.com>
11159 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
11160 a comment about how uses of r2 for .sdata2 come about.
11162 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
11164 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
11166 2018-08-21 Marek Polacek <polacek@redhat.com>
11168 PR c++/86981, Implement -Wpessimizing-move.
11169 * doc/invoke.texi: Document -Wpessimizing-move.
11171 2018-08-21 Jan Hubicka <jh@suse.cz>
11173 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
11174 * tree.h (is_redundant_typedef): Remove.
11175 * dwarf2out.c (is_redundant_typedef): Turn into static function.
11177 2018-08-21 Jan Hubicka <jh@suse.cz>
11179 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
11182 2018-08-21 Tamar Christina <tamar.christina@arm.com>
11184 * expmed.c (extract_low_bits): Reject invalid subregs early.
11186 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
11188 PR middle-end/86121
11189 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
11192 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11194 * config/vxworks.h: Guard vxworks_asm_out_constructor and
11195 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
11196 * config/vxworks.c: Likewise.
11198 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11200 * config/vxworks.c: Set targetm.have_ctors_dtors
11201 if HAVE_INITFINI_ARRAY_SUPPORT.
11202 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
11203 if HAVE_INITFINI_ARRAY_SUPPORT.
11205 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11207 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
11208 default search path for VxWorks < 7.
11210 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
11212 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
11213 (get_format_string): Refer to c_getstr.
11215 2018-08-21 Tom de Vries <tdevries@suse.de>
11217 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11218 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11219 (debuginfo_early_stop): Declare.
11220 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11221 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11222 (debuginfo_early_stop): New function.
11223 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
11224 and debuginfo_early_stop.
11225 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
11226 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
11227 (general_init): Call debuginfo_early_init.
11228 (finalize): Call debuginfo_fini.
11229 (do_compile): Call debuginfo_init.
11230 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
11231 -fdump-early-debug.
11232 (@item -fdump-debug, @item -fdump-earlydebug): Add.
11234 2018-08-21 Tom de Vries <tdevries@suse.de>
11236 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
11237 flag_dump_noaddr and flag_dump_unnumbered.
11239 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
11241 * wide-int-range.cc (wide_int_range_abs): New.
11242 (wide_int_range_order_set): Rename from wide_int_range_min_max.
11243 * wide-int-range.h (wide_int_range_abs): New.
11244 (wide_int_range_min_max): New.
11245 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
11246 case to call wide_int_range_abs.
11247 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
11248 (extract_range_from_abs_expr): Delete.
11250 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
11253 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
11254 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
11257 2018-08-20 Nathan Sidwell <nathan@acm.org>
11258 Jeff Law <law@redhat.com>
11260 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
11261 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
11263 2018-08-20 David Malcolm <dmalcolm@redhat.com>
11266 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
11267 (decl_attributes): Likewise.
11268 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
11270 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11271 * diagnostic-core.h (class auto_diagnostic_group): New class.
11272 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
11273 (diagnostic_report_diagnostic): Handle the first diagnostics within
11275 (emit_diagnostic): Add auto_diagnostic_group instance.
11276 (inform): Likewise.
11277 (inform_n): Likewise.
11278 (warning): Likewise.
11279 (warning_at): Likewise.
11280 (warning_n): Likewise.
11281 (pedwarn): Likewise.
11282 (permerror): Likewise.
11284 (error_n): Likewise.
11285 (error_at): Likewise.
11287 (fatal_error): Likewise.
11288 (internal_error): Likewise.
11289 (internal_error_no_backtrace): Likewise.
11290 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
11291 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
11292 * diagnostic.h (struct diagnostic_context): Add fields
11293 "diagnostic_group_nesting_depth",
11294 "diagnostic_group_emission_count", "begin_group_cb",
11296 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
11297 Add auto_diagnostic_group instance(s).
11298 (find_explicit_erroneous_behavior): Likewise.
11299 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
11300 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
11301 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
11302 (gimplify_va_arg_expr): Likewise.
11303 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
11304 (HSA_SORRY_AT): Likewise.
11305 * ipa-devirt.c (compare_virtual_tables): Likewise.
11306 (warn_odr): Likewise.
11307 * multiple_target.c (expand_target_clones): Likewise.
11308 * opts-common.c (cmdline_handle_error): Likewise.
11309 * reginfo.c (globalize_reg): Likewise.
11310 * substring-locations.c (format_warning_n_va): Likewise.
11311 * tree-inline.c (expand_call_inline): Likewise.
11312 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
11313 * tree-ssa-loop-niter.c
11314 (do_warn_aggressive_loop_optimizations): Likewise.
11315 * tree-ssa-uninit.c (warn_uninit): Likewise.
11316 * tree.c (warn_deprecated_use): Likewise.
11318 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
11321 * config/i386/i386.md (eh_return): Always update EH return
11322 address in word_mode.
11324 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
11326 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
11327 TARGET_SPLIT_COMPLEX_ARG is defined.
11329 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
11331 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
11333 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
11336 * expr.c (expand_assignment): Assert that bitpos is positive.
11337 (store_field): Likewise
11338 (expand_expr_real_1): Make sure that bitpos is positive.
11339 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
11342 2018-08-20 Nathan Sidwell <nathan@acm.org>
11344 * Makefile.in (CPP_ID_DATA_H): Delete.
11345 (CPP_INTERNAL_H): Don't add it.
11346 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
11347 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
11349 2018-08-20 Richard Biener <rguenther@suse.de>
11351 PR tree-optimization/78655
11352 * tree-vrp.c (extract_range_from_binary_expr_1): Make
11353 pointer + offset nonnull if either operand is nonnull work.
11355 2018-08-20 Tom de Vries <tdevries@suse.de>
11357 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
11358 unless the referenced die describes the added property using
11359 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
11360 Otherwise, add a DW_AT_location to the referenced die.
11362 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
11365 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
11366 register_operand when calling ix86_set_reg_reg_cost.
11367 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
11368 Set *total to 0 for operands that satisfy x86_64_immediate_operand
11369 predicate and to 1 otherwise.
11371 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
11373 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
11374 emit a diagnostic that it is not supported and reset the option.
11375 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
11376 supported and consume the option. (ASM_FINAL_SPEC): New.
11378 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
11380 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
11383 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
11385 C-SKY port: Documentation
11387 * doc/extend.texi (C-SKY Function Attributes): New section.
11388 * doc/invoke.texi (Option Summary): Add C-SKY options.
11389 (C-SKY Options): New section.
11390 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
11392 2018-08-17 Jojo <jijie_rong@c-sky.com>
11393 Huibin Wang <huibin_wang@c-sky.com>
11394 Sandra Loosemore <sandra@codesourcery.com>
11395 Chung-Lin Tang <cltang@codesourcery.com>
11397 C-SKY port: Backend implementation
11399 * config/csky/*: New.
11400 * common/config/csky/*: New.
11402 2018-08-17 Jojo <jijie_rong@c-sky.com>
11403 Huibin Wang <huibin_wang@c-sky.com>
11404 Sandra Loosemore <sandra@codesourcery.com>
11405 Chung-Lin Tang <cltang@codesourcery.com>
11406 Andrew Jenner <andrew@codesourcery.com>
11408 C-SKY port: Configury
11410 * config.gcc (csky-*-*): New.
11411 * configure.ac: Add csky to targets for dwarf2 debug_line support.
11412 * configure: Regenerated.
11414 2018-08-17 David Malcolm <dmalcolm@redhat.com>
11416 * dump-context.h: Include "dumpfile.h".
11417 (dump_context::dump_printf_va): Convert final param from va_list
11418 to va_list *. Convert from ATTRIBUTE_PRINTF to
11419 ATTRIBUTE_GCC_DUMP_PRINTF.
11420 (dump_context::dump_printf_loc_va): Likewise.
11421 * dumpfile.c: Include "stringpool.h".
11422 (make_item_for_dump_printf_va): Delete.
11423 (make_item_for_dump_printf): Delete.
11424 (class dump_pretty_printer): New class.
11425 (dump_pretty_printer::dump_pretty_printer): New ctor.
11426 (dump_pretty_printer::emit_items): New member function.
11427 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
11429 (dump_pretty_printer::emit_item): New member function.
11430 (dump_pretty_printer::stash_item): New member function.
11431 (dump_pretty_printer::format_decoder_cb): New member function.
11432 (dump_pretty_printer::decode_format): New member function.
11433 (dump_context::dump_printf_va): Reimplement in terms of
11434 dump_pretty_printer.
11435 (dump_context::dump_printf_loc_va): Convert final param from va_list
11437 (dump_context::begin_scope): Reimplement call to
11438 make_item_for_dump_printf.
11439 (dump_printf): Update for change to dump_printf_va.
11440 (dump_printf_loc): Likewise.
11441 (selftest::test_capture_of_dump_calls): Convert "stmt" from
11442 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
11443 with %T, %E, and %G.
11444 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
11445 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
11446 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
11447 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
11448 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
11449 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
11450 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
11451 within a dump_printf_loc call to "%wu".
11452 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
11453 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
11454 missing space after "=".
11455 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
11456 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
11457 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
11458 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
11459 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
11460 duplicate "vectorized" from message.
11462 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
11464 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
11465 polyNxK_t element's TYPE_STRING_FLAG.
11467 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
11469 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
11470 (they were unnamed before). Fix comments.
11472 2018-08-17 Nathan Sidwell <nathan@acm.org>
11474 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
11476 2018-08-17 Richard Biener <rguenther@suse.de>
11478 PR tree-optimization/86841
11479 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
11481 2018-08-17 Martin Liska <mliska@suse.cz>
11483 * common.opt: Remove Warn, Init and Report for options with
11484 Ignore/Deprecated flag. Warning is done automatically for
11486 * config/i386/i386.opt: Likewise.
11487 * config/ia64/ia64.opt: Likewise.
11488 * config/rs6000/rs6000.opt: Likewise.
11489 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
11490 Remove usage of flag_check_pointer_bounds.
11491 * lto-wrapper.c (merge_and_complain): Do not handle
11492 OPT_fcheck_pointer_bounds.
11493 (append_compiler_options): Likewise.
11494 * opt-functions.awk: Do not handle Deprecated.
11495 * optc-gen.awk: Check that Var, Report and Init are not
11496 used for an option with Ignore/Deprecated flag.
11497 * opts-common.c (decode_cmdline_option): Do not report
11499 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
11501 * opts.h (struct cl_option): Remove cl_deprecated flag.
11502 (CL_ERR_DEPRECATED): Remove error enum value.
11504 2018-08-17 Richard Biener <rguenther@suse.de>
11506 PR middle-end/86505
11507 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
11508 across a va-arg-pack using call adjust its return value accordingly.
11510 2018-08-16 Martin Sebor <msebor@redhat.com>
11512 PR tree-optimization/86853
11513 * gimple-ssa-sprintf.c (struct format_result): Rename member.
11514 (struct fmtresult): Add member and initialize it in ctors.
11515 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
11516 (format_string): Handle %S the same as %ls. Set MAYFAIL.
11517 (format_directive): Set POSUNDER4K when MAYFAIL is set.
11518 (parse_directive): Handle %C same as %c.
11519 (sprintf_dom_walker::compute_format_length): Adjust.
11520 (is_call_safe): Adjust.
11522 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
11524 * builtins.c (c_strlen): Add new parameter eltsize. Use it
11525 for determining how to count the elements.
11526 * builtins.h (c_strlen): Adjust prototype.
11527 * expr.c (string_constant): Add new parameter mem_size.
11528 Set *mem_size appropriately.
11529 * expr.h (string_constant): Adjust protoype.
11530 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
11531 * gimple-fold.h (get_range_strlen): Adjust prototype.
11532 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
11533 (format_string): Call get_string_length with eltsize.
11535 2018-08-16 David Malcolm <dmalcolm@redhat.com>
11537 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
11538 to emit the span, rather than setting it as the prefix.
11540 2018-08-16 David Malcolm <dmalcolm@redhat.com>
11542 * diagnostic-show-locus.c (layout::start_annotation_line): Add
11543 "margin_char" parameter, defaulting to space. Use it in place
11544 of pp_space for the initial part of the margin.
11545 (layout::print_leading_fixits): Use '+' when filling the margin
11546 of line-insertion fix-it hints.
11548 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
11550 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
11553 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
11555 * config/rs6000/altivec.md: Don't set length attribute to the default
11557 * config/rs6000/darwin.md: Ditto.
11558 * config/rs6000/dfp.md: Ditto.
11559 * config/rs6000/htm.md: Ditto.
11560 * config/rs6000/rs6000.md: Ditto.
11561 * config/rs6000/sync.md: Ditto.
11562 * config/rs6000/vsx.md: Ditto.
11564 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
11566 * config/rs6000/altivec.md: Don't set length attribute to the default
11567 value, for branch instructions.
11568 * config/rs6000/darwin.md: Ditto.
11569 * config/rs6000/rs6000.md: Ditto.
11571 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
11573 * config/rs6000/rs6000.md (length): Always define as const_int 4.
11574 (unnamed conditional branch define_insn): Set length to 4 or 8
11575 depending on offset.
11576 (<bd>_<mode>): Similar, for alternative 0.
11577 (<bd>tf_<mode>): Ditto.
11579 2018-08-16 Tamar Christina <tamar.christina@arm.com>
11581 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
11583 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
11585 * doc/rtl.texi: Replace old RTX class names with new names.
11588 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
11590 * expmed.h (canonicalize_comparison): New declaration.
11591 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
11592 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
11593 * optabs.c (prepare_cmp_insn): Likewise.
11594 * rtl.h (unsigned_condition_p): New function which checks if a
11595 comparison operator is unsigned.
11597 2018-08-16 Nathan Sidwell <nathan@acm.org>
11599 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
11600 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
11602 2018-08-16 Tamar Christina <tamar.christina@arm.com>
11605 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
11606 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
11607 (mov<mov>): ..this and enable unconditionally.
11609 2018-08-16 Tamar Christina <tamar.christina@arm.com>
11611 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
11613 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
11615 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
11616 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
11617 "Common" with "Target".
11619 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
11621 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
11622 * doc/invoke.texi (mmitigate-rop): Remove.
11623 * config/i386/i386.c: Do not include "regrename.h".
11624 (ix86_rop_should_change_byte_p, reg_encoded_number)
11625 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
11627 (ix86_reorg): Remove call to ix86_mitigate_rop.
11628 * config/i386/i386.md (attr "modrm_class"): Remove.
11629 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
11630 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
11631 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
11633 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
11635 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
11636 allow folding of mergeh() and mergel() for the float and double types.
11637 (fold_mergehl_helper): Rework to handle building a permute tree
11640 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
11642 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
11645 2018-08-15 David Malcolm <dmalcolm@redhat.com>
11647 * common.opt (fdiagnostics-show-labels): New option.
11648 * diagnostic-show-locus.c (class layout_range): Add field
11650 (class layout): Add field "m_show_labels_p".
11651 (layout_range::layout_range): Add param "label" and use it to
11652 initialize m_label.
11653 (make_range): Pass in NULL for new "label" param of layout_range's
11655 (layout::layout): Initialize m_show_labels_p.
11656 (layout::maybe_add_location_range): Pass in loc_range->m_label
11657 when constructing layout_range instances.
11658 (struct line_label): New struct.
11659 (layout::print_any_labels): New member function.
11660 (layout::print_line): Call it if label-printing is enabled.
11661 (selftest::test_one_liner_labels): New test.
11662 (selftest::test_diagnostic_show_locus_one_liner): Call it.
11663 * diagnostic.c (diagnostic_initialize): Initialize
11664 context->show_labels_p.
11665 * diagnostic.h (struct diagnostic_context): Add field
11667 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11668 -fno-diagnostics-show-labels.
11669 * dwarf2out.c (gen_producer_string): Add
11670 OPT_fdiagnostics_show_labels to the ignored options.
11671 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
11673 (gcc_rich_location::maybe_add_expr): Likewise.
11674 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
11675 label" param, defaulting to NULL.
11676 (gcc_rich_location::add_expr): Add "label" param.
11677 (gcc_rich_location::maybe_add_expr): Likewise.
11678 (class text_range_label): New class.
11679 (class range_label_for_type_mismatch): New class.
11680 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
11681 of format_warning_va.
11682 (fmtwarn_n): Likewise for new params of format_warning_n_va.
11683 * lto-wrapper.c (merge_and_complain): Add
11684 OPT_fdiagnostics_show_labels to the "pick one setting" options.
11685 (append_compiler_options): Likewise to the dropped options.
11686 (append_diag_options): Likewise to the passed-on options.
11687 * opts.c (common_handle_option): Handle the new option.
11688 * selftest-diagnostic.c
11689 (test_diagnostic_context::test_diagnostic_context): Enable
11691 * substring-locations.c: Include "gcc-rich-location.h".
11692 (format_warning_n_va): Add "fmt_label" and "param_label" params
11693 and use them as appropriate.
11694 (format_warning_va): Add "fmt_label" and "param_label" params,
11695 passing them on to format_warning_n_va.
11696 (format_warning_at_substring): Likewise.
11697 (format_warning_at_substring_n): Likewise.
11698 * substring-locations.h (format_warning_va): Add "fmt_label" and
11699 "param_label" params.
11700 (format_warning_n_va): Likewise.
11701 (format_warning_at_substring): Likewise.
11702 (format_warning_at_substring_n): Likewise.
11703 * toplev.c (general_init): Initialize global_dc->show_labels_p.
11705 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
11708 * builtins.c (expand_builtin_memcmp): Do not expand the call
11709 when overflow is detected.
11711 2018-08-15 Martin Sebor <msebor@redhat.com>
11713 PR tree-optimization/71625
11714 * config/aarch64/aarch64-builtins.c
11715 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
11717 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
11719 * config/s390/s390.c (s390_reorg): Remove loop.
11721 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
11724 (darwin_function_switched_text_sections): Delete.
11725 * gcc/config/darwin.h
11726 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
11728 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
11731 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
11732 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
11733 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
11735 2018-08-15 Martin Liska <mliska@suse.cz>
11737 PR tree-optimization/86925
11738 * predict.c (expr_expected_value_1): When taking
11739 later predictor, assign also probability.
11740 Use fold_build2_initializer_loc in order to fold
11741 the expression in -frounding-math.
11743 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
11745 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
11747 (expand_vec_perm_1): Try the new method.
11749 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
11752 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
11753 Check whether lra_live_max_point is 0 before dividing.
11755 2018-08-14 Martin Sebor <msebor@redhat.com>
11757 PR tree-optimization/86650
11758 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
11759 (vrp_prop::check_mem_ref): Same.
11761 2018-08-13 Liu Hao <lh_mouse@126.com>
11763 * pretty-print.c (eat_esc_sequence): Swap the foreground and
11764 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
11765 and clear it thereafter, as it only works for DBCS.
11767 2018-08-13 Liu Hao <lh_mouse@126.com>
11769 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
11770 handle returned by _get_osf_handle().
11772 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11774 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
11775 for folding vec_perm.
11777 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11779 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
11780 Add support for gimple-folding of vec_pack() and vec_unpack()
11783 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11785 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
11786 vec_xst variants to the list.
11787 (rs6000_gimple_fold_builtin): Add support for folding unaligned
11788 vector loads and stores.
11790 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
11792 * config.gcc (rs6000-ibm-aix4.x): Delete.
11793 (rs6000-ibm-aix5.1): Delete.
11794 (rs6000-ibm-aix5.2): Delete.
11795 (rs6000-ibm-aix5.3): Delete.
11796 * config/rs6000/aix43.h: Delete.
11797 * config/rs6000/aix51.h: Delete.
11798 * config/rs6000/aix52.h: Delete.
11799 * config/rs6000/t-aix43: Delete.
11801 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
11803 * config/s390/s390.c (s390_decompose_constant_pool_ref):
11805 (s390_decompose_address): Factor out constant pool ref
11808 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11810 * config/nds32/nds32-predicates.c
11811 (nds32_can_use_bclr_p): Change return type as bool.
11812 (nds32_can_use_bset_p): Ditto.
11813 (nds32_can_use_btgl_p): Ditto.
11814 (nds32_can_use_bitci_p): Ditto.
11815 * config/nds32/nds32-protos.h
11816 (nds32_can_use_bclr_p): Change declaration.
11817 (nds32_can_use_bset_p): Ditto.
11818 (nds32_can_use_btgl_p): Ditto.
11819 (nds32_can_use_bitci_p): Ditto.
11821 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11823 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
11824 Support -msched-prolog-epilog option.
11825 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
11827 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11829 * common/config/nds32/nds32-common.c
11830 (nds32_option_optimization_table): Enalbe -malways-align.
11832 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11834 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
11836 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
11837 OPT_misr_secure_ case.
11838 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
11839 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
11840 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
11842 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
11843 (nds32_isr_info): New field security_level.
11844 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
11845 * config/nds32/nds32.md (return_internal): Consider critical attribute.
11846 * config/nds32/nds32.opt (misr-secure): New option.
11847 * config/nds32/nds32_init.inc: New file.
11848 * config/nds32/nds32_isr.h: New file.
11850 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
11852 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
11853 Update comment for atomic instructions.
11854 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
11855 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
11857 (atomic_loaddi): Revise fence expansion to only emit fence prior to
11858 load for __ATOMIC_SEQ_CST model.
11859 (atomic_loaddi_1): Remove float register target.
11860 (atomic_storedi): Handle CONST_INT values.
11861 (atomic_storedi_1): Remove float register source. Add special case
11863 (memory_barrier): New expander and insn.
11865 2018-08-11 Jakub Jelinek <jakub@redhat.com>
11867 PR tree-optimization/86835
11868 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
11869 new_stmt after def_gsi, make sure to insert new_square_stmt after
11870 that stmt, not 2 stmts before it.
11872 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
11875 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
11878 2018-08-10 Martin Liska <mliska@suse.cz>
11881 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
11883 * builtins.c (expand_builtin_expect_with_probability):
11885 (expand_builtin_expect_with_probability): New function.
11886 (build_builtin_expect_predicate): Add new argumnet probability
11887 for BUILT_IN_EXPECT_WITH_PROBABILITY.
11888 (fold_builtin_expect):
11891 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
11892 * builtins.h (fold_builtin_expect): Set new argument.
11893 * doc/extend.texi: Document __builtin_expect_with_probability.
11894 * doc/invoke.texi: Likewise.
11895 * gimple-fold.c (gimple_fold_call): Pass new argument.
11896 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
11897 also BUILT_IN_EXPECT_WITH_PROBABILITY.
11898 * predict.c (get_predictor_value): New function.
11899 (expr_expected_value): Add new argument probability. Assume
11900 that predictor and probability are always non-null.
11901 (expr_expected_value_1): Likewise. For __builtin_expect and
11902 __builtin_expect_with_probability set probability. Handle
11903 combination in binary expressions.
11904 (tree_predict_by_opcode): Simplify code by simply calling
11905 get_predictor_value.
11906 (pass_strip_predict_hints::execute): Add handling of
11907 BUILT_IN_EXPECT_WITH_PROBABILITY.
11908 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
11910 * tree.h (DECL_BUILT_IN_P): New function.
11912 2018-08-10 Martin Liska <mliska@suse.cz>
11914 PR tree-optimization/85799
11915 * passes.def: Add argument for pass_strip_predict_hints.
11916 * predict.c (class pass_strip_predict_hints): Add new argument
11918 (strip_predictor_early): New function.
11919 (pass_strip_predict_hints::execute): Call the function to
11921 (strip_predict_hints): New function.
11922 * predict.def: Fix comment.
11924 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
11926 * Makefile.in: Clarify which tm.texi to copy over to assert the
11927 right to grant a GFDL license for all.
11929 2018-08-09 Jeff Law <law@redhat.com>
11931 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
11934 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
11936 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
11939 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11941 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
11942 reductions for variable-length vectors.
11944 2018-08-09 David Malcolm <dmalcolm@redhat.com>
11947 * common.opt (fdiagnostics-show-line-numbers): New option.
11948 * diagnostic-show-locus.c (class layout): Add fields
11949 "m_show_line_numbers_p" and "m_linenum_width";
11950 (num_digits): New function.
11951 (test_num_digits): New function.
11952 (layout::layout): Initialize new fields. Update m_x_offset
11953 logic to handle any left margin.
11954 (layout::print_source_line): Print line number when requested.
11955 (layout::start_annotation_line): New member function.
11956 (layout::print_annotation_line): Call it.
11957 (layout::print_leading_fixits): Likewise.
11958 (layout::print_trailing_fixits): Likewise. Update calls to
11959 move_to_column for new parameter.
11960 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
11961 it to potentially call start_annotation_line.
11962 (layout::show_ruler): Call start_annotation_line.
11963 (selftest::test_line_numbers_multiline_range): New selftest.
11964 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
11965 and selftest::test_line_numbers_multiline_range.
11966 * diagnostic.c (diagnostic_initialize): Initialize
11967 show_line_numbers_p.
11968 * diagnostic.h (struct diagnostic_context): Add field
11969 "show_line_numbers_p".
11970 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11971 -fno-diagnostics-show-line-numbers.
11972 * dwarf2out.c (gen_producer_string): Add
11973 OPT_fdiagnostics_show_line_numbers to the ignored options.
11974 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
11975 one setting" options.
11976 (append_compiler_options): Likewise to the dropped options.
11977 (append_diag_options): Likewise to the passed-on options.
11978 * opts.c (common_handle_option): Handle the new option.
11979 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
11981 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
11983 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
11984 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
11985 third argument of type "const signed char" to descriptions of
11986 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
11987 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
11988 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
11989 __builtin_bcdsub_ov functions.
11991 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11993 PR tree-optimization/86858
11994 * tree-vect-loop.c (vect_is_simple_reduction): Restore
11995 flow_bb_inside_loop_p calls.
11997 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11999 PR tree-optimization/86871
12000 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
12001 instead of gimple_assign_lhs.
12003 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
12006 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
12007 register constraint to operand 0.
12008 (add<mode>3_carryinC): Likewise.
12009 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
12011 2018-08-09 Martin Liska <mliska@suse.cz>
12014 * common.opt: Remove extra line.
12016 2018-08-09 Martin Liska <mliska@suse.cz>
12018 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
12019 at the end of a line, make first letter capital and end up
12020 a sentence with a dot.
12021 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
12022 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
12023 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
12024 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
12025 (PARAM_MAX_ISL_OPERATIONS): Likewise.
12026 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
12027 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
12028 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
12029 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
12030 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
12031 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
12032 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
12033 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
12034 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
12035 (PARAM_TREE_REASSOC_WIDTH): Likewise.
12036 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
12037 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
12038 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
12040 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
12043 * config/s390/s390.c (s390_option_override_internal): Reduce the
12044 stack-clash-protection-probe-interval param if it would be too big
12047 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
12050 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
12051 * config/m68k/m68k.c (handle_move_double): Don't call
12052 m68k_final_prescan_insn.
12053 (m68k_adjust_decorated_operand): Renamed from
12054 m68k_final_prescan_insn, remove first and third operand and
12056 (print_operand): Call it.
12057 (print_operand_address): Call it.
12059 2018-08-08 Nathan Sidwell <nathan@acm.org>
12061 * diagnostic.c (diagnostic_report_current_module): Use
12062 linemap_included_from & linemap_included_from_linemap.
12064 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
12066 * config/aarch64/aarch64-cores.def: Add phecda core.
12067 * config/aarch64/aarch64-tune.md: Regenerate.
12068 * doc/invoke.texi: Add phecda core.
12070 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
12073 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
12075 * config/s390/s390.md ("movti"): Add more alternatives for
12076 constant to GPR copies.
12078 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
12080 * config/s390/s390.c: Fix whitespace damage throughout the file.
12081 * config/s390/s390.h: Likewise.
12082 * config/s390/tpf.h: Likewise.
12084 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
12086 * config/s390/s390.c (s390_loadrelative_operand_p):
12087 Remove TARGET_CPU_ZARCH usages.
12088 (s390_rtx_costs): Likewise.
12089 (s390_legitimate_constant_p): Likewise.
12090 (s390_cannot_force_const_mem): Likewise.
12091 (legitimate_reload_constant_p): Likewise.
12092 (s390_preferred_reload_class): Likewise.
12093 (legitimize_pic_address): Likewise.
12094 (legitimize_tls_address): Likewise.
12095 (s390_split_branches): Removed.
12096 (s390_add_execute): Removed.
12097 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
12098 (s390_mainpool_start): Likewise.
12099 (s390_mainpool_finish): Likewise.
12100 (s390_mainpool_cancel): Removed.
12101 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
12102 (s390_chunkify_cancel): Likewise.
12103 (s390_return_addr_rtx): Likewise.
12104 (s390_register_info): Remove split_branches_pending_p uages.
12105 (s390_optimize_register_info): Likewise.
12106 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
12107 split_branches_pending_p usages.
12108 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
12109 (s390_load_got): Likewise.
12110 (s390_expand_split_stack_prologue): Likewise.
12111 (output_asm_nops): Likewise.
12112 (s390_function_profiler): Likewise.
12113 (s390_emit_call): Likewise.
12114 (s390_conditional_register_usage): Likewise.
12115 (s390_optimize_prologue): Likewise.
12116 (s390_reorg): Remove TARGET_CPU_ZARCH and
12117 split_branches_pending_p usages.
12118 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
12120 (s390_output_indirect_thunk_function): Likewise.
12121 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
12122 (TARGET_CPU_ZARCH_P): Removed.
12123 (struct machine_function): Remove split_branches_pending_p.
12124 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
12126 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
12128 * common/config/s390/s390-common.c (processor_flags_table):
12130 * config.gcc: Remove with_arch/with_tune support.
12131 * config/s390/2064.md: Remove cpu attribute comparisons.
12132 * config/s390/driver-native.c (s390_host_detect_local_cpu):
12134 * config/s390/linux.h (ASM_SPEC):
12135 Remove -march support.
12136 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
12137 Use a table to get an arch level.
12138 * config/s390/s390-opts.h (enum processor_type):
12139 Remove enum values.
12140 * config/s390/s390.c
12141 (processor_table): Remove entries, add arch_level values.
12142 (s390_issue_rate): Remove cases.
12143 (s390_option_override): Adjust
12144 s390_option_override_internal() call.
12145 (s390_option_override_internal): Remove deprecation warning.
12146 (s390_valid_target_attribute_tree): Adjust
12147 s390_option_override_internal() call.
12148 * config/s390/s390.h (struct s390_processor):
12149 Share with s390-c.c, add arch_level field.
12150 * config/s390/s390.md:
12151 Remove occurrences in cpu attribute.
12152 * config/s390/s390.opt: Remove -march/-mtune support.
12153 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
12154 * doc/invoke.texi: Remove deprecation warning.
12156 2018-08-08 Luis Machado <luis.machado@linaro.org>
12158 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
12160 (qdf24xx_tunings): Set vector cost structure to
12161 qdf24xx_vector_cost.
12163 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
12164 <register_sextend>: Set to 3.
12166 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
12169 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
12170 * config/aarch64/aarch64-simd.md
12171 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
12172 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
12173 (aarch64_frecpx<mode>): ...this new pattern.
12174 * config/aarch64/aarch64-simd-builtins.def: Remove comment
12175 about aarch64_frecp<FRECP:frecp_suffix><mode>.
12177 2018-08-07 Martin Liska <mliska@suse.cz>
12179 PR middle-end/83023
12180 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
12181 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
12182 * predict.def (PRED_MALLOC_NONNULL): New predictor.
12183 * doc/extend.texi: Document that malloc attribute adds
12186 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
12189 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12190 Define to speculation_safe_value_not_needed.
12192 2018-08-06 Jeff Law <law@redhat.com>
12194 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
12195 the vr_values instance to cprop_into_stmt.
12196 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
12197 (cprop_operand): Also query EVRP to determine if OP is a constant.
12199 2018-08-06 Nathan Sidwell <nathan@acm.org>
12201 * diagnostic.c (diagnostic_report_current_module): Reroll
12202 included-at loop. Translate text.
12204 2018-08-06 David Malcolm <dmalcolm@redhat.com>
12206 * function-tests.c (selftest::test_expansion_to_rtl): Call
12207 free_after_compilation.
12209 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12211 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
12213 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
12215 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
12216 loops with memory block operations from getting unrolled.
12218 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
12221 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12222 Define to speculation_safe_value_not_needed.
12224 2018-08-06 Jeff Law <law@redhat.com>
12226 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
12229 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12232 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
12233 with all enabled __intN types.
12235 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
12237 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12239 * alias.c (record_set): Check for clobber high.
12240 * cfgexpand.c (expand_gimple_stmt): Likewise.
12241 * combine-stack-adj.c (single_set_for_csa): Likewise.
12242 * combine.c (find_single_use_1): Likewise.
12243 (set_nonzero_bits_and_sign_copies): Likewise.
12244 (get_combine_src_dest): Likewise.
12245 (is_parallel_of_n_reg_sets): Likewise.
12246 (try_combine): Likewise.
12247 (record_dead_and_set_regs_1): Likewise.
12248 (reg_dead_at_p_1): Likewise.
12249 (reg_dead_at_p): Likewise.
12250 * dce.c (deletable_insn_p): Likewise.
12251 (mark_nonreg_stores_1): Likewise.
12252 (mark_nonreg_stores_2): Likewise.
12253 * df-scan.c (df_find_hard_reg_defs): Likewise.
12254 (df_uses_record): Likewise.
12255 (df_get_call_refs): Likewise.
12256 * dwarf2out.c (mem_loc_descriptor): Likewise.
12257 * haifa-sched.c (haifa_classify_rtx): Likewise.
12258 * ira-build.c (create_insn_allocnos): Likewise.
12259 * ira-costs.c (scan_one_insn): Likewise.
12260 * ira.c (equiv_init_movable_p): Likewise.
12261 (rtx_moveable_p): Likewise.
12262 (interesting_dest_for_shprep): Likewise.
12263 * jump.c (mark_jump_label_1): Likewise.
12264 * postreload-gcse.c (record_opr_changes): Likewise.
12265 * postreload.c (reload_cse_simplify): Likewise.
12266 (struct reg_use): Add source expr.
12267 (reload_combine): Check for clobber high.
12268 (reload_combine_note_use): Likewise.
12269 (reload_cse_move2add): Likewise.
12270 (move2add_note_store): Likewise.
12271 * print-rtl.c (print_pattern): Likewise.
12272 * recog.c (decode_asm_operands): Likewise.
12273 (store_data_bypass_p): Likewise.
12274 (if_test_bypass_p): Likewise.
12275 * regcprop.c (kill_clobbered_value): Likewise.
12276 (kill_set_value): Likewise.
12277 * reginfo.c (reg_scan_mark_refs): Likewise.
12278 * reload1.c (maybe_fix_stack_asms): Likewise.
12279 (eliminate_regs_1): Likewise.
12280 (elimination_effects): Likewise.
12281 (mark_not_eliminable): Likewise.
12282 (scan_paradoxical_subregs): Likewise.
12283 (forget_old_reloads_1): Likewise.
12284 * reorg.c (find_end_label): Likewise.
12285 (try_merge_delay_insns): Likewise.
12286 (redundant_insn): Likewise.
12287 (own_thread_p): Likewise.
12288 (fill_simple_delay_slots): Likewise.
12289 (fill_slots_from_thread): Likewise.
12290 (dbr_schedule): Likewise.
12291 * resource.c (update_live_status): Likewise.
12292 (mark_referenced_resources): Likewise.
12293 (mark_set_resources): Likewise.
12294 * rtl.c (copy_rtx): Likewise.
12295 * rtlanal.c (reg_referenced_p): Likewise.
12296 (single_set_2): Likewise.
12297 (noop_move_p): Likewise.
12298 (note_stores): Likewise.
12299 * sched-deps.c (sched_analyze_reg): Likewise.
12300 (sched_analyze_insn): Likewise.
12302 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12304 * cse.c (invalidate_reg): New function extracted from...
12305 (invalidate): ...here.
12306 (canonicalize_insn): Check for clobber high.
12307 (invalidate_from_clobbers): invalidate clobber highs.
12308 (invalidate_from_sets_and_clobbers): Likewise.
12309 (count_reg_usage): Check for clobber high.
12310 (insn_live_p): Likewise.
12311 * cselib.c (cselib_expand_value_rtx_1):Likewise.
12312 (cselib_invalidate_regno): Check for clobber in setter.
12313 (cselib_invalidate_rtx): Pass through setter.
12314 (cselib_invalidate_rtx_note_stores):
12315 (cselib_process_insn): Check for clobber high.
12316 * cselib.h (cselib_invalidate_rtx): Add operand.
12318 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12320 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
12321 (mark_not_eliminable): Likewise.
12322 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
12323 * lra-lives.c (process_bb_lives): Check for clobber high.
12324 * lra.c (new_insn_reg): Remember clobber highs.
12325 (collect_non_operand_hard_regs): Check for clobber high.
12326 (lra_set_insn_recog_data): Likewise.
12327 (add_regs_to_insn_regno_info): Likewise.
12328 (lra_update_insn_regno_info): Likewise.
12330 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12332 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
12333 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
12335 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12337 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
12338 (copy_insn_1): Likewise.
12339 (gen_hard_reg_clobber_high): New gen function.
12340 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
12341 * genemit.c (gen_exp): Likewise.
12342 (gen_emit_seq): Pass through info.
12343 (gen_insn): Check for CLOBBER_HIGH.
12344 (gen_expand): Pass through info.
12345 (gen_split): Likewise.
12346 (output_add_clobbers): Likewise.
12347 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
12348 (remove_clobbers): Likewise.
12349 * rtl.h (gen_hard_reg_clobber_high): New declaration.
12351 2018-08-06 Alan Hayward <alan.hayward@arm.com>
12353 * doc/rtl.texi (clobber_high): Add.
12354 (parallel): Add in clobber high
12355 * rtl.c (rtl_check_failed_code3): Add function.
12356 * rtl.def (CLOBBER_HIGH): Add expression.
12357 * rtl.h (RTL_CHECKC3): Add macro.
12358 (rtl_check_failed_code3): Add declaration.
12359 (XC3EXP): Add macro.
12361 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
12364 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
12365 cfun->machine->max_used_stack_alignment if needed.
12367 2018-08-04 Martin Sebor <msebor@redhat.com>
12369 PR tree-optimization/86571
12370 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
12373 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
12376 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12379 2018-08-03 Jeff Law <law@redhat.com>
12382 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12383 Define to speculation_safe_value_not_needed.
12385 2018-08-03 David Malcolm <dmalcolm@redhat.com>
12387 * doc/gcov.texi (-x): Remove duplicate "to".
12388 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
12389 (-Wif-not-aligned): Remove duplicate "is".
12390 (-flto): Remove duplicate "the".
12391 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
12392 duplicate "v5.00.b".
12393 (MSP430 Options): Remove duplicate "and" from the description
12394 of "-mgprel-sec=regexp".
12395 (x86 Options): Remove duplicate copies of "vmldLog102" and
12396 vmlsLog104 from description of "-mveclibabi=type".
12398 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
12400 * internal-fn.h (first_commutative_argument): Declare.
12401 * internal-fn.c (first_commutative_argument): New function.
12402 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
12403 restrictions for pattern statements. Use first_commutative_argument
12404 to look for commutative operands in calls to internal functions.
12406 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
12408 * Makefile.in (wide-int-range.o): New.
12409 * tree-vrp.c: Move all the wide_int_* functions to...
12410 * wide-int-range.cc: ...here.
12411 * tree-vrp.h: Move all the wide_int_* prototypes to...
12412 * wide-int-range.h: ...here.
12414 2018-08-03 Tom de Vries <tdevries@suse.de>
12416 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
12418 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
12419 * except.c (output_function_exception_table): Do early exit if
12420 targetm_common.except_unwind_info (&global_options) == UI_NONE.
12422 2018-08-03 Martin Liska <mliska@suse.cz>
12424 * predict.c (dump_prediction): Change to 2 digits
12427 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
12429 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
12431 (falkor_am_1_gtov_gtov): ... a new insn reservation.
12433 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
12435 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
12436 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
12437 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
12438 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
12439 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
12441 2018-08-02 David Malcolm <dmalcolm@redhat.com>
12443 * diagnostic-show-locus.c (diagnostic_show_locus): Use
12444 pp_take_prefix when saving the existing prefix.
12445 * diagnostic.c (diagnostic_append_note): Likewise.
12446 * langhooks.c (lhd_print_error_function): Likewise.
12447 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
12448 param's type. Free the existing prefix.
12449 (pp_take_prefix): New function.
12450 (pretty_printer::pretty_printer): Drop the prefix parameter.
12451 Rename the length parameter to match the comment.
12452 (pretty_printer::~pretty_printer): Free the prefix.
12453 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
12455 (struct pretty_printer): Drop the "const" from "prefix" field's
12456 type and clarify memory management.
12457 (pp_set_prefix): Drop the "const" from the 2nd param.
12458 (pp_take_prefix): New decl.
12460 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
12462 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
12463 for word_mode_ok here instead of passing as argument.
12464 (expand_block_compare): Change select_block_compare_mode() call.
12465 (expand_strncmp_gpr_sequence): New function.
12466 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
12468 2018-08-02 Jeff Law <law@redhat.com>
12471 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12472 Define to speculation_safe_value_not_needed.
12475 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12476 Define to speculation_safe_value_not_needed.
12478 2018-08-02 Tom de Vries <tdevries@suse.de>
12481 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
12482 function. Return UI_TARGET unconditionally.
12483 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
12484 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
12486 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
12488 * genemit.c (print_overload_test): Fix typo.
12490 2018-08-02 Richard Biener <rguenther@suse.de>
12492 PR tree-optimization/86816
12493 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
12494 which checks for value availability before querying it.
12495 (gvn_uses_equal): Use it.
12496 (same_succ_hash): Likewise.
12497 (gimple_equal_p): Likewise.
12499 2018-08-02 Nick Clifton <nickc@redhat.com>
12502 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12503 Define to speculation_safe_value_not_needed.
12506 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12507 Define to speculation_safe_value_not_needed.
12510 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12511 Define to speculation_safe_value_not_needed.
12514 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12515 Define to speculation_safe_value_not_needed.
12518 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12519 Define to speculation_safe_value_not_needed.
12522 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12523 Define to speculation_safe_value_not_needed.
12526 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12527 Define to speculation_safe_value_not_needed.
12530 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12531 Define to speculation_safe_value_not_needed.
12534 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12535 speculation_safe_value_not_needed.
12538 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
12539 to speculation_safe_value_not_needed.
12541 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
12543 * doc/md.texi: Expand the documentation of instruction names
12544 to mention port-local uses. Document '@' in pattern names.
12545 * read-md.h (overloaded_instance, overloaded_name): New structs.
12546 (mapping): Declare.
12547 (md_reader::handle_overloaded_name): New member function.
12548 (md_reader::get_overloads): Likewise.
12549 (md_reader::m_first_overload): New member variable.
12550 (md_reader::m_next_overload_ptr): Likewise.
12551 (md_reader::m_overloads_htab): Likewise.
12552 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
12553 m_next_overload_ptr and m_overloads_htab.
12554 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
12555 (get_mode_token, get_code_token, get_int_token): New functions.
12556 (map_attr_string): Add an optional argument that passes back
12557 the associated iterator.
12558 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
12559 (md_reader::handle_overloaded_name, add_overload_instance): New
12561 (apply_iterators): Handle '@' names. Report an error if '@'
12562 is used without iterators.
12563 (initialize_iterators): Initialize the new iterator_group fields.
12564 * genopinit.c (handle_overloaded_code_for)
12565 (handle_overloaded_gen): New functions.
12566 (main): Use them to print declarations of maybe_code_for_* and
12567 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
12568 * genemit.c (print_overload_arguments, print_overload_test)
12569 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
12570 (main): Use it to print definitions of maybe_code_for_* and
12571 maybe_gen_* functions.
12572 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
12573 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
12574 instead of explicit mode checks.
12575 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
12576 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
12577 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
12578 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
12579 (aarch64_expand_compare_and_swap): Likewise
12580 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
12581 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
12582 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
12583 (aarch64_constant_pool_reload_icode): Delete.
12584 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
12585 instead of aarch64_constant_pool_reload_icode. Use
12586 code_for_aarch64_reload_mov instead of explicit mode checks.
12587 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
12588 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
12589 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
12590 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
12591 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
12592 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
12593 (aarch64_atomic_load_op_code): Delete.
12594 (aarch64_emit_atomic_load_op): Likewise.
12595 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
12596 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
12597 instead of aarch64_emit_atomic_load_op.
12598 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
12599 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
12600 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
12601 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
12602 character before the pattern name.
12603 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
12604 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
12605 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
12606 (aarch64_frecps<mode>): Likewise.
12607 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
12608 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
12609 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
12610 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
12611 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
12613 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
12615 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
12616 Allow HFmode constants if TARGET_FP_F16INST.
12618 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
12621 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
12622 No longer check last store for clobber of address register.
12624 2018-08-02 Martin Liska <mliska@suse.cz>
12626 PR gcov-profile/86817
12627 * gcov.c (process_all_functions): New function.
12629 (process_file): Move functions processing to
12630 process_all_functions.
12632 2018-08-02 David Malcolm <dmalcolm@redhat.com>
12634 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
12635 "const" to the "gimple *" and "rtx_insn *" parameters.
12636 * dumpfile.h (dump_user_location_t::dump_user_location_t):
12638 (dump_location_t::dump_location_t): Likewise.
12640 2018-08-01 Martin Sebor <msebor@redhat.com>
12642 PR tree-optimization/86650
12643 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
12644 rather than a "gcall *". Directly pass the data of interest
12645 to percent_K_format, rather than building a temporary CALL_EXPR
12647 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
12648 (gimple_fold_builtin_strncat): Adjust.
12649 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
12650 gcall* argument with gimple*.
12651 * gimple-ssa-warn-restrict.c (check_call): Same.
12652 (wrestrict_dom_walker::before_dom_children): Same.
12653 (builtin_access::builtin_access): Same.
12654 (check_bounds_or_overlap): Same
12655 (maybe_diag_overlap): Same.
12656 (maybe_diag_offset_bounds): Same.
12657 * tree-diagnostic.c (default_tree_printer): Move usage of
12658 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
12660 * tree-pretty-print.c (percent_K_format): Add argument.
12661 * tree-pretty-print.h: Add argument.
12662 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
12663 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
12664 (maybe_diag_stxncpy_trunc): Same.
12665 (handle_builtin_stxncpy): Same.
12666 (handle_builtin_strcat): Same.
12668 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12670 * match.pd: Optimise pointer range checks.
12672 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12674 PR tree-optimization/86758
12675 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
12676 to remove pattern statements.
12678 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12680 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
12681 result of dfs_enumerate_from when constructing stmt_vec_infos,
12682 instead of additionally calling get_loop_body.
12684 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12686 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
12688 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
12689 When creating an iv, assert that the step is not known to be zero.
12690 (vect_setup_realignment): Update call accordingly.
12691 * tree-vect-stmts.c (vectorizable_store): Likewise.
12692 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
12694 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12696 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
12697 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
12698 (vectorizable_reduction): Likewise.
12699 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12700 (vect_detect_hybrid_slp_stmts): Likewise.
12701 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12703 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
12705 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
12706 (wide_int_set_zero_nonzero_bits): ...this.
12707 (zero_nonzero_bits_from_vr): Rename to...
12708 (vrp_set_zero_nonzero_bits): ...this.
12709 (extract_range_from_multiplicative_op_1): Abstract wide int
12711 (wide_int_range_multiplicative_op): ...here.
12712 (extract_range_from_binary_expr_1): Extract wide int binary
12713 operations into their own functions.
12714 (wide_int_range_lshift): New.
12715 (wide_int_range_can_optimize_bit_op): New.
12716 (wide_int_range_shift_undefined_p): New.
12717 (wide_int_range_bit_xor): New.
12718 (wide_int_range_bit_ior): New.
12719 (wide_int_range_bit_and): New.
12720 (wide_int_range_trunc_mod): New.
12721 (extract_range_into_wide_ints): New.
12722 (vrp_shift_undefined_p): New.
12723 (extract_range_from_multiplicative_op): New.
12724 (vrp_can_optimize_bit_op): New.
12725 * tree-vrp.h (value_range::dump): New.
12726 (wide_int_range_multiplicative_op): New.
12727 (wide_int_range_lshift):New.
12728 (wide_int_range_shift_undefined_p): New.
12729 (wide_int_range_bit_xor): New.
12730 (wide_int_range_bit_ior): New.
12731 (wide_int_range_bit_and): New.
12732 (wide_int_range_trunc_mod): New.
12733 (zero_nonzero_bits_from_bounds): Rename to...
12734 (wide_int_set_zero_nonzero_bits): ...this.
12735 (zero_nonzero_bits_from_vr): Rename to...
12736 (vrp_set_zero_nonzero_bits): ...this.
12737 (range_easy_mask_min_max): Rename to...
12738 (wide_int_range_can_optimize_bit_op): this.
12739 * vr-values.c (simplify_bit_ops_using_ranges): Rename
12740 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
12742 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12744 * tree-vectorizer.h (vect_orig_stmt): New function.
12745 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
12746 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
12747 (vect_create_epilog_for_reduction): Likewise.
12748 (vectorizable_live_operation): Likewise.
12749 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12750 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
12751 * tree-vect-stmts.c (vectorizable_call): Likewise.
12752 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
12754 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12756 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
12758 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
12759 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
12760 (vect_transform_loop): Likewise.
12761 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12763 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12765 * tree-vectorizer.h (vect_schedule_slp): Return void.
12766 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12767 (vect_schedule_slp): Likewise.
12769 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12771 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
12773 (vect_transform_loop): Update calls accordingly. Schedule SLP
12774 instances before the main loop, if any exist.
12776 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12778 PR tree-optimization/86749
12779 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
12780 If the lhs is used in a COND_EXPR, check that it is being used
12781 as the "then" or "else" value.
12783 2018-08-01 Tom de Vries <tdevries@suse.de>
12786 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12787 speculation_safe_value_not_needed.
12789 2018-08-01 Richard Biener <rguenther@suse.de>
12791 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
12792 as base and offset.
12794 2018-08-01 Martin Liska <mliska@suse.cz>
12796 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
12797 format how successful transformation is dumped.
12798 (gimple_mod_pow2_value_transform): Likewise.
12799 (gimple_mod_subtract_transform): Likewise.
12800 (gimple_stringops_transform): Likewise.
12802 2018-08-01 Martin Liska <mliska@suse.cz>
12804 PR value-prof/35543
12805 * value-prof.c (interesting_stringop_to_profile_p):
12806 Simplify the code and add BUILT_IN_MEMMOVE.
12807 (gimple_stringops_transform): Likewise.
12809 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
12811 * config/aarch64/aarch64-simd.md
12812 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
12813 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
12814 use GPI iterator instead of SI mode.
12816 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
12818 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
12819 rs6000_speculation_barrier.
12820 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
12821 new barrier pattern name.
12823 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
12825 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
12826 (speculation_barrier): New insn.
12828 2018-08-01 Richard Biener <rguenther@suse.de>
12831 * graphite.h: Include isl/id.h and isl/space.h to allow build
12834 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
12837 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12838 mode for COFF targets.
12839 * defaults.h (TARGET_COFF): Define.
12840 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
12841 TARGET_COFF): Define.
12842 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
12843 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
12844 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
12846 2018-07-31 Alexandre Oliva <oliva@adacore.com>
12848 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
12849 * gimple-streamer-out.c (output_bb): Save it.
12850 * lto-streamer-in.c (input_struct_function_base): Restore
12851 instance discriminator if available. Create map on demand.
12852 * lto-streamer-out.c (output_struct_function_base): Save it if
12854 * final.c (decl_to_instance_map): Document LTO strategy.
12856 2018-07-31 Alexandre Oliva <oliva@adacore.com>
12857 Olivier Hainque <hainque@adacore.com>
12859 * debug.h (decl_to_instance_map_t): New type.
12860 (decl_to_instance_map): Declare.
12861 (maybe_create_decl_to_instance_map): New inline function.
12862 * final.c (bb_discriminator, last_bb_discriminator): New statics,
12863 to track basic block discriminators.
12864 (final_start_function_1): Initialize them.
12865 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
12867 (decl_to_instance_map): New variable.
12868 (map_decl_to_instance, maybe_set_discriminator): New functions.
12869 (notice_source_line): Set discriminator.
12871 2018-07-31 Ian Lance Taylor <iant@golang.org>
12873 * targhooks.c (default_have_speculation_safe_value): Add
12876 2018-07-31 David Malcolm <dmalcolm@redhat.com>
12878 * dump-context.h: Include "pretty-print.h".
12879 (dump_context::refresh_dumps_are_enabled): New decl.
12880 (dump_context::emit_item): New decl.
12881 (class dump_context): Add fields "m_test_pp" and
12883 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12884 (temp_dump_context::get_dumped_text): New decl.
12885 (class temp_dump_context): Add field "m_pp".
12886 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
12887 (dump_context::refresh_dumps_are_enabled): ...and add a test for
12889 (set_dump_file): Update for above change.
12890 (set_alt_dump_file): Likewise.
12891 (dump_loc): New overload, taking a pretty_printer *.
12892 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
12893 to any test pretty-printer.
12894 (make_item_for_dump_gimple_stmt): New function, adapted from
12895 optinfo::add_gimple_stmt.
12896 (dump_context::dump_gimple_stmt): Call it, and use the result,
12897 eliminating the direct usage of dump_file and alt_dump_file in
12898 favor of indirectly using them via emit_item.
12899 (make_item_for_dump_gimple_expr): New function, adapted from
12900 optinfo::add_gimple_expr.
12901 (dump_context::dump_gimple_expr): Call it, and use the result,
12902 eliminating the direct usage of dump_file and alt_dump_file in
12903 favor of indirectly using them via emit_item.
12904 (make_item_for_dump_generic_expr): New function, adapted from
12906 (dump_context::dump_generic_expr): Call it, and use the result,
12907 eliminating the direct usage of dump_file and alt_dump_file in
12908 favor of indirectly using them via emit_item.
12909 (make_item_for_dump_printf_va): New function, adapted from
12910 optinfo::add_printf_va.
12911 (make_item_for_dump_printf): New function.
12912 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
12913 and use the result, eliminating the direct usage of dump_file and
12914 alt_dump_file in favor of indirectly using them via emit_item.
12915 (make_item_for_dump_dec): New function.
12916 (dump_context::dump_dec): Call it, and use the result,
12917 eliminating the direct usage of dump_file and alt_dump_file in
12918 favor of indirectly using them via emit_item.
12919 (make_item_for_dump_symtab_node): New function, adapted from
12920 optinfo::add_symtab_node.
12921 (dump_context::dump_symtab_node): Call it, and use the result,
12922 eliminating the direct usage of dump_file and alt_dump_file in
12923 favor of indirectly using them via emit_item.
12924 (dump_context::begin_scope): Reimplement, avoiding direct usage
12925 of dump_file and alt_dump_file in favor of indirectly using them
12927 (dump_context::emit_item): New member function.
12928 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12929 Set up test pretty-printer on the underlying context. Call
12930 refresh_dumps_are_enabled.
12931 (temp_dump_context::~temp_dump_context): Call
12932 refresh_dumps_are_enabled.
12933 (temp_dump_context::get_dumped_text): New member function.
12934 (selftest::verify_dumped_text): New function.
12935 (ASSERT_DUMPED_TEXT_EQ): New macro.
12936 (selftest::test_capture_of_dump_calls): Run all tests twice, with
12937 and then without optinfo enabled. Add uses of
12938 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
12939 * dumpfile.h: Update comment for the dump_* API.
12940 * optinfo-emit-json.cc
12941 (selftest::test_building_json_from_dump_calls): Update for new
12942 param for temp_dump_context ctor.
12943 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
12944 and "m_owned" field.
12945 (optinfo_item::~optinfo_item): Likewise.
12946 (optinfo::add_item): New member function.
12947 (optinfo::emit): Update comment.
12948 (optinfo::add_string): Delete.
12949 (optinfo::add_printf): Delete.
12950 (optinfo::add_printf_va): Delete.
12951 (optinfo::add_gimple_stmt): Delete.
12952 (optinfo::add_gimple_expr): Delete.
12953 (optinfo::add_tree): Delete.
12954 (optinfo::add_symtab_node): Delete.
12955 (optinfo::add_dec): Delete.
12956 * optinfo.h (class dump_context): New forward decl.
12957 (optinfo::add_item): New decl.
12958 (optinfo::add_string): Delete.
12959 (optinfo::add_printf): Delete.
12960 (optinfo::add_printf_va): Delete.
12961 (optinfo::add_gimple_stmt): Delete.
12962 (optinfo::add_gimple_expr): Delete.
12963 (optinfo::add_tree): Delete.
12964 (optinfo::add_symtab_node): Delete.
12965 (optinfo::add_dec): Delete.
12966 (optinfo::add_poly_int): Delete.
12967 (optinfo_item::optinfo_item): Remove "owned" param.
12968 (class optinfo_item): Remove field "m_owned".
12970 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12972 PR middle-end/86705
12973 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
12974 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
12975 requested variable alignment.
12976 (expand_one_ssa_partition): Likewise.
12977 (expand_one_var): Likewise.
12979 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12981 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
12982 to speculation_safe_value_not_needed.
12984 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12986 * targhooks.h (speculation_safe_value_not_needed): New prototype.
12987 * targhooks.c (speculation_safe_value_not_needed): New function.
12988 * target.def (have_speculation_safe_value): Update documentation.
12989 * doc/tm.texi: Regenerated.
12991 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12993 * config/aarch64/iterators.md (ALLI_TI): New iterator.
12994 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
12996 (despeculate_copy<ALLI:mode>_insn): New insn.
12997 (despeculate_copyti_insn): New insn.
12998 (despeculate_simple<ALLI:mode>): New insn
12999 (despeculate_simpleti): New insn.
13000 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
13002 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
13003 aarch64_speculation_safe_value.
13004 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
13006 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13008 * config/aarch64/aarch64-speculation.cc: New file.
13009 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
13010 before pass_reorder_blocks.
13011 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
13013 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
13014 X14 and X15 when tracking speculation.
13015 * config/aarch64/aarch64.md (register name constants): Add
13016 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
13017 (unspec): Add UNSPEC_SPECULATION_TRACKER.
13018 (speculation_barrier): New insn attribute.
13019 (cmp<mode>): Allow SP in comparisons.
13020 (speculation_tracker): New insn.
13021 (speculation_barrier): Add speculation_barrier attribute.
13022 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
13023 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
13024 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
13026 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13028 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
13029 aarch64_track_speculation is true.
13030 (tb<optab><mode>1): Likewise.
13031 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
13032 generate CB[N]Z when tracking speculation.
13033 (aarch64_split_compare_and_swap): Likewise.
13034 (aarch64_split_atomic_op): Likewise.
13036 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13038 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
13040 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13042 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
13043 (speculation_barrier): New insn.
13045 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13047 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
13048 * config/arm/arm.md (speculation_barrier): New expand.
13049 (speculation_barrier_insn): New pattern.
13051 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
13053 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
13054 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
13055 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
13056 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
13058 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
13059 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
13060 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
13061 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
13062 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
13063 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
13064 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
13065 * builtins.c (expand_speculation_safe_value): New function.
13066 (expand_builtin): Call it.
13067 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
13068 * doc/extend.texi: Document __builtin_speculation_safe_value.
13069 * doc/md.texi: Document "speculation_barrier" pattern.
13070 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
13071 TARGET_HAVE_SPECULATION_SAFE_VALUE.
13072 * doc/tm.texi: Regenerated.
13073 * target.def (have_speculation_safe_value, speculation_safe_value): New
13075 * targhooks.c (default_have_speculation_safe_value): New function.
13076 (default_speculation_safe_value): New function.
13077 * targhooks.h (default_have_speculation_safe_value): Add prototype.
13078 (default_speculation_safe_value): Add prototype.
13080 2018-07-31 David Malcolm <dmalcolm@redhat.com>
13082 * dump-context.h (dump_context::dump_loc): New decl.
13083 * dumpfile.c (dump_context::dump_loc): New member function.
13084 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
13085 and dump_gimple_stmt.
13086 (dump_context::dump_gimple_expr_loc): Likewise, using
13088 (dump_context::dump_generic_expr_loc): Likewise, using
13090 (dump_context::dump_printf_loc_va): Likewise, using
13092 (dump_context::begin_scope): Explicitly using the global function
13093 "dump_loc", rather than the member function.
13095 2018-07-31 Martin Sebor <msebor@redhat.com>
13097 PR tree-optimization/86741
13098 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
13100 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
13102 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
13103 depend on whether prefetch instructions will be emitted or not.
13104 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
13105 will be emitted or not.
13106 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
13107 (TARGET_SETMEM_PFD): New macros.
13109 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13111 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
13112 (NULL_STMT_VEC_INFO): Delete.
13113 (stmt_vec_info::operator*): Likewise.
13114 (stmt_vec_info::operator gimple *): Likewise.
13115 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
13116 of NULL_STMT_VEC_INFO.
13117 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13118 (vect_reassociating_reduction_p): Likewise.
13119 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13120 (vectorizable_store): Likewise.
13121 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
13122 (vec_info::free_stmt_vec_infos): Likewise.
13124 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13126 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
13127 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
13129 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13131 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
13132 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13133 (vec_info::free_stmt_vec_info): New private member functions.
13134 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
13135 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
13136 * tree-parloops.c (gather_scalar_reductions): Remove calls to
13137 set_stmt_vec_info_vec and free_stmt_vec_infos.
13138 * tree-vect-loop.c (_loop_vec_info): Remove call to
13139 set_stmt_vec_info_vec.
13140 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
13141 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
13142 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
13143 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13144 (vec_info::free_stmt_vec_info): ...these new functions. Remove
13145 assignments in {vec_info::,}new_stmt_vec_info that are redundant
13146 with the clearing in the xcalloc.
13147 (stmt_vec_info_vec): Delete.
13148 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
13149 (vectorize_loops): Likewise.
13150 (vec_info::~vec_info): Remove argument from call to
13151 free_stmt_vec_infos.
13152 (vec_info::add_stmt): Remove vinfo argument from call to
13155 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13157 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
13158 rather than a gimple stmt.
13159 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
13160 information for pattern statements when passed the original
13161 statement; instead wait to be passed the pattern statement itself.
13162 Don't call set_vinfo_for_stmt here.
13163 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
13164 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
13165 stmt_vec_infos here.
13166 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
13167 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
13168 stmt_vec_infos entry.
13170 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13172 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
13173 * tree-vectorizer.c (vec_info::replace_stmt): New function.
13174 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
13175 * tree-vect-stmts.c (vectorizable_call): Likewise.
13176 (vectorizable_simd_clone_call): Likewise.
13178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13180 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
13181 * tree-vectorizer.c (vec_info::remove_stmt): New function.
13182 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
13183 * tree-vect-loop.c (vect_transform_loop): Likewise.
13184 * tree-vect-slp.c (vect_schedule_slp): Likewise.
13185 * tree-vect-stmts.c (vect_remove_stores): Likewise.
13187 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13189 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
13190 (vect_dr_stmt): Delete.
13191 * tree-vectorizer.c (vec_info::lookup_dr): New function.
13192 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
13194 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13195 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
13196 (vect_verify_datarefs_alignment, vect_peeling_supportable)
13197 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13198 (vect_analyze_data_refs): Likewise.
13199 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
13201 (vect_find_same_alignment_drs): Likewise.
13202 (vect_slp_analyze_node_dependences): Update calls accordingly.
13203 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
13204 instead of DR_VECT_AUX.
13205 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
13206 of a vector data references. Use vec_info::lookup_dr instead of
13208 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
13209 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
13210 instead of DR_VECT_AUX.
13212 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13214 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
13216 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13218 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13219 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13220 (vect_gen_prolog_loop_niters): Likewise.
13222 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13224 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
13225 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
13226 (vect_known_alignment_in_bytes, vect_dr_behavior)
13227 (vect_get_scalar_dr_size): Take references as dr_vec_infos
13228 instead of data_references. Update calls to other routines for
13229 which the same change has been made.
13230 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
13231 dr_vec_infos instead of stmt_vec_infos.
13232 (vect_analyze_data_ref_dependence): Update call accordingly.
13233 (vect_slp_analyze_data_ref_dependence)
13234 (vect_record_base_alignments): Use DR_VECT_AUX.
13235 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
13236 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
13237 (vector_alignment_reachable_p, vect_get_data_access_cost)
13238 (vect_peeling_supportable, vect_analyze_group_access_1)
13239 (vect_analyze_group_access, vect_analyze_data_ref_access)
13240 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
13241 (vect_compile_time_alias, vect_small_gap_p)
13242 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
13243 (vect_supportable_dr_alignment): Take references as dr_vec_infos
13244 instead of data_references. Update calls to other routines for
13245 which the same change has been made.
13246 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
13247 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13248 (vect_slp_analyze_and_verify_node_alignment)
13249 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13250 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13251 (vect_setup_realignment): Use dr_vec_infos. Update calls after
13253 (_vect_peel_info::dr): Replace with...
13254 (_vect_peel_info::dr_info): ...this new field.
13255 (vect_peeling_hash_get_most_frequent)
13256 (vect_peeling_hash_choose_best_peeling): Update accordingly.
13257 (vect_peeling_hash_get_lowest_cost):
13258 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
13259 routines for which the same change has been made.
13260 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
13262 * tree-vect-loop-manip.c (get_misalign_in_elems)
13263 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
13265 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13266 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
13267 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
13268 (get_group_load_store_type, get_negative_load_store_type)
13269 (vect_get_data_ptr_increment, vectorizable_store)
13270 (vectorizable_load): Likewise.
13271 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
13272 Update calls to other routines for which the same change has been made.
13274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13276 * tree-vectorizer.h (vec_info::move_dr): New member function.
13277 (dataref_aux): Rename to...
13278 (dr_vec_info): ...this and add "dr" and "stmt" fields.
13279 (_stmt_vec_info::dr_aux): Update accordingly.
13280 (_stmt_vec_info::data_ref_info): Delete.
13281 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
13282 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
13283 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
13284 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
13286 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
13287 (STMT_VINFO_DR_INFO): New macro.
13288 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
13289 (set_dr_misalignment): Update after rename of dataref_aux.
13290 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
13291 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
13292 initialization of STMT_VINFO_DATA_REF.
13293 * tree-vectorizer.c (vec_info::move_dr): New function.
13294 * tree-vect-patterns.c (vect_recog_bool_pattern)
13295 (vect_recog_mask_conversion_pattern)
13296 (vect_recog_gather_scatter_pattern): Use it.
13297 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
13298 the "dr" and "stmt" fields of dr_vec_info instead of
13299 STMT_VINFO_DATA_REF.
13301 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13303 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
13304 (is_pattern_stmt_p): Use it.
13305 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
13306 on pattern statements.
13308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13310 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
13311 original stmt as a stmt_vec_info rather than a gimple stmt.
13312 (vect_pattern_recog_1): Take the statement directly as a
13313 stmt_vec_info, rather than via a gimple_stmt_iterator.
13314 Update call to vect_mark_pattern_stmts.
13315 (vect_pattern_recog): Update calls accordingly.
13317 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13319 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
13320 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
13321 a vect_def_type for the first argument.
13322 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
13323 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
13324 operand if it isn't defined by a vectorized statement.
13325 (vect_build_gather_load_calls): Remove the mask_dt argument and
13326 update calls to vect_get_vec_def_for_stmt_copy.
13327 (vectorizable_bswap): Likewise the dt argument.
13328 (vectorizable_call): Update calls to vectorizable_bswap and
13329 vect_get_vec_def_for_stmt_copy.
13330 (vectorizable_simd_clone_call, vectorizable_assignment)
13331 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
13332 (vectorizable_comparison): Update calls to
13333 vect_get_vec_def_for_stmt_copy.
13334 (vectorizable_store): Likewise. Remove now-unnecessary calls to
13335 vect_is_simple_use.
13336 (vect_get_loop_based_defs): Remove dt argument and update call
13337 to vect_get_vec_def_for_stmt_copy.
13338 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
13339 and vect_get_vec_def_for_stmt_copy.
13340 (vectorizable_load): Update calls to vect_build_gather_load_calls
13341 and vect_get_vec_def_for_stmt_copy.
13342 * tree-vect-loop.c (vect_create_epilog_for_reduction)
13343 (vectorizable_reduction, vectorizable_live_operation): Update calls
13344 to vect_get_vec_def_for_stmt_copy.
13346 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13348 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
13349 and gimple stmt arguments with a stmt_vec_info.
13350 (vect_record_base_alignments): Update calls accordingly.
13351 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
13352 and gimple stmt arguments with a stmt_vec_info.
13353 (vect_build_slp_tree_1): Remove vinfo argument and update call
13354 to vect_record_max_nunits.
13355 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
13356 and vect_record_max_nunits.
13358 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13360 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
13361 file and take a stmt_vec_info instead of a gimple stmt.
13362 (supportable_widening_operation, vect_finish_replace_stmt)
13363 (vect_finish_stmt_generation, vect_get_store_rhs)
13364 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
13365 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
13366 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
13367 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
13368 (vect_create_data_ref_ptr, bump_vector_ptr)
13369 (vect_permute_store_chain, vect_setup_realignment)
13370 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
13371 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
13372 (vectorizable_reduction, vectorizable_induction)
13373 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
13374 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
13375 than gimple stmts as arguments.
13376 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
13377 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
13378 (can_group_stmts_p, vect_check_gather_scatter)
13379 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13380 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
13381 (vect_permute_load_chain, vect_shift_permute_load_chain)
13382 (vect_transform_grouped_load)
13383 (vect_record_grouped_load_vectors): Likewise.
13384 * tree-vect-loop.c (vect_fixup_reduc_chain)
13385 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
13386 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
13387 (vectorizable_reduction, vectorizable_induction)
13388 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
13389 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
13390 (vect_get_load_store_mask): Likewise.
13391 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
13392 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
13393 * tree-vect-stmts.c (vect_mark_relevant)
13394 (is_simple_and_all_uses_invariant)
13395 (exist_non_indexing_operands_for_use_p, process_use)
13396 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
13397 (vect_get_vec_def_for_operand, vect_get_vec_defs)
13398 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
13399 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
13400 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
13401 (get_negative_load_store_type, get_load_store_type)
13402 (vect_check_load_store_mask, vect_check_store_rhs)
13403 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
13404 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13405 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13406 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13407 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
13408 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
13409 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
13410 (supportable_widening_operation): Likewise.
13412 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13414 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
13415 a stmt_vec_info instead of a gcall.
13416 (vect_check_gather_scatter): Update call accordingly.
13417 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
13419 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
13420 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
13421 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
13422 instead of a gimple stmt.
13423 (vect_transform_loop): Update calls accordingly.
13424 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
13425 stmt_vec_infos instead of gimple stmts.
13426 (vect_analyze_slp_instance): Update use accordingly.
13427 * tree-vect-stmts.c (read_vector_array, write_vector_array)
13428 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
13429 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
13430 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
13431 (vect_gen_widened_results_half, vect_get_loop_based_defs)
13432 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
13433 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
13434 down to subroutines.
13436 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13438 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
13439 of the worklist from a vector of gimple stmts to a vector of
13441 * tree-vect-stmts.c (vect_mark_relevant, process_use)
13442 (vect_mark_stmts_to_be_vectorized): Likewise
13444 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13446 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
13447 statement before passing it to vect_analyze_stmt.
13448 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
13449 the chain of phi vector definitions. Track the exit phi via its
13451 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
13452 STMT_VINFO_REDUC_DEF.
13453 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
13454 stmt_vec_infos to handle the statement chains.
13455 (vect_get_slp_defs): Record the first statement in the node
13456 using a stmt_vec_info.
13457 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
13458 statements here and pass their stmt_vec_info down to subroutines.
13459 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
13460 down to vect_finish_stmt_generation.
13461 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
13462 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
13463 stmt_vec_infos to subroutines.
13464 (vect_remove_stores): Use stmt_vec_infos to handle the statement
13467 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13469 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
13470 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
13471 (vect_permute_store_chain, vect_setup_realignment)
13472 (vect_permute_load_chain, vect_shift_permute_load_chain)
13473 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
13474 stmts internally, and when passing values to other vectorizer routines.
13475 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13476 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
13477 (vect_analyze_loop_operations, get_initial_def_for_reduction)
13478 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
13479 (vectorizable_reduction, vectorizable_induction)
13480 (vectorizable_live_operation, vect_transform_loop_stmt)
13481 (vect_transform_loop): Likewise.
13482 * tree-vect-patterns.c (vect_reassociating_reduction_p)
13483 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
13484 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
13485 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13486 (vect_slp_analyze_node_operations_1): Likewise.
13487 * tree-vect-stmts.c (vect_mark_relevant, process_use)
13488 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
13489 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
13490 (vect_finish_stmt_generation_1, get_group_load_store_type)
13491 (get_load_store_type, vect_build_gather_load_calls)
13492 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13493 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13494 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13495 (vectorizable_store, vectorizable_load, vectorizable_condition)
13496 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
13497 (supportable_widening_operation): Likewise.
13498 (vect_get_vector_types_for_stmt): Likewise.
13499 * tree-vectorizer.h (vect_dr_behavior): Likewise.
13501 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13503 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13504 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
13505 (vect_permute_store_chain, vect_permute_load_chain)
13506 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
13507 repeated stmt_vec_info lookups.
13508 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13509 (vect_update_ivs_after_vectorizer): Likewise.
13510 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
13511 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13512 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
13513 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13514 (vect_bb_slp_scalar_cost): Likewise.
13515 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
13517 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13519 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
13520 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
13521 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
13522 to get gassigns and gcalls, rather than operating on generc gimple
13524 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
13525 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
13526 (vectorizable_load, vect_analyze_stmt): Likewise.
13527 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
13529 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13531 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
13532 return stmt_vec_infos rather than gimple stmts. Do not accept
13534 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
13536 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
13537 Update use of get_later_stmt.
13538 (vect_get_constant_vectors): Update call accordingly.
13539 (vect_schedule_slp_instance): Likewise
13540 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
13541 (vect_slp_analyze_instance_dependence): Likewise.
13542 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
13544 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13546 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
13547 (stmt_info_for_cost::stmt_info): ...this new field.
13548 (add_stmt_costs): Update accordingly.
13549 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13550 (vect_get_known_peeling_cost): Likewise.
13551 (vect_estimate_min_profitable_iters): Likewise.
13552 * tree-vect-stmts.c (record_stmt_cost): Likewise.
13554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13556 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
13557 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13558 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13560 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
13562 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13564 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
13565 a gimple stmt to a stmt_vec_info.
13566 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
13568 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13570 * tree-vectorizer.h (vec_info::grouped_stores): Change from
13571 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13572 (_loop_vec_info::reduction_chains): Likewise.
13573 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
13575 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13577 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13579 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
13580 a gimple stmt to a stmt_vec_info.
13581 (_stmt_vec_info::next_element): Likewise.
13582 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
13583 (vect_slp_analyze_and_verify_node_alignment)
13584 (vect_analyze_group_access_1, vect_analyze_group_access)
13585 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
13586 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
13587 (vect_supportable_dr_alignment): Update accordingly.
13588 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
13589 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
13590 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
13591 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13592 * tree-vect-slp.c (vect_build_slp_tree_1)
13593 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
13594 (vect_split_slp_store_group, vect_analyze_slp_instance)
13595 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
13596 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
13597 (get_group_load_store_type, get_load_store_type)
13598 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
13599 (vect_transform_stmt, vect_remove_stores): Likewise.
13601 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13603 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
13604 than a gimple stmt.
13605 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13606 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
13607 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
13608 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
13609 (vector_alignment_reachable_p, vect_get_data_access_cost)
13610 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
13611 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
13612 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13613 (vect_analyze_group_access_1, vect_analyze_group_access)
13614 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
13615 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
13616 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
13617 result of vect_dr_stmt and use the stmt_vec_info instead of
13618 the associated gimple stmt.
13619 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13620 (vect_gen_prolog_loop_niters): Likewise.
13621 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13623 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13625 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
13626 to a vec<stmt_vec_info>.
13627 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
13628 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
13629 vec<stmt_vec_info>.
13630 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
13631 to a vec<stmt_vec_info>.
13632 (bst_traits::value_type, bst_traits::value_type): Likewise.
13633 (bst_traits::hash): Update accordingly.
13634 (vect_get_and_check_slp_defs): Change the stmts parameter from
13635 a vec<gimple *> to a vec<stmt_vec_info>.
13636 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
13637 (vect_build_slp_tree): Likewise.
13638 (vect_build_slp_tree_2): Likewise. Update uses of
13639 SLP_TREE_SCALAR_STMTS.
13640 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
13641 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
13642 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
13643 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
13644 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
13645 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
13646 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
13647 (vect_get_constant_vectors, vect_get_slp_defs)
13648 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
13649 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
13650 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
13651 instead of gimple stmts.
13652 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
13653 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
13654 (vect_slp_analyze_instance_dependence): Update uses of
13655 SLP_TREE_SCALAR_STMTS.
13656 (vect_slp_analyze_and_verify_node_alignment): Likewise.
13657 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
13658 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
13659 (get_initial_defs_for_reduction): Likewise.
13660 (vect_create_epilog_for_reduction): Likewise.
13661 (vectorize_fold_left_reduction): Likewise.
13662 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
13663 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
13664 (can_vectorize_live_stmts): Likewise.
13666 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13668 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
13669 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13670 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
13672 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
13674 (gather_scalar_reductions): Update after above interface changes.
13675 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
13676 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
13678 (vect_force_simple_reduction): Likewise.
13679 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
13680 LOOP_VINFO_REDUCTIONS.
13681 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13683 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13685 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
13686 a gimple stmt to a stmt_vec_info.
13687 * tree-vect-loop.c (vect_active_double_reduction_p)
13688 (vect_force_simple_reduction, vectorizable_reduction): Update
13691 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13693 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
13694 vec<gimple *> to a vec<stmt_vec_info>.
13695 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
13696 the reduction_phis argument from a vec<gimple *> to a
13697 vec<stmt_vec_info>.
13698 (vectorizable_reduction): Likewise the phis local variable that
13699 is passed to vect_create_epilog_for_reduction. Update for new type
13700 of SLP_TREE_VEC_STMTS.
13701 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
13702 (vectorizable_live_operation): Likewise.
13703 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
13704 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
13706 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13708 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
13709 a gimple stmt to a stmt_vec_info.
13710 (vectorizable_condition, vectorizable_live_operation)
13711 (vectorizable_reduction, vectorizable_induction): Pass back the
13712 vectorized statement as a stmt_vec_info.
13713 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
13714 use of STMT_VINFO_VEC_STMT.
13715 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
13716 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
13717 as stmt_vec_infos rather than gimple stmts.
13718 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
13719 to a stmt_vec_info.
13720 (vectorizable_live_operation): Likewise.
13721 (vectorizable_reduction, vectorizable_induction): Likewise,
13722 updating use of STMT_VINFO_VEC_STMT.
13723 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
13724 of STMT_VINFO_VEC_STMT.
13725 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
13726 (vectorizable_simd_clone_call, vectorizable_conversion)
13727 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13728 (vectorizable_store, vectorizable_load, vectorizable_condition)
13729 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
13730 from a gimple stmt to a stmt_vec_info.
13731 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
13732 pointer to a stmt_vec_info to the vectorizable_* routines.
13734 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13736 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
13737 a gimple stmt to a stmt_vec_info.
13738 (is_pattern_stmt_p): Update accordingly.
13739 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
13740 (vect_record_grouped_load_vectors): Likewise.
13741 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
13742 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
13743 (vect_model_reduction_cost): Likewise.
13744 (vect_create_epilog_for_reduction): Likewise.
13745 (vectorizable_reduction, vectorizable_induction): Likewise.
13746 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13747 Return the stmt_vec_info for the pattern statement.
13748 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
13749 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
13750 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13751 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
13752 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
13753 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
13754 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
13755 (free_stmt_vec_info, vect_is_simple_use): Likewise.
13757 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13759 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
13760 (vect_finish_stmt_generation): Likewise.
13761 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13762 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
13763 (vect_build_gather_load_calls): Use the return value of the above
13764 functions instead of a separate call to vinfo_for_stmt. Use narrow
13765 scopes for the input gimple stmt and wider scopes for the associated
13766 stmt_vec_info. Use vec_info::lookup_def when setting these
13767 stmt_vec_infos from an SSA_NAME definition.
13768 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13769 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13770 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13771 (vectorizable_store, vectorizable_load, vectorizable_condition)
13772 (vectorizable_comparison): Likewise.
13773 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
13774 (vectorizable_reduction): Likewise.
13776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13778 * tree-vectorizer.h (vect_is_simple_use): Add an optional
13779 stmt_vec_info * parameter before the optional gimple **.
13780 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13781 (process_use, vect_get_vec_def_for_operand_1): Update callers.
13782 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
13783 * tree-vect-loop.c (vectorizable_reduction): Likewise.
13784 (vectorizable_live_operation): Likewise.
13785 * tree-vect-patterns.c (type_conversion_p): Likewise.
13786 (vect_look_through_possible_promotion): Likewise.
13787 (vect_recog_rotate_pattern): Likewise.
13788 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13790 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13792 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
13793 a typedef to a wrapper class.
13794 (NULL_STMT_VEC_INFO): New macro.
13795 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
13796 (stmt_vec_info::operator*): New function.
13797 (stmt_vec_info::operator gimple *): Likewise.
13798 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
13799 (add_stmt_costs): Likewise.
13800 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
13801 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13802 (vect_get_known_peeling_cost): Likewise.
13803 (vect_estimate_min_profitable_iters): Likewise.
13804 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13805 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
13806 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13807 (vectorizable_store, free_stmt_vec_infos): Likewise.
13808 (new_stmt_vec_info): Change return type of xcalloc to
13811 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13813 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
13814 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
13815 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
13816 a single_imm_use-based sequence.
13817 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
13819 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13821 * tree-vectorizer.h (vec_info::lookup_def): Declare.
13822 * tree-vectorizer.c (vec_info::lookup_def): New function.
13823 * tree-vect-patterns.c (vect_get_internal_def): Use it.
13824 (vect_widened_op_tree): Likewise.
13825 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13826 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
13827 (vectorizable_reduction): Likewise.
13828 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
13830 (vect_is_slp_reduction): Update calls accordingly. Use
13831 vec_info::lookup_def.
13832 (vect_is_simple_reduction): Likewise
13833 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
13835 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13837 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
13838 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
13839 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
13841 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
13842 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
13843 (vect_update_vf_for_slp, vect_analyze_loop_operations)
13844 (vect_is_slp_reduction, vectorizable_induction)
13845 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
13846 * tree-vect-patterns.c (vect_init_pattern_stmt):
13847 (vect_determine_min_output_precision_1, vect_determine_precisions)
13848 (vect_pattern_recog): Likewise.
13849 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
13850 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
13851 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
13852 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13853 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
13854 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
13855 info field from a loop to a loop_vec_info.
13857 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13859 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
13860 (vec_info::add_stmt): Declare.
13861 * tree-vectorizer.c (vec_info::add_stmt): New function.
13862 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
13863 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
13864 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13865 (vectorizable_induction): Likewise.
13866 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
13867 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13868 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
13869 (vectorizable_load): Likewise.
13870 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13871 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
13872 (vect_recog_gather_scatter_pattern): Likewise.
13873 (append_pattern_def_seq): Likewise. Remove a check that is
13874 performed by add_stmt itself.
13876 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13878 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
13879 which make_ssa_name was called with new_stmt before new_stmt
13882 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13884 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
13886 (vect_is_slp_reduction): ...here...
13887 (vect_is_simple_reduction): ...and here. Remove repetition of tests
13888 that are already known to be false.
13890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13892 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
13893 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
13894 STMT_VINFO_NUM_SLP_USES when it's true.
13895 (vect_free_slp_instance): Add a final_p parameter and pass it to
13896 vect_free_slp_tree.
13897 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
13898 (vect_analyze_slp_instance): Likewise.
13899 (vect_slp_analyze_operations): Likewise.
13900 (vect_slp_analyze_bb_1): Likewise.
13901 * tree-vectorizer.c (vec_info): Likewise.
13902 * tree-vect-loop.c (vect_transform_loop): Likewise.
13904 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13906 * tree-vect-loop.c (vectorizable_reduction): Assert that the
13907 function is not called for second and subsequent members of
13910 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13912 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
13913 cases for nested loops from here to ...
13914 (vect_create_epilog_for_reduction): ...here. Only call
13915 vect_is_simple_use for inner-loop reductions.
13917 2018-07-31 Martin Liska <mliska@suse.cz>
13919 PR gcov-profile/85338
13920 PR gcov-profile/85350
13921 PR gcov-profile/85372
13922 * profile.c (struct location_triplet): New.
13923 (struct location_triplet_hash): Likewise.
13924 (output_location): Do not output a BB that
13925 is already recorded for a line.
13926 (branch_prob): Use streamed_locations.
13928 2018-07-31 Martin Liska <mliska@suse.cz>
13930 PR gcov-profile/85370
13931 * coverage.c (coverage_begin_function): Do not mark target
13932 clones as artificial functions.
13934 2018-07-31 Martin Liska <mliska@suse.cz>
13936 PR gcov-profile/83813
13937 PR gcov-profile/84758
13938 PR gcov-profile/85217
13939 PR gcov-profile/85332
13940 * profile.c (branch_prob): Do not record GOTO expressions
13941 for GIMPLE statements which locations are already streamed.
13943 2018-07-31 Olivier Hainque <hainque@adacore.com>
13945 * gcc.c (handle_spec_function): Accept a soft_matched_part
13946 argument, as do_spec_1. Pass it down to ...
13947 (eval_spec_function): Accept a soft_matched_part argument,
13948 and pass it down to ...
13949 (do_spec_2): Accept a soft_matched_part argument, and pass
13950 it down to do_spec_1.
13951 (do_spec_1): Pass soft_matched_part to handle_spec_function.
13952 (handle_braces): Update call to handle_spec_function.
13953 (driver::set_up_specs): Update calls to do_spec_2.
13954 (compare_debug_dump_opt_spec_function): Likewise.
13955 (compare_debug_self_opt_spec_function): Likewise.
13957 2018-07-31 Olivier Hainque <hainque@adacore.com>
13959 * common.opt (nolibc): New option.
13960 * doc/invoke.texi (Link Options): Document it.
13961 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
13962 * config/alpha/linux.h: Likewise.
13963 * config/arc/elf.h: Likewise.
13964 * config/arm/uclinux-elf.h: Likewise.
13965 * config/arm/unknown-elf.h: Likewise.
13966 * config/avr/avrlibc.h: Likewise.
13967 * config/bfin/bfin.h: Likewise.
13968 * config/bfin/linux.h: Likewise.
13969 * config/bfin/uclinux.h: Likewise.
13970 * config/darwin.h: Likewise.
13971 * config/darwin10.h: Likewise.
13972 * config/darwin12.h: Likewise.
13973 * config/gnu-user.h: Likewise.
13974 * config/lm32/uclinux-elf.h: Likewise.
13975 * config/pa/pa-hpux11.h: Likewise.
13976 * config/pa/pa64-hpux.h: Likewise.
13977 * config/sparc/sparc.h: Likewise.
13979 2018-07-31 Olivier Hainque <hainque@adacore.com>
13981 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
13982 undefined variables.
13984 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
13987 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
13988 instead of GEN_INT.
13990 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13992 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
13993 terminated string literal.
13995 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
13997 PR rtl-optimization/85160
13998 * combine.c (is_just_move): New function.
13999 (try_combine): Allow combining two instructions into two if neither of
14000 the original instructions was a move.
14002 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
14005 * doc/extend.texi (Global Register Variables): Discourage use of type
14007 (Local Register Variables): Likewise.
14009 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
14011 PR tree-optimization/86506
14012 * hwint.h (ceil_log2): Resync with hwint.c implementation.
14014 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
14017 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
14018 hard_regno, make sure no insn between `from` and `to` clobbers it.
14020 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
14021 Tom de Vries <tdevries@suse.de>
14023 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
14024 (PTX_DEFAULT_RUNTIME_DIM): ... this.
14025 (nvptx_goacc_validate_dims): Set default worker and gang dims to
14026 PTX_DEFAULT_RUNTIME_DIM.
14027 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
14029 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
14031 * config/pa/pa.c (pa_output_addr_vec): Align address table.
14032 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
14033 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
14035 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
14037 * config/rs6000/constraints.md (wG constraint): Delete, no longer
14039 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
14040 predicate to reflect toc fusion has been deleted.
14041 (toc_fusion_mem_raw): Delete, no longer used.
14042 (toc_fusion_mem_wrapped): Likewise.
14043 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
14045 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
14046 Delete, no longer used.
14047 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
14048 meant to be used for toc fusion.
14049 (rs6000_debug_print_mode): Delete toc fusion debugging.
14050 (rs6000_debug_reg_global): Likewise.
14051 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
14052 fusion and secondary reload support that were never used.
14053 (rs6000_option_override_internal): Delete TOC fusion, that was only
14054 partially defined, and it did not work unless you also used the
14056 (rs6000_legitimate_address_p): Delete TOC fusion support.
14057 (rs6000_opt_masks): Likewise.
14058 (fusion_wrap_memory_address): Delete function, no longer used.
14059 (fusion_split_address); Delete TOC fusion support.
14060 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
14061 longer used with toc fusion being deleted.
14062 (TARGET_TOC_FUSION_FP): Likewise.
14063 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
14065 (toc fusion spliter): Delete TOC fusion support.
14066 (toc_fusionload_<mode>): Likewise.
14067 (toc_fusionload_di): Likewise.
14068 (fusion_gpr_load_<mode>): Delete generator function, this insn no
14069 longer needs to be named. Rename predicate to delete TOC fusion.
14070 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
14071 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
14072 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
14073 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
14074 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
14076 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
14078 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
14079 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
14080 __int128 in built-in function prototypes.
14081 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
14082 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
14084 2018-07-27 Martin Sebor <msebor@redhat.com>
14086 PR tree-optimization/86696
14087 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
14088 types, including enums.
14089 (handle_char_store): Be prepared for the above function to fail.
14091 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
14093 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
14094 when optimization level is lower than 2 or optimize for size.
14096 2018-07-26 Martin Sebor <msebor@redhat.com>
14098 PR tree-optimization/86043
14099 PR tree-optimization/86042
14100 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
14101 (get_string_cst_length): Rename...
14102 (get_min_string_length): ...to this. Add argument.
14103 (handle_char_store): Extend to handle multi-character stores by
14105 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
14106 * tree.h (initializer_zerop): Add argument.
14108 2018-07-26 Jakub Jelinek <jakub@redhat.com>
14110 PR middle-end/86660
14111 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
14112 declare target to variables if they have always,{to,from,tofrom} map
14115 2018-07-26 Martin Liska <mliska@suse.cz>
14118 * lto-wrapper.c: Add linker_output as prefix
14119 for ltrans_output_file.
14121 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
14123 PR rtl-optimization/85805
14124 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
14125 value for hard registers if that was written in the same mode.
14127 2018-07-26 Martin Liska <mliska@suse.cz>
14129 PR gcov-profile/86536
14130 * gcov.c (format_gcov): Use printf format %.*f directly
14131 and do not handle special values.
14133 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
14135 * common/config/arc/arc-common.c (arc_option_optimization_table):
14136 Update default optimizations for size.
14138 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
14140 * config/arc/arc.md (movsf_insn): Add short instruction selection.
14141 * config/arc/constraints.md (CfZ): New constraint.
14142 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
14143 (subsf3_fpu): Likewise.
14144 (cmpsf_fpu): Likewise.
14145 (cmpsf_fpu_uneq): Likewise.
14147 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
14149 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
14151 (arc_is_uncached_mem_p): uncached applies to both the variable and
14154 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
14156 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
14159 2018-07-25 David Malcolm <dmalcolm@redhat.com>
14161 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
14162 field "m_scopes" from vec to auto_vec.
14164 2018-07-25 Martin Liska <mliska@suse.cz>
14166 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
14169 2018-07-25 Richard Biener <rguenther@suse.de>
14172 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
14173 special wrt context_die late.
14174 (gen_subprogram_die): Re-use DIEs in local scope.
14176 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
14178 PR tree-optimization/86644
14179 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
14181 2018-07-25 Martin Liska <mliska@suse.cz>
14183 PR middle-end/86645
14184 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
14185 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
14187 2018-07-25 Martin Liska <mliska@suse.cz>
14190 * params.def: Explain ASan abbreviation and provide
14191 a documentation link.
14193 2018-07-24 Martin Sebor <msebor@redhat.com>
14195 PR tree-optimization/86622
14196 PR tree-optimization/86532
14197 * builtins.h (string_length): Declare.
14198 * builtins.c (c_strlen): Correct handling of non-constant offsets.
14199 (check_access): Be prepared for non-constant length ranges.
14200 (string_length): Make extern.
14201 * expr.c (string_constant): Only handle the minor non-constant
14202 array index. Use string_constant to compute the length of
14203 a generic string constant.
14205 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
14207 PR tree-optimization/86618
14208 * tree-vect-stmts.c (vectorizable_call): Don't take the address
14209 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
14211 2018-07-24 David Malcolm <dmalcolm@redhat.com>
14213 PR tree-optimization/86636
14214 * json.cc (json::object::set): Fix comment. Add assertions.
14215 (json::array::append): Move here from json.h. Add comment and an
14217 (json::string::string): Likewise.
14218 * json.h (json::array::append): Move to json.cc.
14219 (json::string::string): Likewise.
14220 * optinfo-emit-json.cc
14221 (optrecord_json_writer::impl_location_to_json): Assert that we
14222 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
14223 wrapper around it. Expand the location once, rather than three
14225 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
14226 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
14228 (optrecord_json_writer::optinfo_to_json): Likewise, in four
14229 places. Fix some overlong lines.
14231 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
14233 * config/aarch64/aarch64-simd.md
14234 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
14235 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
14236 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
14237 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
14238 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
14239 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
14240 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
14241 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
14242 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
14244 2018-07-24 Jakub Jelinek <jakub@redhat.com>
14246 PR middle-end/86627
14247 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
14248 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
14249 and abs_d == d, do the power of two handling if profitable.
14251 2018-07-24 Richard Biener <rguenther@suse.de>
14253 * match.pd: Add BIT_FIELD_REF canonicalizations.
14255 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
14258 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
14260 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
14262 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
14263 terminated STRING_CST object.
14265 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
14267 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
14269 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
14271 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
14272 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
14273 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
14274 the elements into a register.
14275 (rs6000_split_v4si_init_di_reg): Delete.
14276 (rs6000_split_v4si_init): Delete.
14277 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
14278 (vsx_init_v4si): Rewrite as a define_expand.
14280 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
14282 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
14283 zero_extend argument from memory): New.
14285 2018-07-22 Martin Sebor <msebor@redhat.com>
14288 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
14289 diagnosing calls with unknown arguments unless -Walloca-larger-than
14290 is restricted to less than PTRDIFF_MAX bytes.
14292 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
14294 * doc/gcov.texi (Invoking Gcov): Editorial changes.
14296 2018-07-20 David Malcolm <dmalcolm@redhat.com>
14298 * pretty-print.c (text_info::set_location): Remove redundant
14299 "line_table" parameter from call to rich_location::set_range.
14301 2018-07-20 Martin Sebor <msebor@redhat.com>
14303 PR middle-end/82063
14304 * builtins.c (expand_builtin_alloca): Adjust.
14305 * calls.c (alloc_max_size): Simplify.
14306 * cgraphunit.c (cgraph_node::expand): Adjust.
14307 * common.opt (larger_than_size, warn_frame_larger_than): Remove
14309 (frame_larger_than_size): Same.
14310 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
14311 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
14313 * doc/invoke.texi (GCC Command Options): Document option arguments.
14314 Explain byte-size arguments and suffixes.
14315 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
14316 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
14317 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
14318 * doc/options.texi (UInteger): Expand.
14319 (Host_Wide_Int, ByteSize): Document new properties.
14320 * final.c (final_start_function_1): Include sizes in an error message.
14321 * function.c (frame_offset_overflow): Same.
14322 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
14323 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
14324 Diagnose unbounded alloca calls only for limits of less than
14326 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
14327 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
14329 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
14330 only for limits of less than PTRDIFF_MAX.
14331 * langhooks-def.h (lhd_handle_option): Change function argument
14333 * langhooks.c (lhd_handle_option): Same.
14334 * langhooks.h (handle_option): Same.
14335 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
14337 (var_type, var_type_struct): Same.
14338 (var_set): Handle ByteSize flag.
14339 * optc-gen.awk: Add comments to output to ease debugging. Make
14340 use of HOST_WIDE_INT where appropriate.
14341 * opts-gen-save.awk: Use %lx to format unsigned long.
14342 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
14343 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
14344 arguments. Parse bytes-size suffixes.
14345 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
14346 (enum_value_to_arg): Same.
14347 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
14348 (handle_option): Adjust.
14349 (generate_option): Change function argument to HOST_WIDE_INT.
14350 (cmdline_handle_error): Adjust.
14351 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
14352 (set_option): Change function argument to HOST_WIDE_INT.
14353 (option_enabled): Handle cl_host_wide_int.
14354 (get_option_state): Handle CLVC_SIZE.
14355 (control_warning_option): Same.
14356 * opts.c (common_handle_option): Change function argument to
14357 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
14358 OPT_Wvla_larger_than_.
14359 * opts.h (enum cl_var_type): Add an enumerator.
14360 * stor-layout.c (layout_decl): Print a more meaningful warning.
14361 * toplev.c (output_stack_usage): Adjust.
14363 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
14365 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
14366 call to inline_expand_builtin_string_cmp.
14367 (expand_builtin_strcmp): Likewise.
14368 (expand_builtin_strncmp): Likewise.
14369 (inline_string_cmp): Delete the last parameter, change char_type_node
14370 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
14372 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
14373 the inlining expansion on target where the type of the call has same or
14374 narrower precision than unsigned char.
14376 2018-07-20 David Malcolm <dmalcolm@redhat.com>
14378 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
14379 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
14380 * common.opt (fsave-optimization-record): New option.
14381 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
14382 * doc/invoke.texi (-fsave-optimization-record): New option.
14383 * dumpfile.c: Include "optinfo-emit-json.h".
14384 (struct kv_pair): Move to coretypes.h.
14385 (optgroup_options): Make non-static.
14386 (dump_context::end_scope): Call
14387 optimization_records_maybe_pop_dump_scope.
14388 * dumpfile.h (optgroup_options): New decl.
14389 * json.cc: New file.
14390 * json.h: New file.
14391 * optinfo-emit-json.cc: New file.
14392 * optinfo-emit-json.h: New file.
14393 * optinfo.cc: Include "optinfo-emit-json.h".
14394 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
14395 (optinfo_enabled_p): Check optimization_records_enabled_p.
14396 (optinfo_wants_inlining_info_p): Likewise.
14397 * optinfo.h: Update comment.
14398 * profile-count.c (profile_quality_as_string): New function.
14399 * profile-count.h (profile_quality_as_string): New decl.
14400 (profile_count::quality): New accessor.
14401 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
14402 and optinfo_emit_json_cc_tests.
14403 * selftest.h (selftest::json_cc_tests): New decl.
14404 (selftest::optinfo_emit_json_cc_tests): New decl.
14405 * toplev.c: Include "optinfo-emit-json.h".
14406 (compile_file): Call optimization_records_finish.
14407 (do_compile): Call optimization_records_start.
14408 * tree-ssa-live.c: Include optinfo.h.
14409 (remove_unused_scope_block_p): Retain inlining information if
14410 optinfo_wants_inlining_info_p returns true.
14412 2018-07-20 Richard Biener <rguenther@suse.de>
14415 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
14416 to cover -flto-partition=none.
14418 2018-07-20 Martin Liska <mliska@suse.cz>
14420 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
14421 (get_decl_source_range): Remove unused function.
14423 2018-07-20 Richard Biener <rguenther@suse.de>
14425 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
14426 (struct vn_phi_s): Likewise.
14427 (struct vn_reference_s): Likewise.
14428 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
14429 for searching the slot of an entry known to be in the hash itself.
14430 (vn_phi_hasher::equal): Likewise.
14431 (vn_reference_hasher::equal): Likewise.
14432 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
14434 (optimistic_info, current_info): Remove, keeping only valid_info.
14435 (vn_reference_lookup_1): Remove fallback lookup.
14436 (vn_reference_lookup_2): Likewise.
14437 (vn_nary_op_lookup_1): Likewise.
14438 (vn_phi_lookup): Likewise.
14439 (vn_nary_build_or_lookup_1): Make sure to not chain the built
14441 (vn_reference_insert): Adjust, chain the inserted hash element
14442 at last_inserted_ref.
14443 (vn_reference_insert_pieces): Likewise.
14444 (visit_reference_op_call): Likewise.
14445 (vn_nary_op_insert_into): Chain the inserted hash element at
14446 last_inserted_nary.
14447 (vn_nary_op_insert_pieces): Adjust.
14448 (vn_nary_op_insert): Likewise.
14449 (vn_nary_op_insert_stmt): Likewise.
14450 (vn_phi_insert): Adjust, chain the inserted hash element at
14452 (process_scc): Remove clearing and copying the optimistic
14453 table. Instead remove elements inserted during an optimistic
14454 iteration from the single table we maintain.
14455 (init_scc_vn): Adjust.
14456 (free_scc_vn): Likewise.
14457 (sccvn_dom_walker::record_cond): Likewise.
14458 (sccvn_dom_walker::after_dom_children): Likewise.
14460 2018-07-19 Martin Sebor <msebor@redhat.com>
14462 PR tree-optimization/84047
14463 PR tree-optimization/83776
14464 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
14465 (check_array_bounds): Call it.
14467 2018-07-19 Martin Sebor <msebor@redhat.com>
14469 * align.h (align_flags): Use member initialization.
14471 2018-07-19 David Malcolm <dmalcolm@redhat.com>
14473 * Makefile.in (OBJS): Add optinfo.o.
14474 * coretypes.h (class symtab_node): New forward decl.
14475 (struct cgraph_node): New forward decl.
14476 (class varpool_node): New forward decl.
14477 * dump-context.h: New file.
14478 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
14480 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
14481 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
14482 (set_alt_dump_file): Likewise.
14483 (dump_context::~dump_context): New dtor.
14484 (dump_gimple_stmt): Move implementation to...
14485 (dump_context::dump_gimple_stmt): ...this new member function.
14486 Add the stmt to any pending optinfo, creating one if need be.
14487 (dump_gimple_stmt_loc): Move implementation to...
14488 (dump_context::dump_gimple_stmt_loc): ...this new member function.
14489 Start a new optinfo and add the stmt to it.
14490 (dump_gimple_expr): Move implementation to...
14491 (dump_context::dump_gimple_expr): ...this new member function.
14492 Add the stmt to any pending optinfo, creating one if need be.
14493 (dump_gimple_expr_loc): Move implementation to...
14494 (dump_context::dump_gimple_expr_loc): ...this new member function.
14495 Start a new optinfo and add the stmt to it.
14496 (dump_generic_expr): Move implementation to...
14497 (dump_context::dump_generic_expr): ...this new member function.
14498 Add the tree to any pending optinfo, creating one if need be.
14499 (dump_generic_expr_loc): Move implementation to...
14500 (dump_context::dump_generic_expr_loc): ...this new member
14501 function. Add the tree to any pending optinfo, creating one if
14503 (dump_printf): Move implementation to...
14504 (dump_context::dump_printf_va): ...this new member function. Add
14505 the text to any pending optinfo, creating one if need be.
14506 (dump_printf_loc): Move implementation to...
14507 (dump_context::dump_printf_loc_va): ...this new member function.
14508 Start a new optinfo and add the stmt to it.
14509 (dump_dec): Move implementation to...
14510 (dump_context::dump_dec): ...this new member function. Add the
14511 value to any pending optinfo, creating one if need be.
14512 (dump_context::dump_symtab_node): New member function.
14513 (dump_context::get_scope_depth): New member function.
14514 (dump_context::begin_scope): New member function.
14515 (dump_context::end_scope): New member function.
14516 (dump_context::ensure_pending_optinfo): New member function.
14517 (dump_context::begin_next_optinfo): New member function.
14518 (dump_context::end_any_optinfo): New member function.
14519 (dump_context::s_current): New global.
14520 (dump_context::s_default): New global.
14521 (dump_scope_depth): Delete global.
14522 (dumpfile_ensure_any_optinfo_are_flushed): New function.
14523 (dump_symtab_node): New function.
14524 (get_dump_scope_depth): Reimplement in terms of dump_context.
14525 (dump_begin_scope): Likewise.
14526 (dump_end_scope): Likewise.
14527 (selftest::temp_dump_context::temp_dump_context): New ctor.
14528 (selftest::temp_dump_context::~temp_dump_context): New dtor.
14529 (selftest::verify_item): New function.
14530 (ASSERT_IS_TEXT): New macro.
14531 (ASSERT_IS_TREE): New macro.
14532 (ASSERT_IS_GIMPLE): New macro.
14533 (selftest::test_capture_of_dump_calls): New test.
14534 (selftest::dumpfile_c_tests): Call it.
14535 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
14536 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
14537 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
14538 descriptive comment.
14539 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
14540 (dump_node, dump_bb): Move these unrelated decls.
14541 (class dump_manager): Add leading comment.
14542 * optinfo.cc: New file.
14543 * optinfo.h: New file.
14545 2018-07-19 Michael Collison <michael.collison@arm.com>
14546 Richard Henderson <rth@redhat.com>
14548 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
14549 (subti): Handle op1 zero.
14550 (subvti4, usub4ti4): New.
14551 (*sub<GPI>3_compare1_imm): New.
14552 (sub<GPI>3_carryinCV): New.
14553 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
14554 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
14556 2018-07-19 Michael Collison <michael.collison@arm.com>
14557 Richard Henderson <rth@redhat.com>
14559 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
14560 (addti3): Create simpler code if low part is already known to be 0.
14561 (addvti4, uaddvti4): New.
14562 (*add<GPI>3_compareC_cconly_imm): New.
14563 (*add<GPI>3_compareC_cconly): New.
14564 (*add<GPI>3_compareC_imm): New.
14565 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
14566 handle constants within this pattern..
14567 (*add<GPI>3_compareV_cconly_imm): New.
14568 (*add<GPI>3_compareV_cconly): New.
14569 (*add<GPI>3_compareV_imm): New.
14570 (add<GPI>3_compareV): New.
14571 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
14572 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
14573 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
14574 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
14575 with 'comparison' operator.
14576 (*add<GPI>3_compareV_cconly_imm): Ditto.
14577 (*add<GPI>3_compareV_cconly): Ditto.
14578 (*add<GPI>3_compareV_imm): Ditto.
14579 (add<GPI>3_compareV): Ditto.
14580 (add<mode>3_carryinC): Ditto.
14581 (*add<mode>3_carryinC_zero): Ditto.
14582 (*add<mode>3_carryinC): Ditto.
14583 (add<mode>3_carryinV): Ditto.
14584 (*add<mode>3_carryinV_zero): Ditto.
14585 (*add<mode>3_carryinV): Ditto.
14587 2018-07-19 Michael Collison <michael.collison@arm.com>
14588 Richard Henderson <rth@redhat.com>
14590 * config/aarch64/aarch64-modes.def (CC_V): New.
14591 * config/aarch64/aarch64-protos.h
14592 (aarch64_addti_scratch_regs): Declare
14593 (aarch64_subvti_scratch_regs): Declare.
14594 (aarch64_expand_subvti): Declare.
14595 (aarch64_gen_unlikely_cbranch): Declare
14596 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
14597 for signed overflow using CC_Vmode.
14598 (aarch64_get_condition_code_1): Handle CC_Vmode.
14599 (aarch64_gen_unlikely_cbranch): New function.
14600 (aarch64_addti_scratch_regs): New function.
14601 (aarch64_subvti_scratch_regs): New function.
14602 (aarch64_expand_subvti): New function.
14604 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
14606 * config/aarch64/aarch64-option-extensions.def: New entry for profile
14608 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
14609 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
14612 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
14615 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14616 address check not strict.
14618 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
14620 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
14622 (store_pair_lanes<mode>): Likewise.
14623 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
14624 enum value 'ADDR_QUERY_LDP_STP_N'.
14625 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
14626 (aarch64_print_address_internal): Add declaration.
14627 (aarch64_print_ldpstp_address): Remove.
14628 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
14629 (aarch64_print_operand): Change printing of 'y'.
14630 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
14631 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
14632 'true' rather than '1'.
14633 * config/aarch64/constraints.md (Uml): Likewise.
14634 (Uml): Rename to Umn.
14637 2018-07-19 Richard Biener <rguenther@suse.de>
14639 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
14641 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
14642 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
14643 (vn_reference_hasher): Likewise.
14644 (struct vn_tables_s): Remove obstack and alloc-pool members.
14645 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
14646 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
14647 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
14648 (vn_reference_insert_pieces): Likewise.
14649 (alloc_vn_nary_op_noinit): Adjust.
14650 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
14651 (vn_phi_eq): Adjust.
14652 (shared_lookup_phiargs): Remove.
14653 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
14654 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
14655 (visit_reference_op_call): Likewise.
14656 (copy_nary, copy_phi, copy_reference): Remove.
14657 (process_scc): Rewind the obstack when iterating. Do not
14658 copy the elements to valid_info but just move them from one
14659 hashtable to the other.
14660 (allocate_vn_table): Adjust.
14661 (free_vn_table): Likewise.
14662 (init_scc_vn): Likewise.
14663 (free_scc_vn): Likewise.
14665 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
14668 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
14669 indirect_return as function type attribute.
14670 (ix86_attribute_table): Change indirect_return to function
14672 * doc/extend.texi: Update indirect_return attribute.
14674 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
14676 * wide-int.h (widest2_int): New.
14677 * gimple-fold.c (arith_overflowed_p): Use it.
14678 * tree.h (widest2_int_cst): New.
14679 * tree-vrp.c (wide_int_binop_overflow): Rename from
14680 vrp_int_const_binop.
14681 Rewrite to work on trees.
14682 (extract_range_from_multiplicative_op_1): Abstract code to...
14683 (wide_int_range_min_max): ...here.
14684 (wide_int_range_cross_product): ...and here.
14685 (extract_range_from_binary_expr_1): Abstract overflow code to...
14686 (wide_int_range_mult_wrapping): ...here.
14687 * tree-vrp.h (wide_int_range_cross_product): New.
14688 (wide_int_range_mult_wrapping): New.
14690 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
14691 Julia Koval <julia.koval@intel.com>
14693 * config/i386/x86-tune-costs.h (skylake_memcpy,
14694 skylake_memset): Replace rep_prefix with unrolling for size 512.
14696 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
14698 PR middle-end/86544
14699 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
14700 comparision with EQ_EXPR in last stmt.
14702 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
14704 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
14705 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
14706 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
14707 previously known as "PowerPC AltiVec Built-in Functions". Move
14708 some material to new subsubsections "PowerPC AltiVec Built-in
14709 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
14711 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
14712 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
14713 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
14714 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
14716 2018-07-18 Richard Biener <rguenther@suse.de>
14718 PR tree-optimization/86557
14719 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
14722 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
14724 * config/s390/s390.c (s390_function_profiler): Generate CFI.
14726 2018-07-17 Jeff Law <law@redhat.com>
14728 * config/arm/arm.c (get_label_padding): Update for recent
14729 changes to label_to_alignment.
14731 PR tree-optimization/86010
14732 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
14734 * config/mips/mips.c (vr4130_align_insns): Update for recent
14735 changes to label_to_alignment.
14737 * config/frv/frv.c (frv_label_align): Update for recent changes
14738 to label_to_alignment.
14740 * config/nios2/nios2.c (nios2_label_align): Update for recent
14741 changes which dropped ALIGN_LABELS_LOG.
14743 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
14745 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
14746 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
14748 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
14750 * config/arc/arc.c (arc_label_align): Use align_labels instead of
14751 deprecated align_labels_log.
14753 2018-07-17 Richard Biener <rguenther@suse.de>
14756 * dwarf2out.c (init_sections_and_labels): Always generate
14757 a debug_line_str_section for early LTO debug.
14758 (dwarf2out_finish): Reset debug_line_str_hash output early.
14759 Bump counter for extra dwarf5 .debug_loc labels to not conflict
14761 (dwarf2out_early_finish): Output debug_line_str.
14763 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
14765 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
14766 index register on z196 or later.
14768 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
14770 * config/s390/s390.c (s390_default_align): Set default function
14772 (s390_override_options_after_change): Call s390_default align.
14773 (s390_option_override_internal): Call s390_default_align.
14774 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
14776 2018-07-17 Jakub Jelinek <jakub@redhat.com>
14778 PR middle-end/86542
14779 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
14780 to _looptemp_ clauses, other than the first two.
14782 2018-07-17 Martin Liska <mliska@suse.cz>
14784 * opts.c: Do not enable OPT_falign_* for -Os.
14786 2018-07-17 Martin Liska <mliska@suse.cz>
14788 * align.h (MAX_CODE_ALIGN): New.
14789 (MAX_CODE_ALIGN_VALUE): New.
14790 * common/config/i386/i386-common.c (ix86_handle_option):
14791 (MAX_CODE_ALIGN): Moved to align.h.
14792 * final.c (MAX_CODE_ALIGN): Likewise.
14793 * opts.c (parse_and_check_align_values):
14794 (MAX_CODE_ALIGN): Likewise.
14795 (MAX_CODE_ALIGN_VALUE): Likewise.
14797 2018-07-17 Martin Liska <mliska@suse.cz>
14799 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
14800 in order to fulfil coding style.
14801 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
14802 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14803 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14804 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
14805 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
14806 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
14807 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
14808 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
14809 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14811 2018-07-17 Martin Liska <mliska@suse.cz>
14813 * align.h: New file.
14814 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
14816 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
14817 align_flags of label_to_alignment.
14818 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
14820 * config/m68k/m68k.c: Do not use removed align_labels_value and
14822 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
14823 (LOOP_ALIGN): Likewise.
14824 (LABEL_ALIGN): Likewise.
14825 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14826 Remove not used macro.
14827 (rs6000_loop_align): Change return type to align_flags.
14828 (rs6000_loop_align_max_skip): Remove.
14829 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
14830 Change return type to align_flags.
14831 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14832 Remove not used macro.
14833 (rs6000_loop_align): Change return type to align_flags.
14834 (rs6000_loop_align_max_skip): Remove.
14835 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
14836 * config/rx/rx-protos.h (rx_align_for_label): Make it
14838 * config/rx/rx.c (rx_align_for_label): Change return type
14840 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
14842 into align_flags class.
14843 (LABEL_ALIGN): Likewise.
14844 (LOOP_ALIGN): Likewise.
14845 * config/s390/s390.c (s390_label_align): Use align_flags
14847 (s390_asm_output_function_label): Likewise.
14848 * config/sh/sh.c (sh_override_options_after_change):
14849 Use align_flags class directly without macros.
14850 (find_barrier): Likewise.
14851 (barrier_align): Likewise.
14852 (sh_loop_align): Likewise.
14853 * config/spu/spu.c (spu_option_override):
14854 Use align_flags_tuple::get_value instead of removed macros.
14855 (spu_sched_init): Likewise.
14856 * config/spu/spu.h (GTY): Likewise.
14857 * config/visium/visium.c (visium_option_override):
14858 Set "8" as default secondary alignment.
14859 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
14860 in order to guarantee secondary alignment of 8.
14861 * coretypes.h: Include align.h header file.
14862 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
14863 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
14864 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
14865 * doc/tm.texi.in: Likewise.
14866 * final.c (struct label_alignment): Remove not used structure.
14867 (LABEL_ALIGN): Change type to align_flags.
14868 (LOOP_ALIGN): Likewise.
14869 (JUMP_ALIGN): Likewise.
14870 (default_loop_align_max_skip): Remove.
14871 (default_label_align_max_skip): Likewise.
14872 (default_jump_align_max_skip): Likewise.
14873 (default_label_align_after_barrier_max_skip):
14874 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
14875 (LABEL_TO_MAX_SKIP): Remove.
14876 (label_to_alignment): Return align_flags type instead of integer.
14877 (label_to_max_skip): Remove.
14878 (align_fuzz): Use align_flags type.
14879 (compute_alignments): Use align_flags type and use align_flags::max
14880 to combine multiple alignments.
14881 (grow_label_align): Grow vec instead of C array.
14882 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
14883 (shorten_branches): Use align_flags type and use align_flags::max
14884 to combine multiple alignments.
14885 (final_scan_insn_1): Remove usage of secondary alignment that comes
14886 from label alignment, but instead use proper secondary alignment
14887 which is computed in grow_label_align.
14888 * flags.h (struct align_flags_tuple): Move to align.h.
14889 (struct align_flags): Likewise.
14890 (state_align_loops): Rename to align_loops.
14891 (state_align_jumps): Rename to align_jumps.
14892 (state_align_labels): Rename to align_labels.
14893 (state_align_functions): Rename to align_functions.
14894 (align_loops_log): Remove.
14895 (align_jumps_log): Remove.
14896 (align_labels_log): Remove.
14897 (align_functions_log): Remove.
14898 (align_loops_max_skip): Remove.
14899 (align_jumps_max_skip): Remove.
14900 (align_labels_max_skip): Remove.
14901 (align_functions_max_skip): Remove.
14902 (align_loops_value): Remove.
14903 (align_jumps_value): Remove.
14904 (align_labels_value): Remove.
14905 (align_functions_value): Remove.
14906 * output.h (label_to_alignment): Change return type to align_flags.
14907 (label_to_max_skip): Remove.
14908 * target.def: Remove loop_align_max_skip, label_align_max_skip,
14909 jump_align_max_skip macros.
14910 * targhooks.h (default_loop_align_max_skip): Remove.
14911 (default_label_align_max_skip): Likewise.
14912 (default_jump_align_max_skip): Likewise.
14913 (default_label_align_after_barrier_max_skip): Remove.
14914 * toplev.c (read_log_maxskip): Use ::normalize function.
14915 (parse_N_M): Remove not used argument and also call ::normalize.
14916 (parse_alignment_opts): Do not pass unused arguments.
14917 * varasm.c (assemble_start_function): Use directly align_functions
14918 instead of removed macros.
14919 * system.h: Do not poison removed macros.
14921 2018-07-17 Jakub Jelinek <jakub@redhat.com>
14923 PR middle-end/86539
14924 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
14925 and cond temporaries don't have reference type if iterator has
14926 pointer type. For init use &for_pre_body instead of pre_p if
14927 for_pre_body is non-empty.
14929 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14931 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
14932 double-double modes to SFmode directly directly.
14933 (trunc<mode>sf2_fprs): Delete.
14935 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14937 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
14938 for conversions between IFmode and the decimal floating point modes.
14939 (init_float128_ieee): Use the correct names for conversions between
14940 KFmode and the decimal floating point modes.
14942 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14944 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
14945 for the conversions between TDmode and IFmode.
14946 (init_float128_ieee): Use more correct names for the conversions
14947 between TDmode and KFmode.
14949 2018-07-16 Jakub Jelinek <jakub@redhat.com>
14951 PR tree-optimization/86526
14952 * builtins.c (expand_builtin_memcmp): Formatting fixes.
14953 (inline_expand_builtin_string_cmp): Likewise.
14954 (inline_string_cmp): Likewise. Use c_readstr instead of
14955 builtin_memcpy_read_str. Add unit_mode temporary.
14957 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
14959 PR middle-end/86528
14960 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
14961 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
14963 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
14965 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
14966 Alphabetize prototypes of built-in functions, separating out
14967 built-in functions that are listed in this section but should be
14968 described elsewhere.
14970 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
14973 * expmed.c (emit_store_flag): Do not emit setcc followed by a
14974 conditional move when trapping comparison was split to a
14975 non-trapping one (and vice versa).
14977 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14979 * config/s390/s390.c (s390_function_profiler): Generate nops
14980 instead of profiler call sequences.
14981 * config/s390/s390.opt: Add the new option.
14983 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14985 * config/s390/s390.c (s390_function_profiler): Generate
14986 __mcount_loc section.
14987 * config/s390/s390.opt: Add the new option.
14989 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14991 * common.opt: Add the new warning.
14992 * config/s390/s390.c (s390_function_profiler): Emit "brasl
14993 %r0,__fentry__" when -mfentry is specified.
14994 (s390_option_override_internal): Disallow -mfentry for 31-bit
14996 * config/s390/s390.opt: Add the new option.
14998 2018-07-16 Richard Biener <rguenther@suse.de>
15001 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
15002 for function-local FUNCTION_DECL and RESULT_DECL immediately.
15004 2018-07-16 Martin Liska <mliska@suse.cz>
15007 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
15010 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
15012 * config/arc/arcHS.md: Update ARCHS scheduling rules.
15014 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
15016 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
15018 * config/arc/arc-cpus.def (hs4x): New cpu.
15020 * config/arc/arc-tables.opt: Regenerate.
15021 * config/arc/arc.c (arc_sched_issue_rate): New function.
15022 (TARGET_SCHED_ISSUE_RATE): Define.
15023 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
15024 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
15026 (attr tune): Add ARCHS4x tune values.
15027 (attr tune_dspmpy): Define.
15028 (*tst): Correct instruction type.
15029 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
15030 * config/arc/arcHS4x.md: New file.
15031 * config/arc/fpu.md: Update instruction type attributes.
15032 * config/arc/t-multilib: Regenerate.
15034 2018-07-16 Tom de Vries <tdevries@suse.de>
15037 * var-tracking.c (vt_initialize): Fix pre_dec handling.
15039 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
15041 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
15044 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
15046 PR tree-optimization/86514
15047 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
15048 conversion to a boolean type from a type with greater precision.
15050 2018-07-16 Tom de Vries <tdevries@suse.de>
15052 * var-tracking.c (vt_initialize): Print adjusted insn slim if
15053 dump_flags request TDF_SLIM.
15055 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
15057 * fold-const.c (int_const_binop_1): Abstract...
15058 (wide_int_binop): ...wide int code here.
15059 (poly_int_binop): ...poly int code here.
15060 Abstract the rest of int_const_binop_1 into int_const_binop.
15061 * fold-const.h (wide_int_binop): New.
15062 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
15063 Remove useless PLUS/MINUS_EXPR case.
15064 (zero_nonzero_bits_from_vr): Move wide int code...
15065 (zero_nonzero_bits_from_bounds): ...here.
15066 (extract_range_from_binary_expr_1): Move mask optimization code...
15067 (range_easy_mask_min_max): ...here.
15068 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
15069 (range_easy_mask_min_max): New.
15071 2018-07-15 Jeff Law <law@redhat.com>
15074 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
15077 2018-07-14 Jim Wilson <jimw@sifive.com>
15079 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
15081 2018-07-14 Paul Koning <ni1d@arrl.net>
15083 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
15085 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
15087 * lto-streamer-out.c (copy_function_or_variable): Dump info about
15090 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
15091 Steve Munroe <munroesj52@gmail.com>
15093 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
15094 (_mm_andnot_si128): Likewise.
15095 (_mm_or_si128): Likewise.
15096 (_mm_xor_si128): Likewise.
15098 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
15100 PR middle-end/78809
15101 * builtins.c (expand_builtin_memcmp): Inline the calls first
15102 when result_eq is false.
15103 (expand_builtin_strcmp): Inline the calls first.
15104 (expand_builtin_strncmp): Likewise.
15105 (inline_string_cmp): New routine. Expand a string compare
15106 call by using a sequence of char comparison.
15107 (inline_expand_builtin_string_cmp): New routine. Inline expansion
15108 a call to str(n)cmp/memcmp.
15109 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
15111 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
15113 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
15115 * config/arm/driver-arm.c: Include arm-native.h.
15116 (host_detect_local_cpu): Use auto-generated data tables.
15117 (vendors, arm_cpu_table): Delete. Move part information to ...
15118 * config/arm/arm-cpus.in: ... here.
15119 * config/arm/parsecpu.awk (gen_native): New function.
15120 (vendor, part): New CPU fields.
15121 (END): Add support for building the native CPU detection tables.
15122 * config/arm/t-arm (arm-native.h): Add build rule.
15123 (driver-arm.o): Add dependency on arm-native.h.
15125 2018-07-13 Richard Biener <rguenther@suse.de>
15127 PR middle-end/85974
15128 * match.pd (addr1 - addr2): Allow either of the operand to
15131 2018-07-13 Tom de Vries <tdevries@suse.de>
15133 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
15136 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
15138 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
15139 arrays instead of numbered variables.
15141 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
15143 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
15144 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
15146 2018-07-13 Richard Biener <rguenther@suse.de>
15149 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
15150 instead of get_context_die.
15152 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
15153 Richard Biener <rguenther@suse.de>
15155 PR middle-end/86489
15156 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
15157 that the loop latch destination where phi is defined.
15159 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
15161 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
15162 (riscv_expand_epilogue): Add assertion to check interrupt mode.
15163 (riscv_set_current_function): Extract getting interrupt type to new
15165 (riscv_get_interrupt_type): New function.
15166 (riscv_merge_decl_attributes): New function, checking interrupt type is
15168 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
15170 2018-07-12 Paul Koning <ni1d@arrl.net>
15172 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
15175 2018-07-12 Paul Koning <ni1d@arrl.net>
15177 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
15178 zero reference, add doloop_end instead.
15179 * doc/md.texi (decrement_and_branch_until_zero): Remove.
15180 (Looping patterns): Remove decrement_and_branch_until_zero. Add
15181 detail for doloop_end.
15183 2018-07-12 Martin Sebor <msebor@redhat.com>
15186 * attribs.c (decl_attributes): Reject conflicting attributes before
15187 calling attribute handlers.
15189 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
15191 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
15193 (gcc::dump_manager::get_dump_file_name): likewise.
15194 (dump_begin): Likewise.
15195 * dumpfile.h (dump_begin): Update prototype.
15196 (gcc::dump_manager::get_dump_file_name,
15197 gcc::dump_manager::get_dump_file_name): Update prototype.
15199 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15201 * internal-fn.h (vectorizable_internal_fn_p): New function.
15202 * tree-vect-slp.c (compatible_calls_p): Likewise.
15203 (vect_build_slp_tree_1): Remove nops argument. Handle calls
15204 to internal functions.
15205 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
15207 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15209 * fold-const.h (inverse_conditions_p): Declare.
15210 * fold-const.c (inverse_conditions_p): New function.
15211 * match.pd: Use inverse_conditions_p. Add folds of view_converts
15212 that test the inverse condition of a conditional internal function.
15213 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
15214 * internal-fn.c (internal_fn_mask_index): Handle conditional
15215 internal functions.
15216 (vectorized_internal_fn_supported_p): New function.
15217 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
15218 (any_pred_load_store): Replace with...
15219 (need_to_predicate): ...this new variable.
15220 (redundant_ssa_names): New variable.
15221 (ifcvt_can_use_mask_load_store): Move initial checks to...
15222 (ifcvt_can_predicate): ...this new function. Handle tree codes
15223 for which a conditional internal function exists.
15224 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
15225 instead of ifcvt_can_use_mask_load_store. Update after variable
15227 (predicate_load_or_store): New function, split out from
15228 predicate_mem_writes.
15229 (check_redundant_cond_expr): New function.
15230 (value_available_p): Likewise.
15231 (predicate_rhs_code): Likewise.
15232 (predicate_mem_writes): Rename to...
15233 (predicate_statements): ...this. Use predicate_load_or_store
15234 and predicate_rhs_code.
15235 (combine_blocks, tree_if_conversion): Update after above name changes.
15236 (ifcvt_local_dce): Handle redundant_ssa_names.
15237 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
15238 general conditional functions.
15239 * tree-vect-stmts.c (vectorizable_call): Likewise.
15241 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15242 Alan Hayward <alan.hayward@arm.com>
15243 David Sherwood <david.sherwood@arm.com>
15245 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
15246 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
15247 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
15248 plus and minus and convert them into IFN_COND_FMA-based sequences.
15249 (convert_mult_to_fma): Handle conditional plus and minus.
15251 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15253 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
15254 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
15255 (cond_fnms_optab): New optabs.
15256 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
15257 internal functions.
15258 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
15259 * internal-fn.h (get_conditional_internal_fn): Declare.
15260 (get_unconditional_internal_fn): Likewise.
15261 * internal-fn.c (cond_ternary_direct): New macro.
15262 (expand_cond_ternary_optab_fn): Likewise.
15263 (direct_cond_ternary_optab_supported_p): Likewise.
15264 (FOR_EACH_COND_FN_PAIR): Likewise.
15265 (get_conditional_internal_fn): New function.
15266 (get_unconditional_internal_fn): Likewise.
15267 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
15268 (gimple_match_op::gimple_match_op): Add a new overload for 5
15270 (gimple_match_op::set_op): Likewise.
15271 (gimple_resimplify5): Declare.
15272 * genmatch.c (decision_tree::gen): Generate simplifications for
15274 * gimple-match-head.c (gimple_simplify): Define an overload for
15275 5 operands. Handle calls with 5 arguments in the top-level overload.
15276 (convert_conditional_op): Handle conversions from unconditional
15277 internal functions to conditional ones.
15278 (gimple_resimplify5): New function.
15279 (build_call_internal): Pass a fifth operand.
15280 (maybe_push_res_to_seq): Likewise.
15281 (try_conditional_simplification): Try converting conditional
15282 internal functions to unconditional internal functions.
15283 Handle 3-operand unconditional forms.
15284 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
15285 Define ternary equivalents of the current rules for binary conditional
15286 internal functions.
15287 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
15288 ternary operations.
15289 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
15290 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
15291 (optab): Handle them.
15292 (SVE_COND_FP_TERNARY): New int iterator.
15293 (sve_fmla_op, sve_fmad_op): New int attributes.
15294 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
15295 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
15296 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
15298 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
15300 * target.def (preferred_else_value): New target hook.
15301 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
15302 * doc/tm.texi: Regenerate.
15303 * targhooks.h (default_preferred_else_value): Declare.
15304 * targhooks.c (default_preferred_else_value): New function.
15305 * internal-fn.h (conditional_internal_fn_code): Declare.
15306 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
15307 (get_conditional_internal_fn): Use it.
15308 (conditional_internal_fn_code): New function.
15309 * gimple-match.h (gimple_match_cond): New struct.
15310 (gimple_match_op): Add a cond member function.
15311 (gimple_match_op::gimple_match_op): Update all forms to take a
15313 * genmatch.c (expr::gen_transform): Use the same condition as res_op
15314 for the suboperation, but don't specify a particular else_value.
15315 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
15316 (visit_nary_op, visit_reference_op_load): Pass
15317 gimple_match_cond::UNCOND to the gimple_match_op constructor.
15318 * gimple-match-head.c: Include tree-eh.h
15319 (convert_conditional_op): New function.
15320 (maybe_resimplify_conditional_op): Likewise.
15321 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
15322 (gimple_resimplify2): Likewise.
15323 (gimple_resimplify3): Likewise.
15324 (gimple_resimplify4): Likewise.
15325 (maybe_push_res_to_seq): Return null for conditional operations.
15326 (try_conditional_simplification): New function.
15327 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
15329 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
15331 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
15333 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
15335 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
15337 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15339 (hash_tree): Do not hash DECL_FCONTEXT
15340 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
15341 Do not stream DECL_FCONTEXT.
15342 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
15343 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
15345 2018-07-12 Richard Biener <rguenther@suse.de>
15348 * dwarf2out.c (gen_block_die): Only output blocks when they have
15349 at least one !DECL_IGNORED_P variable.
15351 2018-07-12 Richard Biener <rguenther@suse.de>
15354 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
15355 Remove -mieee-fp handling.
15357 2018-07-12 Richard Biener <rguenther@suse.de>
15359 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
15360 left-over from last patch.
15362 2018-07-12 Jakub Jelinek <jakub@redhat.com>
15364 PR tree-optimization/86492
15365 * gimple-ssa-store-merging.c
15366 (imm_store_chain_info::coalesce_immediate_stores): Call
15367 check_no_overlap even for the merge_overlapping case. Formatting fix.
15369 2018-07-12 Richard Biener <rguenther@suse.de>
15371 PR middle-end/86479
15372 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
15373 move possibly trapping operations into the conditional.
15375 2018-07-12 Richard Biener <rguenther@suse.de>
15377 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
15378 (vn_lookup_simplify_result): Remove recursion limit applied
15380 (vn_nary_build_or_lookup_1): Adjust.
15381 (try_to_simplify): Likewise.
15382 * gimple-match-head.c (gimple_resimplify1): Instead apply one
15384 (gimple_resimplify2): Likewise.
15385 (gimple_resimplify3): Likewise.
15386 (gimple_resimplify4): Likewise.
15388 2018-07-11 Jakub Jelinek <jakub@redhat.com>
15390 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
15391 Use __mmask64 type instead of __mmask8 for __M argument.
15392 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
15393 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
15395 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
15396 __mmask16 for __M argument.
15397 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
15398 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
15399 to __mmask16 instead of __mmask8.
15400 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
15401 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
15402 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
15403 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
15404 instead of __mmask16 for __U argument.
15405 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
15406 __mmask16 instead of __mmask8 for __U argument.
15407 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
15409 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
15411 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
15413 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
15415 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
15417 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
15419 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
15421 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
15423 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
15425 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
15427 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
15428 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
15429 return type as well as __M argument type and all casts from __mmask8
15431 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
15432 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
15433 return type as well as __M argument type and all casts from __mmask8
15435 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
15436 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
15437 return type as well as __M argument type and all casts from __mmask8
15439 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
15440 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
15441 return type as well as __M argument type and all casts from __mmask8
15443 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
15444 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
15447 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
15449 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
15450 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
15453 2018-07-11 Paul Koning <ni1d@arrl.net>
15455 * doc/md.texi (define_subst): Document how multiple occurrences of
15456 the same argument in the replacement pattern are handled.
15458 2018-07-11 Paul Koning <ni1d@arrl.net>
15460 * doc/extend.texi (Common Variable Attributes): Move "mode" into
15461 alphabetical order.
15462 (Common Type Attributes): Add "mode" attribute.
15464 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
15466 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
15467 stream DECL_ORIGINAL_TYPE.
15468 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
15469 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
15470 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
15471 Do not walk original type.
15472 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
15474 (write_ts_decl_non_common_tree_pointers): Do not stream
15476 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
15477 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
15479 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
15481 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
15482 thread twice from the same starting edge.
15484 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
15486 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
15487 * gimple.c (gimple_call_nonnull_result_p): ...here...
15488 (gimple_call_nonnull_arg): ...and here.
15489 * gimple.h (gimple_call_nonnull_result_p): New.
15490 (gimple_call_nonnull_arg): New.
15492 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
15494 * config/arm/arm-cpus.in: Move information from fpu field of each
15495 cpu definition to the isa field.
15496 * config/arm/parsecpu.awk (fpu): Delete match rule.
15497 (gen_comm_data): Don't add bits from the CPU's FPU entry.
15499 2018-07-11 Richard Biener <rguenther@suse.de>
15502 * dwarf2out.c (init_sections_and_labels): Use
15503 output_asm_line_debug_info consistently.
15504 (dwarf2out_early_finish): Likewise.
15505 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
15508 2018-07-11 Richard Biener <rguenther@suse.de>
15510 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
15511 Rework father_bb setting in a way to avoid propagating constants
15512 multiple times on a loop body.
15514 2018-07-10 Mark Wielaard <mark@klomp.org>
15517 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
15519 2018-07-10 Richard Biener <rguenther@suse.de>
15521 * hash-map.h (hash_map::iterator::operator*): Return
15522 references to key and value.
15524 2018-07-10 Jakub Jelinek <jakub@redhat.com>
15527 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
15528 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
15529 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
15530 (gimplify_omp_for): For composite loops, move outer
15531 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
15532 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
15533 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
15534 TREE_LIST for both the original class iterator and the "last" helper
15535 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
15536 loop, remember has_decl_expr from outer composite loops for the
15537 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
15539 2018-07-09 Martin Sebor <msebor@redhat.com>
15541 PR middle-end/77357
15542 PR middle-end/86428
15543 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
15544 accessing implicitly initialized array elements.
15545 * expr.c (string_constant): Handle string initializers of
15546 character arrays within aggregates.
15547 * gimple-fold.c (fold_array_ctor_reference): Add argument.
15548 Store element offset. As a special case, handle zero size.
15549 (fold_nonarray_ctor_reference): Same.
15550 (fold_ctor_reference): Add argument. Store subobject offset.
15551 * gimple-fold.h (fold_ctor_reference): Add argument.
15553 2018-07-09 Paul Koning <ni1d@arrl.net>
15555 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
15556 (pdp11_insn_cost): New function.
15557 (pdp11_md_asm_adjust): New function.
15558 (TARGET_INVALID_WITHIN_DOLOOP): Define.
15559 (pdp11_rtx_costs): Update to match machine better.
15560 (output_addr_const_pdp11): Correct format mismatch warnings.
15561 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
15562 * config/pdp11/pdp11.md: General change to add base_cost and/or
15563 length attributes for use by new pdp11_insn_cost function.
15564 (MIN_BRANCH): Correct definition.
15566 (doloop_end): Use standard pattern name for looping pattern.
15567 (doloop_end_nocc): New.
15568 (movsf): Add another constraint alternative.
15569 (zero_extendqihi2): Add constraint alternatives for not in place
15571 (zero_extendhisi2): Remove.
15572 (shift patterns): Add CC handling variants.
15576 (define_peephole2): New peephole to recognize mov that sets CC for
15579 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15581 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
15582 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
15585 2018-07-09 Jakub Jelinek <jakub@redhat.com>
15588 * real.c (real_nextafter): Return true if result is denormal.
15590 2018-07-09 Martin Liska <mliska@suse.cz>
15592 * common.opt: Add back wrongly removed attribute.
15594 2018-07-09 Richard Biener <rguenther@suse.de>
15597 * dwarf2out.c (gen_block_die): For an early generated DIE
15598 always output high/low PC attributes.
15600 2018-07-09 Tom de Vries <tdevries@suse.de>
15602 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
15603 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
15604 onto VAR_DECL with abstract origin.
15606 2018-07-07 Jim Wilson <jimw@sifive.com>
15608 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
15610 2018-07-07 Tom de Vries <tdevries@suse.de>
15612 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
15614 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
15616 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
15618 (combine_bound): Use wide-int overflow calculation instead of
15620 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
15622 * fold-const.c (int_const_binop_2): Same.
15623 (extract_muldiv_1): Same.
15624 (fold_div_compare): Same.
15625 (fold_abs_const): Same.
15627 * poly-int.h (add): Same.
15631 * predict.c (predict_iv_comparison): Same.
15632 * profile-count.c (slow_safe_scale_64bit): Same.
15633 * simplify-rtx.c (simplify_const_binary_operation): Same.
15634 * tree-chrec.c (tree_fold_binomial): Same.
15635 * tree-data-ref.c (split_constant_offset_1): Same.
15636 * tree-if-conv.c (idx_within_array_bound): Same.
15637 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
15638 * tree-ssa-phiopt.c (minmax_replacement): Same.
15639 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
15640 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
15641 * vr-values.c (vr_values::adjust_range_with_scev): Same.
15642 * wide-int.cc (wi::add_large): Same.
15643 (wi::mul_internal): Same.
15644 (wi::sub_large): Same.
15645 (wi::divmod_internal): Same.
15646 * wide-int.h: Change overflow type to overflow_type for neg, add,
15647 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
15648 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
15649 mul_internal, divmod_internal.
15650 (overflow_type): New enum.
15651 (accumulate_overflow): New.
15653 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
15655 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
15656 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
15658 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
15660 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
15661 argument is checked for zero before entering loop, avoid checking again.
15663 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
15665 * gimplify.h (generic_expr_could_trap_p): Set as global function.
15666 * gimplify.h (generic_expr_could_trap_p): Likwise.
15667 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
15669 2018-07-06 Jakub Jelinek <jakub@redhat.com>
15671 PR tree-optimization/86401
15672 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
15673 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
15674 (fold_bit_and_mask): ... here. New helper function for match.pd.
15675 * fold-const.h (fold_bit_and_mask): Declare.
15676 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
15678 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
15681 * target.def (translate_mode_attribute): New hook.
15682 * targhooks.h (default_translate_mode_attribute): Declare.
15683 * targhooks.c (default_translate_mode_attribute): New function.
15684 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
15685 * doc/tm.texi: Regenerate.
15686 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
15687 (rs6000_translate_mode_attribute): New function.
15689 2018-07-06 Paul Koning <ni1d@arrl.net>
15691 * doc/md.texi (define_split): Document DONE and FAIL.
15692 (define_peephole2): Ditto.
15694 2018-07-05 Jeff Law <law@redhat.com>
15696 PR tree-optimization/86010
15697 * tree-ssa-dse.c (compute_trims): More aggressively trim at
15698 both the head and tail of mem* and str* calls.
15700 2018-07-05 Jim Wilson <jimw@sifive.com>
15702 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
15704 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
15706 * config/aarch64/aarch64-simd.md: correct flags text for
15707 MIN_EXPR replacement.
15709 2018-07-05 James Clarke <jrtc27@jrtc27.com>
15711 * configure: Regenerated.
15713 2018-07-05 Carl Love <cel@us.ibm.com>
15715 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
15716 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
15717 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
15718 VSX_BUILTIN_DOUBLEL_V4SF.
15720 2018-07-05 Martin Sebor <msebor@redhat.com>
15723 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
15724 than its domain to compute its the upper bound of a char array.
15726 2018-07-05 Nathan Sidwell <nathan@acm.org>
15728 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
15729 * doc/cpp.texi: Update comment.
15730 * doc/tm.texi: Rebuilt.
15731 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
15732 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
15733 * doc/extend.texi (Backwards Compatibility): Clarify it is system
15734 headers affected by extern "C".
15735 * system.h: Poison NO_IMPLICIT_EXTERN_C.
15736 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
15737 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
15738 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
15739 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
15740 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
15741 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
15742 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
15743 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
15744 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
15745 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
15746 config/sparc/sp64-elf.h, config/spu/spu.h,
15747 config/stormy16/stormy16.h, config/v850/v850.h,
15748 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
15749 define NO_IMPLICIT_EXTERN_C.
15750 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
15752 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15755 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15756 instead of GET_MODE_SIZE when comparing Units.
15758 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15761 * rtlanal.c (set_noop_p): Constrain on mode change,
15762 include hard-reg-set.h
15764 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15766 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
15768 2018-07-05 Jakub Jelinek <jakub@redhat.com>
15771 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
15774 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15776 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15778 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
15781 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15783 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15785 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
15787 PR middle-end/86380
15788 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
15790 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
15792 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
15793 neg_*_op* variables.
15795 2018-07-04 Martin Liska <mliska@suse.cz>
15797 * tree-switch-conversion.c: Define
15798 max_ratio_for_speed and max_ratio_for_size constants.
15800 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
15801 Martin Liska <mliska@suse.cz>
15803 PR middle-end/66240
15806 * common.opt: Rename align options with 'str_' prefix.
15807 * common/config/i386/i386-common.c (set_malign_value): New
15809 (ix86_handle_option): Use it to set -falign-* options/
15810 * config/aarch64/aarch64-protos.h (struct tune_params): Change
15811 type from int to string.
15812 * config/aarch64/aarch64.c: Update default values from int
15814 * config/alpha/alpha.c (alpha_override_options_after_change):
15816 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
15817 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15818 max skip conditionally.
15819 * config/i386/freebsd.h (SUBALIGN_LOG): New.
15820 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15821 max skip conditionally.
15822 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15823 max skip conditionally.
15824 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
15825 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15826 max skip conditionally.
15827 * config/i386/i386.c (struct ptt): Change type from int to
15829 (ix86_default_align): Set default values.
15830 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
15831 max skip conditionally.
15832 * config/i386/iamcu.h (SUBALIGN_LOG): New.
15833 (ASM_OUTPUT_MAX_SKIP_ALIGN):
15834 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
15835 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15836 max skip conditionally.
15837 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
15838 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
15839 * config/i386/x86-64.h (SUBALIGN_LOG): New.
15840 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15841 max skip conditionally.
15842 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15843 * config/ia64/ia64.c (ia64_option_override): Set default values
15844 for alignment options.
15845 * config/m68k/m68k.c: Handle new str_align_* options.
15846 * config/mips/mips.c (mips_set_compression_mode): Change
15848 (mips_option_override): Set default values for options.
15849 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
15851 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15853 * config/rx/rx.c (rx_option_override): Likewise.
15854 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
15855 (LABEL_ALIGN): Use align_labels_log.
15856 (LOOP_ALIGN): Use align_loops_align.
15857 * config/s390/s390.c (s390_asm_output_function_label): Use new
15859 * config/sh/sh.c (sh_override_options_after_change):
15860 Change type of constants.
15861 * config/spu/spu.c (spu_sched_init): Likewise.
15862 * config/sparc/sparc.c (sparc_option_override): Set default
15863 values for options.
15864 * config/visium/visium.c (visium_option_override): Likewise.
15865 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
15866 emit p2align format with last argument if it's not needed.
15867 * doc/invoke.texi: Document extended format of -falign-*.
15868 * final.c: Use align_labels alignment.
15869 * flags.h (struct target_flag_state): Change type to use
15871 (struct align_flags_tuple): New.
15872 (struct align_flags): Likewise.
15873 (align_loops_log): Redefine macro to use new types.
15874 (align_loops_max_skip): Redefine macro to use new types.
15875 (align_jumps_log): Redefine macro to use new types.
15876 (align_jumps_max_skip): Redefine macro to use new types.
15877 (align_labels_log): Redefine macro to use new types.
15878 (align_labels_max_skip): Redefine macro to use new types.
15879 (align_functions_log): Redefine macro to use new types.
15880 (align_loops): Redefine macro to use new types.
15881 (align_jumps): Redefine macro to use new types.
15882 (align_labels): Redefine macro to use new types.
15883 (align_functions): Redefine macro to use new types.
15884 (align_functions_max_skip): Redefine macro to use new types.
15885 (align_loops_value): New macro.
15886 (align_jumps_value): New macro.
15887 (align_labels_value): New macro.
15888 (align_functions_value): New macro.
15889 * function.c (invoke_set_current_function_hook): Propagate
15890 alignment values from flags to global variables default in
15892 * ipa-icf.c (sem_function::equals_wpa): Use
15893 cl_optimization_option_eq instead of memcmp.
15894 * lto-streamer.h (cl_optimization_stream_out): Support streaming
15896 (cl_optimization_stream_in): Likewise.
15897 * optc-save-gen.awk: Support strings in cl_optimization.
15898 * opth-gen.awk: Likewise.
15899 * opts.c (finish_options): Remove error checking of invalid
15901 (MAX_CODE_ALIGN): Remove.
15902 (MAX_CODE_ALIGN_VALUE): Likewise.
15903 (parse_and_check_align_values): New function.
15904 (check_alignment_argument): Likewise.
15905 (common_handle_option): Use check_alignment_argument.
15906 * opts.h (parse_and_check_align_values): Declare.
15907 * toplev.c (init_alignments): Remove.
15908 (read_log_maxskip): New.
15909 (parse_N_M): Likewise.
15910 (parse_alignment_opts): Likewise.
15911 (backend_init_target): Remove usage of init_alignments.
15912 * toplev.h (parse_alignment_opts): Declare.
15913 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
15915 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
15916 * tree.c (cl_option_hasher::equal): New.
15917 * varasm.c: Use new global macros.
15919 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
15921 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
15922 Use a simpler align directive also if MAXSKIP = ALIGN-1.
15923 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15924 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15925 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15926 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15927 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
15928 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
15929 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
15930 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15931 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15932 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15933 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15935 2018-07-04 Martin Liska <mliska@suse.cz>
15936 Jonathan Wakely <jwakely@redhat.com>
15938 * coverage.c: Use correct type.
15939 * doc/invoke.texi: Language correction.
15941 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
15944 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
15945 ENDBRANCH for non-tail call which may return via indirect branch.
15946 * doc/extend.texi: Document indirect_return attribute.
15948 2018-07-03 Martin Sebor <msebor@redhat.com>
15950 PR tree-optimization/86274
15951 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
15953 (format_floating): Correct handling of infinities and NaNs.
15955 2018-07-03 Martin Sebor <msebor@redhat.com>
15957 * print-tree.c (print_real_cst): New function.
15958 (print_node_brief): Call it.
15959 (print_node): Ditto.
15961 2018-07-03 Jeff Law <law@redhat.com>
15963 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
15964 into a single pattern.
15966 * config/h8300/h8300.md (ors code_iterator): New.
15967 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
15968 a single pattern and single splitter.
15969 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
15970 (iorqi3_1, xorqi3_1): Likewise.
15971 (iorqi3, xorqi3 expanders): Similarly.
15973 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
15974 (movmd_internal) into a single pattern using the P mode iterator.
15975 (movmd splitters): Similarly.
15976 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
15977 (movsd splitters): Similarly.
15979 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
15980 ADDB, ADDW and ADDL into a single ADD attribute which selects the
15981 right table based on the size of the operand.
15982 * config/h8300/h8300.md (length_table): Corresponding changes. All
15983 references to "addb", "addw" and "addl" changed to "add".
15984 (btst patterns): Merge two variants into a single pattern.
15985 (tstqi, tsthi): Likewise.
15986 (addhi3_incdec, addsi3_incdec): Likewise.
15987 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
15988 (mulhi3, mulsi3): Likewise.
15989 (udivhi3, udivsi3): Likewise.
15990 (divhi3, divsi3): Likewise.
15991 (andorqi3, andorhi3, andorsi3): Likewise.
15993 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
15996 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
15997 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
15999 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16001 PR tree-optimization/85694
16002 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
16003 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
16005 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
16006 (<u>avg<mode>3_ceil): New patterns.
16008 2018-07-03 David Malcolm <dmalcolm@redhat.com>
16010 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
16011 scan-tree-dump directive.
16012 * gcc.dg/vect/slp-perm-2.c: Likewise.
16013 * gcc.dg/vect/slp-perm-3.c: Likewise.
16014 * gcc.dg/vect/slp-perm-5.c: Likewise.
16015 * gcc.dg/vect/slp-perm-6.c: Likewise.
16016 * gcc.dg/vect/slp-perm-7.c: Likewise.
16017 * gcc.dg/vect/slp-perm-8.c: Likewise.
16019 2018-07-03 Marek Polacek <polacek@redhat.com>
16021 PR middle-end/86202
16022 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
16024 2018-07-03 Richard Biener <rguenther@suse.de>
16027 * tree-ssa-structalias.c (find_func_clobbers): Properly
16028 handle indirect calls.
16030 2018-07-03 Jeff Law <law@redhat.com>
16032 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
16033 (shifts): New code iterator.
16034 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
16035 expander. Fix HImode handling on H8/SX.
16036 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
16037 (subqi3, subhi3, subsi3 expanders): Likewise.
16038 (andqi3, andhi3, andsi3 expanders): Likewise.
16039 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
16040 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
16041 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
16042 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
16043 (zero_extendqihi2, zero_extendqisi2): Likewise.
16044 (extendqihi2, extendqisi2): Likewise.
16045 (rotlqi3, rotlhi3, rotlsi3): Likewise.
16046 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
16047 (rotlqi3_1, rotlhi3_1): Likewise.
16048 (logicalhi3_sn, logicalsi3_sn): Likewise.
16049 (logicalhi3, logicalsi3): Likewise.
16051 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16053 * tree-vect-patterns.c (vect_recog_rotate_pattern)
16054 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16055 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
16056 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
16057 type to append_pattern_def_seq instead of creating a stmt_vec_info
16059 (build_mask_conversion): Likewise. Remove vinfo argument.
16060 (vect_add_conversion_to_patterm): Likewise, renaming to...
16061 (vect_add_conversion_to_pattern): ...this.
16062 (vect_recog_mask_conversion_pattern): Update call to
16063 build_mask_conversion. Pass the vector type to
16064 append_pattern_def_seq here too.
16065 (vect_recog_gather_scatter_pattern): Update call to
16066 vect_add_conversion_to_pattern.
16068 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16070 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
16071 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16072 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
16073 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
16074 STMT_VINFO_PATTERN_DEF_SEQ to null here.
16075 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
16076 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
16077 append_pattern_def_seq instead of new_pattern_def_seq.
16078 (vect_recog_divmod_pattern): Do both of the above.
16079 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
16082 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16084 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
16085 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
16086 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
16087 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
16088 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
16089 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16090 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
16091 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16092 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16093 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
16094 parameter with a single stmt_vec_info.
16095 (vect_recog_func_ptr): Likewise.
16096 (vect_recog_gather_scatter_pattern): Likewise, folding in...
16097 (vect_try_gather_scatter_pattern): ...this.
16098 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
16099 the stmt_vec_info of the statement to be matched. Don't clear
16100 STMT_VINFO_RELATED_STMT.
16101 (vect_pattern_recog): Update call accordingly.
16103 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16105 PR tree-optimization/85694
16106 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
16107 (uavgM3_ceil): Document new optabs.
16108 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
16109 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
16111 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
16112 (savg_ceil_optab): New optabs.
16113 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
16114 (vect_vect_recog_func_ptrs): Add it.
16115 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
16116 constant directly from the associated lhs.
16118 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16120 * tree-vect-patterns.c (vect_split_statement): New function.
16121 (vect_convert_input): Use it to try to split an existing cast.
16123 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16125 * poly-int.h (print_hex): New function.
16126 * dumpfile.h (dump_dec, dump_hex): Declare.
16127 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
16128 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
16129 min_input_precision, operation_precision and operation_sign.
16130 * tree-vect-patterns.c (vect_get_range_info): New function.
16131 (vect_same_loop_or_bb_p, vect_single_imm_use)
16132 (vect_operation_fits_smaller_type): Delete.
16133 (vect_look_through_possible_promotion): Add an optional
16134 single_use_p parameter.
16135 (vect_recog_over_widening_pattern): Rewrite to use new
16136 stmt_vec_info infomration. Handle one operation at a time.
16137 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
16138 (vect_truncatable_operation_p, vect_set_operation_type)
16139 (vect_set_min_input_precision): New functions.
16140 (vect_determine_min_output_precision_1): Likewise.
16141 (vect_determine_min_output_precision): Likewise.
16142 (vect_determine_precisions_from_range): Likewise.
16143 (vect_determine_precisions_from_users): Likewise.
16144 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
16145 (vect_vect_recog_func_ptrs): Put over_widening first.
16147 (vect_pattern_recog): Call vect_determine_precisions.
16149 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
16151 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
16152 statements that have been replaced by further pattern statements.
16153 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
16155 2018-07-03 Richard Biener <rguenther@suse.de>
16157 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
16158 always set *dt. Dump vectype in vectype overload.
16159 * dumpfile.h (dump_gimple_expr): New function.
16160 (dump_gimple_expr_loc): Likewise.
16161 * dumpfile.c (dump_gimple_expr): New function.
16162 (dump_gimple_expr_loc): Likewise.
16164 2018-07-02 Jeff Law <law@redhat.com>
16166 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
16167 the H8/300, H8/300H and H8/S variants into a single pattern.
16168 (movhi_h8300, movqi_h8300hs): Similarly.
16169 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
16170 (QHI mode iterator): New.
16172 * config/h8300/h8300.md: Remove trailing whitespace.
16174 2018-07-02 Jim Wilson <jimw@sifive.com>
16176 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
16177 instead of emit_insn for interrupt returns.
16178 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
16179 (riscv_sret, riscv_uret): Likewise.
16181 2018-07-02 David Malcolm <dmalcolm@redhat.com>
16183 * pretty-print.c (selftest::test_pp_format): Move save and restore
16184 of quotes to class auto_fix_quotes, and add an instance.
16185 * selftest.c: Include "intl.h".
16186 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
16187 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
16188 * selftest.h (selftest::auto_fix_quotes): New class.
16190 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
16192 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
16193 (aarch64_sve_prepare_conditional_op): Remove.
16194 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
16195 Allow aarch64_simd_reg_or_zero as select operand; remove
16196 the aarch64_sve_prepare_conditional_op call.
16197 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
16198 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16199 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
16200 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
16201 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
16202 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
16203 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
16204 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
16205 and a splitters to match all of the *_any patterns.
16206 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
16208 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
16209 (SVE_COND_FP_BINARY_REV): Remove.
16210 (sve_int_op_rev, sve_fp_op_rev): New.
16211 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
16212 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
16213 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
16214 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
16215 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
16216 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
16217 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
16218 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
16219 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
16221 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
16222 Remove match_dup 1 from the inner unspec.
16223 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16225 * config/aarch64/aarch64.md (movprfx): New attr.
16226 (length): Default movprfx to 8.
16227 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
16228 (*madd<SVE_I>, *msub<SVE_I): Likewise.
16229 (*<su>mul<SVE_I>3_highpart): Likewise.
16230 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
16231 (*v<ASHIFT><SVE_I>3): Likewise.
16232 (*<su><MAXMIN><SVE_I>3): Likewise.
16233 (*<su><MAXMIN><SVE_F>3): Likewise.
16234 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
16235 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
16236 (*div<SVE_F>4): Likewise.
16238 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
16240 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
16243 2018-07-02 Richard Biener <rguenther@suse.de>
16245 PR tree-optimization/86363
16246 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
16247 memset argument refers to a non-variable address.
16249 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
16251 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
16252 {PLUS,MINUS}_EXPR code to...
16253 (adjust_symbolic_bound): ...here,
16254 (combine_bound): ...here,
16255 (set_value_range_with_overflow): ...and here.
16257 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
16259 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
16261 (extract_range_from_abs_expr): ...here.
16263 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
16265 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
16266 -fno-omit-frame-pointer when not optimizing.
16268 2018-07-02 Martin Liska <mliska@suse.cz>
16271 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
16272 (propagate_nothrow): Likewise.
16274 2018-07-02 Martin Liska <mliska@suse.cz>
16277 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
16279 2018-07-02 David Malcolm <dmalcolm@redhat.com>
16281 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
16282 function in r262149, changing "loc" param from source_location to
16283 const dump_location_t &.
16284 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
16285 declaration, as above.
16287 2018-07-01 Paul Koning <ni1d@arrl.net>
16289 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16290 -munit-asm, -mgnu-asm, -mdec-asm.
16291 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
16292 (pdp11_output_labelref): New.
16293 (pdp11_output_def): New.
16294 (pdp11_output_addr_vec_elt): New.
16295 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
16296 %# and %@ format codes.
16297 (pdp11_option_override): New.
16298 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
16299 (pdp11_output_ident): New.
16300 (pdp11_asm_named_section): New.
16301 (pdp11_asm_init_sections): New.
16302 (pdp11_file_start): New.
16303 (pdp11_file_end): New.
16304 (output_ascii): Use .ascii/.asciz for -mdec-asm.
16305 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
16306 %o, like %c but octal.
16307 (pdp11_option_override): New.
16308 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
16310 (DATA_SECTION_ASM_OP): Ditto.
16311 (READONLY_DATA_SECTION_ASM_OP): New.
16312 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
16313 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
16314 (ASM_OUTPUT_LABELREF): Ditto.
16315 (ASM_OUTPUT_DEF): Ditto.
16316 (ASM_OUTPUT_EXTERNAL): New.
16317 (ASM_OUTPUT_SOURCE_FILENAME): New.
16318 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
16319 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
16320 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
16321 %# and %@ format codes.
16322 * config/pdp11/pdp11.opt (mgnu-asm): New.
16323 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
16324 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
16325 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
16327 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
16329 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
16330 dereferencing path[] beyond its length.
16332 (debug_all_paths): New.
16333 (rewire_first_differing_edge): New.
16334 (adjust_paths_after_duplication): New.
16335 (duplicate_thread_path): Call adjust_paths_after_duplication.
16337 (thread_through_all_blocks): Add new argument to
16338 duplicate_thread_path.
16340 2018-06-30 Jim Wilson <jimw@sifive.com>
16342 * config/riscv/predicates.md (p2m1_shift_operand): New.
16343 (high_mask_shift_operand): New.
16344 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
16345 pattern using p2m1_shift_operand.
16346 (lshsi3_zero_extend_3+2): New combiner pattern using
16347 high_mask_shift_operand.
16349 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16351 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
16353 (vect_recog_rotate_pattern): ...here.
16354 (vect_convert_input): Try to insert casts of invariants in the
16356 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
16357 preheader to be empty.
16359 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16361 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
16362 vector type. If given, install it in the new statement's
16363 STMT_VINFO_VECTYPE.
16364 (vect_element_precision): New function.
16365 (vect_unpromoted_value): New struct.
16366 (vect_unpromoted_value::vect_unpromoted_value): New function.
16367 (vect_unpromoted_value::set_op): Likewise.
16368 (vect_look_through_possible_promotion): Likewise.
16369 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
16370 (vect_widened_op_tree, vect_convert_input): Likewise.
16371 (vect_convert_inputs, vect_convert_output): Likewise.
16372 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
16373 to handle the optional cast of the multiplication result and
16374 vect_widened_op_tree to detect the widened multiplication itself.
16375 Do not require the input and output of promotion casts to have
16376 the same sign, but base the signedness of the operation on the
16377 input rather than the result. If the pattern includes two
16378 promotions, check that those promotions have the same sign.
16379 Do not restrict the MULT_EXPR handling to a double-width result;
16380 handle quadruple-width results and wider. Use vect_convert_inputs
16381 to convert the inputs to the common type.
16382 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
16383 to handle the optional cast of the ABS result. Also allow a sign
16384 change or a sign extension between the ABS and MINUS.
16385 Use vect_widened_op_tree to detect the widened subtraction and use
16386 vect_convert_inputs to convert the inputs to the common type.
16387 (vect_handle_widen_op_by_const): Delete.
16388 (vect_recog_widen_op_pattern): New function.
16389 (vect_recog_widen_mult_pattern): Use it.
16390 (vect_recog_widen_shift_pattern): Likewise.
16391 (vect_recog_widen_sum_pattern): Use
16392 vect_look_through_possible_promotion to handle the promoted
16395 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16397 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
16398 the containing gimple_seq *.
16399 * gimple-iterator.h (gsi_for_stmt): Declare it.
16400 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
16401 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
16402 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16403 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16404 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
16406 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
16408 (vect_mark_pattern_stmts): ...here. Handle cases in which the
16409 statement being replaced is part of an existing pattern
16410 definition sequence, inserting the new pattern statements before
16412 (vect_pattern_recog_1): Don't return a bool. If the statement
16413 is already part of a pattern, instead apply pattern matching
16414 to the pattern definition statements. Don't clear the
16415 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
16416 (vect_pattern_recog): Don't break after the first match;
16417 continue processing the pattern definition statements instead.
16418 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
16420 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16422 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16423 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16424 (vect_recog_widen_sum_pattern): Use it.
16426 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16428 * tree-vect-loop.c (vectorizable_reduction): Assert that the
16429 phi is not a pattern statement and has not been replaced by
16430 a pattern statement.
16431 * tree-vect-patterns.c (type_conversion_p): Don't check
16432 STMT_VINFO_IN_PATTERN_P.
16433 (vect_recog_vector_vector_shift_pattern): Likewise.
16434 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
16435 the pattern statement rather than the original statement; check
16436 directly for a WIDEN_MULT_EXPR here.
16437 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
16438 vect_is_simple_use to return the pattern statement rather
16439 than the original statement; use is_pattern_stmt_p to check
16440 for such a pattern statement.
16441 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
16442 to return the pattern statement rather than the original statement;
16443 don't do the same transformation here.
16444 (vect_is_simple_use): If the defining statement has been replaced
16445 by a pattern statement, return the pattern statement instead.
16446 Remove the corresponding (local) transformation from the vectype
16449 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
16451 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
16452 end and default to null.
16453 * tree-vect-loop.c (vect_create_epilog_for_reduction)
16454 (vectorizable_reduction): Update calls accordingly, dropping the
16455 gimple ** argument if the passed-back statement isn't needed.
16456 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
16457 (vect_recog_rotate_pattern): Likewise.
16458 (vect_recog_mask_conversion_pattern): Likewise.
16459 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
16460 (vect_mask_constant_operand_p): Likewise.
16461 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
16462 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
16463 (get_group_load_store_type, get_load_store_type): Likewise.
16464 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
16465 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
16466 (vectorizable_conversion, vectorizable_assignment): Likewise.
16467 (vectorizable_shift, vectorizable_operation): Likewise.
16468 (vectorizable_store, vect_is_simple_cond): Likewise.
16469 (vectorizable_condition, vectorizable_comparison): Likewise.
16470 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
16471 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
16472 and move it to the end. Cope with null def_stmt_outs.
16474 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
16476 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
16478 2018-06-29 Jeff Law <law@redhat.com>
16480 * config/v850/v850.c (v850_legitimate_address_p): Handle large
16481 displacements for TARGET_V850E2V3 and newer.
16482 (TARGET_LRA_P): Remove. Defaults to LRA now.
16483 * config/v850/v850.md (sign23byte_load): Remove.
16484 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
16485 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
16487 2018-06-29 Martin Liska <mliska@suse.cz>
16490 * coverage.c (coverage_init): Mangle full path name.
16491 * doc/invoke.texi: Document the change.
16492 * gcov-io.c (mangle_path): New.
16493 * gcov-io.h (mangle_path): Likewise.
16494 * gcov.c (mangle_name): Use mangle_path for path mangling.
16496 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16498 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
16499 if starting source register is not even.
16501 2018-06-29 Martin Liska <mliska@suse.cz>
16503 PR tree-optimization/86263
16504 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
16505 Make edge redirection.
16507 2018-06-29 David Malcolm <dmalcolm@redhat.com>
16509 * dumpfile.c (dump_loc): Add indentation based on scope depth.
16510 (dump_scope_depth): New variable.
16511 (get_dump_scope_depth): New function.
16512 (dump_begin_scope): New function.
16513 (dump_end_scope): New function.
16514 * dumpfile.h (get_dump_scope_depth): New declaration.
16515 (dump_begin_scope): New declaration.
16516 (dump_end_scope): New declaration.
16517 (class auto_dump_scope): New class.
16518 (AUTO_DUMP_SCOPE): New macro.
16519 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
16522 2018-06-29 Richard Biener <rguenther@suse.de>
16524 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
16525 compute_all_dependences succeeds.
16526 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
16527 exceed --param loop-max-datarefs-for-datadeps.
16529 2018-06-29 Jakub Jelinek <jakub@redhat.com>
16531 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
16533 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
16536 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
16537 alternative 0 in preferred_for_speed attribute.
16539 2018-06-28 Paul Koning <ni1d@arrl.net>
16541 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
16542 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
16543 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
16544 * config/pdp11/pdp11.md: Correct "length" attribute calculation
16545 for shift insn patterns.
16547 2018-06-28 David Malcolm <dmalcolm@redhat.com>
16549 * cgraph.c (cgraph_node::get_body): Replace assignments to
16550 "dump_file" with calls to set_dump_file.
16551 * dumpfile.c (alt_dump_file): Make static, and group with...
16552 (alt_flags): ...this definition.
16553 (dumps_are_enabled): New variable.
16554 (refresh_dumps_are_enabled): New function.
16555 (set_dump_file): New function.
16556 (set_alt_dump_file): New function.
16557 (gcc::dump_manager::dump_start): Replace assignments to
16558 "dump_file" and "alt_dump_file" with calls to set_dump_file and
16560 (gcc::dump_manager::dump_finish): Likewise.
16561 * dumpfile.h (alt_dump_file): Delete decl.
16562 (dumps_are_enabled): New variable decl.
16563 (set_dump_file): New function decl.
16564 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
16566 * tree-nested.c (lower_nested_functions): Replace assignments to
16567 "dump_file" with calls to set_dump_file.
16569 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
16571 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
16572 goto_locus of each outgoing edge of each basic block.
16574 2018-06-28 Richard Biener <rguenther@suse.de>
16576 * dwarf2out.c (decl_scope_table): Remove.
16577 (push_decl_scope): Likewise.
16578 (pop_decl_scope): Likewise.
16579 (gen_type_die_for_member): Do not call push/pop_decl_scope.
16580 (gen_struct_or_union_type_die): Likewise.
16581 (gen_tagged_type_die): Likewise.
16582 (dwarf2out_init): Do not initialize decl_scope_table.
16583 (dwarf2out_c_finalize): Do not free it.
16585 2018-06-28 Richard Biener <rguenther@suse.de>
16587 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
16588 deciding whether to not re-use a DIE.
16590 2018-06-28 Richard Biener <rguenther@suse.de>
16592 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
16593 DW_AT_abstract_origin attribute.
16595 2018-06-28 Martin Liska <mliska@suse.cz>
16597 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16598 Use newly introduced constants.
16599 * tree-switch-conversion.h (struct jump_table_cluster):
16600 Define max_ratio_for_size and max_ratio_for_speed.
16602 2018-06-28 Martin Liska <mliska@suse.cz>
16604 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16605 Add new checking assert to catch invalid state.
16606 (jump_table_cluster::can_be_handled): Handle single case
16608 (jump_table_cluster::is_beneficial): Bail out for such case.
16609 (bit_test_cluster::find_bit_tests):
16610 Add new checking assert to catch invalid state.
16611 (bit_test_cluster::can_be_handled): Handle single case
16613 (bit_test_cluster::is_beneficial): Bail out for such case.
16614 (switch_decision_tree::analyze_switch_statement):
16617 2018-06-28 Martin Liska <mliska@suse.cz>
16619 * common.opt: Introduce -completion option.
16620 * gcc.c (driver_handle_option): Handle it.
16621 (driver::main): Print completions if completion
16623 * opt-suggestions.c (option_proposer::get_completions):
16625 (option_proposer::suggest_completion): Likewise.
16626 (option_proposer::find_param_completions): Likewise.
16627 (verify_autocompletions): Likewise.
16628 (test_completion_valid_options): Likewise.
16629 (test_completion_valid_params): Likewise.
16630 (in_completion_p): Likewise.
16631 (empty_completion_p): Likewise.
16632 (test_completion_partial_match): Likewise.
16633 (test_completion_garbage): Likewise.
16634 (opt_proposer_c_tests): Likewise.
16635 * opt-suggestions.h: Declare new functions.
16636 * opts.c (common_handle_option): Handle OPT__completion_.
16637 * selftest-run-tests.c (selftest::run_tests): Add
16638 opt_proposer_c_tests.
16639 * selftest.c (assert_str_startswith): New.
16640 * selftest.h (assert_str_startswith): Likewise.
16641 (opt_proposer_c_tests): New.
16642 (ASSERT_STR_STARTSWITH): Likewise.
16644 2018-06-28 Martin Liska <mliska@suse.cz>
16646 * Makefile.in: Add opt-suggestions.o.
16647 * gcc-main.c: Include opt-suggestions.h.
16648 * gcc.c (driver::driver): Likewise.
16649 (driver::~driver): Remove m_option_suggestions.
16650 (driver::build_option_suggestions): Moved to option_proposer.
16651 (driver::suggest_option): Likewise.
16652 (driver::handle_unrecognized_options): Use option_proposer.
16653 * gcc.h (class driver): Add new memver m_option_proposer.
16654 * opt-suggestions.c: New file.
16655 * opt-suggestions.h: New file.
16657 2018-06-28 Martin Liska <mliska@suse.cz>
16659 * vec.h (class auto_string_vec): New (moved from auto_argvec).
16660 (auto_string_vec::~auto_string_vec): Likewise.
16662 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
16664 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
16665 prevent_decl_creation_for_types fields up and add reset_location field.
16666 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
16667 statement if id->reset_location is true.
16668 (copy_edges_for_bb): Do not set goto_locus on the new edges if
16669 id->reset_location is true.
16670 (copy_phis_for_bb): Force input_location on the arguments if
16671 id->reset_location is true.
16672 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
16673 is set on the function to be inlined.
16675 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
16677 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
16679 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
16681 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
16682 registers for Pmode.
16683 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
16684 hard registers for the clobbered pseudo.
16686 2018-06-27 Paul Koning <ni1d@arrl.net>
16688 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16689 mutually exclusive options.
16690 * config/pdp11/constraints.md (h): New constraint.
16691 (O): Update definition to match shift code generation.
16692 (D): New constraint.
16693 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
16695 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
16697 (output_jump): Change arguments.
16698 (pdp11_fixed_cc_regs): New function.
16699 (pdp11_cc_mode): Ditto.
16700 (pdp11_expand_shift): Ditto.
16701 (pdp11_assemble_shift): Ditto.
16702 (pdp11_small_shift): Ditto.
16703 (pdp11_branch_cost): Remove.
16704 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
16706 (pdp11_register_move_cost): Update for CC registers.
16707 (pdp11_rtx_costs): Add case for LSHIFTRT.
16708 (pdp11_output_jump): Add CCNZ mode conditional branches.
16709 (notice_update_cc_on_set): Remove.
16710 (pdp11_cc_mode): New function.
16711 (simple_memory_operand): Correct pre/post decrement case.
16712 (no_side_effect_operand): New function.
16713 (pdp11_regno_reg_class): Add CC_REGS class.
16714 (pdp11_fixed_cc_regs): New function.
16715 (pdp11_small_shift): New function.
16716 (pdp11_expand_shift): New function to expand shift insns.
16717 (pdp11_assemble_shift): New function to output shifts.
16718 (pdp11_branch_cost): Remove.
16719 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
16720 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
16721 (WCHAR_TYPE): Ditto.
16722 (PTRDIFF_TYPE): Ditto.
16723 (ADJUST_INSN_LENGTH): New macro.
16724 (FIXED_REGISTERS): Add CC registers.
16725 (CALL_USED_REGISTERS): Ditto.
16726 (reg_class): Ditto.
16727 (REG_CLASS_NAMES): Ditto.
16728 (REG_CLASS_CONTENTS): Ditto.
16729 (SELECT_CC_MODE): Use new function.
16730 (TARGET_FLAGS_REGNUM): New macro.
16731 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
16732 (cc0_reg_rtx): Remove.
16733 (CC_STATUS_MDEP): Remove.
16734 (CC_STATUS_MDEFP_INIT): Remove.
16735 (CC_IN_FPU): Remove.
16736 (NOTICE_UPDATE_CC): Remove.
16737 (REGISTER_NAMES): Add CC registers.
16738 (BRANCH_COST): Change to constant 1.
16739 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
16741 * config/pdp11/pdp11.opt (mbcopy): Remove.
16742 (mbcopy-builtin): Remove.
16743 (mbranch-cheap): Remove.
16744 (mbranch-expensive): Remove.
16745 * config/pdp11/predicates.md (expand_shift_operand): Update to
16746 match shift code generation.
16747 (ccnz_operator): New predicate.
16748 * doc/invoke.texi (PDP-11 Options): Remove deleted options
16749 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
16750 Remove non-existent option -mabshi, -mno-abshi. Document mutually
16752 * doc/md.texi (PDP-11): Document new D and h constraints. Update
16753 description of O constraint.
16755 2018-06-27 Jeff Law <law@redhat.com>
16756 Austin Law <austinklaw@gmail.com>
16758 * config/v850/v850.md (addsi3_set_flags): New pattern.
16759 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
16760 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
16761 (zero_extendhisi2_v850_set_flags): Likewise.
16762 (zero_extendqisi2_v850_set_flags): Likewise.
16763 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
16764 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
16765 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
16767 * config/v850/v850-protos.h (notice_update_cc): Remove.
16768 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
16769 (v850_print_operand): Handle 'D' and "d".
16770 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
16771 Add handling of arithmetic/logical operations compared against zero.
16772 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
16773 Do not look at v850_compare_op, instead get mode from last argument.
16774 (v850_gen_compare): Remove
16775 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
16776 after reload for prologue insns.
16777 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
16779 (construct_save_jarl): Likewise.
16780 (TARGET_FLAGS_REGNUM): Define.
16781 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
16782 (NOTICE_UPDATE_CC): Remove.
16783 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
16784 than cc0. Conditionalize on reload_completed.
16785 (cmpsi_insn, setfcc_insn): Likewise.
16786 (tst1 splitter): Turn into define_and_split which sets the flags
16788 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
16789 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
16790 (cstoresf4, cstoredf4): Clobber the flags.
16791 (cmpsi, cmpsf, cmpdf): Remove expanders.
16792 (setf_insn): Remove pattern.
16793 (addsi3): Turn into define_and_split which clobbers the flags after
16794 reload and a suitable pattern (addsi3_clobber_flags) for use after
16796 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
16797 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
16798 (ashrsi3, ashrsi3_v850e2): Likewise.
16799 (bins): Clobber the flags.
16800 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
16801 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
16802 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
16803 (call_value_internal_short, call_value_internal_long): Likewise.
16804 (callt_save_interrupt, callt_return_interrupt): Likewise.
16805 (save_interrupt, return_interrupt): Likewise.
16806 (callt_save_all_interrupt, save_all_interrupt): Likewise.
16807 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
16808 (restore_all_interrupt, _restore_all_interrupt): Likewise.
16809 (All FP comparisons): Only allow after reload has completed.
16811 (divh, divhu): Tweak output template.
16812 (branch_z_normal, branch_z_invert): Remove
16813 (branch_nz_normal, branch_nz_invert): Likewise.
16814 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
16816 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
16817 * config/v850/v850.c (notice_update_cc): Remove.
16818 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
16819 (CC_NO_CARRY): Likewise.
16820 (NOTICE_UPDATE_CC): Define to nothing.
16821 * config/v850/v850.md: Remove block comment on cc0 handling
16822 Remove "cc" attribute from all patterns. Remove cc_status handling
16823 from all patterns. Minor formatting fixes.
16825 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16827 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
16828 (cortex-a76.cortex-a55): Likewise.
16829 * config/aarch64/aarch64-tune.md: Regenerate.
16830 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
16831 cortex-a76.cortex-a55.
16833 2018-06-27 Jeff Law <law@redhat.com>
16835 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
16836 (MULTILIB_DIRNAMES): Similarly.
16838 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
16840 * gimple.h (gimple_return_retbnd): Delete.
16841 (gimple_return_set_retbnd): Likewise.
16842 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
16843 gimple_return_set_retbnd.
16844 * gimple-pretty-print.c (dump_gimple_return): Remove call to
16845 gimple_return_retbnd and adjust.
16846 * tree-inline.h (struct copy_body_data): Remove retbnd field.
16847 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
16848 Explicitly return NULL in a couple more cases. Move assertion
16849 on debug statements and remove unreachable code.
16850 (reset_debug_binding): Do not test id->retbnd.
16851 (expand_call_inline): Do not set it.
16853 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
16855 * configure.ac: Add --disable-gcov option.
16856 * configure: Regenerate.
16857 * Makefile.in: Honour @enable_gcov@.
16858 * doc/install.texi: Document --disable-gcov.
16860 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16862 * config/arm/arm-cpus.in (cortex-a76): New entry.
16863 (cortex-a76.cortex-a55): Likewise.
16864 * config/arm/arm-tables.opt: Regenerate.
16865 * config/arm/arm-tune.md: Likewise.
16866 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
16867 * doc/invoke.texi (ARM Options): Document cortex-a76 and
16868 cortex-a76.cortex-a55.
16870 2018-06-27 Tamar Christina <tamar.christina@arm.com>
16873 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
16875 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
16877 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
16879 (EPILOGUE_USES): Likewise.
16881 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
16883 * tree-inline.c (remap_location): New function extracted from...
16884 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
16885 (copy_phis_for_bb): ...here. Call remap_location.
16886 (copy_cfg_body): Adjust call to copy_edges_for_bb.
16888 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
16890 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
16891 unaligned vsx for 16B memset.
16893 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
16896 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
16897 ieee128_float_type_node to long_double_type_node unless
16898 TARGET_LONG_DOUBLE_128 is set.
16900 2018-06-26 David Malcolm <dmalcolm@redhat.com>
16902 * cfgloop.c (get_loop_location): Convert return type from
16903 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
16904 by implicit construction from rtx_insn *, and using
16905 dump_user_location_t::from_function_decl for the fallback case.
16906 * cfgloop.h (get_loop_location): Convert return type from
16907 location_t to dump_user_location_t.
16908 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
16909 dump_printf_loc to pass in a dump_location_t rather than a
16910 location_t, via the gimple stmt.
16911 * coverage.c (get_coverage_counts): Update calls to
16912 dump_printf_loc to pass in dump_location_t rather than a
16914 * doc/optinfo.texi (Dump types): Convert example of
16915 dump_printf_loc from taking "locus" to taking "insn". Update
16916 description of the "_loc" calls to cover dump_location_t.
16917 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
16919 (dump_user_location_t::dump_user_location_t): New constructors,
16920 from gimple *stmt and rtx_insn *.
16921 (dump_user_location_t::from_function_decl): New function.
16922 (dump_loc): Make static.
16923 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
16924 const dump_location_t &.
16925 (dump_generic_expr_loc): Delete.
16926 (dump_printf_loc): Convert param "loc" from location_t to
16927 const dump_location_t &.
16928 (selftest::test_impl_location): New function.
16929 (selftest::dumpfile_c_tests): New function.
16930 * dumpfile.h: Include "profile-count.h".
16931 (class dump_user_location_t): New class.
16932 (struct dump_impl_location_t): New struct.
16933 (class dump_location_t): New class.
16934 (dump_printf_loc): Convert 2nd param from source_location to
16935 const dump_location_t &.
16936 (dump_generic_expr_loc): Delete.
16937 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
16938 const dump_location_t &.
16939 * gimple-fold.c (fold_gimple_assign): Update call to
16940 dump_printf_loc to pass in a dump_location_t rather than a
16941 location_t, via the gimple stmt.
16942 (gimple_fold_call): Likewise.
16943 * gimple-loop-interchange.cc
16944 (loop_cand::analyze_iloop_reduction_var): Update for change to
16945 check_reduction_path.
16946 (tree_loop_interchange::interchange): Update for change to
16947 find_loop_location.
16948 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
16949 change in return-type of find_loop_location.
16950 (graphite_regenerate_ast_isl): Likewise.
16951 * graphite-optimize-isl.c (optimize_isl): Likewise.
16952 * graphite.c (graphite_transform_loops): Likewise.
16953 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
16954 pass in a dump_location_t rather than a location_t, via the
16956 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16957 * ipa.c (walk_polymorphic_call_targets): Likewise.
16958 * loop-unroll.c (report_unroll): Convert "locus" param from
16959 location_t to dump_location_t.
16960 (decide_unrolling): Update for change to get_loop_location's
16962 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
16963 location_t to dump_user_location_t.
16964 (grid_find_single_omp_among_assignments_1): Updates calls to
16965 dump_printf_loc to pass in a dump_location_t rather than a
16966 location_t, via the gimple stmt.
16967 (grid_parallel_clauses_gridifiable): Convert "tloc" from
16968 location_t to dump_location_t. Updates calls to dump_printf_loc
16969 to pass in a dump_location_t rather than a location_t, via the
16971 (grid_inner_loop_gridifiable_p): Likewise.
16972 (grid_dist_follows_simple_pattern): Likewise.
16973 (grid_gfor_follows_tiling_pattern): Likewise.
16974 (grid_target_follows_gridifiable_pattern): Likewise.
16975 (grid_attempt_target_gridification): Convert initialization
16976 of local "grid" from memset to zero-initialization; FIXME: does
16977 this require C++11? Update call to dump_printf_loc to pass in a
16978 optinfo_location rather than a location_t, via the gimple stmt.
16979 * profile.c (read_profile_edge_counts): Updates call to
16980 dump_printf_loc to pass in a dump_location_t rather than a
16982 (compute_branch_probabilities): Likewise.
16983 * selftest-run-tests.c (selftest::run_tests): Call
16985 * selftest.h (dumpfile_c_tests): New decl.
16986 * tree-loop-distribution.c (pass_loop_distribution::execute):
16987 Update for change in return type of find_loop_location.
16988 * tree-parloops.c (parallelize_loops): Likewise.
16989 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
16990 "locus" from location_t to dump_user_location_t.
16991 (canonicalize_loop_induction_variables): Likewise.
16992 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
16993 for change in return type of find_loop_location.
16994 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
16995 to dump_printf_loc to pass in a dump_location_t rather than a
16996 location_t, via the stmt.
16997 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
16999 * tree-vect-loop-manip.c (find_loop_location): Convert return
17000 type from source_location to dump_user_location_t.
17001 (vect_do_peeling): Update for above change.
17002 (vect_loop_versioning): Update for change in type of
17004 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
17005 from location_t to dump_user_location_t.
17006 (vect_estimate_min_profitable_iters): Update for change in type
17008 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
17009 location_t to dump_location_t.
17010 (vect_slp_bb): Update for change in type of vect_location.
17011 * tree-vectorizer.c (vect_location): Convert from source_location
17012 to dump_user_location_t.
17013 (try_vectorize_loop_1): Update for change in vect_location's type.
17014 (vectorize_loops): Likewise.
17015 (increase_alignment): Likewise.
17016 * tree-vectorizer.h (vect_location): Convert from source_location
17017 to dump_user_location_t.
17018 (find_loop_location): Convert return type from source_location to
17019 dump_user_location_t.
17020 (check_reduction_path): Convert 1st param from location_t to
17021 dump_user_location_t.
17022 * value-prof.c (check_counter): Update call to dump_printf_loc to
17023 pass in a dump_user_location_t rather than a location_t; update
17024 call to error_at for change in type of "locus".
17025 (check_ic_target): Update call to dump_printf_loc to
17026 pass in a dump_user_location_t rather than a location_t, via the
17029 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
17031 * config/s390/s390.h (enum processor_flags): Do not use
17032 default tune parameter when -march was specified.
17034 2018-06-26 Jakub Jelinek <jakub@redhat.com>
17037 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
17038 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
17041 2018-06-26 Richard Biener <rguenther@suse.de>
17043 PR tree-optimization/86287
17045 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
17046 (vect_analyze_loop): Initialize n_stmts.
17048 2018-06-26 Richard Biener <rguenther@suse.de>
17050 PR middle-end/86271
17051 * fold-const.c (fold_convertible_p): Pointer extension
17054 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
17057 * dwarf2out.c (loc_list_has_views): Adjust comments.
17058 (dw_loc_list): Split single cross-partition range with
17061 2018-06-25 Jeff Law <law@redhat.com>
17063 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
17064 on -mbig-switch by default.
17066 * config/v850/predicates.md (const_float_1_operand): Fix match_code
17068 (const_float_0_operand): Remove unused predicate.
17069 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
17070 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
17071 (recipsf2): New expander. Original pattern now called
17073 (recipdf2, recipdf2_insn): Similarly.
17074 (rsqrtsf2, rsqrtsf2_insn): Similarly
17075 (rsqrtdf2, rsqrtdf2_insn): Similarly
17077 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
17079 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
17080 Simplify logic for FreeBSD (twice).
17082 2018-06-25 Martin Sebor <msebor@redhat.com>
17084 PR tree-optimization/86204
17085 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
17086 a strnlen result if it's less than the length of the string.
17088 2018-06-25 Martin Sebor <msebor@redhat.com>
17090 PR tree-optimization/85700
17091 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
17092 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
17093 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
17095 2018-06-25 Martin Sebor <msebor@redhat.com>
17097 * doc/extend.texi (Zero-length arrays): Update and clarify.
17099 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
17101 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
17102 added IEEE/IBM long double multilib support on PowerPC little
17103 endian Linux systems.
17104 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
17105 (MULTILIB_DEFAULTS): Likewise.
17106 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17108 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
17109 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
17110 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
17112 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
17114 PR middle-end/86311
17115 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
17116 (REORDER_45): Likewise.
17118 2018-06-25 Jeff Law <law@redhat.com>
17120 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
17121 dividend to 32 bits. Adjust length.
17122 (udivmodhi4): Cleanup output template. Fix length.
17124 2018-06-25 Carl Love <cel@us.ibm.com>
17126 * config/rs6000/vsx.md: Change word selector to prefered location.
17128 2018-06-25 Richard Biener <rguenther@suse.de>
17130 PR tree-optimization/86304
17131 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
17132 epilogue-if-converted loops as well.
17134 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
17136 * lto-section-out.c (lto_begin_section): Do not print section
17137 name for noaddr and unnumbered dumps.
17139 2018-06-25 Richard Biener <rguenther@suse.de>
17141 * tree-vectorizer.h (struct vec_info_shared): New structure
17142 with parts split out from struct vec_info and loop_nest from
17143 struct _loop_vec_info.
17144 (struct vec_info): Adjust accordingly.
17145 (struct _loop_vec_info): Likewise.
17146 (LOOP_VINFO_LOOP_NEST): Adjust.
17147 (LOOP_VINFO_DATAREFS): Likewise.
17148 (LOOP_VINFO_DDRS): Likewise.
17149 (struct _bb_vec_info): Likewise.
17150 (BB_VINFO_DATAREFS): Likewise.
17151 (BB_VINFO_DDRS): Likewise.
17152 (struct _stmt_vec_info): Add dr_aux member.
17153 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
17154 (DR_MISALIGNMENT_UNINITIALIZED): New.
17155 (set_dr_misalignment): Adjust.
17156 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
17157 (vect_analyze_loop): Adjust prototype.
17158 (vect_analyze_loop_form): Likewise.
17159 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17160 Compute dependences lazily.
17161 (vect_record_base_alignments): Use shared datarefs/ddrs.
17162 (vect_verify_datarefs_alignment): Likewise.
17163 (vect_analyze_data_refs_alignment): Likewise.
17164 (vect_analyze_data_ref_accesses): Likewise.
17165 (vect_analyze_data_refs): Likewise.
17166 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
17167 constructor parameter for shared part.
17168 (vect_analyze_loop_form): Pass in shared part and adjust.
17169 (vect_analyze_loop_2): Pass in storage for the number of
17170 stmts. Move loop nest finding to the caller. Compute
17172 (vect_analyze_loop): Pass in shared part.
17173 (vect_transform_loop): Verify shared datarefs are unchanged.
17174 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
17175 constructor parameter for shared part.
17176 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
17177 (vect_slp_bb): Verify shared datarefs are unchanged before
17179 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
17181 (new_stmt_vec_info): Initialize DR_AUX misalignment to
17182 DR_MISALIGNMENT_UNINITIALIZED.
17183 * tree-vectorizer.c (vec_info::vec_info): Add constructor
17184 parameter for shared part.
17185 (vec_info::~vec_info): Adjust.
17186 (vec_info_shared::vec_info_shared): New.
17187 (vec_info_shared::~vec_info_shared): Likewise.
17188 (vec_info_shared::save_datarefs): Likewise.
17189 (vec_info_shared::check_datarefs): Likewise.
17190 (try_vectorize_loop_1): Construct shared part live for analyses
17191 of a single loop for multiple vector sizes.
17192 * tree-parloops.c (gather_scalar_reductions): Adjust.
17194 2018-06-25 Richard Biener <rguenther@suse.de>
17196 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
17197 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
17198 (vect_analyze_data_refs): Remove similar code from here and
17199 simplify accordingly.
17201 2018-06-25 Richard Biener <rguenther@suse.de>
17203 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
17204 for reverse storage order accesses rather than asserting
17205 they cannot happen here.
17207 2018-06-25 Tom de Vries <tdevries@suse.de>
17210 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
17211 Use data16 instead of .byte for insn prefix.
17213 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
17216 * parser.c (make_char_string_pack): Pass this literal chars
17217 through cpp_interpret_string.
17218 (cp_parser_userdef_numeric_literal): Check the result of
17219 make_char_string_pack.
17221 2018-06-24 Maya Rashish <coypu@sdf.org>
17223 * ginclude/stddef.h: Simplify conditions around avoiding
17224 re-definition of __size_t.
17226 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
17228 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
17229 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
17231 2018-06-22 Maya Rashish <coypu@sdf.org>
17233 * doc/invoke.texi (mno-fancy-math-387): Update for changes
17234 made to OpenBSD and NetBSD through the years.
17236 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
17238 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17239 behavior of vec_pack (vector double, vector double) to match
17240 behavior of vec_float2 (vector double, vector double).
17242 2018-06-22 Olivier Hainque <hainque@adacore.com>
17244 * gimplify.c (gimplify_function_tree): Prevent creation
17245 of a trampoline for the address of the current function
17246 passed to entry/exit instrumentation hooks.
17248 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
17251 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
17254 2018-06-22 Martin Liska <mliska@suse.cz>
17256 PR tree-optimization/86263
17257 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17258 Bail out if is_enabled is false.
17259 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
17261 (jump_table_cluster::is_enabled): New function.
17263 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
17265 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
17266 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
17267 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
17268 (lto_input_ts_binfo_tree_pointers): Likewise.
17269 * tree-streamer-out.c (streamer_write_tree_bitfields,
17270 write_ts_binfo_tree_pointers): Likewise.
17271 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
17273 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
17275 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
17277 2018-06-22 Martin Liska <mliska@suse.cz>
17279 * symbol-summary.h (get): Make it pure and inline move
17280 functionality from ::get function.
17281 (get): Remove and inline into ::get and ::get_create.
17282 (get_create): Move code from ::get function.
17284 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17287 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
17288 -x assembler-with-cpp.
17290 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17292 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
17293 _FILE_OFFSET_BITS=64 for C++.
17295 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
17297 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
17298 conversion insn that shows up when pr85657-3.c is compiled using
17299 IEEE 128-bit long double.
17300 (neg<mode>2_internal): Use the correct mode to check whether the
17301 mode is IBM extended.
17302 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
17303 multiply and divide external functions from being created more
17306 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
17308 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
17310 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
17311 the edge can be forwarded.
17312 (cfg_layout_merge_blocks): Likewise.
17314 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
17316 * except.c (finish_eh_generation): Commit edge insertions only after
17317 the EH edges have been redirected from post-landing to landing pads.
17319 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
17321 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
17322 create_tmp_var_for to create the FRAME decl.
17323 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
17325 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
17327 * tree-inline.c (copy_edges_for_bb): Minor tweak.
17328 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
17329 debug statement when resetting its value.
17330 (expand_call_inline): Copy the locus of the call onto the assignment
17331 of the return value, if any. Use local variable in more cases.
17333 2018-06-21 Martin Liska <mliska@suse.cz>
17335 * ipa-pure-const.c (propagate_nothrow): Use
17336 funct_state_summaries->get.
17337 (dump_malloc_lattice): Likewise.
17338 (propagate_malloc): Likewise.
17340 2018-06-21 Richard Biener <rguenther@suse.de>
17342 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
17343 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
17344 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
17346 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
17347 BLOCK_ABSTRACT_ORIGIN unconditionally.
17349 2018-06-21 David Malcolm <dmalcolm@redhat.com>
17351 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
17353 * ipa-reference.c (ipa_reference_c_finalize): Delete
17354 ipa_ref_opt_sum_summaries and set it to NULL.
17356 2018-06-21 Tom de Vries <tdevries@suse.de>
17358 PR tree-optimization/85859
17359 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
17360 test with comment from bb_no_side_effects_p.
17362 2018-06-21 Richard Biener <rguenther@suse.de>
17364 PR tree-optimization/86232
17365 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
17366 max for constant niter.
17368 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
17370 * config/aarch64/aarch64-simd.md
17371 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
17373 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
17375 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
17376 Make opernads of the unspec commutative.
17378 2018-06-21 Richard Biener <rguenther@suse.de>
17380 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
17381 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
17382 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
17383 (vect_analyze_data_ref_dependence): Re-order checks to deal with
17385 (vect_record_base_alignments): Do not record base alignment
17386 for gathers or scatters.
17387 (vect_compute_data_ref_alignment): Drop return value that is always
17388 true. Bail out early for gathers or scatters.
17389 (vect_enhance_data_refs_alignment): Bail out early for gathers
17391 (vect_find_same_alignment_drs): Likewise.
17392 (vect_analyze_data_refs_alignment): Remove dead code.
17393 (vect_slp_analyze_and_verify_node_alignment): Likewise.
17394 (vect_analyze_data_refs): For possible gathers or scatters do
17395 not create an alternate DR, just check their possible validity
17396 and mark them. Adjust DECL_NONALIASED handling to not rely
17397 on DR_BASE_ADDRESS.
17398 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
17399 update inits of gathers or scatters.
17400 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
17401 Also copy gather/scatter flag to pattern vinfo.
17403 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
17405 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17406 behavior of vec_packsu (vector unsigned long long, vector unsigned
17407 long long) to match behavior of vec_packs with same signature.
17409 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
17410 Thomas Schwinge <thomas@codesourcery.com>
17411 Cesar Philippidis <cesar@codesourcery.com>
17413 * gimplify.c (gimplify_scan_omp_clauses): Add support for
17414 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17415 (gimplify_adjust_omp_clauses): Likewise.
17416 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
17417 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
17418 (gimplify_omp_target_update): Update handling of acc update and
17420 * omp-low.c (install_var_field): Remove unused parameter
17421 base_pointers_restrict.
17422 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
17423 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
17425 (omp_target_base_pointers_restrict_p): Delete.
17426 (scan_omp_target): Update call to scan_sharing_clauses.
17427 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
17429 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
17430 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17431 (convert_local_omp_clauses): Likewise.
17432 * tree-pretty-print.c (dump_omp_clause): Likewise.
17433 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
17435 (omp_clause_code_name): Likewise.
17437 2018-06-20 Jakub Jelinek <jakub@redhat.com>
17440 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
17443 PR tree-optimization/86231
17444 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
17445 anti-range don't overwrite *vr0min before using it to compute *vr0max.
17447 2018-06-20 Tom de Vries <tdevries@suse.de>
17449 PR tree-optimization/86097
17450 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
17451 iv type if signedness of iv type is not the same as that of *nit.
17453 2018-06-20 Jakub Jelinek <jakub@redhat.com>
17455 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
17456 EDGE_EH edges, verify they are all EDGE_EH.
17458 2018-06-20 Maya Rashish <coypu@sdf.org>
17460 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
17462 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17464 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
17465 * config/aarch64/aarch64.c (xgene1_tunings): Add
17466 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
17467 (aarch64_mode_valid_for_sched_fusion_p):
17468 Allow 16-byte modes.
17469 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
17470 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
17472 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
17474 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
17475 * config/aarch64/iterators.md (VQ2): New mode iterator.
17477 2018-06-20 Martin Liska <mliska@suse.cz>
17479 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
17480 Change default ratio from 10 to 8.
17482 2018-06-20 Martin Liska <mliska@suse.cz>
17484 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17486 (bit_test_cluster::find_bit_tests): Likewise.
17487 (switch_decision_tree::analyze_switch_statement): Find clusters.
17488 * tree-switch-conversion.h (struct jump_table_cluster): Document
17491 2018-06-20 Martin Liska <mliska@suse.cz>
17493 * tree-switch-conversion.c (switch_conversion::collect):
17494 Record m_uniq property.
17495 (switch_conversion::expand): Bail out for special conditions.
17496 (group_cluster::~group_cluster): New.
17497 (group_cluster::group_cluster): Likewise.
17498 (group_cluster::dump): Likewise.
17499 (jump_table_cluster::emit): New.
17500 (switch_decision_tree::fix_phi_operands_for_edges): New.
17501 (struct case_node): Remove struct.
17502 (jump_table_cluster::can_be_handled): New.
17503 (case_values_threshold): Moved to header.
17504 (reset_out_edges_aux): Likewise.
17505 (jump_table_cluster::is_beneficial): New.
17506 (bit_test_cluster::can_be_handled): Likewise.
17507 (add_case_node): Remove.
17508 (bit_test_cluster::is_beneficial): New.
17509 (case_bit_test::cmp): New.
17510 (bit_test_cluster::emit): New.
17511 (expand_switch_as_decision_tree_p): Remove.
17512 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
17513 (fix_phi_operands_for_edge): Likewise.
17514 (switch_decision_tree::analyze_switch_statement): New.
17515 (compute_cases_per_edge): Move ...
17516 (switch_decision_tree::compute_cases_per_edge): ... here.
17517 (try_switch_expansion): Likewise.
17518 (switch_decision_tree::try_switch_expansion): Likewise.
17519 (record_phi_operand_mapping): Likewise.
17520 (switch_decision_tree::record_phi_operand_mapping): Likewise.
17521 (emit_case_decision_tree): Likewise.
17522 (switch_decision_tree::emit): Likewise.
17523 (balance_case_nodes): Likewise.
17524 (switch_decision_tree::balance_case_nodes): Likewise.
17525 (dump_case_nodes): Likewise.
17526 (switch_decision_tree::dump_case_nodes): Likewise.
17527 (emit_jump): Likewise.
17528 (switch_decision_tree::emit_jump): Likewise.
17529 (emit_cmp_and_jump_insns): Likewise.
17530 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
17531 (emit_case_nodes): Likewise.
17532 (switch_decision_tree::emit_case_nodes): Likewise.
17533 (conditional_probability): Remove.
17534 * tree-switch-conversion.h (enum cluster_type): New.
17536 (struct cluster): Likewise.
17537 (cluster::cluster): Likewise.
17538 (struct simple_cluster): Likewise.
17539 (simple_cluster::simple_cluster): Likewise.
17540 (struct group_cluster): Likewise.
17541 (struct jump_table_cluster): Likewise.
17542 (struct bit_test_cluster): Likewise.
17543 (struct min_cluster_item): Likewise.
17544 (struct case_tree_node): Likewise.
17545 (case_tree_node::case_tree_node): Likewise.
17546 (jump_table_cluster::case_values_threshold): Likewise.
17547 (struct case_bit_test): Likewise.
17548 (struct switch_decision_tree): Likewise.
17549 (struct switch_conversion): Likewise.
17550 (switch_decision_tree::reset_out_edges_aux): Likewise.
17552 2018-06-20 Martin Liska <mliska@suse.cz>
17554 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
17555 (hoist_edge_and_branch_if_true): Likewise.
17556 (expand_switch_using_bit_tests_p): Likewise.
17557 (struct case_bit_test): Likewise.
17558 (case_bit_test_cmp): Likewise.
17559 (emit_case_bit_tests): Likewise.
17560 (switch_conversion::switch_conversion): New class.
17561 (struct switch_conv_info): Remove old struct.
17562 (collect_switch_conv_info): More to ...
17563 (switch_conversion::collect): ... this.
17564 (check_range): Likewise.
17565 (switch_conversion::check_range): Likewise.
17566 (check_all_empty_except_final): Likewise.
17567 (switch_conversion::check_all_empty_except_final): Likewise.
17568 (check_final_bb): Likewise.
17569 (switch_conversion::check_final_bb): Likewise.
17570 (create_temp_arrays): Likewise.
17571 (switch_conversion::create_temp_arrays): Likewise.
17572 (free_temp_arrays): Likewise.
17573 (gather_default_values): Likewise.
17574 (switch_conversion::gather_default_values): Likewise.
17575 (build_constructors): Likewise.
17576 (switch_conversion::build_constructors): Likewise.
17577 (constructor_contains_same_values_p): Likewise.
17578 (switch_conversion::contains_same_values_p): Likewise.
17579 (array_value_type): Likewise.
17580 (switch_conversion::array_value_type): Likewise.
17581 (build_one_array): Likewise.
17582 (switch_conversion::build_one_array): Likewise.
17583 (build_arrays): Likewise.
17584 (switch_conversion::build_arrays): Likewise.
17585 (gen_def_assigns): Likewise.
17586 (switch_conversion::gen_def_assigns): Likewise.
17587 (prune_bbs): Likewise.
17588 (switch_conversion::prune_bbs): Likewise.
17589 (fix_phi_nodes): Likewise.
17590 (switch_conversion::fix_phi_nodes): Likewise.
17591 (gen_inbound_check): Likewise.
17592 (switch_conversion::gen_inbound_check): Likewise.
17593 (process_switch): Use the newly created class.
17594 (switch_conversion::expand): New.
17595 (switch_conversion::~switch_conversion): New.
17596 * tree-switch-conversion.h: New file.
17598 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17600 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
17601 tree-vect-patterns.c.
17602 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
17603 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
17604 (vect_recog_sad_pattern): Likewise.
17605 (vect_recog_widen_sum_pattern): Likewise.
17606 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
17607 (vect_recog_widen_shift_pattern): Remove the type_in argument.
17608 (vect_recog_rotate_pattern): Likewise.
17609 (vect_recog_mult_pattern): Likewise.
17610 (vect_recog_vector_vector_shift_pattern): Likewise.
17611 (vect_recog_divmod_pattern): Likewise.
17612 (vect_recog_mixed_size_cond_pattern): Likewise.
17613 (vect_recog_bool_pattern): Likewise.
17614 (vect_recog_mask_conversion_pattern): Likewise.
17615 (vect_try_gather_scatter_pattern): Likewise.
17616 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
17617 (vect_recog_over_widening_pattern): Likewise.
17618 (vect_recog_gather_scatter_pattern): Likewise.
17619 (vect_recog_func_ptr): Move from tree-vectorizer.h
17620 (vect_vect_recog_func_ptrs): Move further down the file.
17621 (vect_recog_func): Likewise. Remove the third argument.
17622 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
17623 (vect_pattern_recog_1): Expect the pattern function to do any
17624 necessary target tests. Also expect it to provide a vector type.
17625 Remove the type_in handling.
17627 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17629 * tree-vect-patterns.c (vect_pattern_detected): New function.
17630 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
17631 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
17632 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
17633 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
17634 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
17635 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
17636 (vect_recog_mask_conversion_pattern)
17637 (vect_try_gather_scatter_pattern): Likewise.
17639 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17641 * tree-vect-patterns.c (vect_get_internal_def): New function.
17642 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17643 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
17644 (search_type_for_mask_1): Use it.
17646 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17648 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
17649 redundant WIDEN_SUM_EXPR handling.
17650 (vect_recog_sad_pattern): Likewise.
17652 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17654 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
17655 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
17656 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
17657 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
17658 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
17660 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17662 * tree-vect-stmts.c (vectorizable_call): Make sure that we
17663 use the stmt_vec_info of the original bb statement for the
17664 new zero assignment, even if the call is part of a pattern.
17666 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17668 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
17669 that the sequence is attached to the original statement rather
17670 than the pattern statement.
17671 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
17672 PATTERN_DEF_SEQ from the original statement rather than
17673 the main pattern statement.
17674 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
17675 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
17676 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
17678 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
17680 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
17681 definition statements before the early exit for statements that aren't
17683 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
17685 (vect_transform_loop): ...here. Process pattern definition
17686 statements without first checking whether the main pattern
17687 statement is live or relevant.
17689 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
17691 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
17692 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
17694 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
17696 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
17697 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
17698 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
17699 (expand_block_compare): Change select_block_compare_mode call.
17700 (expand_strncmp_align_check): Use new functions, fix comment.
17701 (emit_final_str_compare_gpr): New function.
17702 (expand_strn_compare): Refactor and clean up code.
17703 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
17705 2018-06-19 Tony Reix <tony.reix@atos.com>
17706 Damien Bergamini <damien.bergamini@atos.com>
17707 David Edelsohn <dje.gcc@gmail.com>
17709 * collect2.c (static_obj): New variable.
17710 (static_libs): New variable.
17711 (is_in_list): Uncomment declaration.
17712 (main): Track AIX libraries linked statically.
17713 (is_in_list): Uncomment definition.
17714 (scan_prog_file): Don't add AIX shared libraries initializer
17715 to constructor list if linking statically.
17717 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
17719 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
17721 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
17723 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
17725 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
17728 2018-06-19 Martin Liska <mliska@suse.cz>
17730 * config/i386/i386.c (ix86_can_inline_p): Do not use
17731 ipa_fn_summaries::get_create.
17732 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
17734 (devirtualization_time_bonus): Likewise.
17735 (ipcp_propagate_stage): Likewise.
17736 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17737 (edge_set_predicate): Likewise.
17738 (evaluate_conditions_for_known_args): Likewise.
17739 (evaluate_properties_for_edge): Likewise.
17740 (ipa_call_summary::reset): Tranform to ...
17741 (ipa_call_summary::~ipa_call_summary): ... this.
17742 (ipa_fn_summary::reset): Transform to ...
17743 (ipa_fn_summary::~ipa_fn_summary): ... this.
17744 (ipa_fn_summary_t::remove): Rename to ...
17745 (ipa_fn_summary_t::remove_callees): ... this.
17746 (ipa_fn_summary_t::duplicate): Use placement new
17747 instead of memory copy.
17748 (ipa_call_summary_t::duplicate): Likewise.
17749 (ipa_call_summary_t::remove): Remove.
17750 (dump_ipa_call_summary): Change get_create to get.
17751 (ipa_dump_fn_summary): Dump only when summary exists.
17752 (analyze_function_body): Use symbol_summary::get instead
17754 (compute_fn_summary): Likewise.
17755 (estimate_edge_devirt_benefit): Likewise.
17756 (estimate_edge_size_and_time): Likewise.
17757 (inline_update_callee_summaries): Likewise.
17758 (remap_edge_change_prob): Likewise.
17759 (remap_edge_summaries): Likewise.
17760 (ipa_merge_fn_summary_after_inlining): Likewise.
17761 (write_ipa_call_summary): Likewise.
17762 (ipa_fn_summary_write): Likewise.
17763 (ipa_free_fn_summary): Likewise.
17764 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
17765 (struct ipa_call_summary): Likewise.
17766 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
17768 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
17769 (estimate_size_after_inlining): Likewise.
17770 (estimate_growth): Likewise.
17771 (growth_likely_positive): Likewise.
17772 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17773 (inline_call): Likewise.
17774 * ipa-inline.c (caller_growth_limits): Likewise.
17775 (can_inline_edge_p): Likewise.
17776 (can_inline_edge_by_limits_p): Likewise.
17777 (compute_uninlined_call_time): Likewise.
17778 (compute_inlined_call_time): Likewise.
17779 (want_inline_small_function_p): Likewise.
17780 (edge_badness): Likewise.
17781 (update_caller_keys): Likewise.
17782 (update_callee_keys): Likewise.
17783 (inline_small_functions): Likewise.
17784 (inline_to_all_callers_1): Likewise.
17785 (dump_overall_stats): Likewise.
17786 (early_inline_small_functions): Likewise.
17787 (early_inliner): Likewise.
17788 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17789 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17790 * ipa-pure-const.c (malloc_candidate_p): Likewise.
17791 * ipa-split.c (execute_split_functions): Likewise.
17792 * symbol-summary.h: Likewise.
17793 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17795 2018-06-19 Richard Biener <rguenther@suse.de>
17797 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
17798 (vectorize_loops): ... here. Fix dbgcnt handling.
17799 (try_vectorize_loop): Wrap try_vectorize_loop_1.
17801 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
17804 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
17805 ieee128 argument takes up only one (vector) register, not two (floating
17808 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
17810 * gimplify.c (gimplify_init_constructor): Really never clear for an
17811 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
17813 2018-06-19 Richard Biener <rguenther@suse.de>
17815 PR tree-optimization/86179
17816 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
17817 after failed recognition.
17819 2018-06-18 Martin Sebor <msebor@redhat.com>
17821 PR middle-end/85602
17822 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
17823 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
17824 Handle integer subtraction.
17825 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
17826 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
17828 2018-06-18 David Malcolm <dmalcolm@redhat.com>
17830 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
17831 param from rtx to rtx_insn *.
17832 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
17834 (frv_ifcvt_modify_insn): Likwise.
17835 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
17836 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
17837 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
17838 as_a <rtx_insn *> cast to local "unprotected_region" once
17839 it's been established that it's not NULL or pc_rtx.
17840 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
17841 param "sethi" from rtx to rtx_insn *.
17842 (nds32_group_float_insns): Likewise for param "insn".
17843 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
17845 (vax_output_int_subtract): Likewise.
17846 * config/vax/vax.c (vax_output_int_add): Likewise for param
17848 (vax_output_int_subtract): Likewise.
17849 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
17850 (emit_pattern_after): Likewise for param "after".
17851 (emit_insn_after): Likewise.
17852 (emit_jump_insn_after): Likewise.
17853 (emit_call_insn_after): Likewise.
17854 (emit_debug_insn_after): Likewise.
17855 (emit_pattern_before): Likewise for param "before".
17856 (emit_insn_before): Likewise.
17857 (emit_jump_insn_before): Likewise.
17858 * final.c (get_insn_template): Likewise for param "insn", removing
17860 * output.h (get_insn_template): Likewise for 2nd param.
17861 * rtl.h (emit_insn_before): Likewise.
17862 (emit_jump_insn_before): Likewise.
17863 (emit_debug_insn_before_noloc): Likewise.
17864 (emit_insn_after): Likewise.
17865 (emit_jump_insn_after): Likewise.
17866 (emit_call_insn_after): Likewise.
17867 (emit_debug_insn_after): Likewise.
17868 (set_insn_deleted): Likewise for param.
17870 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
17873 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
17874 floating point modes, so that IFmode is numerically greater than
17875 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
17876 to declare the ordering. This prevents IFmode from being
17877 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
17878 machine. Include rs6000-modes.h to share the fractional values
17879 between genmodes* and the rest of the compiler.
17880 (IFmode): Likewise.
17881 (KFmode): Likewise.
17882 (TFmode): Likewise.
17883 * config/rs6000/rs6000-modes.h: New file.
17884 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
17885 meaning of rs6000_long_double_size so that 126..128 selects an
17886 appropriate 128-bit floating point type.
17887 (rs6000_option_override_internal): Likewise.
17888 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
17889 (TARGET_LONG_DOUBLE_128): Change the meaning of
17890 rs6000_long_double_size so that 126..128 selects an appropriate
17891 128-bit floating point type.
17892 (LONG_DOUBLE_TYPE_SIZE): Update comment.
17893 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
17894 source and destination to match the standard usage.
17895 (truncifkf2): Likewise.
17896 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
17897 ISA 2.07 to use an explicit clobber, instead of passing in a
17899 (copysign<mode>3_soft): Likewise.
17901 2018-06-18 David Malcolm <dmalcolm@redhat.com>
17903 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17904 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
17905 (vect_slp_analyze_instance_dependence): Likewise.
17906 (vect_enhance_data_refs_alignment): Likewise.
17907 (vect_analyze_data_refs_alignment): Likewise.
17908 (vect_slp_analyze_and_verify_instance_alignment
17909 (vect_analyze_data_ref_accesses): Likewise.
17910 (vect_prune_runtime_alias_test_list): Likewise.
17911 (vect_analyze_data_refs): Likewise.
17912 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
17913 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17914 (vect_analyze_scalar_cycles_1): Likewise.
17915 (vect_get_loop_niters): Likewise.
17916 (vect_analyze_loop_form_1): Likewise.
17917 (vect_update_vf_for_slp): Likewise.
17918 (vect_analyze_loop_operations): Likewise.
17919 (vect_analyze_loop): Likewise.
17920 (vectorizable_induction): Likewise.
17921 (vect_transform_loop): Likewise.
17922 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
17923 * tree-vect-slp.c (vect_analyze_slp): Likewise.
17924 (vect_make_slp_decision): Likewise.
17925 (vect_detect_hybrid_slp): Likewise.
17926 (vect_slp_analyze_operations): Likewise.
17927 (vect_slp_bb): Likewise.
17928 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
17929 (vectorizable_bswap): Likewise.
17930 (vectorizable_call): Likewise.
17931 (vectorizable_simd_clone_call): Likewise.
17932 (vectorizable_conversion): Likewise.
17933 (vectorizable_assignment): Likewise.
17934 (vectorizable_shift): Likewise.
17935 (vectorizable_operation): Likewise.
17936 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
17938 2018-06-18 Martin Sebor <msebor@redhat.com>
17940 PR tree-optimization/81384
17941 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
17942 * builtins.c (expand_builtin_strnlen): New function.
17943 (expand_builtin): Call it.
17944 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
17945 * builtins.def (BUILT_IN_STRNLEN): New.
17946 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
17947 Warn for bounds in excess of maximum object size.
17948 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
17949 single-value ranges. Handle strnlen.
17950 (handle_builtin_strlen): Handle strnlen.
17951 (strlen_check_and_optimize_stmt): Same.
17952 * doc/extend.texi (Other Builtins): Document strnlen.
17954 2018-06-18 Maya Rashish <coypu@sdf.org>
17956 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
17957 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
17958 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
17960 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
17962 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
17964 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17966 * tree.c (escaped_string::escape): Replace cast to char * by
17967 const_cast<char *> (unescaped).
17969 2018-06-18 Nick Clifton <nickc@redhat.com>
17972 * tree.c (escaped_string): New class. Converts an unescaped
17973 string into its escaped equivalent.
17974 (warn_deprecated_use): Use the new class to convert the
17975 deprecation message, if present.
17976 (test_escaped_strings): New self test.
17977 (test_c_tests): Add test_escaped_strings.
17978 * doc/extend.texi (deprecated): Add a note that the
17979 deprecation message is affected by the -fmessage-length
17980 option, and that control characters will be escaped.
17981 (#pragma GCC error): Document this pragma.
17982 (#pragma GCC warning): Likewise.
17983 * doc/invoke.texi (-fmessage-length): Document this option's
17984 effect on the #warning and #error preprocessor directives and
17985 the deprecated attribute.
17987 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
17989 * tree.c (decl_value_expr_lookup): Revert latest change.
17990 (decl_value_expr_insert): Likewise.
17992 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
17994 * gimplify.c (nonlocal_vlas): Delete.
17995 (nonlocal_vla_vars): Likewise.
17996 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
17998 (gimplify_body): Do not create and destroy nonlocal_vlas.
17999 * tree-nested.c: Include diagnostic.h.
18000 (use_pointer_in_frame): Tweak.
18001 (lookup_field_for_decl): Add assertion and declare the transformation.
18002 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
18003 internal error when the reference is in a wrong context. Do not
18004 create a debug decl by default.
18005 (note_nonlocal_block_vlas): Delete.
18006 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
18007 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
18008 create a debug decl by default.
18009 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
18010 call is in a wrong context.
18011 (fixup_vla_decls): New function.
18012 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
18013 debug variables were created.
18014 * tree.c (decl_value_expr_lookup): Add checking assertion.
18015 (decl_value_expr_insert): Likewise.
18017 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
18019 PR middle-end/82479
18020 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
18021 * tree-scalar-evolution.c (interpret_expr): Likewise.
18022 (expression_expensive_p): Likewise.
18023 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
18024 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
18025 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
18026 (ssa_defined_by_minus_one_stmt_p): New.
18028 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
18030 PR middle-end/64946
18031 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
18032 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
18033 * dojump.c (do_jump): Likewise.
18034 * expr.c (expand_expr_real_2): Check operand type's sign.
18035 * fold-const.c (const_unop): Handle ABSU_EXPR.
18036 (fold_abs_const): Likewise.
18037 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
18038 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
18039 (strip_sign_op_1): Likesise.
18040 * match.pd: Add new pattern to generate ABSU_EXPR.
18041 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
18042 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18043 * tree-eh.c (operation_could_trap_helper_p): Likewise.
18044 * tree-inline.c (estimate_operator_cost): Likewise.
18045 * tree-pretty-print.c (dump_generic_node): Likewise.
18046 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
18047 * tree.def (ABSU_EXPR): New.
18049 2018-06-16 Jakub Jelinek <jakub@redhat.com>
18051 PR middle-end/86095
18052 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
18053 documented as preserved for backward compatibility only.
18054 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
18056 PR rtl-optimization/86108
18057 * bb-reorder.c (create_forwarder_block): Renamed to ...
18058 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
18059 jump from new landing pad to the second part.
18060 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
18063 2018-06-15 Jakub Jelinek <jakub@redhat.com>
18065 PR middle-end/85878
18066 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
18067 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
18068 Only call store_expr for halves if the mode is the same.
18070 PR middle-end/86123
18071 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
18072 Fix up comment formatting.
18074 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
18076 * typed-splay-tree.h (typed_splay_tree::remove): New function.
18077 (typed_splay_tree::closure,
18078 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
18079 (typed_splay_tree::typed_splay_tree,
18080 typed_splay_tree::operator =): Declared private.
18081 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
18082 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
18083 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
18084 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
18085 typed_splay_tree::splay_tree_splay,
18086 typed_splay_tree::splay_tree_foreach_helper,
18087 typed_splay_tree::splay_tree_insert,
18088 typed_splay_tree::splay_tree_remove,
18089 typed_splay_tree::splay_tree_lookup,
18090 typed_splay_tree::splay_tree_predecessor,
18091 typed_splay_tree::splay_tree_successor,
18092 typed_splay_tree::splay_tree_min,
18093 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
18094 (typed_splay_tree::root, typed_splay_tree::comp,
18095 typed_splay_tree::delete_key,
18096 typed_splay_tree::delete_value): New data members.
18097 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
18098 typed_splay_tree::remove.
18100 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
18102 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
18103 -mginv and -mno-ginv to the assembler.
18104 * config/mips/mips.opt (-mcrc): New option.
18105 (-mginv): Likewise.
18106 * doc/invoke.text (-mcrc): Document.
18107 (-mginv): Likewise.
18109 2018-06-15 Nick Clifton <nickc@redhat.com>
18112 * tree.c (escaped_string): New class. Converts an unescaped
18113 string into its escaped equivalent.
18114 (warn_deprecated_use): Use the new class to convert the
18115 deprecation message, if present.
18116 (test_escaped_strings): New self test.
18117 (test_c_tests): Add test_escaped_strings.
18118 * doc/extend.texi (deprecated): Add a note that the
18119 deprecation message is affected by the -fmessage-length
18120 option, and that control characters will be escaped.
18121 (#pragma GCC error): Document this pragma.
18122 (#pragma GCC warning): Likewise.
18123 * doc/invoke.texi (-fmessage-length): Document this option's
18124 effect on the #warning and #error preprocessor directives and
18125 the deprecated attribute.
18127 2018-06-15 Richard Biener <rguenther@suse.de>
18129 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
18130 here, also noting vector size used.
18131 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
18132 size used in MSG_OPTIMIZED_LOCATIONS dump.
18133 (pass_slp_vectorize::execute): Adjust.
18135 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
18138 * config/arc/arc.c (arc_return_address_register): Fix
18141 2018-06-15 Richard Biener <rguenther@suse.de>
18143 PR middle-end/86159
18144 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
18145 leave useless conversion stripping to force_gimple_operand_gsi.
18146 (gimplify_build2): Likewise.
18147 (gimplify_build1): Likewise.
18149 2018-06-15 Richard Biener <rguenther@suse.de>
18151 PR middle-end/86076
18152 * tree-cfg.c (move_stmt_op): unshare invariant addresses
18153 before adjusting their block.
18155 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
18157 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
18158 multilibs for *-*-rtems*.
18159 * config/riscv/t-rtems: New file.
18161 2018-06-14 Jakub Jelinek <jakub@redhat.com>
18163 PR middle-end/86122
18164 * match.pd ((A +- CST1) +- CST2): Punt if last resort
18165 unsigned_type_for returns NULL.
18168 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
18169 subregs of multi-word pseudos unless the float mode has word size.
18171 2018-06-14 Richard Biener <rguenther@suse.de>
18173 PR middle-end/86139
18174 * tree-vect-generic.c (build_word_mode_vector_type): Remove
18175 duplicate and harmful type_hash_canon.
18176 * tree.c (type_hash_canon): Assert we didn't find ourselves.
18178 2018-06-14 Richard Biener <rguenther@suse.de>
18181 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
18184 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
18186 * config/rtems.h (STDINT_LONG32): Define.
18188 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
18189 Prachi Godbole <prachi.godbole@imgtec.com>
18191 * config/mips/mips-cpus.def: Define P6600.
18192 * config/mips/mips-tables.opt: Regenerate.
18193 * config/mips/mips.c (mips_ucbranch_type): New enum.
18194 (mips_rtx_cost_data): Add support for P6600.
18195 (mips_issue_rate): Likewise.
18196 (mips_multipass_dfa_lookahead): Likewise.
18197 (mips_avoid_hazard): Likewise.
18198 (mips_reorg_process_insns): Likewise.
18199 (mips_classify_branch_p6600): New function.
18200 * config/mips/mips.h (TUNE_P6600): New define.
18201 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
18202 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
18203 * config/mips/mips.md: Include p6600.md.
18204 (processor): Add p6600.
18205 * config/mips/p6600.md: New file.
18206 * doc/invoke.texi: Add p6600 to supported architectures.
18208 2018-06-13 Martin Sebor <msebor@redhat.com>
18210 PR tree-optimization/86114
18211 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
18213 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
18215 2018-06-13 Richard Biener <rguenther@suse.de>
18217 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
18218 Properly set vector type of the intermediate stmt.
18219 * tree-vect-stmts.c (vectorizable_operation): The destination
18220 var always has vectype_out type.
18222 2018-06-13 Jeff Law <law@redhat.com>
18224 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
18225 integer 0 for argument to print_rtl_with_bb.
18226 (rl78_reorg): Likewise.
18228 2018-06-13 David Malcolm <dmalcolm@redhat.com>
18230 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
18231 from rtx to rtx_insn *.
18232 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
18234 (add_sched_insns_for_speculation): Likewise for local "target",
18235 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18236 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
18237 from rtx_insn ** to rtx_code_label **.
18238 (reorg_emit_nops): Likewise.
18239 (c6x_reorg): Likewise for local "call_labels".
18240 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
18242 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
18243 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
18244 the loops over LABEL_REFS.
18245 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
18247 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18248 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
18249 (split_branches): Strengthen local "olabel" from rtx to
18250 rtx_insn *, adding a safe_as_a cast.
18251 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
18253 (add_insn_after): Likewise for first two params.
18254 (add_insn_before): Likewise.
18255 (remove_insn): Likewise for param.
18256 (emit_pattern_before_noloc): Likewise for second and third params.
18257 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
18258 (emit_call_insn_before_noloc): Likewise.
18259 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
18261 (emit_barrier_before): Likewise.
18262 (emit_label_before): Strengthen "label" param from "rtx" to
18263 "rtx_code_label *". Strengthen "before" param from "rtx" to
18265 (emit_insn_after_1): Strengthen "after" param from "rtx" to
18267 (emit_pattern_after_noloc): Likewise.
18268 (emit_insn_after_noloc): Likewise.
18269 (emit_jump_insn_after_noloc): Likewise.
18270 (emit_call_insn_after_noloc): Likewise.
18271 (emit_debug_insn_after_noloc): Likewise.
18272 (emit_barrier_after): Likewise.
18273 (emit_label_after): Likewise for both params.
18274 (emit_pattern_after_setloc): Likewise for "after" param. Convert
18275 "loc" param from "int" to "location_t".
18276 (emit_insn_after_setloc): Likewise.
18277 (emit_jump_insn_after_setloc): Likewise.
18278 (emit_call_insn_after_setloc): Likewise.
18279 (emit_debug_insn_after_setloc): Likewise.
18280 (emit_pattern_before_setloc): Likewise for "before" param. Convert
18281 "loc" param from "int" to "location_t".
18282 (emit_pattern_before): Convert NULL_RTX to NULL.
18283 (emit_insn_before_setloc): Convert "loc" param from "int" to
18285 (emit_jump_insn_before_setloc): Likewise.
18286 (emit_call_insn_before_setloc): Likewise.
18287 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
18288 rtx_insn *. Convert "loc" param from "int" to "location_t".
18289 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
18290 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
18291 Convert 3rd param from "int" to "location_t".
18292 (emit_barrier_before, emit_barrier_after, next_real_insn):
18293 Strengthen param from rtx to rtx_insn *.
18294 (emit_label_before): Strengthen 1st param from "rtx" to
18295 "rtx_code_label *". Strengthen 2nd param from "rtx" to
18297 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
18298 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
18299 Strengthen 2nd param from "rtx" to "rtx_insn *".
18300 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
18301 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
18302 Likewise. Convert 3rd param from "int" to "location_t".
18303 (emit_label_after): Strengthen 1st param from "rtx" to
18304 "rtx_code_label *".
18305 (next_real_insn, remove_insn): Strengthen param from "rtx" to
18307 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
18308 from "rtx" to "rtx_insn *".
18310 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
18312 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
18313 bodies streamed in with -Q.
18314 * dumpfile.c (dump_files): Add lto-stream-out dump file.
18315 * dumpfile.h (tree_dump_index): Add lto_stream_out.
18316 * gimple-streamer-out.c: Include gimple-pretty-print.h
18317 (output_bb): Dump stmts streamed.
18318 * lto-section-out.c: Include print-tree.h
18319 (lto_begin_section): Dump sections created.
18320 (lto_output_decl_index): Dump decl encoded.
18321 * lto-streamer-out.c: Include print-tree.h
18322 (create_output_block): Dump output block created.
18323 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
18324 (output_function): Dump function output.
18325 (output_constructor): Dump constructor streamed.
18326 (write_global_stream): Output indexes encoded.
18327 (produce_asm_for_decls): Dump streams encoded.
18328 * lto-streamer.c (streamer_dump_file): New global var.
18329 * lto-streamer.h (streamer_dump_file): Declare.
18330 * passes.c (ipa_write_summaries): Initialize streamer dump.
18331 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
18334 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
18337 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
18338 offsets for register save directives. Emit a second batch of save
18339 directives, if need be, when the function accesses prior frames.
18341 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18343 * config/arc/fpu.md (fmasf4): Force operand to register.
18344 (fnmasf4): Likewise.
18346 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18348 * config/arc/arc-protos.h (arc_pad_return): Remove.
18349 * config/arc/arc.c (machine_function): Remove force_short_suffix
18351 (arc_print_operand): Adjust printing of '&'.
18352 (arc_verify_short): Remove conditional printing of short suffix.
18353 (arc_final_prescan_insn): Remove reference to size_reason.
18354 (pad_return): New function.
18355 (arc_reorg): Call pad_return.
18356 (arc_pad_return): Remove.
18357 (arc_init_machine_status): Remove reference to force_short_suffix.
18358 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
18359 (attr length): When attribute iscompact is true force to 2
18360 regardless; in the case of maybe check if we want to force the
18361 instruction to have 4 bytes length.
18362 (nopv): Change it to generate 4 byte long nop as well.
18363 (blockage): New pattern.
18364 (simple_return): Remove call to arc_pad_return.
18365 (p_return_i): Likewise.
18367 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18369 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
18371 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18373 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
18376 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18378 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
18379 for ARC700 and ARCv2.
18381 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
18384 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
18385 operands[2] instead of operands[1].
18388 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
18390 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
18391 case, check whether the outer register overlaps an unallocatable
18392 register, not just whether it fits the required class.
18394 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
18396 * poly-int.h (can_div_trunc_p): Add new overload in which all values
18398 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
18399 (memrefs_conflict_p): Likewise.
18400 (init_alias_analysis): Likewise.
18401 * cfgexpand.c (expand_debug_expr): Likewise.
18402 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
18403 * cse.c (fold_rtx): Likewise.
18404 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
18405 * expr.c (emit_block_move_hints): Likewise.
18406 (clear_storage_hints, push_block, emit_push_insn): Likewise.
18407 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
18408 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
18409 (emit_group_store): Likewise.
18410 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
18411 to read the PRE/POST_MODIFY increment.
18412 * calls.c (store_one_arg): Use strip_offset.
18413 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
18415 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
18417 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
18418 (simplify_binary_operation_1): Extend CONST_INT handling to
18420 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
18421 than a HOST_WIDE_INT.
18422 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
18424 (adjust_mems, add_stores): Update accodingly.
18425 (vt_canonicalize_addr): Track polynomial offsets.
18426 (emit_note_insn_var_location): Likewise.
18427 (vt_add_function_parameter): Likewise.
18428 (vt_initialize): Likewise.
18430 2018-06-12 Jeff Law <law@redhat.com>
18432 * config.gcc (alpha*-*-freebsd*): Remove.
18433 * config/alpha/freebsd.h: Remove.
18435 2018-06-12 David Malcolm <dmalcolm@redhat.com>
18438 * spellcheck-tree.c (levenshtein_distance): Rename to...
18439 (get_edit_distance): ...this, and update for underlying renaming.
18440 * spellcheck-tree.h (levenshtein_distance): Rename to...
18441 (get_edit_distance): ...this.
18442 * spellcheck.c (levenshtein_distance): Rename to...
18443 (get_edit_distance): ...this. Convert from Levenshtein distance
18444 to Damerau-Levenshtein distance by supporting transpositions of
18445 adjacent characters. Rename "v1" to "v_next" and "v0" to
18447 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
18448 (selftest::test_edit_distance_unit_test_oneway): ...this, and
18449 update for underlying renaming.
18450 (selftest::levenshtein_distance_unit_test): Rename to...
18451 (selftest::test_get_edit_distance_unit): ...this, and update for
18452 underlying renaming.
18453 (selftest::test_find_closest_string): Add example from PR 69968
18454 where transposition helps
18455 (selftest::test_metric_conditions): Update for renaming.
18456 (selftest::test_metric_conditions): Likewise.
18457 (selftest::spellcheck_c_tests): Likewise.
18458 * spellcheck.h (levenshtein_distance): Rename both overloads to...
18459 (get_edit_distance): ...this.
18460 (best_match::consider): Update for renaming.
18462 2018-06-12 Martin Sebor <msebor@redhat.com>
18464 PR tree-optimization/85259
18465 * builtins.c (compute_objsize): Handle constant offsets.
18466 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
18467 true iff a warning has been issued.
18468 * gimple.h (gimple_nonartificial_location): New function.
18469 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
18470 gimple_nonartificial_location and handle -Wno-system-headers.
18471 (handle_builtin_stxncpy): Same.
18473 2018-06-12 Martin Sebor <msebor@redhat.com>
18476 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
18478 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
18480 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
18481 BUILTIN_VEC_XST entries for pointer to double and long long.
18483 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
18486 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18488 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18491 2018-06-12 Martin Liska <mliska@suse.cz>
18493 * doc/options.texi: Document IntegerRange.
18495 2018-06-12 Martin Liska <mliska@suse.cz>
18497 * config/i386/i386.opt: Make MPX-related options as Deprecated.
18498 * opt-functions.awk: Handle Deprecated flag.
18499 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
18501 (read_cmdline_option): Report warning for a deprecated option.
18502 * opts.h (struct cl_option): Add new field cl_deprecated.
18503 (CL_ERR_DEPRECATED): New.
18505 2018-06-12 Martin Liska <mliska@suse.cz>
18507 * doc/options.texi: Document Deprecated option flag.
18509 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18511 * config/arc/arc-arch.h (arc_extras): New enum.
18512 (arc_cpu_t):Add field extra.
18513 (arc_cpu_types): Consider the extras.
18514 * config/arc/arc-cpus.def: Add extras info.
18515 * config/arc/arc-opts.h (processor_type): Consider extra field.
18516 * config/arc/arc.c (arc_override_options): Handle extra field.
18518 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
18520 * config/arc/arc-arch.h: Update ARC_OPTX macro.
18521 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
18523 * config/arc/arc.c (arc_init): Update pic warning.
18524 (irq_range): Update irq range parsing warnings.
18525 (arc_override_options): Update various warning messages.
18526 (arc_handle_aux_attribute): Likewise.
18528 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
18530 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
18532 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18534 * doc/sourcebuild.texi: Document usage of line number 0 in verify
18535 compiler messages directives.
18537 2018-06-12 Matthew Fortune <mfortune@gmail.com>
18539 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
18540 * config/mips/mips-tables.opt: Regenerate.
18541 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
18543 * doc/invoke.texi: Document -march=i6500.
18545 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
18547 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
18548 (i6400_gpmul): Add cpu_unit.
18549 (i6400_gpdiv): Likewise.
18550 (i6400_msa_add_d): Update reservations.
18551 (i6400_msa_int_add) Likewise.
18552 (i6400_msa_short_logic3) Likewise.
18553 (i6400_msa_short_logic2) Likewise.
18554 (i6400_msa_short_logic) Likewise.
18555 (i6400_msa_move) Likewise.
18556 (i6400_msa_cmp) Likewise.
18557 (i6400_msa_short_float2) Likewise.
18558 (i6400_msa_div_d) Likewise.
18559 (i6400_msa_long_logic1) Likewise.
18560 (i6400_msa_long_logic2) Likewise.
18561 (i6400_msa_mult) Likewise.
18562 (i6400_msa_long_float2) Likewise.
18563 (i6400_msa_long_float4) Likewise.
18564 (i6400_msa_long_float5) Likewise.
18565 (i6400_msa_long_float8) Likewise.
18566 (i6400_fpu_fadd): Include frint type.
18567 (i6400_fpu_store): New define_insn_reservation.
18568 (i6400_fpu_load): Likewise.
18569 (i6400_fpu_move): Likewise.
18570 (i6400_fpu_fcmp): Likewise.
18571 (i6400_fpu_fmadd): Likewise.
18572 (i6400_int_mult): Include imul3nc type and update reservation.
18573 (i6400_int_div): Include idiv3 type and update reservation.
18574 (i6400_int_load): Update to check type not move_type.
18575 (i6400_int_store): Likewise.
18576 (i6400_int_prefetch): Set zero latency.
18578 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
18580 * gcc.c: Document new %@{...} sequence.
18581 (LINK_COMMAND_SPEC): Use it for the -L switches.
18582 (cpp_unique_options): Use it for the -I switches.
18583 (at_file_argbuf): New global variable.
18584 (in_at_file): Likewise.
18585 (alloc_args): Create at_file_argbuf.
18586 (clear_args): Truncate at_file_argbuf.
18587 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
18588 (open_at_file): New function.
18589 (close_at_file): Likewise.
18590 (create_at_file): Delete.
18591 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
18594 (validate_switches_from_spec): Deal with %@{...} sequence.
18595 (validate_switches): Likewise.
18596 (driver::finalize): Call clear_args.
18598 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
18600 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
18602 2018-06-11 Martin Sebor <msebor@redhat.com>
18604 * doc/invoke.texi (-Wall): List -Wc++17-compat.
18605 (Wno-class-memaccess): Add @opindex.
18606 (Wno-templates, Wno-multiple-inheritance): Same.
18607 (Wno-virtual-inheritance, Wno-namespaces): Same.
18608 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
18609 (Wno-format-overflow, Wno-format-truncation): Same.
18610 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
18611 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
18612 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
18613 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
18614 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
18615 (Wno-misspelled-isr): Same.
18617 2018-06-11 Martin Sebor <msebor@redhat.com>
18619 * PR tree-optimization/86083
18620 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
18622 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
18624 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
18626 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
18629 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
18630 on the correct operand.
18631 (*movdi_internal64): Ditto.
18633 2018-06-11 Martin Liska <mliska@suse.cz>
18635 PR tree-optimization/86089
18636 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
18638 2018-06-11 Julia Koval <julia.koval@intel.com>
18640 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
18641 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
18642 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
18644 2018-06-11 Olivier Hainque <hainque@adacore.com>
18646 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
18647 for Ada with strict dwarf2.
18649 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
18652 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
18655 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
18657 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
18659 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
18661 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
18664 2018-06-08 Martin Liska <mliska@suse.cz>
18666 * tree-cfg.h (debug_function): Fix argument type to match
18669 2018-06-08 Martin Liska <mliska@suse.cz>
18671 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
18672 Remove usage of MPX-related (and removed) fields.
18673 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
18675 2018-06-08 David Malcolm <dmalcolm@redhat.com>
18677 * cfg.c (debug): Use TDF_NONE rather than 0.
18678 * cfghooks.c (debug): Likewise.
18679 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
18680 (struct dump_option_value_info): Convert to...
18681 (struct kv_pair): ...this template type.
18682 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
18684 (optinfo_verbosity_options): Likewise.
18685 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
18687 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
18688 than int for "optgroup_flags" param.
18689 (dump_generic_expr_loc): Use dump_flags_t rather than int for
18691 (dump_dec): Likewise.
18692 (dump_finish): Use TDF_NONE rather than 0.
18693 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
18694 rather than int for "optgroup_flags" param. Use TDF_NONE rather
18695 than 0. Update for change to option_ptr.
18696 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
18697 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
18698 0. Update for changes to optinfo_verbosity_options and
18700 (opt_info_switch_p): Convert optgroup_flags from int to
18702 (dump_basic_block): Use dump_flags_t rather than int
18703 for "dump_kind" param.
18704 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
18705 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
18706 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
18707 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
18708 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
18709 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
18710 TDF_NONE): Convert from macros to...
18711 (enum dump_flag): ...this new enum.
18712 (dump_flags_t): Update to use enum.
18713 (operator|, operator&, operator~, operator|=, operator&=):
18714 Implement for dump_flags_t.
18715 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
18716 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
18717 Convert from macros to...
18718 (enum optgroup_flag): ...this new enum.
18719 (optgroup_flags_t): New typedef.
18720 (operator|, operator|=): Implement for optgroup_flags_t.
18721 (struct dump_file_info): Convert field "alt_flags" to
18722 dump_flags_t. Convert field "optgroup_flags" to
18724 (dump_basic_block): Use dump_flags_t rather than int for param.
18725 (dump_generic_expr_loc): Likewise.
18726 (dump_dec): Likewise.
18727 (dump_register): Convert param "optgroup_flags" to
18729 (opt_info_enable_passes): Likewise.
18730 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
18732 * gimple-pretty-print.c (debug): Likewise.
18733 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
18734 (merged_store_group::apply_stores): Likewise.
18735 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
18736 * gimple.c (verify_gimple_pp): Likewise.
18737 * graphite-poly.c (print_pbb_body): Likewise.
18738 * passes.c (pass_manager::register_one_dump_file): Convert
18739 local "optgroup_flags" to optgroup_flags_t.
18740 * print-tree.c (print_node): Use TDF_NONE rather than 0.
18742 (debug_body): Likewise.
18743 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
18744 to optgroup_flags_t.
18745 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
18747 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
18748 (convert_mult_to_fma): Likewise.
18749 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
18750 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
18751 * tree-vect-data-refs.c (dump_lower_bound): Convert param
18752 "dump_kind" to dump_flags_t.
18754 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
18756 * config/rs6000/rs6000.c (min, max): Delete.
18758 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
18760 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
18761 -mabi=spe and -mabi=no-spe.
18763 2018-06-08 Martin Liska <mliska@suse.cz>
18765 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
18766 where we expect an existing summary.
18768 2018-06-08 Martin Liska <mliska@suse.cz>
18770 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
18771 * ipa-inline.h (estimate_edge_growth): Likewise.
18773 2018-06-08 Martin Liska <mliska@suse.cz>
18775 * cgraph.c (function_version_hasher::hash): Use
18776 cgraph_node::get_uid ().
18777 (function_version_hasher::equal):
18778 * cgraph.h (cgraph_node::get_uid): New method.
18779 * ipa-inline.c (update_caller_keys): Use
18780 cgraph_node::get_uid ().
18781 (update_callee_keys): Likewise.
18782 * ipa-utils.c (searchc): Likewise.
18783 (ipa_reduced_postorder): Likewise.
18784 * lto-cgraph.c (input_node): Likewise.
18785 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
18786 * symbol-summary.h (symtab_insertion): Likewise.
18787 (symtab_removal): Likewise.
18788 (symtab_duplication): Likewise.
18789 * tree-pretty-print.c (dump_function_header): Likewise.
18790 * tree-sra.c (convert_callers_for_node): Likewise.
18792 2018-06-08 Martin Liska <mliska@suse.cz>
18794 * cgraph.c (symbol_table::create_edge): Always assign a new
18796 (symbol_table::free_edge): Do not recycle numbers.
18797 * cgraph.h (cgraph_edge::get): New method.
18798 * symbol-summary.h (symtab_removal): Use it.
18799 (symtab_duplication): Likewise.
18800 (call_summary::hashable_uid): Remove.
18802 2018-06-08 Martin Liska <mliska@suse.cz>
18804 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
18805 (initialize_growth_caches): Remove.
18806 (free_growth_caches): Likewise.
18807 (do_estimate_edge_time): Use edge_growth_cache.
18808 (do_estimate_edge_size): Likewise.
18809 (do_estimate_edge_hints): Likewise.
18810 * ipa-inline.c (reset_edge_caches): Likewise.
18811 (recursive_inlining): Likewise.
18812 (inline_small_functions): Likewise.
18813 * ipa-inline.h (initialize_growth_caches): Remove.
18814 (estimate_edge_size): Likewise.
18815 (estimate_edge_time): Likewise.
18816 (estimate_edge_hints): Likewise.
18817 (reset_edge_growth_cache): Likewise.
18818 * symbol-summary.h (call_summary::remove): New method.
18820 2018-06-08 Martin Liska <mliska@suse.cz>
18822 * ipa-cp.c (class edge_clone_summary): New summary.
18823 (grow_edge_clone_vectors): Remove.
18824 (ipcp_edge_duplication_hook): Remove.
18825 (class edge_clone_summary_t): New call_summary class.
18826 (ipcp_edge_removal_hook): Remove.
18827 (edge_clone_summary_t::duplicate): New function.
18828 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
18829 (create_specialized_node): Likewise.
18830 (ipcp_driver): Initialize edge_clone_summaries and do not
18833 2018-06-08 Martin Liska <mliska@suse.cz>
18835 * symbol-summary.h (get): New function.
18836 (call_summary::m_initialize_when_cloning): New class member.
18838 2018-06-08 Martin Liska <mliska@suse.cz>
18840 * cgraph.c (cgraph_node::remove): Do not recycle uid.
18841 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
18842 (symbol_table::allocate_cgraph_symbol): Do not set uid.
18843 * passes.c (uid_hash_t): Record removed_nodes by their uids.
18844 (remove_cgraph_node_from_order): Use the removed_nodes set.
18845 (do_per_function_toporder): Likwise.
18846 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
18847 instead of summary_uid.
18848 (symtab_removal): Likewise.
18849 (symtab_duplication): Likewise.
18851 2018-06-08 Martin Liska <mliska@suse.cz>
18853 * ipa-cp.c (ipcp_store_bits_results): Use
18854 ipcp_transformation_sum.
18855 (ipcp_store_vr_results): Likewise.
18856 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
18858 (ipcp_transformation_initialize): ... this.
18859 (ipa_set_node_agg_value_chain):
18860 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
18861 (write_ipcp_transformation_info): Likewise.
18862 (read_ipcp_transformation_info): Likewise.
18863 (ipcp_update_bits): Likewise.
18864 (ipcp_update_vr): Likewise.
18865 (ipcp_transform_function): Likewise.
18866 * ipa-prop.h: Rename ipcp_transformation_summary to
18867 ipcp_transformation.
18868 (class ipcp_transformation_t): New function summary.
18869 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
18870 (ipa_get_agg_replacements_for_node): Likewise.
18872 2018-06-08 Martin Liska <mliska@suse.cz>
18874 * ipa-pure-const.c (struct funct_state_d): Do it class instead
18876 (class funct_state_summary_t): New function_summary class.
18877 (has_function_state): Remove.
18878 (get_function_state): Likewise.
18879 (set_function_state): Likewise.
18880 (add_new_function): Likewise.
18881 (funct_state_summary_t::insert): New function.
18882 (duplicate_node_data): Remove.
18883 (remove_node_data): Remove.
18884 (funct_state_summary_t::duplicate): New function.
18885 (register_hooks): Create new funct_state_summaries.
18886 (pure_const_generate_summary): Use it.
18887 (pure_const_write_summary): Likewise.
18888 (pure_const_read_summary): Likewise.
18889 (propagate_pure_const): Likewise.
18890 (propagate_nothrow): Likewise.
18891 (dump_malloc_lattice): Likewise.
18892 (propagate_malloc): Likewise.
18893 (execute): Do not register hooks, just remove summary
18895 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
18898 2018-06-08 Martin Liska <mliska@suse.cz>
18900 * ipa-reference.c (remove_node_data): Remove.
18901 (duplicate_node_data): Likewise.
18902 (class ipa_ref_var_info_summary_t): New class.
18903 (class ipa_ref_opt_summary_t): Likewise.
18904 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
18905 (get_reference_optimization_summary): Use
18906 ipa_ref_opt_sum_summaries.
18907 (set_reference_vars_info): Remove.
18908 (set_reference_optimization_summary): Likewise.
18909 (ipa_init): Create summaries.
18910 (init_function_info): Use function summary.
18911 (ipa_ref_opt_summary_t::duplicate): New function.
18912 (ipa_ref_opt_summary_t::remove): New function.
18913 (get_read_write_all_from_node): Fix GNU coding style.
18914 (propagate): Use function summary.
18915 (write_node_summary_p): Fix GNU coding style.
18916 (stream_out_bitmap): Likewise.
18917 (ipa_reference_read_optimization_summary): Use function summary.
18918 (ipa_reference_c_finalize): Do not release hooks.
18920 2018-06-08 Martin Liska <mliska@suse.cz>
18922 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
18923 (analyze_function_body): Extract multiple calls of get_create.
18924 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18925 * ipa-inline.c (recursive_inlining): Use ::get method.
18926 * ipa-inline.h (estimate_edge_growth): Likewise.
18928 2018-06-08 Martin Liska <mliska@suse.cz>
18930 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
18932 (hsa_function_summary::hsa_function_summary): Use the new enum
18934 (hsa_gpu_implementation_p): Use hsa_summaries::get.
18935 * hsa-gen.c (hsa_get_host_function): Likewise.
18936 (get_brig_function_name): Likewise.
18937 * ipa-hsa.c (process_hsa_functions): Likewise.
18938 (ipa_hsa_write_summary): Likewise.
18939 * symbol-summary.h (symtab_duplication): Use ::get function/
18940 (get): New function.
18942 2018-06-08 Martin Liska <mliska@suse.cz>
18944 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
18946 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
18947 (hsa_register_kernel): Likewise.
18948 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
18949 * hsa-gen.c (hsa_get_host_function): Likewise.
18950 (get_brig_function_name): Likewise.
18951 (generate_hsa): Likewise.
18952 (pass_gen_hsail::execute): Likewise.
18953 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
18954 (devirtualization_time_bonus): Likewise.
18955 (ipcp_propagate_stage): Likewise.
18956 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18957 (edge_set_predicate): Likewise.
18958 (evaluate_conditions_for_known_args): Likewise.
18959 (evaluate_properties_for_edge): Likewise.
18960 (ipa_fn_summary::reset): Likewise.
18961 (ipa_fn_summary_t::duplicate): Likewise.
18962 (dump_ipa_call_summary): Likewise.
18963 (ipa_dump_fn_summary): Likewise.
18964 (analyze_function_body): Likewise.
18965 (compute_fn_summary): Likewise.
18966 (estimate_edge_devirt_benefit): Likewise.
18967 (estimate_edge_size_and_time): Likewise.
18968 (estimate_calls_size_and_time): Likewise.
18969 (estimate_node_size_and_time): Likewise.
18970 (inline_update_callee_summaries): Likewise.
18971 (remap_edge_change_prob): Likewise.
18972 (remap_edge_summaries): Likewise.
18973 (ipa_merge_fn_summary_after_inlining): Likewise.
18974 (ipa_update_overall_fn_summary): Likewise.
18975 (read_ipa_call_summary): Likewise.
18976 (inline_read_section): Likewise.
18977 (write_ipa_call_summary): Likewise.
18978 (ipa_fn_summary_write): Likewise.
18979 (ipa_free_fn_summary): Likewise.
18980 * ipa-hsa.c (process_hsa_functions): Likewise.
18981 (ipa_hsa_write_summary): Likewise.
18982 (ipa_hsa_read_section): Likewise.
18983 * ipa-icf.c (sem_function::merge): Likewise.
18984 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18985 (do_estimate_edge_time): Likewise.
18986 (estimate_size_after_inlining): Likewise.
18987 (estimate_growth): Likewise.
18988 (growth_likely_positive): Likewise.
18989 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18990 (inline_call): Likewise.
18991 * ipa-inline.c (caller_growth_limits): Likewise.
18992 (can_inline_edge_p): Likewise.
18993 (can_inline_edge_by_limits_p): Likewise.
18994 (compute_uninlined_call_time): Likewise.
18995 (compute_inlined_call_time): Likewise.
18996 (want_inline_small_function_p): Likewise.
18997 (edge_badness): Likewise.
18998 (update_caller_keys): Likewise.
18999 (update_callee_keys): Likewise.
19000 (recursive_inlining): Likewise.
19001 (inline_small_functions): Likewise.
19002 (inline_to_all_callers_1): Likewise.
19003 (dump_overall_stats): Likewise.
19004 (early_inline_small_functions): Likewise.
19005 (early_inliner): Likewise.
19006 * ipa-inline.h (estimate_edge_growth): Likewise.
19007 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
19008 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
19009 * ipa-prop.h (IPA_NODE_REF): Likewise.
19010 (IPA_EDGE_REF): Likewise.
19011 * ipa-pure-const.c (malloc_candidate_p): Likewise.
19012 (propagate_malloc): Likewise.
19013 * ipa-split.c (execute_split_functions): Likewise.
19014 * symbol-summary.h: Rename get to get_create.
19016 (get_create): Likewise.
19017 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
19019 2018-06-08 Martin Liska <mliska@suse.cz>
19021 * symbol-summary.h (release): Move definition out of class
19023 (symtab_removal): Likewise.
19024 (symtab_duplication): Likewise.
19026 2018-06-08 Martin Liska <mliska@suse.cz>
19028 * symbol-summary.h (function_summary): Move constructor
19029 implementation out of class declaration.
19030 (release): Likewise.
19031 (symtab_insertion): Likewise.
19032 (symtab_removal): Likewise.
19033 (symtab_duplication): Likewise.
19036 2018-06-08 Martin Liska <mliska@suse.cz>
19038 * Makefile.in: Remove support for MPX (macros, related functions,
19039 fields in cgraph_node, ...).
19040 * builtin-types.def (BT_BND): Likewise.
19041 (BT_FN_BND_CONST_PTR): Likewise.
19042 (BT_FN_CONST_PTR_BND): Likewise.
19043 (BT_FN_VOID_PTR_BND): Likewise.
19044 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
19045 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
19046 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
19047 (expand_builtin_mempcpy_with_bounds): Likewise.
19048 (expand_builtin_memset_with_bounds): Likewise.
19049 (expand_builtin_memset_args): Likewise.
19050 (std_expand_builtin_va_start): Likewise.
19051 (expand_builtin): Likewise.
19052 (expand_builtin_with_bounds): Likewise.
19053 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
19054 (DEF_LIB_BUILTIN_CHKP): Likewise.
19055 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
19056 (DEF_CHKP_BUILTIN): Likewise.
19057 (BUILT_IN_MEMCPY): Likewise.
19058 (BUILT_IN_MEMMOVE): Likewise.
19059 (BUILT_IN_MEMPCPY): Likewise.
19060 (BUILT_IN_MEMSET): Likewise.
19061 (BUILT_IN_STPCPY): Likewise.
19062 (BUILT_IN_STRCAT): Likewise.
19063 (BUILT_IN_STRCHR): Likewise.
19064 (BUILT_IN_STRCPY): Likewise.
19065 (BUILT_IN_STRLEN): Likewise.
19066 (BUILT_IN_MEMCPY_CHK): Likewise.
19067 (BUILT_IN_MEMMOVE_CHK): Likewise.
19068 (BUILT_IN_MEMPCPY_CHK): Likewise.
19069 (BUILT_IN_MEMSET_CHK): Likewise.
19070 (BUILT_IN_STPCPY_CHK): Likewise.
19071 (BUILT_IN_STRCAT_CHK): Likewise.
19072 (BUILT_IN_STRCPY_CHK): Likewise.
19073 * calls.c (store_bounds): Likewise.
19074 (emit_call_1): Likewise.
19075 (special_function_p): Likewise.
19076 (maybe_warn_nonstring_arg): Likewise.
19077 (initialize_argument_information): Likewise.
19078 (finalize_must_preallocate): Likewise.
19079 (compute_argument_addresses): Likewise.
19080 (expand_call): Likewise.
19081 * cfgexpand.c (expand_call_stmt): Likewise.
19082 (expand_return): Likewise.
19083 (expand_gimple_stmt_1): Likewise.
19084 (pass_expand::execute): Likewise.
19085 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
19086 (cgraph_node::remove): Likewise.
19087 (cgraph_node::dump): Likewise.
19088 (cgraph_node::verify_node): Likewise.
19089 * cgraph.h (chkp_function_instrumented_p): Likewise.
19090 (symtab_node::get_alias_target): Likewise.
19091 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
19092 (cgraph_local_p): Likewise.
19093 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
19094 (cgraph_edge::rebuild_references): Likewise.
19095 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
19096 (walk_polymorphic_call_targets): Likewise.
19097 (cgraph_node::expand_thunk): Likewise.
19098 (symbol_table::output_weakrefs): Likewise.
19099 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
19100 (ix86_handle_option): Likewise.
19101 * config/i386/constraints.md: Likewise.
19102 * config/i386/i386-builtin-types.def (BND): Likewise.
19106 * config/i386/i386-builtin.def (BDESC_END): Likewise.
19107 (BDESC_FIRST): Likewise.
19109 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
19110 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
19111 * config/i386/i386.c (enum reg_class): Likewise.
19112 (ix86_target_string): Likewise.
19113 (ix86_option_override_internal): Likewise.
19114 (ix86_conditional_register_usage): Likewise.
19115 (ix86_valid_target_attribute_inner_p): Likewise.
19116 (ix86_set_indirect_branch_type): Likewise.
19117 (ix86_set_current_function): Likewise.
19118 (ix86_function_arg_regno_p): Likewise.
19119 (init_cumulative_args): Likewise.
19120 (ix86_function_arg_advance): Likewise.
19121 (ix86_function_arg): Likewise.
19122 (ix86_pass_by_reference): Likewise.
19123 (ix86_function_value_regno_p): Likewise.
19124 (ix86_function_value_1): Likewise.
19125 (ix86_function_value_bounds): Likewise.
19126 (ix86_return_in_memory): Likewise.
19127 (ix86_setup_incoming_vararg_bounds): Likewise.
19128 (ix86_va_start): Likewise.
19129 (indirect_thunk_need_prefix): Likewise.
19130 (print_reg): Likewise.
19131 (ix86_print_operand): Likewise.
19132 (ix86_expand_call): Likewise.
19133 (ix86_output_function_return): Likewise.
19134 (reg_encoded_number): Likewise.
19135 (BDESC_VERIFYS): Likewise.
19136 (ix86_init_mpx_builtins): Likewise.
19137 (ix86_init_builtins): Likewise.
19138 (ix86_emit_cmove): Likewise.
19139 (ix86_emit_move_max): Likewise.
19140 (ix86_expand_builtin): Likewise.
19141 (ix86_builtin_mpx_function): Likewise.
19142 (ix86_get_arg_address_for_bt): Likewise.
19143 (ix86_load_bounds): Likewise.
19144 (ix86_store_bounds): Likewise.
19145 (ix86_load_returned_bounds): Likewise.
19146 (ix86_store_returned_bounds): Likewise.
19147 (ix86_class_likely_spilled_p): Likewise.
19148 (ix86_hard_regno_mode_ok): Likewise.
19149 (x86_order_regs_for_local_alloc): Likewise.
19150 (ix86_mitigate_rop): Likewise.
19151 (ix86_bnd_prefixed_insn_p): Likewise.
19152 (ix86_mpx_bound_mode): Likewise.
19153 (ix86_make_bounds_constant): Likewise.
19154 (ix86_initialize_bounds): Likewise.
19155 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
19156 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
19157 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
19158 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
19159 (TARGET_CHKP_BOUND_MODE): Likewise.
19160 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
19161 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
19162 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
19163 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
19164 * config/i386/i386.h (TARGET_MPX): Likewise.
19165 (TARGET_MPX_P): Likewise.
19166 (VALID_BND_REG_MODE): Likewise.
19167 (FIRST_BND_REG): Likewise.
19168 (LAST_BND_REG): Likewise.
19169 (enum reg_class): Likewise.
19170 (BND_REG_P): Likewise.
19171 (BND_REGNO_P): Likewise.
19172 (BNDmode): Likewise.
19173 (ADJUST_INSN_LENGTH): Likewise.
19174 * config/i386/i386.md: Likewise.
19175 * config/i386/i386.opt: Likewise.
19176 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
19177 (defined): Likewise.
19178 (LINK_MPX): Likewise.
19179 (MPX_SPEC): Likewise.
19180 (LIBMPX_SPEC): Likewise.
19181 (LIBMPXWRAPPERS_SPEC): Likewise.
19182 (CHKP_SPEC): Likewise.
19183 * config/i386/predicates.md: Likewise.
19184 * dbxout.c (dbxout_type): Likewise.
19185 * doc/extend.texi: Likewise.
19186 * doc/invoke.texi: Likewise.
19187 * doc/md.texi: Likewise.
19188 * doc/tm.texi: Likewise.
19189 * doc/tm.texi.in: Likewise.
19190 * dwarf2out.c (is_base_type): Likewise.
19191 (gen_formal_types_die): Likewise.
19192 (gen_subprogram_die): Likewise.
19193 (gen_type_die_with_usage): Likewise.
19194 (gen_decl_die): Likewise.
19195 (dwarf2out_late_global_decl): Likewise.
19196 * expr.c (expand_assignment): Likewise.
19197 (emit_storent_insn): Likewise.
19198 (store_expr_with_bounds): Likewise.
19199 (store_expr): Likewise.
19200 (expand_expr_real_1): Likewise.
19201 * expr.h (store_expr_with_bounds): Likewise.
19202 * function.c (use_register_for_decl): Likewise.
19203 (struct bounds_parm_data): Likewise.
19204 (assign_parms_augmented_arg_list): Likewise.
19205 (assign_parm_find_entry_rtl): Likewise.
19206 (assign_parm_is_stack_parm): Likewise.
19207 (assign_parm_load_bounds): Likewise.
19208 (assign_bounds): Likewise.
19209 (assign_parms): Likewise.
19210 (expand_function_start): Likewise.
19211 * gcc.c (CHKP_SPEC): Likewise.
19212 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
19213 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
19214 (wrestrict_dom_walker::check_call): Likewise.
19215 * gimple.c (gimple_build_call_from_tree): Likewise.
19216 * gimple.h (enum gf_mask): Likewise.
19217 (gimple_call_with_bounds_p): Likewise.
19218 (gimple_call_set_with_bounds): Likewise.
19219 * gimplify.c (gimplify_init_constructor): Likewise.
19220 * ipa-cp.c (initialize_node_lattices): Likewise.
19221 (propagate_constants_across_call): Likewise.
19222 (find_more_scalar_values_for_callers_subset): Likewise.
19223 * ipa-hsa.c (process_hsa_functions): Likewise.
19224 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
19225 * ipa-icf.c (sem_function::merge): Likewise.
19226 * ipa-inline.c (early_inliner): Likewise.
19227 * ipa-pure-const.c (warn_function_noreturn): Likewise.
19228 (warn_function_cold): Likewise.
19229 (propagate_pure_const): Likewise.
19230 * ipa-ref.h (enum GTY): Likewise.
19231 * ipa-split.c (find_retbnd): Likewise.
19232 (consider_split): Likewise.
19233 (split_function): Likewise.
19234 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
19235 * ipa.c (walk_polymorphic_call_targets): Likewise.
19236 (symbol_table::remove_unreachable_nodes): Likewise.
19237 (process_references): Likewise.
19238 (cgraph_build_static_cdtor_1): Likewise.
19239 * lto-cgraph.c (lto_output_node): Likewise.
19240 (output_refs): Likewise.
19241 (compute_ltrans_boundary): Likewise.
19242 (input_overwrite_node): Likewise.
19243 (input_node): Likewise.
19244 (input_cgraph_1): Likewise.
19245 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
19246 * passes.c (pass_manager::execute_early_local_passes): Likewise.
19247 (class pass_chkp_instrumentation_passes): Likewise.
19248 (make_pass_chkp_instrumentation_passes): Likewise.
19249 * passes.def: Likewise.
19250 * rtl.h (struct GTY): Likewise.
19251 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
19252 * stor-layout.c (layout_type): Likewise.
19253 * symtab.c: Likewise.
19254 * target.def: Likewise.
19255 * targhooks.c (default_chkp_bound_type): Likewise.
19256 (default_chkp_bound_mode): Likewise.
19257 (default_builtin_chkp_function): Likewise.
19258 (default_chkp_function_value_bounds): Likewise.
19259 (default_chkp_make_bounds_constant): Likewise.
19260 (default_chkp_initialize_bounds): Likewise.
19261 * targhooks.h (default_chkp_bound_type): Likewise.
19262 (default_chkp_bound_mode): Likewise.
19263 (default_builtin_chkp_function): Likewise.
19264 (default_chkp_function_value_bounds): Likewise.
19265 (default_chkp_make_bounds_constant): Likewise.
19266 (default_chkp_initialize_bounds): Likewise.
19267 * toplev.c (compile_file): Likewise.
19268 (process_options): Likewise.
19269 * tree-core.h (DEF_BUILTIN): Likewise.
19270 (DEF_BUILTIN_CHKP): Likewise.
19271 * tree-inline.c (declare_return_variable): Likewise.
19272 (remap_gimple_stmt): Likewise.
19273 (copy_bb): Likewise.
19274 (initialize_inlined_parameters): Likewise.
19275 (expand_call_inline): Likewise.
19276 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
19277 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
19278 (make_pass_ipa_chkp_produce_thunks): Likewise.
19279 (make_pass_chkp): Likewise.
19280 (make_pass_chkp_opt): Likewise.
19281 (make_pass_chkp_instrumentation_passes): Likewise.
19282 * tree-pretty-print.c (dump_generic_node): Likewise.
19283 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
19284 * tree-ssa-dce.c (propagate_necessity): Likewise.
19285 (eliminate_unnecessary_stmts): Likewise.
19286 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
19287 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
19288 * tree-ssa-sccvn.h: Likewise.
19289 * tree-ssa-strlen.c (get_string_length): Likewise.
19290 (valid_builtin_call): Likewise.
19291 (adjust_last_stmt): Likewise.
19292 (handle_builtin_strchr): Likewise.
19293 (handle_builtin_strcpy): Likewise.
19294 (handle_builtin_stxncpy): Likewise.
19295 (handle_builtin_memcpy): Likewise.
19296 (handle_builtin_strcat): Likewise.
19297 (strlen_check_and_optimize_stmt): Likewise.
19298 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
19299 * tree-streamer-in.c: Likewise.
19300 * tree-streamer.c (record_common_node): Likewise.
19301 * tree.c (tree_code_size): Likewise.
19302 (wide_int_to_tree_1): Likewise.
19303 (type_contains_placeholder_1): Likewise.
19304 (build_common_tree_nodes): Likewise.
19305 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
19306 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
19307 (POINTER_BOUNDS_P): Likewise.
19308 (BOUNDED_TYPE_P): Likewise.
19309 (BOUNDED_P): Likewise.
19310 (CALL_WITH_BOUNDS_P): Likewise.
19311 (pointer_bounds_type_node): Likewise.
19312 * value-prof.c (gimple_ic): Likewise.
19313 * var-tracking.c (vt_add_function_parameters): Likewise.
19314 * varasm.c (make_decl_rtl): Likewise.
19315 (assemble_start_function): Likewise.
19316 (output_constant): Likewise.
19317 (maybe_assemble_visibility): Likewise.
19318 * varpool.c (ctor_for_folding): Likewise.
19319 * chkp-builtins.def: Remove.
19320 * ipa-chkp.c: Remove.
19321 * ipa-chkp.h: Remove.
19322 * rtl-chkp.c: Remove.
19323 * rtl-chkp.h: Remove.
19324 * tree-chkp-opt.c: Remove.
19325 * tree-chkp.c: Remove.
19326 * tree-chkp.h: Remove.
19328 2018-06-07 Carl Love <cel@us.ibm.com>
19330 * config/rs6000/vsx.md (vextract_fp_from_shorth,
19331 vextract_fp_from_shortl): Add BE support.
19333 2018-06-07 Paul Koning <ni1d@arrl.net>
19335 * compare-elim.c (try_merge_compare): Don't merge compare if
19336 address contains a side effect.
19337 (try_eliminate_compare): Likewise.
19339 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
19341 * config.gcc: Support "tremont".
19342 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
19343 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19345 * config/i386/i386.c (m_TREMONT): Define.
19346 (processor_target_table): Add "tremont".
19347 (PTA_TREMONT): Define.
19348 (ix86_lea_outperforms): Add TARGET_TREMONT.
19349 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
19350 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
19351 and M_INTEL_GOLDMONT_PLUS.
19352 (fold_builtin_cpu): Add "tremont".
19353 (ix86_add_stmt_cost): Add TARGET_TREMONT.
19354 (ix86_option_override_internal): Add "tremont".
19355 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
19356 (processor_type): Add PROCESSOR_TREMONT.
19357 * config/i386/x86-tune.def: Add m_TREMONT.
19358 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
19360 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19362 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
19363 symbol defined for msp430i* devices to be lower case.
19365 2018-06-07 Richard Biener <rguenther@suse.de>
19367 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
19368 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
19369 Properly wrap signed arithmetic if overflow wraps.
19371 2018-06-07 Jakub Jelinek <jakub@redhat.com>
19373 PR tree-optimization/69615
19374 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
19375 of a cast from a same precision integral SSA_NAME in a bb dominated
19376 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
19377 cast to utype if rhs2 has already a compatible type.
19379 2018-06-07 Richard Biener <rguenther@suse.de>
19381 PR tree-optimization/85935
19382 * graphite-scop-detection.c (find_params_in_bb): Analyze
19383 condition operands with respect to the correct loop. Assert
19384 the analysis doesn't fail.
19386 2018-06-04 Carl Love <cel@us.ibm.com>
19388 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
19389 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
19390 as it is slightly cheaper.
19391 (first_match_or_eos_index_<mode>):
19392 Calculate index using natural element order.
19393 (first_match_index_<mode>):
19394 Calculate index using natural element order.
19395 (first_match_or_eos_index_<mode>):
19396 Calculate index using natural order.
19397 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
19398 for BE and LE modes.
19399 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
19400 P9V_BUILTIN_VCLZLSBB_V16QI.
19401 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
19404 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
19406 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
19407 indentation and line wrap for many prototypes. Add missing
19408 @smallexample directives around block of prototypes for vec_xl and
19411 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
19413 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
19414 track if we pass or return IEEE 128-bit floating point.
19415 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
19416 C++ mangling that is compatible with GCC 8.1.
19417 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
19418 (init_cumulative_args): Note if we pass or return IEEE 128-bit
19419 floating point types.
19420 (rs6000_function_arg_advance_1): Likewise.
19421 (rs6000_mangle_type): Optionally generate mangled names that match
19422 what GCC 8.1 generated for IEEE 128-bit floating point types.
19423 (rs6000_globalize_decl_name): If we have an external function that
19424 passes or returns IEEE 128-bit types, generate a weak reference
19425 from the mangled name used in GCC 8.1 to the current mangled
19427 (rs6000_init_builtins): Make __ibm128 use the long double type if
19428 long double is IBM extended double. Make __float128 use the long
19429 double type if long double is IEEE 128-bit.
19432 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
19433 macro for __ibm128 built-in functions.
19434 (PACK_IF): Add __ibm128 pack/unpack functions.
19435 (UNPACK_IF): Likewise.
19436 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
19437 enable long double built-in functions if long double is IEEE
19438 128-bit floating point.
19439 (rs6000_invalid_builtin): Update long double built-in function
19441 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
19442 functions, adjust the built-in function to use the long double
19443 built-in function if __ibm128 and long double are the same type.
19444 * doc/extend.texi (PowerPC builtins): Update documention for
19445 __builtin_{,un}pack_longdouble. Add documentation for
19446 __builtin_{,un}pack_ibm128.
19448 2018-06-06 Jim Wilson <jimw@sifive.com>
19450 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
19451 (struct machine_function): New field interrupt_mode.
19452 (riscv_handle_type_attribute): New function. Add forward declaration.
19453 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
19454 (riscv_expand_epilogue): Check interrupt_mode field.
19455 (riscv_set_current_function): Check interrupt attribute args and
19456 set interrupt_mode field.
19457 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
19458 (riscv_sret, riscv_uret): New.
19459 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
19460 new arguments to interrupt attribute.
19462 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
19465 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
19466 Don't handle -mcpu=power8 if -mpower9-vector is also used.
19468 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
19470 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
19471 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
19472 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19473 several redundant entries.
19475 2018-06-06 David Malcolm <dmalcolm@redhat.com>
19477 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
19478 type from "rtx" to "rtx_insn *".
19479 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
19480 for local "call_insn", removing cast.
19481 (ix86_expand_call): Likewise, introducing a "call_insn" local.
19483 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
19485 PR tree-optimization/86066
19486 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
19487 for BIT_INSERT_EXPR stores.
19489 2018-06-06 Richard Biener <rguenther@suse.de>
19491 PR tree-optimization/86062
19492 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19493 component refs ontop
19494 of to be offsetted base.
19496 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19498 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
19499 to be static and remove check on interrupt attribute name.
19501 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
19503 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19504 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
19506 2018-06-05 Steve Ellcey <sellcey@cavium.com>
19509 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
19511 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
19512 Remove second argument, change how error is called.
19513 (aarch64_layout_arg): Remove second argument from
19514 aarch64_err_no_fpadvsimd call.
19515 (aarch64_init_cumulative_args): Ditto.
19516 (aarch64_gimplify_va_arg_expr): Ditto.
19517 * config/aarch64/aarch64.md (mov<mode>): Ditto.
19519 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
19521 * config/i386/i386.md (simple_return_indirect_internal): New expander.
19522 (*simple_return_indirect_internal<mode>): Rename from
19523 simple_return_indirect_internal. Use W mode iterator.
19524 (rstorssp): New expander.
19525 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
19526 (clrssbsy): New expander.
19527 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
19529 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
19531 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
19533 (cmse_check_pointed_object): Likewise.
19535 2018-06-05 Martin Liska <mliska@suse.cz>
19537 PR gcov-profile/47618
19538 * doc/invoke.texi: Document how -fprofile-dir format
19541 2018-06-05 Richard Biener <rguenther@suse.de>
19543 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
19544 removal pretend DOM info isn't available so we do not update
19545 it and only remove edges, not dominated blocks. Actually free
19546 DOM info in case we removed something. Remove unreachable blocks.
19547 (mfb_keep_latches): Work with either DOM info or marked backedges.
19548 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
19549 first. Mark backedges if DOM info isn't available.
19550 (Re-)compute DOM info after cleanup_control_flow_pre.
19552 2018-06-05 Richard Biener <rguenther@suse.de>
19554 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
19555 (locus_discrim_hasher::hash): Adjust.
19556 (locus_discrim_hasher::equal): Likewise.
19557 (next_discriminator_for_locus): Work on line directly.
19558 (same_line_p): Pass in expanded locus1 as well.
19559 (assign_discriminators): Avoid redundant location expansions.
19561 2018-06-05 Richard Biener <rguenther@suse.de>
19563 PR tree-optimization/86046
19564 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
19565 if required after clearing TREE_ADDRESSABLE.
19567 2018-06-05 Richard Biener <rguenther@suse.de>
19569 PR tree-optimization/86047
19570 * tree-ssa-loop.c (for_each_index): Glob handling of all
19571 decls and constants and really handle all of them.
19573 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19576 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
19577 qualifier_void_pointer and qualifier_const_void_pointer.
19578 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
19579 (arm_init_builtins): Handle the above.
19580 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
19581 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
19582 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
19585 2018-06-05 Martin Liska <mliska@suse.cz>
19587 * auto-profile.c (read_autofdo_file): Do not use
19588 gcov_ctr_summary struct.
19589 (afdo_callsite_hot_enough_for_early_inline): Likewise.
19590 * coverage.c (struct counts_entry): Likewise.
19591 (read_counts_file): Read just single summary entry.
19592 (get_coverage_counts): Use gcov_summary struct.
19593 * coverage.h (get_coverage_counts): Likewise.
19594 * gcov-dump.c (dump_working_sets): Likewise.
19595 (tag_summary): Dump just single summary.
19596 * gcov-io.c (gcov_write_summary): Write just histogram
19598 (gcov_read_summary): Read just single summary.
19599 (compute_working_sets): Use gcov_summary struct.
19600 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
19601 of GCOV_COUNTERS_SUMMABLE.
19602 (GCOV_COUNTERS_SUMMABLE): Remove.
19603 (GCOV_FIRST_VALUE_COUNTER): Replace with
19604 GCOV_COUNTER_V_INTERVAL.
19605 (struct gcov_ctr_summary): Remove.
19606 (struct gcov_summary): Directly use fields of former
19608 (compute_working_sets): Use gcov_summary struct.
19609 * gcov.c (read_count_file): Do not use ctrs fields.
19610 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
19612 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
19614 * profile.c: Likewise.
19615 * profile.h: Likewise.
19617 2018-06-05 Martin Liska <mliska@suse.cz>
19619 PR gcov-profile/84846
19620 * gcov.c (output_lines): Print working directory only
19621 in intermediate format.
19623 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
19625 * config/s390/s390-builtin-types.def: Add void function type.
19626 * config/s390/s390-builtins.def: Use the function type for the
19629 2018-06-04 Jim Wilson <jimw@sifive.com>
19631 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
19633 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
19634 and maybe_eh_return. Change regno to unsigned int. Use new args to
19635 handle EH_RETURN_DATA_REGNO registers properly.
19636 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
19637 (riscv_expand_epilogue): Update comment. Change argument name and
19638 type. Update code to use new name and type. Pass new args to
19639 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
19641 * config/riscv/riscv.md (NORMAL_RETURN): New.
19642 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
19643 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
19644 (eh_return): Call gen_eh_return_internal and emit barrier.
19645 (eh_return_internal): Call riscv_expand_epilogue.
19647 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
19649 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
19650 bit_insertion field and declare can_be_merged_into method.
19651 (merged_store_group::can_be_merged_into): New method.
19652 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
19653 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
19654 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
19656 2018-06-04 Richard Biener <rguenther@suse.de>
19658 PR tree-optimization/85955
19659 * builtins.c (fold_builtin_sincos): Convert pointers to
19660 destination to appropriate type before dereferencing.
19662 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
19664 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
19666 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
19668 * expr.c (expand_expr_real_1): Force the operand into memory if
19669 its TYPE_MODE is BLKmode and if there is no integer mode for
19670 the number of bits being extracted.
19672 2018-06-04 Jakub Jelinek <jakub@redhat.com>
19676 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19677 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
19679 2018-06-04 Richard Biener <rguenther@suse.de>
19681 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
19682 (cleanup_tree_cfg_noloop): ... single caller. Do
19683 start_recording_case_labels later.
19685 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
19687 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
19688 to _IMMINTRIN_H_INCLUDED.
19689 * config/i386/pconfigintrin.h: Ditto.
19690 * config/i386/waitpkgintrin.h: Ditto.
19691 * config/i386/immintrin.h: Add includes for sgxintrin.h,
19692 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
19693 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
19694 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
19695 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
19696 waitpkgintrin.h and cldemoteintrin.h.
19698 2018-06-04 Richard Biener <rguenther@suse.de>
19700 PR tree-optimization/86038
19701 * tracer.c (find_best_successor): Check probability for
19702 being initialized, bail out if not.
19704 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
19707 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
19708 of bits to ignore when comparing architectures.
19710 2018-06-04 Jakub Jelinek <jakub@redhat.com>
19712 PR tree-optimization/69615
19713 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
19714 maximum or minimum of the type, try to merge it also as if
19715 range1 is + [-, x - 1] or + [x + 1, -].
19718 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
19720 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
19722 PR tree-optimization/86034
19723 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
19724 the unsigned bitfield type in a bit insertion sequence if it does not
19725 have a larger precision than the bitfield size.
19726 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
19728 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
19730 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
19732 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
19734 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
19735 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
19736 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
19737 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
19739 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
19741 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
19742 Disable -fdelete-null-pointer-checks for ELF toolchain.
19744 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
19745 Kito Cheng <kito.cheng@gmail.com>
19747 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
19748 (nds32le-*-*, nds32be-*-*): Integrate checking process.
19749 (nds32*-*-*): Add glibc and uclibc conditions.
19750 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
19751 (TARGET_EXCEPT_UNWIND_INFO): Define.
19752 * config/nds32/elf.h: New file.
19753 * config/nds32/linux.h: New file.
19754 * config/nds32/nds32-elf.opt: New file.
19755 * config/nds32/nds32-linux.opt: New file.
19756 * config/nds32/nds32-fp-as-gp.c
19757 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
19758 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
19760 (nds32_asm_file_end): Ditto.
19761 (nds32_print_operand): Ditto.
19762 (nds32_insert_attributes): Ditto.
19763 (nds32_init_libfuncs): New function.
19764 (TARGET_HAVE_TLS): Define.
19765 (TARGET_INIT_LIBFUNCS): Define.
19766 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
19768 (TARGET_ELF): Apply different mcmodel setting.
19769 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
19770 been migrated into elf.h and linux.h files.
19771 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
19772 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
19773 (mcmodel): The content has been migrated into nds32-elf.opt and
19774 nds32-linux.opt files.
19775 * config/nds32/t-elf: New file.
19776 * config/nds32/t-linux: New file.
19778 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
19779 Shiva Chen <shiva0217@gmail.com>
19781 * config/nds32/constants.md (unspec_volatile_element): Add
19782 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
19783 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
19785 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
19786 (make_pass_nds32_fp_as_gp): Declare.
19787 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
19789 (nds32_asm_function_end_prologue): Remove unused asm output.
19790 (nds32_asm_function_begin_epilogue): Remove unused asm output.
19791 (nds32_asm_file_start): Output necessary fp_as_gp information.
19792 (nds32_option_override): Adjust register usage.
19793 (nds32_expand_prologue): Consider fp_as_gp situation.
19794 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
19795 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
19798 (simple_return): Ditto.
19799 (omit_fp_begin): Output special directive for fp_as_gp.
19800 (omit_fp_end): Output special directive for fp_as_gp.
19801 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
19802 mforbid-fp-as-gp): New options.
19804 2018-06-01 Mark Wielaard <mark@klomp.org>
19806 * dwarf2out.c (dwarf2out_finish): Remove generation of
19807 DW_AT_loclists_base.
19809 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
19811 * gimple-ssa-store-merging.c: Include gimple-fold.h.
19812 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
19813 (struct merged_store_group): Add bit_insertion field.
19814 (dump_char_array): Use standard hexadecimal format.
19815 (merged_store_group::merged_store_group): Set bit_insertion to false.
19816 (merged_store_group::apply_stores): Use optimal buffer size. Deal
19817 with BIT_INSERT_EXPR stores. Move up code updating the mask and
19818 also print the mask in the dump file.
19819 (pass_store_merging::gate): Minor tweak.
19820 (imm_store_chain_info::coalesce_immediate): Fix wrong association
19821 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
19822 stores with INTEGER_CST stores.
19823 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
19824 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
19825 and use it throughout. Generate bit insertion sequences if need be.
19826 (pass_store_merging::process_store): Remove redundant condition.
19827 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
19829 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
19831 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
19832 the 128-bit floating point types. Fix function comment.
19834 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19836 * config/aarch64/aarch64-simd.md
19837 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
19839 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
19842 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
19844 PR tree-optimization/85989
19845 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
19847 (backprop::intersect_uses): Check it when deciding whether this
19848 is a backedge reference.
19849 (backprop::process_block): Add each phi to m_visited_phis
19850 after visiting it, then clear it at the end.
19852 2018-06-01 Richard Biener <rguenther@suse.de>
19854 * tree-vectorizer.h (vect_dr_stmt): New function.
19855 (vect_get_load_cost): Adjust.
19856 (vect_get_store_cost): Likewise.
19857 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
19858 Use vect_dr_stmt instead of DR_SMTT.
19859 (vect_record_base_alignments): Likewise.
19860 (vect_calculate_target_alignment): Likewise.
19861 (vect_compute_data_ref_alignment): Likewise and make static.
19862 (vect_update_misalignment_for_peel): Likewise.
19863 (vect_verify_datarefs_alignment): Likewise.
19864 (vector_alignment_reachable_p): Likewise.
19865 (vect_get_data_access_cost): Likewise. Pass down
19866 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
19867 (vect_get_peeling_costs_all_drs): Likewise.
19868 (vect_peeling_hash_get_lowest_cost): Likewise.
19869 (vect_enhance_data_refs_alignment): Likewise.
19870 (vect_find_same_alignment_drs): Likewise.
19871 (vect_analyze_data_refs_alignment): Likewise.
19872 (vect_analyze_group_access_1): Likewise.
19873 (vect_analyze_group_access): Likewise.
19874 (vect_analyze_data_ref_access): Likewise.
19875 (vect_analyze_data_ref_accesses): Likewise.
19876 (vect_vfa_segment_size): Likewise.
19877 (vect_small_gap_p): Likewise.
19878 (vectorizable_with_step_bound_p): Likewise.
19879 (vect_prune_runtime_alias_test_list): Likewise.
19880 (vect_analyze_data_refs): Likewise.
19881 (vect_supportable_dr_alignment): Likewise.
19882 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
19883 (vect_gen_prolog_loop_niters): Likewise.
19884 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
19885 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
19887 (vect_recog_mask_conversion_pattern): Likewise.
19888 (vect_try_gather_scatter_pattern): Likewise.
19889 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
19890 to vect_get_store_cost.
19891 (vect_get_store_cost): Get stmt_info instead of DR.
19892 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
19893 (vect_get_load_cost): Get stmt_info instead of DR.
19895 2018-06-01 Richard Biener <rguenther@suse.de>
19897 PR middle-end/86017
19898 * gimple-fold.c (var_decl_component_p): Also allow offsetted
19899 vars wrapped in MEM_REFs.
19901 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
19903 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19904 Fix subreg tests so that we only return a choice between
19905 GENERAL_REGS and FP_REGS if the original classes included both.
19907 2018-06-01 Richard Biener <rguenther@suse.de>
19910 * tree-ssa-structalias.c (get_function_part_constraint):
19911 Handle NULL fi->decl.
19912 (find_func_aliases_for_call): Properly handle indirect
19913 fi from direct call.
19914 (find_func_clobbers): Likewise.
19915 (ipa_pta_execute): Likewise.
19916 (create_variable_info_for): For functions that are ifunc_resolver
19917 resolve to a varinfo that contains the result of the resolver call.
19918 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
19921 2018-05-31 Michael Collison <michael.collison@arm.com>
19923 * config/aarch64/aarch64.md:
19924 (*fix_to_zero_extenddfdi2): New pattern.
19925 * gcc.target/aarch64/fix_extend1.c: New testcase.
19927 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
19929 PR middle-end/78809
19930 PR middle-end/83026
19931 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
19932 and BUILT_IN_STRNCMP_EQ.
19933 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
19934 BUILT_IN_STRNCMP_EQ.
19935 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
19936 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19937 (gimple_fold_builtin): Likewise.
19938 * tree-ssa-strlen.c (compute_string_length): New function.
19939 (determine_min_obsize): New function.
19940 (handle_builtin_string_cmp): New function to handle calls to
19941 string compare functions.
19942 (strlen_optimize_stmt): Add handling to builtin string compare
19944 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
19945 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19946 * tree.c (build_common_builtin_nodes): Add new defines of
19947 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
19949 2018-05-31 Jakub Jelinek <jakub@redhat.com>
19952 * bb-reorder.c (pass_partition_blocks::gate): Return false for
19953 functions with naked attribute.
19955 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
19957 * config/i386/sse.md (avx_vec_concat<mode>):
19958 Substitute concat_tg_mode mode attribute with xtg_mode.
19959 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
19960 (concat_tg_mode): Remove mode attribute.
19962 2018-05-31 Martin Sebor <msebor@redhat.com>
19965 * calls.c (alloc_max_size): Correct a logic error/typo.
19966 Treat excessive arguments as infinite. Warn for invalid arguments.
19967 * doc/invoke.texi (-Walloc-size-larger-than): Update.
19969 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
19972 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
19973 and movx for Haswell.
19975 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
19976 Cesar Philippidis <cesar@codesourcery.com>
19978 PR middle-end/85879
19979 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19980 when emitting error on private/firstprivate reductions.
19981 * omp-low.c (lower_omp_target): Avoid reference-type processing
19982 on pointers for firstprivate clause.
19984 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
19986 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
19989 * config/aarch64/aarch64-simd.md
19990 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
19991 (aarch64_ld1_x3_<mode>): Likewise
19992 (aarch64_st1x2<VALLDIF:mode>): Likewise
19993 (aarch64_st1_x2_<mode>): Likewise
19994 (aarch64_st1x3<VALLDIF:mode>): Likewise
19995 (aarch64_st1_x3_<mode>): Likewise
19996 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
19997 (vld1_s8_x3): Likewise.
19998 (vld1_u16_x3): Likewise.
19999 (vld1_s16_x3): Likewise.
20000 (vld1_u32_x3): Likewise.
20001 (vld1_s32_x3): Likewise.
20002 (vld1_u64_x3): Likewise.
20003 (vld1_s64_x3): Likewise.
20004 (vld1_f16_x3): Likewise.
20005 (vld1_f32_x3): Likewise.
20006 (vld1_f64_x3): Likewise.
20007 (vld1_p8_x3): Likewise.
20008 (vld1_p16_x3): Likewise.
20009 (vld1_p64_x3): Likewise.
20010 (vld1q_u8_x3): Likewise.
20011 (vld1q_s8_x3): Likewise.
20012 (vld1q_u16_x3): Likewise.
20013 (vld1q_s16_x3): Likewise.
20014 (vld1q_u32_x3): Likewise.
20015 (vld1q_s32_x3): Likewise.
20016 (vld1q_u64_x3): Likewise.
20017 (vld1q_s64_x3): Likewise.
20018 (vld1q_f16_x3): Likewise.
20019 (vld1q_f32_x3): Likewise.
20020 (vld1q_f64_x3): Likewise.
20021 (vld1q_p8_x3): Likewise.
20022 (vld1q_p16_x3): Likewise.
20023 (vld1q_p64_x3): Likewise.
20024 (vst1_s64_x2): Likewise.
20025 (vst1_u64_x2): Likewise.
20026 (vst1_f64_x2): Likewise.
20027 (vst1_s8_x2): Likewise.
20028 (vst1_p8_x2): Likewise.
20029 (vst1_s16_x2): Likewise.
20030 (vst1_p16_x2): Likewise.
20031 (vst1_s32_x2): Likewise.
20032 (vst1_u8_x2): Likewise.
20033 (vst1_u16_x2): Likewise.
20034 (vst1_u32_x2): Likewise.
20035 (vst1_f16_x2): Likewise.
20036 (vst1_f32_x2): Likewise.
20037 (vst1_p64_x2): Likewise.
20038 (vst1q_s8_x2): Likewise.
20039 (vst1q_p8_x2): Likewise.
20040 (vst1q_s16_x2): Likewise.
20041 (vst1q_p16_x2): Likewise.
20042 (vst1q_s32_x2): Likewise.
20043 (vst1q_s64_x2): Likewise.
20044 (vst1q_u8_x2): Likewise.
20045 (vst1q_u16_x2): Likewise.
20046 (vst1q_u32_x2): Likewise.
20047 (vst1q_u64_x2): Likewise.
20048 (vst1q_f16_x2): Likewise.
20049 (vst1q_f32_x2): Likewise.
20050 (vst1q_f64_x2): Likewise.
20051 (vst1q_p64_x2): Likewise.
20052 (vst1_s64_x3): Likewise.
20053 (vst1_u64_x3): Likewise.
20054 (vst1_f64_x3): Likewise.
20055 (vst1_s8_x3): Likewise.
20056 (vst1_p8_x3): Likewise.
20057 (vst1_s16_x3): Likewise.
20058 (vst1_p16_x3): Likewise.
20059 (vst1_s32_x3): Likewise.
20060 (vst1_u8_x3): Likewise.
20061 (vst1_u16_x3): Likewise.
20062 (vst1_u32_x3): Likewise.
20063 (vst1_f16_x3): Likewise.
20064 (vst1_f32_x3): Likewise.
20065 (vst1_p64_x3): Likewise.
20066 (vst1q_s8_x3): Likewise.
20067 (vst1q_p8_x3): Likewise.
20068 (vst1q_s16_x3): Likewise.
20069 (vst1q_p16_x3): Likewise.
20070 (vst1q_s32_x3): Likewise.
20071 (vst1q_s64_x3): Likewise.
20072 (vst1q_u8_x3): Likewise.
20073 (vst1q_u16_x3): Likewise.
20074 (vst1q_u32_x3): Likewise.
20075 (vst1q_u64_x3): Likewise.
20076 (vst1q_f16_x3): Likewise.
20077 (vst1q_f32_x3): Likewise.
20078 (vst1q_f64_x3): Likewise.
20079 (vst1q_p64_x3): Likewise.
20081 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20083 * config/msp430/msp430.c (msp430_output_labelref): Prepend
20084 user_label_prefix to name.
20086 * tree-core.h: Update comment about the format of NAME string
20087 passed to handler in attribute_spec.
20089 * config/msp430/msp430.md: Remove erroneous subreg expression from
20090 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
20091 zero_extend{q,h}isi2.
20093 2018-05-30 Borislav Petkov <bp@suse.de>
20095 * doc/extend.texi: Document some architecture specific
20096 constraints and sort entries.
20098 2018-05-30 Martin Sebor <msebor@redhat.com>
20100 PR middle-end/85369
20101 * builtins.c (expand_builtin_stpcpy_1): New function.
20102 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
20103 only if the former succeeds.
20105 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
20107 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
20110 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
20112 * doc/invoke.texi (-flinker-output): Document
20114 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
20116 * passes.c (ipa_write_summaries): Only modify statements if body
20118 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
20119 incrementally linking.
20120 (ipa_passes): Likewise.
20121 * lto-cgraph.c (lto_output_node): When incrementally linking do not
20122 pass down resolution info.
20123 * common.opt (flag_incremental_link): Update info.
20124 * gcc.c (plugin specs): Turn flinker-output=* to
20125 -plugin-opt=-linker-output-known
20126 * toplev.c (compile_file): Also cut compilation when doing incremental
20128 * flag-types. (enum lto_partition_model): Add
20129 LTO_LINKER_OUTPUT_NOLTOREL.
20130 (invoke.texi): Add -flinker-output docs.
20131 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
20132 link same way as WPA; do not stream in dead initializers.
20134 * dwarf2out.c (dwarf2out_die_ref_for_decl,
20135 darf2out_register_external_decl): Support incremental link.
20137 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
20139 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
20141 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
20143 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
20144 it down to simple_object_copy_lto_debug_sections.
20145 (run_gcc): Determine incremental LTO link time and configure
20146 lto1 into non-wpa mode, disable renaming of debug sections.
20148 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
20150 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20151 descriptions of various incorrectly documented functions.
20153 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
20156 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20157 address check not strict.
20159 2018-05-30 Richard Biener <rguenther@suse.de>
20161 PR tree-optimization/85964
20162 * tracer.c (better_p): Drop initialized count check, we only
20163 call the function with initialized counts now.
20164 (find_best_successor): Do find a best edge if one
20165 has uninitialized count.
20166 (find_best_predecessor): Likewise. Do BB frequency check only
20167 if count is initialized.
20169 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
20171 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
20172 (aarch64_ldrstr_offset_compare): New.
20173 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
20174 load/store orderings.
20175 (aarch64_gen_adjusted_ldpstp): Likewise.
20177 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
20179 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
20180 Check for subset of GENERAL_REGS and FP_REGS.
20181 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
20184 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
20186 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
20187 and wi::to_poly_offset. Add the current offset and then check
20188 whether the sum fits, rather than using an unchecked addition of
20189 a checked term. Check for a shwi rather than a uhwi.
20190 * expr.c (get_bit_range): Use tree_to_poly_uint64.
20191 (store_constructor): Use poly_int_tree_p.
20192 (expand_expr_real_1): Likewise.
20193 * function.c (assign_temp): Likewise.
20194 * fold-const.c (const_binop): Use poly_int_tree_p and
20195 wi::to_poly_offset.
20196 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
20198 * ipa-icf-gimple.c (func_checker::compare_operand): Use
20199 to_poly_offset for MEM offsets.
20200 * ipa-icf.c (sem_variable::equals): Likewise.
20201 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
20202 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
20203 wi::to_poly_offset for BIT_FIELD_REF offsets.
20204 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
20205 wi::to_poly_offset.
20206 * var-tracking.c (emit_note_insn_var_location): Use
20207 tree_to_poly_uint64.
20209 2018-05-29 Jim Wilson <jimw@sifive.com>
20211 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
20213 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
20216 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
20217 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
20219 (sse4_1_round<mode>2): Use nonimmediate_operand
20220 for operand 1 predicate.
20222 2018-05-29 Martin Sebor <msebor@redhat.com>
20223 Richard Biener <rguenther@suse.de>
20226 * calls.c (get_size_range): Call determine_value_range instead
20227 of get_value_range..
20228 * tree-vrp.h (determine_value_range): Declared new function.
20229 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
20231 2018-05-29 Richard Biener <rguenther@suse.de>
20233 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
20234 sure to use non-pattern stmts for get_earlier_stmt arguments.
20235 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
20236 called on pattern stmts.
20237 (get_later_stmt): Likewise.
20239 2018-05-29 Martin Liska <mliska@suse.cz>
20241 PR gcov-profile/85759
20242 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
20245 2018-05-29 Jakub Jelinek <jakub@redhat.com>
20247 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
20249 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
20253 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20254 VEC_PACK_FLOAT_EXPR): New tree codes.
20255 * tree-pretty-print.c (op_code_prio): Handle
20256 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20257 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20258 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20259 * tree-inline.c (estimate_operator_cost): Likewise.
20260 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
20261 * fold-const.c (const_binop): Likewise.
20262 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
20263 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20264 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
20265 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
20266 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20267 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20268 * expr.c (expand_expr_real_2): Likewise.
20269 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
20270 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
20271 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
20273 * optabs.c (expand_widen_pattern_expr): For
20274 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
20275 sign from result type rather than operand's type.
20276 (expand_binop_directly): For vec_packu_float_optab and
20277 vec_packs_float_optab allow result type to be different from operand's
20279 * optabs-tree.c (optab_for_tree_code): Handle
20280 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20281 VEC_PACK_FLOAT_EXPR. Formatting fixes.
20282 * tree-vect-generic.c (expand_vector_operations_1): Handle
20283 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20284 VEC_PACK_FLOAT_EXPR.
20285 * tree-vect-stmts.c (supportable_widening_operation): Handle
20287 (supportable_narrowing_operation): Handle FLOAT_EXPR.
20288 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
20289 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
20290 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
20291 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
20293 (vec_pack<floatprefix>_float_<mode>): New expander.
20294 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
20296 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
20297 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
20298 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
20299 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
20300 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
20302 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
20303 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
20304 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20305 VEC_PACK_FLOAT_EXPR): Document.
20307 2018-05-29 Richard Biener <rguenther@suse.de>
20309 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
20311 (stmt_vec_info_vec): Make pointer.
20312 (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 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
20317 (set_vinfo_for_stmt): Likewise.
20318 (get_earlier_stmt): Likewise.
20319 (get_later_stmt): Likewise.
20320 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
20321 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
20322 (vec_info::~vec_info): Free stmt_vec_infos.
20323 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
20324 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
20325 (pass_slp_vectorize::execute): Likewise.
20326 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
20327 (free_stmt_vec_info_vec): Likewise.
20328 (set_stmt_vec_info_vec): New function.
20329 (free_stmt_vec_infos): Likewise.
20330 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
20331 the global stmt_vec_info_vec.
20332 * tree-parloops.c (gather_scalar_reductions): Use
20333 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
20336 2018-05-29 Richard Biener <rguenther@suse.de>
20338 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
20340 2018-05-29 Martin Liska <mliska@suse.cz>
20341 David Malcolm <dmalcolm@redhat.com>
20343 * vec.c (test_reverse): New.
20344 (vec_c_tests): Add new test.
20345 * vec.h (vl_ptr>::reverse): New function.
20347 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
20349 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
20351 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
20354 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
20356 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
20358 2018-05-28 Richard Biener <rguenther@suse.de>
20360 PR tree-optimization/85933
20361 * tree-vect-data-refs.c (vect_record_base_alignments): Only
20362 look at stmts marked as vectorizable.
20364 2018-05-28 Richard Biener <rguenther@suse.de>
20366 PR tree-optimization/85934
20367 * tree-vect-generic.c (expand_vector_operations_1): Hoist
20368 vector boolean check before scalar optimization.
20370 2018-05-28 Jakub Jelinek <jakub@redhat.com>
20372 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
20375 2018-05-28 Mark Wielaard <mark@klomp.org>
20377 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
20378 if it is an expression containing a minus sign.
20380 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
20382 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
20384 2018-05-27 Paul Koning <ni1d@arrl.net>
20386 * config/pdp11/pdp11.md (truncsihi2): Remove.
20388 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
20389 Chung-Ju Wu <jasonwucj@gmail.com>
20391 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
20393 (unaligned_store_dw): Ditto.
20394 * config/nds32/nds32-memory-manipulation.c
20395 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
20396 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
20397 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
20398 (emit_setmem_word_loop): Rename to ...
20399 (emit_setmem_doubleword_loop): ... this.
20400 (nds32_gen_dup_4_byte_to_word_value): New function.
20401 (nds32_gen_dup_8_byte_to_double_word_value): New function.
20402 (nds32_expand_setmem_loop): Refine implementation.
20403 (nds32_expand_setmem_loop_v3m): Ditto.
20404 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
20407 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
20409 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
20411 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
20413 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
20414 (nds32_init_machine_status): Initialize machine->attr_naked_p and
20415 machine->attr_no_prologue_p.
20416 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
20417 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
20418 (nds32_expand_epilogue): Consider attr_naked_p.
20419 (nds32_expand_epilogue_v3pop): Likewise.
20420 (nds32_can_use_return_insn): Likewise.
20421 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
20422 attr_no_prologue_p fields.
20423 * config/nds32/nds32.opt (mret-in-naked-func): New option.
20425 2018-05-27 Jakub Jelinek <jakub@redhat.com>
20428 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
20430 * config/i386/sse.md
20431 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
20433 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
20435 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
20437 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
20439 (*<floatsuffix>floatv2div2sf2): Rename to ...
20440 (*float<floatunssuffix>v2div2sf2): ... this.
20441 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
20442 (float<floatunssuffix>v2div2sf2_mask): ... this.
20443 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
20444 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
20445 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
20447 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
20449 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20451 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20453 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20455 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20457 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
20458 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
20459 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
20460 gen_ufix_truncv8dfv8si2.
20461 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
20462 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
20463 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
20464 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
20465 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
20466 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
20467 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
20468 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
20470 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
20474 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
20476 2018-05-25 Jim Wilson <jimw@sifive.com>
20478 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
20479 * config/riscv/riscv.c (struct machine_function): Add
20480 interrupt_handler_p and attribute_checked_p fields.
20481 (riscv_attribute_table): Add interrupt.
20482 (riscv_interrupt_type_p): New.
20483 (riscv_save_reg_p): Save extra regs for interrupt handler.
20484 (riscv_use_save_libcall): Return false for interrupt handler.
20485 (riscv_first_stack_step): Add forward declaration.
20486 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
20487 for interrupt handler with large frame. Use it for saved reg list.
20488 (riscv_expand_prologue): Move flag_stack_usage_info support to
20489 eliminate duplication.
20490 (riscv_expand_epilogue): Generate mret for interrupt handler.
20491 (riscv_epilogue_uses): New.
20492 (riscv_can_use_return_insn): Return false for interrupt handler.
20493 (riscv_function_ok_for_sibcall): Likewise.
20494 (riscv_set_current_function): Add interrupt handler support.
20495 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
20496 * config/riscv/riscv.md (UNSPECV_MRET): New.
20498 (riscv_frflags, riscv_fsflags): Use tab after opcode.
20500 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
20502 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
20504 PR tree-optimization/85712
20505 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
20506 this candidate has already been replaced in-situ by a copy.
20508 2018-05-25 Jason Merrill <jason@redhat.com>
20510 PR c++/80485 - inline function non-zero address.
20511 * symtab.c (nonzero_address): Check DECL_COMDAT.
20513 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
20516 * config/alpha/alpha.md (ashlsi3): New insn pattern.
20517 (*ashlsi_se): Rename from *ashldi_se. Define as sign
20518 extension of SImode operation. Use const123_operand predicate.
20519 (*saddsi_1): Remove.
20520 (*saddl_se_1): Ditto.
20521 (*ssubsi_1): Ditto.
20522 (*ssubl_se_1): Ditto.
20523 * config/alpha/predicates.md (const123_operand): New predicate.
20524 * config/alpha/constraints.md (P): Use IN_RANGE.
20526 2018-05-25 Richard Biener <rguenther@suse.de>
20528 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
20530 (ref_maybe_used_by_stmt_p): Likewise.
20531 (stmt_may_clobber_ref_p): Likewise.
20532 (stmt_may_clobber_ref_p_1): Likewise.
20533 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
20535 (ref_maybe_used_by_stmt_p): Likewise.
20536 (stmt_may_clobber_ref_p): Likewise.
20537 (stmt_may_clobber_ref_p_1): Likewise.
20538 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
20539 the alias oracle to disambiguate DRs with stmts DR analysis
20541 (vect_analyze_data_refs): Do not give up on not analyzable
20542 DRs for BB vectorization. Remove code truncating the dataref
20545 2018-05-25 Jakub Jelinek <jakub@redhat.com>
20548 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
20549 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
20550 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
20552 2018-05-25 Richard Biener <rguenther@suse.de>
20554 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
20555 function, combining stmt data ref gathering and fatal analysis
20557 (vect_analyze_data_refs): Remove now redudnant code and simplify.
20558 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
20559 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
20560 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
20561 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
20563 2018-05-25 Bin Cheng <bin.cheng@arm.com>
20565 PR tree-optimization/85720
20566 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
20567 SCC if all partitions are builtins.
20568 (version_loop_by_alias_check): New parameter. Generate cancelable
20569 runtime alias check if all partitions are builtins.
20570 (distribute_loop): Update call to above function.
20572 2018-05-25 Bin Cheng <bin.cheng@arm.com>
20574 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
20575 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
20576 (parm_default_def_partition_arg): Ditto.
20577 (set_parm_default_def_partition): Ditto.
20578 (get_parm_default_def_partitions): Ditto and make it static.
20579 (get_undefined_value_partitions): Ditto and make it static.
20580 (remove_ssa_form): Refactor call to init_var_map here.
20581 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
20582 computation for loop region.
20583 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
20584 (register_default_def): Delete.
20585 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
20586 (parm_default_def_partition_arg): Ditto.
20587 (set_parm_default_def_partition): Ditto.
20588 (get_parm_default_def_partitions): Ditto and make it static.
20589 (get_undefined_value_partitions): Ditto and make it static.
20590 (coalesce_with_default, coalesce_with_default): Update comment.
20591 (create_coalesce_list_for_region): New func factored out from
20592 create_outofssa_var_map.
20593 (populate_coalesce_list_for_outofssa): New func factored out from
20594 create_outofssa_var_map and coalesce_ssa_name.
20595 (create_outofssa_var_map): Delete.
20596 (coalesce_ssa_name): Refactor to support live range computation.
20597 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
20598 (get_parm_default_def_partitions): Delete.
20599 (get_undefined_value_partitions): Ditto.
20600 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
20601 computation for loop region.
20602 (new_tree_live_info, loe_visit_block): Ditto.
20603 (live_worklist, set_var_live_on_entry): Ditto.
20604 (calculate_live_on_exit, verify_live_on_entry): Ditto.
20605 * tree-ssa-live.h (struct _var_map): New fields.
20606 (init_var_map): Change decl.
20607 (region_contains_p): New.
20609 2018-05-25 Bin Cheng <bin.cheng@arm.com>
20611 * tree-ssa-live.h (live_merge_and_clear): Delete.
20613 2018-05-25 Richard Biener <rguenther@suse.de>
20616 * tree-dump.c (dequeue_and_dump): Remove access to removed
20617 operand 2 of a SWITCH_EXPR.
20619 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20621 * doc/sourcebuild.texi (vect_double_cond_arith): Include
20622 multiplication and division.
20623 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
20624 (cond_udiv@var{m}, cond_umod@var{m}): Document.
20625 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
20626 (cond_udiv_optab, cond_umod_optab): New optabs.
20627 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
20628 (IFN_COND_RDIV): New internal functions.
20629 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
20630 TRUNC_MOD_EXPR and RDIV_EXPR.
20631 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
20632 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
20634 (SVE_INT_BINARY): Include mult.
20635 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
20636 (optab, sve_int_op): Handle mult.
20637 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
20639 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
20640 for SVE_INT_BINARY_SD.
20642 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20644 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
20645 (optab, sve_int_op): Handle div and udiv.
20646 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
20647 for SVE_INT_BINARY_SD.
20648 (*<optab><mode>3): New insn for the same.
20650 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20652 * tree-vect-patterns.c: Include predict.h.
20653 (vect_recog_divmod_pattern): Restrict check for division support
20654 to when optimizing for size.
20656 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20658 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
20659 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
20660 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
20661 (gimple_match_op::set_op): Likewise.
20662 (gimple_resimplify4): Declare.
20663 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
20664 (expr::gen_transform): Likewise.
20665 (decision_tree::gen): Generate a simplification routine for 4 operands.
20666 * gimple-match-head.c (gimple_simplify): Add an overload for
20667 4 operands. In the top-level function, handle up to 4 call
20668 arguments and call gimple_resimplify4.
20669 (gimple_resimplify4): New function.
20670 (build_call_internal): Pass a fourth operand.
20671 (maybe_push_to_seq): Likewise.
20672 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
20673 Fold VEC_COND_EXPRs of an operation and a default value into
20674 an IFN_COND_* function if possible.
20675 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
20677 (SVE_COND_FP_BINARY): Include them.
20678 (optab, sve_fp_op): Handle them.
20679 (SVE_INT_BINARY_REV): New code iterator.
20680 (SVE_COND_FP_BINARY_REV): New int iterator.
20681 (commutative): New int attribute.
20682 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
20684 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
20686 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
20687 (*cond_<optab><mode>): New patterns for reversed operands.
20689 2018-05-25 Richard Biener <rguenther@suse.de>
20691 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
20692 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
20693 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
20694 (STMT_VINFO_GROUPED_ACCESS): Adjust.
20695 * tree-vect-data-refs.c (everywhere): Adjust users.
20696 * tree-vect-loop.c (everywhere): Likewise.
20697 * tree-vect-slp.c (everywhere): Likewise.
20698 * tree-vect-stmts.c (everywhere): Likewise.
20699 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
20701 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20703 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
20705 (gcc_cv_as_section_exclude): ... this.
20706 Try Solaris as #exclude syntax.
20707 * configure: Regenerate.
20708 * config.in: Regenerate.
20709 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
20711 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
20712 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
20714 * varasm.c (default_elf_asm_named_section): Don't check if
20715 HAVE_GAS_SECTION_EXCLUDE is defined.
20717 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20719 * doc/md.texi: Update the documentation of the cond_* optabs
20720 to mention the new final operand. Fix GET_MODE_NUNITS call.
20721 Describe the scalar case too.
20722 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
20723 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
20725 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
20726 (get_conditional_internal_fn): Update comment.
20727 * tree-vect-loop.c (vectorizable_reduction): Pass the original
20728 accumulator value as a final argument to conditional functions.
20729 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
20730 a define_expand and add an "else" operand. Assert for now that
20731 the else operand is equal to operand 2. Use SVE_INT_BINARY and
20732 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
20733 (*cond_<optab><mode>): New patterns.
20734 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
20735 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20736 (UNSPEC_COND_EOR): Delete.
20737 (optab): Remove associated mappings.
20738 (SVE_INT_BINARY): New code iterator.
20739 (sve_int_op): Remove int attribute and add "minus" to the code
20741 (SVE_COND_INT_OP): Delete.
20742 (SVE_COND_FP_OP): Rename to...
20743 (SVE_COND_FP_BINARY): ...this.
20745 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20747 * optabs.c (can_reuse_operands_p): New function.
20748 (maybe_legitimize_operands): Try to reuse the results for
20751 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
20753 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
20754 Add {q} suffix to insn mnemonic.
20756 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20758 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
20759 (msp430_warn_func_return): New.
20761 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
20763 * fold-const.c (tree_nonzero_bits): New function.
20764 * fold-const.h (tree_nonzero_bits): Likewise.
20765 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
20766 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
20768 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
20772 * varasm.c (assemble_alias): Check ifunc_resolver only on
20775 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
20778 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
20779 when memory input operand is handled.
20781 2018-05-24 Luis Machado <luis.machado@linaro.org>
20783 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
20785 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
20787 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
20789 * match.pd: Delay FMA folds until after vectorization.
20791 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
20794 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20795 address check not strict.
20797 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
20799 * gimple-match.h (gimple_match_op): New class.
20800 (mprts_hook): Replace parameters with a gimple_match_op *.
20801 (maybe_build_generic_op): Likewise.
20802 (gimple_simplified_result_is_gimple_val): Replace parameters with
20803 a const gimple_match_op *.
20804 (gimple_simplify): Replace code_helper * and tree * parameters with
20805 a gimple_match_op * parameter.
20806 (gimple_resimplify1): Replace code_helper *, tree and tree *
20807 parameters with a gimple_match_op * parameter.
20808 (gimple_resimplify2): Likewise.
20809 (gimple_resimplify3): Likewise.
20810 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
20811 parameters with a gimple_match_op * parameter.
20812 * gimple-match-head.c (gimple_simplify): Change prototypes of
20813 auto-generated functions to take a gimple_match_op * instead of
20814 separate code_helper * and tree * parameters. Make the same
20815 change in the top-level overload and update calls to the
20816 gimple_resimplify routines. Update calls to the auto-generated
20817 functions and to maybe_push_res_to_seq in the publicly-facing
20818 operation-specific gimple_simplify overloads.
20819 (gimple_match_op::MAX_NUM_OPS): Define.
20820 (gimple_resimplify1): Replace rcode and ops with a single res_op
20821 parameter. Update call to gimple_simplify.
20822 (gimple_resimplify2): Likewise.
20823 (gimple_resimplify3): Likewise.
20824 (mprts_hook): Replace parameters with a gimple_match_op *.
20825 (maybe_build_generic_op): Likewise.
20826 (build_call_internal): Replace type, nargs and ops with
20827 a gimple_match_op *.
20828 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
20829 with a single gimple_match_op *. Update calls to mprts_hook,
20830 build_call_internal and gimple_simplified_result_is_gimple_val.
20831 Factor out code that is common to the tree_code and combined_fn cases.
20832 * genmatch.c (expr::gen_transform): Replace tem_code and
20833 tem_ops with a gimple_match_op called tem_op. Update calls
20834 to the gimple_resimplify functions and maybe_push_res_to_seq.
20835 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
20836 res_ops. Update call to the gimple_resimplify functions.
20837 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
20838 (decision_tree::gen): Make the functions take a gimple_match_op *
20839 called res_op instead of separate res_code and res_ops parameters.
20840 Update call accordingly.
20841 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
20842 and ops with a single res_op parameter. Update calls to
20843 maybe_build_generic_op and maybe_push_res_to_seq.
20844 (fold_stmt_1): Update calls to gimple_simplify and
20845 replace_stmt_with_simplification.
20846 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
20847 and gimple_simplified_result_is_gimple_val.
20848 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
20850 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
20851 with a gimple_match_op *.
20852 (vn_nary_build_or_lookup): Likewise. Update call to
20853 vn_nary_build_or_lookup_1.
20854 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
20855 gimple_match_op *. Update calls to the gimple_resimplify routines
20856 and to gimple_simplified_result_is_gimple_val.
20857 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
20858 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
20859 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
20860 (visit_nary_op): Likewise.
20861 (visit_reference_op_load): Likewise.
20863 2018-05-23 Luis Machado <luis.machado@linaro.org>
20865 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
20866 modifier for printing the step amount.
20868 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
20871 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
20874 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
20876 * doc/sourcebuild.texi (Endianness): New subsubsection.
20878 2018-05-23 Luis Machado <luis.machado@linaro.org>
20880 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20881 <prefetch_dynamic_strides>: New const bool field.
20882 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20883 prefetch_dynamic_strides.
20884 (exynosm1_prefetch_tune): Likewise.
20885 (thunderxt88_prefetch_tune): Likewise.
20886 (thunderx_prefetch_tune): Likewise.
20887 (thunderx2t99_prefetch_tune): Likewise.
20888 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
20890 (aarch64_override_options_internal): Update to set
20891 PARAM_PREFETCH_DYNAMIC_STRIDES.
20892 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20893 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20894 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20895 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20896 prefetch-dynamic-strides setting.
20898 2018-05-23 Luis Machado <luis.machado@linaro.org>
20900 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20901 <minimum_stride>: New const int field.
20902 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20903 minimum_stride field defaulting to -1.
20904 (exynosm1_prefetch_tune): Likewise.
20905 (thunderxt88_prefetch_tune): Likewise.
20906 (thunderx_prefetch_tune): Likewise.
20907 (thunderx2t99_prefetch_tune): Likewise.
20908 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
20909 <default_opt_level>: Set to 3.
20910 (aarch64_override_options_internal): Update to set
20911 PARAM_PREFETCH_MINIMUM_STRIDE.
20912 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20913 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20914 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20915 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20916 stride is constant and is below the minimum stride threshold.
20918 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20920 * config/arm/arm-cpus.in (mode26): Delete.
20921 (armv4): Delete mode26 reference.
20922 * config/arm/arm.c (arm_configure_build_target): Delete use of
20925 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
20927 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
20929 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
20930 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
20932 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
20933 (floatunsdidf2): Ditto.
20935 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
20937 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
20938 (fixuns_trunc<mode>si2_avx512f): Ditto.
20939 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
20940 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
20941 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
20943 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
20945 PR rtl-optimization/79985
20946 * df-scan.c (df_insn_refs_collect): Remove special case for
20947 global registers and asm statements.
20949 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
20951 * extend.texi (Global Register Variables): Rewrite the bullet list.
20952 Note that the register is available for allocation. Note that access
20953 via inline asm must use constraints. Add note about async-signal
20954 handlers. Remove paragraph about automagic register selection.
20956 2018-05-23 Richard Biener <rguenther@suse.de>
20958 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
20959 of fixed offset from memset VN.
20961 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
20963 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
20964 first_interp field.
20965 (alloc_cand_and_find_basis): Initialize first_interp field.
20966 (slsr_process_mul): Modify first_interp field.
20967 (slsr_process_add): Likewise.
20968 (slsr_process_cast): Modify first_interp field for each new
20970 (slsr_process_copy): Likewise.
20971 (dump_candidate): Dump first_interp field.
20972 (replace_mult_candidate): Process all interpretations, not just
20974 (replace_rhs_if_not_dup): Likewise.
20975 (replace_one_candidate): Likewise.
20977 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
20979 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
20981 (aarch64_needs_frame_chain): New function.
20982 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
20984 2018-05-23 Sudakshina Das <sudi.das@arm.com>
20987 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
20988 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
20989 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
20990 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
20991 as true for strict-align.
20992 (aarch64_can_inline_p): Perform checks even when callee has no
20993 attributes to check for strict alignment.
20994 * doc/extend.texi (AArch64 Function Attributes): Document
20996 * doc/invoke.texi: (AArch64 Options): Likewise.
20998 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
21000 PR tree-optimization/85853
21001 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
21002 the handling of the root of the node to...
21003 (vect_slp_analyze_node_operations_1): ...this new function,
21004 and run the whole thing with the child nodes' def types
21005 set according to their SLP node's def type.
21007 2018-05-23 Richard Biener <rguenther@suse.de>
21009 PR middle-end/85874
21010 * tree-data-ref.c (create_runtime_alias_checks): Defer
21011 and ignore overflow warnings.
21013 2018-05-23 Yury Gribov <tetra2005@gmail.com>
21015 PR tree-optimization/85822
21016 * tree-vrp.c (is_masked_range_test): Fix handling of negative
21019 2018-05-23 Richard Biener <rguenther@suse.de>
21021 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
21022 memset constants via native_interpret_expr.
21024 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
21027 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
21029 (cgraph_node::create_alias): Likewise.
21030 (cgraph_node::get_availability): Check ifunc_resolver instead
21031 of looking up ifunc attribute.
21032 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
21033 * varasm.c (do_assemble_alias): Likewise.
21034 (assemble_alias): Likewise.
21035 (default_binds_local_p_3): Likewise.
21036 * cgraph.h (cgraph_node): Add ifunc_resolver.
21037 (cgraph_node::only_called_directly_or_aliased_p): Return false
21038 for IFUNC resolver.
21039 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
21041 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
21042 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
21043 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
21044 instead of looking up ifunc attribute.
21046 2018-05-22 Luis Machado <luis.machado@linaro.org>
21048 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
21050 2018-05-22 Martin Sebor <msebor@redhat.com>
21052 PR middle-end/85359
21053 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
21054 only when expasion succeeds.
21055 (expand_builtin_strcmp): Same.
21056 (expand_builtin_strncmp): Same.
21058 2018-05-22 Martin Sebor <msebor@redhat.com>
21060 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
21062 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
21063 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21065 * config/aarch64/aarch64-ldpstp.md: Replace uses of
21066 aarch64_mem_pair_operand with memory_operand and delete operand swapping
21068 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
21069 Add check for legitimate_address.
21070 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
21071 (aarch64_swap_ldrstr_operands): New.
21072 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
21075 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
21076 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21078 * config/aarch64/aarch64.md: New patterns to generate stp
21080 (store_pair_sw, store_pair_dw): New patterns to generate stp for
21081 single words and double words.
21082 (load_pair_sw, load_pair_dw): Likewise.
21083 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
21085 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
21087 * config/aarch64/aarch64-ldpstp.md: Modify peephole
21088 for different mode ldpstp and add peephole for merged zero stores.
21089 Likewise for loads.
21090 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
21092 (aarch64_gen_store_pair): Rename calls to match new patterns.
21093 (aarch64_gen_load_pair): Rename calls to match new patterns.
21094 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
21095 (load_pair<DREG:mode><DREG2:mode>): ... This.
21096 (store_pair<mode>): Rename to...
21097 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
21098 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
21099 New mode iterators.
21100 (V_INT_EQUIV): Handle SImode.
21101 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
21104 2018-05-22 Martin Sebor <msebor@redhat.com>
21107 * calls.c (maybe_warn_nonstring_arg): Use string length to set
21108 or ajust the presumed bound on an operation to avoid unnecessary
21111 2018-05-22 Martin Sebor <msebor@redhat.com>
21113 PR tree-optimization/85826
21114 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
21115 assuming that a DECL necesarily has a constant size.
21117 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
21119 PR middle-end/85862
21120 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
21122 2018-05-22 Richard Biener <rguenther@suse.de>
21124 PR tree-optimization/85834
21125 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
21126 non-constant and non-zero memset arguments.
21128 2018-05-22 Martin Liska <mliska@suse.cz>
21131 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
21133 2018-05-22 Richard Biener <rguenther@suse.de>
21135 PR tree-optimization/85863
21136 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
21137 comparisons when vectype is specified.
21138 (vectorizable_condition): Do not specify vectype for
21139 vect_is_simple_cond when SLP vectorizing.
21141 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
21144 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
21145 define __ibm128 as long double.
21146 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
21147 as a distinct type when IEEE 128-bit support is enabled.
21148 (init_float128_ieee): Fix up conversions between IFmode and IEEE
21149 128-bit types to use the correct functions.
21150 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
21151 convert between 128-bit floating point types that have different
21152 modes but the same representation, instead of using gen_lowpart to
21154 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
21156 (IFKF_reg): New attributes to give the register constraints for
21158 (extend<mode>tf2_internal): New insns to mark an explicit
21159 conversion between 128-bit floating point types that have a
21160 different mode but share the same representation.
21162 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
21164 PR tree-optimization/85814
21165 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
21166 a null return from get_strinfo when unsharing the next
21167 strinfo in the chain.
21169 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21172 * varasm.c (weak_finish): Clean up weak_decls.
21174 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21176 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
21177 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
21178 UNSPEC_UADALP values.
21179 * config/aarch64/iterators.md (ABAL): New int iterator.
21182 (sur): Add mappings for the above.
21183 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
21185 (aarch64_<sur>abal<mode>_4): Likewise.
21186 (aarch64_<sur>adalp<mode>_3): Likewise.
21187 (<sur>sadv16qi): New define_expand.
21189 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
21191 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
21192 (*movdf_internal): Ditto.
21193 (*rcpsf2_sse): Ditto.
21194 (*rsqrtsf2_sse): Ditto.
21195 (*sqrt<mode>2_sse): Ditto.
21197 2018-05-21 Tamar Christina <tamar.christina@arm.com>
21199 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
21201 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
21202 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
21203 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
21204 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
21206 * config/aarch64/arm_neon.h: Likewise.
21207 * config/aarch64/iterators.md (VQ_I): New.
21209 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
21211 * config.gcc: Add arc/t-multilib-linux to tmake_file for
21213 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
21216 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
21218 * config/nds32/constraints.md (S): New constraint.
21219 * config/nds32/nds32.md (call_internal): Use constraint S.
21220 (call_value_internal): Likewise.
21221 (sibcall_internal): Likewise.
21222 (sibcall_value_internal): Likewise.
21224 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
21225 Chung-Ju Wu <jasonwucj@gmail.com>
21227 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
21228 into consideration.
21230 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
21231 Chung-Ju Wu <jasonwucj@gmail.com>
21233 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
21234 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
21235 (nds32_rtx_costs_impl): Simplify.
21236 (nds32_address_cost_impl): Simplify.
21237 (nds32_init_rtx_costs): New function.
21238 (nds32_rtx_costs_speed_prefer): Likewise.
21239 (nds32_rtx_costs_size_prefer): Likewise.
21240 (nds32_address_cost_speed_prefer): Likewise.
21241 (nds32_address_cost_speed_fwprop): Likewise.
21242 (nds32_address_cost_size_prefer): Likewise.
21243 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
21244 * config/nds32/nds32.c (nds32_option_override): Use
21245 nds32_init_rtx_costs function.
21247 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
21249 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
21250 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
21251 (TARGET_PIPELINE_N8): Likewise.
21252 (TARGET_PIPELINE_N10): Likewise.
21253 (TARGET_PIPELINE_N13): Likewise.
21254 (TARGET_PIPELINE_GRAYWOLF): Likewise.
21256 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
21258 * config/nds32/nds32-fpu.md: Update copyright year.
21260 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21262 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
21264 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21266 * config/nds32/nds32.c
21267 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
21268 * config/nds32/nds32.opt (minline-asm-r15): New option.
21270 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21272 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
21274 * config/nds32/nds32.md (abssi2): New pattern.
21276 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
21278 * config/i386/i386.md (rex64namesuffix): New mode attribute.
21279 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
21280 Merge insn pattern from sse_cvtsi2ss<round_name> and
21281 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
21282 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
21283 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
21284 using SWI48 mode iterator.
21285 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
21286 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
21287 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
21288 pattern from sse_cvttss2si<round_saeonly_name>
21289 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
21290 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
21291 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
21292 using SWI48 mode iterator.
21293 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
21294 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
21295 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
21296 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
21297 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
21298 using SWI48 mode iterator.
21299 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
21300 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
21301 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
21302 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
21303 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
21304 SWI48 mode iterator.
21305 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
21306 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
21307 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
21308 pattern from sse_cvttsd2si<round_saeonly_name>
21309 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
21311 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21313 * config/nds32/nds32-md-auxiliary.c
21314 (nds32_valid_smw_lwm_base_p): Refine.
21315 (nds32_output_smw_single_word): Refine.
21316 (nds32_output_smw_double_word): New.
21317 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
21319 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21321 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
21322 (nds32_output_stack_pop): Refine.
21323 (nds32_expand_unaligned_load): Refine.
21324 (nds32_expand_unaligned_store): Refine.
21326 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21327 Chung-Ju Wu <jasonwucj@gmail.com>
21329 * config/nds32/constants.md: Add TP_REGNUM constant.
21330 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
21331 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
21333 * config/nds32/nds32-doubleword.md: Consider flag_pic.
21334 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
21335 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
21336 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
21337 and PIC code generation.
21338 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
21340 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
21342 * config/nds32/nds32.md: Support TLS and PIC.
21343 * config/nds32/nds32.c: Support TLS and PIC.
21344 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
21345 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
21348 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
21350 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
21351 mode with E_ prefix.
21353 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21354 Chung-Ju Wu <jasonwucj@gmail.com>
21356 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
21357 * config/nds32/nds32-md-auxiliary.c
21358 (symbolic_reference_mentioned_p): New.
21359 (nds32_legitimize_ict_address): New.
21360 (nds32_expand_ict_move): New.
21361 (nds32_indirect_call_referenced_p): New.
21362 (nds32_symbol_binds_local_p): Delete.
21363 (nds32_long_call_p): Modify.
21364 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
21365 * config/nds32/nds32-protos.h
21366 (symbolic_reference_mentioned_p): Declare.
21367 (nds32_legitimize_ict_address): Declare.
21368 (nds32_expand_ict_move): Declare.
21369 (nds32_indirect_call_referenced_p): Declare.
21370 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
21371 (nds32_relax_group): Use nds32_ict_const_p as condition.
21372 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
21373 (nds32_asm_file_start): Output ict_model directive in asm code.
21374 (nds32_legitimate_address_p): Consider indirect call.
21375 (nds32_print_operand): Consider indirect call.
21376 (nds32_print_operand_address): Consider indirect call.
21377 (nds32_insert_attributes): Handle "indirect_call" attribute.
21378 (TARGET_LEGITIMATE_ADDRESS_P): Define.
21379 (TARGET_LEGITIMATE_CONSTANT_P): Define.
21380 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
21381 (TARGET_DELEGITIMIZE_ADDRESS): Define.
21382 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
21383 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
21384 (TARGET_ICT_MODEL_SMALL): Define.
21385 (TARGET_ICT_MODEL_LARGE): Define.
21386 * config/nds32/nds32.md (movsi): Consider ict model.
21387 (call, call_value): Consider ict model.
21388 (sibcall, sibcall_value): Consider ict model.
21389 * config/nds32/nds32.opt (mict-model): New option.
21390 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
21393 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
21394 Monk Chiang <sh.chiang04@gmail.com>
21395 Jim Wilson <jimw@sifive.com>
21397 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
21398 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
21399 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
21400 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
21401 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
21402 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
21403 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
21404 compute save_libcall_adjustment properly.
21405 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
21406 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
21407 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
21408 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
21409 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
21410 (ABI_SPEC): Handle mabi=ilp32e.
21411 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
21412 (RVE): Add RVE mask.
21413 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
21414 <-march>: Add rv32e as an example.
21416 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
21419 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
21420 (intra_create_variable_infos): Handle C++ constructors.
21422 2018-05-18 Martin Liska <mliska@suse.cz>
21424 * passes.def: Remove a redundant pass.
21426 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
21429 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
21431 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21433 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
21435 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
21437 (armv2, armv2a, armv3, armv3m): Delete architectures.
21438 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
21439 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
21440 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
21442 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
21443 (*mulsidi3adddi): Likewise.
21444 (mulsidi3): Likewise.
21445 (*mulsidi3_nov6): Likewise.
21446 (umulsidi3): Likewise.
21447 (umulsidi3_nov6): Likewise.
21448 (umaddsidi4): Likewise.
21449 (*umulsidi3adddi): Likewise.
21450 (smulsi3_highpart): Likewise.
21451 (*smulsi3_highpart_nov6): Likewise.
21452 (umulsi3_highpart): Likewise.
21453 (*umulsi3_highpart_nov6): Likewise.
21454 * config/arm/arm.h (arm_arch3m): Delete.
21455 * config/arm/arm.c (arm_arch3m): Delete.
21456 (arm_option_override_internal): Update armv3-related comment.
21457 (arm_configure_build_target): Delete use of isa_bit_mode32.
21458 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
21459 (arm_rtx_costs_internal): Delete check of arm_arch3m.
21460 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
21461 (mulsa3): Likewise.
21462 (mulusa3): Likewise.
21463 * config/arm/arm-protos.h (arm_arch3m): Delete.
21464 * config/arm/arm-tables.opt: Regenerate.
21465 * config/arm/arm-tune.md: Likewise.
21466 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
21467 deleted architectures.
21469 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21471 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
21472 (armv5t, armv5te): New features.
21473 (ARMv5, ARMv5e): Delete fgroups.
21474 (ARMv5t, ARMv5te): Adjust for above changes.
21475 (ARMv6m): Likewise.
21476 (armv5, armv5e): Delete arches.
21477 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
21479 (*call_reg_arm): Likewise.
21480 (*call_value_reg_armv5): Likewise.
21481 (*call_value_reg_arm): Likewise.
21482 (*call_symbol): Likewise.
21483 (*call_value_symbol): Likewise.
21484 (*sibcall_insn): Likewise.
21485 (*sibcall_value_insn): Likewise.
21486 (clzsi2): Likewise.
21487 (prefetch): Likewise.
21488 (define_split and define_peephole2 dependent on arm_arch5):
21490 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
21492 (TARGET_ARM_QBIT): Likewise.
21493 (TARGET_DSP_MULTIPLY): Likewise.
21494 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
21495 (arm_arch5, arm_arch5e): Delete.
21496 (arm_arch5t, arm_arch5te): Declare.
21497 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
21498 (arm_arch5t): Declare.
21499 (arm_option_reconfigure_globals): Update for the above.
21500 (arm_options_perform_arch_sanity_checks): Update comment, replace
21501 use of arm_arch5 with arm_arch5t.
21502 (use_return_insn): Likewise.
21503 (arm_emit_call_insn): Likewise.
21504 (output_return_instruction): Likewise.
21505 (arm_final_prescan_insn): Likewise.
21506 (arm_coproc_builtin_available): Likewise.
21507 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
21508 arm_arch5e with arm_arch5t and arm_arch5te.
21509 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
21510 (arm_arch5t, arm_arch5te): Declare.
21511 * config/arm/arm-tables.opt: Regenerate.
21512 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
21513 * config/arm/t-multilib: Likewise.
21514 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
21515 instead of arm_arch5.
21516 (*call_reg_thumb1): Likewise.
21517 (*call_value_reg_thumb1_v5): Likewise.
21518 (*call_value_reg_thumb1): Likewise.
21519 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
21521 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
21523 2018-05-18 Martin Liska <mliska@suse.cz>
21525 PR gcov-profile/84846
21526 * doc/gcov.texi: Document -t option of gcov tool.
21528 2018-05-18 Martin Liska <mliska@suse.cz>
21530 PR gcov-profile/84846
21531 * gcov.c (print_usage): Add new -t option.
21532 (process_args): Handle the option.
21533 (generate_results): Use stdout as output when requested by
21536 2018-05-18 Martin Liska <mliska@suse.cz>
21538 PR gcov-profile/84846
21539 * coverage.c (coverage_init): Write PWD to .gcno file.
21540 * doc/gcov.texi: Document how working directory is printed.
21541 * gcov-dump.c (dump_gcov_file): Print PWD.
21542 * gcov.c (output_intermediate_file): Likewise.
21543 (read_graph_file): Read PWD string.
21544 (output_lines): Print PWD.
21546 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21548 PR middle-end/85817
21549 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
21550 for retval and return false if all args to phi are zero.
21552 2018-05-18 Richard Biener <rguenther@suse.de>
21554 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
21556 (evrp_dom_walker::before_dom_children): Call it.
21558 2018-05-18 Richard Biener <rguenther@suse.de>
21560 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
21561 results when processing array refs with variable index.
21563 2018-05-18 Toon Moene <toon@moene.org>
21565 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
21566 directly after that of -floop-interchange. Indicate that both
21567 options are enabled by default when specifying -O3.
21569 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21571 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
21572 iterator. Delete separate integer-mode vec_set<mode> expander.
21573 (aarch64_simd_vec_setv2di): Delete.
21574 (vec_setv2di): Delete.
21575 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
21576 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
21577 the "w, r" alternative.
21579 2018-05-18 Martin Liska <mliska@suse.cz>
21581 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
21582 * tree-pass.h (make_pass_lower_switch_O0): New function.
21583 * tree-switch-conversion.c (node_has_low_bound): Remove.
21584 (node_has_high_bound): Likewise.
21585 (node_is_bounded): Likewise.
21586 (class pass_lower_switch): Make it a template type and create
21588 (pass_lower_switch::execute): Add template argument.
21589 (make_pass_lower_switch): New function.
21590 (make_pass_lower_switch_O0): New function.
21591 (do_jump_if_equal): Remove.
21592 (emit_case_nodes): Simplify to just handle all 3 cases and leave
21593 all the hard work to tree optimization passes.
21595 2018-05-18 Martin Liska <mliska@suse.cz>
21597 * dbgcnt.c (limit_low): Renamed from limit.
21598 (limit_high): New variable.
21599 (dbg_cnt_is_enabled): Check for upper limit.
21600 (dbg_cnt): Adjust dumping.
21601 (dbg_cnt_set_limit_by_index): Add new argument for high
21603 (dbg_cnt_set_limit_by_name): Likewise.
21604 (dbg_cnt_process_single_pair): Parse new format.
21605 (dbg_cnt_process_opt): Use strtok.
21606 (dbg_cnt_list_all_counters): Remove 'value' and add
21608 * doc/invoke.texi: Document changes.
21610 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
21612 * doc/sourcebuild.texi (scalar_all_fma): Document.
21613 * tree.def (FMA_EXPR): Delete.
21614 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
21615 * internal-fn.c (ternary_direct): New macro.
21616 (expand_ternary_optab_fn): Likewise.
21617 (direct_ternary_optab_supported_p): Likewise.
21618 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
21619 * builtins.c (fold_builtin_fma): Delete.
21620 (fold_builtin_3): Don't call it.
21621 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
21622 * expr.c (expand_expr_real_2): Likewise.
21623 * fold-const.c (operand_equal_p): Likewise.
21624 (fold_ternary_loc): Likewise.
21625 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
21626 * gimple.c (DEFTREECODE): Likewise.
21627 * gimplify.c (gimplify_expr): Likewise.
21628 * optabs-tree.c (optab_for_tree_code): Likewise.
21629 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
21630 * tree-eh.c (operation_could_trap_p): Likewise.
21631 (stmt_could_throw_1_p): Likewise.
21632 * tree-inline.c (estimate_operator_cost): Likewise.
21633 * tree-pretty-print.c (dump_generic_node): Likewise.
21634 (op_code_prio): Likewise.
21635 * tree-ssa-loop-im.c (stmt_cost): Likewise.
21636 * tree-ssa-operands.c (get_expr_operands): Likewise.
21637 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
21638 * fold-const-call.h (fold_fma): Delete.
21639 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
21640 CFN_FNMA and CFN_FNMS.
21641 (fold_fma): Delete.
21642 * genmatch.c (combined_fn): New enum.
21643 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
21644 (commutative_op): New function.
21645 (commutate): Use it. Handle more than 2 operands.
21646 (dt_operand::gen_gimple_expr): Use commutative_op.
21647 (parser::parse_expr): Allow :c to be used with non-binary
21648 operators if the commutative operand is known.
21649 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
21650 CFN_FMS, CFN_FNMA and CFN_FNMS.
21651 (backprop::process_assign_use): Remove FMA_EXPR handling.
21652 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
21653 (gen_hsa_fma): New function.
21654 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
21655 IFN_FNMA and IFN_FNMS.
21656 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
21657 * gimple-fold.h (follow_all_ssa_edges): Declare.
21658 * gimple-fold.c (follow_all_ssa_edges): New function.
21659 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
21660 gimple_build interface and use follow_all_ssa_edges to fold the result.
21661 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
21662 instead of checking for optabs directly.
21663 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
21664 rather than FMA_EXPRs.
21665 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
21666 call to IFN_FMA instead of an FMA_EXPR.
21668 2018-05-17 Jim Wilson <jimw@sifive.com>
21670 * expr.c (do_tablejump): When converting index to Pmode, if we have a
21671 sign extended promoted subreg, and the range does not have the sign bit
21672 set, then do a sign extend.
21674 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
21675 test, check for sign extended subreg and/or constant operands, and
21676 do a sign extend in that case.
21678 2018-05-17 Steve Ellcey <sellcey@cavium.com>
21680 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
21681 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
21683 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
21684 Change logics_shift_reg to logics_shift_imm.
21685 (thunderx2t99_fp_loadpair_basic): Delete.
21686 (thunderx2t99_fp_storepair_basic): Delete.
21687 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
21688 (thunderx2t99_asimd_polynomial): Delete.
21689 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
21690 and neon_fp_mul_d_scalar_q.
21691 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
21692 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
21693 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
21694 (thunderx2t99_asimd_lut): Add missing tbl types.
21695 (thunderx2t99_asimd_ext): Delete.
21696 (thunderx2t99_asimd_load1_1_mult): Delete.
21697 (thunderx2t99_asimd_load1_2_mult): Delete.
21698 (thunderx2t99_asimd_load1_ldp): New.
21699 (thunderx2t99_asimd_load1): New.
21700 (thunderx2t99_asimd_load2): Add missing *load2* types.
21701 (thunderx2t99_asimd_load3): New.
21702 (thunderx2t99_asimd_load4): New.
21703 (thunderx2t99_asimd_store1_1_mult): Delete.
21704 (thunderx2t99_asimd_store1_2_mult): Delete.
21705 (thunderx2t99_asimd_store2_mult): Delete.
21706 (thunderx2t99_asimd_store2_onelane): Delete.
21707 (thunderx2t99_asimd_store_stp): New.
21708 (thunderx2t99_asimd_store1): New.
21709 (thunderx2t99_asimd_store2): New.
21710 (thunderx2t99_asimd_store3): New.
21711 (thunderx2t99_asimd_store4): New.
21713 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
21715 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
21716 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
21718 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
21719 Segher Boessenkool <segher@kernel.crashing.org>
21722 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
21725 2018-05-17 Richard Biener <rguenther@suse.de>
21727 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
21728 for pruning loop and prune defs feeding only already visited PHIs.
21730 2018-05-17 Richard Biener <rguenther@suse.de>
21732 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
21734 2018-05-17 Bin Cheng <bin.cheng@arm.com>
21735 Richard Biener <rguenther@suse.de>
21737 PR tree-optimization/85793
21738 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
21739 for VMAT_ELEMENTWISE.
21741 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
21743 * internal-fn.h (lookup_internal_fn): Declare
21744 * internal-fn.c (lookup_internal_fn): New function.
21745 * gimple.c (gimple_build_call_from_tree): Handle calls to
21746 internal functions.
21747 * gimple-pretty-print.c (dump_gimple_call): Print "." before
21748 internal function names.
21749 * tree-pretty-print.c (dump_generic_node): Likewise.
21750 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
21752 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
21754 * gimple-fold.h (gimple_build): Make the function forms take
21755 combined_fn rather than built_in_function.
21756 (gimple_simplify): Likewise.
21757 * gimple-match-head.c (gimple_simplify): Likewise.
21758 * gimple-fold.c (gimple_build): Likewise.
21759 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
21760 rather than gimple_build_call_internal.
21761 (get_initial_defs_for_reduction): Likewise.
21762 (vect_create_epilog_for_reduction): Likewise.
21763 (vectorizable_live_operation): Likewise.
21765 2018-05-17 Martin Liska <mliska@suse.cz>
21767 * gimple-ssa-sprintf.c (format_directive): Do not use
21768 space in between 'G_' and '('.
21770 2018-05-17 Jakub Jelinek <jakub@redhat.com>
21773 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
21774 even if the mask is not all ones.
21777 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
21779 (ix86_gimple_fold_builtin): Likewise.
21782 * config/i386/i386.c: Include tree-vector-builder.h.
21783 (ix86_vector_shift_count): New function.
21784 (ix86_fold_builtin): Fold shift builtins by scalar count.
21785 (ix86_gimple_fold_builtin): Likewise.
21787 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
21788 _mm512_setzero): New intrinsics.
21790 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
21791 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21793 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
21794 code generation for cases where splatting a value is not useful.
21795 * simplify-rtx.c (simplify_ternary_operation): Simplify
21796 vec_merge across a vec_duplicate and a paradoxical subreg forming
21797 a vector mode to a vec_concat.
21799 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
21801 * config.gcc: Support "goldmont-plus".
21802 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21804 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21805 PROCESSOR_GOLDMONT_PLUS.
21806 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
21807 (processor_target_table): Add "goldmont-plus".
21808 (PTA_GOLDMONT_PLUS): Define.
21809 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
21810 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
21811 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
21812 (fold_builtin_cpu): Add "goldmont-plus".
21813 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
21814 (ix86_option_override_internal): Add "goldmont-plus".
21815 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
21816 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
21817 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
21818 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
21820 2018-05-17 Richard Biener <rguenther@suse.de>
21822 PR tree-optimization/85757
21823 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
21824 remove defs that only feed that PHI from further processing.
21826 2018-05-16 Jim Wilson <jimw@sifive.com>
21828 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
21830 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
21832 2018-05-16 Mark Wielaard <mark@klomp.org>
21834 * dwarf2out.c (count_index_strings): New function.
21835 (output_indirect_strings): Call count_index_strings and generate
21836 header for dwarf_version >= 5.
21838 2018-05-16 Mark Wielaard <mark@klomp.org>
21840 * dwarf2out.c (dwarf_FORM): New function.
21841 (set_indirect_string): Use dwarf_FORM.
21842 (reset_indirect_string): Likewise.
21843 (size_of_die): Likewise.
21844 (value_format): Likewise.
21845 (output_die): Likewise.
21846 (add_skeleton_AT_string): Likewise.
21847 (output_macinfo_op): Likewise.
21848 (index_string): Likewise.
21849 (output_index_string_offset): Likewise.
21850 (output_index_string): Likewise.
21851 (count_index_strings): Likewise.
21853 2018-05-16 Carl Love <cel@us.ibm.com>
21855 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21856 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
21858 2018-05-16 Martin Jambor <mjambor@suse.cz>
21860 * ipa-prop.c (ipa_free_all_edge_args): Remove.
21861 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
21863 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
21865 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
21866 (fnma<mode>4): Likewise.
21867 (fms<mode>4): Likewise.
21868 (fnms<mode>4): Likewise.
21869 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
21870 (aarch64_fnma<mode>4): Likewise.
21871 (aarch64_fms<mode>4): Likewise.
21872 (aarch64_fnms<mode>4): Likewise.
21873 (aarch64_fnmadd<mode>4): Likewise.
21875 2018-05-16 Jason Merrill <jason@redhat.com>
21877 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
21879 2018-05-16 Richard Biener <rguenther@suse.de>
21881 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
21882 (dump_stmt_cost): Declare.
21883 (add_stmt_cost): Dump cost we add.
21884 (add_stmt_costs): New function.
21885 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
21886 No longer exported.
21887 (vect_analyze_stmt): Adjust prototype.
21888 (vectorizable_condition): Likewise.
21889 (vectorizable_live_operation): Likewise.
21890 (vectorizable_reduction): Likewise.
21891 (vectorizable_induction): Likewise.
21892 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
21893 cost vector to pass to vectorizable_ and record afterwards.
21894 (vect_model_reduction_cost): Take cost vector argument and adjust.
21895 (vect_model_induction_cost): Likewise.
21896 (vectorizable_reduction): Likewise.
21897 (vectorizable_induction): Likewise.
21898 (vectorizable_live_operation): Likewise.
21899 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
21900 SLP_TREE_NUMBER_OF_VEC_STMTS.
21901 (vect_analyze_slp_cost_1): Remove.
21902 (vect_analyze_slp_cost): Likewise.
21903 (vect_slp_analyze_node_operations): Take visited args and
21904 a target cost vector. Avoid processing already visited stmt sets.
21905 (vect_slp_analyze_operations): Use a local cost vector to gather
21906 costs and register those of non-discarded instances.
21907 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
21908 (vect_schedule_slp_instance): Remove copying of
21909 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
21911 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
21912 adding cost. Record cost entry location.
21913 (vect_prologue_cost_for_slp_op): Function to compute cost of
21914 a constant or invariant generated for SLP vect in the prologue,
21915 split out from vect_analyze_slp_cost_1.
21916 (vect_model_simple_cost): Make static. Adjust for SLP costing.
21917 (vect_model_promotion_demotion_cost): Likewise.
21918 (vect_model_store_cost): Likewise, make static.
21919 (vect_model_load_cost): Likewise.
21920 (vectorizable_bswap): Add cost vector arg and adjust.
21921 (vectorizable_call): Likewise.
21922 (vectorizable_simd_clone_call): Likewise.
21923 (vectorizable_conversion): Likewise.
21924 (vectorizable_assignment): Likewise.
21925 (vectorizable_shift): Likewise.
21926 (vectorizable_operation): Likewise.
21927 (vectorizable_store): Likewise.
21928 (vectorizable_load): Likewise.
21929 (vectorizable_condition): Likewise.
21930 (vectorizable_comparison): Likewise.
21931 (can_vectorize_live_stmts): Likewise.
21932 (vect_analyze_stmt): Likewise.
21933 (vect_transform_stmt): Adjust calls to vectorizable_*.
21934 * tree-vectorizer.c: Include gimple-pretty-print.h.
21935 (dump_stmt_cost): New function.
21937 2018-05-16 Richard Biener <rguenther@suse.de>
21939 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
21940 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
21941 * tree-ssa-dse.c: Include tree-ssa-loop.h.
21942 (check_name): New callback.
21943 (dse_classify_store): Track cycles via a visited bitmap of PHI
21944 defs and simplify handling of in-loop and across loop dead stores
21945 and properly fail for loop-variant refs. Handle byte-tracking with
21946 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
21949 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
21951 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
21952 (vect_get_mask_type_for_stmt): Likewise.
21953 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
21955 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
21956 to determine the statement's vector type and the vector type that
21957 should be used for calculating nunits. Deal with cases in which
21958 the type has to be deferred.
21959 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
21960 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
21961 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
21962 (vect_determine_vf_for_stmt): New functions, split out from...
21963 (vect_determine_vectorization_factor): ...here.
21964 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
21965 (vect_get_mask_type_for_stmt): New functions, split out from
21966 vect_determine_vectorization_factor.
21968 2018-05-16 Richard Biener <rguenther@suse.de>
21970 * tree-cfg.c (verify_gimple_assign_ternary): Properly
21971 verify the [VEC_]COND_EXPR embedded comparison.
21973 2018-05-15 Martin Sebor <msebor@redhat.com>
21975 PR tree-optimization/85753
21976 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
21977 RECORD_TYPE in addition to ARRAY_TYPE.
21979 2018-05-15 Martin Sebor <msebor@redhat.com>
21981 PR middle-end/85643
21982 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
21984 2018-05-15 Richard Biener <rguenther@suse.de>
21986 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
21987 add by_clobber_p one. Change algorithm to collect all defs
21988 representing uses we need to walk and try reducing them to
21989 a single one before failing.
21990 (dse_dom_walker::dse_optimize_stmt): Adjust.
21992 2018-05-13 Mark Wielaard <mark@klomp.org>
21994 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
21995 (size_of_loc_descr): Likewise.
21996 (output_loc_operands): Likewise.
21997 (output_loc_operands_raw): Likewise.
21998 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
21999 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
22000 (hash_loc_operands): Likewise.
22001 (compare_loc_operands): Likewise.
22003 2018-05-14 Mark Wielaard <mark@klomp.org>
22005 * dwarf2out.c (count_index_addrs): New function.
22006 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
22008 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22010 PR tree-optimization/83648
22011 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
22012 return value as malloc candidate.
22014 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22017 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
22018 param as true in call to suggest_attribute.
22020 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
22022 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
22023 -mreadonly-in-sdata.
22025 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22027 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
22029 (aarch64_crypto_aesd_fused): Likewise.
22031 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
22033 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
22034 (movsi_aarch64): Likewise.
22035 (load_pairsi): Likewise.
22036 (load_pairdi): Likewise.
22037 (store_pairsi): Likewise.
22038 (store_pairdi): Likewise.
22039 (load_pairsf): Likewise.
22040 (load_pairdf): Likewise.
22041 (store_pairsf): Likewise.
22042 (store_pairdf): Likewise.
22043 (zero_extend): Likewise.
22044 (trunc): Swap alternatives.
22045 (fcvt_target): Add '?' to prefer w over r.
22047 2018-05-14 Jakub Jelinek <jakub@redhat.com>
22050 * config/i386/i386.md: Disallow non-commutative arithmetics in
22051 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
22052 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
22053 in the peephole2 before it.
22055 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
22057 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
22058 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
22059 (ix86_handle_option): Handle -mcldemote.
22060 * config.gcc: New header.
22061 * config/i386/cldemoteintrin.h: New file.
22062 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
22063 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
22065 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22066 OPTION_MASK_ISA_CLDEMOTE.
22067 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
22068 (ix86_valid_target_attribute_inner_p): Ditto.
22069 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
22070 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
22071 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
22072 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
22073 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
22075 * config/i386/i386.opt: Add -mcldemote.
22076 * config/i386/x86intrin.h: New header.
22077 * doc/invoke.texi: Add -mcldemote.
22079 2018-05-14 Richard Biener <rguenther@suse.de>
22081 * doc/match-and-simplify.texi: Adjust :s documentation.
22083 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
22085 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
22086 intended memcpy size.
22087 (REORDER_45): Likewise.
22089 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
22091 * sort.cc: New file.
22092 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
22093 * vec.c (qsort_chk): Use gcc_qsort.
22094 * Makefile.in (OBJS-libcommon): Add sort.o.
22095 (build/sort.o): New target. Use it...
22096 (BUILD_RTL): ... here, and...
22097 (build/gencfn-macros): ... here, and...
22098 (build/genmatch): ... here.
22100 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
22101 Chung-Ju Wu <jasonwucj@gmail.com>
22103 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
22104 * config/nds32/nds32-graywolf.md: New file.
22105 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
22106 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
22108 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
22109 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
22110 * config/nds32/nds32.md (pipeline_model): Add graywolf.
22111 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
22112 * config/nds32/pipelines.md: Include n15 settings.
22114 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
22115 Chung-Ju Wu <jasonwucj@gmail.com>
22117 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
22118 * config/nds32/nds32-n13.md: New file.
22119 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
22120 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
22122 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
22123 * config/nds32/nds32.md (pipeline_model): Add n13.
22124 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
22125 * config/nds32/pipelines.md: Include n13 settings.
22127 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
22128 Chung-Ju Wu <jasonwucj@gmail.com>
22130 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
22131 * config/nds32/nds32-n10.md: New file.
22132 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
22133 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
22135 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
22136 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
22137 * config/nds32/nds32.md (pipeline_model): Add n10.
22138 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
22139 * config/nds32/pipelines.md: Include n10 settings.
22141 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
22142 Kito Cheng <kito.cheng@gmail.com>
22143 Chung-Ju Wu <jasonwucj@gmail.com>
22145 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
22146 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22147 Add enum values for DSP extension instructions.
22148 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
22150 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
22151 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
22152 New code iterators.
22153 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
22154 * config/nds32/nds32-dspext.md: New file for DSP implementation.
22155 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
22156 * config/nds32/nds32-intrinsic.md: Likewise.
22157 * config/nds32/nds32_intrinsic.h: Likewise.
22158 * config/nds32/nds32-md-auxiliary.c: Likewise.
22159 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
22160 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
22161 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
22162 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
22163 * config/nds32/nds32-protos.h: New declarations for DSP extension.
22164 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
22165 TYPE_DMAC in switch statement.
22166 * config/nds32/nds32.c: New checking and implementation for DSP
22167 extension instructions.
22168 * config/nds32/nds32.h: Likewise.
22169 * config/nds32/nds32.md: Likewise.
22170 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
22171 * config/nds32/predicates.md: Implement new predicates for DSP
22174 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22176 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
22177 Reformat alternatives and attributes so it is easier to identify
22178 which constraints/attributes go with which instruction.
22179 (mov<mode>_hardfloat32, FMOVE64): Likewise.
22180 (mov<mode>_softfloat32, FMOVE64): Likewise.
22181 (mov<mode>_hardfloat64, FMOVE64): Likewise.
22182 (mov<mode>_softfloat64, FMOVE64): Likewise.
22184 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
22186 * doc/extend.texi (PowerPC Built-in Functions): Rename this
22188 (Basic PowerPC Built-in Functions): The new name of the
22189 subsection previously known as "PowerPC Built-in Functions".
22190 (Basic PowerPC Built-in Functions Available on all Configurations):
22192 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
22193 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
22194 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
22195 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
22197 2018-05-11 Martin Jambor <mjambor@suse.cz>
22200 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
22203 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
22206 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
22208 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
22210 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
22211 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
22212 (ix86_handle_option): Handle -mwaitpkg.
22213 * config.gcc: New header.
22214 * config/i386/cpuid.h (bit_WAITPKG): New bit.
22215 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
22216 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
22218 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22219 OPTION_MASK_ISA_WAITPKG.
22220 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
22221 (ix86_option_override_internal): Add PTA_WAITPKG.
22222 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
22223 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
22224 IX86_BUILTIN_TPAUSE.
22225 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
22226 __builtin_ia32_umwait and __builtin_ia32_tpause.
22227 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
22228 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
22229 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
22230 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
22231 UNSPECV_TPAUSE): New.
22232 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
22233 * config/i386/i386.opt: Add -mwaitpkg.
22234 * config/i386/waitpkgintrin.h: New file.
22235 * config/i386/x86intrin.h: New header.
22236 * doc/invoke.texi: Add -mwaitpkg.
22238 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
22241 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
22243 (cortex-m0): Use armv6s-m isa.
22244 (cortex-m0plus): Likewise.
22245 (cortex-m1): Likewise.
22246 (cortex-m0.small-multiply): Likewise.
22247 (cortex-m0plus.small-multiply): Likewise.
22248 (cortex-m1.small-multiply): Likewise.
22250 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
22251 Jakub Jelinek <jakub@redhat.com>
22253 PR tree-optimization/85692
22254 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
22255 source permute as well.
22257 2018-05-11 Martin Liska <mliska@suse.cz>
22260 * doc/extend.texi: Document LLVM style format for no_sanitize
22263 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
22265 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
22266 mode_supports_vsx_dform_quad to mode_supports_dq_form.
22267 (mode_supports_vsx_dform_quad): Likewise.
22268 (mode_supports_vmx_dform): Move these functions to be next to the
22269 other mode_supports functions.
22270 (mode_supports_dq_form): Likewise.
22271 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
22272 mode_supports_dq_form.
22273 (reg_offset_addressing_ok_p): Likewise.
22274 (offsettable_ok_by_alignment): Likewise.
22275 (rs6000_legitimate_offset_address_p): Likewise.
22276 (legitimate_lo_sum_address_p): Likewise.
22277 (rs6000_legitimize_address): Likewise.
22278 (rs6000_legitimize_reload_address): Likewise.
22279 (rs6000_secondary_reload_inner): Likewise.
22280 (rs6000_preferred_reload_class): Likewise.
22281 (rs6000_output_move_128bit): Likewise.
22283 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
22285 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
22286 Generate SImode target register for null target.
22287 <case IX86_BUILTIN_XGETBV>: Ditto.
22288 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
22289 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
22291 2018-05-10 Carl Love <cel@us.ibm.com>
22293 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
22294 dcbtt and dcbtstt if operands[2] is 0.
22296 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
22299 * config/i386/sse.md (usadv64qi): New expander.
22301 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
22303 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
22304 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
22305 -maltivec=be support.
22306 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
22307 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
22308 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
22309 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
22310 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
22311 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
22312 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
22313 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
22314 altivec_vsumsws): Adjust.
22315 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
22316 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
22317 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
22319 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
22320 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
22321 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
22322 (altivec_lve<VI_char>x): Delete expand.
22323 (*altivec_lve<VI_char>x_internal): Rename to...
22324 (altivec_lve<VI_char>x): ... this.
22325 (altivec_lvxl_<mode>): Delete expand.
22326 (*altivec_lvxl_<mode>_internal): Rename to ...
22327 (altivec_lvxl_<mode>): ... this.
22328 (altivec_stvxl_<mode>): Delete expand.
22329 (*altivec_stvxl_<mode>_internal): Rename to ...
22330 (altivec_stvxl_<mode>): ... this.
22331 (altivec_stve<VI_char>x): Delete expand.
22332 (*altivec_stve<VI_char>x_internal): Rename to ...
22333 (altivec_stve<VI_char>x): ... this.
22334 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
22335 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
22336 reduc_plus_scal_<mode>): Adjust.
22337 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
22339 (rs6000_cpu_cpp_builtins): Adjust.
22340 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
22341 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
22342 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
22343 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
22344 -maltivec=be support.
22345 (rs6000_split_vec_extract_var): Adjust.
22346 (rs6000_split_v4si_init): Adjust.
22347 (swap_selector_for_mode): Delete.
22348 (altivec_expand_lvx_be, altivec_expand_stvx_be,
22349 altivec_expand_stvex_be): Delete.
22350 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
22351 -maltivec=be support.
22352 (rs6000_gimple_fold_builtin): Ditto.
22353 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
22355 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
22356 (TARGET_DIRECT_MOVE_64BIT): Adjust.
22357 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
22358 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
22359 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
22360 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
22361 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
22362 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
22363 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
22364 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
22365 anonymous split): Adjust.
22366 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
22367 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
22369 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
22371 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
22372 when --with-gxx-include-dir is also specified.
22373 * configure: Regenerate.
22375 2018-05-09 Jim Wilson <jimw@sifive.com>
22378 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
22379 * config/riscv/t-withmultilib: New.
22380 * config/riscv/withmultilib.h: New.
22381 * doc/install.texi: Document RISC-V --with-multilib-list support.
22383 2018-05-09 Richard Biener <rguenther@suse.de>
22385 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
22387 (vect_bb_vectorization_profitable_p): Adjust. Compute
22388 actual scalar cost using the cost vector and the add_stmt_cost
22391 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
22393 PR rtl-optimization/85645
22394 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
22395 in the REG_CFA_REGISTER note for LR, don't leave it empty.
22397 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
22399 PR rtl-optimization/85645
22400 * shrink-wrap.c (spread_components): Return a boolean saying if
22401 anything was changed.
22402 (try_shrink_wrapping_separate): Iterate spread_components until
22403 nothing changes anymore.
22405 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
22407 PR rtl-optimization/85645
22408 * regrename.c (build_def_use): Also kill the chains that include the
22409 destination of a REG_CFA_REGISTER note.
22411 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
22413 PR rtl-optimization/85645
22414 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
22415 insn that has a REG_CFA_REGISTER note.
22417 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
22419 * cfgexpand.c (expand_clobber): New function.
22420 (expand_gimple_stmt_1): Use it.
22421 * tree-vect-stmts.c (vect_clobber_variable): New function,
22423 (vectorizable_simd_clone_call): ...here.
22424 (vectorizable_store): Emit a clobber either side of an
22425 IFN_STORE_LANES sequence.
22426 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
22428 2018-05-09 Tom de Vries <tom@codesourcery.com>
22431 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
22432 (define_insn "trap_if_false"): Add exit after trap.
22434 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
22436 PR rtl-optimization/85638
22437 * bb-reorder.c: Include common/common-target.h.
22438 (create_forwarder_block): New function extracted from...
22439 (fix_up_crossing_landing_pad): ...here. Rename into...
22440 (dw2_fix_up_crossing_landing_pad): ...this.
22441 (sjlj_fix_up_crossing_landing_pad): New function.
22442 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
22443 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
22444 from both partitions and exit the loop after one iteration.
22446 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
22449 * doc/extend.texi (PowerPC Built-in Functions): Rename this
22451 (Basic PowerPC Built-in Functions): The new name of the
22452 subsection previously known as "PowerPC Built-in Functions".
22453 (Basic PowerPC Built-in Functions Available on all Configurations):
22455 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22457 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22459 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22461 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22464 2018-05-08 Jim Wilson <jimw@sifive.com>
22466 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
22467 (LD_EMUL_SUFFIX): New.
22468 (LINK_SPEC): Use it.
22470 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
22472 * doc/extend.texi (PowerPC Built-in Functions): Rename this
22474 (Basic PowerPC Built-in Functions): The new name of the
22475 subsection previously known as "PowerPC Built-in Functions".
22476 (Basic PowerPC Built-in Functions Available on all Configurations):
22478 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22480 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22482 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22484 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22487 2018-05-08 Jakub Jelinek <jakub@redhat.com>
22490 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
22491 after cmpelim optimization.
22493 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
22495 * config.gcc: Support "goldmont".
22496 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
22497 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22498 PROCESSOR_GOLDMONT.
22499 * config/i386/i386.c (m_GOLDMONT): Define.
22500 (processor_target_table): Add "goldmont".
22501 (PTA_GOLDMONT): Define.
22502 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
22503 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
22504 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
22505 (fold_builtin_cpu): Add "goldmont".
22506 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
22507 (ix86_option_override_internal): Add "goldmont".
22508 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
22509 (processor_type): Add PROCESSOR_GOLDMONT.
22510 * config/i386/i386.md: Add CPU "glm".
22511 * config/i386/glm.md: New file.
22512 * config/i386/x86-tune.def: Add m_GOLDMONT.
22513 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
22515 2018-05-08 Jakub Jelinek <jakub@redhat.com>
22518 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
22520 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
22521 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
22522 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
22525 * config/i386/i386.c (ix86_fold_builtin): Handle
22526 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
22529 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
22530 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
22532 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
22535 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
22536 (check_arch): Likewise.
22537 (check_fpu): Return the result rather than printing it.
22538 (end arch): Fix operator precedence.
22539 (end cpu): Likewise.
22540 (END): Print the result from check_fpu.
22542 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
22543 Alan Hayward <alan.hayward@arm.com>
22544 David Sherwood <david.sherwood@arm.com>
22546 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
22547 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
22548 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
22549 (*fcmuo<mode>_and): New patterns.
22551 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
22553 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
22554 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
22555 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
22556 (cmp_op, sve_imm_con): New code attributes.
22557 (SVE_COND_INT_CMP, imm_con): Delete.
22558 (cmp_op): Remove above unspecs from int attribute.
22559 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
22561 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
22562 comparison-specific unspecs.
22563 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
22564 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
22565 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
22566 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
22567 (*vec_fcm<cmp_op><mode>): Rename to...
22568 (*fcm<cmp_op><mode>): ...this and adjust likewise.
22569 (*vec_fcmuo<mode>): Rename to...
22570 (*fcmuo<mode>): ...this and adjust likewise.
22571 (*pred_fcm<cmp_op><mode>): New pattern.
22572 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
22573 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
22575 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
22577 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
22578 (aarch64_emit_sve_predicated_cond): New function.
22579 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
22580 (aarch64_emit_unspec_cond_or): Replace with...
22581 (aarch64_emit_sve_or_conds): ...this new function. Use
22582 aarch64_emit_sve_ptrue_op for the individual comparisons and
22583 aarch64_emit_binop to OR them together.
22584 (aarch64_emit_inverted_unspec_cond): Replace with...
22585 (aarch64_emit_sve_inverted_cond): ...this new function. Use
22586 aarch64_emit_sve_ptrue_op for the comparison and
22587 aarch64_emit_unop to invert the result.
22588 (aarch64_expand_sve_vec_cmp_float): Update after the above
22589 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
22591 2018-05-07 Nathan Sidwell <nathan@acm.org>
22593 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
22594 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
22595 (Backwards Compatibility): Likewise.
22597 2018-05-07 Luis Machado <luis.machado@linaro.org>
22601 2018-05-07 Luis Machado <luis.machado@linaro.org>
22603 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22604 <prefetch_dynamic_strides>: New const bool field.
22605 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22606 prefetch_dynamic_strides.
22607 (exynosm1_prefetch_tune): Likewise.
22608 (thunderxt88_prefetch_tune): Likewise.
22609 (thunderx_prefetch_tune): Likewise.
22610 (thunderx2t99_prefetch_tune): Likewise.
22611 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22613 (aarch64_override_options_internal): Update to set
22614 PARAM_PREFETCH_DYNAMIC_STRIDES.
22615 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22616 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22617 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22618 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22619 prefetch-dynamic-strides setting.
22621 2018-05-07 Luis Machado <luis.machado@linaro.org>
22623 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22624 <minimum_stride>: New const int field.
22625 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22626 minimum_stride field.
22627 (exynosm1_prefetch_tune): Likewise.
22628 (thunderxt88_prefetch_tune): Likewise.
22629 (thunderx_prefetch_tune): Likewise.
22630 (thunderx2t99_prefetch_tune): Likewise.
22631 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
22632 (aarch64_override_options_internal): Update to set
22633 PARAM_PREFETCH_MINIMUM_STRIDE.
22634 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22635 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22636 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22637 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22638 stride is constant and is below the minimum stride threshold.
22640 2018-05-07 Luis Machado <luis.machado@linaro.org>
22642 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
22645 2018-05-07 Luis Machado <luis.machado@linaro.org>
22647 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22648 <prefetch_dynamic_strides>: New const bool field.
22649 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22650 prefetch_dynamic_strides.
22651 (exynosm1_prefetch_tune): Likewise.
22652 (thunderxt88_prefetch_tune): Likewise.
22653 (thunderx_prefetch_tune): Likewise.
22654 (thunderx2t99_prefetch_tune): Likewise.
22655 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22657 (aarch64_override_options_internal): Update to set
22658 PARAM_PREFETCH_DYNAMIC_STRIDES.
22659 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22660 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22661 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22662 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22663 prefetch-dynamic-strides setting.
22665 2018-05-07 Luis Machado <luis.machado@linaro.org>
22667 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22668 <minimum_stride>: New const int field.
22669 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22670 minimum_stride field.
22671 (exynosm1_prefetch_tune): Likewise.
22672 (thunderxt88_prefetch_tune): Likewise.
22673 (thunderx_prefetch_tune): Likewise.
22674 (thunderx2t99_prefetch_tune): Likewise.
22675 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
22676 (aarch64_override_options_internal): Update to set
22677 PARAM_PREFETCH_MINIMUM_STRIDE.
22678 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22679 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22680 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22681 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22682 stride is constant and is below the minimum stride threshold.
22684 2018-05-06 Jakub Jelinek <jakub@redhat.com>
22687 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
22688 the type is addressable. Don't force op into register if it has
22691 2018-05-05 Roland McGrath <mcgrathr@google.com>
22694 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
22695 any section for which we don't know a specific type it should have,
22696 regardless of name. Previously this was done only for the exact
22697 names ".init_array", ".fini_array", and ".preinit_array".
22698 (default_elf_asm_named_section): Add comment about
22699 relationship with default_section_type_flags and SECTION_NOTYPE.
22700 (get_section): Don't consider it a type conflict if one side has
22701 SECTION_NOTYPE and the other doesn't, as long as neither has the
22702 SECTION_BSS et al used in the default_section_type_flags logic.
22704 2018-05-05 Tom de Vries <tom@codesourcery.com>
22707 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
22708 (workaround_barsyncs): New function.
22709 (nvptx_reorg): Use workaround_barsyncs.
22710 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22711 (define_expand "nvptx_membar_cta"): New define_expand.
22712 (define_insn "*nvptx_membar_cta"): New insn.
22714 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
22716 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
22717 To improve optimization opportunities.
22718 * builtin-types.def: The new needed builtin types for the above.
22720 2018-05-04 Richard Biener <rguenther@suse.de>
22722 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
22723 * gimple-ssa-store-merging.c
22724 (imm_store_chain_info::output_merged_store): Remove redundant create,
22725 release split_store vector contents on failure.
22726 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
22727 scalar stmt vector on cache hit.
22729 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
22731 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
22733 * config.gcc (powerpc-xilinx-eabi*): Remove.
22734 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
22736 (fusion_addis_mem_combo_load): Ditto.
22737 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
22739 (rs6000_cpu_cpp_builtins): Ditto.
22740 * config/rs6000/rs6000-linux.c
22741 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
22742 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
22743 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
22745 (rs6000_setup_reg_addr_masks): Ditto.
22746 (rs6000_init_hard_regno_mode_ok): Ditto.
22747 (rs6000_option_override_internal): Ditto.
22748 (legitimate_lo_sum_address_p): Ditto.
22749 (rs6000_legitimize_address): Ditto.
22750 (rs6000_legitimize_reload_address): Ditto.
22751 (rs6000_legitimate_address_p): Ditto.
22752 (abi_v4_pass_in_fpr): Ditto.
22753 (setup_incoming_varargs): Ditto.
22754 (rs6000_gimplify_va_arg): Ditto.
22755 (rs6000_split_multireg_move): Ditto.
22756 (rs6000_savres_strategy): Ditto.
22757 (rs6000_emit_prologue_components): Ditto.
22758 (rs6000_emit_epilogue_components): Ditto.
22759 (rs6000_emit_prologue): Ditto.
22760 (rs6000_emit_epilogue): Ditto.
22761 (rs6000_elf_file_end): Ditto.
22762 (rs6000_function_value): Ditto.
22763 (rs6000_libcall_value): Ditto.
22764 * config/rs6000/rs6000.h: Ditto.
22765 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
22766 (TARGET_MINMAX): ... this. New.
22767 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
22768 * config/rs6000/rs6000.md: Remove Xilinx FP support.
22769 (*movsi_internal1_single): Delete.
22770 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
22771 mfpu=, mxilinx-fpu): Delete.
22772 * config/rs6000/singlefp.h: Delete.
22773 * config/rs6000/sysv4.h: Remove Xilinx FP support.
22774 * config/rs6000/t-rs6000: Ditto.
22775 * config/rs6000/t-xilinx: Delete.
22776 * config/rs6000/titan.md: Adjust for fp_type removal.
22777 * config/rs6000/vsx.md: Remove Xilinx FP support.
22778 (VStype_simple): Delete.
22779 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
22780 * config/rs6000/xfpu.h: Delete.
22781 * config/rs6000/xfpu.md: Delete.
22782 * config/rs6000/xilinx.h: Delete.
22783 * config/rs6000/xilinx.opt: Delete.
22784 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
22785 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
22787 2018-05-04 Tom de Vries <tom@codesourcery.com>
22790 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
22793 2018-05-04 Richard Biener <rguenther@suse.de>
22795 PR middle-end/85627
22796 * tree-complex.c (update_complex_assignment): We are always in SSA form.
22797 (expand_complex_div_wide): Likewise.
22798 (expand_complex_operations_1): Likewise.
22799 (expand_complex_libcall): Preserve EH info of the original stmt.
22800 (tree_lower_complex): Handle removed blocks.
22801 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
22802 on complex multiplication and division libcall builtins.
22804 2018-05-04 Richard Biener <rguenther@suse.de>
22806 PR middle-end/85574
22807 * fold-const.c (negate_expr_p): Restrict negation of operand
22808 zero of a division to when we know that can happen without
22810 (fold_negate_expr_1): Likewise.
22812 2018-05-04 Jakub Jelinek <jakub@redhat.com>
22815 * real.h (real_nextafter): Declare.
22816 * real.c (real_nextafter): New function.
22817 * fold-const-call.c (fold_const_nextafter): New function.
22818 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
22819 CASE_CFN_NEXTTOWARD.
22820 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
22821 even when arg1_mode is different from arg0_mode.
22823 2018-05-03 Nathan Sidwell <nathan@acm.org>
22825 * doc/extend.texi (Deprecated Features): Remove
22826 -ffriend-injection.
22827 (Backwards Compatibility): Likewise.
22828 * doc/invoke.texi (C++ Language Options): Likewise.
22829 (C++ Dialect Options): Likewise.
22831 2018-05-03 Jakub Jelinek <jakub@redhat.com>
22834 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
22835 _mm512_mask_mullox_epi64): New intrinsics.
22837 2018-05-03 Tom de Vries <tom@codesourcery.com>
22840 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22841 dump files): Add offload-tree.
22843 2018-05-03 Richard Biener <rguenther@suse.de>
22845 PR tree-optimization/85615
22846 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
22847 to loops not nested in BBs loop father to avoid creating multi-entry
22850 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22852 PR tree-optimization/70291
22853 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
22854 arguments. Change return type to tree. Emit libcall as a new
22855 statement rather than replacing existing one when inplace_p is true.
22856 (expand_complex_multiplication_components): New function.
22857 (expand_complex_multiplication): Expand floating-point complex
22858 multiplication using the above.
22859 (expand_complex_division): Rename inner_type parameter to type.
22860 Update expand_complex_libcall call-site.
22861 (expand_complex_operations_1): Update expand_complex_multiplication
22862 and expand_complex_division call-sites.
22864 2018-05-02 Jakub Jelinek <jakub@redhat.com>
22867 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22868 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22869 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
22870 the highest significant bit of the shift count mask is clear. In
22871 check whether and[sq]i3 is needed verify that all significant bits
22872 of the shift count other than the highest are set.
22874 2018-05-02 Tom de Vries <tom@codesourcery.com>
22877 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
22878 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
22879 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
22880 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
22881 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
22882 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
22883 __builtin_goacc_parlevel_size.
22885 2018-05-02 Richard Biener <rguenther@suse.de>
22887 PR tree-optimization/85597
22888 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
22889 do not use split vect_get_vec_defs call but call vect_get_slp_defs
22892 2018-05-02 Tom de Vries <tom@codesourcery.com>
22895 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22896 dump files): Add ltrans-tree.
22898 2018-05-02 Tom de Vries <tom@codesourcery.com>
22901 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22902 dump files): Add wpa-ipa.
22904 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
22906 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
22907 powerpc*-*-linux*paired* target.
22908 * config/rs6000/750cl.h: Delete.
22909 * config/rs6000/paired.h: Delete.
22910 * config/rs6000/paired.md: Delete.
22911 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
22913 * config/rs6000/rs6000-builtin.def: Remove paired float support.
22914 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
22915 comment. Remove paired float support.
22916 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
22917 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
22919 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
22920 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
22922 * config/rs6000/rs6000.c: Remove paired float support.
22923 (paired_expand_vector_init, paired_expand_vector_move,
22924 paired_emit_vector_compare, paired_emit_vector_cond_expr,
22925 (paired_expand_lv_builtin, paired_expand_stv_builtin,
22926 paired_expand_builtin, paired_expand_predicate_builtin,
22927 paired_init_builtins): Delete.
22928 * config/rs6000/rs6000.h: Remove paired float support.
22929 * config/rs6000/rs6000.md: Remove paired float support.
22930 (move_from_CR_ov_bit): Delete.
22931 * config/rs6000/rs6000.opt (mpaired): Delete.
22932 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
22933 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
22935 2018-05-02 Richard Biener <rguenther@suse.de>
22937 PR middle-end/85567
22938 * gimplify.c (gimplify_save_expr): When in SSA form allow
22939 SAVE_EXPRs to compute to SSA vars.
22941 2018-05-02 Jakub Jelinek <jakub@redhat.com>
22944 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22945 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22946 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
22947 clobber operands[2], instead use a new pseudo. Formatting fixes.
22949 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
22951 PR tree-optimization/85586
22952 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
22953 exit early for statements in the same group if the accesses are
22956 2018-05-02 Tom de Vries <tom@codesourcery.com>
22959 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
22962 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
22964 PR tree-optimization/85143
22965 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
22967 2018-05-01 Tom de Vries <tom@codesourcery.com>
22970 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
22971 not found" error message.
22973 2018-05-01 Tom de Vries <tom@codesourcery.com>
22976 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
22977 * vec.c (test_ordered_remove_if): New function.
22978 (vec_c_tests): Call test_ordered_remove_if.
22979 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
22980 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
22981 * tree-vect-patterns.c (vect_pattern_recog_1): Use
22982 VEC_ORDERED_REMOVE_IF.
22984 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22986 PR tree-optimization/82665
22987 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
22988 pointer subtraction where arguments come from a memchr call.
22990 2018-05-01 Jakub Jelinek <jakub@redhat.com>
22992 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
22993 --push-state --as-needed and --pop-state instead of --as-needed and
22994 --no-as-needed if ld supports it.
22995 * configure: Regenerated.
22998 * doc/install.texi2html: Replace _002d with - and _002a with * in
22999 generated html files using sed.
23001 2018-04-30 David Malcolm <dmalcolm@redhat.com>
23004 * gcc-rich-location.c (blank_line_before_p): New function.
23005 (use_new_line): New function.
23006 (gcc_rich_location::add_fixit_insert_formatted): New function.
23007 * gcc-rich-location.h
23008 (gcc_rich_location::add_fixit_insert_formatted): New function.
23010 2018-04-30 David Malcolm <dmalcolm@redhat.com>
23012 * selftest.c (assert_streq): Rename "expected" and "actual" to
23013 "val1" and "val2". Extend NULL-handling to cover both inputs
23014 symmetrically, while still requiring both to be non-NULL for a pass.
23015 * selftest.h (assert_streq): Rename "expected" and "actual" to
23017 (ASSERT_EQ): Likewise.
23018 (ASSERT_EQ_AT): Likewise.
23019 (ASSERT_KNOWN_EQ): Likewise.
23020 (ASSERT_KNOWN_EQ_AT): Likewise.
23021 (ASSERT_NE): Likewise.
23022 (ASSERT_MAYBE_NE): Likewise.
23023 (ASSERT_MAYBE_NE_AT): Likewise.
23024 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
23025 the assertion to pass.
23026 (ASSERT_STREQ_AT): Likewise.
23028 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
23030 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
23031 interaction with -pie.
23033 2018-04-30 David Malcolm <dmalcolm@redhat.com>
23035 * selftest.h: Fix alphabetization of per-source-file selftest
23038 2018-04-30 Jason Merrill <jason@redhat.com>
23040 PR c++/61982 - dead stores to destroyed objects.
23041 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
23044 2018-04-30 Jason Merrill <jason@redhat.com>
23046 * tree.c (build_clobber): New.
23047 * tree.h: Declare it.
23048 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
23050 2018-04-30 David Malcolm <dmalcolm@redhat.com>
23052 * diagnostic-show-locus.c (layout::layout): Update for
23053 location_get_source_line returning a char_span.
23054 (struct char_span): Move to input.h.
23055 (struct correction): Update for fields in char_span becoming
23057 (struct source_line): Update for location_get_source_line
23058 returning a char_span.
23059 (layout::print_line): Likewise.
23060 * edit-context.c (edited_file::print_content): Likewise.
23061 (edited_file::print_diff_hunk): Likewise.
23062 (edited_file::print_run_of_changed_lines): Likewise.
23063 (edited_file::get_num_lines): Likewise.
23064 (edited_line::edited_line): Likewise.
23065 * final.c (asm_show_source): Likewise.
23066 * input.c (location_get_source_line): Convert return type
23067 from const char * to char_span, losing the final "line_len"
23069 (dump_location_info): Update for the above.
23070 (get_substring_ranges_for_loc): Likewise. Use a char_span
23071 when handling the literal within the line.
23072 (test_reading_source_line): Update for location_get_source_line
23073 returning a char_span.
23074 * input.h (class char_span): Move here from
23075 diagnostic-show-locus.c, converting from a struct to a class.
23076 Make data members private.
23077 (char_span::operator bool): New.
23078 (char_span::length): New.
23079 (char_span::get_buffer): New.
23080 (char_span::operator[]): New.
23081 (char_span::subspan): Make const.
23082 (char_span::xstrdup): New.
23083 (location_get_source_line): Convert return type from const char *
23084 to char_span, losing the final "line_size" param.
23086 2018-04-30 Jan Hubicka <jh@suse.cz>
23088 * lto-wrapper.c (ltrans_priorities): New static var.
23089 (cmp_priority): New.
23090 (run_gcc): Read priorities and if doing parallel build order
23091 the Makefile by them.
23093 2018-04-30 David Malcolm <dmalcolm@redhat.com>
23095 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
23097 2018-04-30 Richard Biener <rguenther@suse.de>
23099 * tree-cfg.c (verify_address): Remove base argument, add
23100 flag whether to check TREE_ADDRESSABLE and do that.
23101 (verify_expr): Remove.
23102 (verify_types_in_gimple_reference): Add pieces from verify_expr.
23103 (verify_gimple_assign_single): Likewise.
23104 (verify_gimple_switch): Likewise.
23105 (verify_expr_location_1): Dereference tp once. Add (disabled)
23106 piece from verify_expr.
23107 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
23109 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
23111 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
23113 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
23115 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
23116 (small_data_pattern): Likewise.
23117 (arc_rewrite_small_data): Likewise.
23118 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
23119 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
23120 (get_symbol_alignment): New function.
23121 (legitimate_small_data_address_p): Likewise.
23122 (legitimate_scaled_address): Update, call
23123 legitimate_small_data_address_p.
23124 (output_sdata): New static variable.
23125 (arc_print_operand): Update how we handle small data operands.
23126 (arc_print_operand_address): Likewise.
23127 (arc_legitimate_address_p): Update, use
23128 legitimate_small_data_address_p.
23129 (arc_rewrite_small_data_p): Remove.
23130 (arc_rewrite_small_data_1): Likewise.
23131 (arc_rewrite_small_data): Likewise.
23132 (small_data_pattern): Likewise.
23133 (compact_sda_memory_operand): Update to use
23134 legitimate_small_data_address_p and get_symbol_alignment.
23135 (prepare_move_operands): Don't rewite sdata pattern.
23136 (prepare_extend_operands): Remove.
23137 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
23139 (zero_extendqisi2): Likewise.
23140 (zero_extendhisi2): Likewise.
23141 (extendqihi2): Likewise.
23142 (extendqisi2): Likewise.
23143 (extendhisi2): Likewise.
23144 (addsi3): Likewise.
23145 (subsi3): Likewise.
23146 (andsi3): Likewise.
23147 * config/arc/constraints.md (Usd): Change it to memory constraint.
23149 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
23151 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
23152 as source of std instructions.
23153 * config/arc/arc.md (movsi_insn): Update pattern predicate to
23154 allow 6-bit constants as source for store instructions.
23155 (movdi_insn): Update instruction pattern to allow 6-bit constants
23156 as source for store instructions.
23158 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
23160 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
23162 2018-04-30 Nathan Sidwell <nathan@acm.org>
23163 Sandra Loosemore <sandra@codesourcery.com>
23165 * dumpfile.c (dump_open): Allow '-' for stdout.
23166 * doc/invoke.texi (Developer Options): Document dump filename
23167 determination early. Document stdin/stdout selection.
23169 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
23171 Microblaze Target: PIC data text relative
23173 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
23174 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
23176 * config/microblaze/microblaze.h (microblaze_constant_address_p):
23177 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
23178 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
23179 New addressing mode for data-text relative position indepenedent code.
23180 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
23181 'ADDRESS_SYMBOLIC_TXT_REL'.
23182 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
23183 (microblaze_legitimate_pic_operand): Exclude function calls from
23184 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
23185 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
23187 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23188 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23189 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
23190 for 'address + offset'.
23191 (microblaze_expand_prologue): Add new function prologue call for
23193 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
23194 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
23195 table in case of TARGET_PIC_DATA_TEXT_REL.
23196 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
23197 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
23198 Add new macros 'UNSPEC_TEXT',
23199 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
23200 + exclude function calls from 'UNSPEC_PLT' in case of data text
23202 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23203 new target hook for generating address diff vector tables in case of
23205 * doc/tm.texi : Regenerate.
23206 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
23207 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
23208 of addr diff vector generation.
23209 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23210 target hook definition.
23211 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
23212 Add default function for generate_pic_addr_diff_vec -> flag_pic.
23213 * doc/invoke.texi (Add new pic option): Add new microblaze pic
23214 option for data text relative.
23216 2018-04-30 Richard Biener <rguenther@suse.de>
23218 * tree-chrec.h (evolution_function_is_constant_p): Remove
23220 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
23222 2018-04-30 Richard Biener <rguenther@suse.de>
23225 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
23227 2018-04-30 Richard Biener <rguenther@suse.de>
23229 PR tree-optimization/28364
23230 PR tree-optimization/85275
23231 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
23232 copying first exit test.
23234 2018-04-28 Mark Wielaard <mark@klomp.org>
23236 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
23237 dwarf_version >= 5.
23238 (dwarf_AT): Handle DW_AT_addr_base.
23239 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
23241 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
23244 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
23245 (*ashl<dwi>3_doubleword_mask_1): Ditto.
23246 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
23247 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
23249 2018-04-28 Richard Biener <rguenther@suse.de>
23251 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
23252 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
23253 to reflect use. Only add interesting stmts.
23255 2018-04-27 Martin Jambor <mjambor@suse.cz>
23258 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
23259 the jump function allows for passing through aggregate values.
23261 2018-04-27 David Malcolm <dmalcolm@redhat.com>
23263 * input.h (in_system_header_at): Convert from macro to inline
23265 (from_macro_expansion_at): Likewise.
23266 (from_macro_definition_at): Likewise.
23268 2018-04-27 Jeff Law <law@redhat.com>
23270 * config.gcc: Mark tile* targets as deprecated/obsolete.
23272 2018-04-27 Richard Biener <rguenther@suse.de>
23274 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
23277 2018-04-27 Richard Biener <rguenther@suse.de>
23279 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
23281 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
23283 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
23284 with Yd constraint. Set "preferred_for_speed" attribute from
23285 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
23286 with Yd constraint.
23287 (*movdi_internal): Ditto.
23288 (movti_interunit splitters): Remove
23289 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
23290 (movdi_interunit splitters): Ditto.
23291 * config/i386/constraints.md (Ye): Remove.
23292 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
23294 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23297 * config/aarch64/constraints.md (Usg): Limit to 31.
23298 (Usj): Limit to 63.
23300 2018-04-27 Jakub Jelinek <jakub@redhat.com>
23302 PR tree-optimization/85529
23303 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
23304 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
23305 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
23306 zero extension or masking of the MSB bit.
23307 (optimize_range_tests): Add FIRST_BB argument, pass it through
23308 to optimize_range_tests_var_bound.
23309 (maybe_optimize_range_tests, reassociate_bb): Adjust
23310 optimize_range_tests callers.
23312 2018-04-26 Richard Biener <rguenther@suse.de>
23313 Jakub Jelinek <jakub@redhat.com>
23315 * cgraph.h (symbol_table): Just declare debug method here.
23316 * symtab.c (symbol_table::debug): Define.
23318 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
23320 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
23322 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
23324 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
23325 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
23326 (*movdi_internal): Substitute Yi and Yj constraint with x
23327 and Ym and Yn constraint with y constraint. Update "isa"
23328 attribute and set "preferred_for_speed" attribute from
23329 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
23330 (*movsi_internal): Ditto.
23331 (*movdf_internal): Ditto.
23332 (*movsf_internal): Ditto.
23333 (*zero_extendsidi2): Ditto.
23334 * config/i386/sse.md (vec_set<mode>_0): Ditto.
23335 (sse2_loadld): Ditto.
23336 (*vec_extract<ssevecmodelower>_0): Ditto.
23337 (*vec_extractv4si_0_zext_sse4): Ditto.
23338 (vec_concatv2di): Ditto.
23339 (*vec_dup<mode>): Ditto.
23340 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
23341 * config/i386/constraints.md (Yi): Remove.
23346 2018-04-26 Nathan Sidwell <nathan@acm.org>
23348 * dumpfile.c (dump_open): New.
23349 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
23350 (dump_finish): Detect stdio/stderr by value not name.
23352 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
23354 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
23356 2018-04-26 Tom de Vries <tom@codesourcery.com>
23359 * config/nvptx/nvptx.c (verify_neutering_jumps)
23360 (verify_neutering_labels): New function
23361 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
23363 2018-04-26 Tom de Vries <tom@codesourcery.com>
23366 * config/nvptx/nvptx.c (needs_neutering_p): New function.
23367 (nvptx_single): Use needs_neutering_p to skip over insns that do not
23370 2018-04-26 Richard Biener <rguenther@suse.de>
23371 Tom de Vries <tom@codesourcery.com>
23374 * lto-streamer-out.c (output_function): Fixup loops if required to match
23375 discovery done in the reader.
23377 2018-04-26 Richard Biener <rguenther@suse.de>
23379 PR tree-optimization/85116
23380 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
23381 have a loop exit from the single latch predecessor. Remove
23382 case of header with just condition.
23383 (ch_base::copy_headers): Exclude infinite loops from any
23385 (pass_ch::execute): Record exits.
23387 2018-04-26 Richard Biener <rguenther@suse.de>
23389 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
23390 prologue cost vector and pass it to vect_get_load_cost.
23391 (vect_get_peeling_costs_all_drs): Likewise.
23392 (vect_peeling_hash_get_lowest_cost): Likewise.
23393 (vect_enhance_data_refs_alignment): Likewise.
23395 2018-04-26 Richard Biener <rguenther@suse.de>
23397 PR middle-end/85450
23398 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
23399 checking of integer<->pointer conversions.
23400 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
23401 sign-/zero-extending pointer types.
23402 (expand_omp_for_static_chunk): Likewise.
23404 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
23405 Jean Lee <xiaoyur347@gmail.com>
23407 * config/mips/mips.c (mips_asan_shadow_offset): New function.
23408 (TARGET_ASAN_SHADOW_OFFSET): Define.
23409 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
23410 true for -fsanitize=address.
23412 2018-04-25 Mark Wielaard <mark@klomp.org>
23414 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
23417 2018-04-25 Jakub Jelinek <jakub@redhat.com>
23419 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
23420 than "alu", remove explicit "memory" and "imm_disp" attributes.
23421 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
23423 PR middle-end/85414
23424 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
23425 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
23426 gen_lowpart_no_emit.
23428 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
23431 * config/i386/i386.c (ix86_expand_builtin): Change memory
23432 operand to XI, extend p0 to Pmode.
23433 * config/i386/i386.md: Change unspec volatile and operand
23434 1 mode to XI, change operand 0 mode to P.
23436 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
23438 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
23439 GET_MODE_MASK before any checking.
23440 (nds32_can_use_bset_p): Likewise.
23441 (nds32_can_use_btgl_p): Likewise.
23443 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
23445 * config/nds32/nds32-doubleword.md: New define_split pattern for
23446 illegal register number.
23448 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
23450 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
23452 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
23454 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
23456 2018-04-25 Richard Biener <rguenther@suse.de>
23458 * lto-streamer.h (LTO_major_version): Bump to 8.
23460 2018-04-25 Jakub Jelinek <jakub@redhat.com>
23462 * BASE-VER: Set to 9.0.0.
23464 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
23466 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
23467 in __abskf2 and __powikf2.
23469 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23472 * config/aarch64/constraints.md (Usg, Usj): New constraints.
23473 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
23474 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
23475 Use the above on operand 2. Reindent.
23476 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
23478 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
23481 * common/config/i386/i386-common.c (ix86_handle_option): Don't
23483 * config/i386/i386.opt (mcet): Removed.
23484 * doc/install.texi: Remove -mcet documentation.
23485 * doc/invoke.texi: Likewise.
23487 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
23490 * doc/install.texi: Remove -mcet from bootstrap-cet.
23492 2018-04-24 Jakub Jelinek <jakub@redhat.com>
23495 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
23496 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
23500 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
23501 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
23502 containing a CONST_VECTOR.
23504 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
23506 * doc/install.texi: Update newlib dependency for nvptx.
23508 2018-04-24 Jakub Jelinek <jakub@redhat.com>
23511 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
23512 instead of INTVAL when shifting x left.
23514 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
23516 PR tree-optimization/85478
23517 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
23518 vect_grouped_store_supported for single element vectors.
23520 2018-04-24 Richard Biener <rguenther@suse.de>
23523 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
23524 load cost increase to the case of non-constant step.
23526 2018-04-24 Jakub Jelinek <jakub@redhat.com>
23529 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
23530 destination if any_malformed_asm.
23532 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
23534 PR middle-end/85496
23535 * expr.c (store_field): In the bitfield case, if the value comes from
23536 a function call and is returned in registers by means of a PARALLEL,
23537 do not change the mode of the temporary unless BLKmode and VOIDmode.
23539 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
23541 PR rtl-optimization/85423
23542 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
23543 dependencies to debug insns when the previous insn is non-debug.
23545 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
23547 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
23548 enums into a single definition.
23549 (fls): Fix predicates and printing.
23552 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
23554 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
23555 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
23556 and short u6 immediate.
23557 (check_if_valid_sleep_operand): Remove.
23558 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
23560 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23562 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
23563 flag_always_save_lp condition.
23564 * config/nds32/nds32.opt (malways-save-lp): New option.
23566 2018-04-22 Shiva Chen <shiva0217@gmail.com>
23568 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
23569 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
23570 * config/nds32/nds32.h
23571 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
23572 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
23574 2018-04-22 Shiva Chen <shiva0217@gmail.com>
23576 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
23577 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
23579 2018-04-22 Shiva Chen <shiva0217@gmail.com>
23580 Chung-Ju Wu <jasonwucj@gmail.com>
23582 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
23584 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
23585 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
23587 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23589 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
23591 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23593 * config/nds32/nds32-protos.h (nds32_data_alignment,
23594 nds32_local_alignment): Declare.
23595 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
23596 nds32_local_alignment): New functions.
23597 (TARGET_CONSTANT_ALIGNMENT): Define.
23598 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
23600 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23602 * config/nds32/nds32.c
23603 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
23604 (TARGET_MODES_TIEABLE_P): Likewise.
23606 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
23608 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
23609 level Ofast and Og.
23611 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
23612 Chung-Ju Wu <jasonwucj@gmail.com>
23614 * config/nds32/constants.md (unspec_volatile_element): Add enum values
23615 for unaligned access.
23616 * config/nds32/nds32-intrinsic.c: Implementation of expanding
23618 * config/nds32/nds32-intrinsic.md: Likewise.
23619 * config/nds32/nds32_intrinsic.h: Likewise.
23620 * config/nds32/nds32.h (nds32_builtins): Likewise.
23621 * config/nds32/nds32.opt (munaligned-access): New option.
23622 * config/nds32/nds32.c (nds32_asm_file_start): Display
23623 flag_unaligned_access status.
23625 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
23627 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
23628 -mno-relax is present.
23629 * config/riscv/linux.h (LINK_SPEC): Ditto.
23631 2018-04-20 Martin Sebor <msebor@redhat.com>
23634 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
23636 (gimple_fold_builtin_stxcpy_chk): Same.
23637 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
23639 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
23642 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
23643 __powikf2 when long double is IEEE 128-bit.
23645 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
23647 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
23648 step to make sure stack always aligned.
23650 2018-04-20 Carl Love <cel@us.ibm.com>
23653 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
23654 size check for arg0.
23656 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
23657 Tom de Vries <tom@codesourcery.com>
23660 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
23661 Emit insns for calls too.
23662 (nvptx_find_par): Always look for worker-level predecessor insn.
23663 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
23665 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
23666 (nvptx_process_pars): Propagate frames for calls.
23668 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
23671 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
23673 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
23674 (ix86_handle_option): Don't handle OPT_mibt.
23675 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
23677 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
23679 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
23680 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
23681 (ix86_target_macros): Define __CET__ with flag_cf_protection
23682 for -fcf-protection.
23683 * config/i386/i386.c (isa2_opts): Remove -mibt.
23684 * config/i386/i386.h (TARGET_IBT): Removed.
23685 (TARGET_IBT_P): Likewise.
23686 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
23687 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
23688 * config/i386/i386.opt (mcet): Update help message.
23689 (mshstk): Likewise.
23691 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
23692 -mcet as an alias for -mshstk.
23694 2018-04-20 Richard Biener <rguenther@suse.de>
23696 PR middle-end/85475
23697 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
23698 complexity by forcing a single use of the multiply operand.
23700 2018-04-20 Martin Jambor <mjambor@suse.cz>
23703 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
23704 recursion dependency to only apply to non-clones.
23706 2018-04-20 Martin Jambor <mjambor@suse.cz>
23709 * ipa-cp.c (create_specialized_node): Check that clones of
23710 self-recursive edges exist during IPA-CP.
23712 2018-04-19 Toon Moene <toon@moene.org>
23714 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
23717 2018-04-19 Jakub Jelinek <jakub@redhat.com>
23719 PR tree-optimization/85467
23720 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
23721 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
23722 VECTOR_CST element to type.
23724 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23727 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
23728 * config/i386/i386.md (builtin_setjmp_setup): Removed.
23729 (builtin_longjmp): Likewise.
23730 (save_stack_nonlocal): New pattern.
23731 (restore_stack_nonlocal): Likewise.
23733 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23736 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23737 Replace ASM_OUTPUT_LABEL with fprintf.
23739 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23742 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23743 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
23744 * config/i386/i386-c.c (ix86_target_macros_internal): Also
23745 define __IBT__ and __SHSTK__ for -fcf-protection.
23746 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
23748 (ix86_trampoline_init): Likewise.
23749 (x86_output_mi_thunk): Likewise.
23750 (ix86_notrack_prefixed_insn_p): Likewise.
23751 (ix86_option_override_internal): Don't disallow -fcf-protection.
23752 * config/i386/i386.md (rdssp<mode>): Also enable for
23754 (incssp<mode>): Likewise.
23755 (nop_endbr): Likewise.
23756 * config/i386/i386.opt (mcet): Change help message to built-in
23759 (mshstk): Likewise.
23760 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
23761 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
23762 enable CET built-in functions.
23764 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
23766 * common/config/i386/i386-common.c
23767 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
23768 OPTION_MASK_ISA_MOVDIRI_UNSET,
23769 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
23770 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
23771 * config.gcc (movdirintrin.h): New header.
23772 * config/i386/cpuid.h (bit_MOVDIRI,
23773 bit_MOVDIR64B): New bits.
23774 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
23776 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
23777 (VOID, PVOID, PCVOID)): New function types.
23778 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
23779 __builtin_ia32_directstoreu_u64,
23780 __builtin_ia32_movdir64b): New builtins.
23781 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
23782 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
23784 (ix86_valid_target_attribute_inner_p): Ditto.
23785 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
23786 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
23787 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
23788 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
23789 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
23790 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
23791 (movdiri<mode>, movdir64b_<mode>): New.
23792 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
23793 * config/i386/immintrin.h: Include movdirintrin.h.
23794 * config/i386/movdirintrin.h: New file.
23795 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
23797 2018-04-19 Richard Biener <rguenther@suse.de>
23799 PR middle-end/85455
23800 * cfg.c (clear_bb_flags): When loop state says we have
23801 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
23803 2018-04-19 Richard Biener <rguenther@suse.de>
23805 PR tree-optimization/84737
23806 * tree-vect-data-refs.c (vect_copy_ref_info): New function
23807 copying restrict info.
23808 (vect_setup_realignment): Use it.
23809 * tree-vectorizer.h (vect_copy_ref_info): Declare.
23810 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
23811 the first DR to all generated stores.
23812 (vectorizable_load): Likewise for loads.
23814 2018-04-19 Jakub Jelinek <jakub@redhat.com>
23816 PR tree-optimization/85446
23817 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
23818 the integral and pointer types to have the same precision.
23820 * doc/install.texi: Document --disable-cet being the default and
23823 2018-04-18 Martin Liska <mliska@suse.cz>
23825 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
23828 2018-04-18 Martin Liska <mliska@suse.cz>
23831 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
23834 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23835 arguments if they are comparable.
23837 2018-04-18 Martin Liska <mliska@suse.cz>
23840 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23843 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23846 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
23849 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
23850 ENDBR after calling __morestack.
23852 2018-04-18 David Malcolm <dmalcolm@redhat.com>
23855 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
23856 by using gcc_base_ver to generate a gcc_driver_version, and use
23857 it when generating GCC_DRIVER_NAME.
23858 * configure: Regenerate.
23860 2018-04-18 Jakub Jelinek <jakub@redhat.com>
23863 * config.gcc: Obsolete powerpc*-*-*spe*.
23865 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23868 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
23869 (stabstr_D): Change type of unum from unsigned int to
23870 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
23873 2018-04-17 Jim Wilson <jimw@sifive.com>
23876 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
23877 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
23878 Set arg_pointer_offset after using pretend_args_size.
23880 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23882 PR rtl-optimization/85431
23883 * dse.c (record_store): Ignore zero width stores.
23886 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
23887 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
23888 __builtin_stack_restore rather than after it.
23889 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
23890 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
23891 argument instead of virtual_dynamic_stack_rtx.
23893 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
23895 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
23897 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
23898 Add note to error message to explain internal mapping of overloaded
23899 built-in function name to non-overloaded built-in function name.
23900 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
23903 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23906 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
23907 where the inputs overlap with the output.
23909 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23911 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
23912 (=v, v) alternative and explicit "memory" attribute.
23913 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
23914 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23916 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
23917 "sselog1" type instead of "sselog".
23918 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
23919 "sselog". Remove explicit "memory" attribute.
23920 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
23921 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23923 (vec_extract_hi_v32hi): Merge all alternatives into one, use
23924 "sselog1" type instead of "sselog". Remove explicit "memory"
23926 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
23927 use "sselog1" type instead of "sselog". Remove explicit "memory"
23929 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
23930 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23932 (vec_extract_hi_v64qi): Merge all alternatives into one, use
23933 "sselog1" type instead of "sselog". Remove explicit "memory"
23935 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
23936 use "sselog1" type instead of "sselog". Remove explicit "memory"
23940 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
23942 PR middle-end/85414
23943 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
23946 2018-04-17 Martin Jambor <mjambor@suse.cz>
23949 * ipa-cp.c (create_specialized_node): Call
23950 expand_all_artificial_thunks if necessary.
23952 2018-04-17 Martin Liska <mliska@suse.cz>
23955 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
23956 in message, remote space in between '_G' and '('.
23958 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23961 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
23962 avx512f_vmcmp<mode>3<round_saeonly_name>,
23963 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
23964 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
23965 avx512f_rndscale<mode><round_saeonly_name>,
23966 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
23967 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
23968 Use %<iptr>2 instead of %2 for -masm=intel.
23969 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
23970 avx512f_vcvttss2usi<round_saeonly_name>,
23971 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
23973 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
23974 avx512f_vcvttsd2usi<round_saeonly_name>,
23975 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
23976 Use %q1 instead of %1 for -masm=intel.
23977 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
23978 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
23979 of %3 for -masm=intel.
23980 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
23982 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
23984 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
23986 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
23987 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
23989 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
23991 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
23992 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
23993 %g1 and one with %0 and %1.
23994 (avx512er_vmrcp28<mode><round_saeonly_name>,
23995 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
23996 %1 for -masm=intel.
23997 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
23998 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
23999 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
24000 of %0 and %{%4%} for -masm=intel.
24001 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
24002 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
24003 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
24004 order of %0 and %{%5%}%{z%} for -masm=intel.
24006 2018-04-17 Jan Hubicka <jh@suse.cz>
24009 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
24011 2018-04-17 Martin Liska <mliska@suse.cz>
24014 * multiple_target.c (create_dispatcher_calls): Set apostrophes
24015 for target_clone error message. Make default implementation
24016 clone to be a local declaration.
24017 (separate_attrs): Add new argument and check for an empty
24019 (expand_target_clones): Handle it.
24020 (ipa_target_clone): Make redirection just for target_clones
24023 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
24024 Tom de Vries <tom@codesourcery.com>
24026 PR middle-end/84955
24027 * omp-expand.c (expand_oacc_for): Add dummy false branch for
24028 tiled basic blocks without omp continue statements.
24030 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
24033 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
24034 vec_extract expression as having side effects to make sure it gets
24037 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
24040 * config/i386/i386.c (get_builtin_code_for_version): Check
24043 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
24046 * config.gcc: Support "skylake".
24047 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
24049 * config/i386/i386.c (m_SKYLAKE): Define.
24050 (processor_target_table): Add "skylake".
24051 (ix86_option_override_internal): Add "skylake".
24052 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
24053 PROCESSOR_CANNONLAKE.
24054 (get_builtin_code_for_version): Fix priority for
24055 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
24056 PROCESSOR_SKYLAKE-AVX512.
24057 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
24058 (processor_type): Add PROCESSOR_SKYLAKE.
24060 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
24061 Jason Merrill <jason@redhat.com>
24064 * convert.c (convert_to_integer_1): Use direct recursion for
24065 enumeral types and types with a precision less than the number
24066 of bits in their mode.
24068 2018-04-16 Julia Koval <julia.koval@intel.com>
24071 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
24072 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
24074 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
24077 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
24078 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
24079 and -mno-direct-move.
24081 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
24084 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
24085 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
24086 Ensure negative shifts result in {0}.
24088 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
24090 PR rtl-optimization/79916
24091 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
24092 regs (if any) to define how to gnerate SD moves when LRA is in
24095 2018-04-13 Jakub Jelinek <jakub@redhat.com>
24097 PR rtl-optimization/85393
24098 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
24099 * except.c (expand_dw2_landing_pad_for_region): Make static.
24100 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
24101 a label and unconditional jump to old_bb, rather than
24102 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
24105 PR rtl-optimization/85376
24106 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
24107 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
24108 instead of a specific value.
24110 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
24111 Bin Cheng <bin.cheng@arm.com>
24113 PR tree-optimization/82965
24114 PR tree-optimization/83991
24115 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
24116 by_profile_only parameter.
24117 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
24118 information if the loop was predicted to iterate too many times.
24119 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
24121 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
24124 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
24127 2018-04-13 Martin Liska <mliska@suse.cz>
24128 Jakub Jelinek <jakub@redhat.com>
24130 PR middle-end/81657
24131 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
24132 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
24133 * builtins.c (expand_builtin_memory_copy_args): Use
24134 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
24135 handle dest_addr == pc_rtx.
24137 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
24140 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
24141 asked to not generate direct moves.
24142 (fix_trunc<mode>si2_stfiwx): Similar.
24143 (fix_trunc<mode>si2_internal): Similar.
24145 2018-04-12 Jakub Jelinek <jakub@redhat.com>
24148 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
24149 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
24150 lookup if dest in some wider mode is known to be const0_rtx and
24151 if so, record permanent equivalence for it to be ZERO_EXTEND of
24152 the narrower mode destination.
24154 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
24156 * lto-streamer-out.c (output_function): Revert 259346.
24157 * omp-expand.c (expand_oacc_for): Likewise.
24159 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
24161 PR rtl-optimization/85354
24162 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
24163 * sel-sched.c (sel_global_init): ... here.
24165 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
24168 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
24169 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
24170 mode for PE-COFF targets.
24171 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
24172 (i386_pe_asm_lto_end): Likewise.
24173 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
24174 (TARGET_ASM_LTO_END): Likewise.
24175 * config/i386/winnt.c (saved_debug_info_level): New static variable.
24176 (i386_pe_asm_lto_start): New function.
24177 (i386_pe_asm_lto_end): Likewise.
24179 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
24180 Richard Biener <rguenther@suse.de>
24182 PR middle-end/84955
24183 * lto-streamer-out.c (output_function): Fix CFG loop state before
24185 * omp-expand.c (expand_oacc_for): Handle calls to internal
24186 functions like regular functions.
24188 2018-04-12 Richard Biener <rguenther@suse.de>
24191 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
24192 for the early LTO debug to properly generate references to it
24193 during DIE emission. Do not re-use that for the skeleton for
24195 (dwarf2out_early_finish): Likewise.
24197 2018-04-12 Jakub Jelinek <jakub@redhat.com>
24200 * config/i386/sse.md
24201 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
24202 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
24203 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
24204 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
24205 and output is a reg, avoid creating invalid lowpart subreg, but
24206 instead split into a 512-bit move. Don't split if not AVX512VL,
24207 input is xmm16+ reg and output is a mem.
24208 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
24209 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
24210 xmm16+ reg and output is a mem.
24212 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24214 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
24215 also for flag_dwarf2_cfi_asm.
24217 2018-04-12 Jakub Jelinek <jakub@redhat.com>
24219 PR rtl-optimization/85342
24220 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
24221 a bool scalar var inside of the loop instead. Don't try to update
24222 recog_data.operand after failed apply_change_group.
24224 2018-04-12 Tom de Vries <tom@codesourcery.com>
24227 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
24228 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
24229 array with flexible array member as array without given dimension.
24230 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
24231 argument for undefined param to true.
24233 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
24236 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24237 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
24238 from PowerPC section.
24239 * config/rs6000/sysv4.opt (mcall-): Improve help text.
24240 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
24241 help text that is too long.
24242 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
24243 help text that is too long.
24244 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
24245 help text that is too long.
24247 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
24249 * config/alpha/alpha.md (stack_probe_internal): Rename
24250 from "probe_stack". Update all callers.
24252 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
24254 PR rtl-optimization/84566
24255 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
24256 sched_macro_fuse_insns.
24258 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
24261 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
24262 (compute_block_dependences): ... from here.
24264 2018-04-11 Jakub Jelinek <jakub@redhat.com>
24266 PR tree-optimization/85331
24267 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
24268 from int to HOST_WIDE_INT.
24270 2018-04-11 Martin Jambor <mjambor@suse.cz>
24273 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
24274 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
24275 not the same as the source val.
24276 (cgraph_edge_brings_value_p): New parameter.
24277 (gather_edges_for_value): Pass destination value to
24278 cgraph_edge_brings_value_p.
24279 (perhaps_add_new_callers): Likewise.
24280 (get_info_about_necessary_edges): Likewise and exclude values brought
24281 only by self-recursive edges.
24282 (create_specialized_node): Redirect only clones of self-calling edges.
24283 (+self_recursive_pass_through_p): New function.
24284 (find_more_scalar_values_for_callers_subset): Use it.
24285 (find_aggregate_values_for_callers_subset): Likewise.
24286 (known_aggs_to_agg_replacement_list): Removed.
24287 (decide_whether_version_node): Re-calculate known constants for all
24288 remaining context clones.
24290 2018-04-11 Richard Biener <rguenther@suse.de>
24293 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
24294 from early DWARF output.
24295 (dwarf2out_early_finish): Output line info unconditionally into
24296 early DWARF and add reference to it.
24298 2018-04-11 Jakub Jelinek <jakub@redhat.com>
24301 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
24302 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
24303 other than V2DFmode using iptr mode attribute.
24304 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
24306 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
24308 PR rtl-optimization/84659
24309 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
24311 2018-04-11 Jakub Jelinek <jakub@redhat.com>
24314 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
24316 (output_loc_list): Pass address of a dummy size variable even in the
24317 locview handling loop.
24318 (index_location_lists): Add comment on why skip_loc_list_entry can't
24321 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
24324 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
24327 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
24330 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24331 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
24332 and -mstring-compare-inline-limit.
24334 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
24337 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
24338 for stack clash protection in a register whenever we need it to be in
24341 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
24343 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
24344 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
24346 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
24349 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
24351 (mlong-double-): Ditto.
24352 * config/rs6000/sysv4.opt (msdata=): Ditto.
24353 (mtls-size=): Ditto.
24355 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
24357 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
24358 erroneous entries for
24359 "vector int vec_ldl (int, long int *)", and
24360 "vector unsigned int vec_ldl (int, unsigned long int *)".
24361 Add comments and entries for
24362 "vector bool char vec_ldl (int, bool char *)",
24363 "vector bool short vec_ldl (int, bool short *)",
24364 "vector bool int vec_ldl (int, bool int *)",
24365 "vector bool long long vec_ldl (int, bool long long *)",
24366 "vector pixel vec_ldl (int, pixel *)",
24367 "vector long long vec_ldl (int, long long *)",
24368 "vector unsigned long long vec_ldl (int, unsigned long long *)".
24369 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
24370 type tree bool_long_long_type_node and correct definition of
24371 bool_V2DI_type_node to make reference to this new type tree.
24372 (rs6000_mangle_type): Replace erroneous reference to
24373 bool_long_type_node with bool_long_long_type_node.
24374 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
24375 comments to emphasize sign distinctions for char and int types and
24376 replace RS6000_BTI_bool_long constant with
24377 RS6000_BTI_bool_long_long constant. Also add comment to restrict
24378 use of RS6000_BTI_pixel.
24379 (bool_long_type_node): Remove this macro definition.
24380 (bool_long_long_type_node): New macro definition
24382 2018-04-10 Jakub Jelinek <jakub@redhat.com>
24384 PR rtl-optimization/85300
24385 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
24386 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
24387 simplify_unary_operation fails.
24389 2018-04-10 Martin Liska <mliska@suse.cz>
24391 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
24392 cgraph_edge and ipa_ref.
24394 2018-04-10 Jakub Jelinek <jakub@redhat.com>
24398 * config/i386/sse.md
24399 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
24400 computation of the VEC_MERGE selector from mask.
24401 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
24402 Fix decoding of the VEC_MERGE selector into mask.
24404 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
24406 PR tree-optimization/85286
24407 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
24409 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
24411 * final.c (final_1): Set insn_last_address as well as
24412 insn_current_address.
24414 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24417 * explow.c (emit_stack_probe): Call validize_mem on memory location
24418 before passing it to gen_probe_stack. Create address operand and
24419 legitimize it for the probe_stack_address case.
24421 2018-04-09 Jan Hubicka <jh@suse.cz>
24424 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
24425 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
24426 * tree.c (free_lang_data_in_type): Fix handling of binfos;
24428 (free_lang_data): Rebuild type inheritance graph.
24430 2018-04-09 Martin Sebor <msebor@redhat.com>
24432 * invoke.texi (-finline-small-functions): Mention other optimization
24434 (-findirect-inlining, -fpartial-inlining): Same.
24435 (-finline-functions-called-once): Same.
24436 (-freorder-blocks-and-partition): Same.
24438 2018-04-09 Jan Hubicka <jh@suse.cz>
24441 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
24442 jumps; choose last target that matches the criteria (i.e.
24443 no partition changes for non-crossing jumps).
24444 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
24445 support for redirecting crossing jumps to non-crossing.
24447 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
24449 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
24450 also for naked functions.
24452 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
24454 * config/arc/arc.md (add_shift): New pattern.
24455 (add_shift2): Likewise.
24456 (sub_shift): Likewise.
24457 (sub_shift_cmp0_noout): Likewise.
24458 (compare_si_ashiftsi): Likewise.
24459 (xbfu_cmp0_noout): New combine pattern.
24460 (xbfu_cmp0"): Likewise.
24461 (movsi_set_cc_insn): Place the predicable variant first.
24462 (commutative_binary_cmp0_noout): Remove clobber.
24463 (commutative_binary_cmp0): New pattern.
24464 (noncommutative_binary_cmp0): Likewise.
24465 (noncommutative_binary_cmp0_noout): Likewise.
24466 (noncommutative_binary_comparison_result_used): Removed.
24467 (rsub_cmp0): New pattern.
24468 (rsub_cmp0_noout): Likewise.
24469 (extzvsi): Changed, keep only meaningful variants.
24470 (SQH, SEZ): New iterators.
24471 (SQH_postfix): New mode attribute.
24472 (SEZ_prefix): New code attribute.
24473 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
24474 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
24475 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
24476 of numerical value.
24477 (noncommutative_operator): Check the availability of barrel
24480 2018-04-09 Richard Biener <rguenther@suse.de>
24482 PR tree-optimization/85284
24483 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
24484 Only use the niter constraining form of simple_iv when the exit
24485 is always executed.
24487 2018-04-09 Tom de Vries <tom@codesourcery.com>
24490 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
24491 (define_expand "*memory_barrier"): New define_expand.
24492 (define_insn "memory_barrier"): New insn.
24494 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
24496 PR rtl-optimization/80463
24497 PR rtl-optimization/83972
24498 PR rtl-optimization/83480
24500 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
24501 correct producer for the insn.
24502 (tidy_control_flow): Fixup seqnos in case of debug insns.
24504 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
24506 PR rtl-optimization/83913
24508 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
24509 different sched-times when merging exprs.
24511 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
24513 PR rtl-optimization/83962
24515 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
24516 tidy_fallthru_edge and tidy_control_flow.
24518 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
24520 PR rtl-optimization/83530
24522 * sel-sched.c (force_next_insn): New global variable.
24523 (remove_insn_for_debug): When force_next_insn is true, also leave only
24524 next insn in the ready list.
24525 (sel_sched_region): When the region wasn't scheduled, make another pass
24526 over it with force_next_insn set to 1.
24528 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
24530 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
24532 * config/nds32/constants.md (unspec_volatile_element): Add enum values
24533 for interrupt control.
24534 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24535 functions for interrupt control.
24536 * config/nds32/nds32-intrinsic.md: Likewise.
24537 * config/nds32/nds32_intrinsic.h: Likewise.
24538 * config/nds32/nds32.h (nds32_builtins): Likewise.
24540 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
24542 * config/nds32/nds32.c (nds32_init_machine_status,
24543 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
24544 strict_aligned_p field.
24545 (nds32_expand_to_rtl_hook): New function.
24546 (TARGET_EXPAND_TO_RTL_HOOK): Define.
24547 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
24549 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
24550 Chung-Ju Wu <jasonwucj@gmail.com>
24552 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
24553 * config/nds32/nds32-n7.md: New file.
24554 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
24555 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
24557 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
24558 * config/nds32/nds32.md (pipeline_model): Add n7.
24559 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
24560 * config/nds32/pipelines.md: Include n7 settings.
24562 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
24563 Chung-Ju Wu <jasonwucj@gmail.com>
24565 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
24566 * config/nds32/nds32-e8.md: New file.
24567 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
24568 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
24570 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
24571 * config/nds32/nds32.md (pipeline_model): Add e8.
24572 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
24573 * config/nds32/pipelines.md: Include e8 settings.
24575 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
24576 Chung-Ju Wu <jasonwucj@gmail.com>
24578 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
24579 * config/nds32/nds32-n8.md: New file.
24580 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
24581 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
24583 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
24584 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
24585 * config/nds32/nds32.md (pipeline_model): Add n8.
24586 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
24587 * config/nds32/pipelines.md: Include n8 settings.
24589 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
24590 Chung-Ju Wu <jasonwucj@gmail.com>
24592 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
24593 * config/nds32/nds32-n9-2r1w.md: New file.
24594 * config/nds32/nds32-n9-3r2w.md: New file.
24595 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
24596 nds32_register_ports): New or modify for cpu n9.
24597 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
24599 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
24600 * config/nds32/nds32-utils.c: New file.
24601 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
24602 TARGET_MUL_SLOW): Define.
24603 * config/nds32/nds32.md (pipeline_model): New attribute.
24604 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
24605 New options that support cpu n9.
24606 * config/nds32/pipelines.md: Include n9 settings.
24607 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
24609 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
24611 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
24612 information if necessary.
24613 (output_cond_branch_compare_zero): Likewise.
24614 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
24615 (nds32_target_alignment): Refine for alignment.
24616 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
24617 (FUNCTION_BOUNDARY): Modify.
24618 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
24620 * config/nds32/nds32.opt (malways-align, malign-functions): New.
24622 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
24624 * config/nds32/constants.md (unspec_volatile_element): Add values for
24625 TLB operation and data prefetch.
24626 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24627 functions for TLB operation and data prefetch.
24628 * config/nds32/nds32-intrinsic.md: Likewise.
24629 * config/nds32/nds32_intrinsic.h: Likewise.
24630 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
24631 (nds32_print_operand): Likewise.
24632 * config/nds32/nds32.h (nds32_builtins): Likewise.
24634 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
24635 Andrew Pinski <pinsika@gcc.gnu.org>
24637 PR middle-end/82976
24638 * match.pd: Use constant_boolean_node of correct type instead of
24639 boolean_true_node or boolean_false_node for simplifying
24640 pointer comparisons to zero.
24642 2018-04-07 Jakub Jelinek <jakub@redhat.com>
24644 PR tree-optimization/80021
24645 * tree.c (verify_type_variant): Make error call in verify_variant_match
24646 translatable and remove final full stop.
24648 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24650 * config/nds32/constants.md (unspec_volatile_element): Add
24651 UNSPEC_VOLATILE_EH_RETURN.
24652 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
24653 nds32_output_stack_pop): Support dwarf exception handling process.
24654 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
24655 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
24656 exception handling process.
24657 (nds32_compute_stack_frame): Likewise.
24658 (nds32_return_addr_rtx): Likewise.
24659 (nds32_initial_elimination_offset): Likewise.
24660 (nds32_expand_prologue): Likewise.
24661 (nds32_expand_epilogue): Likewise.
24662 (nds32_dynamic_chain_address): New function.
24663 * config/nds32/nds32.h (machine_function): Add fields for dwarf
24664 exception handling.
24665 (DYNAMIC_CHAIN_ADDRESS): Define.
24666 (EH_RETURN_DATA_REGNO): Define.
24667 (EH_RETURN_STACKADJ_RTX): Define.
24668 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
24669 patterns for dwarf exception handling.
24671 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24673 * config/nds32/nds32.h: Clean up obsolete macros.
24675 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24677 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24678 Add enum values for particular instructions.
24679 * config/nds32/nds32-intrinsic.c: Implementation of expanding
24680 particular intrinsic functions.
24681 * config/nds32/nds32-intrinsic.md: Likewise.
24682 * config/nds32/nds32_intrinsic.h: Likewise.
24683 * config/nds32/nds32.h (nds32_builtins): Likewise.
24684 * config/nds32/nds32.md (type): Add pbsad and pbsada.
24685 (btst, ave): New patterns for particular instructions.
24687 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24689 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24690 Add enum values for atomic load/store and memory sync.
24691 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
24693 * config/nds32/nds32-intrinsic.md: Likewise.
24694 * config/nds32/nds32_intrinsic.h: Likewise.
24695 * config/nds32/nds32.h (nds32_builtins): Likewise.
24697 2018-04-07 Jakub Jelinek <jakub@redhat.com>
24699 PR tree-optimization/85257
24700 * fold-const.c (native_encode_vector): If not all elts could fit
24701 and off is -1, return 0 rather than offset.
24702 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
24703 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
24704 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
24705 adjust buffer in native_interpret_expr call.
24707 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24709 * config/nds32/constants.md (unspec_volatile_element): Add cache
24710 control enum values.
24711 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
24712 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
24713 * config/nds32/nds32.c (nds32_cctl_names): New.
24714 (nds32_print_operand): Handle cache control register names.
24715 * config/nds32/nds32.h (nds32_builtins): New enum values.
24716 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
24718 * config/nds32/nds32.md (type): Add mmu.
24719 * config/nds32/pipelines.md (simple_insn): Add mmu.
24721 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24723 * config/nds32/nds32.md (type): Remove call.
24724 * config/nds32/pipelines.md (simple_insn): Likewise.
24726 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24728 * config/nds32/constants.md (unspec_volatile_element): Add
24729 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
24730 UNSPEC_VOLATILE_FMFCFG.
24731 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
24732 description for fmfcfg and fmfcsr.
24733 (bdesc_1arg): Add fmtcsr.
24734 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
24735 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
24736 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
24737 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
24738 unspec_fmfcfg): New patterns.
24739 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
24740 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
24741 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
24742 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
24743 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
24744 __nds32__fmfcfg): Define.
24746 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24748 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
24749 intrinsic register names.
24750 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
24751 intrinsic register enum values and macros.
24753 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24755 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
24756 for load/store addressing form.
24757 (nds32_print_operand_address): Likewise.
24759 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
24762 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
24763 based on LABEL_REF. Remove useless assertion.
24764 (pic_address_needs_scratch): Fix formatting.
24765 (sparc_legitimize_pic_address): Minor tweaks.
24766 (sparc_delegitimize_address): Adjust assertion accordingly.
24767 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
24768 into symbolic_operand.
24769 (movsi_high_pic_label_ref): Likewise.
24770 (movsi_lo_sum_pic_label_ref): Likewise.
24771 (movdi_pic_label_ref): Likewise.
24772 (movdi_high_pic_label_ref): Likewise.
24773 (movdi_lo_sum_pic_label_ref): Likewise.
24775 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
24777 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
24778 custom LIB_SPEC setup.
24780 2018-04-06 Ruslan Bukin <br@bsdpad.com>
24781 Kito Cheng <kito.cheng@gmail.com>
24783 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
24784 * config/riscv/freebsd.h: New.
24786 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24788 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
24789 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
24792 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24793 Kito Cheng <kito.cheng@gmail.com>
24795 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
24796 nds32_output_call, nds32_symbol_binds_local_p): New functions.
24797 * config/nds32/nds32-protos.h (nds32_output_call,
24798 nds32_output_return): Declare.
24799 * config/nds32/nds32.md: Refine all the call and return patterns.
24801 2018-04-06 Jakub Jelinek <jakub@redhat.com>
24804 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
24805 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
24807 PR rtl-optimization/84872
24808 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
24809 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
24810 EDGE_CROSSING edge.
24812 2018-04-06 Tamar Christina <tamar.christina@arm.com>
24814 * expr.c (copy_blkmode_to_reg): Revert 254862.
24815 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
24817 2018-04-06 Richard Biener <rguenther@suse.de>
24819 PR middle-end/85244
24820 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
24821 after seeing a component reference with an adjacent field. Treat
24822 refs to arrays at struct end of external decls similar to
24823 refs to unconstrained commons.
24825 2018-04-06 Jakub Jelinek <jakub@redhat.com>
24828 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
24829 look through SAVE_EXPRs with non-side-effects argument. Adjust
24831 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
24834 2018-04-06 Richard Biener <rguenther@suse.de>
24836 PR middle-end/85180
24837 * alias.c (find_base_term): New wrapper around find_base_term
24838 unwinding CSELIB_VAL_PTR changes.
24839 (find_base_term): Do not restore CSELIB_VAL_PTR during the
24842 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24844 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
24846 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
24847 constant definitions.
24848 ("nop"): lr 0,0 -> nopr r0
24849 ("nop_lr0", "nop_lr1"): New insn definitions.
24851 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24853 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
24854 NDS32_V3PUSH_AVAILABLE_P macro.
24856 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
24857 Chung-Ju Wu <jasonwucj@gmail.com>
24859 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
24860 (nds32*-*-*): Add float and fpu_config into supported_defaults.
24861 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
24862 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
24863 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
24864 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
24865 * config/nds32/constraints.md: New constraints and checking for hard
24866 float configuration.
24867 * config/nds32/iterators.md: New mode iterator and attribute for hard
24868 float configuration.
24869 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
24871 * config/nds32/nds32-fpu.md: New file.
24872 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
24873 deal with hard float code generation.
24874 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
24876 (abi_type, float_reg_number): New enum type.
24877 * config/nds32/nds32-predicates.c: New predicates for hard float.
24878 * config/nds32/nds32-protos.h: Declare functions for hard float.
24879 * config/nds32/nds32.c: Implementation for hard float configuration.
24880 * config/nds32/nds32.h: Definitions for hard float configuration.
24881 * config/nds32/nds32.md: Include hard float machine description and
24882 modify patterns for hard float configuration.
24883 * config/nds32/nds32.opt: New options for hard float configuration.
24884 * config/nds32/predicates.md: New predicates for hard float
24887 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
24889 * common/config/nds32/nds32-common.c
24890 (nds32_option_optimization_table): Enable -mreleax-hint by default.
24892 2018-04-05 Jakub Jelinek <jakub@redhat.com>
24894 PR middle-end/85195
24895 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
24896 CONSTRUCTOR_ELT (ctor, ...)->value.
24898 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
24901 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
24903 2018-04-05 Tom de Vries <tom@codesourcery.com>
24906 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
24909 2018-04-05 Shiva Chen <shiva0217@gmail.com>
24910 Kito Cheng <kito.cheng@gmail.com>
24912 * config/nds32/constraints.md (U33): Fine-tune checking condition.
24913 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
24914 * config/nds32/nds32.h (nds32_16bit_address_type): Add
24915 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
24917 2018-04-05 Shiva Chen <shiva0217@gmail.com>
24918 Kito Cheng <kito.cheng@gmail.com>
24920 * config/nds32/constraints.md (Ufe): New memory constraint.
24921 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
24922 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
24923 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
24925 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
24926 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
24928 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24930 * config/nds32/nds32.md: Use optimize_size in the condition for
24931 alu-shift instructions.
24933 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24935 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
24937 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24939 * config/nds32/nds32.md (negsi2): Refine pattern.
24941 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
24942 Chung-Ju Wu <jasonwucj@gmail.com>
24944 * config/nds32/iterators.md (shift_rotate): New code iterator.
24945 (shift): New code attribute.
24946 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
24947 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
24948 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
24949 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
24950 bit-wise operations.
24951 (andsi3, *andsi3): Ditto.
24952 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
24953 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
24954 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
24955 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
24956 nds32_ior_operand, nds32_xor_operand): New predicates.
24958 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24960 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
24961 (addsi3, subsi3): ... this.
24963 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24965 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
24967 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24969 * config/nds32/nds32.md: Adjust indention.
24971 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
24973 * config/nds32/nds32.md (feature): New attribute.
24975 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24977 * config/nds32/nds32.md (subtype): New attribute.
24979 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
24982 * config/arm/arm-builtins.c (arm_expand_builtin): Change
24983 expansion to perform a bitwise AND of the argument followed by a
24984 boolean negation of the result.
24986 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
24988 PR rtl-optimization/84878
24989 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
24990 the basic block. Assert the use reference is not artificial and that
24991 it has an associated insn.
24993 2018-04-04 Michael Matz <matz@suse.de>
24995 * builtins.c (compute_objsize): Pass correct operand
24996 to array_at_struct_end_p.
24998 2018-04-04 Richard Biener <rguenther@suse.de>
25001 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
25002 from contexts for DINFO_LEVEL_TERSE and below.
25004 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
25006 * config/nds32/nds32-doubleword.md (move_<mode>): Require
25007 resiter_operand condition.
25008 * config/nds32/nds32.md (*move<mode>): Ditto.
25010 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
25011 Monk Chiang <sh.chiang04@gmail.com>
25013 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
25015 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
25017 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
25019 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
25020 Kito Cheng <kito.cheng@gmail.com>
25022 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
25023 nds32_cond_code_str, output_cond_branch,
25024 output_cond_branch_compare_zero, nds32_expand_cbranch,
25025 nds32_expand_cstore, nds32_expand_movcc,
25026 nds32_output_cbranchsi4_equality_zero,
25027 nds32_output_cbranchsi4_equality_reg,
25028 nds32_output_cbranchsi4_equality_reg_or_const_int,
25029 nds32_output_cbranchsi4_greater_less_zero: New functions.
25030 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
25031 nds32_expand_cstore, nds32_expand_movcc,
25032 nds32_output_cbranchsi4_equality_zero,
25033 nds32_output_cbranchsi4_equality_reg,
25034 nds32_output_cbranchsi4_equality_reg_or_const_int,
25035 nds32_output_cbranchsi4_greater_less_zero): Declare.
25036 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
25037 nds32_rimm11s_operand): New predicates.
25038 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
25039 * config/nds32/nds32.md: Rewrite all the branch and conditional move
25042 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
25044 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
25045 * config/nds32/nds32.md: Ditto.
25046 * config/nds32/pipelines.md: Ditto.
25048 2018-04-04 Richard Biener <rguenther@suse.de>
25050 PR tree-optimization/85168
25051 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
25052 propagating abnormals.
25054 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
25056 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
25058 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
25059 Kito Cheng <kito.cheng@gmail.com>
25061 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
25062 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
25063 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
25064 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
25065 * config/nds32/nds32.md (sibcall_internal): New.
25066 (sibcall_register): Remove.
25067 (sibcall_immediate): Remove.
25068 (sibcall_value_internal): New.
25069 (sibcall_value_register): Remove.
25070 (sibcall_value_immediate): Remove.
25071 * config/nds32/predicates.md (nds32_general_register_operand): New.
25072 (nds32_call_address_operand): New.
25074 2018-04-03 Jakub Jelinek <jakub@redhat.com>
25076 PR rtl-optimization/85167
25077 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
25078 bb_defs if *split_p, instead preinitialize it to NULL.
25080 PR tree-optimization/85156
25081 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
25082 evaluating the argument multiple times.
25084 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
25086 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
25088 (_mm_cvtpd_ps): Likewise.
25089 (_mm_cvttpd_epi32): Likewise.
25090 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
25091 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
25092 vector, pixel, and bool following altivec.h include.
25094 2018-04-03 Martin Sebor <msebor@redhat.com>
25096 * doc/extend.texi (Common Function Attributes): Clarify.
25097 (const attribute): Likewise.
25098 (pure attribute): Likewise.
25100 2018-04-03 Jakub Jelinek <jakub@redhat.com>
25103 * config/i386/i386.c (ix86_expand_vector_set): Use
25104 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
25106 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
25108 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
25109 instructions when changing rounding bits to preserve precision bits
25110 in the x87 control word.
25112 2018-04-03 Martin Liska <mliska@suse.cz>
25114 PR tree-optimization/82491
25115 * rtl.h (strip_offset_and_add): Replace += suboffset with
25116 poly_uint64 () + suboffset.
25118 2018-03-29 Martin Liska <mliska@suse.cz>
25119 Martin Jambor <mjambor@suse.cz>
25122 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
25123 param_type is not an integral or pointer type.
25125 2018-04-03 Richard Biener <rguenther@suse.de>
25127 * sese.h (recompute_all_dominators): Remove.
25129 2018-04-02 Martin Sebor <msebor@redhat.com>
25131 * doc/invoke.texi (-Wrestrict): Fix typos.
25133 2018-04-02 Jim Wilson <jimw@sifive.com>
25135 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
25136 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
25137 (<optab>di3, <optab>si3_extend): Likewise.
25138 (<optab>si3_mask, <optab>si3_mask_1): New.
25139 (<optab>di3_mask, <optab>di3_mask_1): New.
25140 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
25141 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
25142 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
25144 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
25146 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
25149 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
25151 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
25152 (nds32_canonicalize_comparison): New function.
25154 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
25155 Kito Cheng <kito.cheng@gmail.com>
25156 Kuan-Lin Chen <kuanlinchentw@gmail.com>
25158 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
25159 * config/nds32/constants.md (unspec_volatile_element): Add
25160 UNSPEC_VOLATILE_RELAX_GROUP.
25161 * config/nds32/nds32-relax-opt.c: New file.
25162 * config/nds32/nds32-predicates.c
25163 (nds32_symbol_load_store_p): New function.
25164 * config/nds32/nds32-protos.h
25165 (nds32_symbol_load_store_p): Declare function.
25166 (make_pass_nds32_relax_opt): Declare new rtl pass function.
25167 * config/nds32/nds32.c
25168 (nds32_register_pass): New function to register pass.
25169 (nds32_register_passes): New function to register passes.
25170 * config/nds32/nds32.md (relax_group): New pattern.
25171 * config/nds32/nds32.opt (mrelax-hint): New option.
25172 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
25174 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
25176 * config/nds32/t-nds32: Modify files dependency.
25178 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
25180 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
25181 (PROFILE_HOOK): Define its implementation.
25183 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
25185 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
25186 type and 32-bit size.
25188 2018-04-01 Jakub Jelinek <jakub@redhat.com>
25190 PR middle-end/85090
25191 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
25192 (V_128_256): New mode iterator.
25193 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
25194 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
25195 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
25197 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
25198 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
25200 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
25203 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
25204 NaN inputs correctly.
25206 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
25209 * config/rs6000/vsx.md (??r): New mode attribute.
25210 (*vsx_mov<mode>_64bit): Use it.
25211 (*vsx_mov<mode>_32bit): Likewise.
25213 2018-03-30 Martin Sebor <msebor@redhat.com>
25215 PR tree-optimization/84818
25216 * builtins.c (check_access): Use warning_n.
25218 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25221 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
25223 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
25226 2018-03-30 Julia Koval <julia.koval@intel.com>
25229 * x86-tune.def (movx, partial_reg_dependency): Enable for
25232 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
25234 PR inline-asm/84985
25235 * lra-constraints.c (process_alt_operands): Move setting
25236 this_alternative_matches below.
25238 2018-03-29 Martin Liska <mliska@suse.cz>
25241 * doc/invoke.texi: Document how LTO works with debug info.
25242 Describe auto-load support of binutils. Mention 'x86-64'
25243 as valid option value of -march option.
25245 2018-03-29 Jakub Jelinek <jakub@redhat.com>
25247 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
25250 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
25251 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
25252 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
25255 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
25258 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
25259 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
25260 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
25261 for RS6000_BTM_POWERPC64.
25262 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
25263 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
25264 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
25267 (DIVDEU): Likewise.
25269 2018-03-28 Carl Love <cel@us.ibm.com>
25272 2017-09-27 Carl Love <cel@us.ibm.com>
25274 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
25275 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
25276 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
25279 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25281 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
25282 instead of __vector bool.
25283 (_mm_max_pu8): Likewise.
25284 (_mm_min_pi16): Likewise.
25286 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
25289 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
25290 (DIVWEUO): Likewise.
25291 (DIVDEO): Likewise.
25292 (DIVDEUO): Likewise.
25293 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
25294 DIVWEUO and DIVDEUO.
25295 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
25296 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
25297 (div_extend): Likewise.
25298 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
25300 (__builtin_divweuo): Likewise.
25301 (__builtin_divdeo): Likewise.
25302 (__builtin_divdeuo): Likewise.
25304 2018-03-28 Jakub Jelinek <jakub@redhat.com>
25307 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
25308 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
25310 PR tree-optimization/82004
25311 * gimple-match-head.c (optimize_pow_to_exp): New function.
25312 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
25313 Don't fold to exp if optimize_pow_to_exp is false.
25315 2018-03-28 Martin Liska <mliska@suse.cz>
25318 * calls.c (initialize_argument_information): Fix trailing space.
25319 * common.opt: Fix typo and provide better explanation for
25320 -fsanitize-coverage option.
25321 * config/i386/i386.opt: Fix typo.
25323 2018-03-28 Jakub Jelinek <jakub@redhat.com>
25324 Martin Liska <mliska@suse.cz>
25327 * gimplify.c (asan_poison_variable): Don't do the check for
25328 gimplify_omp_ctxp here.
25329 (gimplify_decl_expr): Do it here.
25330 (gimplify_target_expr): Likewise.
25332 2018-03-28 Martin Liska <mliska@suse.cz>
25335 * config/i386/i386.c (ix86_function_arg_advance): Do not call
25336 chkp_type_bounds_count if MPX is not enabled.
25338 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
25340 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
25342 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
25345 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
25346 function to create the function decl for complex long double
25347 multiply and divide for -mabi=ieeelongdouble.
25348 (init_float128_ieee): Call it.
25350 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
25353 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
25354 -fcf-protection=branch -mibt.
25355 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
25357 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
25360 * config/arm/arm.c (arm_valid_symbolic_address): Handle
25361 arm_word_relocations.
25363 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
25366 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
25367 extern array declarations.
25369 2018-03-27 Richard Biener <rguenther@suse.de>
25371 PR middle-end/84067
25372 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
25373 explicit single_use checks.
25375 2018-03-27 Richard Biener <rguenther@suse.de>
25377 PR tree-optimization/85082
25378 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
25381 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
25383 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
25384 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
25385 Turn on fasynchronous-unwind-tables and funwind-tables.
25387 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
25390 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
25391 (*bmi_blsr_<mode>_ccz): Ditto.
25393 2018-03-26 Tom de Vries <tom@codesourcery.com>
25395 PR tree-optimization/85063
25396 * omp-general.c (offloading_function_p): New function. Factor out
25398 * omp-offload.c (pass_omp_target_link::gate): ... here.
25399 * omp-general.h (offloading_function_p): Declare.
25400 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
25401 with attribute omp declare target for offloading functions.
25403 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
25405 PR tree-optimization/84005
25406 * tree-data-ref.h (get_base_for_alignment): Declare.
25407 * tree-data-ref.c (get_base_for_alignment_1): New function.
25408 (get_base_for_alignment): Likewise.
25409 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
25410 get_base_for_alignment to find a suitable base object, instead
25411 of always using drb->base_address.
25413 2018-03-23 Jakub Jelinek <jakub@redhat.com>
25415 PR inline-asm/85022
25416 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
25417 known size by default.
25419 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
25421 PR inline-asm/85030
25422 * lra-constraints.c (process_alt_operands): Don't match BLKmode
25423 and non BLKmode operands.
25425 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25428 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
25429 Clean up attributes.
25431 2018-03-23 Richard Biener <rguenther@suse.de>
25434 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
25435 we are going to emit early debug for LTO.
25437 2018-03-23 Jakub Jelinek <jakub@redhat.com>
25439 PR inline-asm/85034
25440 * function.c (match_asm_constraints_1): Don't optimize if input
25441 doesn't satisfy general_operand predicate for output's mode.
25443 PR inline-asm/85022
25444 * alias.c (write_dependence_p): Don't require for x_canonicalized
25445 non-VOIDmode if x has VOIDmode.
25448 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
25449 just don't try to optimize it rather than assert it never happens.
25451 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
25453 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
25454 macro expansions for definition of ST_INTERNAL_<mode> and
25455 LD_INTERNAL_<mode> builtins.
25456 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
25458 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
25460 (altivec_expand_st_builtin): Likewise.
25461 (altivec_expand_builtin): Remove calls to deleted functions.
25462 (rs6000_address_for_altivec): Delete this function.
25463 * config/rs6000/vector.md: Remove expands for
25464 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
25466 2018-03-22 Sudakshina Das <sudi.das@arm.com>
25469 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
25470 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
25471 re-computing once computed.
25472 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
25473 (arm_init_machine_status): Initialize
25474 machine->static_chain_stack_bytes.
25476 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
25479 * doc/extend.texi: Add four new prototypes for vec_ld.
25480 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
25481 definitions for more logical presentation.
25482 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
25483 entries for V1TI variants of __builtin_altivec_ld builtin.
25484 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
25485 handling of V1TI variant of LVX icode pattern.
25486 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
25487 (rs6000_gimple_fold_builtin): Likewise.
25488 (altivec_init_builtins): Add code to define
25489 __builtin_altivec_lvx_v1ti function.
25491 2018-03-22 Jakub Jelinek <jakub@redhat.com>
25493 PR inline-asm/84941
25494 * function.c (match_asm_constraints_1): Don't do the optimization
25495 if input isn't a REG, SUBREG, MEM or constant.
25497 2018-03-22 Tom de Vries <tom@codesourcery.com>
25499 PR tree-optimization/84956
25500 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
25501 bb_has_abnormal_pred.
25503 2018-03-22 Jakub Jelinek <jakub@redhat.com>
25506 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
25507 DECL_INITIAL (decl) to decl at the end.
25508 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
25509 adjust the comment.
25511 2018-03-21 Joseph Myers <joseph@codesourcery.com>
25513 * doc/extend.texi (__builtin_tgmath): Document when complex
25514 integer types are treated as _Complex _Float64.
25516 2018-03-21 Tom de Vries <tom@codesourcery.com>
25518 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
25520 2018-03-21 Jakub Jelinek <jakub@redhat.com>
25522 PR tree-optimization/84960
25523 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
25524 if it is ENTRY block, move them into single succ of ENTRY in that case.
25526 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
25528 PR tree-optimization/84811
25529 * poly-int.h (poly_span_traits): Remove the T3 parameter and
25530 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
25531 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
25532 (known_subrange_p): Update accordingly. Cast each value involved
25533 in the size comparison, rather than casting the result of the
25536 2018-03-21 Jakub Jelinek <jakub@redhat.com>
25538 PR tree-optimization/84982
25539 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
25540 by flipping the least significant bit rather than all bits from
25541 bitpos to bitpos + bitsize - 1.
25543 2018-03-21 Nathan Sidwell <nathan@acm.org>
25545 * doc/extend.texi (Deprecated Features): Remove mention of
25546 long-deleted deprecations.
25548 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25551 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
25552 * configure: Regenerate.
25554 2018-03-21 Tom de Vries <tom@codesourcery.com>
25556 PR tree-optimization/83126
25557 * tree-parloops.c (num_phis): New function.
25558 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
25560 2018-03-21 Nathan Sidwell <nathan@acm.org>
25562 * doc/extend.texi (Deprecated Features): Update deprecated flags,
25563 mention anon-struct/union members and trailing attributes.
25565 2018-03-21 Bin Cheng <bin.cheng@arm.com>
25567 PR tree-optimization/84969
25568 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
25569 builtin memset partitions if they set different rhs values.
25571 2018-03-21 Jakub Jelinek <jakub@redhat.com>
25573 PR rtl-optimization/84989
25574 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
25575 VEC_DUPLICATE with scalar result mode.
25577 2018-03-21 Martin Liska <mliska@suse.cz>
25580 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
25581 not intended return statement.
25583 2018-03-21 Martin Liska <mliska@suse.cz>
25586 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
25587 (chkp_find_bound_slots_1): Limit number of iterations.
25589 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
25592 * Minor grammar fixes for x86 options.
25594 2018-03-20 Jakub Jelinek <jakub@redhat.com>
25597 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
25598 holding REG_CFA_RESTORE notes, instead turn them into a USE.
25600 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
25603 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
25604 (altivec_lvx_<mode>_1op): Likewise.
25605 (altivec_stvx_<mode>_2op): Likewise.
25606 (altivec_stvx_<mode>_1op): Likewise.
25607 (altivec_lvx_<VM2:mode>): New define_expand.
25608 (altivec_stvx_<VM2:mode>): Likewise.
25609 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
25610 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25611 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
25612 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25613 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
25614 (rs6000_gen_lvx): Likewise.
25615 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
25616 (altivec_expand_stv_builtin): Likewise.
25617 (altivec_expand_builtin): Likewise.
25618 * config/rs6000/vector.md: Likewise.
25620 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25623 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
25626 2018-03-20 Richard Biener <rguenther@suse.de>
25629 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
25630 sign-conversions as zero, fall back to standard scalar_stmt
25633 2018-03-20 Martin Liska <mliska@suse.cz>
25636 * predict.c (rebuild_frequencies): Handle case when we have
25637 PROFILE_ABSENT, but flag_guess_branch_prob is false.
25639 2018-03-20 Jakub Jelinek <jakub@redhat.com>
25642 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
25643 flag_section_anchors.
25644 * varasm.c (use_blocks_for_decl_p): Remove hack for
25645 dw2_force_const_mem.
25648 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
25650 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
25651 be created, use lowpart_subreg of operands[0] rather than operands[0]
25653 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
25654 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
25655 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
25656 and n constraint instead of aarch64_shift_imm_di and Usd.
25657 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
25658 (*aarch64_<optab>_reg_minus<mode>3): ... this.
25660 2018-03-20 Sudakshina Das <sudi.das@arm.com>
25663 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
25664 to favor GPR over NEON registers.
25665 (<shift>di3_neon): Likewise.
25667 2018-03-20 Tom de Vries <tom@codesourcery.com>
25670 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
25671 (nvptx_process_pars): Emit bar.sync asap and alap.
25673 2018-03-20 Tom de Vries <tom@codesourcery.com>
25676 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
25677 seen_label if seen_label is already set.
25679 2018-03-20 Jakub Jelinek <jakub@redhat.com>
25682 * config/i386/i386.c (fold_builtin_cpu): For features above 31
25683 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
25684 Use 1U instead of 1. Formatting fixes.
25687 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
25688 instead of TREE_TYPE (s1) for the return value.
25690 2018-03-19 Jakub Jelinek <jakub@redhat.com>
25692 PR tree-optimization/84946
25693 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
25694 bitsize + bitsize in poly_uint64 rather than poly_int64.
25697 * dwarf2asm.c: Include fold-const.c.
25698 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
25699 of decl rather than decl itself.
25701 PR rtl-optimization/84643
25702 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
25704 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
25707 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
25708 calling assemble_variable.
25710 2018-03-19 Sudakshina Das <sudi.das@arm.com>
25713 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
25714 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
25716 2018-03-19 Jim Wilson <jimw@sifive.com>
25719 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
25720 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
25721 (riscv_first_stack_step): Likewise.
25722 (riscv_option_override): Use STACK_BOUNDARY instead of
25723 MIN_STACK_BOUNDARY.
25724 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
25725 MIN_STACK_BOUNDARY.
25726 (BIGGEST_ALIGNMENT): Set to 128.
25727 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
25728 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
25731 2018-03-19 Richard Biener <rguenther@suse.de>
25733 PR tree-optimization/84933
25734 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
25735 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
25737 2018-03-19 Richard Biener <rguenther@suse.de>
25739 PR tree-optimization/84859
25740 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
25741 (cond_if_else_store_replacement): Perform sinking operation on
25742 single-store BBs regardless of MAX_STORES_TO_SINK setting.
25743 Generalize what a BB with a single eligible store is.
25745 2018-03-19 Richard Biener <rguenther@suse.de>
25747 PR tree-optimization/84929
25748 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
25749 chrec_is_positive against non-chrec arg.
25751 2018-03-19 Tamar Christina <tamar.christina@arm.com>
25754 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
25756 2018-03-18 Martin Liska <mliska@suse.cz>
25758 PR rtl-optimization/84635
25759 * regrename.c (build_def_use): Use matches_mode only when
25762 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
25764 PR tree-optimization/84913
25765 * tree-vect-loop.c (vectorizable_reduction): Don't try to
25766 vectorize chains of COND_EXPRs.
25768 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25770 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
25772 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25774 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
25776 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25778 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
25780 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
25781 Kito Cheng <kito.cheng@gmail.com>
25783 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
25784 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
25785 (nds32_adjust_reg_alloc_order): New function.
25786 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
25788 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
25790 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
25791 nds32_print_operand, nds32_print_operand_address): Use
25792 HOST_WIDE_INT_PRINT_DEC instead.
25794 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
25796 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
25798 2018-03-17 Jakub Jelinek <jakub@redhat.com>
25801 * config/i386/i386.c (initial_ix86_tune_features,
25802 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
25803 unsigned long long.
25804 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
25805 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
25806 rather than 1u << ix86_tune. Formatting fix.
25807 (ix86_option_override_internal): Change ix86_arch_mask from
25808 unsigned int to unsigned HOST_WIDE_INT, initialize to
25809 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
25810 (ix86_function_specific_restore): Likewise.
25812 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25815 * postreload.c (reload_combine_recognize_pattern): Perform
25816 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
25817 truncate_int_for_mode the result for the destination's mode.
25820 * hsa-gen.c (mem_type_for_type): Fix comment typo.
25821 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
25823 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25826 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
25829 * lra-assigns.c (lra_split_hard_reg_for): Don't use
25830 regno_allocno_class_array and sorted_pseudos.
25831 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
25832 insns where regno is used.
25834 2018-03-16 Martin Liska <mliska@suse.cz>
25837 * multiple_target.c (create_dispatcher_calls): Redirect
25838 reference in the symbol table.
25840 2018-03-16 Martin Liska <mliska@suse.cz>
25843 * multiple_target.c (create_dispatcher_calls): Redirect also
25846 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25850 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
25851 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
25852 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
25854 2018-03-16 Julia Koval <julia.koval@intel.com>
25856 * doc/invoke.texi (Skylake Server): Add CLWB.
25857 Cannonlake): Remove CLWB.
25859 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25861 PR tree-optimization/84841
25862 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
25864 (FLOAT_ONE_CONST_TYPE): Define.
25865 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
25866 (sort_by_operand_rank): Put entries with higher constant_type last
25867 rather than first to match comments.
25869 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
25871 * config/nios2/nios2.md (movsi_internal): Fix thinko in
25874 2018-03-15 Jakub Jelinek <jakub@redhat.com>
25877 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
25878 check and use address of target always.
25880 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
25883 * config/i386/i386.c (indirect_thunk_needed): Update comments.
25884 (indirect_thunk_bnd_needed): Likewise.
25885 (indirect_thunks_used): Likewise.
25886 (indirect_thunks_bnd_used): Likewise.
25887 (indirect_return_needed): New.
25888 (indirect_return_bnd_needed): Likewise.
25889 (output_indirect_thunk_function): Add a bool argument for
25891 (output_indirect_thunk_function): Don't generate alias for
25892 function return thunk.
25893 (ix86_code_end): Call output_indirect_thunk_function to generate
25894 function return thunks.
25895 (ix86_output_function_return): Set indirect_return_bnd_needed
25896 and indirect_return_needed instead of indirect_thunk_bnd_needed
25897 and indirect_thunk_needed.
25899 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
25901 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
25902 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
25903 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
25905 2018-03-15 David Malcolm <dmalcolm@redhat.com>
25906 Paul Hua <paul.hua.gm@gmail.com>
25909 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
25911 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
25913 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
25914 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
25915 resp. SFmode cases.
25917 2018-03-15 Tamar Christina <tamar.christina@arm.com>
25920 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
25921 instead of GET_MODE_SIZE when comparing Units.
25923 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
25926 * varasm.c (hash_section): Return an unchangeble hash value
25927 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
25928 Return !aarch64_can_use_per_function_literal_pools_p ().
25930 2018-03-15 Jakub Jelinek <jakub@redhat.com>
25933 * optabs.c (emit_conditional_move): Pass address of cmode's copy
25934 rather than address of cmode as last argument to prepare_cmp_insn.
25936 2018-03-15 Julia Koval <julia.koval@intel.com>
25938 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
25939 F_AVX512VNNI, F_AVX512BITALG): New.
25941 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
25944 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
25945 insn for floating-point loads and stores.
25947 2018-03-14 Carl Love <cel@us.ibm.com>
25949 * config/rs6000/rs6000-c.c: Add macro definitions for
25950 ALTIVEC_BUILTIN_VEC_PERMXOR.
25951 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
25952 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
25953 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
25954 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
25956 * config/doc/extend.texi: Add prototypes for vec_permxor.
25958 2018-03-14 David Malcolm <dmalcolm@redhat.com>
25961 * diagnostic-show-locus.c (class layout_point): Convert m_line
25962 from int to linenum_type.
25963 (line_span::comparator): Use linenum "compare" function when
25964 comparing line numbers.
25965 (test_line_span): New function.
25966 (layout_range::contains_point): Convert param "row" from int to
25968 (layout_range::intersects_line_p): Likewise.
25969 (layout::will_show_line_p): Likewise.
25970 (layout::print_source_line): Likewise.
25971 (layout::should_print_annotation_line_p): Likewise.
25972 (layout::print_annotation_line): Likewise.
25973 (layout::print_leading_fixits): Likewise.
25974 (layout::annotation_line_showed_range_p): Likewise.
25975 (struct line_corrections): Likewise for field m_row.
25976 (line_corrections::line_corrections): Likewise for param "row".
25977 (layout::print_trailing_fixits): Likewise.
25978 (layout::get_state_at_point): Likewise.
25979 (layout::get_x_bound_for_row): Likewise.
25980 (layout::print_line): Likewise.
25981 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
25982 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
25983 * input.c (selftest::test_linenum_comparisons): New function.
25984 (selftest::input_c_tests): Call it.
25985 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
25986 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
25987 * selftest.h (ASSERT_GT): New macro.
25988 (ASSERT_GT_AT): New macro.
25989 (ASSERT_LT): New macro.
25990 (ASSERT_LT_AT): New macro.
25992 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
25994 PR rtl-optimization/84780
25995 * combine.c (distribute_links): Don't make a link based on pc_rtx.
25997 2018-03-14 Martin Liska <mliska@suse.cz>
25999 * tree.c (record_node_allocation_statistics): Use
26000 get_stats_node_kind.
26001 (get_stats_node_kind): New function extracted from
26002 record_node_allocation_statistics.
26003 (free_node): Use get_stats_node_kind.
26005 2018-03-14 Richard Biener <rguenther@suse.de>
26007 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
26008 that the value-set of ANTIC_IN doesn't grow.
26011 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
26013 (BB_VISITED_WITH_VISITED_SUCCS): New define.
26014 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26016 2018-03-14 Julia Koval <julia.koval@intel.com>
26018 * config.gcc (icelake-client, icelake-server): New.
26020 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
26021 (initial_ix86_arch_features): Ditto.
26022 (PTA_SKYLAKE): Add SGX.
26023 (PTA_ICELAKE): Remove.
26024 (PTA_ICELAKE_CLIENT): New.
26025 (PTA_ICELAKE_SERVER): New.
26026 (ix86_option_override_internal): Split up icelake on icelake client and
26028 (get_builtin_code_for_version): Ditto.
26029 (fold_builtin_cpu): Ditto.
26030 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
26031 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
26032 * config/i386/i386.h (processor_type): Ditto.
26033 * doc/invoke.texi: Ditto.
26035 2018-03-14 Jakub Jelinek <jakub@redhat.com>
26038 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
26039 INTEGER_CST offset, add it together with bitpos / 8 and
26040 sign extend based on POINTER_SIZE.
26044 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
26047 * config/i386/constraints.md (Yc): New register constraint.
26048 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
26049 Use Yc constraint for alternative 2 of operand 0. Remove
26050 preferred_for_speed attribute.
26052 2018-03-14 Richard Biener <rguenther@suse.de>
26054 PR tree-optimization/84830
26055 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
26056 with the old one to avoid oscillations.
26058 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
26061 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
26063 (assign_by_spills): Return a flag of reload assignment failure.
26064 Do not process the reload assignment failures. Do not spill other
26065 reload pseudos if they has the same reg class. Update n if
26067 (lra_assign): Add a return arg. Set up from the result of
26068 assign_by_spills call.
26069 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26070 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
26071 usage_insns if it is not NULL.
26072 (spill_hard_reg_in_range): New function.
26073 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26074 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26075 function prototypes.
26076 (lra_assign): Change prototype.
26077 * lra.c (lra): Add code to deal with fails by splitting hard reg
26080 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
26082 * config/riscv/riscv.opt (mrelax): New option.
26083 * config/riscv/riscv.c (riscv_file_start): Emit ".option
26084 "norelax" when riscv_mrelax is disabled.
26085 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
26087 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26090 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
26091 reassociation for int modes.
26093 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
26095 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
26096 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
26098 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
26099 * config/aarch64/aarch64-sve.md
26100 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
26101 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
26102 (*extend<mode><Vwide>2): Rename to...
26103 (aarch64_sve_extend<mode><Vwide>2): ...this.
26104 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
26105 renaming the old pattern to...
26106 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
26108 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
26109 define_expand, renaming the old pattern to...
26110 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
26111 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
26112 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
26113 account when deciding which SVE instruction the optab should use.
26114 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
26116 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
26118 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
26119 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
26120 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
26121 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
26122 (tlsdesc_small_<mode>): Turn a define_expand and use
26123 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
26124 (tlsdesc_small_advsimd_<mode>): ...this.
26125 (tlsdesc_small_sve_<mode>): New pattern.
26127 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
26129 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
26130 (UNSPEC_UMUL_HIGHPART): New constants.
26131 (MUL_HIGHPART): New int iteraor.
26132 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
26133 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
26135 (*<su>mul<mode>3_highpart): New define_insn.
26137 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
26140 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
26143 2018-03-13 Martin Liska <mliska@suse.cz>
26146 * (sem_item_optimizer::sem_item_optimizer): Initialize new
26148 (sem_item_optimizer::~sem_item_optimizer): Release it.
26149 (sem_item_optimizer::merge_classes): Register variable aliases.
26150 (sem_item_optimizer::fixup_pt_set): New function.
26151 (sem_item_optimizer::fixup_points_to_sets): Likewise.
26152 * ipa-icf.h: Declare new variables and functions.
26154 2018-03-13 Jakub Jelinek <jakub@redhat.com>
26156 PR middle-end/84834
26157 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
26158 integer_pow2p@2 and test integer_pow2p in condition.
26159 (A < 0 ? C : 0): Similarly for @1.
26161 PR middle-end/84831
26162 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
26163 characters starting at p contain '\0' character, don't look beyond
26167 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
26168 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
26171 * reg-stack.c (change_stack): Change update_end var from int to
26172 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
26173 also call set_block_for_insn on the newly added insns and rescan.
26176 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
26177 on the last operand.
26180 * tree.c (stabilize_reference_1): Return save_expr (e) for
26181 STATEMENT_LIST even if it doesn't have side-effects.
26183 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
26185 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
26187 2018-03-12 Renlin Li <renlin.li@arm.com>
26189 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
26190 aarch64_output_scalar_simd_mov_immediate.
26192 2018-03-12 Martin Sebor <msebor@redhat.com>
26194 PR tree-optimization/83456
26195 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
26196 for perfectly overlapping calls to memcpy.
26197 (gimple_fold_builtin_memory_chk): Same.
26198 (gimple_fold_builtin_strcpy): Handle no-warning.
26199 (gimple_fold_builtin_stxcpy_chk): Same.
26200 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
26202 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
26204 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
26205 parameter. Use it for SFmode.
26206 (rs6000_function_arg_advance_1): Adjust.
26207 (rs6000_function_arg): Adjust.
26208 (rs6000_gimplify_va_arg): Pass false for that new parameter.
26210 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
26212 PR rtl-optimization/84169
26213 PR rtl-optimization/84780
26214 * combine.c (can_combine_p): Check for a 2-insn combination whether
26215 the destination register is used between the two insns, too.
26217 2018-03-12 Richard Biener <rguenther@suse.de>
26219 PR tree-optimization/84803
26220 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
26221 for refs DR analysis didn't process.
26223 2018-03-12 Richard Biener <rguenther@suse.de>
26225 PR tree-optimization/84777
26226 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
26227 force-vectorize loops ignore whether we are optimizing for size.
26229 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
26231 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
26232 (TARGET_MD_ASM_ADJUST): Define.
26234 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
26235 Kito Cheng <kito.cheng@gmail.com>
26236 Chung-Ju Wu <jasonwucj@gmail.com>
26238 * config/nds32/nds32.c (nds32_compute_stack_frame,
26239 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
26240 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
26241 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
26242 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
26243 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
26244 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
26245 * config/nds32/nds32.md (prologue, epilogue): Use macro
26246 NDS32_V3PUSH_AVAILABLE_P to do checking.
26248 2018-03-11 Jakub Jelinek <jakub@redhat.com>
26251 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
26252 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
26253 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
26254 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
26255 addition of most attributes on !orig_type_die or the attribute not
26256 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
26258 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
26259 Chung-Ju Wu <jasonwucj@gmail.com>
26261 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
26262 __NDS32_VH__ macro.
26263 * config/nds32/nds32.opt (mvh): New option.
26265 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
26266 Chung-Ju Wu <jasonwucj@gmail.com>
26268 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
26270 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
26271 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
26274 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
26275 Chung-Ju Wu <jasonwucj@gmail.com>
26277 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
26279 * config/nds32/nds32-multiple.md (strlensi): New pattern.
26280 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
26282 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
26283 Kito Cheng <kito.cheng@gmail.com>
26284 Chung-Ju Wu <jasonwucj@gmail.com>
26286 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
26287 UNSPEC_FFMISM and UNSPEC_FLMISM.
26288 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
26289 for ffb, ffmism and flmism.
26290 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
26291 (unspec_ffmism): Ditto.
26292 (unspec_flmism): Ditto.
26293 (nds32_expand_builtin_impl): Check if string extension is available.
26294 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
26295 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
26297 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
26300 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
26303 * lra-assigns.c (assign_by_spills): Return a flag of reload
26304 assignment failure. Do not process the reload assignment
26305 failures. Do not spill other reload pseudos if they has the same
26307 (lra_assign): Add a return arg. Set up from the result of
26308 assign_by_spills call.
26309 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26310 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
26311 usage_insns if it is not NULL.
26312 (spill_hard_reg_in_range): New function.
26313 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26314 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26315 function prototypes.
26316 (lra_assign): Change prototype.
26317 * lra.c (lra): Add code to deal with fails by splitting hard reg
26320 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
26323 * config/i386/i386.opt: Replace Enforcment with Enforcement.
26325 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
26328 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
26329 (dw_val_node): Add val_symbolic_view.
26330 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
26331 (symview_upper_bound): New.
26332 (new_line_info_table): Initialize symviews_since_reset.
26333 (dwarf2out_source_line): Count symviews_since_reset and set
26334 symview_upper_bound.
26335 (dw_val_equal_p): Handle symview.
26336 (add_AT_symview): New.
26337 (print_dw_val): Handle symview.
26338 (attr_checksum, attr_checksum_ordered): Likewise.
26339 (same_dw_val_p, size_of_die): Likewise.
26340 (value_format, output_die): Likewise.
26341 (add_high_low_attributes): Use add_AT_symview for entry_view.
26342 (dwarf2out_finish): Reset symview_upper_bound, clear
26345 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
26348 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
26349 Add strict argument and use it.
26350 (rs6000_split_multireg_move): Update for new strict argument.
26351 (mem_operand_gpr): Disallow all non-offsettable addresses.
26352 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
26354 2018-03-09 Jakub Jelinek <jakub@redhat.com>
26357 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
26358 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
26359 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
26362 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
26363 decl, use remap_type if we want to use the type.
26365 2018-03-09 Martin Sebor <msebor@redhat.com>
26367 PR tree-optimization/84526
26368 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
26370 (builtin_access::generic_overlap): Be prepared to handle non-array
26373 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
26375 PR rtl-optimization/84682
26376 * lra-constraints.c (process_address_1): Check is_address flag
26377 for address constraints.
26378 (process_alt_operands): Likewise.
26379 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
26380 preprocess_constraints.
26381 * recog.h (preprocess_constraints): Add oploc parameter.
26383 * recog.c (preprocess_constraints): Test address_operand for
26384 CT_ADDRESS constraints.
26386 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
26389 * lra-assigns.c (assign_by_spills): Return a flag of reload
26390 assignment failure. Do not process the reload assignment
26391 failures. Do not spill other reload pseudos if they has the same
26393 (lra_assign): Add a return arg. Set up from the result of
26394 assign_by_spills call.
26395 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26396 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
26397 usage_insns if it is not NULL.
26398 (spill_hard_reg_in_range): New function.
26399 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26400 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26401 function prototypes.
26402 (lra_assign): Change prototype.
26403 * lra.c (lra): Add code to deal with fails by splitting hard reg
26406 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26409 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
26410 Accept complain bool parameter. Only emit errors if it is true.
26411 (arm_parse_cpu_option_name): Likewise.
26412 (arm_target_thumb_only): Adjust callers of the above.
26413 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
26414 prototype to take a default true bool parameter.
26415 (arm_parse_arch_option_name): Likewise.
26417 2018-03-09 David Malcolm <dmalcolm@redhat.com>
26418 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
26422 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
26423 * configure: Regenerate.
26424 * configure.ac ("linker --version-script option"): New.
26425 ("linker soname option"): New.
26427 2018-03-09 Richard Biener <rguenther@suse.de>
26429 PR tree-optimization/84775
26430 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
26431 immediate uses of predicate stmts and mark them modified.
26434 PR tree-optimization/84178
26435 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26437 (version_loop_for_if_conversion): Delay update_ssa call.
26438 (tree_if_conversion): Delay update_ssa until after predicate
26441 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
26444 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
26445 when the function accesses prior frames.
26447 2018-03-08 Jakub Jelinek <jakub@redhat.com>
26450 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
26451 gen_llsym, otherwise call maybe_gen_llsym.
26453 PR inline-asm/84742
26454 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
26455 has ',' character inside of it.
26457 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26460 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
26461 as clobbering CC_REGNUM.
26463 2018-03-08 Richard Biener <rguenther@suse.de>
26465 PR middle-end/84552
26466 * tree-scalar-evolution.c: Include tree-into-ssa.h.
26467 (follow_copies_to_constant): Do not follow SSA names registered
26470 2018-03-08 Richard Biener <rguenther@suse.de>
26472 PR tree-optimization/84178
26473 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26475 (version_loop_for_if_conversion): Delay update_ssa call.
26476 (tree_if_conversion): Delay update_ssa until after predicate
26479 2018-03-08 David Malcolm <dmalcolm@redhat.com>
26481 PR tree-optimization/84178
26482 * tree-if-conv.c (release_bb_predicate): Remove the
26483 the assertion that the stmts have NULL use_ops.
26484 Discard the statements, asserting that they haven't
26485 yet been added to a BB.
26487 2018-03-08 Richard Biener <rguenther@suse.de>
26489 PR tree-optimization/84746
26490 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
26491 (phi_translate): Pass in destination ANTIC_OUT set.
26492 (phi_translate_1): Likewise. For a simplified result lookup
26493 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
26494 (phi_translate_set): Adjust.
26495 (do_pre_regular_insertion): Likewise.
26496 (do_pre_partial_partial_insertion): Likewise.
26498 2018-03-08 Martin Liska <mliska@suse.cz>
26500 PR gcov-profile/84735
26501 * doc/gcov.texi: Document usage of profile files.
26502 * gcov-io.h: Document changes in the format.
26504 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
26508 * dwarf2out.c (struct dw_line_info_table): Update comments for
26510 (FORCE_RESET_NEXT_VIEW): New.
26511 (FORCE_RESETTING_VIEW_P): New.
26512 (RESETTING_VIEW_P): Check for -1 too.
26513 (ZERO_VIEW_P): Likewise.
26514 (new_line_info_table): Force-reset next view.
26515 (dwarf2out_begin_function): Likewise.
26516 (dwarf2out_source_line): Simplify zero_view_p initialization.
26517 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
26518 view directly. Omit view when omitting .loc at line 0.
26520 2018-03-08 Jakub Jelinek <jakub@redhat.com>
26522 PR tree-optimization/84740
26523 * tree-switch-conversion.c (process_switch): Call build_constructors
26524 only if info.phi_count is non-zero.
26526 PR tree-optimization/84739
26527 * tree-tailcall.c (find_tail_calls): Check call arguments against
26528 DECL_ARGUMENTS (current_function_decl) rather than
26529 DECL_ARGUMENTS (func) when checking for tail recursion.
26531 2018-03-07 Jakub Jelinek <jakub@redhat.com>
26533 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
26534 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
26535 Volker Reichelt's entry and add entries for people that perform
26536 GCC fuzzy testing and report numerous bugs.
26538 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
26541 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
26542 readonly data in sdata, if that is disabled.
26543 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
26544 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
26545 -mreadonly-in-sdata option.
26547 2018-03-07 Martin Sebor <msebor@redhat.com>
26549 PR tree-optimization/84468
26550 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
26551 basic block when looking for nul assignment.
26553 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
26556 * except.h (output_function_exception_table): Adjust prototype.
26557 * except.c (output_function_exception_table): Remove FNNAME parameter
26558 and add SECTION parameter. Ouput one part of the table at a time.
26559 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
26560 the first part of the exception table and emit unwind directives.
26561 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
26562 (i386_pe_seh_cold_init): Likewise.
26563 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
26564 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
26565 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
26566 (ix86_output_call_insn): Emit a nop in one more case for SEH.
26567 * config/i386/winnt.c: Include except.h.
26568 (struct seh_frame_state): Add reg_offset, after_prologue and
26569 in_cold_section fields.
26570 (i386_pe_seh_end_prologue): Set seh->after_prologue.
26571 (i386_pe_seh_cold_init): New function.
26572 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
26573 to seh->in_cold_section.
26574 (seh_emit_push): Record the offset of the push.
26575 (seh_emit_save): Record the offet of the save.
26576 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
26577 Test seh->after_prologue to disregard the epilogue.
26578 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
26579 (i386_pe_end_cold_function): New function.
26581 2018-03-07 Jakub Jelinek <jakub@redhat.com>
26584 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
26585 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
26588 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
26590 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
26591 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
26593 PR middle-end/84723
26594 * multiple_target.c: Include tree-inline.h and intl.h.
26595 (expand_target_clones): Diagnose and fail if node->definition and
26596 !tree_versionable_function_p (node->decl).
26598 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
26600 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
26602 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
26603 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
26604 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
26606 2018-03-06 Jakub Jelinek <jakub@redhat.com>
26609 * combine.c (try_combine): Use reg_or_subregno instead of handling
26610 just paradoxical SUBREGs and REGs.
26612 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
26614 * config/arc/arc.c (arc_finalize_pic): Remove function.
26615 (arc_must_save_register): We use single base PIC register, remove
26616 checks to save/restore the PIC register.
26617 (arc_expand_prologue): Likewise.
26618 * config/arc/arc-protos.h (arc_set_default_type_attributes):
26620 (arc_verify_short): Likewise.
26621 (arc_attr_type): Likewise.
26622 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
26623 (walk_stores): Likewise.
26624 (arc_address_cost): Make it static.
26625 (arc_verify_short): Likewise.
26626 (branch_dest): Likewise.
26627 (arc_attr_type): Likewise.
26628 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
26629 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
26630 (arc_final_prescan_insn): Remove inserting the nops due to
26631 hardware hazards. It is done in reorg step.
26632 (insn_length_variant_t): Remove.
26633 (insn_length_parameters_t): Likewise.
26634 (arc_insn_length_parameters): Likewise.
26635 (arc_get_insn_variants): Likewise.
26636 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
26638 2018-03-06 Jakub Jelinek <jakub@redhat.com>
26640 PR inline-asm/84683
26641 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
26644 PR tree-optimization/84687
26645 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
26647 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
26649 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26651 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
26652 Rename to ppc_speculation_barrier.
26653 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
26654 __builtin_ppc_speculation_barrier.
26656 2018-03-05 Jakub Jelinek <jakub@redhat.com>
26659 * combine.c (combine_simplify_rtx): Don't try to simplify if
26660 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
26663 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
26665 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
26666 to 32 bytes when compiling for POWER9.
26668 2018-03-05 Jakub Jelinek <jakub@redhat.com>
26671 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
26672 regparm >= 3 with no arg reg available also for calls with
26673 flag_force_indirect_call. Pass decl to ix86_function_regparm.
26676 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
26678 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
26680 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
26683 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
26685 2018-03-05 Richard Biener <rguenther@suse.de>
26687 PR tree-optimization/84486
26688 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
26689 When inserting a __builtin_assume_aligned call set the LHS
26690 SSA name alignment info accordingly.
26692 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
26694 PR tree-optimization/84114
26695 * config/aarch64/aarch64.c (aarch64_reassociation_width)
26696 Avoid reassociation of FLOAT_MODE addition.
26698 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
26700 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
26701 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
26702 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
26703 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
26704 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
26705 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
26706 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
26708 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
26709 __builtin_ia32_wbinvd): New builtins.
26710 (SPECIAL_ARGS2): New.
26711 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
26712 (SPECIAL_ARGS2): New.
26713 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
26714 (ix86_valid_target_attribute_inner_p): Ditto.
26715 (ix86_init_mmx_sse_builtins): Add special_args2.
26716 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
26717 TARGET_WBNOINVD_P): New.
26718 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
26719 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
26720 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
26721 * config/i386/immintrin.h (_wbinvd): New intrinsic.
26722 * config/i386/pconfigintrin.h: New file.
26723 * config/i386/wbnoinvdintrin.h: Ditto.
26724 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
26726 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
26728 2018-03-05 Richard Biener <rguenther@suse.de>
26730 PR tree-optimization/84670
26731 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
26733 (BB_VISITED_WITH_VISITED_SUCCS): New define.
26734 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26735 (compute_antic_aux): Only assert the number of values in ANTIC_IN
26736 doesn't grow if all successors (recursively) were visited at least
26739 2018-03-05 Richard Biener <rguenther@suse.de>
26741 PR tree-optimization/84650
26742 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
26743 if executed in the loop pipeline.
26745 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
26747 * doc/configfiles.texi (Configuration Files): Move info about
26748 conditionalizing $target-protos.h to...
26749 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
26750 differs from $target-protos.h.
26752 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
26753 Chung-Ju Wu <jasonwucj@gmail.com>
26755 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
26756 * config/nds32/nds32-multiple.md (setmemsi): Define.
26757 * config/nds32/nds32-memory-manipulation.c
26758 (nds32_gen_dup_4_byte_to_word_value): New.
26759 (emit_setmem_word_loop): New.
26760 (emit_setmem_byte_loop): New.
26761 (nds32_expand_setmem_loop): New.
26762 (nds32_expand_setmem_loop_v3m): New.
26763 (nds32_expand_setmem_unroll): New.
26764 (nds32_expand_setmem): New.
26766 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26767 Chung-Ju Wu <jasonwucj@gmail.com>
26769 * config/nds32/nds32-memory-manipulation.c
26770 (nds32_emit_load_store): New.
26771 (nds32_emit_post_inc_load_store): New.
26772 (nds32_emit_mem_move): New.
26773 (nds32_emit_mem_move_block): New.
26774 (nds32_expand_movmemsi_loop_unknown_size): New.
26775 (nds32_expand_movmemsi_loop_known_size): New.
26776 (nds32_expand_movmemsi_loop): New.
26777 (nds32_expand_movmemsi_unroll): New.
26778 (nds32_expand_movmemqi): Rename ...
26779 (nds32_expand_movmemsi): ... to this.
26780 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
26781 (movmemsi): ... to this.
26782 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
26783 (nds32_expand_movmemsi): ... to this.
26785 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26786 Monk Chiang <sh.chiang04@gmail.com>
26787 Chung-Ju Wu <jasonwucj@gmail.com>
26789 * config/nds32/nds32-protos.h
26790 (nds32_expand_load_multiple): New arguments.
26791 (nds32_expand_store_multiple): Ditto.
26792 (nds32_valid_multiple_load_store): Rename ...
26793 (nds32_valid_multiple_load_store_p): ... to this.
26794 * config/nds32/nds32-memory-manipulation.c
26795 (nds32_expand_load_multiple): Refine implementation.
26796 (nds32_expand_store_multiple): Ditto.
26797 * config/nds32/nds32-multiple.md
26798 (load_multiple): Update nds32_expand_load_multiple interface.
26799 (store_multiple): Update nds32_expand_store_multiple interface.
26800 * config/nds32/nds32-predicates.c
26801 (nds32_valid_multiple_load_store): Rename ...
26802 (nds32_valid_multiple_load_store_p): ... to this and refine
26804 * config/nds32/predicates.md
26805 (nds32_load_multiple_and_update_address_operation): New predicate.
26806 (nds32_store_multiple_and_update_address_operation): New predicate.
26808 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26809 Chung-Ju Wu <jasonwucj@gmail.com>
26811 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
26812 (combo): New attribute.
26813 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
26815 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
26817 * config/nds32/nds32.opt: Change -mcmodel= default value.
26819 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
26820 Monk Chiang <sh.chiang04@gmail.com>
26821 Chung-Ju Wu <jasonwucj@gmail.com>
26823 * config/nds32/constants.md (unspec_element): New enum.
26824 * config/nds32/constraints.md (Umw): New constraint.
26825 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
26826 * config/nds32/nds32-intrinsic.md: Likewise.
26827 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
26828 (nds32_valid_smw_lwm_base_p): New.
26829 (nds32_output_smw_single_word): New.
26830 (nds32_output_lmw_single_word): New.
26831 (nds32_expand_unaligned_load): New.
26832 (nds32_expand_unaligned_store): New.
26833 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
26834 (nds32_output_smw_single_word): Declare.
26835 (nds32_output_lmw_single_word): Declare.
26836 (nds32_expand_unaligned_load): Declare.
26837 (nds32_expand_unaligned_store): Declare.
26838 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
26839 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
26840 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
26841 NDS32_BUILTIN_UASTORE_DW.
26842 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
26845 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
26846 Kito Cheng <kito.cheng@gmail.com>
26847 Chung-Ju Wu <jasonwucj@gmail.com>
26849 * config/nds32/nds32-intrinsic.c
26850 (nds32_expand_builtin_null_ftype_reg): Delete.
26851 (nds32_expand_builtin_reg_ftype_imm): Ditto.
26852 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
26853 (nds32_read_argument): New.
26854 (nds32_legitimize_target): Ditto.
26855 (nds32_legitimize_argument): Ditto.
26856 (nds32_check_constant_argument): Ditto.
26857 (nds32_expand_unop_builtin): Ditto.
26858 (nds32_expand_unopimm_builtin): Ditto.
26859 (nds32_expand_binop_builtin): Ditto.
26860 (nds32_builtin_decl_impl): Ditto.
26861 (builtin_description): Ditto.
26862 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
26863 (nds32_init_builtins_impl): Ditto.
26864 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
26865 (nds32_builtin_decl): New.
26866 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
26867 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
26869 2018-03-02 Jeff Law <law@redhat.com>
26871 * reorg.c (stop_search_p): Handle DEBUG_INSN.
26872 (redundant_insn, fill_simple_delay_slots): Likewise.
26873 (fill_slots_from_thread): Likewise.
26874 * resource.c (mark_referenced_resources): Likewise.
26875 (mark_set_resources, find_dead_or_set_registers): Likewise.
26877 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26879 * substring-locations.h (format_warning_va): Formatting fix for
26880 ATTRIBUTE_GCC_DIAG.
26881 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
26883 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
26884 * substring-locations.c: Include intl.h.
26885 (format_warning_va): Turned into small wrapper around
26886 format_warning_n_va, renamed to ...
26887 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
26888 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
26890 (format_warning_at_substring_n): New function.
26891 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
26892 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
26893 format_warning_at_substring with just a shorter name instead of
26894 const function pointer.
26895 (fmtwarn_n): New function.
26896 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
26897 appropriate, get rid of all the fmtstr temporaries, move conditionals
26898 with G_() wrapped string literals directly into fmtwarn arguments,
26899 cast dir.len to (int), formatting fixes.
26901 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
26903 * doc/invoke.texi: Remove "Cilk Plus" references.
26905 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26906 Richard Biener <rguenther@suse.de>
26909 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
26910 for error or warning attributes if CALL_FROM_THUNK_P is set.
26913 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26916 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
26917 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
26920 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
26921 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
26923 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
26924 instead of -1U in last predictors element's probability member.
26926 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
26929 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
26930 arguments if they are comparable.
26932 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
26934 PR tree-optimization/84634
26935 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
26936 masks and masked_loop_p with a single loop_masks, making sure it's
26937 null for bb vectorization.
26939 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
26941 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
26942 (vect_analyze_data_ref_access): Use loop->safe_len rather than
26943 loop->force_vectorize to check whether there is no alias.
26945 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26948 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
26950 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
26952 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
26953 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
26954 instead of a loop around prev_real_insn.
26955 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
26958 PR inline-asm/84625
26959 * config/i386/i386.c (ix86_print_operand): Use conditional
26960 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
26963 2018-03-02 Richard Biener <rguenther@suse.de>
26965 PR tree-optimization/84427
26966 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
26967 (bitmap_set_subtract_values): Rewrite to handle multiple
26970 (prune_clobbered_mems): Likewise.
26971 (phi_translate): Take edge instead of pred/phiblock.
26972 (phi_translate_1): Likewise.
26973 (phi_translate_set): Likewise. Insert all translated
26974 exprs for a value into the set, keeping possibly multiple
26975 expressions per value.
26976 (compute_antic_aux): Adjust for phi_translate changes.
26977 When intersecting union the expressions and prune those
26978 not in the final value set, keeping possibly multiple
26979 expressions per value. Do not use value-insertion
26980 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
26981 all expressions. Add verification that the value-sets
26982 only shrink during iteration.
26983 (compute_partial_antic_aux): Adjust for the phi_translate changes.
26984 (do_pre_regular_insertion): Likewise.
26985 (do_pre_partial_partial_insertion): Likewise.
26987 2018-03-02 Richard Biener <rguenther@suse.de>
26990 * config/darwin.c (saved_debug_info_level): New static global.
26991 (darwin_asm_lto_start): Disable debug info generation for LTO out.
26992 (darwin_asm_lto_end): Restore debug info generation settings.
26994 2018-03-01 Martin Liska <mliska@suse.cz>
26997 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
26998 volatile arguments.
27000 2018-03-01 Richard Biener <rguenther@suse.de>
27003 * dwarf2out.c (gen_variable_die): Properly handle late VLA
27004 type annotation with LTO when debug was disabled at compile-time.
27006 2018-03-01 Matthew Fortune <mfortune@gmail.com>
27008 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
27010 (mips_final_postscan_insn): Likewise.
27012 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
27014 PR rtl-optimization/84528
27015 * alias.c (init_alias_target): Add commentary.
27016 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
27017 a unique base value if the frame pointer is not eliminated
27018 to the stack pointer.
27020 2018-03-01 Tom de Vries <tom@codesourcery.com>
27022 PR rtl-optimization/83327
27023 * lra-int.h (hard_regs_spilled_into): Declare.
27024 * lra.c (hard_regs_spilled_into): Define.
27025 (init_reg_info): Init hard_regs_spilled_into.
27026 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
27027 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
27028 (process_bb_lives): Handle hard_regs_spilled_into.
27029 (lra_create_live_ranges_1): Before doing liveness propagation, clear
27030 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
27032 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
27034 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
27035 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
27036 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
27037 * config/rs6000/aix72.h: New file.
27039 2018-02-28 Jakub Jelinek <jakub@redhat.com>
27041 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
27042 instead of warning_at with conditional singular and plural messages
27046 * stor-layout.c (update_alignment_for_field): For
27047 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
27048 && !DECL_PACKED (field), do the alignment update, just use
27049 only desired_align instead of MAX (type_align, desired_align)
27051 (place_field): Don't do known_align < desired_align handling
27052 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
27053 is non-NULL, instead do it after rli->prev_field handling and
27054 only if not within a bitfield word. For DECL_PACKED (field)
27055 use type_align of BITS_PER_UNIT.
27057 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
27059 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
27060 superfluous parentheses and trailing spaces.
27062 2018-02-28 Richard Biener <rguenther@suse.de>
27064 PR tree-optimization/84584
27065 * graphite-scop-detection.c (scop_detection::add_scop): Discard
27066 SCoPs with fake exit edge.
27068 2018-02-28 Martin Liska <mliska@suse.cz>
27071 * timevar.c (timer::print): Fix format to properly print 100%
27074 2018-02-28 Richard Biener <rguenther@suse.de>
27076 PR middle-end/84607
27077 * genmatch.c (capture_info::walk_match): Do not mark
27078 captured expressions without operands as expr_p given
27079 they act more like predicates and should be subject to
27080 "lost tail" side-effect preserving.
27082 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
27084 PR rtl-optimization/81611
27085 * auto-inc-dec.c (attempt_change): Move dead note from
27086 mem_insn if it's the next use of regno
27087 (find_address): Take address use of reg holding
27088 non-incremented value. Add parm to limit search to the named
27090 (merge_in_block): Attempt to use a mem insn that is the next
27091 use of the original regno.
27093 2018-02-27 Martin Sebor <msebor@redhat.com>
27096 * doc/invoke.texi (-Wmissing-attributes): New option.
27097 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
27099 2018-02-27 Martin Sebor <msebor@redhat.com>
27101 PR translation/84207
27102 * diagnostic-core.h (warning_n, error_n, inform_n): Change
27103 n argument to unsigned HOST_WIDE_INT.
27104 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
27105 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
27106 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
27107 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
27109 2018-02-27 Richard Biener <rguenther@suse.de>
27111 PR tree-optimization/84512
27112 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
27113 Do not use the estimate returned from record_stmt_cost for
27114 the scalar iteration cost but sum properly using add_stmt_cost.
27116 2018-02-27 Richard Biener <rguenther@suse.de>
27118 PR tree-optimization/84466
27119 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27120 Adjust last change to less strictly validate use operands.
27122 2018-02-27 Martin Liska <mliska@suse.cz>
27124 PR gcov-profile/84548
27125 * gcov.c (process_file): Allow partial overlap and consider it
27126 also as group functions.
27127 (output_lines): Properly calculate range of lines for a group.
27129 2018-02-27 Martin Liska <mliska@suse.cz>
27131 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
27132 'ggc' suffixes. Change first column width.
27133 (timer::print): Fix formatting of the column.
27135 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
27137 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
27138 preserve inline entry blocks for the sake of debug inline
27139 entry point markers alone.
27140 (remove_unused_locals): Suggest in comments a better place to
27141 force the preservation of inline entry blocks that are
27142 otherwise unused, but do not preserve them.
27144 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
27146 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
27148 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
27151 * config/i386/constraints.md (Bs): Replace
27152 ix86_indirect_branch_register with
27153 TARGET_INDIRECT_BRANCH_REGISTER.
27155 * config/i386/i386.md (indirect_jump): Likewise.
27156 (tablejump): Likewise.
27157 (*sibcall_memory): Likewise.
27158 (*sibcall_value_memory): Likewise.
27159 Peepholes of indirect call and jump via memory: Likewise.
27160 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
27161 (*sibcall_value_GOT_32): Likewise.
27162 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27163 (GOT_memory_operand): Likewise.
27164 (call_insn_operand): Likewise.
27165 (sibcall_insn_operand): Likewise.
27166 (GOT32_symbol_operand): Likewise.
27167 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
27169 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
27171 PR rtl-optimization/83496
27172 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
27173 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
27174 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
27175 redundant insn, if any.
27176 (relax_delay_slots): Likewise.
27177 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
27179 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
27181 PR tree-optimization/83965
27182 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
27183 that grouped statements are part of a reduction chain. Return
27184 true if the statement is not marked as a reduction itself but
27185 is part of a group.
27186 (vect_recog_dot_prod_pattern): Don't check whether the statement
27187 is part of a group here.
27188 (vect_recog_sad_pattern): Likewise.
27189 (vect_recog_widen_sum_pattern): Likewise.
27191 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
27194 * final.c (rest_of_clean_state): Also look for calls inside sequences.
27196 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
27199 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
27201 (ix86_output_indirect_function_return): New prototype.
27202 (ix86_split_simple_return_pop_internal): Likewise.
27203 * config/i386/i386.c (indirect_return_via_cx): New.
27204 (indirect_return_via_cx_bnd): Likewise.
27205 (indirect_thunk_name): Handle return va CX_REG.
27206 (output_indirect_thunk_function): Create alias for
27207 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
27208 (ix86_output_indirect_jmp): Remove the bool argument.
27209 (ix86_output_indirect_function_return): New function.
27210 (ix86_split_simple_return_pop_internal): Likewise.
27211 * config/i386/i386.md (*indirect_jump): Don't pass false
27212 to ix86_output_indirect_jmp.
27213 (*tablejump_1): Likewise.
27214 (simple_return_pop_internal): Change it to define_insn_and_split.
27215 Call ix86_split_simple_return_pop_internal to split it for
27216 -mfunction-return=.
27217 (simple_return_indirect_internal): Call
27218 ix86_output_indirect_function_return instead of
27219 ix86_output_indirect_jmp.
27221 2018-02-26 Jakub Jelinek <jakub@redhat.com>
27224 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
27225 memset and value initialization afterwards.
27227 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
27229 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
27231 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
27234 * common/config/aarch64/aarch64-common.c
27235 (aarch_option_optimization_table[]): Switch
27236 off fomit-frame-pointer
27238 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
27239 Chung-Ju Wu <jasonwucj@gmail.com>
27241 * config/nds32/nds32-multiple.md (load_multiple): Disallow
27243 (store_multiple): Ditto.
27245 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
27247 * config.gcc: Add --with-cpu support for nds32 target.
27248 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
27249 * config/nds32/nds32.opt: Add -mcpu= option.
27251 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
27253 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
27254 isel=yes): Warn for these deprecated options.
27256 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
27258 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
27259 ISA_2_5_MASKS_EMBEDDED.
27261 2018-02-23 Jakub Jelinek <jakub@redhat.com>
27263 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
27264 p->max as pointers rather than using iterative_hash_expr.
27266 2018-02-23 Carl Love <cel@us.ibm.com>
27268 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
27269 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
27271 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
27272 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
27273 P8V_BUILTIN_VEC_VUNSIGNED2.
27275 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
27278 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
27279 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
27281 * lra-constraints.c (curr_insn_transform): Set up
27282 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
27284 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
27285 * lra-eliminations.c (spill_pseudos): Ditto.
27286 (process_insn_for_elimination): Ditto.
27287 * lra-lives.c (reg_early_clobber_p): Use the new macros.
27288 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
27289 LRA_NON_CLOBBERED_ALT.
27291 2018-02-22 Martin Sebor <msebor@redhat.com>
27293 PR tree-optimization/84480
27294 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
27295 to maybe_diag_stxncpy_trunc. Call it.
27296 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
27297 from gimple_fold_builtin_strcpy. Print inlining stack.
27298 (handle_builtin_stxncpy): Print inlining stack.
27299 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
27301 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
27304 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
27305 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
27306 and -fcheck-pointer-bounds are used together.
27307 (indirect_thunk_prefix): New enum.
27308 (indirect_thunk_need_prefix): New function.
27309 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
27310 "_nt" instead of "_bnd" for NOTRACK prefix.
27311 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
27312 (output_indirect_thunk_function): Likewise.
27314 (ix86_code_end): Update output_indirect_thunk_function calls.
27315 (ix86_output_indirect_branch_via_reg): Replace
27316 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
27317 (ix86_output_indirect_branch_via_push): Likewise.
27318 (ix86_output_function_return): Likewise.
27319 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
27320 incompatible with -fcf-protection=branch and
27321 -fcheck-pointer-bounds.
27323 2018-02-22 Steve Ellcey <sellcey@cavium.com>
27326 * config/aarch64/aarch64.c (aarch64_print_address_internal):
27327 Change gcc_assert call to output_operand_lossage.
27329 2018-02-22 Steve Ellcey <sellcey@cavium.com>
27331 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
27333 2018-02-22 DJ Delorie <dj@redhat.com>
27334 Sebastian Perta <sebastian.perta@renesas.com>
27335 Oleg Endo <olegendo@gcc.gnu.org>
27337 * config/rx/rx.c (rx_rtx_costs): New function.
27338 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
27340 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
27342 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
27344 2018-02-22 Martin Liska <mliska@suse.cz>
27347 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
27348 Add "native" as a possible value.
27350 2018-02-22 Martin Liska <mliska@suse.cz>
27353 * config/i386/i386.c (ix86_option_override_internal):
27354 Add "native" as a possible value for -march and -mtune.
27356 2018-02-22 Jakub Jelinek <jakub@redhat.com>
27359 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
27360 to all type variants.
27362 PR tree-optimization/84503
27363 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
27364 width as info->bitpos + info->bitsize - start.
27365 (merged_store_group::merge_overlapping): Simplify width computation.
27366 (check_no_overlap): New function.
27367 (imm_store_chain_info::try_coalesce_bswap): Compute expected
27368 start + width and last_order of the group, fail if check_no_overlap
27370 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
27371 to group if check_no_overlap fails.
27373 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
27375 * config/rs6000/altivec.md: Delete contraint arguments to
27376 define_expand, define_split, and define_peephole2, and in
27377 define_insn_and_split if always unused.
27378 * config/rs6000/darwin.md: Ditto.
27379 * config/rs6000/dfp.md: Ditto.
27380 * config/rs6000/rs6000.md: Ditto.
27381 * config/rs6000/sync.md: Ditto.
27382 * config/rs6000/vector.md: Ditto.
27383 * config/rs6000/vsx.md: Ditto.
27385 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
27387 * config/rs6000/altivec.md: Write output control strings as braced
27388 blocks instead of double-quoted strings.
27389 * config/rs6000/darwin.md: Ditto.
27390 * config/rs6000/rs6000.md: Ditto.
27391 * config/rs6000/vector.md: Ditto.
27392 * config/rs6000/vsx.md: Ditto.
27394 2018-02-21 Jason Merrill <jason@redhat.com>
27396 PR c++/84314 - ICE with templates and fastcall attribute.
27397 * attribs.c (build_type_attribute_qual_variant): Remove assert.
27399 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
27401 * ipa-cp.c (determine_versionability): Fix comment typos.
27403 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
27406 * ipa-cp.c (determine_versionability): Do not version functions caling
27409 2018-02-21 Martin Liska <mliska@suse.cz>
27412 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
27413 Add "native" as a possible value.
27414 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
27415 the macro when native cpu detection is available.
27417 2018-02-21 Martin Liska <mliska@suse.cz>
27420 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
27421 Add "native" as a possible value.
27422 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
27423 when native cpu detection is available.
27425 2018-02-21 Jakub Jelinek <jakub@redhat.com>
27426 Martin Sebor <msebor@redhat.com>
27428 PR tree-optimization/84478
27429 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
27431 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
27432 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
27433 support which is conservatively correct, for 2 only stay conservative
27434 for maxlen. Formatting and comment capitalization fixes. Add STRICT
27435 argument to the 2 argument get_range_strlen, adjust 6 arg
27436 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
27438 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
27439 (gimple_fold_builtin_strlen): Pass true as last argument to
27442 2018-02-20 Martin Sebor <msebor@redhat.com>
27444 PR middle-end/84095
27445 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
27446 (builtin_memref::set_base_and_offset): Same. Handle inner references.
27447 (builtin_memref::builtin_memref): Factor out parts into
27448 set_base_and_offset and call it.
27450 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
27452 PR middle-end/84406
27453 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
27454 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
27455 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
27456 search at the associated MODE_INT.
27458 2018-02-20 Jeff Law <law@redhat.com>
27460 PR middle-end/82123
27461 PR tree-optimization/81592
27462 PR middle-end/79257
27463 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
27464 for range data rather than using global data.
27465 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
27466 range data rather than using global data.
27467 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
27468 pass it to children as needed.
27469 (struct directive::fmtresult): Similarly.
27470 (struct directive::set_width): Similarly.
27471 (struct directive::set_precision): Similarly.
27472 (format_integer, format_directive, parse_directive): Similarly.
27473 (format_none): Accept unnamed vr_values parameter.
27474 (format_percent, format_floating, format_character): Similarly.
27475 (format_string, format_plain): Similarly.
27476 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
27477 the EVRP range analyzer for range data rather than using global data.
27478 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
27479 gimple-ssa-evrp-analyze.h
27480 (class sprintf_dom_walker): Add after_dom_children member function.
27481 Add evrp_range_analyzer member.
27482 (sprintf_dom_walker::before_dom_children): Call into the EVRP
27483 range analyzer as needed.
27484 (sprintf_dom_walker::after_dom_children): New member function.
27485 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
27487 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
27488 (evrp_range_analyzer::pop_to_marker): Likewise.
27490 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
27492 PR tree-optimization/84419
27493 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
27494 with the required type if its current type is compatible but
27497 2018-02-20 Jakub Jelinek <jakub@redhat.com>
27499 PR middle-end/82004
27500 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
27501 after vectorization.
27503 2018-02-20 Martin Liska <mliska@suse.cz>
27506 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
27507 possible values if we don't have a hint.
27509 2018-02-20 Martin Liska <mliska@suse.cz>
27513 * final.c (shorten_branches): Build align_tab array with one
27515 * opts.c (finish_options): Add alignment option limit check.
27516 (MAX_CODE_ALIGN): Likewise.
27517 (MAX_CODE_ALIGN_VALUE): Likewise.
27518 * doc/invoke.texi: Document maximum allowed option value for
27519 all -falign-* options.
27521 2018-02-19 Jakub Jelinek <jakub@redhat.com>
27524 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
27525 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
27526 * var-tracking.c (emit_note_insn_var_location): Remove all references
27527 to NOTE_INSN_CALL_ARG_LOCATION.
27528 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
27529 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
27530 Use copy_rtx_if_shared.
27531 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
27532 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
27533 (dwarf2out_var_location): Remove handling of
27534 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
27536 * final.c (final_scan_insn): Remove all references to
27537 NOTE_INSN_CALL_ARG_LOCATION.
27538 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
27539 before dumping final insns.
27540 * except.c (emit_note_eh_region_end): Remove all references to
27541 NOTE_INSN_CALL_ARG_LOCATION.
27542 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
27543 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
27544 * config/arc/arc.c (hwloop_optimize): Likewise.
27545 * config/arm/arm.c (create_fix_barrier): Likewise.
27546 * config/s390/s390.c (s390_chunkify_start): Likewise.
27547 * config/sh/sh.c (find_barrier): Likewise.
27548 * config/i386/i386.c (rest_of_insert_endbranch,
27549 ix86_seh_fixup_eh_fallthru): Likewise.
27550 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
27551 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
27552 * config/frv/frv.c (frv_function_prologue): Likewise.
27553 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
27555 (note_outside_basic_block_p): Remove all references to
27556 NOTE_INSN_CALL_ARG_LOCATION.
27557 * gengtype.c (adjust_field_rtx_def): Likewise.
27558 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
27560 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
27561 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
27564 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
27567 PR tree-optimization/84452
27568 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
27569 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
27572 2018-02-19 Martin Liska <mliska@suse.cz>
27575 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
27577 2018-02-19 Martin Liska <mliska@suse.cz>
27578 Richard Sandiford <richard.sandiford@linaro.org>
27580 PR tree-optimization/82491
27581 * gimple-fold.c (get_base_constructor): Make earlier bail out
27584 2018-02-19 Carl Love <cel@us.ibm.com>
27586 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
27587 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
27589 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
27590 P8V_BUILTIN_VEC_NEG.
27592 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
27594 * config/rl78/rl78.md (movdf): New define expand.
27596 2018-02-19 Martin Liska <mliska@suse.cz>
27599 * doc/invoke.texi: Fix typo.
27600 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
27602 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
27604 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
27605 handle rs6000_single_float and rs6000_double_float specially for
27608 2018-02-16 Jeff Law <law@redhat.com>
27610 * config/rx/rx.c (add_pop_cfi_notes): New function.;
27611 (pop_regs): Use it.
27613 2018-02-16 Jakub Jelinek <jakub@redhat.com>
27616 * ipa-inline.c (inline_small_functions): Fix a typo.
27618 2018-02-16 Nathan Sidwell <nathan@acm.org>
27620 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
27622 2018-02-16 Carl Love <cel@us.ibm.com>
27624 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
27625 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
27626 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
27627 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
27628 expansion to P8V_BUILTIN_VEC_FLOAT2.
27630 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
27632 PR rtl-optimization/70023
27633 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
27634 src_regno into account.
27636 2018-02-16 Carl Love <cel@us.ibm.com>
27638 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
27639 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
27640 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
27641 * config/rs6000/rs6000.c: Remove case statements for
27642 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
27643 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
27644 and P9V_BUILTIN_VEC_VINSERT4B.
27645 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
27646 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
27647 * config/rs6000/vsx.md:
27648 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
27651 2018-02-16 Carl Love <cel@us.ibm.com>
27653 * config/rs6000/altivec.h: Add builtin names vec_extract4b
27655 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
27657 * config/rs6000/rs6000-c.c: Add the definitions for
27658 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
27659 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
27660 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
27661 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
27662 definition for insert4b and define insn *insert3b_internal.
27663 * doc/extend.texi: Add documentation for vec_extract4b.
27665 2018-02-16 Nathan Sidwell <nathan@acm.org>
27667 * doc/extend.texi (Backwards Compatibility): Mention friend
27668 injection. Note for-scope is deprecated.
27669 * doc/invoke.texi (-ffriend-injection): Deprecate.
27671 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
27673 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
27674 that moved to I2, also allow destinations that are a paradoxical
27675 subreg (instead of a normal reg).
27677 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
27680 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
27683 2018-02-16 Richard Biener <rguenther@suse.de>
27685 PR tree-optimization/84037
27686 PR tree-optimization/84016
27688 * config/i386/i386.c (ix86_builtin_vectorization_cost):
27689 Adjust vec_construct for the fact we need additional higher latency
27690 128bit inserts for AVX256 and AVX512 vector builds.
27691 (ix86_add_stmt_cost): Scale vector construction cost for
27694 2018-02-16 Richard Biener <rguenther@suse.de>
27696 PR tree-optimization/84417
27697 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
27698 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
27699 (non_rewritable_lvalue_p): Likewise, use poly-ints.
27701 2018-02-16 Martin Liska <mliska@suse.cz>
27704 * internal-fn.def (ASAN_CHECK): Set proper flags.
27705 (ASAN_MARK): Likewise.
27707 2018-02-16 Julia Koval <julia.koval@intel.com>
27709 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
27710 from PTA_CANNONLAKE.
27712 2018-02-16 Jakub Jelinek <jakub@redhat.com>
27715 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
27716 Use ++iter rather than iter++ for std::list iterators.
27717 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
27718 defer deleting them until all nodes in the forest are processed. Do
27719 free even leaf nodes. Change to_process into auto_vec.
27722 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
27723 * vec.h (vec_default_construct): Use memset instead of placement new
27724 if BROKEN_VALUE_INITIALIZATION is defined.
27725 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
27726 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
27729 PR rtl-optimization/83723
27730 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
27731 * lra.c (lra_substitute_pseudo): Likewise. If true, use
27732 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
27734 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
27736 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
27738 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
27740 PR rtl-optimization/81443
27741 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
27742 from inner REGs to paradoxical SUBREGs.
27744 2018-02-16 Richard Biener <rguenther@suse.de>
27746 PR tree-optimization/84399
27747 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27748 For operands we can analyze at their definition make sure we can
27749 analyze them at each use as well.
27751 2018-02-16 Richard Biener <rguenther@suse.de>
27753 PR tree-optimization/84190
27754 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
27755 volatile accesses if the decl isn't volatile.
27757 2018-02-15 Jason Merrill <jason@redhat.com>
27759 PR c++/84314 - ICE with templates and fastcall attribute.
27760 * attribs.c (build_type_attribute_qual_variant): Don't clobber
27761 TYPE_CANONICAL on an existing type.
27763 2018-02-15 Jakub Jelinek <jakub@redhat.com>
27765 PR tree-optimization/84383
27766 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
27767 dstoff nor call operand_equal_p if dstbase is NULL.
27769 PR tree-optimization/84334
27770 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
27771 also a CONSTANT_CLASS_P, punt.
27773 2018-02-14 Jim Wilson <jimw@sifive.com>
27775 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
27776 first SMALL_OPERAND check. New local min_second_step. Move assert
27777 to where locals are set. Add TARGET_RVC support.
27778 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
27780 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
27782 * doc/invoke.texi: Correct -Wformat-overflow code sample.
27784 2018-02-14 Martin Sebor <msebor@redhat.com>
27786 PR tree-optimization/83698
27787 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
27788 arrays constrain the offset range to their bounds.
27789 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
27790 (builtin_access::overlap): Avoid setting the size of overlap if it's
27792 (maybe_diag_overlap): Also consider arrays when deciding what values
27793 of offsets to include in diagnostics.
27795 2018-02-14 Martin Sebor <msebor@redhat.com>
27798 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
27799 that correspond to the kind of a declaration.
27801 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
27804 * config/pa/pa.md: Load address of PIC label using the linkage table
27805 if the label is nonlocal.
27807 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
27809 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
27810 warning message if user requests -maltivec=be.
27811 * doc/invoke.texi: Document deprecation of -maltivec=be.
27813 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
27816 * config/rs6000/rs6000-c.c: Update definitions for
27817 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
27818 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
27820 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27823 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
27824 add _get_ssp intrinsics. Remove argument from
27825 __builtin_ia32_rdssp[d|q].
27826 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
27827 * config/i386/i386-builtin.def: Remove argument from
27828 __builtin_ia32_rdssp[d|q].
27829 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
27830 ix86_expand_special_args_builtin for _rdssp[d|q].
27831 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
27832 Clear register before usage.
27833 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
27834 Add documentation for new _get_ssp and _inc_ssp intrinsics.
27836 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
27838 PR tree-optimization/84357
27839 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
27840 operand 1 of an ARRAY_REF too.
27842 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
27845 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
27846 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27848 (set_of_reg): New struct.
27849 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
27850 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
27851 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27853 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
27854 Split into bitclr, bitset, bitinvert patterns if appropriate.
27855 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
27856 use rx_fuse_in_memory_bitop.
27857 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
27858 to named insn, correct maximum insn length.
27860 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
27863 * machmode.def: Define a complex mode for PARTIAL_INT.
27864 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
27866 * doc/rtl.texi: Document CSPImode.
27867 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
27869 (msp430_hard_regno_nregs_with_padding): Likewise.
27871 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
27874 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
27876 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
27878 PR rtl-optimization/84169
27879 * combine.c (try_combine): New variable split_i2i3. Set it to true if
27880 we generated a parallel as new i3 and we split that to new i2 and i3
27881 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
27882 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
27883 those to i2, not i1. Partially rewrite this scan code.
27885 2018-02-13 Jakub Jelinek <jakub@redhat.com>
27888 * stor-layout.c (place_field): For variable length fields, adjust
27889 offset_align afterwards not just based on the field's alignment,
27890 but also on the size.
27892 PR middle-end/84309
27893 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
27894 of exps and logs in the use_exp2 case.
27896 2018-02-13 Jeff Law <law@redhat.com>
27898 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
27899 entry for "vector".
27901 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
27904 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
27908 * common.opt (gas-loc-support, gas-locview-support): New.
27909 (ginline-points, ginternal-reset-location-views): New.
27910 * doc/invoke.texi: Document them. Use @itemx where intended.
27911 (gvariable-location-views): Adjust.
27912 * target.def (reset_location_view): New.
27913 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
27914 (TARGET_RESET_LOCATION_VIEW): New.
27915 * doc/tm.texi: Rebuilt.
27916 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
27917 (dwarf2out_default_as_locview_support): New.
27918 (output_asm_line_debug_info): Use option variables.
27919 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
27920 (output_loc_list): Likewise.
27921 (add_high_low_attributes): Check option variables.
27922 Don't output entry view attribute in strict mode.
27923 (gen_inlined_subroutine_die): Check option variables.
27924 (dwarf2out_inline_entry): Likewise.
27925 (init_sections_and_labels): Likewise.
27926 (dwarf2out_early_finish): Likewise.
27927 (maybe_reset_location_view): New, from...
27928 (dwarf2out_var_location): ... here. Call it.
27929 * debug.h (dwarf2out_default_as_loc_support): Declare.
27930 (dwarf2out_default_as_locview_support): Declare.
27931 * hooks.c (hook_int_rtx_insn_0): New.
27932 * hooks.h (hook_int_rtx_insn_0): Declare.
27933 * toplev.c (process_options): Take -gas-loc-support and
27934 -gas-locview-support from dwarf2out. Enable
27935 -gvariable-location-views by default only with locview
27936 assembler support. Enable -ginternal-reset-location-views by
27937 default only if the target defines the corresponding hook.
27938 Enable -ginline-points by default if location views are
27939 enabled; force it disabled if statement frontiers are
27941 * tree-inline.c (expand_call_inline): Check option variables.
27942 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
27944 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
27946 PR tree-optimization/84321
27947 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
27948 handling. Also check whether the anti-range contains any values
27949 that satisfy the mask; switch to a VR_RANGE if not.
27951 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
27954 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
27956 2018-02-13 Martin Jambor <mjambor@suse.cz>
27959 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
27960 of call statements, also set location of a load to a temporary.
27962 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
27964 * config/rl78/rl78.c (add_vector_labels): New function.
27965 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
27966 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
27967 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
27968 which checks that no arguments are passed.
27969 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
27970 * doc/extend.texi: Documentation for the new attribute.
27972 2018-02-13 Andreas Schwab <schwab@suse.de>
27974 * config/riscv/linux.h (CPP_SPEC): Define.
27976 2018-02-13 Jakub Jelinek <jakub@redhat.com>
27979 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
27980 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
27981 OPTION_MASK_ISA_AES as first argument to def_builtin_const
27982 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
27983 instead of OPTION_MASK_ISA_PCLMUL as first argument to
27984 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
27985 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
27986 temporarily for AES and PCLMUL builtins.
27988 PR tree-optimization/84339
27989 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
27990 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
27993 PR middle-end/84309
27994 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
27995 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
27996 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
27998 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
28000 * omp-simd-clone.h: New file.
28001 * omp-simd-clone.c: Include omp-simd-clone.h.
28002 (expand_simd_clones): No longer static.
28003 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
28004 cgraph.h and omp-simd-clone.h.
28005 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
28006 (vect_recog_widen_shift_pattern): Formatting fix.
28007 (vect_pattern_recog_1): Don't check optab for calls.
28010 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
28011 operands[2] into a REG before using gen_lowpart on it.
28013 2018-02-12 Jeff Law <law@redhat.com>
28016 * config/sh/sh.c (find_barrier): Consider a sibling call
28019 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
28020 successfully back substituting a reg.
28022 2018-02-12 Richard Biener <rguenther@suse.de>
28024 PR tree-optimization/84037
28025 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
28026 parameter, move visited init to caller.
28027 (vect_slp_analyze_operations): Separate cost from validity
28028 check, initialize visited once for all instances.
28029 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
28031 * tree-vect-stmts.c (vect_model_simple_cost): Make early
28033 (vect_model_promotion_demotion_cost): Likewise.
28034 (vectorizable_bswap): Guard cost modeling with !slp_node
28035 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
28037 (vectorizable_call): Likewise.
28038 (vectorizable_conversion): Likewise.
28039 (vectorizable_assignment): Likewise.
28040 (vectorizable_shift): Likewise.
28041 (vectorizable_operation): Likewise.
28042 (vectorizable_store): Likewise.
28043 (vectorizable_load): Likewise.
28044 (vectorizable_condition): Likewise.
28045 (vectorizable_comparison): Likewise.
28047 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
28050 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
28051 (ASAN_MARK): Fix fnspec to account for return value, change pointer
28052 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
28054 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
28056 PR middle-end/83665
28057 * params.def (inline-min-speedup): Increase from 8 to 15.
28058 (max-inline-insns-auto): Decrease from 40 to 30.
28059 * ipa-split.c (consider_split): Add some buffer for function to
28060 be considered inlining candidate.
28061 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
28064 2018-02-12 Richard Biener <rguenther@suse.de>
28066 PR tree-optimization/84037
28067 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
28068 matched stmts if we cannot swap the non-matched ones.
28070 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
28072 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
28073 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
28074 _mm_maskz_scalef_round_ss): New intrinsics.
28075 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
28076 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
28077 __builtin_ia32_scalefss_round): Remove.
28078 (__builtin_ia32_scalefsd_mask_round,
28079 __builtin_ia32_scalefss_mask_round): New intrinsics.
28080 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
28081 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
28082 ((match_operand:VF_128 2 "<round_nimm_predicate>"
28083 "<round_constraint>")): Changed to ...
28084 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
28085 "<round_scalar_constraint>")): ... this.
28086 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
28087 %0, %1, %2<round_op3>}"): Changed to ...
28088 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
28089 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
28090 %2<round_scalar_mask_op3>}"): ... this.
28091 * config/i386/subst.md (round_scalar_nimm_predicate): New.
28093 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
28095 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
28096 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
28097 (_mm_maskz_sqrt_round_ss): New intrinsics.
28098 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
28099 (__builtin_ia32_sqrtsd_mask_round)
28100 (__builtin_ia32_sqrtss_mask_round): New builtins.
28101 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
28102 (__builtin_ia32_sqrtss_round): Remove.
28103 (__builtin_ia32_sqrtsd_mask_round)
28104 (__builtin_ia32_sqrtss_mask_round): New builtins.
28105 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
28106 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
28107 ((match_operand:VF_128 1 "vector_operand"
28108 "xBm,<round_constraint>")): Changed to ...
28109 ((match_operand:VF_128 1 "vector_operand"
28110 "xBm,<round_scalar_constraint>")): ... this.
28111 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
28112 %0, %2, %<iptr>1<round_op3>}): Changed to ...
28113 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
28114 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
28115 %<iptr>1<round_scalar_mask_op3>}): ... this.
28116 ((set_attr "prefix" "<round_prefix>")): Changed to ...
28117 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
28119 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
28122 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
28123 Cast vec_cmpeq result to correct type.
28124 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
28125 Cast vec_cmpgt result to correct type.
28127 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
28129 * final.c (final_scan_insn_1): Renamed from...
28130 (final_scan_insn): ... this. New wrapper, to recover
28131 seen from the outermost call in recursive ones.
28132 * config/sparc/sparc.c (output_return): Drop seen from call.
28133 (output_sibcall): Likewise.
28134 * config/visium/visium.c (output_branch): Likewise.
28136 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
28138 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
28141 2018-02-10 Alan Modra <amodra@gmail.com>
28144 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
28145 Specify LR as an input.
28147 2018-02-10 Jakub Jelinek <jakub@redhat.com>
28150 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
28151 remove_member_access_dummy_vars): New functions.
28152 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
28153 lower_omp_1, execute_lower_omp): Use them.
28155 PR rtl-optimization/84308
28156 * shrink-wrap.c (spread_components): Release todo vector.
28158 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
28160 PR rtl-optimization/57193
28161 * ira-color.c (struct allocno_color_data): Add member
28162 conflict_allocno_hard_prefs.
28163 (update_conflict_allocno_hard_prefs): New.
28164 (bucket_allocno_compare_func): Add a preference based on
28165 conflict_allocno_hard_prefs.
28166 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
28167 (color_allocnos): Remove a dead code. Initiate
28168 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
28170 2018-02-09 Jakub Jelinek <jakub@redhat.com>
28173 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
28174 constraint from =wa to wa. Avoid a subreg on the output operand,
28175 instead use a pseudo and subreg it in a move.
28176 (p9_xxbrd_<mode>): Changed to ...
28177 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
28178 (p9_xxbrd_v2df): New expander.
28179 (p9_xxbrw_<mode>): Changed to ...
28180 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
28181 (p9_xxbrw_v4sf): New expander.
28183 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
28185 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
28187 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
28190 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
28191 multiply in 32-bit mode.
28192 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
28193 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
28196 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
28198 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
28199 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
28200 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
28201 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
28203 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
28206 * dwarf2out.c (is_trivial_indirect_ref): New function.
28207 (dwarf2out_late_global_decl): Do not generate a location
28208 attribute for variables that have a non-trivial DECL_VALUE_EXPR
28209 and that are not defined in the current unit.
28211 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
28213 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
28214 instead of a libcall for UNORDERED.
28216 2018-02-09 Tamar Christina <tamar.christina@arm.com>
28219 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
28220 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
28222 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28225 * config/s390/s390.c (s390_set_current_function): Invoke
28226 s390_indirect_branch_settings also if fndecl didn't change.
28228 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
28230 * config/rs6000/rs6000.md (blockage): Set length to zero.
28232 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
28234 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
28236 2018-02-09 Jakub Jelinek <jakub@redhat.com>
28239 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
28240 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
28244 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
28245 PARALLEL incoming that failed vt_get_decl_and_offset check.
28247 PR middle-end/84237
28248 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
28249 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
28251 (get_variable_section): For decls in named .bss* sections pass true as
28252 second argument to bss_initializer_p.
28254 2018-02-09 Marek Polacek <polacek@redhat.com>
28255 Jakub Jelinek <jakub@redhat.com>
28258 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
28259 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
28260 Sync some changes from cxx_fold_indirect_ref.
28262 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
28264 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
28266 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
28267 (BLOCK_INLINE_ENTRY_LABEL): New.
28268 (dwarf2out_var_location): Disregard inline entry markers.
28269 (inline_entry_data): New struct.
28270 (inline_entry_data_hasher): New hashtable type.
28271 (inline_entry_data_hasher::hash): New.
28272 (inline_entry_data_hasher::equal): New.
28273 (inline_entry_data_table): New variable.
28274 (add_high_low_attributes): Add DW_AT_entry_pc and
28275 DW_AT_GNU_entry_view attributes if a pending entry is found
28276 in inline_entry_data_table. Add old entry_pc attribute only
28277 if debug nonbinding markers are disabled.
28278 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
28279 markers are enabled.
28280 (block_within_block_p, dwarf2out_inline_entry): New.
28281 (dwarf2out_finish): Check that no entries remained in
28282 inline_entry_data_table.
28283 * final.c (reemit_insn_block_notes): Handle inline entry notes.
28284 (final_scan_insn, notice_source_line): Likewise.
28285 (rest_of_clean_state): Skip inline entry markers.
28286 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
28288 * gimple.c (gimple_build_debug_inline_entry): New.
28289 * gimple.h (enum gimple_debug_subcode): Add
28290 GIMPLE_DEBUG_INLINE_ENTRY.
28291 (gimple_build_debug_inline_entry): Declare.
28292 (gimple_debug_inline_entry_p): New.
28293 (gimple_debug_nonbind_marker_p): Adjust.
28294 * insn-notes.def (INLINE_ENTRY): New.
28295 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
28296 inline entry marker notes.
28297 (print_insn): Likewise.
28298 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
28299 (INSN_DEBUG_MARKER_KIND): Likewise.
28300 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
28301 * tree-inline.c (expand_call_inline): Build and insert
28302 debug_inline_entry stmt.
28303 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
28304 inline entry blocks early, if nonbind markers are enabled.
28305 (dump_scope_block): Dump fragment info.
28306 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
28307 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
28308 (gimple_build_debug_inline_entry): New.
28309 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
28310 Enable/disable inline entry points too.
28311 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
28312 (DEBUG_INSN): Describe inline entry markers.
28314 * common.opt (gvariable-location-views): New.
28315 (gvariable-location-views=incompat5): New.
28316 * config.in: Rebuilt.
28317 * configure: Rebuilt.
28318 * configure.ac: Test assembler for view support.
28319 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
28320 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
28321 * dwarf2out.c (var_loc_view): New typedef.
28322 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
28323 (dwarf2out_locviews_in_attribute): New.
28324 (dwarf2out_locviews_in_loclist): New.
28325 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
28326 (enum dw_line_info_opcode): Add LI_adv_address.
28327 (struct dw_line_info_table): Add view.
28328 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
28329 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
28330 (zero_view_p): New variable.
28331 (ZERO_VIEW_P): New macro.
28332 (output_asm_line_debug_info): New.
28333 (struct var_loc_node): Add view.
28334 (add_AT_view_list, AT_loc_list): New.
28335 (add_var_loc_to_decl): Add view param. Test it against last.
28336 (new_loc_list): Add view params. Record them.
28337 (AT_loc_list_ptr): Handle loc and view lists.
28338 (view_list_to_loc_list_val_node): New.
28339 (print_dw_val): Handle dw_val_class_view_list.
28340 (size_of_die): Likewise.
28341 (value_format): Likewise.
28342 (loc_list_has_views): New.
28343 (gen_llsym): Set vl_symbol too.
28344 (maybe_gen_llsym, skip_loc_list_entry): New.
28345 (dwarf2out_maybe_output_loclist_view_pair): New.
28346 (output_loc_list): Output view list or entries too.
28347 (output_view_list_offset): New.
28348 (output_die): Handle dw_val_class_view_list.
28349 (output_dwarf_version): New.
28350 (output_compilation_unit_header): Use it.
28351 (output_skeleton_debug_sections): Likewise.
28352 (output_rnglists, output_line_info): Likewise.
28353 (output_pubnames, output_aranges): Update version comments.
28354 (output_one_line_info_table): Output view numbers in asm comments.
28355 (dw_loc_list): Determine current endview, pass it to new_loc_list.
28356 Call maybe_gen_llsym.
28357 (loc_list_from_tree_1): Adjust.
28358 (add_AT_location_description): Create view list attribute if
28359 needed, check it's absent otherwise.
28360 (convert_cfa_to_fb_loc_list): Adjust.
28361 (maybe_emit_file): Call output_asm_line_debug_info for test.
28362 (dwarf2out_var_location): Reset views as needed. Precompute
28363 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
28364 attribute. Set view.
28365 (new_line_info_table): Reset next view.
28366 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
28367 (dwarf2out_source_line): Likewise. Output view resets and labels to
28368 the assembler, or select appropriate line info opcodes.
28369 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
28370 (optimize_string_length): Catch it. Adjust.
28371 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
28372 dw_val_class_view_list, and remove it if no longer needed.
28373 (hash_loc_list): Hash view numbers.
28374 (loc_list_hasher::equal): Compare them.
28375 (optimize_location_lists): Check whether a view list symbol is
28376 needed, and whether the locview attribute is present, and
28377 whether they match. Remove the locview attribute if no longer
28379 (index_location_lists): Call skip_loc_list_entry for test.
28380 (dwarf2out_finish): Call output_asm_line_debug_info for test.
28381 Use output_dwarf_version.
28382 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
28383 (struct dw_val_node): Add val_view_list.
28384 * final.c (SEEN_NEXT_VIEW): New.
28385 (set_next_view_needed): New.
28386 (clear_next_view_needed): New.
28387 (maybe_output_next_view): New.
28388 (final_start_function): Rename to...
28389 (final_start_function_1): ... this. Take pointer to FIRST,
28390 add SEEN parameter. Emit param bindings in the initial view.
28391 (final_start_function): Reintroduce SEEN-less interface.
28392 (final): Rename to...
28393 (final_1): ... this. Take SEEN parameter. Output final pending
28394 next view at the end.
28395 (final): Reintroduce seen-less interface.
28396 (final_scan_insn): Output pending next view before switching
28397 sections or ending a block. Mark the next view as needed when
28398 outputting variable locations. Notify debug backend of section
28399 changes, and of location view changes.
28400 (rest_of_handle_final): Adjust.
28401 * toplev.c (process_options): Autodetect value for debug variable
28402 location views option. Warn on incompat5 without -gdwarf-5.
28403 * doc/invoke.texi (gvariable-location-views): New.
28404 (gvariable-location-views=incompat5): New.
28405 (gno-variable-location-views): New.
28407 2018-02-08 David Malcolm <dmalcolm@redhat.com>
28409 PR tree-optimization/84136
28410 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
28411 that the result of find_edge is non-NULL.
28413 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
28416 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
28417 storing integer register in SImode. Fix cost of 256 and 512
28418 byte aligned SSE register store.
28420 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
28422 * config/i386/i386.c (ix86_multiplication_cost): Fix
28423 multiplication cost for TARGET_AVX512DQ.
28425 2018-02-08 Marek Polacek <polacek@redhat.com>
28427 PR tree-optimization/84238
28428 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
28431 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
28433 PR tree-optimization/84265
28434 * tree-vect-stmts.c (vectorizable_store): Don't treat
28435 VMAT_CONTIGUOUS accesses as grouped.
28436 (vectorizable_load): Likewise.
28438 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
28440 PR tree-optimization/81635
28441 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
28442 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
28443 (test_round_for_mask): New functions.
28444 (wide_int_cc_tests): Call test_round_for_mask.
28445 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
28446 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
28447 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
28448 range returned by get_range_info.
28450 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
28453 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
28454 * symtab.c: Include builtins.h
28455 (symtab_node::output_to_lto_symbol_table_p): Move here
28456 from lto-streamer-out.c:output_symbol_p.
28457 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
28458 (output_symbol_p): Move all logic to symtab.c
28459 (produce_symtab): Update.
28461 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28463 * config/s390/s390-opts.h (enum indirect_branch): Define.
28464 * config/s390/s390-protos.h (s390_return_addr_from_memory)
28465 (s390_indirect_branch_via_thunk)
28466 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
28467 (enum s390_indirect_branch_type): Define.
28468 * config/s390/s390.c (struct s390_frame_layout, struct
28469 machine_function): Remove.
28470 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
28471 (indirect_branch_table_label_no, indirect_branch_table_name):
28473 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
28474 (enum s390_indirect_branch_option): Define.
28475 (s390_return_addr_from_memory): New function.
28476 (s390_handle_string_attribute): New function.
28477 (s390_attribute_table): Add new attribute handler.
28478 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
28479 (s390_indirect_branch_via_thunk): New function.
28480 (s390_indirect_branch_via_inline_thunk): New function.
28481 (s390_function_ok_for_sibcall): When jumping via thunk disallow
28482 sibling call optimization for non z10 compiles.
28483 (s390_emit_call): Force indirect branch target to be a single
28484 register. Add r1 clobber for non-z10 compiles.
28485 (s390_emit_epilogue): Emit return jump via return_use expander.
28486 (s390_reorg): Handle JUMP_INSNs as execute targets.
28487 (s390_option_override_internal): Perform validity checks for the
28488 new command line options.
28489 (s390_indirect_branch_attrvalue): New function.
28490 (s390_indirect_branch_settings): New function.
28491 (s390_set_current_function): Invoke s390_indirect_branch_settings.
28492 (s390_output_indirect_thunk_function): New function.
28493 (s390_code_end): Implement target hook.
28494 (s390_case_values_threshold): Implement target hook.
28495 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
28497 * config/s390/s390.h (struct s390_frame_layout)
28498 (struct machine_function): Move here from s390.c.
28499 (TARGET_INDIRECT_BRANCH_NOBP_RET)
28500 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
28501 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
28502 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
28503 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
28504 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
28505 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
28506 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
28507 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
28508 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
28509 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
28510 (mnemonic attribute): Add values which aren't recognized
28512 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
28513 pattern for branch conversion. Fix mnemonic attribute.
28514 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
28515 indirect branch via thunk if requested.
28516 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
28517 ("*indirect_jump"): Disable for branch conversion using out of
28519 ("indirect_jump_via_thunk<mode>_z10")
28520 ("indirect_jump_via_thunk<mode>")
28521 ("indirect_jump_via_inlinethunk<mode>_z10")
28522 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
28523 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
28524 ("casesi_jump_via_inlinethunk<mode>_z10")
28525 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
28526 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
28527 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
28528 ("*indirect2_jump"): Disable for branch conversion.
28529 ("casesi_jump"): Turn into expander and expand patterns for branch
28531 ("return_use"): New expander.
28532 ("*return"): Emit return via thunk and rename it to ...
28533 ("*return<mode>"): ... this one.
28534 * config/s390/s390.opt: Add new options and and enum for the
28537 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
28539 * lra-constraints.c (match_reload): Unconditionally use
28540 gen_lowpart_SUBREG, rather than selecting between that
28541 and equivalent gen_rtx_SUBREG code.
28543 2018-02-08 Richard Biener <rguenther@suse.de>
28545 PR tree-optimization/84233
28546 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
28547 changed flag instead of boguously re-using phi_inserted.
28549 2018-02-08 Martin Jambor <mjambor@suse.cz>
28551 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
28552 static local variables.
28554 2018-02-08 Richard Biener <rguenther@suse.de>
28556 PR tree-optimization/84278
28557 * tree-vect-stmts.c (vectorizable_store): When looking for
28558 smaller vector types to perform grouped strided loads/stores
28559 make sure the mode is supported by the target.
28560 (vectorizable_load): Likewise.
28562 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
28564 * config/aarch64/aarch64.c (aarch64_components_for_bb):
28565 Increase LDP/STP opportunities by adding adjacent callee-saves.
28567 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
28569 PR rtl-optimization/84068
28570 PR rtl-optimization/83459
28571 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
28573 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
28575 PR tree-optimization/84224
28576 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
28577 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
28578 non-zero arguments.
28580 2018-02-07 Iain Sandoe <iain@codesourcery.com>
28583 * config/rs6000/altivec.md (*restore_world): Remove LR use.
28584 * config/rs6000/predicates.md (restore_world_operation): Adjust op
28585 count, remove one USE.
28587 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
28589 * doc/install.texi (Configuration): Document the
28590 --with-long-double-format={ibm,ieee} PowerPC configuration
28594 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
28595 Convert from define_expand to be define_insn_and_split. Rework
28596 float/double/_Float128 conversions to QI/HI/SImode to work with
28597 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
28598 conversions to QI/HImode types did a store and then a load to
28599 truncate the value. For conversions to VSX registers, don't split
28600 the insn, instead emit the code directly. Use the code iterator
28601 any_fix to combine signed and unsigned conversions.
28602 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
28603 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
28604 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28605 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
28606 (fix_<mode>di2_hw): Likewise.
28607 (fixuns_<mode>di2_hw): Likewise.
28608 (fix_<mode>si2_hw): Likewise.
28609 (fixuns_<mode>si2_hw): Likewise.
28610 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
28611 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28612 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
28613 fix<uns>_trunc<SFDF:mode>si2_p8.
28614 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
28615 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
28616 (fix<uns>_<mode>_mem): Likewise.
28617 (fctiw<u>z_<mode>_mem): Likewise.
28618 (fix<uns>_<mode>_mem): Likewise.
28619 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
28620 the register allocator from doing a direct move to the GPRs to do
28621 a store, and instead use the ISA 3.0 store byte/half-word from
28622 vector register instruction. For IEEE 128-bit floating point,
28623 also optimize stores of 32-bit ints.
28624 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
28626 2018-02-07 Alan Hayward <alan.hayward@arm.com>
28628 * genextract.c (push_pathstr_operand): New function to support
28630 (walk_rtx): Call push_pathstr_operand.
28631 (print_path): Support [a-zA-Z].
28633 2018-02-07 Richard Biener <rguenther@suse.de>
28635 PR tree-optimization/84037
28636 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
28637 (cse_and_gimplify_to_preheader): Declare.
28638 (vect_get_place_in_interleaving_chain): Likewise.
28639 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28641 (_loop_vec_info::~_loop_vec_info): Delete it.
28642 (cse_and_gimplify_to_preheader): New function.
28643 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
28644 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
28645 (vectorizable_load): Likewise. For grouped stores always base
28646 the IV on the first element.
28647 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
28648 condition before gimplifying.
28650 2018-02-07 Jakub Jelinek <jakub@redhat.com>
28652 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
28653 *DIV_EXPR and *MOD_EXPR.
28655 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
28658 * config/i386/i386.c (ix86_option_override_internal): Mask out
28659 the CF_SET bit when checking -fcf-protection.
28661 2018-02-07 Tom de Vries <tom@codesourcery.com>
28664 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
28667 2018-02-07 Richard Biener <rguenther@suse.de>
28669 PR tree-optimization/84204
28670 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
28673 PR tree-optimization/84205
28674 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
28675 special-case isl_ast_op_zdiv_r.
28677 PR tree-optimization/84223
28678 * graphite-scop-detection.c (gather_bbs::before_dom_children):
28679 Only add conditions from within the region.
28680 (gather_bbs::after_dom_children): Adjust.
28682 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
28685 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
28686 * config/avr/avr.md: Only post-reload split REG-REG moves if
28687 either register is GENERAL_REG_P.
28689 2018-02-07 Jakub Jelinek <jakub@redhat.com>
28691 PR tree-optimization/84235
28692 * tree-ssa-scopedtables.c
28693 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
28694 if the subtraction is performed in floating point type where NaNs are
28695 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
28696 build 1. Formatting fix.
28698 2018-02-06 Jakub Jelinek <jakub@redhat.com>
28701 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
28702 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
28703 and skip it regardless of bb boundaries. Use CALL_P macro,
28704 don't test INSN_P (insn) together with CALL_P or JUMP_P check
28705 unnecessarily, formatting fix.
28707 2018-02-06 Michael Collison <michael.collison@arm.com>
28709 * config/arm/thumb2.md:
28710 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
28711 (*thumb_mov_notscc): Ditto.
28713 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
28716 * config/rs6000/rs6000.md (su code attribute): Use "u" for
28717 unsigned_fix, not "s".
28719 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28721 * configure.ac (gcc_fn_eh_frame_ro): New function.
28722 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
28723 correct .eh_frame permissions.
28724 * configure: Regenerate.
28726 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
28728 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
28729 irrelevant options.
28731 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28733 * config/rs6000/rs6000.c (rs6000_option_override_internal):
28734 Display warning message for -mno-speculate-indirect-jumps.
28736 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
28738 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
28740 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
28742 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
28744 PR tree-optimization/84225
28745 * tree-eh.c (find_trapping_overflow): Only call
28746 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
28748 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
28751 * config/i386/i386.c: Reimplement the check of possible options
28752 -mibt/-mshstk conbination. Change error messages.
28753 * doc/invoke.texi: Fix a typo: remove extra '='.
28755 2018-02-06 Marek Polacek <polacek@redhat.com>
28757 PR tree-optimization/84228
28758 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
28760 2018-02-06 Tamar Christina <tamar.christina@arm.com>
28763 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
28764 emitted arch directives.
28765 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
28766 __ARM_FEATURE_COPROC before changing architectures.
28768 2018-02-06 Richard Biener <rguenther@suse.de>
28770 * config/i386/i386.c (print_reg): Fix typo.
28771 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
28773 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
28775 * configure: Regenerate.
28777 2018-02-05 Martin Sebor <msebor@redhat.com>
28779 PR tree-optimization/83369
28780 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
28783 2018-02-05 Martin Liska <mliska@suse.cz>
28785 * doc/invoke.texi: Cherry-pick upstream r323995.
28787 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
28789 * ira.c (ira_init_register_move_cost): Adjust comment.
28791 2018-02-05 Martin Liska <mliska@suse.cz>
28793 PR gcov-profile/84137
28794 * doc/gcov.texi: Fix typo in documentation.
28796 2018-02-05 Martin Liska <mliska@suse.cz>
28798 PR gcov-profile/83879
28799 * doc/gcov.texi: Document necessity of --dynamic-list-data when
28800 using dlopen functionality.
28802 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
28804 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
28805 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
28806 _mm_maskz_range_ss, _mm_mask_range_round_ss,
28807 _mm_maskz_range_round_ss): New intrinsics.
28808 (__builtin_ia32_rangesd128_round)
28809 (__builtin_ia32_rangess128_round): Remove.
28810 (__builtin_ia32_rangesd128_mask_round,
28811 __builtin_ia32_rangess128_mask_round): New builtins.
28812 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
28813 __builtin_ia32_rangess128_round): Remove.
28814 (__builtin_ia32_rangesd128_mask_round,
28815 __builtin_ia32_rangess128_mask_round): New builtins.
28816 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
28817 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
28818 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
28819 "<round_saeonly_constraint>")): Changed to ...
28820 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
28821 "<round_saeonly_scalar_constraint>")): ... this.
28822 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
28823 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
28824 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
28825 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
28826 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
28828 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
28830 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
28832 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
28833 Remove all values except native, 8540 and 8548.
28835 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
28837 * config/i386/i386.c (ix86_output_function_return): Pass
28838 INVALID_REGNUM, instead of -1, as invalid register number to
28839 indirect_thunk_name and output_indirect_thunk.
28841 2018-02-02 Julia Koval <julia.koval@intel.com>
28843 * config.gcc: Add -march=icelake.
28844 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
28845 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
28846 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
28847 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
28848 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
28849 (processor_target_table): Add icelake.
28850 (ix86_option_override_internal): Handle new PTAs.
28851 (get_builtin_code_for_version): Handle icelake.
28852 (M_INTEL_COREI7_ICELAKE): New.
28853 (fold_builtin_cpu): Handle icelake.
28854 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
28855 * doc/invoke.texi: Add -march=icelake.
28857 2018-02-02 Julia Koval <julia.koval@intel.com>
28859 * config/i386/i386.c (ix86_option_override_internal): Change flags type
28860 to wide_int_bitmask.
28861 * wide-int-bitmask.h: New.
28863 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
28866 * config/i386/i386.md: Replace Pmode with word_mode in
28867 builtin_setjmp_setup and builtin_longjmp to support x32.
28869 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
28873 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
28875 (rs6000_supported_cpu_names): New static variable.
28876 (linux_cpu_translation_table): Likewise.
28877 (elf_platform) <cpu>: Define new static variable and use it.
28878 Translate kernel AT_PLATFORM name to canonical name if needed.
28879 Error if platform name is unknown.
28881 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
28884 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
28886 2018-02-01 Jeff Law <law@redhat.com>
28889 * config/i386/i386.c (release_scratch_register_on_entry): Add new
28890 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
28891 the scratch if RELEASE_VIA_POP is false.
28892 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
28893 If we have to save a temporary register, decrement SIZE appropriately.
28894 Pass new arguments to release_scratch_register_on_entry.
28895 (ix86_adjust_stack_and_probe): Likewise.
28896 (ix86_emit_probe_stack_range): Pass new arguments to
28897 release_scratch_register_on_entry.
28899 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
28901 PR rtl-optimization/84157
28902 * combine.c (change_zero_ext): Use REG_P predicate in
28903 front of HARD_REGISTER_P predicate.
28905 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
28907 * config/avr/avr.c (avr_option_override): Move disabling of
28908 -fdelete-null-pointer-checks to...
28909 * common/config/avr/avr-common.c (avr_option_optimization_table):
28912 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28914 PR tree-optimization/81635
28915 * tree-data-ref.c (split_constant_offset_1): For types that
28916 wrap on overflow, try to use range info to prove that wrapping
28919 2018-02-01 Renlin Li <renlin.li@arm.com>
28922 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
28923 TAILCALL_ADDR_REGS.
28924 (aarch64_register_move_cost): Likewise.
28925 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
28926 TAILCALL_ADDR_REGS.
28927 (REG_CLASS_NAMES): Likewise.
28928 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
28929 TAILCALL_ADDR_REGS. Remove IP registers.
28930 * config/aarch64/aarch64.md (Ucs): Update register constraint.
28932 2018-02-01 Richard Biener <rguenther@suse.de>
28934 * domwalk.h (dom_walker::dom_walker): Add additional constructor
28935 for specifying RPO order and allow NULL for that.
28936 * domwalk.c (dom_walker::dom_walker): Likewise.
28937 (dom_walker::walk): Handle NULL RPO order.
28938 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
28940 (rewrite_update_dom_walker): Likewise.
28941 (mark_def_dom_walker): Likewise.
28943 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28945 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
28946 (aarch64_maybe_expand_sve_subreg_move): Declare.
28947 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
28948 * config/aarch64/predicates.md (aarch64_any_register_operand): New
28950 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
28951 that are semantically a reverse operation.
28952 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
28953 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
28954 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
28956 (aarch64_can_change_mode_class): For big-endian, forbid changes
28957 between two SVE modes if they have different element sizes.
28959 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28961 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
28962 the TImode handling for big-endian targets.
28964 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28966 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
28967 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
28969 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
28970 Remove BSWAP handing for big-endian targets and use the form of
28971 LD1RQ appropariate for the mode.
28973 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28975 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
28976 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
28977 duplicated element.
28979 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28982 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
28983 check for operands that need to go through aarch64_sve_reload_be.
28985 2018-02-01 Jakub Jelinek <jakub@redhat.com>
28987 PR tree-optimization/81661
28988 PR tree-optimization/84117
28989 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
28990 * tree-eh.c: Include gimplify.h.
28991 (find_trapping_overflow, replace_trapping_overflow,
28992 rewrite_to_non_trapping_overflow): New functions.
28993 * tree-vect-loop.c: Include tree-eh.h.
28994 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
28995 * tree-data-ref.c: Include tree-eh.h.
28996 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
28998 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
29000 PR rtl-optimization/84123
29001 * combine.c (change_zero_ext): Check if hard register satisfies
29002 can_change_dest_mode before calling gen_lowpart_SUBREG.
29004 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
29007 * ira.c (ira_init_register_move_cost): Remove assert.
29009 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
29011 PR rtl-optimization/84071
29012 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
29013 * doc/tm.texi: Regenerate.
29015 2018-01-31 Richard Biener <rguenther@suse.de>
29017 PR tree-optimization/84132
29018 * tree-data-ref.c (analyze_miv_subscript): Properly
29019 check whether evolution_function_is_affine_multivariate_p
29020 before calling gcd_of_steps_may_divide_p.
29022 2018-01-31 Julia Koval <julia.koval@intel.com>
29025 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
29026 * config/i386/i386.md (rdpid_rex64) New.
29027 (rdpid): Make 32bit only.
29029 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
29032 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
29033 an IDENTIFIER_NODE for FUNCTION_TYPE's.
29035 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
29038 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29040 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29042 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
29044 PR rtl-optimization/84071
29045 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
29046 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
29048 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
29050 * config/arc/arc.c (arc_handle_aux_attribute): New function.
29051 (arc_attribute_table): Add 'aux' attribute.
29052 (arc_in_small_data_p): Consider aux like variables.
29053 (arc_is_aux_reg_p): New function.
29054 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
29055 (arc_get_aux_arg): New function.
29056 (prepare_move_operands): Handle aux-register access.
29057 (arc_handle_aux_attribute): New function.
29058 * doc/extend.texi (ARC Variable attributes): Add subsection.
29060 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
29062 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
29063 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
29064 (arc_attribute_table): Add 'uncached' attribute.
29065 (arc_print_operand): Print '.di' flag for uncached memory
29067 (arc_in_small_data_p): Do not consider for small data the uncached
29069 (arc_is_uncached_mem_p): New function.
29070 * config/arc/predicates.md (compact_store_memory_operand): Check
29071 for uncached memory accesses.
29072 (nonvol_nonimm_operand): Likewise.
29073 * doc/extend.texi (ARC Type Attribute): New subsection.
29075 2018-01-31 Jakub Jelinek <jakub@redhat.com>
29078 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
29079 falign-loops=): Add Optimization flag.
29081 2018-01-30 Jeff Law <law@redhat.com>
29084 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
29085 INT_REGISTERS_SAVED. Check it prior to calling
29086 get_scratch_register_on_entry.
29087 (ix86_adjust_stack_and_probe): Similarly.
29088 (ix86_emit_probe_stack_range): Similarly.
29089 (ix86_expand_prologue): Corresponding changes.
29091 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29094 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
29095 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
29097 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
29100 * lra-constraints.c (curr_insn_transform): Process AND in the
29103 2018-01-30 Jakub Jelinek <jakub@redhat.com>
29105 PR rtl-optimization/83986
29106 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
29107 dependence against last_pending_memory_flush in addition to
29108 pending_jump_insns.
29110 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
29112 PR tree-optimization/81611
29113 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
29116 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29119 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
29122 2018-01-30 Richard Biener <rguenther@suse.de>
29123 Jakub Jelinek <jakub@redhat.com>
29125 PR tree-optimization/84111
29126 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
29127 inner loops added during recursion, as they don't have up-to-date
29130 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
29133 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
29134 (can_inline_edge_by_limits_p): ... here.
29135 (can_early_inline_edge_p, check_callers,
29136 update_caller_keys, update_callee_keys, recursive_inlining,
29137 add_new_edges_to_heap, speculation_useful_p,
29138 inline_small_functions,
29139 inline_small_functions, flatten_function,
29140 inline_to_all_callers_1): Update.
29142 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
29144 * profile-count.c (profile_count::combine_with_ipa_count): Handle
29147 2018-01-30 Richard Biener <rguenther@suse.de>
29149 PR tree-optimization/83008
29150 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
29151 invariant and constant vector uses in stmts when they need
29152 more than one stmt.
29154 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29157 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
29158 * configure: Regenerate.
29160 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
29162 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
29164 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
29165 Use gen_rtx_REG rather than gen_lowpart.
29167 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
29169 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
29170 rather than 0 when creating partial subregs.
29172 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
29174 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
29177 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
29180 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
29181 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
29182 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
29183 flags. This restores the settings used before the 2017-07-24.
29184 Turning off pre increment/decrement/modify allows IVOPTS to
29185 optimize DF/SF loops where the index is an int.
29187 2018-01-29 Richard Biener <rguenther@suse.de>
29188 Kelvin Nilsen <kelvin@gcc.gnu.org>
29191 * tree-vect-stmts.c (vectorizable_call): Don't call
29192 targetm.vectorize_builtin_md_vectorized_function if callee is
29195 2018-01-22 Carl Love <cel@us.ibm.com>
29197 * doc/extend.tex: Fix typo in second arg in
29198 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
29200 2018-01-29 Richard Biener <rguenther@suse.de>
29202 PR tree-optimization/84086
29203 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
29204 (flush_ssaname_freelist): When SSA names were released reset
29205 the SCEV hash table.
29207 2018-01-29 Richard Biener <rguenther@suse.de>
29209 PR tree-optimization/84057
29210 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
29211 removed paths when removing edges.
29213 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
29215 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
29216 -mfunction-return=@var{choice}.
29218 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
29220 PR diagnostic/84034
29221 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
29222 Handle CR like TAB.
29223 (layout::print_source_line): Likewise.
29224 (test_get_line_width_without_trailing_whitespace): Add test cases.
29226 2018-01-27 Jakub Jelinek <jakub@redhat.com>
29228 PR middle-end/84040
29229 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
29232 2018-01-26 Jim Wilson <jimw@sifive.com>
29234 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
29236 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
29239 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29241 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
29242 and CMP + SUB-immediate -> SUBS.
29244 2018-01-26 Martin Sebor <msebor@redhat.com>
29246 PR tree-optimization/83896
29247 * tree-ssa-strlen.c (get_string_len): Rename...
29248 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
29249 Avoid assuming length is constant.
29250 (handle_char_store): Use HOST_WIDE_INT for string length.
29252 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
29255 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
29256 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
29258 2018-01-26 Richard Biener <rguenther@suse.de>
29260 PR rtl-optimization/84003
29261 * dse.c (record_store): Only record redundant stores when
29262 the earlier store aliases at least all accesses the later one does.
29264 2018-01-26 Jakub Jelinek <jakub@redhat.com>
29266 PR rtl-optimization/83985
29267 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
29268 REG_CFA_RESTORE insns.
29269 (delete_unmarked_insns): Don't ignore separate shrink wrapping
29270 REG_CFA_RESTORE insns here.
29273 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
29274 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
29276 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29278 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
29279 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
29280 (arc_init): Likewise.
29281 (arc_override_options): Likewise.
29282 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
29284 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
29286 * config/arc/arc.h (TARGET_DBNZ): Define.
29287 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
29288 properly set the tune attribute.
29289 (dbnz): Use TARGET_DBNZ guard.
29290 * config/arc/arc.opt (mtune): Add core3 option.
29292 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29294 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
29295 recognize new pic like addresses.
29296 (arc_delegitimize_address): Clean up.
29298 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29300 * config/arc/arc-arches.def: Option mrf16 valid for all
29302 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
29303 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
29304 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
29305 * config/arc/arc-tables.opt: Regenerate.
29306 * config/arc/arc.c (arc_conditional_register_usage): Handle
29307 reduced register file case.
29308 (arc_file_start): Set must have build attributes.
29309 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
29310 mrf16 option value.
29311 * config/arc/arc.opt (mrf16): Add new option.
29312 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
29313 * config/arc/genmultilib.awk: Handle new mrf16 option.
29314 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
29315 * config/arc/t-multilib: Regenerate.
29316 * doc/invoke.texi (ARC Options): Document mrf16 option.
29318 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29320 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
29321 * config/arc/arc.c (arc_handle_secure_attribute): New function.
29322 (arc_attribute_table): Add 'secure_call' attribute.
29323 (arc_print_operand): Print secure call operand.
29324 (arc_function_ok_for_sibcall): Don't optimize tail calls when
29326 (arc_is_secure_call_p): New function. * config/arc/arc.md
29327 (call_i): Add support for sjli instruction.
29328 (call_value_i): Likewise.
29329 * config/arc/constraints.md (Csc): New constraint.
29331 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
29332 John Eric Martin <John.Martin@emmicro-us.com>
29334 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
29335 * config/arc/arc.c (_arc_jli_section): New struct.
29336 (arc_jli_section): New type.
29337 (rc_jli_sections): New static variable.
29338 (arc_handle_jli_attribute): New function.
29339 (arc_attribute_table): Add jli_always and jli_fixed attribute.
29340 (arc_file_end): New function.
29341 (TARGET_ASM_FILE_END): Define.
29342 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
29343 (arc_add_jli_section): New function.
29344 (jli_call_scan): Likewise.
29345 (arc_reorg): Call jli_call_scan.
29346 (arc_output_addsi): Remove 'S' from printing asm operand.
29347 (arc_is_jli_call_p): New function.
29348 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
29350 (movhi_insn): Likewise.
29351 (movsi_insn): Likewise.
29352 (movsi_set_cc_insn): Likewise.
29353 (loadqi_update): Likewise.
29354 (load_zeroextendqisi_update): Likewise.
29355 (load_signextendqisi_update): Likewise.
29356 (loadhi_update): Likewise.
29357 (load_zeroextendhisi_update): Likewise.
29358 (load_signextendhisi_update): Likewise.
29359 (loadsi_update): Likewise.
29360 (loadsf_update): Likewise.
29361 (movsicc_insn): Likewise.
29362 (bset_insn): Likewise.
29363 (bxor_insn): Likewise.
29364 (bclr_insn): Likewise.
29365 (bmsk_insn): Likewise.
29366 (bicsi3_insn): Likewise.
29367 (cmpsi_cc_c_insn): Likewise.
29368 (movsi_ne): Likewise.
29369 (movsi_cond_exec): Likewise.
29370 (clrsbsi2): Likewise.
29371 (norm_f): Likewise.
29381 (call_i): Remove 'S' asm letter, add jli instruction.
29382 (call_value_i): Likewise.
29383 * config/arc/arc.op (mjli-always): New option.
29384 * config/arc/constraints.md (Cji): New constraint.
29385 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
29387 (subsf3_fpx): Likewise.
29388 (mulsf3_fpx): Likewise.
29389 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
29391 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
29392 function attrbutes.
29393 * doc/invoke.texi (ARC): Document mjli-always option.
29395 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
29397 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
29398 avoid addition with 0 and use incw and decw where possible.
29400 2018-01-26 Richard Biener <rguenther@suse.de>
29402 PR tree-optimization/81082
29403 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
29404 association if it requires casting to unsigned.
29405 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
29406 from fold_plusminus_mult_expr to catch important cases late when
29407 range info is available.
29409 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29411 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
29412 * configure.ac (hidden_linkonce): New test.
29413 * configure: Regenerate.
29414 * config.in: Regenerate.
29416 2018-01-26 Julia Koval <julia.koval@intel.com>
29418 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
29419 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
29420 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
29421 _mm_mask_bitshuffle_epi64_mask): Fix type.
29422 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
29423 USI_FTYPE_V4DI_V4DI_USI): Remove.
29424 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
29425 __builtin_ia32_vpshufbitqmb256_mask,
29426 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
29427 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
29428 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
29430 2018-01-26 Alan Modra <amodra@gmail.com>
29433 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
29434 UNSPEC_VBPERMQ. Sort other unspecs.
29436 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
29438 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
29440 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
29442 PR middle-end/83055
29443 * predict.c (drop_profile): Do not push/pop cfun; update also
29445 (handle_missing_profiles): Fix logic looking for zero profiles.
29447 2018-01-25 Jakub Jelinek <jakub@redhat.com>
29449 PR middle-end/83977
29450 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
29451 on functions with #pragma omp declare simd or functions with simd
29453 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
29454 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
29455 Remove trailing \n from warning_at calls.
29457 2018-01-25 Tom de Vries <tom@codesourcery.com>
29460 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29461 for neutered workers.
29463 2018-01-24 Joseph Myers <joseph@codesourcery.com>
29466 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
29467 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
29469 2018-01-24 Jeff Law <law@redhat.com>
29472 * i386.c (get_probe_interval): Move to earlier point.
29473 (ix86_compute_frame_layout): If -fstack-clash-protection and
29474 the frame is larger than the probe interval, then use pushes
29475 to save registers rather than reg->mem moves.
29476 (ix86_expand_prologue): Remove conditional for int_registers_saved
29479 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
29482 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
29483 min/max for never referenced object.
29485 2018-01-24 Jakub Jelinek <jakub@redhat.com>
29487 PR middle-end/83977
29488 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
29490 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
29491 attributes from DECL_ATTRIBUTES (decl) without affecting
29492 DECL_ATTRIBUTES (current_function_decl).
29493 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
29494 functions with non-NULL DECL_ABSTRACT_ORIGIN.
29496 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
29498 PR tree-optimization/83979
29499 * fold-const.c (fold_comparison): Use constant_boolean_node
29500 instead of boolean_{true,false}_node.
29502 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
29504 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
29507 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29509 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29510 Simplify the clause that sets the length attribute.
29511 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29512 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
29513 clause that sets the length attribute.
29514 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29516 2018-01-24 Tom de Vries <tom@codesourcery.com>
29519 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
29520 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
29521 Add strict parameter.
29522 (prevent_branch_around_nothing): Insert dummy insn between branch to
29523 label and label with no ptx insn inbetween.
29524 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
29526 2018-01-24 Tom de Vries <tom@codesourcery.com>
29529 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29530 for neutered threads in warp.
29531 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
29533 2018-01-24 Richard Biener <rguenther@suse.de>
29535 PR tree-optimization/83176
29536 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
29539 2018-01-24 Richard Biener <rguenther@suse.de>
29541 PR tree-optimization/82819
29542 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
29543 code generating pluses that are no-ops in the target precision.
29545 2018-01-24 Richard Biener <rguenther@suse.de>
29547 PR middle-end/84000
29548 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
29550 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
29552 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
29553 to merge probabilities.
29554 * predict.c (probably_never_executed): Also mark as cold functions
29555 with global 0 profile and guessed local profile.
29556 * profile-count.c (profile_probability::combine_with_count): New
29558 * profile-count.h (profile_probability::operator*,
29559 profile_probability::operator*=, profile_probability::operator/,
29560 profile_probability::operator/=): Reduce precision to adjusted
29561 and set value to guessed on contradictory divisions.
29562 (profile_probability::combine_with_freq): Remove.
29563 (profile_probability::combine_wiht_count): Declare.
29564 (profile_count::force_nonzero):: Set to adjusted.
29565 (profile_count::probability_in):: Set quality to adjusted.
29566 * tree-ssa-tail-merge.c (replace_block_by): Use
29567 combine_with_count.
29569 2018-01-23 Andrew Waterman <andrew@sifive.com>
29570 Jim Wilson <jimw@sifive.com>
29572 * config/riscv/riscv.c (riscv_stack_boundary): New.
29573 (riscv_option_override): Set riscv_stack_boundary. Handle
29574 riscv_preferred_stack_boundary_arg.
29575 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
29576 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
29577 (STACK_BOUNDARY): Set to riscv_stack_boundary.
29578 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
29579 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
29580 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
29582 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
29585 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
29586 of struct ix86_frame.
29587 (ix86_expand_epilogue): Likewise. Add a local variable for
29588 the reg_save_offset field in struct ix86_frame.
29590 2018-01-23 Bin Cheng <bin.cheng@arm.com>
29592 PR tree-optimization/82604
29593 * tree-loop-distribution.c (enum partition_kind): New enum item
29594 PKIND_PARTIAL_MEMSET.
29595 (partition_builtin_p): Support above new enum item.
29596 (generate_code_for_partition): Ditto.
29597 (compute_access_range): Differentiate cases that equality can be
29598 proven at all loops, the innermost loops or no loops.
29599 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
29600 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
29601 (finalize_partitions, distribute_loop): Don't fuse partition of
29602 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
29603 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
29604 parloop is enabled.
29606 2018-01-23 Martin Liska <mliska@suse.cz>
29608 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
29609 order to ignore the predictor.
29610 (PRED_POLYMORPHIC_CALL): Likewise.
29611 (PRED_RECURSIVE_CALL): Likewise.
29613 2018-01-23 Martin Liska <mliska@suse.cz>
29615 * tree-profile.c (tree_profiling): Print function header to
29616 aware reader which function we are working on.
29617 * value-prof.c (gimple_find_values_to_profile): Do not print
29618 not interesting value histograms.
29620 2018-01-23 Martin Liska <mliska@suse.cz>
29622 * profile-count.h (enum profile_quality): Add
29623 profile_uninitialized as the first value. Do not number values
29624 as they are zero based.
29625 (profile_count::verify): Update sanity check.
29626 (profile_probability::verify): Likewise.
29628 2018-01-23 Nathan Sidwell <nathan@acm.org>
29630 * doc/invoke.texi (ffor-scope): Deprecate.
29632 2018-01-23 David Malcolm <dmalcolm@redhat.com>
29634 PR tree-optimization/83510
29635 * domwalk.c (set_all_edges_as_executable): New function.
29636 (dom_walker::dom_walker): Convert bool param
29637 "skip_unreachable_blocks" to enum reachability. Move setup of
29638 edge flags to set_all_edges_as_executable and only do it when
29639 reachability is REACHABLE_BLOCKS.
29640 * domwalk.h (enum dom_walker::reachability): New enum.
29641 (dom_walker::dom_walker): Convert bool param
29642 "skip_unreachable_blocks" to enum reachability.
29643 (set_all_edges_as_executable): New decl.
29644 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
29645 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
29647 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
29648 but converting true to REACHABLE_BLOCKS.
29649 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
29651 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
29652 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
29653 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
29655 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
29656 if check_all_array_refs will be called.
29658 2018-01-23 David Malcolm <dmalcolm@redhat.com>
29660 * tree.c (selftest::test_location_wrappers): Add more test
29663 2018-01-23 David Malcolm <dmalcolm@redhat.com>
29665 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
29666 (selftest::test_bit_in_range): Likewise.
29668 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
29671 * doc/sourcebuild.texi (vect_float): Say that the selector
29672 only describes the situation when -funsafe-math-optimizations is on.
29673 (vect_float_strict): Document.
29675 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
29677 PR tree-optimization/83965
29678 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
29679 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
29680 instead of checking only for a reduction.
29681 (vect_recog_widen_sum_pattern): Likewise.
29683 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
29685 * predict.c (probably_never_executed): Only use precise profile info.
29686 (compute_function_frequency): Skip after inlining hack since we now
29687 have quality checking.
29689 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
29691 * profile-count.h (profile_probability::very_unlikely,
29692 profile_probability::unlikely, profile_probability::even): Set
29693 precision to guessed.
29695 2018-01-23 Richard Biener <rguenther@suse.de>
29697 PR tree-optimization/83963
29698 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
29699 Properly terminate dominator walk when crossing the exit edge not
29700 when visiting its source block.
29702 2018-01-23 Jakub Jelinek <jakub@redhat.com>
29705 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
29706 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
29708 2018-01-22 Jakub Jelinek <jakub@redhat.com>
29710 PR tree-optimization/83957
29711 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
29712 semicolon after for body surrounded by braces.
29714 PR tree-optimization/83081
29715 * profile-count.h (profile_probability::split): New method.
29716 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
29717 Use profile_probability::split.
29718 (do_compare_rtx_and_jump): Fix adjustment of probabilities
29719 when splitting a single conditional jump into 2.
29721 2018-01-22 David Malcolm <dmalcolm@redhat.com>
29723 PR tree-optimization/69452
29724 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
29727 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29729 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
29730 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
29731 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
29733 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29735 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
29737 * config/rl78/rl78.md (movdi): New define_expand.
29738 * config/rl78/rl78.c (rl78_split_movdi): New function.
29740 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
29743 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
29745 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
29746 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
29747 128-bit to produce an UNSPEC move to get the double word with the
29748 signbit and then a shift directly to do signbit.
29749 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
29750 implementation with a new version that just does either a direct
29751 move or a regular move. Move memory interface to separate insns.
29752 Move insns so they are next to the expander.
29753 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
29754 with signbit move. Split big and little endian case.
29755 (signbit<mode>2_dm_mem_le): Likewise.
29756 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
29757 (signbit<mode>2_dm2): Likewise.
29759 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29761 * config/rl78/rl78.md (anddi3): New define_expand.
29763 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29765 * config/rl78/rl78.md (umindi3): New define_expand.
29767 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29769 * config/rl78/rl78.md (smindi3): New define_expand.
29771 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29773 * config/rl78/rl78.md (smaxdi3): New define_expand.
29775 2018-01-22 Carl Love <cel@us.ibm.com>
29777 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
29778 LVX_V1TI): Add macro expansion.
29779 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
29780 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
29781 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
29782 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
29783 Change check to determine if the instruction is a byte reversing
29784 entry. Fix typo in comment.
29785 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
29786 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
29787 Add def_builtin calls for new builtins.
29788 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
29789 Add define_insn expansion.
29791 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29793 * config/rl78/rl78.md (umaxdi3): New define_expand.
29795 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29797 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
29798 for non-QImode registers.
29800 2018-01-22 Richard Biener <rguenther@suse.de>
29802 PR tree-optimization/83963
29803 * graphite-scop-detection.c (scop_detection::get_sese): Delay
29804 including the loop exit block.
29805 (scop_detection::merge_sese): Likewise.
29806 (scop_detection::add_scop): Do it here instead.
29808 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29810 * doc/sourcebuild.texi (arm_softfloat): Document.
29812 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
29815 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
29816 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
29817 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
29819 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29820 David Edelsohn <dje.gcc@gmail.com>
29823 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29824 Change "crset eq" to "crset 2".
29825 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29826 (*call_indirect_aix<mode>_nospec): Likewise.
29827 (*call_value_indirect_aix<mode>_nospec): Likewise.
29828 (*call_indirect_elfv2<mode>_nospec): Likewise.
29829 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
29830 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
29831 change assembly output from . to $.
29832 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29833 (indirect_jump<mode>_nospec): Change assembly output from . to $.
29834 (*tablejump<mode>_internal1_nospec): Likewise.
29836 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
29839 * config/sh/sh_optimize_sett_clrt.cc:
29840 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
29842 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
29844 PR tree-optimization/83940
29845 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
29846 offset_dt to vect_constant_def rather than vect_unknown_def_type.
29847 (vect_check_load_store_mask): Add a mask_dt_out parameter and
29848 use it to pass back the definition type.
29849 (vect_check_store_rhs): Likewise rhs_dt_out.
29850 (vect_build_gather_load_calls): Add a mask_dt argument and use
29851 it instead of a call to vect_is_simple_use.
29852 (vectorizable_store): Update calls to vect_check_load_store_mask
29853 and vect_check_store_rhs. Use the dt returned by the latter instead
29854 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
29855 instead of calls to vect_is_simple_use. Pass the scalar rather
29856 than the vector operand to vect_is_simple_use when handling
29857 second and subsequent copies of an rhs value.
29858 (vectorizable_load): Update calls to vect_check_load_store_mask
29859 and vect_build_gather_load_calls. Use the cached mask_dt and
29860 gs_info.offset_dt instead of calls to vect_is_simple_use.
29862 2018-01-20 Jakub Jelinek <jakub@redhat.com>
29864 PR middle-end/83945
29865 * tree-emutls.c: Include gimplify.h.
29866 (lower_emutls_2): New function.
29867 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
29868 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
29869 it before further processing.
29872 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
29873 UINTVAL (trueop1) instead of INTVAL (op1).
29875 2018-01-19 Jakub Jelinek <jakub@redhat.com>
29879 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
29880 INCOMING_FRAME_SP_OFFSET if not defined.
29881 (scan_trace): Add ENTRY argument. If true and
29882 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
29883 emit a note to adjust the CFA offset.
29884 (create_cfi_notes): Adjust scan_trace callers.
29885 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
29886 INCOMING_FRAME_SP_OFFSET in the CIE.
29887 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
29888 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
29890 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
29891 * doc/tm.texi: Regenerated.
29893 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29895 PR rtl-optimization/83147
29896 * lra-constraints.c (remove_inheritance_pseudos): Use
29897 lra_substitute_pseudo_within_insn.
29899 2018-01-19 Tom de Vries <tom@codesourcery.com>
29900 Cesar Philippidis <cesar@codesourcery.com>
29903 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
29905 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
29908 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
29909 spaces for function labels.
29911 2018-01-19 Martin Liska <mliska@suse.cz>
29913 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
29914 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
29915 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
29916 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
29917 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
29918 (PRED_CONST_RETURN): Change from 69 to 65.
29919 (PRED_NULL_RETURN): Change from 91 to 71.
29920 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
29921 (PRED_LOOP_GUARD): Change from 66 to 73.
29923 2018-01-19 Martin Liska <mliska@suse.cz>
29925 * predict.c (predict_insn_def): Add new assert.
29926 (struct branch_predictor): Change type to signed integer.
29927 (test_prediction_value_range): Amend test to cover
29928 PROB_UNINITIALIZED.
29929 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
29930 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
29931 (PRED_LOOP_ITERATIONS_MAX): Likewise.
29932 (PRED_LOOP_IV_COMPARE): Likewise.
29933 * predict.h (PROB_UNINITIALIZED): Define new constant.
29935 2018-01-19 Martin Liska <mliska@suse.cz>
29937 * predict.c (dump_prediction): Add new format for
29938 analyze_brprob.py script which is enabled with -details
29940 * profile-count.h (precise_p): New function.
29942 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
29944 PR tree-optimization/83922
29945 * tree-vect-loop.c (vect_verify_full_masking): Return false if
29946 there are no statements that need masking.
29947 (vect_active_double_reduction_p): New function.
29948 (vect_analyze_loop_operations): Use it when handling phis that
29949 are not in the loop header.
29951 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
29953 PR tree-optimization/83914
29954 * tree-vect-loop.c (vectorizable_induction): Don't convert
29955 init_expr or apply the peeling adjustment for inductions
29956 that are nested within the vectorized loop.
29958 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29960 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
29963 2018-01-18 Jakub Jelinek <jakub@redhat.com>
29967 * function.h (gimplify_parameters): Add gimple_seq * argument.
29968 * function.c: Include gimple.h and options.h.
29969 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
29970 for the added local temporaries if needed.
29971 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
29972 if there are any parameter cleanups, wrap whole body into a
29973 try/finally with the cleanups.
29975 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
29978 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
29979 Use GET_MODE_CLASS for scalar floating point.
29981 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
29985 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
29986 Fix call of call_cgraph_insertion_hooks.
29988 2018-01-18 Martin Sebor <msebor@redhat.com>
29990 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
29992 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
29995 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
29998 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
30001 * common.opt: (-ffile-prefix-map): New option.
30002 * opts.c (common_handle_option): Defer it.
30003 * opts-global.c (handle_common_deferred_options): Handle it.
30004 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
30005 * file-prefix-map.h: New file.
30006 (remap_debug_filename, add_debug_prefix_map): ...here.
30007 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
30008 * final.c (debug_prefix_map, add_debug_prefix_map
30009 remap_debug_filename): Move to...
30010 * file-prefix-map.c: New file.
30011 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
30012 generalize, get rid of alloca(), use strrchr() instead of strchr().
30013 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
30014 Implement in terms of add_prefix_map().
30015 (remap_macro_filename, remap_debug_filename): Implement in term of
30017 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
30018 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
30019 * dbxout.c: Include file-prefix-map.h.
30020 * varasm.c: Likewise.
30021 * vmsdbgout.c: Likewise.
30022 * xcoffout.c: Likewise.
30023 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
30024 * doc/cppopts.texi (-fmacro-prefix-map): Document.
30025 * doc/invoke.texi (-ffile-prefix-map): Document.
30026 (-fdebug-prefix-map): Update description.
30028 2018-01-18 Martin Liska <mliska@suse.cz>
30030 * config/i386/i386.c (indirect_thunk_name): Document that also
30032 (output_indirect_thunk): Document why both instructions
30033 (pause and lfence) are generated.
30035 2018-01-18 Richard Biener <rguenther@suse.de>
30037 PR tree-optimization/83887
30038 * graphite-scop-detection.c
30039 (scop_detection::get_nearest_dom_with_single_entry): Remove.
30040 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
30041 (scop_detection::merge_sese): Re-implement with a flood-fill
30042 algorithm that properly finds a SESE region if it exists.
30044 2018-01-18 Jakub Jelinek <jakub@redhat.com>
30047 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
30048 pointer_diff optimizations use view_convert instead of convert.
30050 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30052 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30053 Generate different code for -mno-speculate-indirect-jumps.
30054 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30055 (*call_indirect_aix<mode>): Disable for
30056 -mno-speculate-indirect-jumps.
30057 (*call_indirect_aix<mode>_nospec): New define_insn.
30058 (*call_value_indirect_aix<mode>): Disable for
30059 -mno-speculate-indirect-jumps.
30060 (*call_value_indirect_aix<mode>_nospec): New define_insn.
30061 (*sibcall_nonlocal_sysv<mode>): Generate different code for
30062 -mno-speculate-indirect-jumps.
30063 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30065 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
30067 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
30068 long double type, set the flags for noting the default long double
30069 type, even if we don't pass or return a long double type.
30071 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
30074 * ipa-inline.c (flatten_function): Do not overwrite final inlining
30077 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
30079 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
30080 support for merge[hl].
30081 (fold_mergehl_helper): New helper function.
30082 (tree-vector-builder.h): New #include for tree_vector_builder usage.
30083 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
30084 (altivec_vmrglw_direct): Add xxmrglw insn.
30086 2018-01-17 Andrew Waterman <andrew@sifive.com>
30088 * config/riscv/riscv.c (riscv_conditional_register_usage): If
30089 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
30091 2018-01-17 David Malcolm <dmalcolm@redhat.com>
30094 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
30095 call the lto_location_cache before reading the
30096 DECL_SOURCE_LOCATION of the types.
30098 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
30099 Richard Sandiford <richard.sandiford@linaro.org>
30101 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
30102 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
30103 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
30104 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
30105 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
30107 * config/aarch64/constraints.md (aarch64_movti_operand):
30109 * config/aarch64/predicates.md (Uti): Add new constraint.
30111 2018-01-17 Carl Love <cel@us.ibm.com>
30113 * config/rs6000/vsx.md (define_expand xl_len_r,
30114 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
30115 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
30117 (define_expand, define_insn): Move the shift left from the
30118 define_insn to the define_expand for lxvl and stxvl instructions.
30119 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
30120 and XL_LEN_R definitions to PURE.
30122 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
30124 * config/i386/i386.c (indirect_thunk_name): Declare regno
30125 as unsigned int. Compare regno with INVALID_REGNUM.
30126 (output_indirect_thunk): Ditto.
30127 (output_indirect_thunk_function): Ditto.
30128 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
30129 in the call to output_indirect_thunk_function.
30131 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
30133 PR middle-end/83884
30134 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
30135 rather than the size of inner_type to determine the stack slot size
30136 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
30138 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
30141 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
30144 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
30146 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
30147 endian Linux systems to optionally enable multilibs for selecting
30148 the long double type if the user configured an explicit type.
30149 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
30150 have no long double multilibs if not defined.
30151 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
30152 warn if the user used -mabi={ieee,ibm}longdouble and we built
30153 multilibs for long double.
30154 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
30155 appropriate multilib option.
30156 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
30158 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
30159 for building long double multilibs.
30160 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
30162 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
30164 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
30167 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
30169 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
30172 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
30175 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
30178 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
30180 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
30181 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
30183 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
30185 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
30186 different rtl trees depending on TARGET_64BIT.
30187 (rs6000_gen_lvx): Likewise.
30189 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
30191 * config/visium/visium.md (nop): Tweak comment.
30192 (hazard_nop): Likewise.
30194 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30196 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
30197 -mspeculate-indirect-jumps.
30198 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
30199 for -mno-speculate-indirect-jumps.
30200 (*call_indirect_elfv2<mode>_nospec): New define_insn.
30201 (*call_value_indirect_elfv2<mode>): Disable for
30202 -mno-speculate-indirect-jumps.
30203 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
30204 (indirect_jump): Emit different RTL for
30205 -mno-speculate-indirect-jumps.
30206 (*indirect_jump<mode>): Disable for
30207 -mno-speculate-indirect-jumps.
30208 (*indirect_jump<mode>_nospec): New define_insn.
30209 (tablejump): Emit different RTL for
30210 -mno-speculate-indirect-jumps.
30211 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
30212 (tablejumpsi_nospec): New define_expand.
30213 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
30214 (tablejumpdi_nospec): New define_expand.
30215 (*tablejump<mode>_internal1): Disable for
30216 -mno-speculate-indirect-jumps.
30217 (*tablejump<mode>_internal1_nospec): New define_insn.
30218 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
30221 2018-01-16 Artyom Skrobov tyomitch@gmail.com
30223 * caller-save.c (insert_save): Drop unnecessary parameter. All
30226 2018-01-16 Jakub Jelinek <jakub@redhat.com>
30227 Richard Biener <rguenth@suse.de>
30230 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
30231 return early, inline manually is_gimple_sizepos. Make sure if we
30232 call gimplify_expr we don't end up with a gimple constant.
30233 * tree.c (variably_modified_type_p): Don't return true for
30234 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
30235 * gimplify.h (is_gimple_sizepos): Remove.
30237 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
30239 PR tree-optimization/83857
30240 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
30241 vectorizable_live_operation for pure SLP statements.
30242 (vectorizable_live_operation): Handle PHIs.
30244 2018-01-16 Richard Biener <rguenther@suse.de>
30246 PR tree-optimization/83867
30247 * tree-vect-stmts.c (vect_transform_stmt): Precompute
30248 nested_in_vect_loop_p since the scalar stmt may get invalidated.
30250 2018-01-16 Jakub Jelinek <jakub@redhat.com>
30253 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
30254 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
30255 If off is not INTEGER_CST, issue a may not be aligned warning
30256 rather than isn't aligned. Use isn%'t rather than isn't.
30257 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
30259 <case MULT_EXPR>: Improve the case when bottom and one of the
30260 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
30261 operand, in that case check if the other operand is multiple of
30262 bottom divided by the INTEGER_CST operand.
30264 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
30267 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
30268 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
30269 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
30270 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
30271 * config/pa/pa.c (pa_function_arg_advance): Likewise.
30272 (pa_function_arg, pa_arg_partial_bytes): Likewise.
30273 (pa_function_arg_size): New function.
30275 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
30277 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
30278 in a separate statement.
30280 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
30282 PR tree-optimization/83847
30283 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
30284 group gathers and scatters.
30286 2018-01-16 Jakub Jelinek <jakub@redhat.com>
30288 PR rtl-optimization/86620
30289 * params.def (max-sched-ready-insns): Bump minimum value to 1.
30291 PR rtl-optimization/83213
30292 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
30293 to last if both are JUMP_INSNs.
30295 PR tree-optimization/83843
30296 * gimple-ssa-store-merging.c
30297 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
30298 store_immediate_info for bswap/nop orig_stores.
30300 2018-01-15 Andrew Waterman <andrew@sifive.com>
30302 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
30304 <UDIV>: Increase cost if !TARGET_DIV.
30306 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
30308 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
30309 (define_attr "cr_logical_3op"): New.
30310 (cceq_ior_compare): Adjust.
30311 (cceq_ior_compare_complement): Adjust.
30312 (*cceq_rev_compare): Adjust.
30313 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
30314 (is_cracked_insn): Adjust.
30315 (insn_must_be_first_in_group): Adjust.
30316 * config/rs6000/40x.md: Adjust.
30317 * config/rs6000/440.md: Adjust.
30318 * config/rs6000/476.md: Adjust.
30319 * config/rs6000/601.md: Adjust.
30320 * config/rs6000/603.md: Adjust.
30321 * config/rs6000/6xx.md: Adjust.
30322 * config/rs6000/7450.md: Adjust.
30323 * config/rs6000/7xx.md: Adjust.
30324 * config/rs6000/8540.md: Adjust.
30325 * config/rs6000/cell.md: Adjust.
30326 * config/rs6000/e300c2c3.md: Adjust.
30327 * config/rs6000/e500mc.md: Adjust.
30328 * config/rs6000/e500mc64.md: Adjust.
30329 * config/rs6000/e5500.md: Adjust.
30330 * config/rs6000/e6500.md: Adjust.
30331 * config/rs6000/mpc.md: Adjust.
30332 * config/rs6000/power4.md: Adjust.
30333 * config/rs6000/power5.md: Adjust.
30334 * config/rs6000/power6.md: Adjust.
30335 * config/rs6000/power7.md: Adjust.
30336 * config/rs6000/power8.md: Adjust.
30337 * config/rs6000/power9.md: Adjust.
30338 * config/rs6000/rs64.md: Adjust.
30339 * config/rs6000/titan.md: Adjust.
30341 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30343 * config/i386/predicates.md (indirect_branch_operand): Rewrite
30344 ix86_indirect_branch_register logic.
30346 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30348 * config/i386/constraints.md (Bs): Update
30349 ix86_indirect_branch_register check. Don't check
30350 ix86_indirect_branch_register with GOT_memory_operand.
30352 * config/i386/predicates.md (GOT_memory_operand): Don't check
30353 ix86_indirect_branch_register here.
30354 (GOT32_symbol_operand): Likewise.
30356 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30358 * config/i386/predicates.md (constant_call_address_operand):
30359 Rewrite ix86_indirect_branch_register logic.
30360 (sibcall_insn_operand): Likewise.
30362 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30364 * config/i386/constraints.md (Bs): Replace
30365 ix86_indirect_branch_thunk_register with
30366 ix86_indirect_branch_register.
30368 * config/i386/i386.md (indirect_jump): Likewise.
30369 (tablejump): Likewise.
30370 (*sibcall_memory): Likewise.
30371 (*sibcall_value_memory): Likewise.
30372 Peepholes of indirect call and jump via memory: Likewise.
30373 * config/i386/i386.opt: Likewise.
30374 * config/i386/predicates.md (indirect_branch_operand): Likewise.
30375 (GOT_memory_operand): Likewise.
30376 (call_insn_operand): Likewise.
30377 (sibcall_insn_operand): Likewise.
30378 (GOT32_symbol_operand): Likewise.
30380 2018-01-15 Jakub Jelinek <jakub@redhat.com>
30382 PR middle-end/83837
30383 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
30384 type rather than type addr's type points to.
30385 (expand_omp_atomic_mutex): Likewise.
30386 (expand_omp_atomic): Likewise.
30388 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
30391 * config/i386/i386.c (output_indirect_thunk_function): Use
30392 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
30393 for __x86_return_thunk.
30395 2018-01-15 Richard Biener <rguenther@suse.de>
30397 PR middle-end/83850
30398 * expmed.c (extract_bit_field_1): Fix typo.
30400 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30403 * config/arm/iterators.md (VF): New mode iterator.
30404 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
30405 Remove integer-related logic from pattern.
30406 (neon_vabd<mode>_3): Likewise.
30408 2018-01-15 Jakub Jelinek <jakub@redhat.com>
30410 PR middle-end/82694
30411 * common.opt (fstrict-overflow): No longer an alias.
30412 (fwrapv-pointer): New option.
30413 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
30414 also for pointer types based on flag_wrapv_pointer.
30415 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
30416 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
30417 opts->x_flag_wrapv got set.
30418 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
30419 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
30420 POINTER_TYPE_OVERFLOW_UNDEFINED.
30421 * match.pd: Likewise in address comparison pattern.
30422 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
30424 2018-01-15 Richard Biener <rguenther@suse.de>
30427 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
30428 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
30429 Reset type names to their identifier if their TYPE_DECL doesn't
30430 have linkage (and thus is used for ODR and devirt).
30431 (save_debug_info_for_decl): Remove.
30432 (save_debug_info_for_type): Likewise.
30433 (add_tree_to_fld_list): Adjust.
30434 * tree-pretty-print.c (dump_generic_node): Make dumping of
30435 type names more robust.
30437 2018-01-15 Richard Biener <rguenther@suse.de>
30439 * BASE-VER: Bump to 8.0.1.
30441 2018-01-14 Martin Sebor <msebor@redhat.com>
30444 * builtins.c (check_access): Avoid warning when the no-warning bit
30447 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
30449 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
30450 * ira-color (allocno_hard_regs_compare): Likewise.
30452 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
30455 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
30456 Use .pushsection/.popsection.
30458 2018-01-14 Martin Sebor <msebor@redhat.com>
30461 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
30463 2018-01-14 Jakub Jelinek <jakub@redhat.com>
30465 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
30466 entry from extra_headers.
30467 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
30468 extra_headers, make the list bitwise identical to the i?86-*-* one.
30470 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30472 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
30473 -mcmodel=large with -mindirect-branch=thunk,
30474 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
30475 -mfunction-return=thunk-extern.
30476 * doc/invoke.texi: Document -mcmodel=large is incompatible with
30477 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
30478 -mfunction-return=thunk and -mfunction-return=thunk-extern.
30480 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30482 * config/i386/i386.c (print_reg): Print the name of the full
30483 integer register without '%'.
30484 (ix86_print_operand): Handle 'V'.
30485 * doc/extend.texi: Document 'V' modifier.
30487 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30489 * config/i386/constraints.md (Bs): Disallow memory operand for
30490 -mindirect-branch-register.
30492 * config/i386/predicates.md (indirect_branch_operand): Likewise.
30493 (GOT_memory_operand): Likewise.
30494 (call_insn_operand): Likewise.
30495 (sibcall_insn_operand): Likewise.
30496 (GOT32_symbol_operand): Likewise.
30497 * config/i386/i386.md (indirect_jump): Call convert_memory_address
30498 for -mindirect-branch-register.
30499 (tablejump): Likewise.
30500 (*sibcall_memory): Likewise.
30501 (*sibcall_value_memory): Likewise.
30502 Disallow peepholes of indirect call and jump via memory for
30503 -mindirect-branch-register.
30504 (*call_pop): Replace m with Bw.
30505 (*call_value_pop): Likewise.
30506 (*sibcall_pop_memory): Replace m with Bs.
30507 * config/i386/i386.opt (mindirect-branch-register): New option.
30508 * doc/invoke.texi: Document -mindirect-branch-register option.
30510 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30512 * config/i386/i386-protos.h (ix86_output_function_return): New.
30513 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
30514 set function_return_type.
30515 (indirect_thunk_name): Add ret_p to indicate thunk for function
30517 (output_indirect_thunk_function): Pass false to
30518 indirect_thunk_name.
30519 (ix86_output_indirect_branch_via_reg): Likewise.
30520 (ix86_output_indirect_branch_via_push): Likewise.
30521 (output_indirect_thunk_function): Create alias for function
30522 return thunk if regno < 0.
30523 (ix86_output_function_return): New function.
30524 (ix86_handle_fndecl_attribute): Handle function_return.
30525 (ix86_attribute_table): Add function_return.
30526 * config/i386/i386.h (machine_function): Add
30527 function_return_type.
30528 * config/i386/i386.md (simple_return_internal): Use
30529 ix86_output_function_return.
30530 (simple_return_internal_long): Likewise.
30531 * config/i386/i386.opt (mfunction-return=): New option.
30532 (indirect_branch): Mention -mfunction-return=.
30533 * doc/extend.texi: Document function_return function attribute.
30534 * doc/invoke.texi: Document -mfunction-return= option.
30536 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
30538 * config/i386/i386-opts.h (indirect_branch): New.
30539 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
30540 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
30541 with local indirect jump when converting indirect call and jump.
30542 (ix86_set_indirect_branch_type): New.
30543 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
30544 (indirectlabelno): New.
30545 (indirect_thunk_needed): Likewise.
30546 (indirect_thunk_bnd_needed): Likewise.
30547 (indirect_thunks_used): Likewise.
30548 (indirect_thunks_bnd_used): Likewise.
30549 (INDIRECT_LABEL): Likewise.
30550 (indirect_thunk_name): Likewise.
30551 (output_indirect_thunk): Likewise.
30552 (output_indirect_thunk_function): Likewise.
30553 (ix86_output_indirect_branch_via_reg): Likewise.
30554 (ix86_output_indirect_branch_via_push): Likewise.
30555 (ix86_output_indirect_branch): Likewise.
30556 (ix86_output_indirect_jmp): Likewise.
30557 (ix86_code_end): Call output_indirect_thunk_function if needed.
30558 (ix86_output_call_insn): Call ix86_output_indirect_branch if
30560 (ix86_handle_fndecl_attribute): Handle indirect_branch.
30561 (ix86_attribute_table): Add indirect_branch.
30562 * config/i386/i386.h (machine_function): Add indirect_branch_type
30563 and has_local_indirect_jump.
30564 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
30566 (tablejump): Likewise.
30567 (*indirect_jump): Use ix86_output_indirect_jmp.
30568 (*tablejump_1): Likewise.
30569 (simple_return_indirect_internal): Likewise.
30570 * config/i386/i386.opt (mindirect-branch=): New option.
30571 (indirect_branch): New.
30574 (thunk-inline): Likewise.
30575 (thunk-extern): Likewise.
30576 * doc/extend.texi: Document indirect_branch function attribute.
30577 * doc/invoke.texi: Document -mindirect-branch= option.
30579 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
30582 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
30584 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
30586 * ipa-inline.c (want_inline_small_function_p): Return false if
30587 inlining has already failed with CIF_FINAL_ERROR.
30588 (update_caller_keys): Call want_inline_small_function_p before
30590 (update_callee_keys): Likewise.
30592 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
30594 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
30596 (rs6000_quadword_masked_address_p): Likewise.
30597 (quad_aligned_load_p): Likewise.
30598 (quad_aligned_store_p): Likewise.
30599 (const_load_sequence_p): Add comment to describe the outer-most loop.
30600 (mimic_memory_attributes_and_flags): New function.
30601 (rs6000_gen_stvx): Likewise.
30602 (replace_swapped_aligned_store): Likewise.
30603 (rs6000_gen_lvx): Likewise.
30604 (replace_swapped_aligned_load): Likewise.
30605 (replace_swapped_load_constant): Capitalize argument name in
30606 comment describing this function.
30607 (rs6000_analyze_swaps): Add a third pass to search for vector loads
30608 and stores that access quad-word aligned addresses and replace
30609 with stvx or lvx instructions when appropriate.
30610 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
30611 New function prototype.
30612 (rs6000_quadword_masked_address_p): Likewise.
30613 (rs6000_gen_lvx): Likewise.
30614 (rs6000_gen_stvx): Likewise.
30615 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
30616 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
30617 when memory address is aligned.
30618 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
30619 this split to select lvx instruction when memory address is aligned.
30620 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
30621 instruction when memory address is aligned.
30622 (*vsx_le_perm_load_v16qi): Likewise.
30623 (four unnamed splitters): Modify to select the stvx instruction
30624 when memory is aligned.
30626 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
30628 * predict.c (determine_unlikely_bbs): Handle correctly BBs
30629 which appears in the queue multiple times.
30631 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30632 Alan Hayward <alan.hayward@arm.com>
30633 David Sherwood <david.sherwood@arm.com>
30635 * tree-vectorizer.h (vec_lower_bound): New structure.
30636 (_loop_vec_info): Add check_nonzero and lower_bounds.
30637 (LOOP_VINFO_CHECK_NONZERO): New macro.
30638 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
30639 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
30640 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
30641 fields. Make seg_len the distance travelled, not including the
30643 (dr_direction_indicator): Declare.
30644 (dr_zero_step_indicator): Likewise.
30645 (dr_known_forward_stride_p): Likewise.
30646 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
30648 (runtime_alias_check_p): Allow runtime alias checks with
30650 (operator ==): Compare access_size and align.
30651 (prune_runtime_alias_test_list): Rework for new distinction between
30652 the access_size and seg_len.
30653 (create_intersect_range_checks_index): Likewise. Cope with polynomial
30655 (get_segment_min_max): New function.
30656 (create_intersect_range_checks): Use it.
30657 (dr_step_indicator): New function.
30658 (dr_direction_indicator): Likewise.
30659 (dr_zero_step_indicator): Likewise.
30660 (dr_known_forward_stride_p): Likewise.
30661 * tree-loop-distribution.c (data_ref_segment_size): Return
30662 DR_STEP * (niters - 1).
30663 (compute_alias_check_pairs): Update call to the dr_with_seg_len
30665 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
30666 (vect_preserves_scalar_order_p): New function, split out from...
30667 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
30668 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
30669 (vect_vfa_access_size): New function.
30670 (vect_vfa_align): Likewise.
30671 (vect_compile_time_alias): Take access_size_a and access_b arguments.
30672 (dump_lower_bound): New function.
30673 (vect_check_lower_bound): Likewise.
30674 (vect_small_gap_p): Likewise.
30675 (vectorizable_with_step_bound_p): Likewise.
30676 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
30677 depencies if the vectorization factor is 1. Convert the checks
30678 for nonzero steps into checks on the bounds of DR_STEP. Try using
30679 a bunds check for variable steps if the minimum required step is
30680 relatively small. Update calls to the dr_with_seg_len
30681 constructor and to vect_compile_time_alias.
30682 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
30684 (vect_loop_versioning): Call it.
30685 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
30687 (vect_estimate_min_profitable_iters): Account for any bounds checks.
30689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30690 Alan Hayward <alan.hayward@arm.com>
30691 David Sherwood <david.sherwood@arm.com>
30693 * doc/sourcebuild.texi (vect_scatter_store): Document.
30694 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
30696 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
30698 * genopinit.c (main): Add supports_vec_scatter_store and
30699 supports_vec_scatter_store_cached to target_optabs.
30700 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
30701 IFN_MASK_SCATTER_STORE.
30702 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
30704 * internal-fn.h (internal_store_fn_p): Declare.
30705 (internal_fn_stored_value_index): Likewise.
30706 * internal-fn.c (scatter_store_direct): New macro.
30707 (expand_scatter_store_optab_fn): New function.
30708 (direct_scatter_store_optab_supported_p): New macro.
30709 (internal_store_fn_p): New function.
30710 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
30711 IFN_MASK_SCATTER_STORE.
30712 (internal_fn_mask_index): Likewise.
30713 (internal_fn_stored_value_index): New function.
30714 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
30715 for scatter stores.
30716 * optabs-query.h (supports_vec_scatter_store_p): Declare.
30717 * optabs-query.c (supports_vec_scatter_store_p): New function.
30718 * tree-vectorizer.h (vect_get_store_rhs): Declare.
30719 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
30720 true for scatter stores.
30721 (vect_gather_scatter_fn_p): Handle scatter stores too.
30722 (vect_check_gather_scatter): Consider using scatter stores if
30723 supports_vec_scatter_store_p.
30724 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
30725 scatter stores too.
30726 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30727 internal_fn_stored_value_index.
30728 (check_load_store_masking): Handle scatter stores too.
30729 (vect_get_store_rhs): Make public.
30730 (vectorizable_call): Use internal_store_fn_p.
30731 (vectorizable_store): Handle scatter store internal functions.
30732 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
30733 when deciding whether the end of the group has been reached.
30734 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
30735 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
30736 (mask_scatter_store<mode>): New insns.
30738 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30739 Alan Hayward <alan.hayward@arm.com>
30740 David Sherwood <david.sherwood@arm.com>
30742 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
30743 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
30744 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
30746 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
30747 Use vect_truncate_gather_scatter_offset if we can't treat the
30748 operation as a normal gather load or scatter store.
30749 (get_group_load_store_type): Take the gather_scatter_info
30750 as argument. Try using a gather load or scatter store for
30751 single-element groups.
30752 (get_load_store_type): Update calls to get_group_load_store_type
30753 and vect_use_strided_gather_scatters_p.
30755 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30756 Alan Hayward <alan.hayward@arm.com>
30757 David Sherwood <david.sherwood@arm.com>
30759 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
30760 optional tree argument.
30761 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
30763 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
30764 but continue to use the current value as a fallback.
30765 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
30766 to compare the updates.
30767 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
30768 (get_load_store_type): Use it when handling a strided access.
30769 (vect_get_strided_load_store_ops): New function.
30770 (vect_get_data_ptr_increment): Likewise.
30771 (vectorizable_load): Handle strided gather loads. Always pass
30772 a step to vect_create_data_ref_ptr and bump_vector_ptr.
30774 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30775 Alan Hayward <alan.hayward@arm.com>
30776 David Sherwood <david.sherwood@arm.com>
30778 * doc/md.texi (gather_load@var{m}): Document.
30779 (mask_gather_load@var{m}): Likewise.
30780 * genopinit.c (main): Add supports_vec_gather_load and
30781 supports_vec_gather_load_cached to target_optabs.
30782 * optabs-tree.c (init_tree_optimization_optabs): Use
30783 ggc_cleared_alloc to allocate target_optabs.
30784 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
30785 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
30787 * internal-fn.h (internal_load_fn_p): Declare.
30788 (internal_gather_scatter_fn_p): Likewise.
30789 (internal_fn_mask_index): Likewise.
30790 (internal_gather_scatter_fn_supported_p): Likewise.
30791 * internal-fn.c (gather_load_direct): New macro.
30792 (expand_gather_load_optab_fn): New function.
30793 (direct_gather_load_optab_supported_p): New macro.
30794 (direct_internal_fn_optab): New function.
30795 (internal_load_fn_p): Likewise.
30796 (internal_gather_scatter_fn_p): Likewise.
30797 (internal_fn_mask_index): Likewise.
30798 (internal_gather_scatter_fn_supported_p): Likewise.
30799 * optabs-query.c (supports_at_least_one_mode_p): New function.
30800 (supports_vec_gather_load_p): Likewise.
30801 * optabs-query.h (supports_vec_gather_load_p): Declare.
30802 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
30803 and memory_type field.
30804 (NUM_PATTERNS): Bump to 15.
30805 * tree-vect-data-refs.c: Include internal-fn.h.
30806 (vect_gather_scatter_fn_p): New function.
30807 (vect_describe_gather_scatter_call): Likewise.
30808 (vect_check_gather_scatter): Try using internal functions for
30809 gather loads. Recognize existing calls to a gather load function.
30810 (vect_analyze_data_refs): Consider using gather loads if
30811 supports_vec_gather_load_p.
30812 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
30813 (vect_get_gather_scatter_offset_type): Likewise.
30814 (vect_convert_mask_for_vectype): Likewise.
30815 (vect_add_conversion_to_patterm): Likewise.
30816 (vect_try_gather_scatter_pattern): Likewise.
30817 (vect_recog_gather_scatter_pattern): New pattern recognizer.
30818 (vect_vect_recog_func_ptrs): Add it.
30819 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30820 internal_fn_mask_index and internal_gather_scatter_fn_p.
30821 (check_load_store_masking): Take the gather_scatter_info as an
30822 argument and handle gather loads.
30823 (vect_get_gather_scatter_ops): New function.
30824 (vectorizable_call): Check internal_load_fn_p.
30825 (vectorizable_load): Likewise. Handle gather load internal
30827 (vectorizable_store): Update call to check_load_store_masking.
30828 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
30829 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
30830 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
30831 (aarch64_gather_scale_operand_d): New predicates.
30832 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
30833 (mask_gather_load<mode>): New insns.
30835 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30836 Alan Hayward <alan.hayward@arm.com>
30837 David Sherwood <david.sherwood@arm.com>
30839 * optabs.def (fold_left_plus_optab): New optab.
30840 * doc/md.texi (fold_left_plus_@var{m}): Document.
30841 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
30842 * internal-fn.c (fold_left_direct): Define.
30843 (expand_fold_left_optab_fn): Likewise.
30844 (direct_fold_left_optab_supported_p): Likewise.
30845 * fold-const-call.c (fold_const_fold_left): New function.
30846 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
30847 * tree-parloops.c (valid_reduction_p): New function.
30848 (gather_scalar_reductions): Use it.
30849 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
30850 (vect_finish_replace_stmt): Declare.
30851 * tree-vect-loop.c (fold_left_reduction_fn): New function.
30852 (needs_fold_left_reduction_p): New function, split out from...
30853 (vect_is_simple_reduction): ...here. Accept reductions that
30854 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
30855 (vect_force_simple_reduction): Also store the reduction type in
30856 the assignment's STMT_VINFO_REDUC_TYPE.
30857 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
30858 (merge_with_identity): New function.
30859 (vect_expand_fold_left): Likewise.
30860 (vectorize_fold_left_reduction): Likewise.
30861 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
30862 scalar phi in place for it. Check for target support and reject
30863 cases that would reassociate the operation. Defer the transform
30864 phase to vectorize_fold_left_reduction.
30865 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
30866 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
30867 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
30869 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30871 * tree-if-conv.c (predicate_mem_writes): Remove redundant
30872 call to ifc_temp_var.
30874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30875 Alan Hayward <alan.hayward@arm.com>
30876 David Sherwood <david.sherwood@arm.com>
30878 * target.def (legitimize_address_displacement): Take the original
30879 offset as a poly_int.
30880 * targhooks.h (default_legitimize_address_displacement): Update
30882 * targhooks.c (default_legitimize_address_displacement): Likewise.
30883 * doc/tm.texi: Regenerate.
30884 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
30885 as an argument, moving assert of ad->disp == ad->disp_term to...
30886 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
30887 Try calling targetm.legitimize_address_displacement before expanding
30888 the address rather than afterwards, and adjust for the new interface.
30889 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
30890 Match the new hook interface. Handle SVE addresses.
30891 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
30892 new hook interface.
30894 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30896 * Makefile.in (OBJS): Add early-remat.o.
30897 * target.def (select_early_remat_modes): New hook.
30898 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
30899 * doc/tm.texi: Regenerate.
30900 * targhooks.h (default_select_early_remat_modes): Declare.
30901 * targhooks.c (default_select_early_remat_modes): New function.
30902 * timevar.def (TV_EARLY_REMAT): New timevar.
30903 * passes.def (pass_early_remat): New pass.
30904 * tree-pass.h (make_pass_early_remat): Declare.
30905 * early-remat.c: New file.
30906 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
30908 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
30910 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30911 Alan Hayward <alan.hayward@arm.com>
30912 David Sherwood <david.sherwood@arm.com>
30914 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
30915 vfm1 with a bound_epilog parameter.
30916 (vect_do_peeling): Update calls accordingly, and move the prologue
30917 call earlier in the function. Treat the base bound_epilog as 0 for
30918 fully-masked loops and retain vf - 1 for other loops. Add 1 to
30919 this base when peeling for gaps.
30920 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
30921 with fully-masked loops.
30922 (vect_estimate_min_profitable_iters): Handle the single peeled
30923 iteration in that case.
30925 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30926 Alan Hayward <alan.hayward@arm.com>
30927 David Sherwood <david.sherwood@arm.com>
30929 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
30930 single-element interleaving even if the size is not a power of 2.
30931 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
30932 accesses for single-element interleaving if the group size is
30935 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30936 Alan Hayward <alan.hayward@arm.com>
30937 David Sherwood <david.sherwood@arm.com>
30939 * doc/md.texi (fold_extract_last_@var{m}): Document.
30940 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
30941 * optabs.def (fold_extract_last_optab): New optab.
30942 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
30943 * internal-fn.c (fold_extract_direct): New macro.
30944 (expand_fold_extract_optab_fn): Likewise.
30945 (direct_fold_extract_optab_supported_p): Likewise.
30946 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
30947 * tree-vect-loop.c (vect_model_reduction_cost): Handle
30948 EXTRACT_LAST_REDUCTION.
30949 (get_initial_def_for_reduction): Do not create an initial vector
30950 for EXTRACT_LAST_REDUCTION reductions.
30951 (vectorizable_reduction): Leave the scalar phi in place for
30952 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
30953 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
30954 epilogue code for EXTRACT_LAST_REDUCTION and defer the
30955 transform phase to vectorizable_condition.
30956 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
30958 (vect_finish_stmt_generation): ...here.
30959 (vect_finish_replace_stmt): New function.
30960 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
30961 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
30963 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
30965 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30966 Alan Hayward <alan.hayward@arm.com>
30967 David Sherwood <david.sherwood@arm.com>
30969 * doc/md.texi (extract_last_@var{m}): Document.
30970 * optabs.def (extract_last_optab): New optab.
30971 * internal-fn.def (EXTRACT_LAST): New internal function.
30972 * internal-fn.c (cond_unary_direct): New macro.
30973 (expand_cond_unary_optab_fn): Likewise.
30974 (direct_cond_unary_optab_supported_p): Likewise.
30975 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
30976 loops using EXTRACT_LAST.
30977 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
30978 (extract_last_<mode>): ...this optab.
30979 (vec_extract<mode><Vel>): Update accordingly.
30981 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30982 Alan Hayward <alan.hayward@arm.com>
30983 David Sherwood <david.sherwood@arm.com>
30985 * target.def (empty_mask_is_expensive): New hook.
30986 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
30987 * doc/tm.texi: Regenerate.
30988 * targhooks.h (default_empty_mask_is_expensive): Declare.
30989 * targhooks.c (default_empty_mask_is_expensive): New function.
30990 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
30991 if the target says that empty masks are expensive.
30992 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
30994 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
30996 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30997 Alan Hayward <alan.hayward@arm.com>
30998 David Sherwood <david.sherwood@arm.com>
31000 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
31001 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
31002 (vect_use_loop_mask_for_alignment_p): New function.
31003 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
31004 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
31005 niters_skip argument. Make sure that the first niters_skip elements
31006 of the first iteration are inactive.
31007 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
31008 Update call to vect_set_loop_masks_directly.
31009 (get_misalign_in_elems): New function, split out from...
31010 (vect_gen_prolog_loop_niters): ...here.
31011 (vect_update_init_of_dr): Take a code argument that specifies whether
31012 the adjustment should be added or subtracted.
31013 (vect_update_init_of_drs): Likewise.
31014 (vect_prepare_for_masked_peels): New function.
31015 (vect_do_peeling): Skip prologue peeling if we're using a mask
31016 instead. Update call to vect_update_inits_of_drs.
31017 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
31019 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
31020 alignment. Do not include the number of peeled iterations in
31021 the minimum threshold in that case.
31022 (vectorizable_induction): Adjust the start value down by
31023 LOOP_VINFO_MASK_SKIP_NITERS iterations.
31024 (vect_transform_loop): Call vect_prepare_for_masked_peels.
31025 Take the number of skipped iterations into account when calculating
31027 * tree-vect-stmts.c (vect_gen_while_not): New function.
31029 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31030 Alan Hayward <alan.hayward@arm.com>
31031 David Sherwood <david.sherwood@arm.com>
31033 * doc/sourcebuild.texi (vect_fully_masked): Document.
31034 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
31035 default value to 0.
31036 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
31038 (vect_analyze_loop_2): ...here. Don't check the vectorization
31039 factor against the number of loop iterations if the loop is
31042 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31043 Alan Hayward <alan.hayward@arm.com>
31044 David Sherwood <david.sherwood@arm.com>
31046 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
31047 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
31048 (dump_groups): Update accordingly.
31049 (iv_use::mem_type): New member variable.
31050 (address_p): New function.
31051 (record_use): Add a mem_type argument and initialize the new
31053 (record_group_use): Add a mem_type argument. Use address_p.
31054 Remove obsolete null checks of base_object. Update call to record_use.
31055 (find_interesting_uses_op): Update call to record_group_use.
31056 (find_interesting_uses_cond): Likewise.
31057 (find_interesting_uses_address): Likewise.
31058 (get_mem_type_for_internal_fn): New function.
31059 (find_address_like_use): Likewise.
31060 (find_interesting_uses_stmt): Try find_address_like_use before
31061 calling find_interesting_uses_op.
31062 (addr_offset_valid_p): Use the iv mem_type field as the type
31063 of the addressed memory.
31064 (add_autoinc_candidates): Likewise.
31065 (get_address_cost): Likewise.
31066 (split_small_address_groups_p): Use address_p.
31067 (split_address_groups): Likewise.
31068 (add_iv_candidate_for_use): Likewise.
31069 (autoinc_possible_for_pair): Likewise.
31070 (rewrite_groups): Likewise.
31071 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
31072 (determine_group_iv_cost): Update after split of USE_ADDRESS.
31073 (get_alias_ptr_type_for_ptr_address): New function.
31074 (rewrite_use_address): Rewrite address uses in calls that were
31075 identified by find_address_like_use.
31077 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31078 Alan Hayward <alan.hayward@arm.com>
31079 David Sherwood <david.sherwood@arm.com>
31081 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
31083 * gimple-expr.h (is_gimple_addressable: Likewise.
31084 * gimple-expr.c (is_gimple_address): Likewise.
31085 * internal-fn.c (expand_call_mem_ref): New function.
31086 (expand_mask_load_optab_fn): Use it.
31087 (expand_mask_store_optab_fn): Likewise.
31089 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31090 Alan Hayward <alan.hayward@arm.com>
31091 David Sherwood <david.sherwood@arm.com>
31093 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
31094 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
31095 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
31096 (cond_umax@var{mode}): Document.
31097 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
31098 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
31099 (cond_umin_optab, cond_umax_optab): New optabs.
31100 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
31101 (COND_IOR, COND_XOR): New internal functions.
31102 * internal-fn.h (get_conditional_internal_fn): Declare.
31103 * internal-fn.c (cond_binary_direct): New macro.
31104 (expand_cond_binary_optab_fn): Likewise.
31105 (direct_cond_binary_optab_supported_p): Likewise.
31106 (get_conditional_internal_fn): New function.
31107 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
31108 Cope with reduction statements that are vectorized as calls rather
31110 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
31111 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
31112 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
31113 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
31114 (UNSPEC_COND_EOR): New unspecs.
31115 (optab): Add mappings for them.
31116 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
31117 (sve_int_op, sve_fp_op): New int attributes.
31119 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31120 Alan Hayward <alan.hayward@arm.com>
31121 David Sherwood <david.sherwood@arm.com>
31123 * optabs.def (while_ult_optab): New optab.
31124 * doc/md.texi (while_ult@var{m}@var{n}): Document.
31125 * internal-fn.def (WHILE_ULT): New internal function.
31126 * internal-fn.h (direct_internal_fn_supported_p): New override
31127 that takes two types as argument.
31128 * internal-fn.c (while_direct): New macro.
31129 (expand_while_optab_fn): New function.
31130 (convert_optab_supported_p): Likewise.
31131 (direct_while_optab_supported_p): New macro.
31132 * wide-int.h (wi::udiv_ceil): New function.
31133 * tree-vectorizer.h (rgroup_masks): New structure.
31134 (vec_loop_masks): New typedef.
31135 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
31136 and fully_masked_p.
31137 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
31138 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
31139 (vect_max_vf): New function.
31140 (slpeel_make_loop_iterate_ntimes): Delete.
31141 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
31142 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
31143 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
31144 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
31145 internal-fn.h, stor-layout.h and optabs-query.h.
31146 (vect_set_loop_mask): New function.
31147 (add_preheader_seq): Likewise.
31148 (add_header_seq): Likewise.
31149 (interleave_supported_p): Likewise.
31150 (vect_maybe_permute_loop_masks): Likewise.
31151 (vect_set_loop_masks_directly): Likewise.
31152 (vect_set_loop_condition_masked): Likewise.
31153 (vect_set_loop_condition_unmasked): New function, split out from
31154 slpeel_make_loop_iterate_ntimes.
31155 (slpeel_make_loop_iterate_ntimes): Rename to..
31156 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
31157 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
31158 (vect_do_peeling): Update call accordingly.
31159 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
31161 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
31162 mask_compare_type, can_fully_mask_p and fully_masked_p.
31163 (release_vec_loop_masks): New function.
31164 (_loop_vec_info): Use it to free the loop masks.
31165 (can_produce_all_loop_masks_p): New function.
31166 (vect_get_max_nscalars_per_iter): Likewise.
31167 (vect_verify_full_masking): Likewise.
31168 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
31169 retries, and free the mask rgroups before retrying. Check loop-wide
31170 reasons for disallowing fully-masked loops. Make the final decision
31171 about whether use a fully-masked loop or not.
31172 (vect_estimate_min_profitable_iters): Do not assume that peeling
31173 for the number of iterations will be needed for fully-masked loops.
31174 (vectorizable_reduction): Disable fully-masked loops.
31175 (vectorizable_live_operation): Likewise.
31176 (vect_halve_mask_nunits): New function.
31177 (vect_double_mask_nunits): Likewise.
31178 (vect_record_loop_mask): Likewise.
31179 (vect_get_loop_mask): Likewise.
31180 (vect_transform_loop): Handle the case in which the final loop
31181 iteration might handle a partial vector. Call vect_set_loop_condition
31182 instead of slpeel_make_loop_iterate_ntimes.
31183 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
31184 (check_load_store_masking): New function.
31185 (prepare_load_store_mask): Likewise.
31186 (vectorizable_store): Handle fully-masked loops.
31187 (vectorizable_load): Likewise.
31188 (supportable_widening_operation): Use vect_halve_mask_nunits for
31190 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
31191 (vect_gen_while): New function.
31192 * config/aarch64/aarch64.md (umax<mode>3): New expander.
31193 (aarch64_uqdec<mode>): New insn.
31195 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31196 Alan Hayward <alan.hayward@arm.com>
31197 David Sherwood <david.sherwood@arm.com>
31199 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
31200 (reduc_xor_scal_optab): New optabs.
31201 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
31202 (reduc_xor_scal_@var{m}): Document.
31203 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
31204 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
31205 internal functions.
31206 * fold-const-call.c (fold_const_call): Handle them.
31207 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
31208 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
31209 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
31210 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
31211 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
31212 (UNSPEC_XORV): New unspecs.
31213 (optab): Add entries for them.
31214 (BITWISEV): New int iterator.
31215 (bit_reduc_op): New int attributes.
31217 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31218 Alan Hayward <alan.hayward@arm.com>
31219 David Sherwood <david.sherwood@arm.com>
31221 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
31222 * internal-fn.def (VEC_SHL_INSERT): New internal function.
31223 * optabs.def (vec_shl_insert_optab): New optab.
31224 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
31225 (duplicate_and_interleave): Likewise.
31226 * tree-vect-loop.c: Include internal-fn.h.
31227 (neutral_op_for_slp_reduction): New function, split out from
31228 get_initial_defs_for_reduction.
31229 (get_initial_def_for_reduction): Handle option 2 for variable-length
31230 vectors by loading the neutral value into a vector and then shifting
31231 the initial value into element 0.
31232 (get_initial_defs_for_reduction): Replace the code argument with
31233 the neutral value calculated by neutral_op_for_slp_reduction.
31234 Use gimple_build_vector for constant-length vectors.
31235 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
31236 but the first group_size elements have a neutral value.
31237 Use duplicate_and_interleave otherwise.
31238 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
31239 Update call to get_initial_defs_for_reduction. Handle SLP
31240 reductions for variable-length vectors by creating one vector
31241 result for each scalar result, with the elements associated
31242 with other scalar results stubbed out with the neutral value.
31243 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
31244 Require IFN_VEC_SHL_INSERT for double reductions on
31245 variable-length vectors, or SLP reductions that have
31246 a neutral value. Require can_duplicate_and_interleave_p
31247 support for variable-length unchained SLP reductions if there
31248 is no neutral value, such as for MIN/MAX reductions. Also require
31249 the number of vector elements to be a multiple of the number of
31250 SLP statements when doing variable-length unchained SLP reductions.
31251 Update call to vect_create_epilog_for_reduction.
31252 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
31253 and remove initial values.
31254 (duplicate_and_interleave): Make public.
31255 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
31256 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
31258 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31259 Alan Hayward <alan.hayward@arm.com>
31260 David Sherwood <david.sherwood@arm.com>
31262 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
31263 (can_duplicate_and_interleave_p): New function.
31264 (vect_get_and_check_slp_defs): Take the vector of statements
31265 rather than just the current one. Remove excess parentheses.
31266 Restriction rejectinon of vect_constant_def and vect_external_def
31267 for variable-length vectors to boolean types, or types for which
31268 can_duplicate_and_interleave_p is false.
31269 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
31270 (duplicate_and_interleave): New function.
31271 (vect_get_constant_vectors): Use gimple_build_vector for
31272 constant-length vectors and suitable variable-length constant
31273 vectors. Use duplicate_and_interleave for other variable-length
31274 vectors. Don't defer the update when inserting new statements.
31276 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31277 Alan Hayward <alan.hayward@arm.com>
31278 David Sherwood <david.sherwood@arm.com>
31280 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
31281 min_profitable_iters doesn't go negative.
31283 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31284 Alan Hayward <alan.hayward@arm.com>
31285 David Sherwood <david.sherwood@arm.com>
31287 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
31288 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
31289 * optabs.def (vec_mask_load_lanes_optab): New optab.
31290 (vec_mask_store_lanes_optab): Likewise.
31291 * internal-fn.def (MASK_LOAD_LANES): New internal function.
31292 (MASK_STORE_LANES): Likewise.
31293 * internal-fn.c (mask_load_lanes_direct): New macro.
31294 (mask_store_lanes_direct): Likewise.
31295 (expand_mask_load_optab_fn): Handle masked operations.
31296 (expand_mask_load_lanes_optab_fn): New macro.
31297 (expand_mask_store_optab_fn): Handle masked operations.
31298 (expand_mask_store_lanes_optab_fn): New macro.
31299 (direct_mask_load_lanes_optab_supported_p): Likewise.
31300 (direct_mask_store_lanes_optab_supported_p): Likewise.
31301 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
31303 (vect_load_lanes_supported): Likewise.
31304 * tree-vect-data-refs.c (strip_conversion): New function.
31305 (can_group_stmts_p): Likewise.
31306 (vect_analyze_data_ref_accesses): Use it instead of checking
31307 for a pair of assignments.
31308 (vect_store_lanes_supported): Take a masked_p parameter.
31309 (vect_load_lanes_supported): Likewise.
31310 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
31311 vect_store_lanes_supported and vect_load_lanes_supported.
31312 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
31313 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
31314 parameter. Don't allow gaps for masked accesses.
31315 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
31316 and vect_load_lanes_supported.
31317 (get_load_store_type): Take a masked_p parameter and update
31318 call to get_group_load_store_type.
31319 (vectorizable_store): Update call to get_load_store_type.
31320 Handle IFN_MASK_STORE_LANES.
31321 (vectorizable_load): Update call to get_load_store_type.
31322 Handle IFN_MASK_LOAD_LANES.
31324 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31325 Alan Hayward <alan.hayward@arm.com>
31326 David Sherwood <david.sherwood@arm.com>
31328 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
31330 * config/aarch64/aarch64-protos.h
31331 (aarch64_sve_struct_memory_operand_p): Declare.
31332 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
31333 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
31334 (VPRED, vpred): Handle SVE structure modes.
31335 * config/aarch64/constraints.md (Utx): New constraint.
31336 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
31337 (aarch64_sve_struct_nonimmediate_operand): New predicates.
31338 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
31339 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
31340 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
31341 structure modes. Split into pieces after RA.
31342 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
31343 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
31345 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
31346 SVE structure modes.
31347 (aarch64_classify_address): Likewise.
31348 (sizetochar): Move earlier in file.
31349 (aarch64_print_operand): Handle SVE register lists.
31350 (aarch64_array_mode): New function.
31351 (aarch64_sve_struct_memory_operand_p): Likewise.
31352 (TARGET_ARRAY_MODE): Redefine.
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 * target.def (array_mode): New target hook.
31359 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
31360 * doc/tm.texi: Regenerate.
31361 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
31362 * hooks.c (hook_optmode_mode_uhwi_none): New function.
31363 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
31364 targetm.array_mode.
31365 * stor-layout.c (mode_for_array): Likewise. Support polynomial
31368 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31369 Alan Hayward <alan.hayward@arm.com>
31370 David Sherwood <david.sherwood@arm.com>
31372 * fold-const.c (fold_binary_loc): Check the argument types
31373 rather than the result type when testing for a vector operation.
31375 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31377 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
31378 * doc/tm.texi: Regenerate.
31380 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31381 Alan Hayward <alan.hayward@arm.com>
31382 David Sherwood <david.sherwood@arm.com>
31384 * doc/invoke.texi (-msve-vector-bits=): Document new option.
31385 (sve): Document new AArch64 extension.
31386 * doc/md.texi (w): Extend the description of the AArch64
31387 constraint to include SVE vectors.
31388 (Upl, Upa): Document new AArch64 predicate constraints.
31389 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
31391 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
31392 (msve-vector-bits=): New option.
31393 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
31394 SVE when these are disabled.
31395 (sve): New extension.
31396 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
31397 modes. Adjust their number of units based on aarch64_sve_vg.
31398 (MAX_BITSIZE_MODE_ANY_MODE): Define.
31399 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
31400 aarch64_addr_query_type.
31401 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
31402 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
31403 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
31404 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
31405 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
31406 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
31407 (aarch64_simd_imm_zero_p): Delete.
31408 (aarch64_check_zero_based_sve_index_immediate): Declare.
31409 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31410 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31411 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31412 (aarch64_sve_float_mul_immediate_p): Likewise.
31413 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31414 rather than an rtx.
31415 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
31416 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
31417 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
31418 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
31419 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
31420 (aarch64_regmode_natural_size): Likewise.
31421 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
31422 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
31424 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
31425 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
31426 for VG and the SVE predicate registers.
31427 (V_ALIASES): Add a "z"-prefixed alias.
31428 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
31429 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
31430 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
31431 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
31432 (REG_CLASS_NAMES): Add entries for them.
31433 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
31434 and the predicate registers.
31435 (aarch64_sve_vg): Declare.
31436 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
31437 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
31438 (REGMODE_NATURAL_SIZE): Define.
31439 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
31441 * config/aarch64/aarch64.c: Include cfgrtl.h.
31442 (simd_immediate_info): Add a constructor for series vectors,
31443 and an associated step field.
31444 (aarch64_sve_vg): New variable.
31445 (aarch64_dbx_register_number): Handle VG and the predicate registers.
31446 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
31447 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
31448 (VEC_ANY_DATA, VEC_STRUCT): New constants.
31449 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
31450 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
31451 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
31452 (aarch64_get_mask_mode): New functions.
31453 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
31454 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
31455 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
31456 predicate modes and predicate registers. Explicitly restrict
31457 GPRs to modes of 16 bytes or smaller. Only allow FP registers
31458 to store a vector mode if it is recognized by
31459 aarch64_classify_vector_mode.
31460 (aarch64_regmode_natural_size): New function.
31461 (aarch64_hard_regno_caller_save_mode): Return the original mode
31463 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
31464 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
31465 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
31466 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
31468 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
31469 does not overlap dest if the function is frame-related. Handle
31471 (aarch64_split_add_offset): New function.
31472 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
31473 them aarch64_add_offset.
31474 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
31475 and update call to aarch64_sub_sp.
31476 (aarch64_add_cfa_expression): New function.
31477 (aarch64_expand_prologue): Pass extra temporary registers to the
31478 functions above. Handle the case in which we need to emit new
31479 DW_CFA_expressions for registers that were originally saved
31480 relative to the stack pointer, but now have to be expressed
31481 relative to the frame pointer.
31482 (aarch64_output_mi_thunk): Pass extra temporary registers to the
31484 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
31485 IP0 and IP1 values for SVE frames.
31486 (aarch64_expand_vec_series): New function.
31487 (aarch64_expand_sve_widened_duplicate): Likewise.
31488 (aarch64_expand_sve_const_vector): Likewise.
31489 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
31490 Handle SVE constants. Use emit_move_insn to move a force_const_mem
31491 into the register, rather than emitting a SET directly.
31492 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
31493 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
31494 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
31495 (offset_9bit_signed_scaled_p): New functions.
31496 (aarch64_replicate_bitmask_imm): New function.
31497 (aarch64_bitmask_imm): Use it.
31498 (aarch64_cannot_force_const_mem): Reject expressions involving
31499 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
31500 (aarch64_classify_index): Handle SVE indices, by requiring
31501 a plain register index with a scale that matches the element size.
31502 (aarch64_classify_address): Handle SVE addresses. Assert that
31503 the mode of the address is VOIDmode or an integer mode.
31504 Update call to aarch64_classify_symbol.
31505 (aarch64_classify_symbolic_expression): Update call to
31506 aarch64_classify_symbol.
31507 (aarch64_const_vec_all_in_range_p): New function.
31508 (aarch64_print_vector_float_operand): Likewise.
31509 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
31510 "vN" for FP registers with SVE modes. Handle (const ...) vectors
31511 and the FP immediates 1.0 and 0.5.
31512 (aarch64_print_address_internal): Handle SVE addresses.
31513 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
31514 (aarch64_regno_regclass): Handle predicate registers.
31515 (aarch64_secondary_reload): Handle big-endian reloads of SVE
31517 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
31518 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
31519 (aarch64_convert_sve_vector_bits): New function.
31520 (aarch64_override_options): Use it to handle -msve-vector-bits=.
31521 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31522 rather than an rtx.
31523 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
31524 Handle SVE vector and predicate modes. Accept VL-based constants
31525 that need only one temporary register, and VL offsets that require
31526 no temporary registers.
31527 (aarch64_conditional_register_usage): Mark the predicate registers
31528 as fixed if SVE isn't available.
31529 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
31530 Return true for SVE vector and predicate modes.
31531 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
31532 rather than an unsigned int. Handle SVE modes.
31533 (aarch64_preferred_simd_mode): Update call accordingly. Handle
31535 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
31537 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31538 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31539 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31540 (aarch64_sve_float_mul_immediate_p): New functions.
31541 (aarch64_sve_valid_immediate): New function.
31542 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
31543 Explicitly reject structure modes. Check for INDEX constants.
31544 Handle PTRUE and PFALSE constants.
31545 (aarch64_check_zero_based_sve_index_immediate): New function.
31546 (aarch64_simd_imm_zero_p): Delete.
31547 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
31548 vector modes. Accept constants in the range of CNT[BHWD].
31549 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
31550 ask for an Advanced SIMD mode.
31551 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
31552 (aarch64_simd_vector_alignment): Handle SVE predicates.
31553 (aarch64_vectorize_preferred_vector_alignment): New function.
31554 (aarch64_simd_vector_alignment_reachable): Use it instead of
31556 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
31557 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
31559 (MAX_VECT_LEN): Delete.
31560 (expand_vec_perm_d): Add a vec_flags field.
31561 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
31562 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
31563 (aarch64_evpc_ext): Don't apply a big-endian lane correction
31565 (aarch64_evpc_rev): Rename to...
31566 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
31567 (aarch64_evpc_rev_global): New function.
31568 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
31569 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
31571 (aarch64_evpc_sve_tbl): New function.
31572 (aarch64_expand_vec_perm_const_1): Update after rename of
31573 aarch64_evpc_rev. Handle SVE permutes too, trying
31574 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
31575 than aarch64_evpc_tbl.
31576 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
31577 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
31578 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
31579 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
31580 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
31581 (aarch64_expand_sve_vcond): New functions.
31582 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
31583 of aarch64_vector_mode_p.
31584 (aarch64_dwarf_poly_indeterminate_value): New function.
31585 (aarch64_compute_pressure_classes): Likewise.
31586 (aarch64_can_change_mode_class): Likewise.
31587 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
31588 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
31589 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
31590 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
31591 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
31592 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
31593 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
31594 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
31596 (Dn, Dl, Dr): Accept const as well as const_vector.
31597 (Dz): Likewise. Compare against CONST0_RTX.
31598 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
31599 of "vector" where appropriate.
31600 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
31601 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
31602 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
31603 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
31604 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
31605 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
31606 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
31607 (v_int_equiv): Extend to SVE modes.
31608 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
31610 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
31611 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
31612 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
31613 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
31614 (SVE_COND_FP_CMP): New int iterators.
31615 (perm_hilo): Handle the new unpack unspecs.
31616 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
31618 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
31619 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
31620 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
31621 (aarch64_equality_operator, aarch64_constant_vector_operand)
31622 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
31623 (aarch64_sve_nonimmediate_operand): Likewise.
31624 (aarch64_sve_general_operand): Likewise.
31625 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
31626 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
31627 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
31628 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
31629 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
31630 (aarch64_sve_float_arith_immediate): Likewise.
31631 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
31632 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
31633 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
31634 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
31635 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
31636 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
31637 (aarch64_sve_float_arith_operand): Likewise.
31638 (aarch64_sve_float_arith_with_sub_operand): Likewise.
31639 (aarch64_sve_float_mul_operand): Likewise.
31640 (aarch64_sve_vec_perm_operand): Likewise.
31641 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
31642 (aarch64_mov_operand): Accept const_poly_int and const_vector.
31643 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
31644 as well as const_vector.
31645 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
31646 in file. Use CONST0_RTX and CONSTM1_RTX.
31647 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
31648 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
31649 Use aarch64_simd_imm_zero.
31650 * config/aarch64/aarch64-sve.md: New file.
31651 * config/aarch64/aarch64.md: Include it.
31652 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
31653 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
31654 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
31655 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
31656 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
31657 (sve): New attribute.
31658 (enabled): Disable instructions with the sve attribute unless
31660 (movqi, movhi): Pass CONST_POLY_INT operaneds through
31661 aarch64_expand_mov_immediate.
31662 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
31663 CNT[BHSD] immediates.
31664 (movti): Split CONST_POLY_INT moves into two halves.
31665 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
31666 Split additions that need a temporary here if the destination
31667 is the stack pointer.
31668 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
31669 (*add<mode>3_poly_1): New instruction.
31670 (set_clobber_cc): New expander.
31672 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31674 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
31675 parameter and use it instead of GET_MODE_SIZE (innermode). Use
31676 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
31677 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
31678 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
31679 Change innermode from fixed_mode_size to machine_mode.
31680 (simplify_subreg): Update call accordingly. Handle a constant-sized
31681 subreg of a variable-length CONST_VECTOR.
31683 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
31684 Alan Hayward <alan.hayward@arm.com>
31685 David Sherwood <david.sherwood@arm.com>
31687 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
31688 (add_offset_to_base): New function, split out from...
31689 (create_mem_ref): ...here. When handling a scale other than 1,
31690 check first whether the address is valid without the offset.
31691 Add it into the base if so, leaving the index and scale as-is.
31693 2018-01-12 Jakub Jelinek <jakub@redhat.com>
31696 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
31697 fold_for_warn before checking if arg2 is INTEGER_CST.
31699 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
31701 * config/rs6000/predicates.md (load_multiple_operation): Delete.
31702 (store_multiple_operation): Delete.
31703 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
31704 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
31705 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
31706 guarded by TARGET_STRING.
31707 (rs6000_output_load_multiple): Delete.
31708 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
31709 OPTION_MASK_STRING / TARGET_STRING handling.
31710 (print_operand) <'N', 'O'>: Add comment that these are unused now.
31711 (const rs6000_opt_masks) <"string">: Change mask to 0.
31712 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
31713 (MASK_STRING): Delete.
31714 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
31716 (load_multiple): Delete.
31723 (store_multiple): Delete.
31730 (movmemsi_8reg): Delete.
31731 (corresponding unnamed define_insn): Delete.
31732 (movmemsi_6reg): Delete.
31733 (corresponding unnamed define_insn): Delete.
31734 (movmemsi_4reg): Delete.
31735 (corresponding unnamed define_insn): Delete.
31736 (movmemsi_2reg): Delete.
31737 (corresponding unnamed define_insn): Delete.
31738 (movmemsi_1reg): Delete.
31739 (corresponding unnamed define_insn): Delete.
31740 * config/rs6000/rs6000.opt (mno-string): New.
31741 (mstring): Replace by deprecation warning stub.
31742 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
31744 2018-01-12 Jakub Jelinek <jakub@redhat.com>
31746 * regrename.c (regrename_do_replace): If replacing the same
31747 reg multiple times, try to reuse last created gen_raw_REG.
31750 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
31751 main to workaround a bug in GDB.
31753 2018-01-12 Tom de Vries <tom@codesourcery.com>
31756 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
31758 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
31760 PR rtl-optimization/80481
31761 * ira-color.c (get_cap_member): New function.
31762 (allocnos_conflict_by_live_ranges_p): Use it.
31763 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
31764 (setup_slot_coalesced_allocno_live_ranges): Ditto.
31766 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
31769 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
31770 (*saddl_se_1): Ditto.
31771 (*ssubsi_1): Ditto.
31772 (*ssubl_se_1): Ditto.
31774 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31776 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
31777 rather than wi::to_widest for DR_INITs.
31778 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
31779 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
31780 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
31782 (vect_analyze_group_access_1): Note that here.
31784 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31786 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
31787 polynomial type sizes.
31789 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31791 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
31792 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
31793 (gimple_add_tmp_var): Likewise.
31795 2018-01-12 Martin Liska <mliska@suse.cz>
31797 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
31798 (gimple_alloc_sizes): Likewise.
31799 (dump_gimple_statistics): Use PRIu64 in printf format.
31800 * gimple.h: Change uint64_t to int.
31802 2018-01-12 Martin Liska <mliska@suse.cz>
31804 * tree-core.h: Use uint64_t instead of int.
31805 * tree.c (tree_node_counts): Likewise.
31806 (tree_node_sizes): Likewise.
31807 (dump_tree_statistics): Use PRIu64 in printf format.
31809 2018-01-12 Martin Liska <mliska@suse.cz>
31811 * Makefile.in: As qsort_chk is implemented in vec.c, add
31812 vec.o to linkage of gencfn-macros.
31813 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
31814 passing the info to record_node_allocation_statistics.
31815 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
31817 * ggc-common.c (struct ggc_usage): Add operator== and use
31818 it in operator< and compare function.
31819 * mem-stats.h (struct mem_usage): Likewise.
31820 * vec.c (struct vec_usage): Remove operator< and compare
31821 function. Can be simply inherited.
31823 2018-01-12 Martin Jambor <mjambor@suse.cz>
31826 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
31827 * tree-ssa-math-opts.c: Include domwalk.h.
31828 (convert_mult_to_fma_1): New function.
31829 (fma_transformation_info): New type.
31830 (fma_deferring_state): Likewise.
31831 (cancel_fma_deferring): New function.
31832 (result_of_phi): Likewise.
31833 (last_fma_candidate_feeds_initial_phi): Likewise.
31834 (convert_mult_to_fma): Added deferring logic, split actual
31835 transformation to convert_mult_to_fma_1.
31836 (math_opts_dom_walker): New type.
31837 (math_opts_dom_walker::after_dom_children): New method, body moved
31838 here from pass_optimize_widening_mul::execute, added deferring logic
31840 (pass_optimize_widening_mul::execute): Moved most of code to
31841 math_opts_dom_walker::after_dom_children.
31842 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
31843 * config/i386/i386.c (ix86_option_override_internal): Added
31844 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
31846 2018-01-12 Richard Biener <rguenther@suse.de>
31849 * dwarf2out.c (gen_variable_die): Do not reset old_die for
31850 inline instance vars.
31852 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
31855 * config/rx/rx.c (rx_is_restricted_memory_address):
31856 Handle SUBREG case.
31858 2018-01-12 Richard Biener <rguenther@suse.de>
31860 PR tree-optimization/80846
31861 * target.def (split_reduction): New target hook.
31862 * targhooks.c (default_split_reduction): New function.
31863 * targhooks.h (default_split_reduction): Declare.
31864 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
31865 target requests first reduce vectors by combining low and high
31867 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
31868 (get_vectype_for_scalar_type_and_size): Export.
31869 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
31870 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
31871 * doc/tm.texi: Regenerate.
31872 * config/i386/i386.c (ix86_split_reduction): Implement
31873 TARGET_VECTORIZE_SPLIT_REDUCTION.
31875 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
31878 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
31879 in PIC mode except for TARGET_VXWORKS_RTP.
31880 * config/sparc/sparc.c: Include cfgrtl.h.
31881 (TARGET_INIT_PIC_REG): Define.
31882 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
31883 (sparc_pic_register_p): New predicate.
31884 (sparc_legitimate_address_p): Use it.
31885 (sparc_legitimize_pic_address): Likewise.
31886 (sparc_delegitimize_address): Likewise.
31887 (sparc_mode_dependent_address_p): Likewise.
31888 (gen_load_pcrel_sym): Remove 4th parameter.
31889 (load_got_register): Adjust call to above. Remove obsolete stuff.
31890 (sparc_expand_prologue): Do not call load_got_register here.
31891 (sparc_flat_expand_prologue): Likewise.
31892 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
31893 (sparc_use_pseudo_pic_reg): New function.
31894 (sparc_init_pic_reg): Likewise.
31895 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
31896 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
31898 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
31900 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
31901 Add item for branch_cost.
31903 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
31905 PR rtl-optimization/83565
31906 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
31907 not extend the result to a larger mode for rotate operations.
31908 (num_sign_bit_copies1): Likewise.
31910 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31913 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
31915 Use values-Xc.o for -pedantic.
31916 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
31918 2018-01-12 Martin Liska <mliska@suse.cz>
31921 * ipa-devirt.c (final_warning_record::grow_type_warnings):
31923 (possible_polymorphic_call_targets): Use it.
31924 (ipa_devirt): Likewise.
31926 2018-01-12 Martin Liska <mliska@suse.cz>
31928 * profile-count.h (enum profile_quality): Use 0 as invalid
31929 enum value of profile_quality.
31931 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
31933 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
31934 -mext-string options.
31936 2018-01-12 Richard Biener <rguenther@suse.de>
31938 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
31939 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
31940 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
31942 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
31944 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
31946 * configure.ac (--with-long-double-format): Add support for the
31947 configuration option to change the default long double format on
31949 * config.gcc (powerpc*-linux*-*): Likewise.
31950 * configure: Regenerate.
31951 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
31952 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
31953 used without modification.
31955 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31957 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
31958 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
31959 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
31960 MISC_BUILTIN_SPEC_BARRIER.
31961 (rs6000_init_builtins): Likewise.
31962 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
31964 (speculation_barrier): New define_insn.
31965 * doc/extend.texi: Document __builtin_speculation_barrier.
31967 2018-01-11 Jakub Jelinek <jakub@redhat.com>
31970 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
31971 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
31972 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
31974 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
31975 integral modes instead of "ss" and "sd".
31976 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
31977 vectors with 32-bit and 64-bit elements.
31978 (vecdupssescalarmodesuffix): New mode attribute.
31979 (vec_dup<mode>): Use it.
31981 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
31984 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
31985 frame if argument is passed on stack.
31987 2018-01-11 Jakub Jelinek <jakub@redhat.com>
31990 * ree.c (combine_reaching_defs): Optimize also
31991 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
31992 reg2=any_extend(exp); reg1=reg2;, formatting fix.
31994 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
31996 PR middle-end/83189
31997 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
31999 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
32001 PR middle-end/83718
32002 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
32003 after they are computed.
32005 2018-01-11 Bin Cheng <bin.cheng@arm.com>
32007 PR tree-optimization/83695
32008 * gimple-loop-linterchange.cc
32009 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
32010 reset cached scev information after interchange.
32011 (pass_linterchange::execute): Remove call to scev_reset_htab.
32013 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32015 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
32016 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
32017 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
32018 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
32019 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
32020 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
32021 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
32022 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
32023 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
32024 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
32025 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
32026 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
32027 (V_lane_reg): Likewise.
32028 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
32030 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
32031 (vfmal_lane_low<mode>_intrinsic,
32032 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
32033 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
32034 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
32035 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
32036 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
32037 vfmsl_lane_high<mode>_intrinsic): New define_insns.
32039 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32041 * config/arm/arm-cpus.in (fp16fml): New feature.
32042 (ALL_SIMD): Add fp16fml.
32043 (armv8.2-a): Add fp16fml as an option.
32044 (armv8.3-a): Likewise.
32045 (armv8.4-a): Add fp16fml as part of fp16.
32046 * config/arm/arm.h (TARGET_FP16FML): Define.
32047 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
32049 * config/arm/arm-modes.def (V2HF): Define.
32050 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
32051 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
32052 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
32053 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
32054 vfmsl_low, vfmsl_high): New set of builtins.
32055 * config/arm/iterators.md (PLUSMINUS): New code iterator.
32056 (vfml_op): New code attribute.
32057 (VFMLHALVES): New int iterator.
32058 (VFML, VFMLSEL): New mode attributes.
32059 (V_reg): Define mapping for V2HF.
32060 (V_hi, V_lo): New mode attributes.
32061 (VF_constraint): Likewise.
32062 (vfml_half, vfml_half_selector): New int attributes.
32063 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
32065 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
32066 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
32068 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
32069 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
32070 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
32071 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
32073 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
32074 Document new effective target and option set.
32076 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32078 * config/arm/arm-cpus.in (armv8_4): New feature.
32079 (ARMv8_4a): New fgroup.
32080 (armv8.4-a): New arch.
32081 * config/arm/arm-tables.opt: Regenerate.
32082 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
32083 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
32084 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
32085 Add matching rules for -march=armv8.4-a and extensions.
32086 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
32088 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
32091 * config/rx/rx.md (BW): New mode attribute.
32092 (sync_lock_test_and_setsi): Add mode suffix to insn output.
32094 2018-01-11 Richard Biener <rguenther@suse.de>
32096 PR tree-optimization/83435
32097 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
32098 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
32099 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
32101 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32102 Alan Hayward <alan.hayward@arm.com>
32103 David Sherwood <david.sherwood@arm.com>
32105 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
32107 (aarch64_classify_address): Initialize it. Track polynomial offsets.
32108 (aarch64_print_address_internal): Use it to check for a zero offset.
32110 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32111 Alan Hayward <alan.hayward@arm.com>
32112 David Sherwood <david.sherwood@arm.com>
32114 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
32115 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
32116 Return a poly_int64 rather than a HOST_WIDE_INT.
32117 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
32118 rather than a HOST_WIDE_INT.
32119 * config/aarch64/aarch64.h (aarch64_frame): Protect with
32120 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
32121 hard_fp_offset, frame_size, initial_adjust, callee_offset and
32122 final_offset from HOST_WIDE_INT to poly_int64.
32123 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
32124 to_constant when getting the number of units in an Advanced SIMD
32126 (aarch64_builtin_vectorized_function): Check for a constant number
32128 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
32130 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
32131 attribute instead of GET_MODE_NUNITS.
32132 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
32133 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
32134 GET_MODE_SIZE for fixed-size registers.
32135 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
32136 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
32137 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
32138 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
32139 (aarch64_print_operand, aarch64_print_address_internal)
32140 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
32141 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
32142 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
32143 Handle polynomial GET_MODE_SIZE.
32144 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
32145 wider than SImode without modification.
32146 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
32147 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
32148 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
32149 passing and returning SVE modes.
32150 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
32151 rather than GEN_INT.
32152 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
32153 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
32154 (aarch64_allocate_and_probe_stack_space): Likewise.
32155 (aarch64_layout_frame): Cope with polynomial offsets.
32156 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
32157 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
32158 polynomial offsets.
32159 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
32160 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
32161 poly_int64 rather than a HOST_WIDE_INT.
32162 (aarch64_get_separate_components, aarch64_process_components)
32163 (aarch64_expand_prologue, aarch64_expand_epilogue)
32164 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
32165 (aarch64_anchor_offset): New function, split out from...
32166 (aarch64_legitimize_address): ...here.
32167 (aarch64_builtin_vectorization_cost): Handle polynomial
32168 TYPE_VECTOR_SUBPARTS.
32169 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
32171 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
32172 number of elements from the PARALLEL rather than the mode.
32173 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
32174 rather than GET_MODE_BITSIZE.
32175 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
32176 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
32177 (aarch64_expand_vec_perm_const_1): Handle polynomial
32178 d->perm.length () and d->perm elements.
32179 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
32180 Apply to_constant to d->perm elements.
32181 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
32182 polynomial CONST_VECTOR_NUNITS.
32183 (aarch64_move_pointer): Take amount as a poly_int64 rather
32185 (aarch64_progress_pointer): Avoid temporary variable.
32186 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
32187 the mode attribute instead of GET_MODE.
32189 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32190 Alan Hayward <alan.hayward@arm.com>
32191 David Sherwood <david.sherwood@arm.com>
32193 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
32194 x exists before using it.
32195 (aarch64_add_constant_internal): Rename to...
32196 (aarch64_add_offset_1): ...this. Replace regnum with separate
32197 src and dest rtxes. Handle the case in which they're different,
32198 including when the offset is zero. Replace scratchreg with an rtx.
32199 Use 2 additions if there is no spare register into which we can
32200 move a 16-bit constant.
32201 (aarch64_add_constant): Delete.
32202 (aarch64_add_offset): Replace reg with separate src and dest
32203 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
32204 Use aarch64_add_offset_1.
32205 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
32206 an rtx rather than an int. Take the delta as a poly_int64
32207 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
32208 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
32209 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
32210 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
32211 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
32212 and aarch64_add_sp.
32213 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
32214 aarch64_add_constant.
32216 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32218 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
32219 Use scalar_float_mode.
32221 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32223 * config/aarch64/aarch64-simd.md
32224 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
32225 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
32226 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
32227 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
32228 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
32229 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
32230 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
32231 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
32232 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
32233 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
32235 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
32238 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
32239 targ_options->x_arm_arch_string is non NULL.
32241 2018-01-11 Tamar Christina <tamar.christina@arm.com>
32243 * config/aarch64/aarch64.h
32244 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
32246 2018-01-11 Sudakshina Das <sudi.das@arm.com>
32249 * expmed.c (emit_store_flag_force): Swap if const op0
32250 and change VOIDmode to mode of op0.
32252 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
32254 PR rtl-optimization/83761
32255 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
32256 than bytes to mode_for_size.
32258 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
32260 PR middle-end/83189
32261 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
32262 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
32265 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
32267 PR middle-end/83575
32268 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
32269 when in layout mode.
32270 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
32271 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
32274 2018-01-10 Michael Collison <michael.collison@arm.com>
32276 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
32277 * config/aarch64/aarch64-option-extension.def: Add
32278 AARCH64_OPT_EXTENSION of 'fp16fml'.
32279 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32280 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
32281 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
32282 * config/aarch64/constraints.md (Ui7): New constraint.
32283 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
32284 (VFMLA_SEL_W): Ditto.
32287 (VFMLA16_LOW): New int iterator.
32288 (VFMLA16_HIGH): Ditto.
32289 (UNSPEC_FMLAL): New unspec.
32290 (UNSPEC_FMLSL): Ditto.
32291 (UNSPEC_FMLAL2): Ditto.
32292 (UNSPEC_FMLSL2): Ditto.
32293 (f16mac): New code attribute.
32294 * config/aarch64/aarch64-simd-builtins.def
32295 (aarch64_fmlal_lowv2sf): Ditto.
32296 (aarch64_fmlsl_lowv2sf): Ditto.
32297 (aarch64_fmlalq_lowv4sf): Ditto.
32298 (aarch64_fmlslq_lowv4sf): Ditto.
32299 (aarch64_fmlal_highv2sf): Ditto.
32300 (aarch64_fmlsl_highv2sf): Ditto.
32301 (aarch64_fmlalq_highv4sf): Ditto.
32302 (aarch64_fmlslq_highv4sf): Ditto.
32303 (aarch64_fmlal_lane_lowv2sf): Ditto.
32304 (aarch64_fmlsl_lane_lowv2sf): Ditto.
32305 (aarch64_fmlal_laneq_lowv2sf): Ditto.
32306 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
32307 (aarch64_fmlalq_lane_lowv4sf): Ditto.
32308 (aarch64_fmlsl_lane_lowv4sf): Ditto.
32309 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
32310 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
32311 (aarch64_fmlal_lane_highv2sf): Ditto.
32312 (aarch64_fmlsl_lane_highv2sf): Ditto.
32313 (aarch64_fmlal_laneq_highv2sf): Ditto.
32314 (aarch64_fmlsl_laneq_highv2sf): Ditto.
32315 (aarch64_fmlalq_lane_highv4sf): Ditto.
32316 (aarch64_fmlsl_lane_highv4sf): Ditto.
32317 (aarch64_fmlalq_laneq_highv4sf): Ditto.
32318 (aarch64_fmlsl_laneq_highv4sf): Ditto.
32319 * config/aarch64/aarch64-simd.md:
32320 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
32321 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32322 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
32323 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32324 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
32325 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
32326 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
32327 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
32328 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
32329 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
32330 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
32331 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
32332 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
32333 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
32334 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
32335 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
32336 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
32337 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
32338 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
32339 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
32340 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
32341 (vfmlsl_low_u32): Ditto.
32342 (vfmlalq_low_u32): Ditto.
32343 (vfmlslq_low_u32): Ditto.
32344 (vfmlal_high_u32): Ditto.
32345 (vfmlsl_high_u32): Ditto.
32346 (vfmlalq_high_u32): Ditto.
32347 (vfmlslq_high_u32): Ditto.
32348 (vfmlal_lane_low_u32): Ditto.
32349 (vfmlsl_lane_low_u32): Ditto.
32350 (vfmlal_laneq_low_u32): Ditto.
32351 (vfmlsl_laneq_low_u32): Ditto.
32352 (vfmlalq_lane_low_u32): Ditto.
32353 (vfmlslq_lane_low_u32): Ditto.
32354 (vfmlalq_laneq_low_u32): Ditto.
32355 (vfmlslq_laneq_low_u32): Ditto.
32356 (vfmlal_lane_high_u32): Ditto.
32357 (vfmlsl_lane_high_u32): Ditto.
32358 (vfmlal_laneq_high_u32): Ditto.
32359 (vfmlsl_laneq_high_u32): Ditto.
32360 (vfmlalq_lane_high_u32): Ditto.
32361 (vfmlslq_lane_high_u32): Ditto.
32362 (vfmlalq_laneq_high_u32): Ditto.
32363 (vfmlslq_laneq_high_u32): Ditto.
32364 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
32365 (AARCH64_FL_FOR_ARCH8_4): New.
32366 (AARCH64_ISA_F16FML): New ISA flag.
32367 (TARGET_F16FML): New feature flag for fp16fml.
32368 (doc/invoke.texi): Document new fp16fml option.
32370 2018-01-10 Michael Collison <michael.collison@arm.com>
32372 * config/aarch64/aarch64-builtins.c:
32373 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
32374 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32375 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
32376 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
32377 (AARCH64_ISA_SHA3): New ISA flag.
32378 (TARGET_SHA3): New feature flag for sha3.
32379 * config/aarch64/iterators.md (sha512_op): New int attribute.
32380 (CRYPTO_SHA512): New int iterator.
32381 (UNSPEC_SHA512H): New unspec.
32382 (UNSPEC_SHA512H2): Ditto.
32383 (UNSPEC_SHA512SU0): Ditto.
32384 (UNSPEC_SHA512SU1): Ditto.
32385 * config/aarch64/aarch64-simd-builtins.def
32386 (aarch64_crypto_sha512hqv2di): New builtin.
32387 (aarch64_crypto_sha512h2qv2di): Ditto.
32388 (aarch64_crypto_sha512su0qv2di): Ditto.
32389 (aarch64_crypto_sha512su1qv2di): Ditto.
32390 (aarch64_eor3qv8hi): Ditto.
32391 (aarch64_rax1qv2di): Ditto.
32392 (aarch64_xarqv2di): Ditto.
32393 (aarch64_bcaxqv8hi): Ditto.
32394 * config/aarch64/aarch64-simd.md:
32395 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
32396 (aarch64_crypto_sha512su0qv2di): Ditto.
32397 (aarch64_crypto_sha512su1qv2di): Ditto.
32398 (aarch64_eor3qv8hi): Ditto.
32399 (aarch64_rax1qv2di): Ditto.
32400 (aarch64_xarqv2di): Ditto.
32401 (aarch64_bcaxqv8hi): Ditto.
32402 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
32403 (vsha512h2q_u64): Ditto.
32404 (vsha512su0q_u64): Ditto.
32405 (vsha512su1q_u64): Ditto.
32406 (veor3q_u16): Ditto.
32407 (vrax1q_u64): Ditto.
32408 (vxarq_u64): Ditto.
32409 (vbcaxq_u16): Ditto.
32410 * config/arm/types.md (crypto_sha512): New type attribute.
32411 (crypto_sha3): Ditto.
32412 (doc/invoke.texi): Document new sha3 option.
32414 2018-01-10 Michael Collison <michael.collison@arm.com>
32416 * config/aarch64/aarch64-builtins.c:
32417 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
32418 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32419 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
32420 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
32421 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
32422 (AARCH64_ISA_SM4): New ISA flag.
32423 (TARGET_SM4): New feature flag for sm4.
32424 * config/aarch64/aarch64-simd-builtins.def
32425 (aarch64_sm3ss1qv4si): Ditto.
32426 (aarch64_sm3tt1aq4si): Ditto.
32427 (aarch64_sm3tt1bq4si): Ditto.
32428 (aarch64_sm3tt2aq4si): Ditto.
32429 (aarch64_sm3tt2bq4si): Ditto.
32430 (aarch64_sm3partw1qv4si): Ditto.
32431 (aarch64_sm3partw2qv4si): Ditto.
32432 (aarch64_sm4eqv4si): Ditto.
32433 (aarch64_sm4ekeyqv4si): Ditto.
32434 * config/aarch64/aarch64-simd.md:
32435 (aarch64_sm3ss1qv4si): Ditto.
32436 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
32437 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
32438 (aarch64_sm4eqv4si): Ditto.
32439 (aarch64_sm4ekeyqv4si): Ditto.
32440 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
32441 (sm3part_op): Ditto.
32442 (CRYPTO_SM3TT): Ditto.
32443 (CRYPTO_SM3PART): Ditto.
32444 (UNSPEC_SM3SS1): New unspec.
32445 (UNSPEC_SM3TT1A): Ditto.
32446 (UNSPEC_SM3TT1B): Ditto.
32447 (UNSPEC_SM3TT2A): Ditto.
32448 (UNSPEC_SM3TT2B): Ditto.
32449 (UNSPEC_SM3PARTW1): Ditto.
32450 (UNSPEC_SM3PARTW2): Ditto.
32451 (UNSPEC_SM4E): Ditto.
32452 (UNSPEC_SM4EKEY): Ditto.
32453 * config/aarch64/constraints.md (Ui2): New constraint.
32454 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
32455 * config/arm/types.md (crypto_sm3): New type attribute.
32456 (crypto_sm4): Ditto.
32457 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
32458 (vsm3tt1aq_u32): Ditto.
32459 (vsm3tt1bq_u32): Ditto.
32460 (vsm3tt2aq_u32): Ditto.
32461 (vsm3tt2bq_u32): Ditto.
32462 (vsm3partw1q_u32): Ditto.
32463 (vsm3partw2q_u32): Ditto.
32464 (vsm4eq_u32): Ditto.
32465 (vsm4ekeyq_u32): Ditto.
32466 (doc/invoke.texi): Document new sm4 option.
32468 2018-01-10 Michael Collison <michael.collison@arm.com>
32470 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
32471 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
32472 (AARCH64_FL_FOR_ARCH8_4): New.
32473 (AARCH64_FL_V8_4): New flag.
32474 (doc/invoke.texi): Document new armv8.4-a option.
32476 2018-01-10 Michael Collison <michael.collison@arm.com>
32478 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32479 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
32480 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
32481 * config/aarch64/aarch64-option-extension.def: Add
32482 AARCH64_OPT_EXTENSION of 'sha2'.
32483 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
32484 (crypto): Disable sha2 and aes if crypto disabled.
32485 (crypto): Enable aes and sha2 if enabled.
32486 (simd): Disable sha2 and aes if simd disabled.
32487 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
32489 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
32490 (TARGET_SHA2): New feature flag for sha2.
32491 (TARGET_AES): New feature flag for aes.
32492 * config/aarch64/aarch64-simd.md:
32493 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
32494 conditional on TARGET_AES.
32495 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
32496 (aarch64_crypto_sha1hsi): Make pattern conditional
32498 (aarch64_crypto_sha1hv4si): Ditto.
32499 (aarch64_be_crypto_sha1hv4si): Ditto.
32500 (aarch64_crypto_sha1su1v4si): Ditto.
32501 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
32502 (aarch64_crypto_sha1su0v4si): Ditto.
32503 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
32504 (aarch64_crypto_sha256su0v4si): Ditto.
32505 (aarch64_crypto_sha256su1v4si): Ditto.
32506 (doc/invoke.texi): Document new aes and sha2 options.
32508 2018-01-10 Martin Sebor <msebor@redhat.com>
32510 PR tree-optimization/83781
32511 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
32514 2018-01-11 Martin Sebor <msebor@gmail.com>
32515 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
32517 PR tree-optimization/83501
32518 PR tree-optimization/81703
32520 * tree-ssa-strlen.c (get_string_cst): Rename...
32521 (get_string_len): ...to this. Handle global constants.
32522 (handle_char_store): Adjust.
32524 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
32525 Jim Wilson <jimw@sifive.com>
32527 * config/riscv/riscv-protos.h (riscv_output_return): New.
32528 * config/riscv/riscv.c (struct machine_function): New naked_p field.
32529 (riscv_attribute_table, riscv_output_return),
32530 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
32531 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
32532 (riscv_compute_frame_info): Only compute frame->mask if not a naked
32534 (riscv_expand_prologue): Add early return for naked function.
32535 (riscv_expand_epilogue): Likewise.
32536 (riscv_function_ok_for_sibcall): Return false for naked function.
32537 (riscv_set_current_function): New.
32538 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
32539 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
32540 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
32541 * doc/extend.texi (RISC-V Function Attributes): New.
32543 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
32545 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
32546 check for 128-bit long double before checking TCmode.
32547 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
32548 128-bit long doubles before checking TFmode or TCmode.
32549 (FLOAT128_IBM_P): Likewise.
32551 2018-01-10 Martin Sebor <msebor@redhat.com>
32553 PR tree-optimization/83671
32554 * builtins.c (c_strlen): Unconditionally return zero for the empty
32556 Use -Warray-bounds for warnings.
32557 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
32558 for non-constant array indices with COMPONENT_REF, arrays of
32559 arrays, and pointers to arrays.
32560 (gimple_fold_builtin_strlen): Determine and set length range for
32561 non-constant character arrays.
32563 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
32565 PR middle-end/81897
32566 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
32569 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
32571 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
32573 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
32576 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
32577 VECTOR_MEM_ALTIVEC_OR_VSX_P.
32578 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
32579 indexed_or_indirect_operand predicate.
32580 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
32581 (*vsx_le_perm_load_v8hi): Likewise.
32582 (*vsx_le_perm_load_v16qi): Likewise.
32583 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
32584 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
32585 (*vsx_le_perm_store_v8hi): Likewise.
32586 (*vsx_le_perm_store_v16qi): Likewise.
32587 (eight unnamed splitters): Likewise.
32589 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
32591 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
32592 * config/rs6000/emmintrin.h: Likewise.
32593 * config/rs6000/mmintrin.h: Likewise.
32594 * config/rs6000/xmmintrin.h: Likewise.
32596 2018-01-10 David Malcolm <dmalcolm@redhat.com>
32599 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
32601 * tree.c (tree_nop_conversion): Return true for location wrapper
32603 (maybe_wrap_with_location): New function.
32604 (selftest::check_strip_nops): New function.
32605 (selftest::test_location_wrappers): New function.
32606 (selftest::tree_c_tests): Call it.
32607 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
32608 (maybe_wrap_with_location): New decl.
32609 (EXPR_LOCATION_WRAPPER_P): New macro.
32610 (location_wrapper_p): New inline function.
32611 (tree_strip_any_location_wrapper): New inline function.
32613 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
32616 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
32617 stack_realign_offset for the largest alignment of stack slot
32619 (ix86_find_max_used_stack_alignment): New function.
32620 (ix86_finalize_stack_frame_flags): Use it. Set
32621 max_used_stack_alignment if we don't realign stack.
32622 * config/i386/i386.h (machine_function): Add
32623 max_used_stack_alignment.
32625 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
32627 * config/arm/arm.opt (-mbranch-cost): New option.
32628 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
32631 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
32634 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
32635 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
32637 2018-01-10 Richard Biener <rguenther@suse.de>
32640 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
32641 early out so it also covers the case where we have a non-NULL
32644 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
32646 PR tree-optimization/83753
32647 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
32648 for non-strided grouped accesses if the number of elements is 1.
32650 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
32653 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
32654 * i386.h (TARGET_USE_GATHER): Define.
32655 * x86-tune.def (X86_TUNE_USE_GATHER): New.
32657 2018-01-10 Martin Liska <mliska@suse.cz>
32660 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
32661 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
32663 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
32664 CLEANUP_NO_PARTITIONING is not set.
32666 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
32668 * doc/rtl.texi: Remove documentation of (const ...) wrappers
32669 for vectors, as a partial revert of r254296.
32670 * rtl.h (const_vec_p): Delete.
32671 (const_vec_duplicate_p): Don't test for vector CONSTs.
32672 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
32673 * expmed.c (make_tree): Likewise.
32676 * common.md (E, F): Use CONSTANT_P instead of checking for
32678 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
32679 checking for CONST_VECTOR.
32681 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
32683 PR middle-end/83575
32684 * predict.c (force_edge_cold): Handle in more sane way edges
32685 with no prediction.
32687 2018-01-09 Carl Love <cel@us.ibm.com>
32689 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
32691 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
32692 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
32693 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
32694 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
32695 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
32696 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
32697 * config/rs6000/rs6000-protos.h: Add extern defition for
32698 rs6000_generate_float2_double_code.
32699 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
32701 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
32702 (float2_v2df): Add define_expand.
32704 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
32707 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
32708 op_mode in the force_to_mode call.
32710 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32712 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
32713 instead of checking each element individually.
32714 (aarch64_evpc_uzp): Likewise.
32715 (aarch64_evpc_zip): Likewise.
32716 (aarch64_evpc_ext): Likewise.
32717 (aarch64_evpc_rev): Likewise.
32718 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
32719 instead of checking each element individually. Return true without
32721 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
32722 whether all selected elements come from the same input, instead of
32723 checking each element individually. Remove calls to gen_rtx_REG,
32724 start_sequence and end_sequence and instead assert that no rtl is
32727 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32729 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
32730 order of HIGH and CONST checks.
32732 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32734 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
32735 if the destination isn't an SSA_NAME.
32737 2018-01-09 Richard Biener <rguenther@suse.de>
32739 PR tree-optimization/83668
32740 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
32742 (canonicalize_loop_form): ... here, renamed from ...
32743 (canonicalize_loop_closed_ssa_form): ... this and amended to
32744 swap successor edges for loop exit blocks to make us use
32745 the RPO order we need for initial schedule generation.
32747 2018-01-09 Joseph Myers <joseph@codesourcery.com>
32749 PR tree-optimization/64811
32750 * match.pd: When optimizing comparisons with Inf, avoid
32751 introducing or losing exceptions from comparisons with NaN.
32753 2018-01-09 Martin Liska <mliska@suse.cz>
32756 * asan.c (shadow_mem_size): Add gcc_assert.
32758 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
32760 Don't save registers in main().
32763 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
32764 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
32765 * config/avr/avr.c (avr_set_current_function): Don't error if
32766 naked, OS_task or OS_main are specified at the same time.
32767 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
32769 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
32771 * common/config/avr/avr-common.c (avr_option_optimization_table):
32772 Switch on -mmain-is-OS_task for optimizing compilations.
32774 2018-01-09 Richard Biener <rguenther@suse.de>
32776 PR tree-optimization/83572
32777 * graphite.c: Include cfganal.h.
32778 (graphite_transform_loops): Connect infinite loops to exit
32779 and remove fake edges at the end.
32781 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
32783 * ipa-inline.c (edge_badness): Revert accidental checkin.
32785 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
32788 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
32789 symbols; not inline clones.
32791 2018-01-09 Jakub Jelinek <jakub@redhat.com>
32794 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
32795 hard registers. Formatting fixes.
32797 PR preprocessor/83722
32798 * gcc.c (try_generate_repro): Pass
32799 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
32800 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
32803 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
32804 Kito Cheng <kito.cheng@gmail.com>
32806 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
32807 (riscv_leaf_function_p): Delete.
32808 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
32810 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32812 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
32814 (do_ifelse): New function.
32815 (do_isel): New function.
32816 (do_sub3): New function.
32817 (do_add3): New function.
32818 (do_load_mask_compare): New function.
32819 (do_overlap_load_compare): New function.
32820 (expand_compare_loop): New function.
32821 (expand_block_compare): Call expand_compare_loop() when appropriate.
32822 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
32823 option description.
32824 (-mblock-compare-inline-loop-limit): New option.
32826 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32829 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
32830 Reverse order of second and third operands in first alternative.
32831 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
32832 of first and second elements in UNSPEC_VPERMR vector.
32833 (altivec_expand_vec_perm_le): Likewise.
32835 2018-01-08 Jeff Law <law@redhat.com>
32837 PR rtl-optimizatin/81308
32838 * tree-switch-conversion.c (cfg_altered): New file scoped static.
32839 (process_switch): If group_case_labels makes a change, then set
32841 (pass_convert_switch::execute): If a switch is converted, then
32842 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
32844 PR rtl-optimization/81308
32845 * recog.c (split_all_insns): Conditionally cleanup the CFG after
32848 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
32850 PR target/83663 - Revert r255946
32851 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
32852 generation for cases where splatting a value is not useful.
32853 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
32854 across a vec_duplicate and a paradoxical subreg forming a vector
32855 mode to a vec_concat.
32857 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32859 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
32860 -march=armv8.3-a variants.
32861 * config/arm/t-multilib: Likewise.
32862 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
32864 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32866 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
32868 (cceq_ior_compare_complement): Give it a name so I can use it, and
32869 change boolean_or_operator predicate to boolean_operator so it can
32870 be used to generate a crand.
32871 (eqne): New code iterator.
32872 (bd/bd_neg): New code_attrs.
32873 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
32874 a single define_insn.
32875 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
32876 decrement (bdnzt/bdnzf/bdzt/bdzf).
32877 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
32878 with the new names of the branch decrement patterns, and added the
32879 names of the branch decrement conditional patterns.
32881 2018-01-08 Richard Biener <rguenther@suse.de>
32883 PR tree-optimization/83563
32884 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
32887 2018-01-08 Richard Biener <rguenther@suse.de>
32889 PR middle-end/83713
32890 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
32892 2018-01-08 Richard Biener <rguenther@suse.de>
32894 PR tree-optimization/83685
32895 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
32896 references to abnormals.
32898 2018-01-08 Richard Biener <rguenther@suse.de>
32901 * dwarf2out.c (output_indirect_strings): Handle empty
32902 skeleton_debug_str_hash.
32903 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
32905 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
32907 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
32908 (emit_store_direct): Likewise.
32909 (arc_trampoline_adjust_address): Likewise.
32910 (arc_asm_trampoline_template): New function.
32911 (arc_initialize_trampoline): Use asm_trampoline_template.
32912 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
32913 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
32914 * config/arc/arc.md (flush_icache): Delete pattern.
32916 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
32918 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
32919 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
32922 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
32925 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
32926 by not USED_FOR_TARGET.
32927 (make_pass_resolve_sw_modes): Likewise.
32929 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
32931 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
32934 2018-01-08 Richard Biener <rguenther@suse.de>
32936 PR middle-end/83580
32937 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
32939 2018-01-08 Richard Biener <rguenther@suse.de>
32941 PR middle-end/83517
32942 * match.pd ((t * 2) / 2) -> t): Add missing :c.
32944 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
32946 PR middle-end/81897
32947 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
32948 basic blocks with a small number of successors.
32949 (convert_control_dep_chain_into_preds): Improve handling of
32951 (dump_predicates): Split apart into...
32952 (dump_pred_chain): ...here...
32953 (dump_pred_info): ...and here.
32954 (can_one_predicate_be_invalidated_p): Add debugging printfs.
32955 (can_chain_union_be_invalidated_p): Improve check for invalidation
32957 (uninit_uses_cannot_happen): Avoid unnecessary if
32958 convert_control_dep_chain_into_preds yielded nothing.
32960 2018-01-06 Martin Sebor <msebor@redhat.com>
32962 PR tree-optimization/83640
32963 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
32964 subtracting negative offset from size.
32965 (builtin_access::overlap): Adjust offset bounds of the access to fall
32966 within the size of the object if possible.
32968 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
32970 PR rtl-optimization/83699
32971 * expmed.c (extract_bit_field_1): Restrict the vector usage of
32972 extract_bit_field_as_subreg to cases in which the extracted
32973 value is also a vector.
32975 * lra-constraints.c (process_alt_operands): Test for the equivalence
32976 substitutions when detecting a possible reload cycle.
32978 2018-01-06 Jakub Jelinek <jakub@redhat.com>
32981 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
32982 by default if flag_selective_schedling{,2}. Formatting fixes.
32984 PR rtl-optimization/83682
32985 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
32986 if it has non-VECTOR_MODE element mode.
32987 (vec_duplicate_p): Likewise.
32989 PR middle-end/83694
32990 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
32991 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
32993 2018-01-05 Jakub Jelinek <jakub@redhat.com>
32996 * config/i386/i386-builtin.def
32997 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
32998 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
32999 Require also OPTION_MASK_ISA_AVX512F in addition to
33000 OPTION_MASK_ISA_GFNI.
33001 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
33002 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
33003 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
33004 to OPTION_MASK_ISA_GFNI.
33005 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
33006 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
33007 OPTION_MASK_ISA_AVX512BW.
33008 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
33009 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
33010 addition to OPTION_MASK_ISA_GFNI.
33011 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
33012 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
33013 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
33014 to OPTION_MASK_ISA_GFNI.
33015 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
33016 a requirement for all ISAs rather than any of them with a few
33018 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
33020 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
33021 bitmasks to be enabled with 3 exceptions, instead of requiring any
33022 enabled ISA with lots of exceptions.
33023 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
33024 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
33025 Change avx512bw in isa attribute to avx512f.
33026 * config/i386/sgxintrin.h: Add license boilerplate.
33027 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
33028 to __AVX512F__ and __AVX512VL to __AVX512VL__.
33029 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
33030 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
33032 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
33033 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
33034 temporarily sse2 rather than sse if not enabled already.
33037 * config/i386/sse.md (VI248_VLBW): Rename to ...
33038 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
33039 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
33040 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
33041 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
33042 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
33043 mode iterator instead of VI248_VLBW.
33045 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
33047 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
33048 (record_modified): Skip clobbers; add debug output.
33049 (param_change_prob): Use sreal frequencies.
33051 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
33053 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
33054 punt for user-aligned variables.
33056 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
33058 * tree-chrec.c (chrec_contains_symbols): Return true for
33061 2018-01-05 Sudakshina Das <sudi.das@arm.com>
33064 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
33065 of (x|y) == x for BICS pattern.
33067 2018-01-05 Jakub Jelinek <jakub@redhat.com>
33069 PR tree-optimization/83605
33070 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
33071 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
33074 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
33076 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
33077 * config/epiphany/rtems.h: New file.
33079 2018-01-04 Jakub Jelinek <jakub@redhat.com>
33080 Uros Bizjak <ubizjak@gmail.com>
33083 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
33084 QIreg_operand instead of register_operand predicate.
33085 * config/i386/i386.c (ix86_rop_should_change_byte_p,
33086 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
33087 comments instead of -fmitigate[-_]rop.
33089 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
33092 * cgraphunit.c (symbol_table::compile): Switch to text_section
33093 before calling assembly_start debug hook.
33094 * run-rtl-passes.c (run_rtl_passes): Likewise.
33097 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33099 * tree-vrp.c (extract_range_from_binary_expr_1): Check
33100 range_int_cst_p rather than !symbolic_range_p before calling
33101 extract_range_from_multiplicative_op_1.
33103 2018-01-04 Jeff Law <law@redhat.com>
33105 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
33106 redundant test in assertion.
33108 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33110 * doc/rtl.texi: Document machine_mode wrapper classes.
33112 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33114 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
33115 using tree_to_uhwi.
33117 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33119 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
33120 the VEC_PERM_EXPR fold to fail.
33122 2018-01-04 Jakub Jelinek <jakub@redhat.com>
33125 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
33126 to switched_sections.
33128 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33131 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
33132 test for d.testing.
33134 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
33137 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
33138 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
33140 2018-01-04 Jakub Jelinek <jakub@redhat.com>
33143 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
33144 is BLKmode and bitpos not zero or mode change is needed.
33146 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
33149 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
33152 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
33155 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
33156 instead of MULT rtx. Update all corresponding splitters.
33157 (*saddl_se): Ditto.
33158 (*ssub<modesuffix>): Ditto.
33159 (*ssubl_se): Ditto.
33160 (*cmp_sadd_di): Update split patterns.
33161 (*cmp_sadd_si): Ditto.
33162 (*cmp_sadd_sidi): Ditto.
33163 (*cmp_ssub_di): Ditto.
33164 (*cmp_ssub_si): Ditto.
33165 (*cmp_ssub_sidi): Ditto.
33166 * config/alpha/predicates.md (const23_operand): New predicate.
33167 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
33168 Look for ASHIFT, not MULT inner operand.
33169 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
33171 2018-01-04 Martin Liska <mliska@suse.cz>
33173 PR gcov-profile/83669
33174 * gcov.c (output_intermediate_file): Add version to intermediate
33176 * doc/gcov.texi: Document new field 'version' in intermediate
33177 file format. Fix location of '-k' option of gcov command.
33179 2018-01-04 Martin Liska <mliska@suse.cz>
33182 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
33184 2018-01-04 Jakub Jelinek <jakub@redhat.com>
33186 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
33188 2018-01-03 Martin Sebor <msebor@redhat.com>
33190 PR tree-optimization/83655
33191 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
33192 checking calls with invalid arguments.
33194 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33196 * tree-vect-stmts.c (vect_get_store_rhs): New function.
33197 (vectorizable_mask_load_store): Delete.
33198 (vectorizable_call): Return false for masked loads and stores.
33199 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
33200 instead of gimple_assign_rhs1.
33201 (vectorizable_load): Handle IFN_MASK_LOAD.
33202 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
33204 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33206 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
33208 (vectorizable_mask_load_store): ...here.
33209 (vectorizable_load): ...and here.
33211 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33213 * tree-vect-stmts.c (vect_build_all_ones_mask)
33214 (vect_build_zero_merge_argument): New functions, split out from...
33215 (vectorizable_load): ...here.
33217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33219 * tree-vect-stmts.c (vect_check_store_rhs): New function,
33221 (vectorizable_mask_load_store): ...here.
33222 (vectorizable_store): ...and here.
33224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33226 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
33228 (vectorizable_mask_load_store): ...here.
33230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33232 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
33233 (vect_model_store_cost): Take a vec_load_store_type instead of a
33235 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
33236 (vect_model_store_cost): Take a vec_load_store_type instead of a
33238 (vectorizable_mask_load_store): Update accordingly.
33239 (vectorizable_store): Likewise.
33240 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
33242 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33244 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
33245 IFN_MASK_LOAD calls here rather than...
33246 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
33248 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33249 Alan Hayward <alan.hayward@arm.com>
33250 David Sherwood <david.sherwood@arm.com>
33252 * expmed.c (extract_bit_field_1): For vector extracts,
33253 fall back to extract_bit_field_as_subreg if vec_extract
33256 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33257 Alan Hayward <alan.hayward@arm.com>
33258 David Sherwood <david.sherwood@arm.com>
33260 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
33261 they are variable or constant sized.
33262 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
33263 slots for constant-sized data.
33265 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33266 Alan Hayward <alan.hayward@arm.com>
33267 David Sherwood <david.sherwood@arm.com>
33269 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
33270 handling COND_EXPRs with boolean comparisons, try to find a better
33271 basis for the mask type than the boolean itself.
33273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33275 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
33276 is calculated and how it can be overridden.
33277 * genmodes.c (max_bitsize_mode_any_mode): New variable.
33278 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
33280 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
33283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33284 Alan Hayward <alan.hayward@arm.com>
33285 David Sherwood <david.sherwood@arm.com>
33287 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
33288 Remove the mode argument.
33289 (aarch64_simd_valid_immediate): Remove the mode and inverse
33291 * config/aarch64/iterators.md (bitsize): New iterator.
33292 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
33293 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
33294 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
33295 aarch64_simd_valid_immediate.
33296 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
33297 (aarch64_reg_or_bic_imm): Likewise.
33298 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
33299 with an insn_type enum and msl with a modifier_type enum.
33300 Replace element_width with a scalar_mode. Change the shift
33301 to unsigned int. Add constructors for scalar_float_mode and
33302 scalar_int_mode elements.
33303 (aarch64_vect_float_const_representable_p): Delete.
33304 (aarch64_can_const_movi_rtx_p)
33305 (aarch64_simd_scalar_immediate_valid_for_move)
33306 (aarch64_simd_make_constant): Update call to
33307 aarch64_simd_valid_immediate.
33308 (aarch64_advsimd_valid_immediate_hs): New function.
33309 (aarch64_advsimd_valid_immediate): Likewise.
33310 (aarch64_simd_valid_immediate): Remove mode and inverse
33311 arguments. Rewrite to use the above. Use const_vec_duplicate_p
33312 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
33313 and aarch64_float_const_representable_p on the result.
33314 (aarch64_output_simd_mov_immediate): Remove mode argument.
33315 Update call to aarch64_simd_valid_immediate and use of
33316 simd_immediate_info.
33317 (aarch64_output_scalar_simd_mov_immediate): Update call
33320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33321 Alan Hayward <alan.hayward@arm.com>
33322 David Sherwood <david.sherwood@arm.com>
33324 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
33325 (mode_nunits): Likewise CONST_MODE_NUNITS.
33326 * machmode.def (ADJUST_NUNITS): Document.
33327 * genmodes.c (mode_data::need_nunits_adj): New field.
33328 (blank_mode): Update accordingly.
33329 (adj_nunits): New variable.
33330 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
33332 (emit_mode_size_inline): Set need_bytesize_adj for all modes
33333 listed in adj_nunits.
33334 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
33335 listed in adj_nunits. Don't emit case statements for such modes.
33336 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
33337 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
33338 nothing if adj_nunits is nonnull.
33339 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
33340 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
33341 (emit_mode_fbit): Update use of print_maybe_const_decl.
33342 (emit_move_size): Likewise. Treat the array as non-const
33344 (emit_mode_adjustments): Handle adj_nunits.
33346 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33348 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
33349 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
33350 (VECTOR_MODES): Use it.
33351 (make_vector_modes): Take the prefix as an argument.
33353 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33354 Alan Hayward <alan.hayward@arm.com>
33355 David Sherwood <david.sherwood@arm.com>
33357 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
33358 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
33359 for MODE_VECTOR_BOOL.
33360 * machmode.def (VECTOR_BOOL_MODE): Document.
33361 * genmodes.c (VECTOR_BOOL_MODE): New macro.
33362 (make_vector_bool_mode): New function.
33363 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
33365 * lto-streamer-in.c (lto_input_mode_table): Likewise.
33366 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
33368 * stor-layout.c (int_mode_for_mode): Likewise.
33369 * tree.c (build_vector_type_for_mode): Likewise.
33370 * varasm.c (output_constant_pool_2): Likewise.
33371 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
33372 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
33373 for MODE_VECTOR_BOOL.
33374 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
33375 of mode class checks.
33376 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
33377 instead of a list of mode class checks.
33378 (expand_vector_scalar_condition): Likewise.
33379 (type_for_widest_vector_mode): Handle BImode as an inner mode.
33381 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33382 Alan Hayward <alan.hayward@arm.com>
33383 David Sherwood <david.sherwood@arm.com>
33385 * machmode.h (mode_size): Change from unsigned short to
33387 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
33388 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33389 or if measurement_type is not polynomial.
33390 (fixed_size_mode::includes_p): Check for constant-sized modes.
33391 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
33392 return a poly_uint16 rather than an unsigned short.
33393 (emit_mode_size): Change the type of mode_size from unsigned short
33394 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
33395 (emit_mode_adjustments): Cope with polynomial vector sizes.
33396 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33398 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33400 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
33401 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
33402 * caller-save.c (setup_save_areas): Likewise.
33403 (replace_reg_with_saved_mem): Likewise.
33404 * calls.c (emit_library_call_value_1): Likewise.
33405 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
33406 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
33407 (gen_lowpart_for_combine): Likewise.
33408 * convert.c (convert_to_integer_1): Likewise.
33409 * cse.c (equiv_constant, cse_insn): Likewise.
33410 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
33411 (cselib_subst_to_values): Likewise.
33412 * dce.c (word_dce_process_block): Likewise.
33413 * df-problems.c (df_word_lr_mark_ref): Likewise.
33414 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
33415 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
33416 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
33417 (rtl_for_decl_location): Likewise.
33418 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
33419 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
33420 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
33421 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
33422 (expand_expr_real_1): Likewise.
33423 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
33424 (pad_below): Likewise.
33425 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33426 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
33427 * ira.c (get_subreg_tracking_sizes): Likewise.
33428 * ira-build.c (ira_create_allocno_objects): Likewise.
33429 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
33430 (ira_sort_regnos_for_alter_reg): Likewise.
33431 * ira-costs.c (record_operand_costs): Likewise.
33432 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
33433 (resolve_simple_move): Likewise.
33434 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
33435 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
33436 (lra_constraints): Likewise.
33437 (CONST_POOL_OK_P): Reject variable-sized modes.
33438 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
33439 (add_pseudo_to_slot, lra_spill): Likewise.
33440 * omp-low.c (omp_clause_aligned_alignment): Likewise.
33441 * optabs-query.c (get_best_extraction_insn): Likewise.
33442 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33443 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
33444 (expand_mult_highpart, valid_multiword_target_p): Likewise.
33445 * recog.c (offsettable_address_addr_space_p): Likewise.
33446 * regcprop.c (maybe_mode_change): Likewise.
33447 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
33448 * regrename.c (build_def_use): Likewise.
33449 * regstat.c (dump_reg_info): Likewise.
33450 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
33451 (find_reloads, find_reloads_subreg_address): Likewise.
33452 * reload1.c (eliminate_regs_1): Likewise.
33453 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
33454 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
33455 (simplify_binary_operation_1, simplify_subreg): Likewise.
33456 * targhooks.c (default_function_arg_padding): Likewise.
33457 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
33458 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
33459 (verify_gimple_assign_ternary): Likewise.
33460 * tree-inline.c (estimate_move_cost): Likewise.
33461 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33462 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
33463 (get_address_cost_ainc): Likewise.
33464 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
33465 (vect_supportable_dr_alignment): Likewise.
33466 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33467 (vectorizable_reduction): Likewise.
33468 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
33469 (vectorizable_operation, vectorizable_load): Likewise.
33470 * tree.c (build_same_sized_truth_vector_type): Likewise.
33471 * valtrack.c (cleanup_auto_inc_dec): Likewise.
33472 * var-tracking.c (emit_note_insn_var_location): Likewise.
33473 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
33474 (ADDR_VEC_ALIGN): Likewise.
33476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33477 Alan Hayward <alan.hayward@arm.com>
33478 David Sherwood <david.sherwood@arm.com>
33480 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
33482 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33483 or if measurement_type is polynomial.
33484 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
33485 * combine.c (make_extraction): Likewise.
33486 * dse.c (find_shift_sequence): Likewise.
33487 * dwarf2out.c (mem_loc_descriptor): Likewise.
33488 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
33489 (extract_bit_field, extract_low_bits): Likewise.
33490 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
33491 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
33492 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
33493 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
33494 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33495 * reload.c (find_reloads): Likewise.
33496 * reload1.c (alter_reg): Likewise.
33497 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
33498 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
33499 * tree-if-conv.c (predicate_mem_writes): Likewise.
33500 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
33501 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
33502 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
33503 * valtrack.c (dead_debug_insert_temp): Likewise.
33504 * varasm.c (mergeable_constant_section): Likewise.
33505 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
33507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33508 Alan Hayward <alan.hayward@arm.com>
33509 David Sherwood <david.sherwood@arm.com>
33511 * expr.c (expand_assignment): Cope with polynomial mode sizes
33512 when assigning to a CONCAT.
33514 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33515 Alan Hayward <alan.hayward@arm.com>
33516 David Sherwood <david.sherwood@arm.com>
33518 * machmode.h (mode_precision): Change from unsigned short to
33520 (mode_to_precision): Return a poly_uint16 rather than an unsigned
33522 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
33523 or if measurement_type is not polynomial.
33524 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
33525 in which the mode is already known to be a scalar_int_mode.
33526 * genmodes.c (emit_mode_precision): Change the type of mode_precision
33527 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
33529 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33530 for GET_MODE_PRECISION.
33531 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33532 for GET_MODE_PRECISION.
33533 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
33535 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
33536 (expand_field_assignment, make_extraction): Likewise.
33537 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
33538 (get_last_value): Likewise.
33539 * convert.c (convert_to_integer_1): Likewise.
33540 * cse.c (cse_insn): Likewise.
33541 * expr.c (expand_expr_real_1): Likewise.
33542 * lra-constraints.c (simplify_operand_subreg): Likewise.
33543 * optabs-query.c (can_atomic_load_p): Likewise.
33544 * optabs.c (expand_atomic_load): Likewise.
33545 (expand_atomic_store): Likewise.
33546 * ree.c (combine_reaching_defs): Likewise.
33547 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
33548 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
33549 * tree.h (type_has_mode_precision_p): Likewise.
33550 * ubsan.c (instrument_si_overflow): Likewise.
33552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33553 Alan Hayward <alan.hayward@arm.com>
33554 David Sherwood <david.sherwood@arm.com>
33556 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
33557 polynomial numbers of units.
33558 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
33559 (valid_vector_subparts_p): New function.
33560 (build_vector_type): Remove temporary shim and take the number
33561 of units as a poly_uint64 rather than an int.
33562 (build_opaque_vector_type): Take the number of units as a
33563 poly_uint64 rather than an int.
33564 * tree.c (build_vector_from_ctor): Handle polynomial
33565 TYPE_VECTOR_SUBPARTS.
33566 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
33567 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
33568 (build_vector_from_val): If the number of units is variable,
33569 use build_vec_duplicate_cst for constant operands and
33570 VEC_DUPLICATE_EXPR otherwise.
33571 (make_vector_type): Remove temporary is_constant ().
33572 (build_vector_type, build_opaque_vector_type): Take the number of
33573 units as a poly_uint64 rather than an int.
33574 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
33576 * cfgexpand.c (expand_debug_expr): Likewise.
33577 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
33578 (store_constructor, expand_expr_real_1): Likewise.
33579 (const_scalar_mask_from_tree): Likewise.
33580 * fold-const-call.c (fold_const_reduction): Likewise.
33581 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
33582 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
33583 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
33584 (fold_relational_const): Likewise.
33585 (native_interpret_vector): Likewise. Change the size from an
33586 int to an unsigned int.
33587 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
33588 TYPE_VECTOR_SUBPARTS.
33589 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
33590 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
33591 duplicating a non-constant operand into a variable-length vector.
33592 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
33593 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
33594 * ipa-icf.c (sem_variable::equals): Likewise.
33595 * match.pd: Likewise.
33596 * omp-simd-clone.c (simd_clone_subparts): Likewise.
33597 * print-tree.c (print_node): Likewise.
33598 * stor-layout.c (layout_type): Likewise.
33599 * targhooks.c (default_builtin_vectorization_cost): Likewise.
33600 * tree-cfg.c (verify_gimple_comparison): Likewise.
33601 (verify_gimple_assign_binary): Likewise.
33602 (verify_gimple_assign_ternary): Likewise.
33603 (verify_gimple_assign_single): Likewise.
33604 * tree-pretty-print.c (dump_generic_node): Likewise.
33605 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33606 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
33607 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
33608 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
33609 (vect_shift_permute_load_chain): Likewise.
33610 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
33611 (expand_vector_condition, optimize_vector_constructor): Likewise.
33612 (lower_vec_perm, get_compute_type): Likewise.
33613 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33614 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
33615 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
33616 (vect_recog_mask_conversion_pattern): Likewise.
33617 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
33618 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
33619 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33620 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
33621 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
33622 (vectorizable_shift, vectorizable_operation, vectorizable_store)
33623 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
33624 (supportable_widening_operation): Likewise.
33625 (supportable_narrowing_operation): Likewise.
33626 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
33628 * varasm.c (output_constant): Likewise.
33630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33631 Alan Hayward <alan.hayward@arm.com>
33632 David Sherwood <david.sherwood@arm.com>
33634 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
33635 so that both the length == 3 and length != 3 cases set up their
33636 own permute vectors. Add comments explaining why we know the
33637 number of elements is constant.
33638 (vect_permute_load_chain): Likewise.
33640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33641 Alan Hayward <alan.hayward@arm.com>
33642 David Sherwood <david.sherwood@arm.com>
33644 * machmode.h (mode_nunits): Change from unsigned char to
33646 (ONLY_FIXED_SIZE_MODES): New macro.
33647 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
33648 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
33649 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
33651 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
33652 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
33653 or if measurement_type is not polynomial.
33654 * genmodes.c (ZERO_COEFFS): New macro.
33655 (emit_mode_nunits_inline): Make mode_nunits_inline return a
33657 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
33658 Use ZERO_COEFFS when emitting initializers.
33659 * data-streamer.h (bp_pack_poly_value): New function.
33660 (bp_unpack_poly_value): Likewise.
33661 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33662 for GET_MODE_NUNITS.
33663 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33664 for GET_MODE_NUNITS.
33665 * tree.c (make_vector_type): Remove temporary shim and make
33666 the real function take the number of units as a poly_uint64
33667 rather than an int.
33668 (build_vector_type_for_mode): Handle polynomial nunits.
33669 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
33670 * emit-rtl.c (const_vec_series_p_1): Likewise.
33671 (gen_rtx_CONST_VECTOR): Likewise.
33672 * fold-const.c (test_vec_duplicate_folding): Likewise.
33673 * genrecog.c (validate_pattern): Likewise.
33674 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
33675 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33676 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
33677 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
33678 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
33679 * rtlanal.c (subreg_get_info): Likewise.
33680 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33681 (vect_grouped_load_supported): Likewise.
33682 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
33683 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
33684 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
33685 (simplify_const_unary_operation, simplify_binary_operation_1)
33686 (simplify_const_binary_operation, simplify_ternary_operation)
33687 (test_vector_ops_duplicate, test_vector_ops): Likewise.
33688 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
33689 instead of CONST_VECTOR_NUNITS.
33690 * varasm.c (output_constant_pool_2): Likewise.
33691 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
33692 explicit-encoded elements in the XVEC for variable-length vectors.
33694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33696 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
33698 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33699 Alan Hayward <alan.hayward@arm.com>
33700 David Sherwood <david.sherwood@arm.com>
33702 * coretypes.h (fixed_size_mode): Declare.
33703 (fixed_size_mode_pod): New typedef.
33704 * builtins.h (target_builtins::x_apply_args_mode)
33705 (target_builtins::x_apply_result_mode): Change type to
33706 fixed_size_mode_pod.
33707 * builtins.c (apply_args_size, apply_result_size, result_vector)
33708 (expand_builtin_apply_args_1, expand_builtin_apply)
33709 (expand_builtin_return): Update accordingly.
33711 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33713 * cse.c (hash_rtx_cb): Hash only the encoded elements.
33714 * cselib.c (cselib_hash_rtx): Likewise.
33715 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
33716 CONST_VECTOR encoding.
33718 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33719 Jeff Law <law@redhat.com>
33722 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
33723 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
33724 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
33725 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
33728 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
33729 explicitly probe *sp in a noreturn function if there were any callee
33730 register saves or frame pointer is needed.
33732 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33735 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
33736 BLKmode for ternary, binary or unary expressions.
33739 * var-tracking.c (delete_vta_debug_insn): New inline function.
33740 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
33741 insns from get_insns () to NULL instead of each bb separately.
33742 Use delete_vta_debug_insn. No longer static.
33743 (vt_debug_insns_local, variable_tracking_main_1): Adjust
33744 delete_vta_debug_insns callers.
33745 * rtl.h (delete_vta_debug_insns): Declare.
33746 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
33747 instead of variable_tracking_main.
33749 2018-01-03 Martin Sebor <msebor@redhat.com>
33751 PR tree-optimization/83603
33752 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
33753 arguments past the endof the argument list in functions declared
33754 without a prototype.
33755 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
33756 Avoid checking when arguments are null.
33758 2018-01-03 Martin Sebor <msebor@redhat.com>
33761 * doc/extend.texi (attribute const): Fix a typo.
33762 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
33763 issuing -Wsuggest-attribute for void functions.
33765 2018-01-03 Martin Sebor <msebor@redhat.com>
33767 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
33768 offset_int::from instead of wide_int::to_shwi.
33769 (maybe_diag_overlap): Remove assertion.
33770 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
33771 * gimple-ssa-sprintf.c (format_directive): Same.
33772 (parse_directive): Same.
33773 (sprintf_dom_walker::compute_format_length): Same.
33774 (try_substitute_return_value): Same.
33776 2018-01-03 Jeff Law <law@redhat.com>
33778 PR middle-end/83654
33779 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
33780 non-constant residual for zero at runtime and avoid probing in
33781 that case. Reorganize code for trailing problem to mirror handling
33784 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33786 PR tree-optimization/83501
33787 * tree-ssa-strlen.c (get_string_cst): New.
33788 (handle_char_store): Call get_string_cst.
33790 2018-01-03 Martin Liska <mliska@suse.cz>
33792 PR tree-optimization/83593
33793 * tree-ssa-strlen.c: Include tree-cfg.h.
33794 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
33795 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
33796 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
33798 (strlen_dom_walker::before_dom_children): Call
33799 gimple_purge_dead_eh_edges. Dump tranformation with details
33801 (strlen_dom_walker::before_dom_children): Update call by adding
33802 new argument cleanup_eh.
33803 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
33805 2018-01-03 Martin Liska <mliska@suse.cz>
33808 * cif-code.def (VARIADIC_THUNK): New enum value.
33809 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
33812 2018-01-03 Jan Beulich <jbeulich@suse.com>
33814 * sse.md (mov<mode>_internal): Tighten condition for when to use
33815 vmovdqu<ssescalarsize> for TI and OI modes.
33817 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33819 Update copyright years.
33821 2018-01-03 Martin Liska <mliska@suse.cz>
33824 * ipa-visibility.c (function_and_variable_visibility): Skip
33825 functions with noipa attribure.
33827 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33829 * gcc.c (process_command): Update copyright notice dates.
33830 * gcov-dump.c (print_version): Ditto.
33831 * gcov.c (print_version): Ditto.
33832 * gcov-tool.c (print_version): Ditto.
33833 * gengtype.c (create_file): Ditto.
33834 * doc/cpp.texi: Bump @copying's copyright year.
33835 * doc/cppinternals.texi: Ditto.
33836 * doc/gcc.texi: Ditto.
33837 * doc/gccint.texi: Ditto.
33838 * doc/gcov.texi: Ditto.
33839 * doc/install.texi: Ditto.
33840 * doc/invoke.texi: Ditto.
33842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33844 * vector-builder.h (vector_builder::m_full_nelts): Change from
33845 unsigned int to poly_uint64.
33846 (vector_builder::full_nelts): Update prototype accordingly.
33847 (vector_builder::new_vector): Likewise.
33848 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
33849 (vector_builder::operator ==): Likewise.
33850 (vector_builder::finalize): Likewise.
33851 * int-vector-builder.h (int_vector_builder::int_vector_builder):
33852 Take the number of elements as a poly_uint64 rather than an
33854 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
33855 from unsigned int to poly_uint64.
33856 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
33857 (vec_perm_indices::new_vector): Likewise.
33858 (vec_perm_indices::length): Likewise.
33859 (vec_perm_indices::nelts_per_input): Likewise.
33860 (vec_perm_indices::input_nelts): Likewise.
33861 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
33862 number of elements per input as a poly_uint64 rather than an
33863 unsigned int. Use the original encoding for variable-length
33864 vectors, rather than clamping each individual element.
33865 For the second and subsequent elements in each pattern,
33866 clamp the step and base before clamping their sum.
33867 (vec_perm_indices::series_p): Handle polynomial element counts.
33868 (vec_perm_indices::all_in_range_p): Likewise.
33869 (vec_perm_indices_to_tree): Likewise.
33870 (vec_perm_indices_to_rtx): Likewise.
33871 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
33872 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
33873 (tree_vector_builder::new_binary_operation): Handle polynomial
33874 element counts. Return false if we need to know the number
33875 of elements at compile time.
33876 * fold-const.c (fold_vec_perm): Punt if the number of elements
33877 isn't known at compile time.
33879 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33881 * vec-perm-indices.h (vec_perm_builder): Change element type
33882 from HOST_WIDE_INT to poly_int64.
33883 (vec_perm_indices::element_type): Update accordingly.
33884 (vec_perm_indices::clamp): Handle polynomial element_types.
33885 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33886 (vec_perm_indices::all_in_range_p): Likewise.
33887 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
33889 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
33890 polynomial vec_perm_indices element types.
33891 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
33892 * fold-const.c (fold_vec_perm): Likewise.
33893 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
33894 * tree-vect-generic.c (lower_vec_perm): Likewise.
33895 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33896 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
33897 element type to HOST_WIDE_INT.
33899 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33900 Alan Hayward <alan.hayward@arm.com>
33901 David Sherwood <david.sherwood@arm.com>
33903 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
33904 rather than an int. Use plus_constant.
33905 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
33906 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
33908 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33909 Alan Hayward <alan.hayward@arm.com>
33910 David Sherwood <david.sherwood@arm.com>
33912 * calls.c (emit_call_1, expand_call): Change struct_value_size from
33913 a HOST_WIDE_INT to a poly_int64.
33915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33916 Alan Hayward <alan.hayward@arm.com>
33917 David Sherwood <david.sherwood@arm.com>
33919 * calls.c (load_register_parameters): Cope with polynomial
33920 mode sizes. Require a constant size for BLKmode parameters
33921 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
33922 forces a parameter to be padded at the lsb end in order to
33923 fill a complete number of words, require the parameter size
33924 to be ordered wrt UNITS_PER_WORD.
33926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33927 Alan Hayward <alan.hayward@arm.com>
33928 David Sherwood <david.sherwood@arm.com>
33930 * reload1.c (spill_stack_slot_width): Change element type
33931 from unsigned int to poly_uint64_pod.
33932 (alter_reg): Treat mode sizes as polynomial.
33934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33935 Alan Hayward <alan.hayward@arm.com>
33936 David Sherwood <david.sherwood@arm.com>
33938 * reload.c (complex_word_subreg_p): New function.
33939 (reload_inner_reg_of_subreg, push_reload): Use it.
33941 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33942 Alan Hayward <alan.hayward@arm.com>
33943 David Sherwood <david.sherwood@arm.com>
33945 * lra-constraints.c (process_alt_operands): Reject matched
33946 operands whose sizes aren't ordered.
33947 (match_reload): Refer to this check here.
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 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
33954 that the mode size is in the set {1, 2, 4, 8, 16}.
33956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33957 Alan Hayward <alan.hayward@arm.com>
33958 David Sherwood <david.sherwood@arm.com>
33960 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
33961 Use plus_constant instead of gen_rtx_PLUS.
33963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33964 Alan Hayward <alan.hayward@arm.com>
33965 David Sherwood <david.sherwood@arm.com>
33967 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
33968 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
33969 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
33970 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
33971 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
33972 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
33973 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
33974 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
33975 * config/i386/i386.c (ix86_push_rounding): ...this new function.
33976 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
33978 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
33979 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
33980 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
33981 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
33982 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
33983 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
33984 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
33985 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
33986 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
33987 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
33989 * expr.c (emit_move_resolve_push): Treat the input and result
33990 of PUSH_ROUNDING as a poly_int64.
33991 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
33992 (emit_push_insn): Likewise.
33993 * lra-eliminations.c (mark_not_eliminable): Likewise.
33994 * recog.c (push_operand): Likewise.
33995 * reload1.c (elimination_effects): Likewise.
33996 * rtlanal.c (nonzero_bits1): Likewise.
33997 * calls.c (store_one_arg): Likewise. Require the padding to be
33998 known at compile time.
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 (emit_single_push_insn_1): Treat mode sizes as polynomial.
34005 Use plus_constant instead of gen_rtx_PLUS.
34007 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34008 Alan Hayward <alan.hayward@arm.com>
34009 David Sherwood <david.sherwood@arm.com>
34011 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
34012 rather than an int.
34014 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34015 Alan Hayward <alan.hayward@arm.com>
34016 David Sherwood <david.sherwood@arm.com>
34018 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
34019 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
34020 via stack temporaries. Treat the mode size as polynomial too.
34022 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34023 Alan Hayward <alan.hayward@arm.com>
34024 David Sherwood <david.sherwood@arm.com>
34026 * expr.c (expand_expr_real_2): When handling conversions involving
34027 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
34028 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
34029 as a poly_uint64 too.
34031 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34032 Alan Hayward <alan.hayward@arm.com>
34033 David Sherwood <david.sherwood@arm.com>
34035 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
34042 REGMODE_NATURAL_SIZE.
34043 * expmed.c (store_bit_field_1): Likewise.
34044 * expr.c (store_constructor): Likewise.
34045 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
34046 and polynomial REGMODE_NATURAL_SIZE.
34047 (gen_lowpart_common): Likewise.
34048 * reginfo.c (record_subregs_of_mode): Likewise.
34049 * rtlanal.c (read_modify_subreg_p): Likewise.
34051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34052 Alan Hayward <alan.hayward@arm.com>
34053 David Sherwood <david.sherwood@arm.com>
34055 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
34056 numbers of elements.
34058 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34059 Alan Hayward <alan.hayward@arm.com>
34060 David Sherwood <david.sherwood@arm.com>
34062 * match.pd: Cope with polynomial numbers of vector elements.
34064 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34065 Alan Hayward <alan.hayward@arm.com>
34066 David Sherwood <david.sherwood@arm.com>
34068 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
34069 in a POINTER_PLUS_EXPR.
34071 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34072 Alan Hayward <alan.hayward@arm.com>
34073 David Sherwood <david.sherwood@arm.com>
34075 * omp-simd-clone.c (simd_clone_subparts): New function.
34076 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
34077 (ipa_simd_modify_function_body): Likewise.
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-generic.c (nunits_for_known_piecewise_op): New function.
34084 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
34085 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
34086 (expand_vector_condition, vector_element): Likewise.
34087 (subparts_gt): New function.
34088 (get_compute_type): Use subparts_gt.
34089 (count_type_subparts): Delete.
34090 (expand_vector_operations_1): Use subparts_gt instead of
34091 count_type_subparts.
34093 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34094 Alan Hayward <alan.hayward@arm.com>
34095 David Sherwood <david.sherwood@arm.com>
34097 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
34098 (vect_compile_time_alias): ...this new function. Do the calculation
34099 on poly_ints rather than trees.
34100 (vect_prune_runtime_alias_test_list): Update call accordingly.
34102 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34103 Alan Hayward <alan.hayward@arm.com>
34104 David Sherwood <david.sherwood@arm.com>
34106 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
34108 (vect_schedule_slp_instance): Likewise.
34110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34111 Alan Hayward <alan.hayward@arm.com>
34112 David Sherwood <david.sherwood@arm.com>
34114 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
34115 constant and extern definitions for variable-length vectors.
34116 (vect_get_constant_vectors): Note that the number of units
34117 is known to be constant.
34119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34120 Alan Hayward <alan.hayward@arm.com>
34121 David Sherwood <david.sherwood@arm.com>
34123 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
34124 of units as polynomial. Choose between WIDE and NARROW based
34127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34128 Alan Hayward <alan.hayward@arm.com>
34129 David Sherwood <david.sherwood@arm.com>
34131 * tree-vect-stmts.c (simd_clone_subparts): New function.
34132 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
34134 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34135 Alan Hayward <alan.hayward@arm.com>
34136 David Sherwood <david.sherwood@arm.com>
34138 * tree-vect-stmts.c (vectorizable_call): Treat the number of
34139 vectors as polynomial. Use build_index_vector for
34140 IFN_GOMP_SIMD_LANE.
34142 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34143 Alan Hayward <alan.hayward@arm.com>
34144 David Sherwood <david.sherwood@arm.com>
34146 * tree-vect-stmts.c (get_load_store_type): Treat the number of
34147 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
34148 for variable-length vectors.
34149 (vectorizable_mask_load_store): Treat the number of units as
34150 polynomial, asserting that it is constant if the condition has
34151 already been enforced.
34152 (vectorizable_store, vectorizable_load): Likewise.
34154 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34155 Alan Hayward <alan.hayward@arm.com>
34156 David Sherwood <david.sherwood@arm.com>
34158 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
34159 of units as polynomial. Punt if we can't tell at compile time
34160 which vector contains the final result.
34162 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34163 Alan Hayward <alan.hayward@arm.com>
34164 David Sherwood <david.sherwood@arm.com>
34166 * tree-vect-loop.c (vectorizable_induction): Treat the number
34167 of units as polynomial. Punt on SLP inductions. Use an integer
34168 VEC_SERIES_EXPR for variable-length integer reductions. Use a
34169 cast of such a series for variable-length floating-point
34172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34173 Alan Hayward <alan.hayward@arm.com>
34174 David Sherwood <david.sherwood@arm.com>
34176 * tree.h (build_index_vector): Declare.
34177 * tree.c (build_index_vector): New function.
34178 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
34179 of units as polynomial, forcibly converting it to a constant if
34180 vectorizable_reduction has already enforced the condition.
34181 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
34182 to create a {1,2,3,...} vector.
34183 (vectorizable_reduction): Treat the number of units as polynomial.
34184 Choose vectype_in based on the largest scalar element size rather
34185 than the smallest number of units. Enforce the restrictions
34188 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34189 Alan Hayward <alan.hayward@arm.com>
34190 David Sherwood <david.sherwood@arm.com>
34192 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
34193 number of units as polynomial.
34195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34196 Alan Hayward <alan.hayward@arm.com>
34197 David Sherwood <david.sherwood@arm.com>
34199 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
34200 * target.def (autovectorize_vector_sizes): Return the vector sizes
34201 by pointer, using vector_sizes rather than a bitmask.
34202 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
34203 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
34204 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
34206 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
34207 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
34208 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
34209 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
34210 * omp-general.c (omp_max_vf): Likewise.
34211 * omp-low.c (omp_clause_aligned_alignment): Likewise.
34212 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
34213 * tree-vect-loop.c (vect_analyze_loop): Likewise.
34214 * tree-vect-slp.c (vect_slp_bb): Likewise.
34215 * doc/tm.texi: Regenerate.
34216 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
34218 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
34219 the vector size as a poly_uint64 rather than an unsigned int.
34220 (current_vector_size): Change from an unsigned int to a poly_uint64.
34221 (get_vectype_for_scalar_type): Update accordingly.
34222 * tree.h (build_truth_vector_type): Take the size and number of
34223 units as a poly_uint64 rather than an unsigned int.
34224 (build_vector_type): Add a temporary overload that takes
34225 the number of units as a poly_uint64 rather than an unsigned int.
34226 * tree.c (make_vector_type): Likewise.
34227 (build_truth_vector_type): Take the number of units as a poly_uint64
34228 rather than an unsigned int.
34230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34231 Alan Hayward <alan.hayward@arm.com>
34232 David Sherwood <david.sherwood@arm.com>
34234 * target.def (get_mask_mode): Take the number of units and length
34235 as poly_uint64s rather than unsigned ints.
34236 * targhooks.h (default_get_mask_mode): Update accordingly.
34237 * targhooks.c (default_get_mask_mode): Likewise.
34238 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
34239 * doc/tm.texi: Regenerate.
34241 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34242 Alan Hayward <alan.hayward@arm.com>
34243 David Sherwood <david.sherwood@arm.com>
34245 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
34246 * omp-general.c (omp_max_vf): Likewise.
34247 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
34248 (expand_omp_simd): Handle polynomial safelen.
34249 * omp-low.c (omplow_simd_context): Add a default constructor.
34250 (omplow_simd_context::max_vf): Change from int to poly_uint64.
34251 (lower_rec_simd_input_clauses): Update accordingly.
34252 (lower_rec_input_clauses): Likewise.
34254 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34255 Alan Hayward <alan.hayward@arm.com>
34256 David Sherwood <david.sherwood@arm.com>
34258 * tree-vectorizer.h (vect_nunits_for_cost): New function.
34259 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
34260 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
34261 (vect_analyze_slp_cost): Likewise.
34262 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
34263 (vect_model_load_cost): Likewise.
34265 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34266 Alan Hayward <alan.hayward@arm.com>
34267 David Sherwood <david.sherwood@arm.com>
34269 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
34270 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
34271 from an unsigned int * to a poly_uint64_pod *.
34272 (calculate_unrolling_factor): New function.
34273 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
34275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34276 Alan Hayward <alan.hayward@arm.com>
34277 David Sherwood <david.sherwood@arm.com>
34279 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
34280 from an unsigned int to a poly_uint64.
34281 (_loop_vec_info::slp_unrolling_factor): Likewise.
34282 (_loop_vec_info::vectorization_factor): Change from an int
34284 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
34285 (vect_get_num_vectors): New function.
34286 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
34287 (vect_get_num_copies): Use vect_get_num_vectors.
34288 (vect_analyze_data_ref_dependences): Change max_vf from an int *
34289 to an unsigned int *.
34290 (vect_analyze_data_refs): Change min_vf from an int * to a
34292 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34293 than an unsigned HOST_WIDE_INT.
34294 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
34295 (vect_analyze_data_ref_dependence): Change max_vf from an int *
34296 to an unsigned int *.
34297 (vect_analyze_data_ref_dependences): Likewise.
34298 (vect_compute_data_ref_alignment): Handle polynomial vf.
34299 (vect_enhance_data_refs_alignment): Likewise.
34300 (vect_prune_runtime_alias_test_list): Likewise.
34301 (vect_shift_permute_load_chain): Likewise.
34302 (vect_supportable_dr_alignment): Likewise.
34303 (dependence_distance_ge_vf): Take the vectorization factor as a
34304 poly_uint64 rather than an unsigned HOST_WIDE_INT.
34305 (vect_analyze_data_refs): Change min_vf from an int * to a
34307 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
34308 vfm1 as a poly_uint64 rather than an int. Make the same change
34309 for the returned bound_scalar.
34310 (vect_gen_vector_loop_niters): Handle polynomial vf.
34311 (vect_do_peeling): Likewise. Update call to
34312 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
34313 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
34315 * tree-vect-loop.c (vect_determine_vectorization_factor)
34316 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
34317 (vect_get_known_peeling_cost): Likewise.
34318 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
34319 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
34320 (vect_transform_loop): Likewise. Use the lowest possible VF when
34321 updating the upper bounds of the loop.
34322 (vect_min_worthwhile_factor): Make static. Return an unsigned int
34323 rather than an int.
34324 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
34325 polynomial unroll factors.
34326 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
34327 (vect_make_slp_decision): Likewise.
34328 (vect_supported_load_permutation_p): Likewise, and polynomial
34330 (vect_analyze_slp_cost): Handle polynomial vf.
34331 (vect_slp_analyze_node_operations): Likewise.
34332 (vect_slp_analyze_bb_1): Likewise.
34333 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34334 than an unsigned HOST_WIDE_INT.
34335 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
34336 (vectorizable_load): Handle polynomial vf.
34337 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
34339 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
34341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34342 Alan Hayward <alan.hayward@arm.com>
34343 David Sherwood <david.sherwood@arm.com>
34345 * match.pd: Handle bit operations involving three constants
34346 and try to fold one pair.
34348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
34350 * tree-vect-loop-manip.c: Include gimple-fold.h.
34351 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
34352 niters_maybe_zero parameters. Handle other cases besides a step of 1.
34353 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
34354 Add a path that uses a step of VF instead of 1, but disable it
34356 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
34357 and niters_no_overflow parameters. Update calls to
34358 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
34359 Create a new SSA name if the latter choses to use a ste other
34360 than zero, and return it via niters_vector_mult_vf_var.
34361 * tree-vect-loop.c (vect_transform_loop): Update calls to
34362 vect_do_peeling, vect_gen_vector_loop_niters and
34363 slpeel_make_loop_iterate_ntimes.
34364 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
34365 (vect_gen_vector_loop_niters): Update declarations after above changes.
34367 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
34369 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
34370 128-bit round to integer instructions.
34371 (ceil<mode>2): Likewise.
34372 (btrunc<mode>2): Likewise.
34373 (round<mode>2): Likewise.
34375 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34377 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
34378 unaligned VSX load/store on P8/P9.
34379 (expand_block_clear): Allow the use of unaligned VSX
34380 load/store on P8/P9.
34382 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
34384 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
34386 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
34387 swap associated with both a load and a store.
34389 2018-01-02 Andrew Waterman <andrew@sifive.com>
34391 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
34392 * config/riscv/riscv.md (clear_cache): Use it.
34394 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
34396 * web.c: Remove out-of-date comment.
34398 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34400 * expr.c (fixup_args_size_notes): Check that any existing
34401 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
34402 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
34403 (emit_single_push_insn): ...here.
34405 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34407 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
34408 (const_vector_encoded_nelts): New function.
34409 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
34410 (const_vector_int_elt, const_vector_elt): Declare.
34411 * emit-rtl.c (const_vector_int_elt_1): New function.
34412 (const_vector_elt): Likewise.
34413 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
34414 of CONST_VECTOR_ELT.
34416 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34418 * expr.c: Include rtx-vector-builder.h.
34419 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
34420 directly on the tree encoding.
34421 (const_vector_from_tree): Likewise.
34422 * optabs.c: Include rtx-vector-builder.h.
34423 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
34424 sequence of "u" values.
34425 * vec-perm-indices.c: Include rtx-vector-builder.h.
34426 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
34427 directly on the vec_perm_indices encoding.
34429 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34431 * doc/rtl.texi (const_vector): Describe new encoding scheme.
34432 * Makefile.in (OBJS): Add rtx-vector-builder.o.
34433 * rtx-vector-builder.h: New file.
34434 * rtx-vector-builder.c: Likewise.
34435 * rtl.h (rtx_def::u2): Add a const_vector field.
34436 (CONST_VECTOR_NPATTERNS): New macro.
34437 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
34438 (CONST_VECTOR_DUPLICATE_P): Likewise.
34439 (CONST_VECTOR_STEPPED_P): Likewise.
34440 (CONST_VECTOR_ENCODED_ELT): Likewise.
34441 (const_vec_duplicate_p): Check for a duplicated vector encoding.
34442 (unwrap_const_vec_duplicate): Likewise.
34443 (const_vec_series_p): Check for a non-duplicated vector encoding.
34444 Say that the function only returns true for integer vectors.
34445 * emit-rtl.c: Include rtx-vector-builder.h.
34446 (gen_const_vec_duplicate_1): Delete.
34447 (gen_const_vector): Call gen_const_vec_duplicate instead of
34448 gen_const_vec_duplicate_1.
34449 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
34450 (gen_const_vec_duplicate): Use rtx_vector_builder.
34451 (gen_const_vec_series): Likewise.
34452 (gen_rtx_CONST_VECTOR): Likewise.
34453 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
34454 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34455 Build a new vector rather than modifying a CONST_VECTOR in-place.
34456 (handle_special_swappables): Update call accordingly.
34457 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
34458 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34459 Build a new vector rather than modifying a CONST_VECTOR in-place.
34460 (handle_special_swappables): Update call accordingly.
34462 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34464 * simplify-rtx.c (simplify_const_binary_operation): Use
34465 CONST_VECTOR_ELT instead of XVECEXP.
34467 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34469 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
34470 the selector elements to be different from the data elements
34471 if the selector is a VECTOR_CST.
34472 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
34473 ssizetype for the selector.
34475 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34477 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
34478 before testing each element individually.
34479 * tree-vect-generic.c (lower_vec_perm): Likewise.
34481 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34483 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
34484 * selftest-run-tests.c (selftest::run_tests): Call it.
34485 * vector-builder.h (vector_builder::operator ==): New function.
34486 (vector_builder::operator !=): Likewise.
34487 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
34488 (vec_perm_indices::all_from_input_p): New function.
34489 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
34490 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
34491 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
34492 instead of reading the VECTOR_CST directly. Detect whether both
34493 vector inputs are the same before constructing the vec_perm_indices,
34494 and update the number of inputs argument accordingly. Use the
34495 utility functions added above. Only construct sel2 if we need to.
34497 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34499 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
34500 the broadcast of the low byte.
34501 (expand_mult_highpart): Use an explicit encoding for the permutes.
34502 * optabs-query.c (can_mult_highpart_p): Likewise.
34503 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
34504 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34505 (vectorizable_bswap): Likewise.
34506 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
34507 explicit encoding for the power-of-2 permutes.
34508 (vect_permute_store_chain): Likewise.
34509 (vect_grouped_load_supported): Likewise.
34510 (vect_permute_load_chain): Likewise.
34512 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34514 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
34515 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
34516 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
34517 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
34518 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
34519 (vect_gen_perm_mask_any): Likewise.
34521 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34523 * int-vector-builder.h: New file.
34524 * vec-perm-indices.h: Include int-vector-builder.h.
34525 (vec_perm_indices): Redefine as an int_vector_builder.
34526 (auto_vec_perm_indices): Delete.
34527 (vec_perm_builder): Redefine as a stand-alone class.
34528 (vec_perm_indices::vec_perm_indices): New function.
34529 (vec_perm_indices::clamp): Likewise.
34530 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
34531 (vec_perm_indices::new_vector): New function.
34532 (vec_perm_indices::new_expanded_vector): Update for new
34533 vec_perm_indices class.
34534 (vec_perm_indices::rotate_inputs): New function.
34535 (vec_perm_indices::all_in_range_p): Operate directly on the
34536 encoded form, without computing elided elements.
34537 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
34538 encoding. Update for new vec_perm_indices class.
34539 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
34540 the given vec_perm_builder.
34541 (expand_vec_perm_var): Update vec_perm_builder constructor.
34542 (expand_mult_highpart): Use vec_perm_builder instead of
34543 auto_vec_perm_indices.
34544 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
34545 vec_perm_indices instead of auto_vec_perm_indices. Use a single
34546 or double series encoding as appropriate.
34547 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
34548 vec_perm_indices instead of auto_vec_perm_indices.
34549 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34550 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34551 (vect_permute_store_chain): Likewise.
34552 (vect_grouped_load_supported): Likewise.
34553 (vect_permute_load_chain): Likewise.
34554 (vect_shift_permute_load_chain): Likewise.
34555 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34556 (vect_transform_slp_perm_load): Likewise.
34557 (vect_schedule_slp_instance): Likewise.
34558 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34559 (vectorizable_mask_load_store): Likewise.
34560 (vectorizable_bswap): Likewise.
34561 (vectorizable_store): Likewise.
34562 (vectorizable_load): Likewise.
34563 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
34564 vec_perm_indices instead of auto_vec_perm_indices. Use
34565 tree_to_vec_perm_builder to read the vector from a tree.
34566 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
34567 vec_perm_builder instead of a vec_perm_indices.
34568 (have_whole_vector_shift): Use vec_perm_builder and
34569 vec_perm_indices instead of auto_vec_perm_indices. Leave the
34570 truncation to calc_vec_perm_mask_for_shift.
34571 (vect_create_epilog_for_reduction): Likewise.
34572 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
34573 from auto_vec_perm_indices to vec_perm_indices.
34574 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34575 instead of changing individual elements.
34576 (aarch64_vectorize_vec_perm_const): Use new_vector to install
34577 the vector in d.perm.
34578 * config/arm/arm.c (expand_vec_perm_d::perm): Change
34579 from auto_vec_perm_indices to vec_perm_indices.
34580 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34581 instead of changing individual elements.
34582 (arm_vectorize_vec_perm_const): Use new_vector to install
34583 the vector in d.perm.
34584 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
34585 Update vec_perm_builder constructor.
34586 (rs6000_expand_interleave): Likewise.
34587 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
34588 (rs6000_expand_interleave): Likewise.
34590 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34592 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
34593 to qimode could truncate the indices.
34594 * optabs.c (expand_vec_perm_var): Likewise.
34596 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34598 * Makefile.in (OBJS): Add vec-perm-indices.o.
34599 * vec-perm-indices.h: New file.
34600 * vec-perm-indices.c: Likewise.
34601 * target.h (vec_perm_indices): Replace with a forward class
34603 (auto_vec_perm_indices): Move to vec-perm-indices.h.
34604 * optabs.h: Include vec-perm-indices.h.
34605 (expand_vec_perm): Delete.
34606 (selector_fits_mode_p, expand_vec_perm_var): Declare.
34607 (expand_vec_perm_const): Declare.
34608 * target.def (vec_perm_const_ok): Replace with...
34609 (vec_perm_const): ...this new hook.
34610 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
34611 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
34612 * doc/tm.texi: Regenerate.
34613 * optabs.def (vec_perm_const): Delete.
34614 * doc/md.texi (vec_perm_const): Likewise.
34615 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
34616 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
34617 expand_vec_perm for constant permutation vectors. Assert that
34618 the mode of variable permutation vectors is the integer equivalent
34619 of the mode that is being permuted.
34620 * optabs-query.h (selector_fits_mode_p): Declare.
34621 * optabs-query.c: Include vec-perm-indices.h.
34622 (selector_fits_mode_p): New function.
34623 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
34624 is defined, instead of checking whether the vec_perm_const_optab
34625 exists. Use targetm.vectorize.vec_perm_const instead of
34626 targetm.vectorize.vec_perm_const_ok. Check whether the indices
34627 fit in the vector mode before using a variable permute.
34628 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
34629 vec_perm_indices instead of an rtx.
34630 (expand_vec_perm): Replace with...
34631 (expand_vec_perm_const): ...this new function. Take the selector
34632 as a vec_perm_indices rather than an rtx. Also take the mode of
34633 the selector. Update call to shift_amt_for_vec_perm_mask.
34634 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
34635 Use vec_perm_indices::new_expanded_vector to expand the original
34636 selector into bytes. Check whether the indices fit in the vector
34637 mode before using a variable permute.
34638 (expand_vec_perm_var): Make global.
34639 (expand_mult_highpart): Use expand_vec_perm_const.
34640 * fold-const.c: Includes vec-perm-indices.h.
34641 * tree-ssa-forwprop.c: Likewise.
34642 * tree-vect-data-refs.c: Likewise.
34643 * tree-vect-generic.c: Likewise.
34644 * tree-vect-loop.c: Likewise.
34645 * tree-vect-slp.c: Likewise.
34646 * tree-vect-stmts.c: Likewise.
34647 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
34649 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
34650 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
34651 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
34652 (aarch64_vectorize_vec_perm_const): ...this new function.
34653 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34654 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34655 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
34656 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
34657 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34658 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34659 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
34661 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
34662 check for NEON modes.
34663 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
34664 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
34665 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
34666 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
34668 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
34669 the old VEC_PERM_CONST conditions.
34670 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
34671 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
34672 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
34673 (ia64_vectorize_vec_perm_const_ok): Merge into...
34674 (ia64_vectorize_vec_perm_const): ...this new function.
34675 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
34676 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
34677 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
34678 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
34679 * config/mips/mips.c (mips_expand_vec_perm_const)
34680 (mips_vectorize_vec_perm_const_ok): Merge into...
34681 (mips_vectorize_vec_perm_const): ...this new function.
34682 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
34683 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
34684 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
34685 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
34686 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
34687 (rs6000_expand_vec_perm_const): Delete.
34688 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
34690 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34691 (altivec_expand_vec_perm_const_le): Take each operand individually.
34692 Operate on constant selectors rather than rtxes.
34693 (altivec_expand_vec_perm_const): Likewise. Update call to
34694 altivec_expand_vec_perm_const_le.
34695 (rs6000_expand_vec_perm_const): Delete.
34696 (rs6000_vectorize_vec_perm_const_ok): Delete.
34697 (rs6000_vectorize_vec_perm_const): New function.
34698 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34699 an element count and rtx array.
34700 (rs6000_expand_extract_even): Update call accordingly.
34701 (rs6000_expand_interleave): Likewise.
34702 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
34703 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
34704 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
34705 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
34706 (rs6000_expand_vec_perm_const): Delete.
34707 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34708 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34709 (altivec_expand_vec_perm_const_le): Take each operand individually.
34710 Operate on constant selectors rather than rtxes.
34711 (altivec_expand_vec_perm_const): Likewise. Update call to
34712 altivec_expand_vec_perm_const_le.
34713 (rs6000_expand_vec_perm_const): Delete.
34714 (rs6000_vectorize_vec_perm_const_ok): Delete.
34715 (rs6000_vectorize_vec_perm_const): New function. Remove stray
34716 reference to the SPE evmerge intructions.
34717 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34718 an element count and rtx array.
34719 (rs6000_expand_extract_even): Update call accordingly.
34720 (rs6000_expand_interleave): Likewise.
34721 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
34722 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
34724 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34726 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34728 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
34729 vector mode and that that mode matches the mode of the data
34731 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
34732 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
34733 directly using expand_vec_perm_1 when forcing selectors into
34735 (expand_vec_perm_var): New function, split out from expand_vec_perm.
34737 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34739 * optabs-query.h (can_vec_perm_p): Delete.
34740 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
34741 * optabs-query.c (can_vec_perm_p): Split into...
34742 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
34743 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
34744 particular selector is valid.
34745 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34746 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34747 (vect_grouped_load_supported): Likewise.
34748 (vect_shift_permute_load_chain): Likewise.
34749 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34750 (vect_transform_slp_perm_load): Likewise.
34751 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34752 (vectorizable_bswap): Likewise.
34753 (vect_gen_perm_mask_checked): Likewise.
34754 * fold-const.c (fold_ternary_loc): Likewise. Don't take
34755 implementations of variable permutation vectors into account
34756 when deciding which selector to use.
34757 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
34758 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
34759 with a false third argument.
34760 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
34761 to test whether the constant selector is valid and can_vec_perm_var_p
34762 to test whether a variable selector is valid.
34764 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34766 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
34767 * optabs-query.c (can_vec_perm_p): Likewise.
34768 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
34769 instead of vec_perm_indices.
34770 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
34771 (vect_gen_perm_mask_checked): Likewise,
34772 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
34773 (vect_gen_perm_mask_checked): Likewise,
34775 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34777 * optabs-query.h (qimode_for_vec_perm): Declare.
34778 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
34779 (qimode_for_vec_perm): ...this new function.
34780 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
34782 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34784 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
34785 does not have a conditional at the top.
34787 2018-01-02 Richard Biener <rguenther@suse.de>
34789 * ipa-inline.c (big_speedup_p): Fix expression.
34791 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
34794 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
34797 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
34801 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
34802 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
34803 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
34804 cond_taken_branch_cost 3->4.
34806 2018-01-01 Jakub Jelinek <jakub@redhat.com>
34808 PR tree-optimization/83581
34809 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
34810 TODO_cleanup_cfg if any changes have been made.
34812 PR middle-end/83608
34813 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
34814 convert_modes if target mode has the right side, but different mode
34817 PR middle-end/83609
34818 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
34819 last argument when extracting from CONCAT. If either from_real or
34820 from_imag is NULL, use expansion through memory. If result is not
34821 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
34822 the parts directly to inner mode, if even that fails, use expansion
34825 PR middle-end/83623
34826 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
34827 check for bswap in mode rather than HImode and use that in expand_unop
34830 Copyright (C) 2018 Free Software Foundation, Inc.
34832 Copying and distribution of this file, with or without modification,
34833 are permitted in any medium without royalty provided the copyright
34834 notice and this notice are preserved.