Properly mark lambdas in GCOV (PR gcov-profile/86109).
[official-gcc.git] / gcc / ChangeLog
bloba6e1a8ebdf0d74463db36ade34925bc46bf12654
1 2018-10-03  Martin Liska  <mliska@suse.cz>
3         PR gcov-profile/86109
4         * coverage.c (coverage_begin_function): Do not
5         mark lambdas as artificial.
6         * tree-core.h (struct GTY): Remove tm_clone_flag
7         and introduce new lambda_function.
8         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
10 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
12         PR target/87474
13         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
14         P8_VECTOR and VSX are enabled.
16 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
18         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
19         0x3907 as CPU model number.
21 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
23         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
24         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
25         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
26         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
27         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
28         * config/s390/s390.md: Likewise. Rename also the cpu attribute
29         value from arch12 to z14.
31 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
33         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
34         (isinfxf2): Ditto.
35         (isinf<mode>2): Ditto.
37 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
39         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
40         before emitting fxam.  Perform calculations in XFmode.
42 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
44         * match.pd (((X /[ex] A) +- B) * A): New transformation.
46 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
48         PR middle-end/87319
49         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
50         * tree.c (signed_or_unsigned_type_for): Handle complex.
52 2018-10-02  Jeff Law  <law@redhat.com>
54         * gimple-fold.c (get_range_strlen): Remove dead code.
56 2018-10-02  Martin Sebor  <msebor@redhat.com>
57             Jeff Law  <law@redhat.com>
59         * builtins.c (unterminated_array): Add new arguments.
60         If argument is not terminated, bubble up size and exact
61         state to callers.
62         (expand_builtin_strnlen): Detect, avoid expanding
63         and diagnose unterminated arrays.
64         (c_strlen): Fill in offset of start of unterminated strings.
65         * builtins.h (unterminated_array): Update prototype.
67 2018-10-02  Richard Biener  <rguenther@suse.de>
69         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
70         of haddv4df, first reduce to SSE width and exploit the fact
71         that we only need element zero with the reduction result.
72         (reduc_plus_scal_v2df): Likewise.
74 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
76         * dojump.h (do_jump): Delete.
77         (do_jump_1): Likewise.
78         (split_comparison): Move around.
79         * dojump.c (do_jump): Make static.
80         (do_jump_1): Likewise.
81         (jumpifnot): Move around.
82         (jumpifnot_1): Likewise.
83         (jumpif): Likewise.
84         (jumpif_1): Likewise.
85         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
87 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
89         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
90         insns in the delay slot and add_insn_after for the jump insn.
92 2018-10-02  Richard Biener  <rguenther@suse.de>
94         * tree-inline.c (expand_call_inline): Use the location of
95         the callee declaration for the inline-entry marker.
96         * final.c (notice_source_line): Remove special-casing of
97         NOTE_INSN_INLINE_ENTRY.
99 2018-10-01  Carl Love  <cel@us.ibm.com>
101         PR 69431
102         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
103         (__builtin_mtfsb0): New.
104         (__builtin_mtfsb1): New.
105         ( __builtin_set_fpscr_rn): New.
106         (__builtin_set_fpscr_drn): New.
107         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
108         (rs6000_expand_set_fpscr_rn_builtin): Add.
109         (rs6000_expand_set_fpscr_drn_builtin): Add.
110         (rs6000_expand_builtin): Add case statement entries for
111         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
112         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
113         RS6000_BUILTIN_MFFSL.
114         (rs6000_init_builtins): Add ftype initialization and def_builtin
115         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
116         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
117         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
118         rs6000_mffscdrn): Add define_insn.
119         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
120         * doc/extend.texi: Add documentation for the builtins.
122 2018-10-01  Richard Biener  <rguenther@suse.de>
124         PR tree-optimization/87465
125         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
126         causing branch miscounts.
128 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
130         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
131         aarch64_option_default_param):  New.
132         (params.h): Include.
133         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
134         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
135         stack-clash protection validation code.
137 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
139         * params.c (validate_param): New.
140         (add_params): Use it.
141         (set_param_value): Refactor param validation into validate_param.
142         (diagnostic.h): Include.
143         * diagnostic.h (diagnostic_ready_p): New.
145 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
147         * params.c (set_param_value):
148         Add index of parameter being validated.
149         * common/common-target.def (option_validate_param): New.
150         * common/common-targhooks.h (default_option_validate_param): New.
151         * common/common-targhooks.c (default_option_validate_param): New.
152         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
153         * doc/tm.texi: Regenerate.
155 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
157         PR target/86486
158         * config/aarch64/aarch64.c (aarch64_override_options_internal):
159         Add validation for stack-clash parameters and set defaults.
161 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
163         PR target/86486
164         * configure.ac: Add stack-clash-protection-guard-size.
165         * doc/install.texi: Document it.
166         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
167         * params.def: Update comment for guard-size.
168         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
169         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
170         * configure: Regenerate.
172 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
174         PR target/86486
175         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
176         STACK_DYNAMIC_OFFSET): New.
177         * config/aarch64/aarch64.c (aarch64_layout_frame):
178         Update outgoing args size.
179         (aarch64_stack_clash_protection_alloca_probe_range,
180         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
182 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
184         PR target/86486
185         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
186         probe ranges.
187         * target.def (stack_clash_protection_alloca_probe_range): New.
188         (stack_clash_protection_final_dynamic_probe): Remove.
189         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
190         (default_stack_clash_protection_final_dynamic_probe): Remove.
191         * targhooks.c: Likewise.
192         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
193         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
194         * doc/tm.texi: Regenerate.
196 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
198         PR target/86486
199         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
200         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
201         aarch64_clamp_to_uimm12_shift): New.
202         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
203         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
205 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
207         PR target/86486
208         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
210 2018-10-01  Jeff Law  <law@redhat.com>
211             Richard Sandiford <richard.sandiford@linaro.org>
212             Tamar Christina  <tamar.christina@arm.com>
214         PR target/86486
215         * config/aarch64/aarch64.md
216         (probe_stack_range): Add k (SP) constraint.
217         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
218         STACK_CLASH_MAX_UNROLL_PAGES): New.
219         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
220         stack probes for stack clash.
221         (aarch64_allocate_and_probe_stack_space): New.
222         (aarch64_expand_prologue): Use it.
223         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
224         (aarch64_sub_sp): Add emit_move_imm optional param.
226 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
228         PR tree-optimization/87261
229         * match.pd: Remove trailing whitespace.
230         Add (x & y) | ~(x | y) -> ~(x ^ y),
231         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
233 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
235         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
236         constraints.
237         (ashlsi3_insn): Update instruction constraints.
238         (ashrsi3_insn): Likewise.
239         (rotrsi3): Likewise.
240         (add_shift): Likewise.
241         * config/arc/constraints.md (Csz): New 32 bit constraint. It
242         avoids placing in the limm field small constants which, otherwise,
243         could end into a small instruction.
245 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
247         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
248         destination register is not odd-even.
249         (umaddsidi4_split): Likewise.
251 2018-10-01  Richard Biener  <rguenther@suse.de>
253         * tree-inline.c (expand_call_inline): Store origin of fn
254         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
255         * tree.c (block_ultimate_origin): Simplify and do some
256         checking.
258 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
260         * config/i386/mmx.md (EMMS): New int iterator.
261         (emms): New int attribute.
262         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
263         EMMS int iterator.  Explicitly declare clobbers.
264         (mmx_emms): Remove expander.
265         (mmx_femms): Ditto.
266         * config/i386/predicates.md (emms_operation): Remove predicate.
267         (vzeroall_pattern): New predicate.
268         (vzeroupper_pattern): Rename from vzeroupper_operation.
269         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
270         vzeroupper_pattern and vzeroall_pattern predicates.
272 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
274         PR rtl-optimization/86939
275         * ira-lives.c (make_hard_regno_born): Rename from this...
276         (make_hard_regno_live): ... to this.  Remove update to conflict
277         information.  Update function comment.
278         (make_hard_regno_dead): Add conflict information update.  Update
279         function comment.
280         (make_object_born): Rename from this...
281         (make_object_live): ... to this.  Remove update to conflict information.
282         Update function comment.
283         (make_object_dead):  Add conflict information update.  Update function
284         comment.
285         (mark_pseudo_regno_live): Call make_object_live.
286         (mark_pseudo_regno_subword_live): Likewise.
287         (mark_hard_reg_dead): Update function comment.
288         (mark_hard_reg_live): Call make_hard_regno_live.
289         (process_bb_node_lives): Likewise.
290         * lra-lives.c (make_hard_regno_born): Rename from this...
291         (make_hard_regno_live): ... to this.  Remove update to conflict
292         information.  Remove now uneeded check_pic_pseudo_p argument.
293         Update function comment.
294         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
295         to conflict information.  Update function comment.
296         (mark_pseudo_live): Remove update to conflict information.  Update
297         function comment.
298         (mark_pseudo_dead): Add conflict information update.
299         (mark_regno_live): Call make_hard_regno_live.
300         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
301         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
303 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
305         PR target/87370
306         * config/i386/i386.c (construct_container): Use TImode for
307         BLKmode values in 2 integer registers.
309 2018-09-29  Jeff Law  <law@redhat.com>
311         * builtins.c (unterminated_array): Pass in c_strlen_data * to
312         c_strlen rather than just a tree *.
313         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
314         Update recursive calls appropriately.  If caller did not provide a
315         suitable data pointer, create a local one.  When a non-terminated
316         string is discovered, bubble up information about the string via the
317         c_strlen_data object.
318         * builtins.h (c_strlen): Update prototype.
319         (c_strlen_data): New structure.
320         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
321         For a type 2 call, if c_strlen indicates a non-terminated string
322         use the length of the non-terminated string.
323         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
325 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
327         PR target/87467
328         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
329         __m512d type for __A argument rather than __m512.
331 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
333         * match.pd (simple_comparison): Don't optimize if either operand is
334         a function pointer when target needs function pointer canonicalization.
336 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
338         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
339         power5 .. power9 to remove indirection.
340         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
341         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
342         ASM_CPU_476_SPEC): Delete.
343         (ASM_CPU_SPEC): Adjust.
344         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
345         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
347 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
349         * config.in: Delete HAVE_AS_DCI.
350         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
351         * config/rs6000/rs6000.h: Ditto.
352         * configure.ac: Delete HAVE_AS_DCI.
353         * configure: Regenerate.
355 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
357         * config.in (HAVE_AS_LWSYNC): Delete.
358         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
359         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
360         do it as a .long .
361         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
362         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
363         as a .long .
364         * configure.ac: Delete HAVE_AS_LWSYNC.
365         * configure: Regenerate.
367 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
368             Pierre-Marie de Rodat  <derodat@adacore.com>
370         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
371         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
372         (cgraph_node::create_thunk): Add indirect_offset parameter.
373         (thunk_adjust): Likewise.
374         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
375         and initialize the corresponding field with it.
376         (cgraph_node::dump): Dump indirect_offset field.
377         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
378         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
379         (thunk_adjust): Add indirect_offset parameter and deal with it.
380         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
381         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
382         or if the thunk is external or local.  Fix formatting.  Do not chain
383         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
384         if any, in the GIMPLE representation.
385         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
386         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
387         (input_node): Read indirect_offset field.
388         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
389         call to thunk_adjust.
390         * tree-nested.c (struct nesting_info): Add thunk_p field.
391         (create_nesting_tree): Set it.
392         (convert_all_function_calls): Copy static chain from targets to thunks.
393         (finalize_nesting_tree_1): Return early for thunks.
394         (unnest_nesting_tree_1): Do not finalize thunks.
395         (gimplify_all_functions): Do not gimplify thunks.
397 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
399         * opt-suggestions.c (option_proposer::build_option_suggestions):
400         Release "option_values".
402 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
404         * coverage.c (get_coverage_counts): Convert problem-reporting dump
405         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
406         * dumpfile.c (kind_as_string): New function.
407         (dump_loc): Rather than a hardcoded prefix of "note: ", use
408         kind_as_string to vary the prefix based on dump_kind.
409         (selftest::test_capture_of_dump_calls): Update for above.
411 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
413         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
414         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
416 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
418         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
419         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
420         INVALID_REGNUM instead of FPSR_REG.
421         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
422         * config/i386/i386.md: Update comment of FP compares.
423         (fldenv): Do not clobber FPSR_REG.
425 2018-09-28  Richard Biener  <rguenther@suse.de>
427         * tree.h (BLOCK_ORIGIN): New.
428         * omp-expand.c (grid_expand_target_grid_body): Assign
429         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
430         * tree-inline.c (remap_block): Likewise.
431         * auto-profile.c (get_function_decl_from_block): Simplify
432         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
433         * langhooks.c (lhd_print_error_function): Likewise.
434         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
435         Likewise.
436         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
437         * tree.c (block_nonartificial_location): Likewise.
438         (block_ultimate_origin): Likewise.
439         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
440         no longer needed LTO case.
442 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
443             Jan Hubicka  <jh@suse.cz>
444             Martin Jambor  <mjambor@suse.cz>
446         * simplify-rtx.c (simplify_merge_mask): New function.
447         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
448         same masks are used in op1 or op2.
449         (test_vec_merge): New function.
450         (test_vector_ops): Call test_vec_merge.
452 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
454         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
455         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
456         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
457         (cypress_costs): Set it.
458         (supersparc_costs): Likewise.
459         (hypersparc_costs): Likewise.
460         (leon_cost): Likewise.
461         (leon3_costs): Likewise.
462         (sparclet_costs): Likewise.
463         (ultrasparc_costs): Likewise.
464         (ultrasparc_costs): Likewise.
465         (niagara_costs): Likewise.
466         (niagara2_costs): Likewise.
467         (niagara3_costs): Likewise.
468         (niagara4_costs): Likewise.
469         (niagara7_costs): Likewise.
470         (m8_costs): Likewise.
471         (TARGET_CAN_FOLLOW_JUMP): Define.
472         (pass_work_around_errata::gate): Minor tweak.
473         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
474         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
475         Automaitcally clear MASK_FSMULD mask for V7 processors.
476         (sparc_can_follow_jump): New static function.
477         (output_ubranch): Deal with CROSSING_JUMP_P.
478         (sparc_use_sched_lookahead): Rewrite using switch statement.
479         (sparc_issue_rate): Reorder.
480         (sparc_branch_cost): New function.
482 2018-09-27  Martin Sebor  <msebor@redhat.com>
484         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
485         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
486         (int_fits_type_p): Same.
488 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
490         * config/i386/i386.md (FPCR_REG): Remove.
491         (UNSPEC_FLDCW): Remove.
492         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
493         (x86_fldcw_1): Remove insn pattern.
494         (fnstenv): Do not clobber FPCR_REG.
495         (fldenv): Ditto.
496         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
497         (CALL_USED_REGISTERS): Ditto.
498         (REG_ALLOC_ORDER): Ditto.
499         (REG_CLASS_CONTENTS): Ditto.
500         (HI_REGISTER_NAMES): Ditto.
501         (ADDITIONAL_REGISTER_NAMES): Use defines instead
502         of numerical constants.
503         * config/i386/i386.c (regclass_map): Remove fpsr register.
504         (dbx_register_map): Ditto.
505         (dbx64_register_map): Ditto.
506         (svr4_dbx_register_map): Ditto.
507         (print_reg): Do not handle FPCR_REG.
509 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
511         PR target/87149
512         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
513         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
514         Delete, always treat as true.
515         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
516         Ditto.  Simplify remaining code.
517         * config/powerpcspe/powerpcspe.h: Ditto.
518         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
519         Simplify remaining code.
520         (rs6000_expand_builtin): Ditto.
521         * config/rs6000/rs6000.h: Ditto.
522         * configure.ac: Ditto.
523         * configure: Regenerate.
525 2018-09-27  Martin Liska  <mliska@suse.cz>
527         * coverage.c (get_coverage_counts): Revert the formatting
528         of missing profile opt info.
530 2018-09-27  Richard Biener  <rguenther@suse.de>
532         PR debug/37801
533         PR debug/87440
534         * dwarf2out.c (set_block_origin_self): Do not mark outermost
535         block as we do not output that.
536         (gen_inlined_subroutine_die): Elide the originally outermost
537         block, matching what we do for concrete instances.
538         (decls_for_scope): Add parameter specifying whether to recurse
539         to subblocks.
541 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
542             Tom de Vries  <tom@codesourcery.com>
544         PR 82089
546         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
547         STORE_FLAG_VALUE == 1.
549 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
551         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
552         constant definitions.
553         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
554         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
555         ("speculation_barrier"): New expander definition.
557 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
559         PR gcov-profile/86957
560         * common.opt: New warning option -Wmissing-profile.
561         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
562         * doc/invoke.texi: Document -Wmissing-profile.
564 2018-09-26  Jim Wilson  <jimw@sifive.com>
566         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
567         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
569 2018-09-26  Martin Sebor  <msebor@redhat.com>
571         * tree.c (zerop): Change return type to bool.
572         (integer_zerop, integer_onep, integer_each_onep): Same.
573         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
574         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
575         (real_onep, real_minus_onep, chain_index): Same.
576         (print_type_hash_statistics, type_list_equal): Same.
577         * tree.h (zerop): Same.
578         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
579         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
580         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
581         (real_onep, real_minus_onep, chain_index): Same.
582         (print_type_hash_statistics, type_list_equal): Same.
584 2018-09-26  Jim Wilson  <jimw@sifive.com>
586         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
588 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
590         PR target/87414
591         * config/i386/i386.c: Include debug.h and dwarf2out.h.
592         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
593         call.
595 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
597         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
599 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
601         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
602         and FP_SECOND_SSE_REGS.
603         (REG_CLASS_NAMES): Ditto.
604         (REG_CLASS_CONTENTS): Ditto.
605         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
606         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
607         (ix86_preferred_output_reload_class): Ditto.
608         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
609         clobber constraint to "=&f".
610         (fix_truncdi_i387): Ditto.
611         (lrintxfdi2): Ditto.
612         (fistdi2_<rounding>): Ditto.
613         (fpremxf4_i387): Change "=u" constraint to "=f".
614         (fprem1xf4_i387): Ditto.
615         (sincosxf3): Ditto.
616         (fptanxf4_i387): Ditto.
617         (fxtractxf3_i387): Ditto.
618         (fscalexf4_i387): Ditto.
619         (atan2xf3): Change "u" constraint to "f".
620         (fyl2xxf3_i387): Ditto.
621         (fyl2xp1xf3_i387): Ditto.
623 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
625         PR target/87439
626         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
627         for removed I387_MASK_PM entity.
630 2018-09-26  Jeff Law  <law@redhat.com>
631         Revert
632         2018-09-26  Alexey Neyman  <stilor@att.net>
634         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
635         headers are no longer pulled in by <isl/val.h>.
637 2018-09-26  Richard Biener  <rguenther@suse.de>
639         PR debug/87443
640         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
641         or concrete instance DIE to the tree.  Create abstract origin
642         attributes also for concrete instances.
644 2018-09-26  Alexey Neyman  <stilor@att.net>
646         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
647         headers are no longer pulled in by <isl/val.h>.
649 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
651         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
652         Use new helper functions.
653         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
654         Use new helper functions.
655         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
656         aarch_mm_needs_release): New declarations.
657         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
658         aarch_mm_needs_release): New.
660 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
662         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
663         (arm32_output_mi_thunk): Deal with long calls.
665 2018-09-26  Richard Biener  <rguenther@suse.de>
667         PR debug/87428
668         PR debug/87362
669         * tree-inline.c (expand_call_inline): When the location
670         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
671         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
672         the inserted BLOCK to make inlined_function_outer_scope_p
673         recognize it.
674         * dwarf2out.c (add_call_src_coords_attributes): Do not add
675         coords for reserved locations.
677 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
679         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
680         (*call_indirect_nonlocal_sysv<mode>): Ditto.
681         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
682         (*sibcall_nonlocal_sysv<mode>): Ditto.
683         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
684         (<bd>_<mode>): Ditto.
685         (<bd>tf_<mode>): Ditto.
687 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
689         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
690         control string as a list of templates instead of as C code.
691         (*altivec_movti): Ditto.
692         * config/rs6000/darwin.md (movdf_low_di): Ditto.
694 2018-09-25  Jim Wilson  <jimw@sifive.com>
696         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
697         when target symbol is weak.
699 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
701         PR c/87387
702         * builtins.c (unterminated_array): Simplify.
703         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
704         where pointer arithmetic is safe.
706 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
708         PR target/86987
709         * config/rs6000/altivec.md (altivec_vspltb): Use
710         const_0_to_15_operand instead of u5bit_cint_operand.
711         (*altivec_vspltb_internal): Ditto.
712         (altivec_vspltb_direct): Ditto.
713         (altivec_vsplth): Use const_0_to_7_operand instead of
714         u5bit_cint_operand.
715         (*altivec_vsplth_internal): Ditto.
716         (altivec_vsplth_direct): Ditto.
717         (altivec_vspltw): Use const_0_to_3_operand instead of
718         u5bit_cint_operand.
719         (*altivec_vspltw_internal): Ditto.
720         (altivec_vspltw_direct): Ditto.
721         (altivec_vspltsf): Ditto.
722         (*altivec_vspltsf_internal): Ditto.
723         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
724         various splats with the proper size immediate.  Reorder the various
725         cases by ascending size of immediate, and put all such together.
727 2018-09-25  Richard Biener  <rguenther@suse.de>
729         PR debug/83941
730         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
731         GC-ification.
732         (maybe_create_die_with_external_ref): Do not create
733         DW_TAG_imported_unit here.
734         (add_abstract_origin_attribute): Handle external BLOCK refs.
735         (dwarf2out_abstract_function): Simplify LTO case.
736         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
737         rather than using maybe_create_die_with_external_ref.
739 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
741         PR target/71278
742         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
743         (frndintxf2_mask_pm_i387): Ditto.
744         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
745         Enable for !flag_trapping_math.
746         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
747         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
748         Change operand 1 predicate to nonimmediate_operand.
749         (attr "i387_cw"): Remove mask_pm.
750         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
751         (enum ix86_entity): Remove I387_MASK_PM.
752         * config/i386/i386.c (ix86_i387_mode_needed): Do not
753         handle I387_MASK_PM.
754         (ix86_mode_needed): Ditto.
755         (ix86_mode_after): Ditto.
756         (ix86_mode_entry): Ditto.
757         (ix86_mode_exit): Ditto.
758         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
760 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
762         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
763         to_update_switch_stmts to vNULL instead of calling create on them
764         immediately.
766 2018-09-25  Richard Biener  <rguenther@suse.de>
768         PR tree-optimization/87402
769         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
770         (visit_phi): Re-instantiate handling of supposed to be VARYING
771         but non-VARYING backedge value.
773 2018-09-25  Richard Biener  <rguenther@suse.de>
775         PR debug/83941
776         * dwarf2out.c (struct sym_off_pair): New.
777         (external_die_map): New global.
778         (lookup_decl_die): When in LTO create DIEs lazily from the
779         external_die_map.
780         (lookup_block_die): New function, create DIEs lazily in LTO.
781         (equate_block_to_die): New function.
782         (dwarf2out_die_ref_for_decl): During WPA get the association
783         from the external DIE map.
784         (dwarf2out_register_external_die): Record mapping into the
785         external DIE map.
786         (maybe_create_die_with_external_ref): New function split out from
787         DIE generation part of old dwarf2out_register_external_die.
788         (add_abstract_origin_attribute): Do not return the DIE.  When
789         in LTO reference externals directly.
790         (dwarf2out_abstract_function): When in LTO ignore calls for
791         decls with external DIEs (already present abstract instances).
792         (gen_call_site_die): Adjust.
793         (add_high_low_attributes): Likewise.
794         (gen_lexical_block_die): Likewise.
795         (gen_inlined_subroutine_die): Likewie.
796         (gen_block_die): Likewise.
797         (dwarf2out_inline_entry): Likewise.
798         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
799         DIEs.
801 2018-09-25  Martin Liska  <mliska@suse.cz>
803         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
804         integers and not by a float value.
806 2018-09-25  Martin Liska  <mliska@suse.cz>
808         PR fortran/87394
809         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
810         instead of NULL.
811         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
812         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
813         * godump.c (go_format_type): Remove extra parenthesis.
815 2018-09-25  Martin Liska  <mliska@suse.cz>
817         * alias.c (set_dest_equal_p): Remove unused function.
818         * config/i386/i386.c (def_builtin_pure2): Likewise.
819         * diagnostic-show-locus.c (class layout): Remove
820         unused field.
821         (layout::layout): Likewise here.
822         * dump-context.h (class temp_dump_context): Likewise.
823         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
824         (add_AT_loclistsptr): Likewise.
825         (add_AT_offset): Likewise.
826         (get_AT_hi_pc): Likewise.
827         (is_comdat_die): Likewise.
828         (type_is_enum): Likewise.
829         (ceiling): Likewise.
830         (add_AT_vms_delta): Likewise.
831         (is_class_die): Likewise.
832         * edit-context.c (class line_event): Remove unused field.
833         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
834         unused function.
835         * ipa-cp.c (ipa_get_vr_lat): Likewise.
836         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
837         (ok_for_base_p_nonstrict): Likewise.
838         * tree-chrec.c (is_not_constant_evolution): Likewise.
839         (chrec_fold_poly_cst): Likewise.
840         * tree-if-conv.c (has_pred_critical_p): Likewise.
841         * tree-ssa-coalesce.c (print_exprs): Likewise.
842         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
843         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
844         * tree-vrp.c (value_ranges_intersect_p): Likewise.
845         (value_range_nonnegative_p): Likewise.
847 2018-09-25  Martin Liska  <mliska@suse.cz>
849         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
850         Do not handle "GNU Pascal".
851         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
852         Likewise.
853         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
854         from documentation. Likewise.
855         * dbxout.c (dbxout_range_type): Likewise.
856         * doc/cpp.texi: Likewise.
857         * doc/extend.texi: Likewise.
858         * doc/frontends.texi: Likewise.
859         * doc/invoke.texi: Remove Pascal entry.
860         * tree.def (CLEANUP_POINT_EXPR): Likewise.
861         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
863 2018-09-25  Martin Liska  <mliska@suse.cz>
865         PR middle-end/86078
866         * doc/invoke.texi: Document all parameters and remove default
867         of the parameters.
869 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
871         PR bootstrap/87417
872         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
873         contains HOST_WIDE_INTs when computing its size.
875 2018-09-24  Jim Wilson  <jimw@sifive.com>
877         PR target/87391
878         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
879         not TARGET_RVE.
880         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
882 2018-09-24  Andrew Pinski  <apinski@marvell.com>
884         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
885         access prev before checking it for NULLness in the
886         AARCH64_FUSE_CMP_BRANCH case.
888 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
890         PR target/82699
891         * config/i386/i386.c (rest_of_insert_endbranch): Set
892         endbr_queued_at_entrance to true and don't insert ENDBR if
893         x86_function_profiler will be called.
894         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
895         is true.
896         * config/i386/i386.h (machine_function): Add
897         endbr_queued_at_entrance.
899 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
901         * genattrtab.c (mk_attr_alt): Use alternative_mask.
902         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
903         types.
904         (check_attr_test): Use alternative_mask.
905         (get_attr_value): Likewise.
906         (compute_alternative_mask): Use alternative_mask and XWINT.
907         (make_alternative_compare): Use alternative_mask.
908         (attr_alt_subset_p): Use XWINT.
909         (attr_alt_subset_of_compl_p): Likewise.
910         (attr_alt_intersection): Use alternative_mask and XWINT.
911         (attr_alt_union): Likewise.
912         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
913         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
914         (simplify_test_exp): Use alternative_mask and XWINT.
915         (write_test_expr): Use alternative_mask and XWINT, adjust bit
916         number calculation to support 64 bits.  Generate code that
917         checks 64-bit masks.
918         (main): Use alternative_mask.
919         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
921 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
923         PR target/80080
924         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
925         RETURN+USE when returning via %r14.
927 2018-09-24  Martin Liska  <mliska@suse.cz>
929         * gcov.c (output_lines): Print colorization legend
930         for both flag_use_colors and flag_use_hotness_colors.
931         Reword the help.
933 2018-09-24  Martin Liska  <mliska@suse.cz>
935         * coverage.c (get_coverage_counts): Use warning_at
936         with current_function_decl location. Use %qD in warning
937         message.
939 2018-09-24  Martin Liska  <mliska@suse.cz>
941         * memory-block.h (memory_block_pool::release): Annotate with
942         valgrind that the memory is not accessible.
944 2018-09-24  Martin Liska  <mliska@suse.cz>
946         PR sanitizer/85774
947         * asan.c: Make asan_handled_variables extern.
948         * asan.h: Likewise.
949         * cfgexpand.c (expand_stack_vars): Make sure
950         a representative is unpoison if another
951         variable in the partition is handled by
952         use-after-scope sanitization.
954 2018-09-24  Richard Biener  <rguenther@suse.de>
956         PR tree-optimization/63155
957         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
958         the worklist when the edge of the respective argument isn't
959         executable.
961 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
963         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
964         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
965         (MASK_CLASS_P): Update for rename.
966         (MAYBE_MASK_CLASS_P): Ditto.
967         (REG_CLASS_NAMES): Update.
968         (REG_CLASS_CONTENT): Update.
969         * config/i386/i386.c (regclass_map): Update for MASK_REG
970         and ALL_MASK_REGS rename.
971         * config/i386/constraints.md (Yk): Update for rename.
972         (k): Ditto.
974 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
976         * config/i386/i386.h (enum reg_class): Remove
977         EVEX_SSE_REGS and MOD4_SSE_REGS.
978         (REG_CLASS_NAMES): Update.
979         (REG_CLASS_CONTENT): Update.
980         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
981         registers as ALL_SSE_REGS.
982         (ix86_additional_allocno_class_p): Remove.
983         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
984         (ix86_register_priority): Lower priority of EVEX SSE registers.
985         Use IN_RANGE macro where appropriate.
986         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
987         AVX-5124VNNIW checks.
988         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
989         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
990         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
991         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
992         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
993         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
994         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
995         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
996         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
997         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
998         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
999         * config/i386/constraints.md (Yh): Remove.
1001 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
1003         * config/i386/i386.c (regclass_map): Declare integer REX registers
1004         as GENERAL_REGS.
1006 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
1008         * doc/service.texi (Service): Switch the fsf.org link to https.
1010 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1012         PR target/86798
1013         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1014         Define to speculation_safe_value_not_needed.
1016 2018-09-21  Florian Weimer  <fweimer@redhat.com>
1018         PR middle-end/81035
1019         * doc/extend.texi (Common Function Attributes): Mention that
1020         noreturn suppresses tail call optimization.
1022 2018-09-21  Jeff Law  <law@redhat.com>
1024         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1025         vr_values::cleanup_edges_and_switches.
1026         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1027         vr_values class.
1028         (identify_jump_threads): Remove EDGE_IGNORE handling.
1029         (execute_vrp): Move handling of to_remove_edges and
1030         to_update_switch_stmts into vr_values class member functions.
1031         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1032         (to_update_switch_stmts): Likewise.
1033         * vr-values.c: Include cfghooks.h.
1034         (vr_values::vr_values): Initialize to_remove_edges and
1035         to_update_switch_stmts.
1036         (vr_values::~vr_values): Verify to_remove_edges and
1037         to_update_switch_stmts are empty.
1038         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1039         (vr_values::cleanup_edges_and_switches): New member function.
1040         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1041         function.  Add new data members.
1043 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
1045         PR tree-optimization/87309
1046         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1047         calls with pflags and alt_flags.
1048         (selftest::test_capture_of_dump_calls): Add test of interaction of
1049         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1051 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1053         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1055 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1057         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1059 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1061         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1062         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1063         (VXWORKS_LIBS_RTP): Minor reordering.
1065 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1067         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1068         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1070 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1072         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1073         (PTRDIFF_TYPE): Likewise.
1075 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1077         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1078         triplet, similar to support for VxWorks7.
1079         * config/vxworks-dummy.h: Provide a default definition
1080         of TARGET_VXWORKS64 to 0.
1082 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1084         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1085         * config/vxworks-dummy.h: here.
1087 2018-09-21  Olivier Hainque  <hainque@adacore.com>
1089         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1091 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
1092             Bo Zhou  <zbo.zhou@hisilicon.com>
1094         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1095         * config/aarch64/aarch64-tune.md: Regenerated.
1096         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1097         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1098         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1100 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
1101             Julian Brown  <julian@codesourcery.com>
1103         * builtins.c (get_builtin_sync_mem): Handle address spaces.
1105 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1107         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1108         if the call takes a static chain.
1110 2018-09-21  Martin Liska  <mliska@suse.cz>
1112         * auto-profile.c (autofdo_source_profile::read): Do not
1113         set sum_all.
1114         (read_profile): Do not add working sets.
1115         (read_autofdo_file): Remove sum_all.
1116         (afdo_callsite_hot_enough_for_early_inline): Remove const
1117         qualifier.
1118         * coverage.c (struct counts_entry): Remove gcov_summary.
1119         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1120         do not support GCOV_TAG_PROGRAM_SUMMARY.
1121         (get_coverage_counts): Remove summary and expected
1122         arguments.
1123         * coverage.h (get_coverage_counts): Likewise.
1124         * doc/gcov-dump.texi: Remove -w option.
1125         * gcov-dump.c (dump_working_sets): Remove.
1126         (main): Do not support '-w' option.
1127         (print_usage): Likewise.
1128         (tag_summary): Likewise.
1129         * gcov-io.c (gcov_write_summary): Do not dump
1130         histogram.
1131         (gcov_read_summary): Likewise.
1132         (gcov_histo_index): Remove.
1133         (gcov_histogram_merge): Likewise.
1134         (compute_working_sets): Likewise.
1135         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1136         it not obsolete.
1137         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1138         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1139         (GCOV_HISTOGRAM_SIZE): Remove.
1140         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1141         (struct gcov_summary): Simplify rapidly just
1142         to runs and sum_max fields.
1143         (gcov_histo_index): Remove.
1144         (NUM_GCOV_WORKING_SETS): Likewise.
1145         (compute_working_sets): Likewise.
1146         * gcov-tool.c (print_overlap_usage_message): Remove
1147         trailing empty line.
1148         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1149         (output_lines): Remove program related line.
1150         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1151         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
1152         histogram.
1153         (input_profile_summary): Do not read it.
1154         (merge_profile_summaries): And do not merge it.
1155         (input_symtab): Do not call removed function.
1156         * modulo-sched.c (sms_schedule): Do not print sum_max.
1157         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
1158         removed when histogram method was invented.
1159         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
1160         mode.
1161         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
1162         GCOV coding style.
1163         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
1164         and dump selected value.
1165         * profile.c (add_working_set): Remove.
1166         (get_working_sets): Likewise.
1167         (find_working_set): Likewise.
1168         (get_exec_counts): Do not work with working sets.
1169         (read_profile_edge_counts): Do not inform as sum_max is removed.
1170         (compute_branch_probabilities): Likewise.
1171         (compute_value_histograms): Remove argument for call of
1172         get_coverage_counts.
1173         * profile.h: Do not make gcov_summary const.
1175 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
1177         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
1179 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
1181         PR tree-optimization/86990
1182         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
1183         Check that the entire merged store group is made of constants only for
1184         overlapping stores.
1186 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1188         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
1189         (VTABLE_VERIFICATION_SPEC): Likewise.
1190         (SANITIZER_EARLY_SPEC): Likewise.
1191         (SANITIZER_SPEC): Likewise.
1192         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
1193         * doc/invoke.texi (Link Options): Document -r.
1195 2018-09-20  Richard Biener <rguenther@suse.de>
1197         PR middle-end/87054
1198         * gimplify.c (gimplify_expr): Retain alignment of
1199         addressable lvalue in dereference.
1201 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
1203         PR bootstrap/87013
1204         * configure.ac: Check for .loc is_stmt support.
1205         * configure, config.in: Rebuilt.
1206         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
1207         if not supported.
1209 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
1211         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
1212         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
1213         -misel=no.
1215 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
1217         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1218         VECTOR_OTHER.
1219         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
1220         case VECTOR_OTHER.
1222 2018-09-20  Marek Polacek  <polacek@redhat.com>
1224         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
1226 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
1228         PR tree-optimization/87288
1229         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
1230         into account when determining PEELING_FOR_NITERS.
1232 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
1234         PR tree-optimization/86877
1235         * tree-vect-loop.c (vect_analyze_loop_2): Call
1236         vect_verify_datarefs_alignment.
1238 2018-09-19  Marek Polacek  <polacek@redhat.com>
1240         * doc/invoke.texi: Document -Wclass-conversion.
1242 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
1244         * config/pa/pa.c (pa_adjust_priority): Delete.
1245         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
1247         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
1248         (atomic_storehi): Likewise.
1249         (atomic_storesi): Likewise.
1250         (atomic_loaddi): Restore compare and swap exchange loop code.
1252 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
1254         PR rtl-optimization/86902
1255         * combine.c (try_combine): When changing the CC mode used, don't change
1256         an unrelated mode in other_insn to that new CC mode.
1258 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
1260         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
1261         with %T in place of calls to dump_generic_expr.
1262         (prune_runtime_alias_test_list): Likewise.
1263         (create_runtime_alias_checks): Likewise.
1264         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
1265         (vect_analyze_data_ref_dependence): Likewise.
1266         (vect_slp_analyze_data_ref_dependence): Likewise.
1267         (vect_record_base_alignment): Likewise.  Use %G in place of call
1268         to dump_gimple_stmt.
1269         (vect_compute_data_ref_alignment): Likewise.
1270         (verify_data_ref_alignment): Likewise.
1271         (vect_find_same_alignment_drs): Likewise.
1272         (vect_analyze_group_access_1): Likewise.
1273         (vect_analyze_data_ref_accesses): Likewise.
1274         (dependence_distance_ge_vf): Likewise.
1275         (dump_lower_bound): Likewise.
1276         (vect_prune_runtime_alias_test_list): Likewise.
1277         (vect_find_stmt_data_reference): Likewise.
1278         (vect_analyze_data_refs): Likewise.
1279         (vect_create_addr_base_for_vector_ref): Likewise.
1280         (vect_create_data_ref_ptr): Likewise.
1281         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
1282         (vect_can_advance_ivs_p): Likewise.
1283         (vect_update_ivs_after_vectorizer): Likewise.
1284         (vect_gen_prolog_loop_niters): Likewise.
1285         (vect_prepare_for_masked_peels): Likewise.
1286         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1287         (vect_determine_vectorization_factor): Likewise.
1288         (vect_is_simple_iv_evolution): Likewise.
1289         (vect_analyze_scalar_cycles_1): Likewise.
1290         (vect_analyze_loop_operations): Likewise.
1291         (report_vect_op): Likewise.
1292         (vect_is_slp_reduction): Likewise.
1293         (check_reduction_path): Likewise.
1294         (vect_is_simple_reduction): Likewise.
1295         (vect_create_epilog_for_reduction): Likewise.
1296         (vect_finalize_reduction:): Likewise.
1297         (vectorizable_induction): Likewise.
1298         (vect_transform_loop_stmt): Likewise.
1299         (vect_transform_loop): Likewise.
1300         (optimize_mask_stores): Likewise.
1301         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
1302         (vect_split_statement): Likewise.
1303         (vect_recog_over_widening_pattern): Likewise.
1304         (vect_recog_average_pattern): Likewise.
1305         (vect_determine_min_output_precision_1): Likewise.
1306         (vect_determine_precisions_from_range): Likewise.
1307         (vect_determine_precisions_from_users): Likewise.
1308         (vect_mark_pattern_stmts): Likewise.
1309         (vect_pattern_recog_1): Likewise.
1310         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1311         (vect_record_max_nunits): Likewise.
1312         (vect_build_slp_tree_1): Likewise.
1313         (vect_build_slp_tree_2): Likewise.
1314         (vect_print_slp_tree): Likewise.
1315         (vect_analyze_slp_instance): Likewise.
1316         (vect_detect_hybrid_slp_stmts): Likewise.
1317         (vect_detect_hybrid_slp_1): Likewise.
1318         (vect_slp_analyze_operations): Likewise.
1319         (vect_slp_analyze_bb_1): Likewise.
1320         (vect_transform_slp_perm_load): Likewise.
1321         (vect_schedule_slp_instance): Likewise.
1322         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1323         (vect_mark_stmts_to_be_vectorized): Likewise.
1324         (vect_init_vector_1): Likewise.
1325         (vect_get_vec_def_for_operand): Likewise.
1326         (vect_finish_stmt_generation_1): Likewise.
1327         (vect_check_load_store_mask): Likewise.
1328         (vectorizable_call): Likewise.
1329         (vectorizable_conversion): Likewise.
1330         (vectorizable_operation): Likewise.
1331         (vectorizable_load): Likewise.
1332         (vect_analyze_stmt): Likewise.
1333         (vect_is_simple_use): Likewise.
1334         (vect_get_vector_types_for_stmt): Likewise.
1335         (vect_get_mask_type_for_stmt): Likewise.
1336         * tree-vectorizer.c (increase_alignment): Likewise.
1338 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
1340         * doc/rtl.texi: Adjust vec_select description.
1341         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
1342         non-constant selectors.
1344 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
1346         * config/aarch64/aarch64-protos.h
1347         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
1348         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
1349         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
1350         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
1351         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
1352         (AARCH64_FL_PROFILE): Move index so flags are ordered.
1353         (AARCH64_ISA_RCPC8_4): New flag.
1354         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
1355         to aarch64_offset_9bit_signed_unscaled_p.
1356         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
1357         and use stlur.
1358         * config/aarch64/constraints.md (Ust): New constraint.
1359         * config/aarch64/predicates.md.
1360         (aarch64_9bit_offset_memory_operand): New predicate.
1361         (aarch64_rcpc_memory_operand): New predicate.
1363 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
1365         PR rtl-optimization/87361
1366         * rtlanal.c (nonzero_bits1): Revert accidental change.
1368 2018-09-19  Richard Biener  <rguenther@suse.de>
1370         PR tree-optimization/87349
1371         PR tree-optimization/87342
1372         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
1374 2018-09-18  Marek Polacek  <polacek@redhat.com>
1376         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
1377         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
1379 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
1381         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
1383 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
1385         PR rtl-optimization/86882
1386         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
1388 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
1390         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
1391         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
1393 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
1395         PR other/87353
1396         * doc/invoke.texi (Link Options): Fix formatting and grammar.
1398 2018-09-18  Richard Biener  <rguenther@suse.de>
1400         PR middle-end/63155
1401         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
1402         (compute_samebase_partition_bases): Likewise.
1403         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
1404         (gimple_can_coalesce_p): Simplify.
1406 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
1408         Handle a library implementation of ffs calling __builtin_ffs.
1409         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
1410         (mmix_init_libfuncs): New function: make __builtin_ffs expand
1411         to __ffsdi2.
1413 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
1415         * diagnostic-show-locus.c (class layout_range): Add field
1416         "m_original_idx".
1417         (layout_range::layout_range): Add "original_idx" param and use it
1418         to initialize new field.
1419         (make_range): Use 0 for original_idx.
1420         (layout::layout): Pass in index to calls to
1421         maybe_add_location_range.
1422         (layout::maybe_add_location_range): Add param "original_idx" and
1423         pass it on to layout_range.
1424         (layout::print_any_labels): Pass on range->m_original_idx to
1425         get_text call.
1426         (gcc_rich_location::add_location_if_nearby): Use 0 for
1427         original_idx.
1428         * gcc-rich-location.h (text_range_label::get_text): Update for new
1429         param.
1430         (range_label_for_type_mismatch::get_text): Likewise.
1432 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
1434         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
1436 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
1438         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
1439         format_string_diagnostic_t.
1440         (fmtwarn_n): Likewise.
1441         * substring-locations.c
1442         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
1443         (format_warning_n_va): Convert to...
1444         (format_string_diagnostic_t::emit_warning_n_va): ...this.
1445         (format_warning_va): Convert to...
1446         (format_string_diagnostic_t::emit_warning_va): ...this.
1447         (format_warning_at_substring): Convert to...
1448         (format_string_diagnostic_t::emit_warning): ...this.
1449         (format_warning_at_substring_n): Convert to...
1450         (format_string_diagnostic_t::emit_warning_n): ...this.
1451         * substring-locations.h (class format_string_diagnostic_t): New
1452         class.
1453         (format_warning_va): Convert to
1454         format_string_diagnostic_t::emit_warning_va.
1455         (format_warning_n_va): Convert to
1456         format_string_diagnostic_t::emit_warning_n_va.
1457         (format_warning_at_substring): Convert to
1458         format_string_diagnostic_t::emit_warning.
1459         (format_warning_at_substring_n): Convert to
1460         format_string_diagnostic_t::emit_warning_n.
1462 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
1463             Bernd Schmidt <bernds_cb1@t-online.de>
1465         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
1466         SImode args.
1468 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
1470         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
1471         operand 0 predicate to nonimmediate operand.
1472         (rint<mode>2_frndint): Remove insn pattern.
1473         (rint<mode>2): Change operand 1 predicate to general_operand.
1474         Extend operand 1 to XFmode and generate rintxf2 insn.
1475         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
1476         Do not use X87MODEF mode macro.
1477         (frndintxf2_<rounding>_i387): Rename from
1478         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
1479         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
1480         to XFmode and generate significandxf3 insn.
1482 2018-09-17  Richard Biener  <rguenther@suse.de>
1484         PR tree-optimization/87328
1485         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
1486         visiting unexecutable backedges when not iterating.
1487         (do_rpo_vn): Mark all edges not executable even when not
1488         iterating.
1490 2018-09-17  Martin Jambor  <mjambor@suse.cz>
1492         PR c/63886
1493         * doc/invoke.texi (Warning Options): Likewise.
1495 2018-09-17  Richard Biener  <rguenther@suse.de>
1497         PR tree-optimization/87301
1498         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
1499         clean EH info from leftover copy assignments.
1501 2018-09-17  Martin Liska  <mliska@suse.cz>
1503         PR gcov-profile/85871
1504         * gcov.c (output_intermediate_file): Fix out of bounds
1505         access.
1507 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
1509         * config/arc/arc.c: Object attributes for core4 not reflected
1510         correctly.
1511         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
1512         core3).
1514 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
1516         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
1518 2018-09-17  Martin Liska  <mliska@suse.cz>
1520         * doc/gcov.texi: Document new option --use-hotness-colors.
1521         * gcov.c (struct source_info): Declare new field.
1522         (source_info::source_info): Set default for maximum_count.
1523         (print_usage): Add new -q option.
1524         (process_args): Process it.
1525         (accumulate_line_info): Save src->maximum_count.
1526         (output_line_beginning): Make color line number if
1527         flag_use_hotness_colors is set.
1528         (output_line_details): Pass default argument value.
1529         (output_lines): Pass src->maximum_count.
1531 2018-09-17  Martin Liska  <mliska@suse.cz>
1533         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
1534         Use processor_names table.
1535         * config/i386/i386.c (ix86_default_align): Use
1536         processor_cost_table for alignment values.
1537         (ix86_option_override_internal): Use processor_names.
1538         (ix86_function_specific_print): Likewise.
1539         * config/i386/i386.h (struct processor_costs):
1540         Add alignment values.
1541         (struct ptt): Remove and replace with const char *.
1542         * config/i386/x86-tune-costs.h (struct processor_costs):
1543         Declare default alignments for all costs.
1545 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
1547         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
1548         symbolics or VR_VARYING ranges for ABS_EXPR.
1549         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
1550         when range will wrap.
1552 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
1554         PR middle-end/86864
1555         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
1556         before and after a JUMP_TABLE_DATA.
1558 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
1560         PR middle-end/87188
1561         * dojump.c (do_compare_and_jump): Canonicalize function pointers
1562         when one operand is a function pointer.  Use POINTER_TYPE_P and
1563         FUNC_OR_METHOD_TYPE_P.
1564         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
1565         * fold-const.c (build_range_check): Likewise.
1566         * match.pd (simple_comparison): Likewise.
1568 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
1570         PR c/82967
1571         * spellcheck.c (get_edit_distance_cutoff): New function.
1572         (selftest::test_edit_distance_unit_test_oneway): Rename to...
1573         (selftest::test_get_edit_distance_one_way): ...this.
1574         (selftest::test_get_edit_distance_unit): Rename to...
1575         (selftest::test_get_edit_distance_both_ways): ...this.
1576         (selftest::test_edit_distances): Move tests to this new function,
1577         and test some more pairs of strings.  Update for above renaming.
1578         (selftest::get_old_cutoff): New function.
1579         (selftest::test_get_edit_distance_cutoff): New function.
1580         (selftest::assert_suggested_for): New function.
1581         (ASSERT_SUGGESTED_FOR): New macro.
1582         (selftest::assert_not_suggested_for): New function.
1583         (ASSERT_NOT_SUGGESTED_FOR): New macro.
1584         (selftest::test_suggestions): New function.
1585         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
1586         tests to selftest::test_edit_distances and call it.  Add calls to
1587         selftest::test_get_edit_distance_cutoff and
1588         selftest::test_suggestions.
1589         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
1590         (best_match::consider): Replace hard-coded cutoff calculation with
1591         a call to...
1592         (best_match::get_cutoff): New declaration.
1593         (best_match::get_best_meaningful_candidate): Likewise.
1595 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1597         * builtins.c (fold_builtin_strlen): Remove TODO comment.
1599 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1601         revert:
1602         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1604         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1605         terminated string literal.
1607 2018-09-14  Martin Sebor  <msebor@redhat.com>
1609         * builtins.c (unterminated_array): Handle ARRAY_REF.
1610         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
1611         * builtins.h (unterminated_array): Declare extern.
1612         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
1613         arrays.
1614         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
1615         calls.
1617 2018-09-14  Martin Sebor  <msebor@redhat.com>
1618             Jeff Law  <law@redhat.com>
1620         * builtins.c (unterminated_array): New.
1621         (expand_builtin_strcpy): Adjust.
1622         (expand_builtin_strcpy_args): Detect unterminated arrays.
1623         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
1624         unterminated arrays.
1625         * gimple-fold.h (get_maxval_strlen): Add argument.
1626         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
1628         * gimple-fold.c (get_range_strlen): Add argument.
1629         (get_maxval_strlen): Adjust.
1630         * gimple-fold.h (get_range_strlen): Add argument.
1632 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
1634         * config/i386/movdirintrin.h: Fix copyright year.
1636 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
1638         * reg-stack.c: Include regs.h.
1639         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
1640         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
1641         FIRST_STACK_REG, not DFmode.
1642         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
1643         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
1644         (change stack): Default register mode to the reg_raw_mode of
1645         FIRST_STACK_REG, not DFmode.
1646         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
1647         (*swapxf): Rename from swapxf.
1649 2018-09-14  Carl Love  <cel@us.ibm.com>
1651         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
1652         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
1654 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
1656         PR target/87224
1657         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
1658         alternatives.
1660 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
1662         PR target/85628
1663         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
1665 2018-09-14  Jason Merrill  <jason@redhat.com>
1667         Fix --enable-gather-detailed-mem-stats.
1668         * hash-table.c (hash_table_usage): Change from variable to function.
1669         * hash-table.h: Adjust.
1670         * Makefile.in: Add missing dependencies on hash-table.h.
1672 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1674         PR tree-optimization/87259
1675         PR lto/87283
1676         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
1677         execute_cse_reciprocals_1 has tried transforming.
1679 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
1681         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
1682         VR_VARYING for PLUS/MINUS_EXPR.
1684 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
1686         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
1687         formatting.
1689 2018-09-14  Richard Biener  <rguenther@suse.de>
1691         PR middle-end/63155
1692         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
1693         bits for the merged partition.
1695 2018-09-13  Martin Sebor  <msebor@redhat.com>
1696             Bernd Edlinger  <bernd.edlinger@hotmail.de>
1698         * builtins.h (c_srlen): Add argument.
1699         * builtins.c (warn_string_no_nul): New function.
1700         (c_strlen): Add argument and use it.  Update recursive calls.
1701         Pass DECL argument to string_constant to get info on non
1702         terminated strings.  Update *NONSTR as needed.
1703         (fold_builtin_strlen): Add argument to calls to c_strlen.
1704         Warn for unterminated arrays.
1705         (warn_string_no_null): Add prototype.
1706         * expr.c (string_constant): Update arguments.  Update recursive
1707         calls appropriately.  Detect missing NUL terminator and outermost
1708         declaration its missing in.
1709         Improve checks for arrays with nonzero lower bound or elements
1710         that are not a single byte.  Simplify offset computation.
1711         Simplify checks for non-NUL terminated strings.
1712         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
1713         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
1715 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1717         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
1718         correctly.
1719         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
1720         argument.  Fix range checks.
1721         * fold-const.h (c_getstr): Adjust protoype.
1722         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
1723         string is constant but contains no NUL byte.
1725         * expr.c (string_constant): Adjust function comment.
1726         Remove bogus check for zero termination.
1728         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
1730         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
1731         (get_constant_size): Don't make STRING_CSTs larger than they are.
1732         (check_string_literal): New check function for STRING_CSTs.
1733         (output_constant): Use it.
1735 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
1737         PR target/86812
1738         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
1740 2018-09-13  Richard Biener  <rguenther@suse.de>
1742         PR tree-optimization/87263
1743         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
1744         (struct unwind_state): Add max_rpo field.
1745         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
1746         Compute max_rpo, the max RPO number a block can be backwards reached
1747         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
1748         separating it from the iterating mode.
1750 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
1752         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
1753         (rfs_decision): New scheduling decision.
1755 2018-09-13  Richard Biener  <rguenther@suse.de>
1757         PR bootstrap/87134
1758         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
1759         (vn_nary_op_insert_pieces_predicated): Do not write useless
1760         valid_dominated_by_p entry outside of the allocated storage.
1762 2018-09-13  Omar Sandoval  <osandov@osandov.com>
1763             Tom de Vries  <tdevries@suse.de>
1765         PR debug/86985
1766         * dwarf2out.c (is_c): New function.
1767         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
1769 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
1771         PR target/85628
1772         * config/aarch64/aarch64.md (*aarch64_bfxil):
1773         Define.
1774         * config/aarch64/constraints.md (Ulc): Define.
1775         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
1776         Define.
1777         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
1778         New function.
1780 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
1782         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
1783         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
1784         aarch64_layout_frame call.
1785         (aarch64_expand_epilogue): Likewise.
1786         (aarch64_initial_elimination_offset): Likewise.
1787         (aarch64_get_separate_components): Likewise.
1788         (aarch64_use_return_insn_p): Likewise.
1789         (aarch64_layout_frame): Remove unneeded check.
1791 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1793         * configure.ac: Only append
1794         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
1795         gcc_config_arguments if it was never reconfigured or last reconfigure
1796         was with different arguments.
1797         * configure: Regenerated.
1799 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1800             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1802         PR middle-end/87290
1803         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
1804         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
1806 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
1808         PR tree-optimization/87287
1809         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
1810         X % C == 0 to X % (unsigned) C == 0 optimization to ...
1811         * match.pd (X % C == 0): ... here.  New optimization.
1813 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1815         PR middle-end/82853
1816         * expr.h (maybe_optimize_mod_cmp): Declare.
1817         * expr.c (mod_inv): New function.
1818         (maybe_optimize_mod_cmp): New function.
1819         (do_store_flag): Use it.
1820         * cfgexpand.c (expand_gimple_cond): Likewise.
1822 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
1823             Julian Brown  <julian@codesourcery.com>
1825         PR middle-end/86336
1826         * gimplify.c (gimplify_scan_omp_clauses): Set
1827         target_firstprivatize_array_bases in OpenACC parallel and kernels
1828         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
1829         OpenACC data regions.
1831 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
1833         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
1834         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
1836 2018-09-12  Richard Biener  <rguenther@suse.de>
1838         PR tree-optimization/87280
1839         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
1840         edge but unreachable target.
1841         (do_rpo_vn): For conservatively handling a PHI only mark
1842         the backedge executable but not the block reachable.
1844 2018-09-12  Richard Biener  <rguenther@suse.de>
1846         PR tree-optimization/87266
1847         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
1848         visited blocks.
1850 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
1852         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
1853         constants.
1854         ("trunc<BFP:mode><DFP_ALL:mode>2")
1855         ("trunc<DFP_ALL:mode><BFP:mode>2")
1856         ("extend<BFP:mode><DFP_ALL:mode>2")
1857         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
1858         according to the target operand type.
1860 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1861             Andreas Krebbel  <krebbel@linux.ibm.com>
1863         PR tree-optimization/86844
1864         * gimple-ssa-store-merging.c
1865         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
1866         there are any overlapping stores in between them, make sure they are
1867         also coalesced or we give up completely.
1869 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
1871         PR middle-end/87248
1872         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
1873         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
1875 2018-09-12  Tom de Vries  <tdevries@suse.de>
1877         * common.opt (gdescribe-dies): Add option.
1878         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
1879         attribute for artifical and nameless decls.
1880         (dwarf2out_register_external_die): Add description attribute to
1881         external reference die.
1882         (add_desc_attribute): New functions.
1883         (gen_subprogram_die): Add description attribute to
1884         DW_TAG_call_site_parameter.
1885         * tree-pretty-print.c (print_generic_expr_to_str): New function.
1886         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
1887         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
1888         -gno-describe-dies.
1889         (@item -gdescribe-dies): Add.
1891 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
1893         * tree-vrp.c (vrp_shift_undefined_p): Remove.
1894         (extract_range_from_binary_expr_1: Call
1895         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
1896         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
1897         depend on sign.
1899 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
1901         * gimple-ssa-warn-alloca.c
1902         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
1903         field for ALLOCA_BOUND_*_LARGE.
1905 2018-09-11  Nathan Sidwell  <nathan@acm.org>
1907         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
1909 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
1911         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
1912         for clobbers.  Remove obsolete comment.
1914 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
1916         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
1917         mpxchk, mpxld and mpxst types.
1918         (define_attr length_immediate): Remove all processing of mpx types.
1919         (define_attr prefix_0f): Ditto.
1920         (define_attr memory): Ditto.
1922 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
1924         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
1925         (log<mode>2): Change operand 1 predicate to general_operand.
1926         Extend operand 1 to XFmode and generate logxf3 insn.
1927         (log10<mode>2): Change operand 1 predicate to general_operand.
1928         Extend operand 1 to XFmode and generate log10xf3 insn.
1929         (log2<mode>2): Change operand 1 predicate to general_operand.
1930         Extend operand 1 to XFmode and generate log2xf3 insn.
1931         (fyl2xp1_extend<mode>xf3_i387): Remove.
1932         (log1p<mode>2): Change operand 1 predicate to general_operand.
1933         Extend operand 1 to XFmode and generate log1pxf3 insn.
1934         (fxtract_extend<mode>xf3_i387): Remove.
1935         (logb<mode>2): Change operand 1 predicate to general_operand.
1936         Extend operand 1 to XFmode and generate logbxf3 insn.
1937         (ilogb<mode>2): Change operand 1 predicate to general_operand.
1938         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
1939         (significand<mode>2): Change operand 1 predicate to general_operand.
1940         Extend operand 1 to XFmode and generate significandxf3 insn.
1942 2018-09-11  Nathan Sidwell  <nathan@acm.org>
1944         * gcc.c (perror_with_name, pfatal_with_name): Delete.
1945         (load_specs): Use fatal_error.
1946         (DELETE_IF_ORDINARY, process_command): Use error.
1947         (execute, run_attempt): Use fatal_error.
1949 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
1951         * diagnostic-core.h (sorry_at): New prototype.
1952         * diagnostic.c (sorry_at): New function.
1954 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
1956         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
1957         by zero as VR_UNDEFINED.
1959 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
1961         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
1962         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
1963         (<sincos>mode2): New expander.
1964         (sincos_extend<mode>xf3_i387): Remove insn pattern.
1965         (sincos -> sin, cos splitters): Remove splitter patterns.
1966         (sincos<mode>3): Change operand 2 predicate to general_operand.
1967         Extend operand 2 to XFmode and generate sincosxf3 insn.
1968         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
1969         Change operand 3 predicate to const1_operand.
1970         (fptan_extend<mode>xf4_i387): Remove insn pattern.
1971         (tanxf2): Update operands in the call to fptanxf4_i387.
1972         (tan<mode>2): Change operand 1 predicate to general_operand.
1973         Extend operand 1 to XFmode and generate tanxf3 insn.
1974         (atan2xf3): Rename from *fpatanxf3_i387.
1975         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
1976         (atan2xf3): Remove expander.
1977         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
1978         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
1979         (atan<mode>2): Change operand 1 predicate to general_operand.
1980         Extend operand 1 to XFmode and generate atanxf3 insn.
1982 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
1984         * config/i386/i386.md (x87/SSE constant load splitter): Use
1985         memory_operand instead of nonimmediate_operand for input operand
1986         predicate.
1988 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
1990         * config/i386/i386.md (float partial SSE register stall splitter): Move
1991         splitter near its instruction pattern.
1992         (float_extend partial SSE register stall splitter): Ditto.
1993         (float_truncate partial SSE register stall splitter): Ditto.
1995 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
1997         PR target/86794
1998         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1999         to speculation_safe_value_not_needed.
2001         PR target/85666
2002         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2003         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2004         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2005         leaf_function_p, instead use has_hard_reg_initial_val.
2007 2018-09-09  Nathan Sidwell  <nathan@acm.org>
2009         * gcc.h (pfatal_with_name): Don't declare here.
2010         * gcc.c (pfatal_with_name): Make static.
2012 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2014         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2015         earlyclobber.
2017 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
2019         PR rtl-optimization/85458
2020         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2021         priority hook to reduce the priority of EXPR.
2023 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
2025         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2026         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
2027         with X87_ENABLE_FLOAT.  Remove preparation code.
2028         (*float<SWI48:mode><MODEF:mode>2): Rename from
2029         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
2030         math using "enabled" attribute.
2031         (*floatdi<MODEF:mode>2_i387): Rename from
2032         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
2033         enable for 32bit targets only.
2034         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2035         splitter.
2036         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2037         as operand 1 predicate.  Rewrite as define_insn_and_split.
2038         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2040 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2042         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2043         to fallthru to FLOAT case.
2045 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2047         PR target/86731
2048         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2049         around folding of vec_sl to handle out of range shift values.
2051 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
2053         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2054         Update callers to gen_fix_trunc<mode>_i387_fisttp
2055         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2056         nonimmediate_operand.
2057         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2058         and corresponding splitters.
2059         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2060         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2061         (fix_truncdi_i387_with_temp): Remove insn pattern
2062         and corresponding splitters.
2063         (fix_trunc<mode>_i387): Change operand 0 predicate to
2064         nonimmediate_operand.
2065         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2066         and corresponding splitters.
2067         (*fistdi2_1): Remove.
2068         (fistdi2): Ditto.
2069         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2070         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
2071         (*fist<mode>2_1): Remove.
2072         (fist<mode>2): Ditto.
2073         (fist<mode>2_with_temp): Remove insn pattern and corresponding
2074         splitters.
2075         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
2076         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2077         (fistdi2_<rounding>): Change operand 0 predicate to
2078         nonimmediate_operand.
2079         (fistdi2_<rounding>_with_temp): Remove insn pattern
2080         and corresponding splitters.
2081         (fist<mode>2_<rounding>): Change operand 0 predicate to
2082         nonimmediate_operand.
2083         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2084         and corresponding splitters.
2086         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2088 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2090         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2091         the init value.
2093 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2095         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2096         early gimple folding of vec_splat().
2097         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2098         * gimple-fold.h: Add an extern define for tree_vec_extract().
2100 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
2102         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2103         wrappers around TREE_TYPE comparisons.
2105 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2107         PR target/80080
2108         * config/s390/predicates.md: Add nonsym_memory_operand.
2109         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2110         contains a SYMBOL_REF, load it into an intermediate pseudo.
2111         (s390_emit_compare_and_swap): Legitimize operand.
2112         * config/s390/s390.md: Use the new nonsym_memory_operand
2113         with UNSPECV_CAS patterns.
2115 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2117         PR target/80080
2118         * config/s390/s390-passes.def: New file.
2119         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2120         declaration.
2121         (make_pass_s390_early_mach): Add declaration.
2122         * config/s390/s390.c (make_pass_s390_early_mach):
2123         (s390_option_override): Remove dynamic registration.
2124         * config/s390/t-s390: Add s390-passes.def.
2126 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2128         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2129         Remove UNSPEC_LTREL_BASE check.
2130         (annotate_constant_pool_refs): Likewise.
2131         (find_constant_pool_ref): Likewise.
2132         (find_ltrel_base): Removed.
2133         (replace_ltrel_base): Removed.
2134         (s390_mainpool_finish): Remove replace_ltrel_base call.
2135         (s390_chunkify_start): Remove pending LTREL_BASE logic.
2136         (s390_chunkify_finish): Remove replace_ltrel_base call.
2137         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2139 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
2141         PR target/86779
2142         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2143         to speculation_safe_value_not_needed.
2145 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
2146             Bernd Schmidt  <bernds_cb1@t-online.de>
2148         * config/nvptx/nvptx-opts.h: New file.
2149         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2150         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
2151         (ASM_SPEC): Define.
2152         (TARGET_SM35): New macro.
2153         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
2154         correct predicate.
2155         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
2156         values.
2157         (misa=): New option.
2158         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
2160 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
2162         * config/i386/i386.md (truncdfsf2): Remove expander.
2163         (truncdfsf2_with_temp): Ditto.
2164         (truncxf<mode>2): Ditto.
2165         (*truncdfsf_fast_mixed): Remove insn pattern.
2166         (*truncdfsf_fast_i387): Ditto.
2167         (*truncdfsf_mixed): Ditto.
2168         (*truncdfsf_i387): Ditto.
2169         (*truncdfsf2_i387_1): Ditto.
2170         (*truncxfsf2_mixed): Ditto.
2171         (*truncxfdf2_mixed): Ditto.
2172         (*truncxf<mode>2_i387_noop): Ditto. Update callers
2173         to call gen_truncxf<mode>2 instead.
2174         (*truncxf<mode>2_i387): Remove.
2175         (reg->reg splitters): Remove splitter pattern.
2176         (reg->mem splitters): Ditto.
2178         (truncdfsf2): New insn pattern.
2179         (truncxf<mode>2): Ditto.
2181 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2183         * tree-ssa-math-opts.c (is_mult_by): New function.
2184         (is_square_of): Use the above.
2185         (optimize_recip_sqrt): New function.
2186         (pass_cse_reciprocals::execute): Use the above.
2188 2018-09-05  Richard Biener  <rguenther@suse.de>
2190         PR bootstrap/87134
2191         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
2192         to zero-init the emplaced vec.
2194 2018-09-05  Martin Liska  <mliska@suse.cz>
2196         PR tree-optimization/87205
2197         * tree-switch-conversion.c (pass_lower_switch::execute):
2198         Group cases for switch statements.
2200 2018-09-05  Richard Biener  <rguenther@suse.de>
2202         PR tree-optimization/87217
2203         * tree-ssa-sccvn.c (vuse_valueize): New.
2204         (vn_reference_lookup_pieces): Use it.
2205         (vn_reference_lookup): Likewise.
2207 2018-09-05  Nathan Sidwell  <nathan@acm.org>
2209         PR c++/87137
2210         * stor-layout.c (place_field): Scan forwards to check last
2211         bitfield when ms_bitfield_placement is in effect.
2213 2018-09-05  Richard Biener  <rguenther@suse.de>
2215         PR bootstrap/87225
2216         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
2217         return.
2219 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2220             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
2222         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
2223         * config.gcc (extra_objs): Build it.
2224         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
2225         Likewise.
2226         * config/aarch64/aarch64-passes.def
2227         (pass_tag_collision_avoidance): New pass.
2228         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
2229         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
2230         (aarch64_classify_address): Remove static qualifier.
2231         (aarch64_address_info, aarch64_address_type): Move to...
2232         * config/aarch64/aarch64-protos.h: ... here.
2233         (make_pass_tag_collision_avoidance): New function.
2234         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
2235         New tuning flag.
2237 2018-09-05  Martin Liska  <mliska@suse.cz>
2239         * doc/gcov.texi: Update documentation of humar
2240         readable mode.
2241         * gcov.c (format_count): Print one decimal place, it provides
2242         more fine number of situations like '1G' vs. '1.4G'.
2244 2018-09-05  Martin Liska  <mliska@suse.cz>
2246         PR target/87164
2247         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
2248         * optc-gen.awk: Allow 'Var' for Deprecated options in order
2249         to generate a MASK value.
2251 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
2253         PR debug/86593
2254         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
2255         if frame pointer isn't used.
2256         (compute_frame_pointer_to_fb_displacement): Likewise.
2258 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
2260         PR target/87198
2261         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
2262         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
2263         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
2264         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
2265         and OPTION_MASK_ISA_XSAVEC_UNSET.
2267 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
2269         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
2270         XOR operations in NAND case.
2272 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
2274         * wide-int-range.cc (wide_int_range_convert): New.
2275         * wide-int-range.h (wide_int_range_convert): New.
2276         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
2277         code into wide_int_range_convert.
2278         (extract_range_into_wide_ints): Do not munge anti range constants
2279         into the entire domain.  Just return the range back.
2281 2018-09-04  Martin Liska  <mliska@suse.cz>
2283         * genmatch.c (output_line_directive): Add new argument
2284         fnargs.
2285         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
2287 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
2289         * doc/invoke.texi (Option Summary): Add whitespace.
2291         * doc/invoke.texi (Option Summary): Add -Waligned-new.
2293 2018-09-04  Richard Biener  <rguenther@suse.de>
2295         PR tree-optimization/87211
2296         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
2297         backedge value we're supposed to treat as VARYING also number
2298         the PHI to VARYING in case it got a different value-number already.
2300 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
2302         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
2303         (extract_range_from_binary_expr_1): Do not call
2304         vrp_can_optimize_bit_op.
2305         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
2306         static.
2307         (wide_int_range_get_mask_and_bounds): New.
2308         (wide_int_range_optimize_bit_op): New.
2309         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
2310         (wide_int_range_bit_and): Same.
2311         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
2312         (wide_int_range_optimize_bit_op): New.
2313         (wide_int_range_get_mask_and_bounds): New.
2315 2018-09-04  Richard Biener  <rguenther@suse.de>
2317         PR tree-optimization/87176
2318         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
2319         variable.  When value-numbering a virtual PHI node make sure
2320         to not value-number to the backedge value.
2322 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
2324         * doc/extend.texi (Long Long, Hex Floats): Document support for
2325         long long and hex floats in more recent versions of ISO C++.
2327 2018-09-03  Richard Biener  <rguenther@suse.de>
2329         PR tree-optimization/87177
2330         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
2331         cleanup.
2333 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
2335         * bb-reorder.c (edge_order): Convert to C-qsort-style
2336         tri-state comparator.
2337         (reorder_basic_blocks_simple): Change std::stable_sort to
2338         gcc_stablesort.
2340 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
2342         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
2343         tri-state comparator.
2344         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
2346 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
2348         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
2349         (mergesort): ... here as maximum count for using netsort.
2350         (gcc_qsort): Set nlim to 3 if stable sort is requested.
2351         (gcc_stablesort): New.
2352         * system.h (gcc_stablesort): Declare.
2354 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
2356         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
2357         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
2358         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
2360 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
2362         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
2363         lxsdx and stxsdx alternatives.
2364         (*mov<mode>_hardfloat64): Ditto.
2365         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
2367 2018-09-03  Richard Biener  <rguenther@suse.de>
2369         PR tree-optimization/87200
2370         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
2371         simplify result.
2373 2018-09-03  Martin Liska  <mliska@suse.cz>
2375         PR tree-optimization/87201
2376         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
2377         Fix parenthesis in an expression.
2379 2018-09-03  Richard Biener  <rguenther@suse.de>
2381         PR tree-optimization/87197
2382         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
2383         visited.  CSE the VN_INFO hashtable lookup.
2385         PR tree-optimization/87169
2386         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
2387         iterating make sure there's no extra backedges from irreducible
2388         regions feeding the header.  Mark the destination block
2389         executable.
2391 2018-09-03  Martin Liska  <mliska@suse.cz>
2393         PR driver/83193
2394         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
2395         * common/common-targhooks.c (default_get_valid_option_values):
2396         New function.
2397         * common/common-targhooks.h (default_get_valid_option_values):
2398         Likewise.
2399         * common/config/i386/i386-common.c: Move processor_target_table
2400         from i386.c.
2401         (ix86_get_valid_option_values): New function.
2402         (TARGET_GET_VALID_OPTION_VALUES): New macro.
2403         * config/i386/i386.c (struct ptt): Move to i386-common.c.
2404         (PTA_*): Move all defined masks into i386-common.c.
2405         (ix86_function_specific_restore): Use new processor_cost_table.
2406         * config/i386/i386.h (struct ptt): Moved from i386.c.
2407         (struct pta): Likewise.
2408         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
2409         * doc/tm.texi.in: Likewise.
2410         * opt-suggestions.c (option_proposer::suggest_option):
2411         Pass prefix to build_option_suggestions.
2412         (option_proposer::get_completions): Likewise.
2413         (option_proposer::build_option_suggestions): Use the new target
2414         hook.
2415         * opts.c (struct option_help_tuple): New struct.
2416         (print_filtered_help): Use the new target hook.
2418 2018-09-03  Martin Liska  <mliska@suse.cz>
2420         PR middle-end/59521
2421         * predict.c (set_even_probabilities): Add likely_edges
2422         argument and handle cases where we have precisely one
2423         likely edge.
2424         (combine_predictions_for_bb): Catch also likely_edges.
2425         (tree_predict_by_opcode): Handle gswitch statements.
2426         * tree-cfg.h (find_case_label_for_value): New declaration.
2427         (find_taken_edge_switch_expr): Likewise.
2428         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
2429         Find pivot in decision tree based on probabily, not by number of
2430         nodes.
2432 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
2434         * doc/standards.texi (Standards): Update Objective-C reference.
2436 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
2438         * doc/install.texi (Prerequisites): Update link for MPC.
2440 2018-09-01  Michael Matz  <matz@suse.de>
2442         PR tree-optimization/87074
2443         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
2444         PHIs for outer-loop uses.
2446 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
2448         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
2449         * doc/invoke.texi (C Dialect Options): Ditto.
2451 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
2453         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
2455 2018-08-31  Richard Biener  <rguenther@suse.de>
2457         PR tree-optimization/87168
2458         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
2459         (rpo_elim::eliminate_avail): When OP was not visited it must
2460         be available.
2462 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
2464         * tree-vrp.c (copy_value_range): Convert param "from" from
2465         "value_range *" to "const value_range *".
2466         (range_is_null): Likewise for param "vr".
2467         (range_int_cst_p): Likewise.
2468         (range_int_cst_singleton_p): Likewise.
2469         (symbolic_range_p): Likewise.
2470         (value_ranges_intersect_p): Likewise for both params.
2471         (value_range_nonnegative_p): Likewise for param "vr".
2472         (value_range_constant_singleton): Likewise.
2473         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
2474         (extract_range_into_wide_ints): Likewise for param "vr".
2475         (extract_range_from_multiplicative_op): Likewise for params "vr0"
2476         and "vr1".
2477         (vrp_can_optimize_bit_op): Likewise.
2478         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
2479         "vr1_".
2480         (extract_range_from_unary_expr): Likewise.
2481         (debug_value_range): Likewise for param "vr".
2482         (value_range::dump): Add "const" qualifier.
2483         (vrp_prop::check_array_ref): Convert local "vr" from
2484         "value_range *" to "const value_range *".
2485         (vrp_prop::check_mem_ref): Likewise.
2486         (vrp_prop::visit_stmt): Likewise for local "old_vr".
2487         (vrp_intersect_ranges_1): Likewise for param "vr_1".
2488         (vrp_intersect_ranges): Likewise.
2489         (simplify_stmt_for_jump_threading): Likewise for local "vr".
2490         (vrp_prop::vrp_finalize): Likewise.
2491         * tree-vrp.h (value_range::dump): Add "const" qualifier.
2492         (vrp_intersect_ranges): Add "const" qualifier to params as above.
2493         (extract_range_from_unary_expr): Likewise.
2494         (value_range_constant_singleton): Likewise.
2495         (symbolic_range_p): Likewise.
2496         (copy_value_range): Likewise.
2497         (extract_range_from_binary_expr_1): Likewise.
2498         (range_int_cst_p): Likewise.
2499         (vrp_set_zero_nonzero_bits): Likewise.
2500         (range_int_cst_singleton_p): Likewise.
2502 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
2504         * config/aarch64/arm_neon.h (vabsd_s64): New.
2505         (vnegd_s64): Likewise.
2507 2018-08-31  Martin Jambor  <mjambor@suse.cz>
2509         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
2511 2018-08-31  Martin Liska  <mliska@suse.cz>
2513         * ipa-icf.c (sem_item::add_type): Use
2514         sem_item::m_type_hash_cache.
2515         * ipa-icf.h: Move the cache from sem_item_optimizer
2516         to sem_item.
2518 2018-08-31  Nathan Sidwell  <nathan@acm.org>
2520         * doc/extend.texi (Backwards Compatibility): Remove implicit
2521         extern C leeway of () being (...).
2523 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2525         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
2527 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
2529         PR target/86684
2530         PR target/87149
2531         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
2533 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
2535         PR middle-end/87138
2536         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
2537         gen_int_mode.  Formatting fixes.
2539 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
2541         * target.def (custom_function_descriptors): Improve documentation.
2542         * doc/tm.texi.in (Trampolines): Expand discussion of function
2543         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
2544         beginning of the section.
2545         * doc/tm.texi: Regenerated.
2547 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
2549         * cfg.h (class auto_edge_flag): Spell out the template-id of the
2550         base class in the initializer list.  This is a workaround for
2551         building with older GCC.
2552         (class auto_bb_flag): Likewise.
2554 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
2556         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
2557         (altivec_vcmpequ<VI_char>_p): Remove star.
2558         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
2559         vector load modes.
2560         (expand_strncmp_vec_sequence): New function.
2561         (emit_final_str_compare_vec): New function.
2562         (expand_strn_compare): Add support for vector strncmp.
2563         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
2564         length specification to bytes.
2565         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
2566         (vcmpnezb_p): New pattern.
2567         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
2568         for option -mstring-compare-inline-limit.
2570 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
2572         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
2573         (PTA_SKYLAKE): Add PTA_AES.
2574         (PTA_GOLDMONT): Likewise.
2576 2018-08-29  Jan Hubicka  <jh@suse.cz>
2578         PR lto/86517
2579         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
2580         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
2582 2018-08-29  Jan Hubicka  <jh@suse.cz>
2584         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
2585         TYPE_STUB_DECL.
2586         (hash_tree): Do not visit TYPE_STUB_DECL.
2587         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
2588         stream TYPE_STUB_DECL.
2589         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
2590         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
2591         after free_lang_data.
2592         (type_in_anonymous_namespace_p): Likewise.
2594 2018-08-29  Jan Hubicka  <jh@suse.cz>
2596         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
2597         comment that it has to be even number.
2598         (class sreal): Change m_sig type to int32_t.
2599         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
2600         int64_t for temporary calculations.
2601         (sreal_verify_basics): Drop one bit from minimum and maximum.
2603 2018-08-30  Richard Biener  <rguenther@suse.de>
2605         PR tree-optimization/87147
2606         * tree-ssa-sccvn.c (SSA_VISITED): New function.
2607         (visit_phi): When the degenerate result is from the backedge and
2608         we didn't visit its definition yet drop to VARYING.
2609         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
2611 2018-08-29  Jan Hubicka  <jh@suse.cz>
2613         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
2614         DECL_VINDEX.
2615         (hash_tree): Likewise.
2617 2018-08-29  Jan Hubicka  <jh@suse.cz>
2619         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
2620         and TYPE_NEXT_REF_TO.
2622 2018-08-29  Jan Hubicka  <jh@suse.cz>
2624         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
2625         comment that it has to be even number.
2626         (class sreal): Change m_sig type to int32_t.
2627         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
2628         int64_t for temporary calculations.
2629         (sreal_verify_basics): Drop one bit from minimum and maximum.
2631 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
2633         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
2635 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
2637         PR middle-end/86995
2638         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
2639         if to_add is negative.
2641 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2643         PR middle-end/87053
2644         * builtins.c (c_strlen): Improve range checks.
2646 2018-08-29  Martin Sebor  <msebor@redhat.com>
2647             Jeff Law  <law@redhat.com>
2649         PR tree-optimization/86714
2650         PR tree-optimization/86711
2651         * builtins.c (c_strlen): Add arguments to call to string_constant.
2652         * expr.c (string_constant): Add argument.  Detect missing nul
2653         terminator and outermost declaration it's missing in.
2654         * expr.h (string_constant): Add argument.
2655         * fold-const.c (read_from_constant_string): Add arguments to call to
2656         string_constant.
2657         (c_getstr): Likewise.
2658         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2659         to string_constant.
2660         * tree-ssa-strlen.c (get_stridx): Likewise.
2662 2018-08-29  Jan Hubicka  <jh@suse.cz>
2664         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
2665         Do not stream DECL_VINDEX.
2666         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
2667         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
2668         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
2670 2018-08-29  Richard Biener  <rguenther@suse.de>
2672         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
2673         virtual operands that are not default defs to honor region
2674         boundaries.
2675         (rpo_vn_valueize): Remove ineffective code here.
2677 2018-08-29  Richard Biener  <rguenther@suse.de>
2679         PR tree-optimization/87132
2680         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
2681         when skipping defs reachable over backedges.
2683 2018-08-29  Richard Biener  <rguenther@suse.de>
2685         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
2686         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
2687         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
2688         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
2689         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
2690         (vn_reference_lookup_3): Remove use of const_parms.
2691         (free_rpo_vn): Do not free const_parms.
2692         (do_rpo_vn): Do not call init_const_parms.
2693         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
2694         SSA_NAME_POINTS_TO_READONLY_MEMORY.
2695         (call_may_clobber_ref_p_1): Likewise.
2697 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
2699         PR other/86726
2700         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
2701         (-O): Ditto.
2702         (-ftree-scev-cprop): Document.
2704 2018-08-29  Jan Hubicka  <jh@suse.cz>
2706         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
2707         parameters.
2708         (sreal constructor): Update.
2709         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
2710         sreal:operator/): Update.
2712 2018-08-29  Martin Liska  <mliska@suse.cz>
2714         * tree-switch-conversion.c (switch_conversion::expand):
2715         Strenghten assumption about gswitch statements.
2717 2018-08-29  Richard Biener  <rguenther@suse.de>
2719         PR tree-optimization/87117
2720         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
2721         re-value-number released SSA VDEFs.
2723 2018-08-29  Richard Biener  <rguenther@suse.de>
2725         PR tree-optimization/87126
2726         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
2728 2018-08-28  Jim Wilson  <jimw@sifive.com>
2730         * config/riscv/pic.md: Rewrite.
2731         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
2732         invalid address.
2733         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
2734         (SOFTF, default_load, softload, softstore): New.
2736 2018-08-28  Jeff Law  <law@redhat.com>
2738         * fold-const.c (fold_binary_loc): Remove recently added assert.
2740 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
2742         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
2743         to OP parmeter of generated function.
2745 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
2747         PR tree-optimization/87009
2748         * match.pd: Add boolean optimizations.
2750 2018-08-28  Martin Sebor  <msebor@redhat.com>
2752         PR middle-end/86631
2753         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
2754         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
2755         (pass_walloca::gate): Use it.
2756         (alloca_call_type): Same.
2757         (pass_walloca::execute): Same.
2758         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
2760 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
2762         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
2763         GCC_VERSION for usage of "__gcc_dump_printf__" format from
2764         >= 3005 to >= 9000.
2766 2018-08-28  Richard Biener  <rguenther@suse.de>
2768         PR tree-optimization/87124
2769         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
2770         constants before looking up avail.
2772 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
2774         PR middle-end/87099
2775         * calls.c (maybe_warn_nonstring_arg): Punt early if
2776         warn_stringop_overflow is zero.  Don't call get_range_strlen
2777         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
2778         Swap comparison operands to have constants on rhs.  Only use
2779         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
2780         increment lenrng[0].
2782 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
2784         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
2785         use of tree_to_shwi.  Remove duplicated test for the size being
2786         a whole number of bytes.
2788 2018-08-28  Richard Biener  <rguenther@suse.de>
2790         PR tree-optimization/87117
2791         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
2792         Handle removed stmt without LHS (GIMPLE_NOP).
2794 2018-08-28  Richard Biener  <rguenther@suse.de>
2796         PR tree-optimization/87117
2797         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
2798         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
2800 2018-08-28  Richard Biener  <rguenther@suse.de>
2802         PR tree-optimization/87117
2803         * tree-ssa-pre.c (compute_avail): Do not make expressions
2804         with predicated values available.
2805         (get_expr_value_id): Assert we do not run into predicated value
2806         expressions.
2808 2018-08-28  Richard Biener  <rguenther@suse.de>
2810         PR tree-optimization/87117
2811         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
2812         get virtual operands.
2813         (get_expr_operands): Handle STRING_CST like other decls.
2815 2018-08-28  Martin Liska  <mliska@suse.cz>
2817         * tree.h: Update documentation of fndecl_built_in_p
2818         functions.
2821 2018-08-27  Jeff Law  <law@redhat.com>
2822         PR tree-optimization/87110
2823         * tree-ssa-dse.c (compute_trims): Handle non-constant
2824         TYPE_SIZE_UNIT.
2826 2018-08-27  Martin Sebor  <msebor@redhat.com>
2828         PR tree-optimization/86914
2829         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
2831 2018-08-27  Martin Sebor  <msebor@redhat.com>
2833         PR tree-optimization/87112
2834         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
2835         the type of the bound argument.
2837 2018-08-27  Jeff Law  <law@redhat.com>
2839         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
2840         type does not have a TYPE_SIZE_UNIT.
2842 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
2844         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
2845         with include of backend.h.
2847 2018-08-27  Richard Biener  <rguenther@suse.de>
2849         PR tree-optimization/86927
2850         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
2851         use const cond reduction code.
2853 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
2855         PR tree-optimization/85758
2856         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
2858 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
2860         PR c++/87091
2861         * diagnostic-show-locus.c (class layout_range): Update for
2862         conversion of show_caret_p to a tri-state.
2863         (layout_range::layout_range): Likewise.
2864         (make_range): Likewise.
2865         (layout::maybe_add_location_range): Likewise.
2866         (layout::should_print_annotation_line_p): Don't show annotation
2867         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
2868         (layout::get_state_at_point): Update for conversion of
2869         show_caret_p to a tri-state.  Bail out early for
2870         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
2871         underlining or source colorization.
2872         (gcc_rich_location::add_location_if_nearby): Update for conversion
2873         of show_caret_p to a tri-state.
2874         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
2875         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
2876         Likewise.
2877         (selftest::test_one_liner_labels): Likewise.
2878         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
2879         conversion of show_caret_p to a tri-state.
2880         * pretty-print.c (text_info::set_location): Likewise.
2881         * pretty-print.h (text_info::set_location): Likewise.
2882         * substring-locations.c (format_warning_n_va): Likewise.
2883         * tree-diagnostic.c (default_tree_printer): Likewise.
2884         * tree-pretty-print.c (newline_and_indent): Likewise.
2886 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
2888         PR c++/87091
2889         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
2890         line above for line-insertion fix-it hints.
2891         (selftest::test_fixit_insert_containing_newline): Update the
2892         expected results, and add a test with line-numbering enabled.
2894 2018-08-27  Martin Liska  <mliska@suse.cz>
2896         PR sanitizer/86962
2897         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
2898         params with DECL_HAS_VALUE_EXPR_P.
2900 2018-08-27  Martin Liska  <mliska@suse.cz>
2902         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
2903         selected expansion strategy.
2905 2018-08-27  Martin Liska  <mliska@suse.cz>
2907         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
2908         * builtins.c (is_builtin_fn): Likewise.
2909         * attribs.c (diag_attr_exclusions): Use new function
2910         fndecl_built_in_p and remove check for FUNCTION_DECL if
2911         possible.
2912         (builtin_mathfn_code): Likewise.
2913         (fold_builtin_expect): Likewise.
2914         (fold_call_expr): Likewise.
2915         (fold_builtin_call_array): Likewise.
2916         (fold_call_stmt): Likewise.
2917         (set_builtin_user_assembler_name): Likewise.
2918         (is_simple_builtin): Likewise.
2919         * calls.c (gimple_alloca_call_p): Likewise.
2920         (maybe_warn_nonstring_arg): Likewise.
2921         * cfgexpand.c (expand_call_stmt): Likewise.
2922         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
2923         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
2924         (cgraph_node::verify_node): Likewise.
2925         * cgraphclones.c (build_function_decl_skip_args): Likewise.
2926         (cgraph_node::create_clone): Likewise.
2927         * config/arm/arm.c (arm_insert_attributes): Likewise.
2928         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
2929         * dse.c (scan_insn): Likewise.
2930         * expr.c (expand_expr_real_1): Likewise.
2931         * fold-const.c (operand_equal_p): Likewise.
2932         (fold_binary_loc): Likewise.
2933         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
2934         * gimple-low.c (lower_stmt): Likewise.
2935         * gimple-pretty-print.c (dump_gimple_call): Likewise.
2936         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
2937         Likewise.
2938         * gimple.c (gimple_build_call_from_tree): Likewise.
2939         (gimple_call_builtin_p): Likewise.
2940         (gimple_call_combined_fn): Likewise.
2941         * gimplify.c (gimplify_call_expr): Likewise.
2942         (gimple_boolify): Likewise.
2943         (gimplify_modify_expr): Likewise.
2944         (gimplify_addr_expr): Likewise.
2945         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
2946         * ipa-cp.c (determine_versionability): Likewise.
2947         * ipa-fnsummary.c (compute_fn_summary): Likewise.
2948         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
2949         * ipa-split.c (visit_bb): Likewise.
2950         (split_function): Likewise.
2951         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2952         * lto-cgraph.c (input_node): Likewise.
2953         * lto-streamer-out.c (write_symbol): Likewise.
2954         * omp-low.c (setjmp_or_longjmp_p): Likewise.
2955         (lower_omp_1): Likewise.
2956         * predict.c (strip_predict_hints): Likewise.
2957         * print-tree.c (print_node): Likewise.
2958         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
2959         * trans-mem.c (is_tm_irrevocable): Likewise.
2960         (is_tm_load): Likewise.
2961         (is_tm_simple_load): Likewise.
2962         (is_tm_store): Likewise.
2963         (is_tm_simple_store): Likewise.
2964         (is_tm_abort): Likewise.
2965         (tm_region_init_1): Likewise.
2966         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
2967         * tree-cfg.c (verify_gimple_call): Likewise.
2968         (move_stmt_r): Likewise.
2969         (stmt_can_terminate_bb_p): Likewise.
2970         * tree-eh.c (lower_eh_constructs_2): Likewise.
2971         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
2972         * tree-inline.c (remap_gimple_stmt): Likewise.
2973         (copy_bb): Likewise.
2974         (estimate_num_insns): Likewise.
2975         (fold_marked_statements): Likewise.
2976         * tree-sra.c (scan_function): Likewise.
2977         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
2978         (optimize_stack_restore): Likewise.
2979         (pass_fold_builtins::execute): Likewise.
2980         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
2981         (mark_all_reaching_defs_necessary_1): Likewise.
2982         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
2983         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
2984         (pass_forwprop::execute): Likewise.
2985         * tree-ssa-loop-im.c (stmt_cost): Likewise.
2986         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2987         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
2988         * tree-ssa-strlen.c (get_string_length): Likewise.
2989         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
2990         (find_func_aliases_for_call): Likewise.
2991         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
2992         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
2993         * tree-tailcall.c (find_tail_calls): Likewise.
2994         * tree.c (need_assembler_name_p): Likewise.
2995         (free_lang_data_in_decl): Likewise.
2996         (get_call_combined_fn): Likewise.
2997         * ubsan.c (is_ubsan_builtin_p): Likewise.
2998         * varasm.c (incorporeal_function_p): Likewise.
2999         * tree.h (DECL_BUILT_IN): Remove and replace with
3000         fndecl_built_in_p.
3001         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3002         (fndecl_built_in_p): New.
3004 2018-08-27  Martin Liska  <mliska@suse.cz>
3006         PR tree-optimization/86847
3007         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3008         Dump also subtree probability.
3009         (switch_decision_tree::do_jump_if_equal): New function.
3010         (switch_decision_tree::emit_case_nodes): Handle special
3011         situations in balanced tree that can be emitted much simpler.
3012         Fix calculation of probabilities that happen in tree expansion.
3013         * tree-switch-conversion.h (struct cluster): Add
3014         is_single_value_p.
3015         (struct simple_cluster): Likewise.
3016         (struct case_tree_node): Add new function has_child.
3017         (do_jump_if_equal): New.
3019 2018-08-27  Martin Liska  <mliska@suse.cz>
3021         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3022         Add new argument to bit_test_cluster constructor.
3023         (bit_test_cluster::emit): Set bits really number of values
3024         handlel by a test.
3025         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3026         probability argument.
3027         * tree-switch-conversion.h (struct bit_test_cluster):
3028         Add m_handles_entire_switch.
3030 2018-08-27  Martin Liska  <mliska@suse.cz>
3032         PR tree-optimization/86702
3033         * tree-switch-conversion.c (jump_table_cluster::emit):
3034         Make probabilities even for values in jump table
3035         according to number of cases handled.
3036         (switch_decision_tree::compute_cases_per_edge): Pass
3037         argument to reset_out_edges_aux function.
3038         (switch_decision_tree::analyze_switch_statement): Likewise.
3039         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3040         Make it static.
3042 2018-08-27  Martin Liska  <mliska@suse.cz>
3044         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3045         cfun argument explicitly.
3046         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3047         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3048         function gimple_switch_default_bb.
3049         (convert_switch_statements):
3050         (expand_builtins):
3051         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3052         * stmt.c (label_to_block_fn): Use label_to_block and pass
3053         cfun argument explicitly and use gimple_switch_label_bb.
3054         (expand_case): Likewise.
3055         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3056         cfun argument explicitly. Likewise.
3057         (make_edges_bb): Likewise.
3058         (make_cond_expr_edges): Likewise.
3059         (get_cases_for_edge): Likewise.
3060         (make_gimple_switch_edges): Likewise.
3061         (label_to_block_fn): Likewise.
3062         (label_to_block): Likewise.
3063         (make_goto_expr_edges): Likewise.
3064         (make_gimple_asm_edges): Likewise.
3065         (main_block_label): Likewise.
3066         (group_case_labels_stmt): Likewise.
3067         (find_taken_edge_computed_goto): Likewise.
3068         (find_taken_edge_switch_expr): Likewise.
3069         (gimple_verify_flow_info): Likewise.
3070         (gimple_redirect_edge_and_branch): Likewise.
3071         (gimple_switch_label_bb): New function.
3072         (gimple_switch_default_bb): Likewise.
3073         (gimple_switch_edge): Likewise.
3074         (gimple_switch_default_edge): Likewise.
3075         * tree-cfg.h (label_to_block_fn): Remove and replace ...
3076         (label_to_block): ... with this.
3077         (gimple_switch_label_bb): New.
3078         (gimple_switch_default_bb): Likewise.
3079         (gimple_switch_edge): Likewise.
3080         (gimple_switch_default_edge): Likewise.
3081         * tree-cfgcleanup.c (convert_single_case_switch): Use
3082         new gimple functions and pass new argument to label_to_block.
3083         (cleanup_control_flow_bb):
3084         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3085         cfun argument explicitly.
3086         (make_eh_edges): Likewise.
3087         (redirect_eh_dispatch_edge): Likewise.
3088         (lower_resx): Likewise.
3089         (lower_eh_dispatch): Likewise.
3090         (maybe_remove_unreachable_handlers): Likewise.
3091         (unsplit_eh): Likewise.
3092         (cleanup_empty_eh): Likewise.
3093         (verify_eh_edges): Likewise.
3094         (verify_eh_dispatch_edge): Likewise.
3095         * tree-ssa-dom.c (record_edge_info): Likewise.
3096         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3097         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3098         (thread_through_normal_block): Likewise.
3099         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3100         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3101         * tree-switch-conversion.c (switch_conversion::collect): Use new
3102         gimple functions.
3103         (switch_conversion::check_final_bb): Likewise.
3104         (switch_conversion::gather_default_values): Pass new argument
3105         to label_to_block.
3106         (switch_conversion::build_constructors): Likewise.
3107         (switch_decision_tree::compute_cases_per_edge): Use new
3108         gimple_switch_edge function.
3109         (switch_decision_tree::analyze_switch_statement): Pass new argument
3110         to label_to_block.
3111         (switch_decision_tree::try_switch_expansion): Use
3112         gimple_switch_default_edge.
3113         * tree-vrp.c (find_switch_asserts): Pass new argument
3114         to label_to_block.
3115         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3116         (vr_values::simplify_switch_using_ranges): Likewise.
3118 2018-08-27  Richard Biener  <rguenther@suse.de>
3120         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3121         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3123         * tree-ssa-sccvn.h (struct vn_pval): New structure.
3124         (struct vn_nary_op_s): Add unwind_to member.  Add
3125         predicated_values flag and put result into a union together
3126         with a linked list of vn_pval.
3127         (struct vn_ssa_aux): Add name member to make maintaining
3128         a map of SSA name to vn_ssa_aux possible.  Remove no longer
3129         needed info, dfsnum, low, visited, on_sccstack, use_processed
3130         and range_info_anti_range_p members.
3131         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3132         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3133         New functions.
3134         (vn_valueize): New global.
3135         (vn_context_bb): Likewise.
3136         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3137         VN_INFO_PTR_INFO): Remove.
3138         * tree-ssa-sccvn.c: ... (rewrite)
3139         (pass_fre::execute): For -O2+ initialize loops and run
3140         RPO VN in optimistic mode (iterating).  For -O1 and -Og
3141         run RPO VN in non-optimistic mode.
3142         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3143         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3144         * doc/invoke.texi (sccvn-max-scc-size): Remove.
3145         (rpo-vn-max-loop-depth): Document.
3146         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3147         when valuezing the VUSE signals we walked out of the region.
3148         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3149         (phi_translate): Set VN context block to use for availability
3150         lookup.
3151         (compute_avail): Likewise.
3152         (pre_valueize): New function.
3153         (pass_pre::execute): Adjust to the RPO VN API.
3155         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
3156         (propagate_constants_for_unrolling): Remove.
3157         (tree_unroll_loops_completely): Perform value-numbering
3158         on the unrolled bodies loop parent.
3160 2018-08-27  Richard Biener  <rguenther@suse.de>
3162         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
3163         for partial antic compute.
3165 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
3167         PR rtl-optimization/87065
3168         * combine.c (simplify_if_then_else): Formatting fix.
3169         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3170         check.
3171         (known_cond): Don't return const_true_rtx for vector modes.  Use
3172         CONST0_RTX instead of const0_rtx.  Formatting fixes.
3174 2018-08-27  Martin Liska  <mliska@suse.cz>
3176         PR gcov-profile/87069
3177         * gcov.c (process_file): Record files already processed
3178         and warn about a file being processed multiple times.
3180 2018-08-27  Martin Liska  <mliska@suse.cz>
3182         PR driver/83193
3183         * config/aarch64/aarch64.c (aarch64_override_options_internal):
3184         Set default values for x_aarch64_*_string strings.
3185         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
3186         prefix.  For -mabi do not print '=ABI' in help and use
3187         <option_value> format for -msve-vector-bits and -moverride
3188         options.
3190 2018-08-26  Jeff Law  <law@redhat.com>
3192         * config/mips/frame-header-opt.c: Include "backend.h" rather than
3193         "cfg.h"
3195 2018-08-26  Marek Polacek  <polacek@redhat.com>
3197         PR c++/87029, Implement -Wredundant-move.
3198         * doc/invoke.texi: Document -Wredundant-move.
3200 2018-08-25  Martin Sebor  <msebor@redhat.com>
3202         PR tree-optimization/87059
3203         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
3204         to the same type as the other.
3205         * fold-const.c (fold_binary_loc): Assert expectation.
3207 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
3209         * config/darwin.c (machopic_legitimize_pic_address): Clean up
3210         extraneous parentheses, dead code section and formatting.
3212 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
3214         PR c++/87091
3215         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
3216         wide enough for jumps in the line-numbering to be visible.
3217         (layout::print_gap_in_line_numbering): New member function.
3218         (layout::calculate_line_spans): When using line numbering, merge
3219         line spans that are only 1 line apart.
3220         (diagnostic_show_locus): When printing line numbers, show gaps in
3221         line numbering directly, rather than printing headers.
3222         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
3223         line-numbering with multiple line spans.
3224         (selftest::test_fixit_insert_containing_newline_2): Add test of
3225         line-numbering, in which the spans are close enough to be merged.
3227 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
3229         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
3230         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
3231         * tree-vrp.c (range_is_nonnull): Remove.
3232         (range_includes_zero_p): Accept value_range instead of min/max.
3233         (extract_range_from_binary_expr_1): Do not early bail on
3234         POINTER_PLUS_EXPR.
3235         Use range_includes_zero_p instead of range_is_nonnull.
3236         (extract_range_from_unary_expr): Use range_includes_zero_p instead
3237         of range_is_nonnull.
3238         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
3239         special case VR_ANTI_RANGE.
3240         (vrp_finalize): Same.
3241         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
3242         instead of min/max.
3243         (range_is_nonnull): Remove.
3244         * vr-values.c (vrp_stmt_computes_nonzero): Use
3245         range_includes_zero_p instead of range_is_nonnull.
3246         (extract_range_basic): Pass value_range to range_includes_zero_p
3247         instead of range_is_nonnull.
3249 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
3251         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
3252         * emit-rtl.h (rtl_data): Remove return_bnd.
3253         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
3254         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
3255         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
3256         (POINTER_BOUNDS_MODE): Remove definition.
3257         (make_pointer_bounds_mode): Remove.
3258         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
3259         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
3260         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
3261         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
3262         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
3263         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
3264         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
3266         * config/i386/i386-modes.def (BND32, BND64): Remove.
3267         * config/i386/i386.c (dbx_register_map): Remove bound registers.
3268         (dbx64_register_map): Ditto.
3269         (svr4_dbx_register_map): Ditto.
3270         (indirect_thunk_bnd_needed): Remove.
3271         (indirect_thunks_bnd_used): Ditto.
3272         (indirect_return_bnd_needed): Ditto.
3273         (indirect_return_via_cx_bnd): Ditto.
3274         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
3275         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
3276         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
3277         (output_indirect_thunk_function): Remove handling of
3278         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
3279         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
3280         (ix86_save_reg): Remove handling of crtl->return_bnd.
3281         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
3282         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
3283         and UNSPEC_BNDLX_ADDR.
3284         (ix86_output_indirect_branch_via_reg): Remove handling of
3285         indirect_thunk_prefix_bnd.
3286         (ix86_output_indirect_branch_via_push): Ditto.
3287         (ix86_output_function_return): Ditto.
3288         (ix86_output_indirect_function_return): Ditto.
3289         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
3290         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
3291         (CALL_USED_REGISTERS): Ditto.
3292         (REG_ALLOC_ORDER): Update for removal of bound registers.
3293         (HI_REGISTER_NAMES): Ditto.
3294         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
3295         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
3296         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
3297         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
3298         (FIRST_PSEUDO_REG): Update.
3299         (BND): Remove mode iterator.
3300         * config/i386/predicates.md (bnd_mem_operator): Remove.
3302 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
3304         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
3305         vectors.
3307 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
3309         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
3310         the case in which the permute needs only a single element and
3311         repeats for every vector of the result.  Extend that case to
3312         handle variable-length vectors.
3313         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3315 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
3317         PR debug/79342
3318         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
3319         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
3321 2018-08-24  Richard Biener  <rguenther@suse.de>
3323         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
3324         bb_flags_allocated members.
3325         (auto_flag): New RAII class for allocating flags.
3326         (auto_edge_flag): New RAII class for allocating edge flags.
3327         (auto_bb_flag): New RAII class for allocating bb flags.
3328         * cfgloop.c (verify_loop_structure): Allocate temporary edge
3329         flag dynamically.
3330         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
3331         in favor of temporarily allocated BB flag.
3332         * hsa-brig.c: Re-order includes.
3333         * hsa-dump.c: Likewise.
3334         * hsa-regalloc.c: Likewise.
3335         * print-rtl.c: Likewise.
3336         * profile-count.c: Likewise.
3338 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
3340         PR target/86989
3341         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
3342         the TOC register.
3344 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
3346         PR 87073/bootstrap
3347         * wide-int-range.cc (wide_int_range_div): Do not ignore result
3348         from wide_int_range_multiplicative_op.
3350 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3352         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
3353         "permutaion".
3355 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
3357         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
3358         to 'expanded'.
3360 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
3362         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
3363         full GENERIC expression used for replacement.
3365 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
3367         * tree-vrp.c (abs_extent_range): Remove.
3368         (extract_range_into_wide_ints): Pass wide ints by reference.
3369         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
3370         Pass wide ints by reference in all calls to
3371         extract_range_into_wide_ints.
3372         * wide-int-range.cc (wide_int_range_div): New.
3373         * wide-int-range.h (wide_int_range_div): New.
3374         (wide_int_range_includes_zero_p): New.
3375         (wide_int_range_zero_p): New.
3377 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
3379         * config/aarch64/aarch64.md (arches): New enum.
3380         (arch): New enum attr.
3381         (arch_enabled): New attr.
3382         (enabled): Now uses arch_enabled only.
3383         (simd, sve, fp16): Removed attribute.
3384         (fp): Attr now defined in terms of 'arch'.
3385         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
3386         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
3387         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
3388         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
3389         attributes into 'arch'.
3390         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
3391         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
3392         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
3393         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
3394         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
3395         'simd' attribute into 'arch'.
3396         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
3397         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
3398         Convert use of 'fp' attribute to 'arch'.
3399         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
3400         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
3401         into 'arch'.
3402         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
3403         (different modes) Merge 'fp' and 'simd' into 'arch'.
3404         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
3405         'simd' into 'arch'.
3407 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
3409         PR rtl-optimization/87026
3410         * expmed.c (canonicalize_comparison): If we can no longer create
3411         pseudoregisters, don't.
3413 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
3415         PR target/86951
3416         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
3417         prototype.
3418         * config/arm/arm.c (speculation_barrier_libfunc): New static
3419         variable.
3420         (arm_init_libfuncs): Initialize it.
3421         (arm_emit_speculation_barrier): New function.
3422         * config/arm/arm.md (speculation_barrier): Call
3423         arm_emit_speculation_barrier for architectures that do not have
3424         DSB or ISB.
3425         (speculation_barrier_insn): Only match on Armv7 or later.
3427 2018-08-23  Richard Biener  <rguenther@suse.de>
3429         PR middle-end/87024
3430         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
3431         calls.
3433 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
3435         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
3436         of single-vector TBLs.
3437         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
3438         one input is given.
3440 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
3442         PR target/85910
3443         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
3444         aarch64_evpc_tbl guard.
3446 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3448         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
3449         behaviour.
3451 2018-08-22  Martin Sebor  <msebor@redhat.com>
3453         PR middle-end/87052
3454         * tree-pretty-print.c (pretty_print_string): Add argument.
3455         (dump_generic_node): Call to pretty_print_string with string size.
3457 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
3459         PR rtl-optimization/86771
3460         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
3461         of two SETs into those two SETs, one to be placed at i2, if that SETs
3462         destination is modified between i2 and i3.
3464 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
3466         PR tree-optimization/86725
3467         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
3468         function.
3469         (vect_analyze_scalar_cycles_1): Check it.
3471 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
3473         PR tree-optimization/86725
3474         * tree-vect-loop.c (vect_is_simple_reduction): When treating
3475         an outer loop phi as a double reduction, make sure that the
3476         single user of the phi result is an inner loop phi.
3478 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
3480         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
3481         grouped stores with gaps to a strided group.
3483 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
3485         * tree-vect-stmts.c (get_group_load_store_type)
3486         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
3487         first statement in a group.
3489 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3491         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
3492         the sequence used in gcc/gcc.c.
3494 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3496         PR other/704
3497         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
3498         building it.
3500 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3502         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
3503         Darwin10-specific unwinder-shim.
3504         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
3505         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
3506         New to cater for Darwin10 Rosetta.
3508 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3510         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
3511         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
3513 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
3515         PR bootstrap/81033
3516         PR target/81733
3517         PR target/52795
3518         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
3519         (dwarf2out_switch_text_section): Generate a local label for the
3520         second function sub-section and apply it as the second FDE start
3521         label.
3522         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
3523         second sub-section start.
3525 2018-08-22  Richard Biener  <rguenther@suse.de>
3527         PR tree-optimization/86988
3528         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
3530 2018-08-22  Richard Biener  <rguenther@suse.de>
3532         PR tree-optimization/86945
3533         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
3535 2018-08-22  Alexandre Oliva <oliva@adacore.com>
3537         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
3538         a comment about how uses of r2 for .sdata2 come about.
3540 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
3542         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
3544 2018-08-21  Marek Polacek  <polacek@redhat.com>
3546         PR c++/86981, Implement -Wpessimizing-move.
3547         * doc/invoke.texi: Document -Wpessimizing-move.
3549 2018-08-21  Jan Hubicka  <jh@suse.cz>
3551         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
3552         * tree.h (is_redundant_typedef): Remove.
3553         * dwarf2out.c (is_redundant_typedef): Turn into static function.
3555 2018-08-21  Jan Hubicka  <jh@suse.cz>
3557         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
3558         when possible.
3560 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
3562         * expmed.c (extract_low_bits): Reject invalid subregs early.
3564 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3566         PR middle-end/86121
3567         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
3568         behaviour.
3570 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
3572         * config/vxworks.h: Guard vxworks_asm_out_constructor and
3573         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
3574         * config/vxworks.c: Likewise.
3576 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
3578         * config/vxworks.c: Set targetm.have_ctors_dtors
3579         if HAVE_INITFINI_ARRAY_SUPPORT.
3580         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
3581         if HAVE_INITFINI_ARRAY_SUPPORT.
3583 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
3585         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
3586         default search path for VxWorks < 7.
3588 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3590         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
3591         (get_format_string): Refer to c_getstr.
3593 2018-08-21  Tom de Vries  <tdevries@suse.de>
3595         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
3596         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
3597         (debuginfo_early_stop): Declare.
3598         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
3599         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
3600         (debuginfo_early_stop): New function.
3601         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
3602         and debuginfo_early_stop.
3603         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
3604         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
3605         (general_init): Call debuginfo_early_init.
3606         (finalize): Call debuginfo_fini.
3607         (do_compile): Call debuginfo_init.
3608         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
3609         -fdump-early-debug.
3610         (@item -fdump-debug, @item -fdump-earlydebug): Add.
3612 2018-08-21  Tom de Vries  <tdevries@suse.de>
3614         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
3615         flag_dump_noaddr and flag_dump_unnumbered.
3617 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
3619         * wide-int-range.cc (wide_int_range_abs): New.
3620         (wide_int_range_order_set): Rename from wide_int_range_min_max.
3621         * wide-int-range.h (wide_int_range_abs): New.
3622         (wide_int_range_min_max): New.
3623         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
3624         case to call wide_int_range_abs.
3625         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
3626         (extract_range_from_abs_expr): Delete.
3628 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
3630         PR target/87033
3631         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
3632         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
3633         for indexed loads.
3635 2018-08-20  Nathan Sidwell  <nathan@acm.org>
3636             Jeff Law <law@redhat.com>
3638         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
3639         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
3641 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
3643         PR other/84889
3644         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
3645         (decl_attributes): Likewise.
3646         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
3647         instance.
3648         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
3649         * diagnostic-core.h (class auto_diagnostic_group): New class.
3650         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
3651         (diagnostic_report_diagnostic): Handle the first diagnostics within
3652         a group.
3653         (emit_diagnostic): Add auto_diagnostic_group instance.
3654         (inform): Likewise.
3655         (inform_n): Likewise.
3656         (warning): Likewise.
3657         (warning_at): Likewise.
3658         (warning_n): Likewise.
3659         (pedwarn): Likewise.
3660         (permerror): Likewise.
3661         (error): Likewise.
3662         (error_n): Likewise.
3663         (error_at): Likewise.
3664         (sorry): Likewise.
3665         (fatal_error): Likewise.
3666         (internal_error): Likewise.
3667         (internal_error_no_backtrace): Likewise.
3668         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
3669         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
3670         * diagnostic.h (struct diagnostic_context): Add fields
3671         "diagnostic_group_nesting_depth",
3672         "diagnostic_group_emission_count", "begin_group_cb",
3673         "end_group_cb".
3674         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
3675         Add auto_diagnostic_group instance(s).
3676         (find_explicit_erroneous_behavior): Likewise.
3677         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
3678         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
3679         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
3680         (gimplify_va_arg_expr): Likewise.
3681         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
3682         (HSA_SORRY_AT): Likewise.
3683         * ipa-devirt.c (compare_virtual_tables): Likewise.
3684         (warn_odr): Likewise.
3685         * multiple_target.c (expand_target_clones): Likewise.
3686         * opts-common.c (cmdline_handle_error): Likewise.
3687         * reginfo.c (globalize_reg): Likewise.
3688         * substring-locations.c (format_warning_n_va): Likewise.
3689         * tree-inline.c (expand_call_inline): Likewise.
3690         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
3691         * tree-ssa-loop-niter.c
3692         (do_warn_aggressive_loop_optimizations): Likewise.
3693         * tree-ssa-uninit.c (warn_uninit): Likewise.
3694         * tree.c (warn_deprecated_use): Likewise.
3696 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
3698         PR target/87014
3699         * config/i386/i386.md (eh_return): Always update EH return
3700         address in word_mode.
3702 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
3704         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
3705         TARGET_SPLIT_COMPLEX_ARG is defined.
3707 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3709         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
3711 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3713         PR target/86984
3714         * expr.c (expand_assignment): Assert that bitpos is positive.
3715         (store_field): Likewise
3716         (expand_expr_real_1): Make sure that bitpos is positive.
3717         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
3718         integer overflow.
3720 2018-08-20  Nathan Sidwell  <nathan@acm.org>
3722         * Makefile.in (CPP_ID_DATA_H): Delete.
3723         (CPP_INTERNAL_H): Don't add it.
3724         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
3725         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
3727 2018-08-20  Richard Biener  <rguenther@suse.de>
3729         PR tree-optimization/78655
3730         * tree-vrp.c (extract_range_from_binary_expr_1): Make
3731         pointer + offset nonnull if either operand is nonnull work.
3733 2018-08-20  Tom de Vries  <tdevries@suse.de>
3735         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
3736         unless the referenced die describes the added property using
3737         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
3738         Otherwise, add a DW_AT_location to the referenced die.
3740 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
3742         PR target/86994
3743         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
3744         register_operand when calling ix86_set_reg_reg_cost.
3745         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
3746         Set *total to 0 for operands that satisfy x86_64_immediate_operand
3747         predicate and to 1 otherwise.
3749 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
3751         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
3752         emit a diagnostic that it is not supported and reset the option.
3753         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
3754         supported and consume the option.  (ASM_FINAL_SPEC): New.
3756 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
3758         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
3759         a sentence.
3761 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
3763         C-SKY port: Documentation
3765         * doc/extend.texi (C-SKY Function Attributes): New section.
3766         * doc/invoke.texi (Option Summary): Add C-SKY options.
3767         (C-SKY Options): New section.
3768         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
3770 2018-08-17  Jojo  <jijie_rong@c-sky.com>
3771             Huibin Wang  <huibin_wang@c-sky.com>
3772             Sandra Loosemore  <sandra@codesourcery.com>
3773             Chung-Lin Tang  <cltang@codesourcery.com>
3775         C-SKY port: Backend implementation
3777         * config/csky/*: New.
3778         * common/config/csky/*: New.
3780 2018-08-17  Jojo  <jijie_rong@c-sky.com>
3781             Huibin Wang  <huibin_wang@c-sky.com>
3782             Sandra Loosemore  <sandra@codesourcery.com>
3783             Chung-Lin Tang  <cltang@codesourcery.com>
3784             Andrew Jenner  <andrew@codesourcery.com>
3786         C-SKY port: Configury
3788         * config.gcc (csky-*-*): New.
3789         * configure.ac: Add csky to targets for dwarf2 debug_line support.
3790         * configure: Regenerated.
3792 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
3794         * dump-context.h: Include "dumpfile.h".
3795         (dump_context::dump_printf_va): Convert final param from va_list
3796         to va_list *.  Convert from ATTRIBUTE_PRINTF to
3797         ATTRIBUTE_GCC_DUMP_PRINTF.
3798         (dump_context::dump_printf_loc_va): Likewise.
3799         * dumpfile.c: Include "stringpool.h".
3800         (make_item_for_dump_printf_va): Delete.
3801         (make_item_for_dump_printf): Delete.
3802         (class dump_pretty_printer): New class.
3803         (dump_pretty_printer::dump_pretty_printer): New ctor.
3804         (dump_pretty_printer::emit_items): New member function.
3805         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
3806         function.
3807         (dump_pretty_printer::emit_item): New member function.
3808         (dump_pretty_printer::stash_item): New member function.
3809         (dump_pretty_printer::format_decoder_cb): New member function.
3810         (dump_pretty_printer::decode_format): New member function.
3811         (dump_context::dump_printf_va): Reimplement in terms of
3812         dump_pretty_printer.
3813         (dump_context::dump_printf_loc_va): Convert final param from va_list
3814         to va_list *.
3815         (dump_context::begin_scope): Reimplement call to
3816         make_item_for_dump_printf.
3817         (dump_printf): Update for change to dump_printf_va.
3818         (dump_printf_loc): Likewise.
3819         (selftest::test_capture_of_dump_calls): Convert "stmt" from
3820         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
3821         with %T, %E, and %G.
3822         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
3823         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
3824         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
3825         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
3826         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
3827         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
3828         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
3829         within a dump_printf_loc call to "%wu".
3830         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
3831         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
3832         missing space after "=".
3833         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
3834         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
3835         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
3836         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
3837         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
3838         duplicate "vectorized" from message.
3840 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3842         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
3843         polyNxK_t element's TYPE_STRING_FLAG.
3845 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
3847         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
3848         (they were unnamed before).  Fix comments.
3850 2018-08-17  Nathan Sidwell  <nathan@acm.org>
3852         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
3854 2018-08-17  Richard Biener  <rguenther@suse.de>
3856         PR tree-optimization/86841
3857         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
3859 2018-08-17  Martin Liska  <mliska@suse.cz>
3861         * common.opt: Remove Warn, Init and Report for options with
3862         Ignore/Deprecated flag. Warning is done automatically for
3863         Deprecated flags.
3864         * config/i386/i386.opt: Likewise.
3865         * config/ia64/ia64.opt: Likewise.
3866         * config/rs6000/rs6000.opt: Likewise.
3867         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
3868         Remove usage of flag_check_pointer_bounds.
3869         * lto-wrapper.c (merge_and_complain): Do not handle
3870         OPT_fcheck_pointer_bounds.
3871         (append_compiler_options): Likewise.
3872         * opt-functions.awk: Do not handle Deprecated.
3873         * optc-gen.awk: Check that Var, Report and Init are not
3874         used for an option with Ignore/Deprecated flag.
3875         * opts-common.c (decode_cmdline_option): Do not report
3876         CL_ERR_DEPRECATED.
3877         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
3878         options.
3879         * opts.h (struct cl_option): Remove cl_deprecated flag.
3880         (CL_ERR_DEPRECATED): Remove error enum value.
3882 2018-08-17  Richard Biener  <rguenther@suse.de>
3884         PR middle-end/86505
3885         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
3886         across a va-arg-pack using call adjust its return value accordingly.
3888 2018-08-16  Martin Sebor  <msebor@redhat.com>
3890         PR tree-optimization/86853
3891         * gimple-ssa-sprintf.c (struct format_result): Rename member.
3892         (struct fmtresult): Add member and initialize it in ctors.
3893         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
3894         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
3895         (format_directive): Set POSUNDER4K when MAYFAIL is set.
3896         (parse_directive): Handle %C same as %c.
3897         (sprintf_dom_walker::compute_format_length): Adjust.
3898         (is_call_safe): Adjust.
3900 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3902         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
3903         for determining how to count the elements.
3904         * builtins.h (c_strlen): Adjust prototype.
3905         * expr.c (string_constant): Add new parameter mem_size.
3906         Set *mem_size appropriately.
3907         * expr.h (string_constant): Adjust protoype.
3908         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
3909         * gimple-fold.h (get_range_strlen): Adjust prototype.
3910         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
3911         (format_string): Call get_string_length with eltsize.
3913 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
3915         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
3916         to emit the span, rather than setting it as the prefix.
3918 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
3920         * diagnostic-show-locus.c (layout::start_annotation_line): Add
3921         "margin_char" parameter, defaulting to space.  Use it in place
3922         of pp_space for the initial part of the margin.
3923         (layout::print_leading_fixits): Use '+' when filling the margin
3924         of line-insertion fix-it hints.
3926 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
3928         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
3929         Delete.
3931 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
3933         * config/rs6000/altivec.md: Don't set length attribute to the default
3934         value.
3935         * config/rs6000/darwin.md: Ditto.
3936         * config/rs6000/dfp.md: Ditto.
3937         * config/rs6000/htm.md: Ditto.
3938         * config/rs6000/rs6000.md: Ditto.
3939         * config/rs6000/sync.md: Ditto.
3940         * config/rs6000/vsx.md: Ditto.
3942 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
3944         * config/rs6000/altivec.md: Don't set length attribute to the default
3945         value, for branch instructions.
3946         * config/rs6000/darwin.md: Ditto.
3947         * config/rs6000/rs6000.md: Ditto.
3949 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
3951         * config/rs6000/rs6000.md (length): Always define as const_int 4.
3952         (unnamed conditional branch define_insn): Set length to 4 or 8
3953         depending on offset.
3954         (<bd>_<mode>): Similar, for alternative 0.
3955         (<bd>tf_<mode>): Ditto.
3957 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
3959         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
3961 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
3963         * doc/rtl.texi: Replace old RTX class names with new names.
3966 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
3968         * expmed.h (canonicalize_comparison): New declaration.
3969         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
3970         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
3971         * optabs.c (prepare_cmp_insn): Likewise.
3972         * rtl.h (unsigned_condition_p): New function which checks if a
3973         comparison operator is unsigned.
3975 2018-08-16  Nathan Sidwell  <nathan@acm.org>
3977         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
3978         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
3980 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
3982         PR target/84711
3983         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
3984         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
3985         (mov<mov>): ..this and enable unconditionally.
3987 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
3989         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
3991 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
3993         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
3994         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
3995         "Common" with "Target".
3997 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
3999         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4000         * doc/invoke.texi (mmitigate-rop): Remove.
4001         * config/i386/i386.c: Do not include "regrename.h".
4002         (ix86_rop_should_change_byte_p, reg_encoded_number)
4003         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4004         Remove.
4005         (ix86_reorg): Remove call to ix86_mitigate_rop.
4006         * config/i386/i386.md (attr "modrm_class"): Remove.
4007         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4008         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4009         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4011 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
4013         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4014         allow folding of mergeh() and mergel() for the float and double types.
4015         (fold_mergehl_helper): Rework to handle building a permute tree
4016         for float vectors.
4018 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
4020         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4021         for TARGET_SSE.
4023 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
4025         * common.opt (fdiagnostics-show-labels): New option.
4026         * diagnostic-show-locus.c (class layout_range): Add field
4027         "m_label".
4028         (class layout): Add field "m_show_labels_p".
4029         (layout_range::layout_range): Add param "label" and use it to
4030         initialize m_label.
4031         (make_range): Pass in NULL for new "label" param of layout_range's
4032         ctor.
4033         (layout::layout): Initialize m_show_labels_p.
4034         (layout::maybe_add_location_range): Pass in loc_range->m_label
4035         when constructing layout_range instances.
4036         (struct line_label): New struct.
4037         (layout::print_any_labels): New member function.
4038         (layout::print_line): Call it if label-printing is enabled.
4039         (selftest::test_one_liner_labels): New test.
4040         (selftest::test_diagnostic_show_locus_one_liner): Call it.
4041         * diagnostic.c (diagnostic_initialize): Initialize
4042         context->show_labels_p.
4043         * diagnostic.h (struct diagnostic_context): Add field
4044         "show_labels_p".
4045         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4046         -fno-diagnostics-show-labels.
4047         * dwarf2out.c (gen_producer_string): Add
4048         OPT_fdiagnostics_show_labels to the ignored options.
4049         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4050         param.
4051         (gcc_rich_location::maybe_add_expr): Likewise.
4052         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4053         label" param, defaulting to NULL.
4054         (gcc_rich_location::add_expr): Add "label" param.
4055         (gcc_rich_location::maybe_add_expr): Likewise.
4056         (class text_range_label): New class.
4057         (class range_label_for_type_mismatch): New class.
4058         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4059         of format_warning_va.
4060         (fmtwarn_n): Likewise for new params of format_warning_n_va.
4061         * lto-wrapper.c (merge_and_complain): Add
4062         OPT_fdiagnostics_show_labels to the "pick one setting" options.
4063         (append_compiler_options): Likewise to the dropped options.
4064         (append_diag_options): Likewise to the passed-on options.
4065         * opts.c (common_handle_option): Handle the new option.
4066         * selftest-diagnostic.c
4067         (test_diagnostic_context::test_diagnostic_context): Enable
4068         show_labels_p.
4069         * substring-locations.c: Include "gcc-rich-location.h".
4070         (format_warning_n_va): Add "fmt_label" and "param_label" params
4071         and use them as appropriate.
4072         (format_warning_va): Add "fmt_label" and "param_label" params,
4073         passing them on to format_warning_n_va.
4074         (format_warning_at_substring): Likewise.
4075         (format_warning_at_substring_n): Likewise.
4076         * substring-locations.h (format_warning_va): Add "fmt_label" and
4077         "param_label" params.
4078         (format_warning_n_va): Likewise.
4079         (format_warning_at_substring): Likewise.
4080         (format_warning_at_substring_n): Likewise.
4081         * toplev.c (general_init): Initialize global_dc->show_labels_p.
4083 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
4085         PR testsuite/86519
4086         * builtins.c (expand_builtin_memcmp): Do not expand the call
4087         when overflow is detected.
4089 2018-08-15  Martin Sebor  <msebor@redhat.com>
4091         PR tree-optimization/71625
4092         * config/aarch64/aarch64-builtins.c
4093         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4095 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
4097         * config/s390/s390.c (s390_reorg): Remove loop.
4099 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4101         * config/darwin.c
4102          (darwin_function_switched_text_sections): Delete.
4103         * gcc/config/darwin.h
4104          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4106 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
4108         PR target/81685
4109         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4110         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
4111         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4113 2018-08-15  Martin Liska  <mliska@suse.cz>
4115         PR tree-optimization/86925
4116         * predict.c (expr_expected_value_1): When taking
4117         later predictor, assign also probability.
4118         Use fold_build2_initializer_loc in order to fold
4119         the expression in -frounding-math.
4121 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
4123         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4124         patterns.
4125         (expand_vec_perm_1): Try the new method.
4127 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
4129         PR target/86547
4130         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4131         Check whether lra_live_max_point is 0 before dividing.
4133 2018-08-14  Martin Sebor  <msebor@redhat.com>
4135         PR tree-optimization/86650
4136         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4137         (vrp_prop::check_mem_ref): Same.
4139 2018-08-13  Liu Hao <lh_mouse@126.com>
4141         * pretty-print.c (eat_esc_sequence): Swap the foreground and
4142         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4143         and clear it thereafter, as it only works for DBCS.
4145 2018-08-13  Liu Hao <lh_mouse@126.com>
4147         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4148         handle returned by _get_osf_handle().
4150 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4152         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
4153         for folding vec_perm.
4155 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
4157         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
4158         Add support for gimple-folding of vec_pack() and vec_unpack()
4159         intrinsics.
4161 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
4163         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4164         vec_xst variants to the list.
4165         (rs6000_gimple_fold_builtin): Add support for folding unaligned
4166         vector loads and stores.
4168 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
4170         * config.gcc (rs6000-ibm-aix4.x): Delete.
4171         (rs6000-ibm-aix5.1): Delete.
4172         (rs6000-ibm-aix5.2): Delete.
4173         (rs6000-ibm-aix5.3): Delete.
4174         * config/rs6000/aix43.h: Delete.
4175         * config/rs6000/aix51.h: Delete.
4176         * config/rs6000/aix52.h: Delete.
4177         * config/rs6000/t-aix43: Delete.
4179 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
4181         * config/s390/s390.c (s390_decompose_constant_pool_ref):
4182         New function.
4183         (s390_decompose_address): Factor out constant pool ref
4184         decomposition.
4186 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4188         * config/nds32/nds32-predicates.c
4189         (nds32_can_use_bclr_p): Change return type as bool.
4190         (nds32_can_use_bset_p): Ditto.
4191         (nds32_can_use_btgl_p): Ditto.
4192         (nds32_can_use_bitci_p): Ditto.
4193         * config/nds32/nds32-protos.h
4194         (nds32_can_use_bclr_p): Change declaration.
4195         (nds32_can_use_bset_p): Ditto.
4196         (nds32_can_use_btgl_p): Ditto.
4197         (nds32_can_use_bitci_p): Ditto.
4199 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4201         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
4202         Support -msched-prolog-epilog option.
4203         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
4205 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4207         * common/config/nds32/nds32-common.c
4208         (nds32_option_optimization_table): Enalbe -malways-align.
4210 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
4212         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
4213         extra_headers.
4214         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
4215         OPT_misr_secure_ case.
4216         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
4217         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
4218         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
4219         secure attribute.
4220         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
4221         (nds32_isr_info): New field security_level.
4222         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
4223         * config/nds32/nds32.md (return_internal): Consider critical attribute.
4224         * config/nds32/nds32.opt (misr-secure): New option.
4225         * config/nds32/nds32_init.inc: New file.
4226         * config/nds32/nds32_isr.h: New file.
4228 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
4230         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
4231         Update comment for atomic instructions.
4232         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
4233         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
4234         Remove.
4235         (atomic_loaddi): Revise fence expansion to only emit fence prior to
4236         load for __ATOMIC_SEQ_CST model.
4237         (atomic_loaddi_1): Remove float register target.
4238         (atomic_storedi): Handle CONST_INT values.
4239         (atomic_storedi_1): Remove float register source.  Add special case
4240         for zero value.
4241         (memory_barrier): New expander and insn.
4243 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
4245         PR tree-optimization/86835
4246         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
4247         new_stmt after def_gsi, make sure to insert new_square_stmt after
4248         that stmt, not 2 stmts before it.
4250 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
4252         PR target/82418
4253         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
4254         instead of SWI48.
4256 2018-08-10  Martin Liska  <mliska@suse.cz>
4258         PR target/83610
4259         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
4260         function type.
4261         * builtins.c (expand_builtin_expect_with_probability):
4262         New function.
4263         (expand_builtin_expect_with_probability): New function.
4264         (build_builtin_expect_predicate): Add new argumnet probability
4265         for BUILT_IN_EXPECT_WITH_PROBABILITY.
4266         (fold_builtin_expect):
4267         (fold_builtin_2):
4268         (fold_builtin_3):
4269         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
4270         * builtins.h (fold_builtin_expect): Set new argument.
4271         * doc/extend.texi: Document __builtin_expect_with_probability.
4272         * doc/invoke.texi: Likewise.
4273         * gimple-fold.c (gimple_fold_call): Pass new argument.
4274         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
4275         also BUILT_IN_EXPECT_WITH_PROBABILITY.
4276         * predict.c (get_predictor_value): New function.
4277         (expr_expected_value): Add new argument probability. Assume
4278         that predictor and probability are always non-null.
4279         (expr_expected_value_1): Likewise.  For __builtin_expect and
4280         __builtin_expect_with_probability set probability.  Handle
4281         combination in binary expressions.
4282         (tree_predict_by_opcode): Simplify code by simply calling
4283         get_predictor_value.
4284         (pass_strip_predict_hints::execute): Add handling of
4285         BUILT_IN_EXPECT_WITH_PROBABILITY.
4286         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
4287         new predictor.
4288         * tree.h (DECL_BUILT_IN_P): New function.
4290 2018-08-10  Martin Liska  <mliska@suse.cz>
4292         PR tree-optimization/85799
4293         * passes.def: Add argument for pass_strip_predict_hints.
4294         * predict.c (class pass_strip_predict_hints): Add new argument
4295         early_p.
4296         (strip_predictor_early): New function.
4297         (pass_strip_predict_hints::execute): Call the function to
4298         strip predictors.
4299         (strip_predict_hints): New function.
4300         * predict.def: Fix comment.
4302 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
4304         * Makefile.in: Clarify which tm.texi to copy over to assert the
4305         right to grant a GFDL license for all.
4307 2018-08-09  Jeff Law  <law@redhat.com>
4309         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
4310         unused variable.
4312 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
4314         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
4315         prototype.
4317 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
4319         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
4320         reductions for variable-length vectors.
4322 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
4324         PR other/84889
4325         * common.opt (fdiagnostics-show-line-numbers): New option.
4326         * diagnostic-show-locus.c (class layout): Add fields
4327         "m_show_line_numbers_p" and "m_linenum_width";
4328         (num_digits): New function.
4329         (test_num_digits): New function.
4330         (layout::layout): Initialize new fields.  Update m_x_offset
4331         logic to handle any left margin.
4332         (layout::print_source_line): Print line number when requested.
4333         (layout::start_annotation_line): New member function.
4334         (layout::print_annotation_line): Call it.
4335         (layout::print_leading_fixits): Likewise.
4336         (layout::print_trailing_fixits): Likewise.  Update calls to
4337         move_to_column for new parameter.
4338         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
4339         it to potentially call start_annotation_line.
4340         (layout::show_ruler): Call start_annotation_line.
4341         (selftest::test_line_numbers_multiline_range): New selftest.
4342         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
4343         and selftest::test_line_numbers_multiline_range.
4344         * diagnostic.c (diagnostic_initialize): Initialize
4345         show_line_numbers_p.
4346         * diagnostic.h (struct diagnostic_context): Add field
4347         "show_line_numbers_p".
4348         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4349         -fno-diagnostics-show-line-numbers.
4350         * dwarf2out.c (gen_producer_string): Add
4351         OPT_fdiagnostics_show_line_numbers to the ignored options.
4352         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
4353         one setting" options.
4354         (append_compiler_options): Likewise to the dropped options.
4355         (append_diag_options): Likewise to the passed-on options.
4356         * opts.c (common_handle_option): Handle the new option.
4357         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
4359 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4361         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
4362         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
4363         third argument of type "const signed char" to descriptions of
4364         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
4365         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
4366         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
4367         __builtin_bcdsub_ov functions.
4369 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
4371         PR tree-optimization/86858
4372         * tree-vect-loop.c (vect_is_simple_reduction): Restore
4373         flow_bb_inside_loop_p calls.
4375 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
4377         PR tree-optimization/86871
4378         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
4379         instead of gimple_assign_lhs.
4381 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
4383         PR target/86887
4384         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
4385         register constraint to operand 0.
4386         (add<mode>3_carryinC): Likewise.
4387         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
4389 2018-08-09  Martin Liska  <mliska@suse.cz>
4391         PR c/86895
4392         * common.opt: Remove extra line.
4394 2018-08-09  Martin Liska  <mliska@suse.cz>
4396         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
4397         at the end of a line, make first letter capital and end up
4398         a sentence with a dot.
4399         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
4400         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
4401         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
4402         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
4403         (PARAM_MAX_ISL_OPERATIONS): Likewise.
4404         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
4405         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
4406         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
4407         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
4408         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
4409         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
4410         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
4411         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
4412         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
4413         (PARAM_TREE_REASSOC_WIDTH): Likewise.
4414         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
4415         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
4416         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
4418 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
4420         PR target/84332
4421         * config/s390/s390.c (s390_option_override_internal): Reduce the
4422         stack-clash-protection-probe-interval param if it would be too big
4423         for z900.
4425 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
4427         PR target/46179
4428         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
4429         * config/m68k/m68k.c (handle_move_double): Don't call
4430         m68k_final_prescan_insn.
4431         (m68k_adjust_decorated_operand): Renamed from
4432         m68k_final_prescan_insn, remove first and third operand and
4433         simplify.
4434         (print_operand): Call it.
4435         (print_operand_address): Call it.
4437 2018-08-08  Nathan Sidwell  <nathan@acm.org>
4439         * diagnostic.c (diagnostic_report_current_module): Use
4440         linemap_included_from & linemap_included_from_linemap.
4442 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
4444         * config/aarch64/aarch64-cores.def: Add phecda core.
4445         * config/aarch64/aarch64-tune.md: Regenerate.
4446         * doc/invoke.texi: Add phecda core.
4448 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
4450         PR target/85295
4451         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
4452         definitions.
4453         * config/s390/s390.md ("movti"): Add more alternatives for
4454         constant to GPR copies.
4456 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
4458         * config/s390/s390.c: Fix whitespace damage throughout the file.
4459         * config/s390/s390.h: Likewise.
4460         * config/s390/tpf.h: Likewise.
4462 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
4464         * config/s390/s390.c (s390_loadrelative_operand_p):
4465         Remove TARGET_CPU_ZARCH usages.
4466         (s390_rtx_costs): Likewise.
4467         (s390_legitimate_constant_p): Likewise.
4468         (s390_cannot_force_const_mem): Likewise.
4469         (legitimate_reload_constant_p): Likewise.
4470         (s390_preferred_reload_class): Likewise.
4471         (legitimize_pic_address): Likewise.
4472         (legitimize_tls_address): Likewise.
4473         (s390_split_branches): Removed.
4474         (s390_add_execute): Removed.
4475         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
4476         (s390_mainpool_start): Likewise.
4477         (s390_mainpool_finish): Likewise.
4478         (s390_mainpool_cancel): Removed.
4479         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
4480         (s390_chunkify_cancel): Likewise.
4481         (s390_return_addr_rtx): Likewise.
4482         (s390_register_info): Remove split_branches_pending_p uages.
4483         (s390_optimize_register_info): Likewise.
4484         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
4485         split_branches_pending_p usages.
4486         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
4487         (s390_load_got): Likewise.
4488         (s390_expand_split_stack_prologue): Likewise.
4489         (output_asm_nops): Likewise.
4490         (s390_function_profiler): Likewise.
4491         (s390_emit_call): Likewise.
4492         (s390_conditional_register_usage): Likewise.
4493         (s390_optimize_prologue): Likewise.
4494         (s390_reorg): Remove TARGET_CPU_ZARCH and
4495         split_branches_pending_p usages.
4496         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
4497         usages.
4498         (s390_output_indirect_thunk_function): Likewise.
4499         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
4500         (TARGET_CPU_ZARCH_P): Removed.
4501         (struct machine_function): Remove split_branches_pending_p.
4502         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
4504 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
4506         * common/config/s390/s390-common.c (processor_flags_table):
4507         Remove flags.
4508         * config.gcc: Remove with_arch/with_tune support.
4509         * config/s390/2064.md: Remove cpu attribute comparisons.
4510         * config/s390/driver-native.c (s390_host_detect_local_cpu):
4511         Remove MTN.
4512         * config/s390/linux.h (ASM_SPEC):
4513         Remove -march support.
4514         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
4515         Use a table to get an arch level.
4516         * config/s390/s390-opts.h (enum processor_type):
4517         Remove enum values.
4518         * config/s390/s390.c
4519         (processor_table): Remove entries, add arch_level values.
4520         (s390_issue_rate): Remove cases.
4521         (s390_option_override): Adjust
4522         s390_option_override_internal() call.
4523         (s390_option_override_internal): Remove deprecation warning.
4524         (s390_valid_target_attribute_tree): Adjust
4525         s390_option_override_internal() call.
4526         * config/s390/s390.h (struct s390_processor):
4527         Share with s390-c.c, add arch_level field.
4528         * config/s390/s390.md:
4529         Remove occurrences in cpu attribute.
4530         * config/s390/s390.opt: Remove -march/-mtune support.
4531         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
4532         * doc/invoke.texi: Remove deprecation warning.
4534 2018-08-08  Luis Machado  <luis.machado@linaro.org>
4536         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
4537         global.
4538         (qdf24xx_tunings): Set vector cost structure to
4539         qdf24xx_vector_cost.
4541         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
4542         <register_sextend>: Set to 3.
4544 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
4546         PR target/86838
4547         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
4548         * config/aarch64/aarch64-simd.md
4549         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
4550         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
4551         (aarch64_frecpx<mode>): ...this new pattern.
4552         * config/aarch64/aarch64-simd-builtins.def: Remove comment
4553         about aarch64_frecp<FRECP:frecp_suffix><mode>.
4555 2018-08-07  Martin Liska  <mliska@suse.cz>
4557         PR middle-end/83023
4558         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
4559         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
4560         * predict.def (PRED_MALLOC_NONNULL): New predictor.
4561         * doc/extend.texi: Document that malloc attribute adds
4562         hit to compiler.
4564 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
4566         PR target/86785
4567         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4568         Define to speculation_safe_value_not_needed.
4570 2018-08-06  Jeff Law  <law@redhat.com>
4572         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
4573         the vr_values instance to cprop_into_stmt.
4574         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
4575         (cprop_operand): Also query EVRP to determine if OP is a constant.
4577 2018-08-06  Nathan Sidwell  <nathan@acm.org>
4579         * diagnostic.c (diagnostic_report_current_module): Reroll
4580         included-at loop.  Translate text.
4582 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
4584         * function-tests.c (selftest::test_expansion_to_rtl): Call
4585         free_after_compilation.
4587 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4589         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
4591 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
4593         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
4594         loops with memory block operations from getting unrolled.
4596 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
4598         PR target/86807
4599         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4600         Define to speculation_safe_value_not_needed.
4602 2018-08-06  Jeff Law  <law@redhat.com>
4604         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
4605         assert.
4607 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4609         PR target/86662
4610         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
4611         with all enabled __intN types.
4613         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
4615 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4617         * alias.c (record_set): Check for clobber high.
4618         * cfgexpand.c (expand_gimple_stmt): Likewise.
4619         * combine-stack-adj.c (single_set_for_csa): Likewise.
4620         * combine.c (find_single_use_1): Likewise.
4621         (set_nonzero_bits_and_sign_copies): Likewise.
4622         (get_combine_src_dest): Likewise.
4623         (is_parallel_of_n_reg_sets): Likewise.
4624         (try_combine): Likewise.
4625         (record_dead_and_set_regs_1): Likewise.
4626         (reg_dead_at_p_1): Likewise.
4627         (reg_dead_at_p): Likewise.
4628         * dce.c (deletable_insn_p): Likewise.
4629         (mark_nonreg_stores_1): Likewise.
4630         (mark_nonreg_stores_2): Likewise.
4631         * df-scan.c (df_find_hard_reg_defs): Likewise.
4632         (df_uses_record): Likewise.
4633         (df_get_call_refs): Likewise.
4634         * dwarf2out.c (mem_loc_descriptor): Likewise.
4635         * haifa-sched.c (haifa_classify_rtx): Likewise.
4636         * ira-build.c (create_insn_allocnos): Likewise.
4637         * ira-costs.c (scan_one_insn): Likewise.
4638         * ira.c (equiv_init_movable_p): Likewise.
4639         (rtx_moveable_p): Likewise.
4640         (interesting_dest_for_shprep): Likewise.
4641         * jump.c (mark_jump_label_1): Likewise.
4642         * postreload-gcse.c (record_opr_changes): Likewise.
4643         * postreload.c (reload_cse_simplify): Likewise.
4644         (struct reg_use): Add source expr.
4645         (reload_combine): Check for clobber high.
4646         (reload_combine_note_use): Likewise.
4647         (reload_cse_move2add): Likewise.
4648         (move2add_note_store): Likewise.
4649         * print-rtl.c (print_pattern): Likewise.
4650         * recog.c (decode_asm_operands): Likewise.
4651         (store_data_bypass_p): Likewise.
4652         (if_test_bypass_p): Likewise.
4653         * regcprop.c (kill_clobbered_value): Likewise.
4654         (kill_set_value): Likewise.
4655         * reginfo.c (reg_scan_mark_refs): Likewise.
4656         * reload1.c (maybe_fix_stack_asms): Likewise.
4657         (eliminate_regs_1): Likewise.
4658         (elimination_effects): Likewise.
4659         (mark_not_eliminable): Likewise.
4660         (scan_paradoxical_subregs): Likewise.
4661         (forget_old_reloads_1): Likewise.
4662         * reorg.c (find_end_label): Likewise.
4663         (try_merge_delay_insns): Likewise.
4664         (redundant_insn): Likewise.
4665         (own_thread_p): Likewise.
4666         (fill_simple_delay_slots): Likewise.
4667         (fill_slots_from_thread): Likewise.
4668         (dbr_schedule): Likewise.
4669         * resource.c (update_live_status): Likewise.
4670         (mark_referenced_resources): Likewise.
4671         (mark_set_resources): Likewise.
4672         * rtl.c (copy_rtx): Likewise.
4673         * rtlanal.c (reg_referenced_p): Likewise.
4674         (single_set_2): Likewise.
4675         (noop_move_p): Likewise.
4676         (note_stores): Likewise.
4677         * sched-deps.c (sched_analyze_reg): Likewise.
4678         (sched_analyze_insn): Likewise.
4680 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4682         * cse.c (invalidate_reg): New function extracted from...
4683         (invalidate): ...here.
4684         (canonicalize_insn): Check for clobber high.
4685         (invalidate_from_clobbers): invalidate clobber highs.
4686         (invalidate_from_sets_and_clobbers): Likewise.
4687         (count_reg_usage): Check for clobber high.
4688         (insn_live_p): Likewise.
4689         * cselib.c (cselib_expand_value_rtx_1):Likewise.
4690         (cselib_invalidate_regno): Check for clobber in setter.
4691         (cselib_invalidate_rtx): Pass through setter.
4692         (cselib_invalidate_rtx_note_stores):
4693         (cselib_process_insn): Check for clobber high.
4694         * cselib.h (cselib_invalidate_rtx): Add operand.
4696 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4698         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
4699         (mark_not_eliminable): Likewise.
4700         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
4701         * lra-lives.c (process_bb_lives): Check for clobber high.
4702         * lra.c (new_insn_reg): Remember clobber highs.
4703         (collect_non_operand_hard_regs): Check for clobber high.
4704         (lra_set_insn_recog_data): Likewise.
4705         (add_regs_to_insn_regno_info): Likewise.
4706         (lra_update_insn_regno_info): Likewise.
4708 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4710         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
4711         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
4713 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4715         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
4716         (copy_insn_1): Likewise.
4717         (gen_hard_reg_clobber_high): New gen function.
4718         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
4719         * genemit.c (gen_exp): Likewise.
4720         (gen_emit_seq): Pass through info.
4721         (gen_insn): Check for CLOBBER_HIGH.
4722         (gen_expand): Pass through info.
4723         (gen_split): Likewise.
4724         (output_add_clobbers): Likewise.
4725         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
4726         (remove_clobbers): Likewise.
4727         * rtl.h (gen_hard_reg_clobber_high): New declaration.
4729 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
4731         * doc/rtl.texi (clobber_high): Add.
4732         (parallel): Add in clobber high
4733         * rtl.c (rtl_check_failed_code3): Add function.
4734         * rtl.def (CLOBBER_HIGH): Add expression.
4735         * rtl.h (RTL_CHECKC3): Add macro.
4736         (rtl_check_failed_code3): Add declaration.
4737         (XC3EXP): Add macro.
4739 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
4741         PR target/86386
4742         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
4743         cfun->machine->max_used_stack_alignment if needed.
4745 2018-08-04  Martin Sebor  <msebor@redhat.com>
4747         PR tree-optimization/86571
4748         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
4749         NaN output to 4.
4751 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
4753         PR target/86799
4754         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4755         Define.
4757 2018-08-03  Jeff Law  <law@redhat.com>
4759         PR target/86795
4760         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4761         Define to speculation_safe_value_not_needed.
4763 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
4765         * doc/gcov.texi (-x): Remove duplicate "to".
4766         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
4767         (-Wif-not-aligned): Remove duplicate "is".
4768         (-flto): Remove duplicate "the".
4769         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
4770         duplicate "v5.00.b".
4771         (MSP430 Options): Remove duplicate "and" from the description
4772         of "-mgprel-sec=regexp".
4773         (x86 Options): Remove duplicate copies of "vmldLog102" and
4774         vmlsLog104 from description of "-mveclibabi=type".
4776 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
4778         * internal-fn.h (first_commutative_argument): Declare.
4779         * internal-fn.c (first_commutative_argument): New function.
4780         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
4781         restrictions for pattern statements.  Use first_commutative_argument
4782         to look for commutative operands in calls to internal functions.
4784 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
4786         * Makefile.in (wide-int-range.o): New.
4787         * tree-vrp.c: Move all the wide_int_* functions to...
4788         * wide-int-range.cc: ...here.
4789         * tree-vrp.h: Move all the wide_int_* prototypes to...
4790         * wide-int-range.h: ...here.
4792 2018-08-03  Tom de Vries  <tdevries@suse.de>
4794         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
4795         UI_NONE.
4796         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
4797         * except.c (output_function_exception_table): Do early exit if
4798         targetm_common.except_unwind_info (&global_options) == UI_NONE.
4800 2018-08-03  Martin Liska  <mliska@suse.cz>
4802         * predict.c (dump_prediction): Change to 2 digits
4803         in fraction part.
4805 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4807         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
4808         neon_dup_q to...
4809         (falkor_am_1_gtov_gtov): ... a new insn reservation.
4811 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
4813         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
4814         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
4815         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
4816         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
4817         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
4819 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
4821         * diagnostic-show-locus.c (diagnostic_show_locus): Use
4822         pp_take_prefix when saving the existing prefix.
4823         * diagnostic.c (diagnostic_append_note): Likewise.
4824         * langhooks.c (lhd_print_error_function): Likewise.
4825         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
4826         param's type.  Free the existing prefix.
4827         (pp_take_prefix): New function.
4828         (pretty_printer::pretty_printer): Drop the prefix parameter.
4829         Rename the length parameter to match the comment.
4830         (pretty_printer::~pretty_printer): Free the prefix.
4831         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
4832         parameter.
4833         (struct pretty_printer): Drop the "const" from "prefix" field's
4834         type and clarify memory management.
4835         (pp_set_prefix): Drop the "const" from the 2nd param.
4836         (pp_take_prefix): New decl.
4838 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4840         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
4841         for word_mode_ok here instead of passing as argument.
4842         (expand_block_compare): Change select_block_compare_mode() call.
4843         (expand_strncmp_gpr_sequence): New function.
4844         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
4846 2018-08-02  Jeff Law  <law@redhat.com>
4848         PR target/86790
4849         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4850         Define to speculation_safe_value_not_needed.
4852         PR target/86784
4853         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4854         Define to speculation_safe_value_not_needed.
4856 2018-08-02  Tom de Vries  <tdevries@suse.de>
4858         PR target/86660
4859         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
4860         function.  Return UI_TARGET unconditionally.
4861         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
4862         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
4864 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
4866         * genemit.c (print_overload_test): Fix typo.
4868 2018-08-02  Richard Biener  <rguenther@suse.de>
4870         PR tree-optimization/86816
4871         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
4872         which checks for value availability before querying it.
4873         (gvn_uses_equal): Use it.
4874         (same_succ_hash): Likewise.
4875         (gimple_equal_p): Likewise.
4877 2018-08-02  Nick Clifton  <nickc@redhat.com>
4879         PR target/86813
4880         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4881         Define to speculation_safe_value_not_needed.
4883         PR target/86810
4884         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4885         Define to speculation_safe_value_not_needed.
4887         PR target/86810
4888         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4889         Define to speculation_safe_value_not_needed.
4891         PR target/86803
4892         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4893         Define to speculation_safe_value_not_needed.
4895         PR target/86797
4896         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4897         Define to speculation_safe_value_not_needed.
4899         PR target/86791
4900         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4901         Define to speculation_safe_value_not_needed.
4903         PR target/86789
4904         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4905         Define to speculation_safe_value_not_needed.
4907         PR target/86787
4908         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4909         Define to speculation_safe_value_not_needed.
4911         PR target/86782
4912         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
4913         speculation_safe_value_not_needed.
4915         PR target/86781
4916         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
4917         to speculation_safe_value_not_needed.
4919 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
4921         * doc/md.texi: Expand the documentation of instruction names
4922         to mention port-local uses.  Document '@' in pattern names.
4923         * read-md.h (overloaded_instance, overloaded_name): New structs.
4924         (mapping): Declare.
4925         (md_reader::handle_overloaded_name): New member function.
4926         (md_reader::get_overloads): Likewise.
4927         (md_reader::m_first_overload): New member variable.
4928         (md_reader::m_next_overload_ptr): Likewise.
4929         (md_reader::m_overloads_htab): Likewise.
4930         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
4931         m_next_overload_ptr and m_overloads_htab.
4932         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
4933         (get_mode_token, get_code_token, get_int_token): New functions.
4934         (map_attr_string): Add an optional argument that passes back
4935         the associated iterator.
4936         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
4937         (md_reader::handle_overloaded_name, add_overload_instance): New
4938         functions.
4939         (apply_iterators): Handle '@' names.  Report an error if '@'
4940         is used without iterators.
4941         (initialize_iterators): Initialize the new iterator_group fields.
4942         * genopinit.c (handle_overloaded_code_for)
4943         (handle_overloaded_gen): New functions.
4944         (main): Use them to print declarations of maybe_code_for_* and
4945         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
4946         * genemit.c (print_overload_arguments, print_overload_test)
4947         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
4948         (main): Use it to print definitions of maybe_code_for_* and
4949         maybe_gen_* functions.
4950         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
4951         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
4952         instead of explicit mode checks.
4953         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
4954         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
4955         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
4956         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
4957         (aarch64_expand_compare_and_swap): Likewise
4958         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
4959         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
4960         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
4961         (aarch64_constant_pool_reload_icode): Delete.
4962         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
4963         instead of aarch64_constant_pool_reload_icode.  Use
4964         code_for_aarch64_reload_mov instead of explicit mode checks.
4965         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
4966         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
4967         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
4968         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
4969         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
4970         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
4971         (aarch64_atomic_load_op_code): Delete.
4972         (aarch64_emit_atomic_load_op): Likewise.
4973         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
4974         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
4975         instead of aarch64_emit_atomic_load_op.
4976         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
4977         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
4978         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
4979         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
4980         character before the pattern name.
4981         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
4982         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
4983         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
4984         (aarch64_frecps<mode>): Likewise.
4985         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
4986         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
4987         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
4988         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
4989         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
4991 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
4993         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
4994         Allow HFmode constants if TARGET_FP_F16INST.
4996 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
4998         PR target/86014
4999         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5000         No longer check last store for clobber of address register.
5002 2018-08-02  Martin Liska  <mliska@suse.cz>
5004         PR gcov-profile/86817
5005         * gcov.c (process_all_functions): New function.
5006         (main): Call it.
5007         (process_file): Move functions processing to
5008         process_all_functions.
5010 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
5012         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5013         "const" to the "gimple *" and "rtx_insn *" parameters.
5014         * dumpfile.h (dump_user_location_t::dump_user_location_t):
5015         Likewise.
5016         (dump_location_t::dump_location_t): Likewise.
5018 2018-08-01  Martin Sebor  <msebor@redhat.com>
5020         PR tree-optimization/86650
5021         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5022         rather than a "gcall *".  Directly pass the data of interest
5023         to percent_K_format, rather than building a temporary CALL_EXPR
5024         to hold it.
5025         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5026         (gimple_fold_builtin_strncat): Adjust.
5027         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5028         gcall* argument with gimple*.
5029         * gimple-ssa-warn-restrict.c (check_call): Same.
5030         (wrestrict_dom_walker::before_dom_children): Same.
5031         (builtin_access::builtin_access): Same.
5032         (check_bounds_or_overlap): Same
5033         (maybe_diag_overlap): Same.
5034         (maybe_diag_offset_bounds): Same.
5035         * tree-diagnostic.c (default_tree_printer): Move usage of
5036         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5037         to this callsite.
5038         * tree-pretty-print.c (percent_K_format): Add argument.
5039         * tree-pretty-print.h: Add argument.
5040         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5041         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5042         (maybe_diag_stxncpy_trunc): Same.
5043         (handle_builtin_stxncpy): Same.
5044         (handle_builtin_strcat): Same.
5046 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5048         * match.pd: Optimise pointer range checks.
5050 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5052         PR tree-optimization/86758
5053         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5054         to remove pattern statements.
5056 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5058         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5059         result of dfs_enumerate_from when constructing stmt_vec_infos,
5060         instead of additionally calling get_loop_body.
5062 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5064         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5065         parameter.
5066         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5067         When creating an iv, assert that the step is not known to be zero.
5068         (vect_setup_realignment): Update call accordingly.
5069         * tree-vect-stmts.c (vectorizable_store): Likewise.
5070         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
5072 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5074         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5075         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5076         (vectorizable_reduction): Likewise.
5077         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5078         (vect_detect_hybrid_slp_stmts): Likewise.
5079         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5081 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
5083         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5084         (wide_int_set_zero_nonzero_bits): ...this.
5085         (zero_nonzero_bits_from_vr): Rename to...
5086         (vrp_set_zero_nonzero_bits): ...this.
5087         (extract_range_from_multiplicative_op_1): Abstract wide int
5088         code...
5089         (wide_int_range_multiplicative_op): ...here.
5090         (extract_range_from_binary_expr_1): Extract wide int binary
5091         operations into their own functions.
5092         (wide_int_range_lshift): New.
5093         (wide_int_range_can_optimize_bit_op): New.
5094         (wide_int_range_shift_undefined_p): New.
5095         (wide_int_range_bit_xor): New.
5096         (wide_int_range_bit_ior): New.
5097         (wide_int_range_bit_and): New.
5098         (wide_int_range_trunc_mod): New.
5099         (extract_range_into_wide_ints): New.
5100         (vrp_shift_undefined_p): New.
5101         (extract_range_from_multiplicative_op): New.
5102         (vrp_can_optimize_bit_op): New.
5103         * tree-vrp.h (value_range::dump): New.
5104         (wide_int_range_multiplicative_op): New.
5105         (wide_int_range_lshift):New.
5106         (wide_int_range_shift_undefined_p): New.
5107         (wide_int_range_bit_xor): New.
5108         (wide_int_range_bit_ior): New.
5109         (wide_int_range_bit_and): New.
5110         (wide_int_range_trunc_mod): New.
5111         (zero_nonzero_bits_from_bounds): Rename to...
5112         (wide_int_set_zero_nonzero_bits): ...this.
5113         (zero_nonzero_bits_from_vr): Rename to...
5114         (vrp_set_zero_nonzero_bits): ...this.
5115         (range_easy_mask_min_max): Rename to...
5116         (wide_int_range_can_optimize_bit_op): this.
5117         * vr-values.c (simplify_bit_ops_using_ranges): Rename
5118         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5120 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5122         * tree-vectorizer.h (vect_orig_stmt): New function.
5123         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5124         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5125         (vect_create_epilog_for_reduction): Likewise.
5126         (vectorizable_live_operation): Likewise.
5127         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5128         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5129         * tree-vect-stmts.c (vectorizable_call): Likewise.
5130         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5132 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5134         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5135         argument.
5136         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5137         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5138         (vect_transform_loop): Likewise.
5139         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5141 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5143         * tree-vectorizer.h (vect_schedule_slp): Return void.
5144         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5145         (vect_schedule_slp): Likewise.
5147 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5149         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5150         argument.
5151         (vect_transform_loop): Update calls accordingly.  Schedule SLP
5152         instances before the main loop, if any exist.
5154 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
5156         PR tree-optimization/86749
5157         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
5158         If the lhs is used in a COND_EXPR, check that it is being used
5159         as the "then" or "else" value.
5161 2018-08-01  Tom de Vries  <tdevries@suse.de>
5163         PR target/86800
5164         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5165         speculation_safe_value_not_needed.
5167 2018-08-01  Richard Biener  <rguenther@suse.de>
5169         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
5170         as base and offset.
5172 2018-08-01  Martin Liska  <mliska@suse.cz>
5174         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
5175         format how successful transformation is dumped.
5176         (gimple_mod_pow2_value_transform): Likewise.
5177         (gimple_mod_subtract_transform): Likewise.
5178         (gimple_stringops_transform): Likewise.
5180 2018-08-01  Martin Liska  <mliska@suse.cz>
5182         PR value-prof/35543
5183         * value-prof.c (interesting_stringop_to_profile_p):
5184         Simplify the code and add BUILT_IN_MEMMOVE.
5185         (gimple_stringops_transform): Likewise.
5187 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
5189         * config/aarch64/aarch64-simd.md
5190         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
5191         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
5192         use GPI iterator instead of SI mode.
5194 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
5196         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
5197         rs6000_speculation_barrier.
5198         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
5199         new barrier pattern name.
5201 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
5203         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
5204         (speculation_barrier): New insn.
5206 2018-08-01  Richard Biener  <rguenther@suse.de>
5208         PR bootstrap/86724
5209         * graphite.h: Include isl/id.h and isl/space.h to allow build
5210         with ISL 0.20.
5212 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
5214         PR target/86651
5215         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5216         mode for COFF targets.
5217         * defaults.h (TARGET_COFF): Define.
5218         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
5219         TARGET_COFF): Define.
5220         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
5221         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
5222         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
5224 2018-07-31  Alexandre Oliva <oliva@adacore.com>
5226         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
5227         * gimple-streamer-out.c (output_bb): Save it.
5228         * lto-streamer-in.c (input_struct_function_base): Restore
5229         instance discriminator if available.  Create map on demand.
5230         * lto-streamer-out.c (output_struct_function_base): Save it if
5231         available.
5232         * final.c (decl_to_instance_map): Document LTO strategy.
5234 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
5235             Olivier Hainque  <hainque@adacore.com>
5237         * debug.h (decl_to_instance_map_t): New type.
5238         (decl_to_instance_map): Declare.
5239         (maybe_create_decl_to_instance_map): New inline function.
5240         * final.c (bb_discriminator, last_bb_discriminator): New statics,
5241         to track basic block discriminators.
5242         (final_start_function_1): Initialize them.
5243         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
5244         bb_discriminator.
5245         (decl_to_instance_map): New variable.
5246         (map_decl_to_instance, maybe_set_discriminator): New functions.
5247         (notice_source_line): Set discriminator.
5249 2018-07-31  Ian Lance Taylor  <iant@golang.org>
5251         * targhooks.c (default_have_speculation_safe_value): Add
5252         ATTRIBUTE_UNUSED.
5254 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
5256         * dump-context.h: Include "pretty-print.h".
5257         (dump_context::refresh_dumps_are_enabled): New decl.
5258         (dump_context::emit_item): New decl.
5259         (class dump_context): Add fields "m_test_pp" and
5260         "m_test_pp_flags".
5261         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5262         (temp_dump_context::get_dumped_text): New decl.
5263         (class temp_dump_context): Add field "m_pp".
5264         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
5265         (dump_context::refresh_dumps_are_enabled): ...and add a test for
5266         m_test_pp.
5267         (set_dump_file): Update for above change.
5268         (set_alt_dump_file): Likewise.
5269         (dump_loc): New overload, taking a pretty_printer *.
5270         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
5271         to any test pretty-printer.
5272         (make_item_for_dump_gimple_stmt): New function, adapted from
5273         optinfo::add_gimple_stmt.
5274         (dump_context::dump_gimple_stmt): Call it, and use the result,
5275         eliminating the direct usage of dump_file and alt_dump_file in
5276         favor of indirectly using them via emit_item.
5277         (make_item_for_dump_gimple_expr): New function, adapted from
5278         optinfo::add_gimple_expr.
5279         (dump_context::dump_gimple_expr): Call it, and use the result,
5280         eliminating the direct usage of dump_file and alt_dump_file in
5281         favor of indirectly using them via emit_item.
5282         (make_item_for_dump_generic_expr): New function, adapted from
5283         optinfo::add_tree.
5284         (dump_context::dump_generic_expr): Call it, and use the result,
5285         eliminating the direct usage of dump_file and alt_dump_file in
5286         favor of indirectly using them via emit_item.
5287         (make_item_for_dump_printf_va): New function, adapted from
5288         optinfo::add_printf_va.
5289         (make_item_for_dump_printf): New function.
5290         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
5291         and use the result, eliminating the direct usage of dump_file and
5292         alt_dump_file in favor of indirectly using them via emit_item.
5293         (make_item_for_dump_dec): New function.
5294         (dump_context::dump_dec): Call it, and use the result,
5295         eliminating the direct usage of dump_file and alt_dump_file in
5296         favor of indirectly using them via emit_item.
5297         (make_item_for_dump_symtab_node): New function, adapted from
5298         optinfo::add_symtab_node.
5299         (dump_context::dump_symtab_node): Call it, and use the result,
5300         eliminating the direct usage of dump_file and alt_dump_file in
5301         favor of indirectly using them via emit_item.
5302         (dump_context::begin_scope): Reimplement, avoiding direct usage
5303         of dump_file and alt_dump_file in favor of indirectly using them
5304         via emit_item.
5305         (dump_context::emit_item): New member function.
5306         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5307         Set up test pretty-printer on the underlying context.  Call
5308         refresh_dumps_are_enabled.
5309         (temp_dump_context::~temp_dump_context): Call
5310         refresh_dumps_are_enabled.
5311         (temp_dump_context::get_dumped_text): New member function.
5312         (selftest::verify_dumped_text): New function.
5313         (ASSERT_DUMPED_TEXT_EQ): New macro.
5314         (selftest::test_capture_of_dump_calls): Run all tests twice, with
5315         and then without optinfo enabled.  Add uses of
5316         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
5317         * dumpfile.h: Update comment for the dump_* API.
5318         * optinfo-emit-json.cc
5319         (selftest::test_building_json_from_dump_calls): Update for new
5320         param for temp_dump_context ctor.
5321         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
5322         and "m_owned" field.
5323         (optinfo_item::~optinfo_item): Likewise.
5324         (optinfo::add_item): New member function.
5325         (optinfo::emit): Update comment.
5326         (optinfo::add_string): Delete.
5327         (optinfo::add_printf): Delete.
5328         (optinfo::add_printf_va): Delete.
5329         (optinfo::add_gimple_stmt): Delete.
5330         (optinfo::add_gimple_expr): Delete.
5331         (optinfo::add_tree): Delete.
5332         (optinfo::add_symtab_node): Delete.
5333         (optinfo::add_dec): Delete.
5334         * optinfo.h (class dump_context): New forward decl.
5335         (optinfo::add_item): New decl.
5336         (optinfo::add_string): Delete.
5337         (optinfo::add_printf): Delete.
5338         (optinfo::add_printf_va): Delete.
5339         (optinfo::add_gimple_stmt): Delete.
5340         (optinfo::add_gimple_expr): Delete.
5341         (optinfo::add_tree): Delete.
5342         (optinfo::add_symtab_node): Delete.
5343         (optinfo::add_dec): Delete.
5344         (optinfo::add_poly_int): Delete.
5345         (optinfo_item::optinfo_item): Remove "owned" param.
5346         (class optinfo_item): Remove field "m_owned".
5348 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5350         PR middle-end/86705
5351         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
5352         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
5353         requested variable alignment.
5354         (expand_one_ssa_partition): Likewise.
5355         (expand_one_var): Likewise.
5357 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5359         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5360         to speculation_safe_value_not_needed.
5362 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5364         * targhooks.h (speculation_safe_value_not_needed): New prototype.
5365         * targhooks.c (speculation_safe_value_not_needed): New function.
5366         * target.def (have_speculation_safe_value): Update documentation.
5367         * doc/tm.texi: Regenerated.
5369 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5371         * config/aarch64/iterators.md (ALLI_TI): New iterator.
5372         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
5373         expand.
5374         (despeculate_copy<ALLI:mode>_insn): New insn.
5375         (despeculate_copyti_insn): New insn.
5376         (despeculate_simple<ALLI:mode>): New insn
5377         (despeculate_simpleti): New insn.
5378         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
5379         function.
5380         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
5381         aarch64_speculation_safe_value.
5382         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
5384 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5386         * config/aarch64/aarch64-speculation.cc: New file.
5387         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
5388         before pass_reorder_blocks.
5389         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
5390         prototype.
5391         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
5392         X14 and X15 when tracking speculation.
5393         * config/aarch64/aarch64.md (register name constants): Add
5394         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
5395         (unspec): Add UNSPEC_SPECULATION_TRACKER.
5396         (speculation_barrier): New insn attribute.
5397         (cmp<mode>): Allow SP in comparisons.
5398         (speculation_tracker): New insn.
5399         (speculation_barrier): Add speculation_barrier attribute.
5400         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
5401         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
5402         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
5404 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5406         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
5407         aarch64_track_speculation is true.
5408         (tb<optab><mode>1): Likewise.
5409         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
5410         generate CB[N]Z when tracking speculation.
5411         (aarch64_split_compare_and_swap): Likewise.
5412         (aarch64_split_atomic_op): Likewise.
5414 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5416         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
5418 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5420         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
5421         (speculation_barrier): New insn.
5423 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5425         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
5426         * config/arm/arm.md (speculation_barrier): New expand.
5427         (speculation_barrier_insn): New pattern.
5429 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
5431         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
5432         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
5433         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
5434         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
5435         list.
5436         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
5437         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
5438         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
5439         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
5440         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
5441         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
5442         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
5443         * builtins.c (expand_speculation_safe_value): New function.
5444         (expand_builtin): Call it.
5445         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
5446         * doc/extend.texi: Document __builtin_speculation_safe_value.
5447         * doc/md.texi: Document "speculation_barrier" pattern.
5448         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
5449         TARGET_HAVE_SPECULATION_SAFE_VALUE.
5450         * doc/tm.texi: Regenerated.
5451         * target.def (have_speculation_safe_value, speculation_safe_value): New
5452         hooks.
5453         * targhooks.c (default_have_speculation_safe_value): New function.
5454         (default_speculation_safe_value): New function.
5455         * targhooks.h (default_have_speculation_safe_value): Add prototype.
5456         (default_speculation_safe_value): Add prototype.
5458 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
5460         * dump-context.h (dump_context::dump_loc): New decl.
5461         * dumpfile.c (dump_context::dump_loc): New member function.
5462         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
5463         and dump_gimple_stmt.
5464         (dump_context::dump_gimple_expr_loc): Likewise, using
5465         dump_gimple_expr.
5466         (dump_context::dump_generic_expr_loc): Likewise, using
5467         dump_generic_expr.
5468         (dump_context::dump_printf_loc_va): Likewise, using
5469         dump_printf_va.
5470         (dump_context::begin_scope): Explicitly using the global function
5471         "dump_loc", rather than the member function.
5473 2018-07-31  Martin Sebor  <msebor@redhat.com>
5475         PR tree-optimization/86741
5476         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
5478 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
5480         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
5481         depend on whether prefetch instructions will be emitted or not.
5482         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
5483         will be emitted or not.
5484         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
5485         (TARGET_SETMEM_PFD): New macros.
5487 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5489         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
5490         (NULL_STMT_VEC_INFO): Delete.
5491         (stmt_vec_info::operator*): Likewise.
5492         (stmt_vec_info::operator gimple *): Likewise.
5493         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
5494         of NULL_STMT_VEC_INFO.
5495         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
5496         (vect_reassociating_reduction_p): Likewise.
5497         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
5498         (vectorizable_store): Likewise.
5499         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
5500         (vec_info::free_stmt_vec_infos): Likewise.
5502 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5504         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
5505         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
5507 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5509         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
5510         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
5511         (vec_info::free_stmt_vec_info): New private member functions.
5512         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
5513         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
5514         * tree-parloops.c (gather_scalar_reductions): Remove calls to
5515         set_stmt_vec_info_vec and free_stmt_vec_infos.
5516         * tree-vect-loop.c (_loop_vec_info): Remove call to
5517         set_stmt_vec_info_vec.
5518         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
5519         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
5520         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
5521         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
5522         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
5523         assignments in {vec_info::,}new_stmt_vec_info that are redundant
5524         with the clearing in the xcalloc.
5525         (stmt_vec_info_vec): Delete.
5526         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
5527         (vectorize_loops): Likewise.
5528         (vec_info::~vec_info): Remove argument from call to
5529         free_stmt_vec_infos.
5530         (vec_info::add_stmt): Remove vinfo argument from call to
5531         new_stmt_vec_info.
5533 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5535         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
5536         rather than a gimple stmt.
5537         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
5538         information for pattern statements when passed the original
5539         statement; instead wait to be passed the pattern statement itself.
5540         Don't call set_vinfo_for_stmt here.
5541         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
5542         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
5543         stmt_vec_infos here.
5544         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
5545         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
5546         stmt_vec_infos entry.
5548 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5550         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
5551         * tree-vectorizer.c (vec_info::replace_stmt): New function.
5552         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
5553         * tree-vect-stmts.c (vectorizable_call): Likewise.
5554         (vectorizable_simd_clone_call): Likewise.
5556 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5558         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
5559         * tree-vectorizer.c (vec_info::remove_stmt): New function.
5560         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
5561         * tree-vect-loop.c (vect_transform_loop): Likewise.
5562         * tree-vect-slp.c (vect_schedule_slp): Likewise.
5563         * tree-vect-stmts.c (vect_remove_stores): Likewise.
5565 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5567         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
5568         (vect_dr_stmt): Delete.
5569         * tree-vectorizer.c (vec_info::lookup_dr): New function.
5570         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
5571         of DR_VECT_AUX.
5572         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
5573         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
5574         (vect_verify_datarefs_alignment, vect_peeling_supportable)
5575         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
5576         (vect_analyze_data_refs): Likewise.
5577         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
5578         argument.
5579         (vect_find_same_alignment_drs): Likewise.
5580         (vect_slp_analyze_node_dependences): Update calls accordingly.
5581         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
5582         instead of DR_VECT_AUX.
5583         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
5584         of a vector data references.  Use vec_info::lookup_dr instead of
5585         DR_VECT_AUX.
5586         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
5587         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
5588         instead of DR_VECT_AUX.
5590 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5592         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
5593         dr_vec_info.
5594         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5595         accordingly.
5596         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5597         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5598         (vect_gen_prolog_loop_niters): Likewise.
5600 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5602         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
5603         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
5604         (vect_known_alignment_in_bytes, vect_dr_behavior)
5605         (vect_get_scalar_dr_size): Take references as dr_vec_infos
5606         instead of data_references.  Update calls to other routines for
5607         which the same change has been made.
5608         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
5609         dr_vec_infos instead of stmt_vec_infos.
5610         (vect_analyze_data_ref_dependence): Update call accordingly.
5611         (vect_slp_analyze_data_ref_dependence)
5612         (vect_record_base_alignments): Use DR_VECT_AUX.
5613         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
5614         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
5615         (vector_alignment_reachable_p, vect_get_data_access_cost)
5616         (vect_peeling_supportable, vect_analyze_group_access_1)
5617         (vect_analyze_group_access, vect_analyze_data_ref_access)
5618         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
5619         (vect_compile_time_alias, vect_small_gap_p)
5620         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
5621         (vect_supportable_dr_alignment): Take references as dr_vec_infos
5622         instead of data_references.  Update calls to other routines for
5623         which the same change has been made.
5624         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
5625         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5626         (vect_slp_analyze_and_verify_node_alignment)
5627         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
5628         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
5629         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
5630         above changes.
5631         (_vect_peel_info::dr): Replace with...
5632         (_vect_peel_info::dr_info): ...this new field.
5633         (vect_peeling_hash_get_most_frequent)
5634         (vect_peeling_hash_choose_best_peeling): Update accordingly.
5635         (vect_peeling_hash_get_lowest_cost):
5636         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
5637         routines for which the same change has been made.
5638         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
5639         data_reference.
5640         * tree-vect-loop-manip.c (get_misalign_in_elems)
5641         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
5642         above changes.
5643         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5644         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
5645         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
5646         (get_group_load_store_type, get_negative_load_store_type)
5647         (vect_get_data_ptr_increment, vectorizable_store)
5648         (vectorizable_load): Likewise.
5649         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
5650         Update calls to other routines for which the same change has been made.
5652 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5654         * tree-vectorizer.h (vec_info::move_dr): New member function.
5655         (dataref_aux): Rename to...
5656         (dr_vec_info): ...this and add "dr" and "stmt" fields.
5657         (_stmt_vec_info::dr_aux): Update accordingly.
5658         (_stmt_vec_info::data_ref_info): Delete.
5659         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
5660         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
5661         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
5662         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
5663         of data_ref.
5664         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
5665         (STMT_VINFO_DR_INFO): New macro.
5666         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
5667         (set_dr_misalignment): Update after rename of dataref_aux.
5668         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
5669         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
5670         initialization of STMT_VINFO_DATA_REF.
5671         * tree-vectorizer.c (vec_info::move_dr): New function.
5672         * tree-vect-patterns.c (vect_recog_bool_pattern)
5673         (vect_recog_mask_conversion_pattern)
5674         (vect_recog_gather_scatter_pattern): Use it.
5675         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
5676         the "dr" and "stmt" fields of dr_vec_info instead of
5677         STMT_VINFO_DATA_REF.
5679 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5681         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
5682         (is_pattern_stmt_p): Use it.
5683         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
5684         on pattern statements.
5686 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5688         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
5689         original stmt as a stmt_vec_info rather than a gimple stmt.
5690         (vect_pattern_recog_1): Take the statement directly as a
5691         stmt_vec_info, rather than via a gimple_stmt_iterator.
5692         Update call to vect_mark_pattern_stmts.
5693         (vect_pattern_recog): Update calls accordingly.
5695 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5697         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
5698         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
5699         a vect_def_type for the first argument.
5700         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
5701         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
5702         operand if it isn't defined by a vectorized statement.
5703         (vect_build_gather_load_calls): Remove the mask_dt argument and
5704         update calls to vect_get_vec_def_for_stmt_copy.
5705         (vectorizable_bswap): Likewise the dt argument.
5706         (vectorizable_call): Update calls to vectorizable_bswap and
5707         vect_get_vec_def_for_stmt_copy.
5708         (vectorizable_simd_clone_call, vectorizable_assignment)
5709         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
5710         (vectorizable_comparison): Update calls to
5711         vect_get_vec_def_for_stmt_copy.
5712         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
5713         vect_is_simple_use.
5714         (vect_get_loop_based_defs): Remove dt argument and update call
5715         to vect_get_vec_def_for_stmt_copy.
5716         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
5717         and vect_get_vec_def_for_stmt_copy.
5718         (vectorizable_load): Update calls to vect_build_gather_load_calls
5719         and vect_get_vec_def_for_stmt_copy.
5720         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5721         (vectorizable_reduction, vectorizable_live_operation): Update calls
5722         to vect_get_vec_def_for_stmt_copy.
5724 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5726         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
5727         and gimple stmt arguments with a stmt_vec_info.
5728         (vect_record_base_alignments): Update calls accordingly.
5729         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
5730         and gimple stmt arguments with a stmt_vec_info.
5731         (vect_build_slp_tree_1): Remove vinfo argument and update call
5732         to vect_record_max_nunits.
5733         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
5734         and vect_record_max_nunits.
5736 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5738         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
5739         file and take a stmt_vec_info instead of a gimple stmt.
5740         (supportable_widening_operation, vect_finish_replace_stmt)
5741         (vect_finish_stmt_generation, vect_get_store_rhs)
5742         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
5743         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
5744         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
5745         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
5746         (vect_create_data_ref_ptr, bump_vector_ptr)
5747         (vect_permute_store_chain, vect_setup_realignment)
5748         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
5749         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
5750         (vectorizable_reduction, vectorizable_induction)
5751         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
5752         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
5753         than gimple stmts as arguments.
5754         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
5755         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
5756         (can_group_stmts_p, vect_check_gather_scatter)
5757         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
5758         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
5759         (vect_permute_load_chain, vect_shift_permute_load_chain)
5760         (vect_transform_grouped_load)
5761         (vect_record_grouped_load_vectors): Likewise.
5762         * tree-vect-loop.c (vect_fixup_reduc_chain)
5763         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
5764         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
5765         (vectorizable_reduction, vectorizable_induction)
5766         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
5767         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
5768         (vect_get_load_store_mask): Likewise.
5769         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
5770         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
5771         * tree-vect-stmts.c (vect_mark_relevant)
5772         (is_simple_and_all_uses_invariant)
5773         (exist_non_indexing_operands_for_use_p, process_use)
5774         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
5775         (vect_get_vec_def_for_operand, vect_get_vec_defs)
5776         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
5777         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
5778         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
5779         (get_negative_load_store_type, get_load_store_type)
5780         (vect_check_load_store_mask, vect_check_store_rhs)
5781         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
5782         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5783         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5784         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5785         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
5786         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
5787         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
5788         (supportable_widening_operation): Likewise.
5790 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5792         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
5793         a stmt_vec_info instead of a gcall.
5794         (vect_check_gather_scatter): Update call accordingly.
5795         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
5796         of a gphi.
5797         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
5798         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
5799         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
5800         instead of a gimple stmt.
5801         (vect_transform_loop): Update calls accordingly.
5802         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
5803         stmt_vec_infos instead of gimple stmts.
5804         (vect_analyze_slp_instance): Update use accordingly.
5805         * tree-vect-stmts.c (read_vector_array, write_vector_array)
5806         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
5807         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
5808         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
5809         (vect_gen_widened_results_half, vect_get_loop_based_defs)
5810         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
5811         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
5812         down to subroutines.
5814 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5816         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
5817         of the worklist from a vector of gimple stmts to a vector of
5818         stmt_vec_infos.
5819         * tree-vect-stmts.c (vect_mark_relevant, process_use)
5820         (vect_mark_stmts_to_be_vectorized): Likewise
5822 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5824         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
5825         statement before passing it to vect_analyze_stmt.
5826         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
5827         the chain of phi vector definitions.  Track the exit phi via its
5828         stmt_vec_info.
5829         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
5830         STMT_VINFO_REDUC_DEF.
5831         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
5832         stmt_vec_infos to handle the statement chains.
5833         (vect_get_slp_defs): Record the first statement in the node
5834         using a stmt_vec_info.
5835         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
5836         statements here and pass their stmt_vec_info down to subroutines.
5837         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
5838         down to vect_finish_stmt_generation.
5839         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
5840         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
5841         stmt_vec_infos to subroutines.
5842         (vect_remove_stores): Use stmt_vec_infos to handle the statement
5843         chains.
5845 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5847         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
5848         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
5849         (vect_permute_store_chain, vect_setup_realignment)
5850         (vect_permute_load_chain, vect_shift_permute_load_chain)
5851         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
5852         stmts internally, and when passing values to other vectorizer routines.
5853         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5854         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
5855         (vect_analyze_loop_operations, get_initial_def_for_reduction)
5856         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
5857         (vectorizable_reduction, vectorizable_induction)
5858         (vectorizable_live_operation, vect_transform_loop_stmt)
5859         (vect_transform_loop): Likewise.
5860         * tree-vect-patterns.c (vect_reassociating_reduction_p)
5861         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
5862         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
5863         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5864         (vect_slp_analyze_node_operations_1): Likewise.
5865         * tree-vect-stmts.c (vect_mark_relevant, process_use)
5866         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
5867         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
5868         (vect_finish_stmt_generation_1, get_group_load_store_type)
5869         (get_load_store_type, vect_build_gather_load_calls)
5870         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
5871         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
5872         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
5873         (vectorizable_store, vectorizable_load, vectorizable_condition)
5874         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
5875         (supportable_widening_operation): Likewise.
5876         (vect_get_vector_types_for_stmt): Likewise.
5877         * tree-vectorizer.h (vect_dr_behavior): Likewise.
5879 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5881         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5882         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
5883         (vect_permute_store_chain, vect_permute_load_chain)
5884         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
5885         repeated stmt_vec_info lookups.
5886         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
5887         (vect_update_ivs_after_vectorizer): Likewise.
5888         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
5889         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
5890         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
5891         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5892         (vect_bb_slp_scalar_cost): Likewise.
5893         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
5895 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5897         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
5898         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
5899         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
5900         to get gassigns and gcalls, rather than operating on generc gimple
5901         stmts.
5902         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
5903         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
5904         (vectorizable_load, vect_analyze_stmt): Likewise.
5905         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
5907 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5909         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
5910         return stmt_vec_infos rather than gimple stmts.  Do not accept
5911         null arguments.
5912         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
5913         of a gimple stmt.
5914         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5915         Update use of get_later_stmt.
5916         (vect_get_constant_vectors): Update call accordingly.
5917         (vect_schedule_slp_instance): Likewise
5918         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
5919         (vect_slp_analyze_instance_dependence): Likewise.
5920         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
5922 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5924         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
5925         (stmt_info_for_cost::stmt_info): ...this new field.
5926         (add_stmt_costs): Update accordingly.
5927         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
5928         (vect_get_known_peeling_cost): Likewise.
5929         (vect_estimate_min_profitable_iters): Likewise.
5930         * tree-vect-stmts.c (record_stmt_cost): Likewise.
5932 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5934         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
5935         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5936         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
5937         accordingly.
5938         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
5940 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5942         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
5943         a gimple stmt to a stmt_vec_info.
5944         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5946 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5948         * tree-vectorizer.h (vec_info::grouped_stores): Change from
5949         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
5950         (_loop_vec_info::reduction_chains): Likewise.
5951         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
5952         accordingly.
5953         * tree-vect-slp.c (vect_analyze_slp): Likewise.
5955 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5957         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
5958         a gimple stmt to a stmt_vec_info.
5959         (_stmt_vec_info::next_element): Likewise.
5960         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
5961         (vect_slp_analyze_and_verify_node_alignment)
5962         (vect_analyze_group_access_1, vect_analyze_group_access)
5963         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
5964         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
5965         (vect_supportable_dr_alignment): Update accordingly.
5966         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
5967         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
5968         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
5969         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5970         * tree-vect-slp.c (vect_build_slp_tree_1)
5971         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
5972         (vect_split_slp_store_group, vect_analyze_slp_instance)
5973         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
5974         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
5975         (get_group_load_store_type, get_load_store_type)
5976         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
5977         (vect_transform_stmt, vect_remove_stores): Likewise.
5979 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
5981         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
5982         than a gimple stmt.
5983         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5984         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
5985         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
5986         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
5987         (vector_alignment_reachable_p, vect_get_data_access_cost)
5988         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
5989         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
5990         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
5991         (vect_analyze_group_access_1, vect_analyze_group_access)
5992         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
5993         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
5994         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
5995         result of vect_dr_stmt and use the stmt_vec_info instead of
5996         the associated gimple stmt.
5997         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5998         (vect_gen_prolog_loop_niters): Likewise.
5999         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6001 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6003         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6004         to a vec<stmt_vec_info>.
6005         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6006         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6007         vec<stmt_vec_info>.
6008         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6009         to a vec<stmt_vec_info>.
6010         (bst_traits::value_type, bst_traits::value_type): Likewise.
6011         (bst_traits::hash): Update accordingly.
6012         (vect_get_and_check_slp_defs): Change the stmts parameter from
6013         a vec<gimple *> to a vec<stmt_vec_info>.
6014         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6015         (vect_build_slp_tree): Likewise.
6016         (vect_build_slp_tree_2): Likewise.  Update uses of
6017         SLP_TREE_SCALAR_STMTS.
6018         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6019         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6020         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6021         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6022         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6023         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6024         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6025         (vect_get_constant_vectors, vect_get_slp_defs)
6026         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6027         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6028         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6029         instead of gimple stmts.
6030         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6031         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6032         (vect_slp_analyze_instance_dependence): Update uses of
6033         SLP_TREE_SCALAR_STMTS.
6034         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6035         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6036         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6037         (get_initial_defs_for_reduction): Likewise.
6038         (vect_create_epilog_for_reduction): Likewise.
6039         (vectorize_fold_left_reduction): Likewise.
6040         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6041         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6042         (can_vectorize_live_stmts): Likewise.
6044 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6046         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6047         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6048         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6049         than gimple stmts.
6050         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6051         of a gimple stmt.
6052         (gather_scalar_reductions): Update after above interface changes.
6053         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6054         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6055         than gimple stmts.
6056         (vect_force_simple_reduction): Likewise.
6057         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6058         LOOP_VINFO_REDUCTIONS.
6059         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6061 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6063         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6064         a gimple stmt to a stmt_vec_info.
6065         * tree-vect-loop.c (vect_active_double_reduction_p)
6066         (vect_force_simple_reduction, vectorizable_reduction): Update
6067         accordingly.
6069 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6071         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6072         vec<gimple *> to a vec<stmt_vec_info>.
6073         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6074         the reduction_phis argument from a vec<gimple *> to a
6075         vec<stmt_vec_info>.
6076         (vectorizable_reduction): Likewise the phis local variable that
6077         is passed to vect_create_epilog_for_reduction.  Update for new type
6078         of SLP_TREE_VEC_STMTS.
6079         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6080         (vectorizable_live_operation): Likewise.
6081         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6082         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6084 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6086         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6087         a gimple stmt to a stmt_vec_info.
6088         (vectorizable_condition, vectorizable_live_operation)
6089         (vectorizable_reduction, vectorizable_induction): Pass back the
6090         vectorized statement as a stmt_vec_info.
6091         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6092         use of STMT_VINFO_VEC_STMT.
6093         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6094         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6095         as stmt_vec_infos rather than gimple stmts.
6096         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6097         to a stmt_vec_info.
6098         (vectorizable_live_operation): Likewise.
6099         (vectorizable_reduction, vectorizable_induction): Likewise,
6100         updating use of STMT_VINFO_VEC_STMT.
6101         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6102         of STMT_VINFO_VEC_STMT.
6103         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6104         (vectorizable_simd_clone_call, vectorizable_conversion)
6105         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6106         (vectorizable_store, vectorizable_load, vectorizable_condition)
6107         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6108         from a gimple stmt to a stmt_vec_info.
6109         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
6110         pointer to a stmt_vec_info to the vectorizable_* routines.
6112 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6114         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6115         a gimple stmt to a stmt_vec_info.
6116         (is_pattern_stmt_p): Update accordingly.
6117         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6118         (vect_record_grouped_load_vectors): Likewise.
6119         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6120         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6121         (vect_model_reduction_cost): Likewise.
6122         (vect_create_epilog_for_reduction): Likewise.
6123         (vectorizable_reduction, vectorizable_induction): Likewise.
6124         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6125         Return the stmt_vec_info for the pattern statement.
6126         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6127         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6128         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6129         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6130         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6131         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6132         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6133         (free_stmt_vec_info, vect_is_simple_use): Likewise.
6135 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6137         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6138         (vect_finish_stmt_generation): Likewise.
6139         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6140         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6141         (vect_build_gather_load_calls): Use the return value of the above
6142         functions instead of a separate call to vinfo_for_stmt.  Use narrow
6143         scopes for the input gimple stmt and wider scopes for the associated
6144         stmt_vec_info.  Use vec_info::lookup_def when setting these
6145         stmt_vec_infos from an SSA_NAME definition.
6146         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6147         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6148         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6149         (vectorizable_store, vectorizable_load, vectorizable_condition)
6150         (vectorizable_comparison): Likewise.
6151         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
6152         (vectorizable_reduction): Likewise.
6154 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6156         * tree-vectorizer.h (vect_is_simple_use): Add an optional
6157         stmt_vec_info * parameter before the optional gimple **.
6158         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6159         (process_use, vect_get_vec_def_for_operand_1): Update callers.
6160         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
6161         * tree-vect-loop.c (vectorizable_reduction): Likewise.
6162         (vectorizable_live_operation): Likewise.
6163         * tree-vect-patterns.c (type_conversion_p): Likewise.
6164         (vect_look_through_possible_promotion): Likewise.
6165         (vect_recog_rotate_pattern): Likewise.
6166         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6168 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6170         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
6171         a typedef to a wrapper class.
6172         (NULL_STMT_VEC_INFO): New macro.
6173         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
6174         (stmt_vec_info::operator*): New function.
6175         (stmt_vec_info::operator gimple *): Likewise.
6176         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
6177         (add_stmt_costs): Likewise.
6178         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
6179         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6180         (vect_get_known_peeling_cost): Likewise.
6181         (vect_estimate_min_profitable_iters): Likewise.
6182         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6183         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
6184         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6185         (vectorizable_store, free_stmt_vec_infos): Likewise.
6186         (new_stmt_vec_info): Change return type of xcalloc to
6187         _stmt_vec_info *.
6189 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6191         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
6192         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
6193         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
6194         a single_imm_use-based sequence.
6195         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
6197 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6199         * tree-vectorizer.h (vec_info::lookup_def): Declare.
6200         * tree-vectorizer.c (vec_info::lookup_def): New function.
6201         * tree-vect-patterns.c (vect_get_internal_def): Use it.
6202         (vect_widened_op_tree): Likewise.
6203         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6204         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
6205         (vectorizable_reduction): Likewise.
6206         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
6207         of a gimple *.
6208         (vect_is_slp_reduction): Update calls accordingly.  Use
6209         vec_info::lookup_def.
6210         (vect_is_simple_reduction): Likewise
6211         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
6213 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6215         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
6216         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
6217         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
6218         of vinfo_for_stmt.
6219         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
6220         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
6221         (vect_update_vf_for_slp, vect_analyze_loop_operations)
6222         (vect_is_slp_reduction, vectorizable_induction)
6223         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
6224         * tree-vect-patterns.c (vect_init_pattern_stmt):
6225         (vect_determine_min_output_precision_1, vect_determine_precisions)
6226         (vect_pattern_recog): Likewise.
6227         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
6228         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
6229         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
6230         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6231         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
6232         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
6233         info field from a loop to a loop_vec_info.
6235 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6237         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
6238         (vec_info::add_stmt): Declare.
6239         * tree-vectorizer.c (vec_info::add_stmt): New function.
6240         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
6241         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
6242         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6243         (vectorizable_induction): Likewise.
6244         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
6245         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6246         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
6247         (vectorizable_load): Likewise.
6248         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6249         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
6250         (vect_recog_gather_scatter_pattern): Likewise.
6251         (append_pattern_def_seq): Likewise.  Remove a check that is
6252         performed by add_stmt itself.
6254 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6256         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
6257         which make_ssa_name was called with new_stmt before new_stmt
6258         had been created.
6260 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6262         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
6263         split out from...
6264         (vect_is_slp_reduction): ...here...
6265         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
6266         that are already known to be false.
6268 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6270         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
6271         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
6272         STMT_VINFO_NUM_SLP_USES when it's true.
6273         (vect_free_slp_instance): Add a final_p parameter and pass it to
6274         vect_free_slp_tree.
6275         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
6276         (vect_analyze_slp_instance): Likewise.
6277         (vect_slp_analyze_operations): Likewise.
6278         (vect_slp_analyze_bb_1): Likewise.
6279         * tree-vectorizer.c (vec_info): Likewise.
6280         * tree-vect-loop.c (vect_transform_loop): Likewise.
6282 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6284         * tree-vect-loop.c (vectorizable_reduction): Assert that the
6285         function is not called for second and subsequent members of
6286         a reduction group.
6288 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
6290         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
6291         cases for nested loops from here to ...
6292         (vect_create_epilog_for_reduction): ...here.  Only call
6293         vect_is_simple_use for inner-loop reductions.
6295 2018-07-31  Martin Liska  <mliska@suse.cz>
6297         PR gcov-profile/85338
6298         PR gcov-profile/85350
6299         PR gcov-profile/85372
6300         * profile.c (struct location_triplet): New.
6301         (struct location_triplet_hash): Likewise.
6302         (output_location): Do not output a BB that
6303         is already recorded for a line.
6304         (branch_prob): Use streamed_locations.
6306 2018-07-31  Martin Liska  <mliska@suse.cz>
6308         PR gcov-profile/85370
6309         * coverage.c (coverage_begin_function): Do not mark target
6310         clones as artificial functions.
6312 2018-07-31  Martin Liska  <mliska@suse.cz>
6314         PR gcov-profile/83813
6315         PR gcov-profile/84758
6316         PR gcov-profile/85217
6317         PR gcov-profile/85332
6318         * profile.c (branch_prob): Do not record GOTO expressions
6319         for GIMPLE statements which locations are already streamed.
6321 2018-07-31  Olivier Hainque  <hainque@adacore.com>
6323         * gcc.c (handle_spec_function): Accept a soft_matched_part
6324         argument, as do_spec_1.  Pass it down to ...
6325         (eval_spec_function): Accept a soft_matched_part argument,
6326         and pass it down to ...
6327         (do_spec_2): Accept a soft_matched_part argument, and pass
6328         it down to do_spec_1.
6329         (do_spec_1): Pass soft_matched_part to handle_spec_function.
6330         (handle_braces): Update call to handle_spec_function.
6331         (driver::set_up_specs): Update calls to do_spec_2.
6332         (compare_debug_dump_opt_spec_function): Likewise.
6333         (compare_debug_self_opt_spec_function): Likewise.
6335 2018-07-31  Olivier Hainque  <hainque@adacore.com>
6337         * common.opt (nolibc): New option.
6338         * doc/invoke.texi (Link Options): Document it.
6339         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
6340         * config/alpha/linux.h: Likewise.
6341         * config/arc/elf.h: Likewise.
6342         * config/arm/uclinux-elf.h: Likewise.
6343         * config/arm/unknown-elf.h: Likewise.
6344         * config/avr/avrlibc.h: Likewise.
6345         * config/bfin/bfin.h: Likewise.
6346         * config/bfin/linux.h: Likewise.
6347         * config/bfin/uclinux.h: Likewise.
6348         * config/darwin.h: Likewise.
6349         * config/darwin10.h: Likewise.
6350         * config/darwin12.h: Likewise.
6351         * config/gnu-user.h: Likewise.
6352         * config/lm32/uclinux-elf.h: Likewise.
6353         * config/pa/pa-hpux11.h: Likewise.
6354         * config/pa/pa64-hpux.h: Likewise.
6355         * config/sparc/sparc.h: Likewise.
6357 2018-07-31  Olivier Hainque  <hainque@adacore.com>
6359         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
6360         undefined variables.
6362 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
6364         PR target/86640
6365         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
6366         instead of GEN_INT.
6368 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6370         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6371         terminated string literal.
6373 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
6375         PR rtl-optimization/85160
6376         * combine.c (is_just_move): New function.
6377         (try_combine): Allow combining two instructions into two if neither of
6378         the original instructions was a move.
6380 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
6382         PR target/86673
6383         * doc/extend.texi (Global Register Variables): Discourage use of type
6384         qualifiers.
6385         (Local Register Variables): Likewise.
6387 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
6389         PR tree-optimization/86506
6390         * hwint.h (ceil_log2): Resync with hwint.c implementation.
6392 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
6394         PR target/86547
6395         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
6396         hard_regno, make sure no insn between `from` and `to` clobbers it.
6398 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
6399             Tom de Vries  <tdevries@suse.de>
6401         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
6402         (PTX_DEFAULT_RUNTIME_DIM): ... this.
6403         (nvptx_goacc_validate_dims): Set default worker and gang dims to
6404         PTX_DEFAULT_RUNTIME_DIM.
6405         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
6407 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
6409         * config/pa/pa.c (pa_output_addr_vec): Align address table.
6410         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
6411         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
6413 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
6415         * config/rs6000/constraints.md (wG constraint): Delete, no longer
6416         used.
6417         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
6418         predicate to reflect toc fusion has been deleted.
6419         (toc_fusion_mem_raw): Delete, no longer used.
6420         (toc_fusion_mem_wrapped): Likewise.
6421         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
6422         fusion mask bit.
6423         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
6424         Delete, no longer used.
6425         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
6426         meant to be used for toc fusion.
6427         (rs6000_debug_print_mode): Delete toc fusion debugging.
6428         (rs6000_debug_reg_global): Likewise.
6429         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
6430         fusion and secondary reload support that were never used.
6431         (rs6000_option_override_internal): Delete TOC fusion, that was only
6432         partially defined, and it did not work unless you also used the
6433         -mcmodel= switch.
6434         (rs6000_legitimate_address_p): Delete TOC fusion support.
6435         (rs6000_opt_masks): Likewise.
6436         (fusion_wrap_memory_address): Delete function, no longer used.
6437         (fusion_split_address); Delete TOC fusion support.
6438         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
6439         longer used with toc fusion being deleted.
6440         (TARGET_TOC_FUSION_FP): Likewise.
6441         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
6442         UNSPEC.
6443         (toc fusion spliter): Delete TOC fusion support.
6444         (toc_fusionload_<mode>): Likewise.
6445         (toc_fusionload_di): Likewise.
6446         (fusion_gpr_load_<mode>): Delete generator function, this insn no
6447         longer needs to be named.  Rename predicate to delete TOC fusion.
6448         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
6449         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
6450         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
6451         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
6452         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
6454 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6456         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
6457         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
6458         __int128 in built-in function prototypes.
6459         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
6460         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
6462 2018-07-27  Martin Sebor  <msebor@redhat.com>
6464         PR tree-optimization/86696
6465         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
6466         types, including enums.
6467         (handle_char_store): Be prepared for the above function to fail.
6469 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
6471         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
6472         when optimization level is lower than 2 or optimize for size.
6474 2018-07-26  Martin Sebor  <msebor@redhat.com>
6476         PR tree-optimization/86043
6477         PR tree-optimization/86042
6478         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
6479         (get_string_cst_length): Rename...
6480         (get_min_string_length): ...to this.  Add argument.
6481         (handle_char_store): Extend to handle multi-character stores by
6482         MEM_REF.
6483         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
6484         * tree.h (initializer_zerop): Add argument.
6486 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
6488         PR middle-end/86660
6489         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
6490         declare target to variables if they have always,{to,from,tofrom} map
6491         kinds.
6493 2018-07-26  Martin Liska  <mliska@suse.cz>
6495         PR lto/86548
6496         * lto-wrapper.c: Add linker_output as prefix
6497         for ltrans_output_file.
6499 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
6501         PR rtl-optimization/85805
6502         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
6503         value for hard registers if that was written in the same mode.
6505 2018-07-26  Martin Liska  <mliska@suse.cz>
6507         PR gcov-profile/86536
6508         * gcov.c (format_gcov): Use printf format %.*f directly
6509         and do not handle special values.
6511 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
6513         * common/config/arc/arc-common.c (arc_option_optimization_table):
6514         Update default optimizations for size.
6516 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
6518         * config/arc/arc.md (movsf_insn): Add short instruction selection.
6519         * config/arc/constraints.md (CfZ): New constraint.
6520         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
6521         (subsf3_fpu): Likewise.
6522         (cmpsf_fpu): Likewise.
6523         (cmpsf_fpu_uneq): Likewise.
6525 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
6527         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
6528         accesses as well.
6529         (arc_is_uncached_mem_p): uncached applies to both the variable and
6530         the pointer.
6532 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
6534         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
6535         register names.
6537 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
6539         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
6540         field "m_scopes" from vec to auto_vec.
6542 2018-07-25  Martin Liska  <mliska@suse.cz>
6544         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
6545         return type.
6547 2018-07-25  Richard Biener  <rguenther@suse.de>
6549         PR debug/86654
6550         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
6551         special wrt context_die late.
6552         (gen_subprogram_die): Re-use DIEs in local scope.
6554 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
6556         PR tree-optimization/86644
6557         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
6559 2018-07-25  Martin Liska  <mliska@suse.cz>
6561         PR middle-end/86645
6562         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
6563         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
6565 2018-07-25  Martin Liska  <mliska@suse.cz>
6567         PR sanitizer/79635
6568         * params.def: Explain ASan abbreviation and provide
6569         a documentation link.
6571 2018-07-24  Martin Sebor  <msebor@redhat.com>
6573         PR tree-optimization/86622
6574         PR tree-optimization/86532
6575         * builtins.h (string_length): Declare.
6576         * builtins.c (c_strlen): Correct handling of non-constant offsets.
6577         (check_access): Be prepared for non-constant length ranges.
6578         (string_length): Make extern.
6579         * expr.c (string_constant): Only handle the minor non-constant
6580         array index.  Use string_constant to compute the length of
6581         a generic string constant.
6583 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
6585         PR tree-optimization/86618
6586         * tree-vect-stmts.c (vectorizable_call): Don't take the address
6587         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
6589 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
6591         PR tree-optimization/86636
6592         * json.cc (json::object::set): Fix comment.  Add assertions.
6593         (json::array::append): Move here from json.h.  Add comment and an
6594         assertion.
6595         (json::string::string): Likewise.
6596         * json.h (json::array::append): Move to json.cc.
6597         (json::string::string): Likewise.
6598         * optinfo-emit-json.cc
6599         (optrecord_json_writer::impl_location_to_json): Assert that we
6600         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
6601         wrapper around it.  Expand the location once, rather than three
6602         times.
6603         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
6604         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
6605         wrappers.
6606         (optrecord_json_writer::optinfo_to_json): Likewise, in four
6607         places.  Fix some overlong lines.
6609 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
6611         * config/aarch64/aarch64-simd.md
6612         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
6613         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
6614         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
6615         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
6616         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
6617         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
6618         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
6619         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
6620         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
6622 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
6624         PR middle-end/86627
6625         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
6626         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
6627         and abs_d == d, do the power of two handling if profitable.
6629 2018-07-24  Richard Biener  <rguenther@suse.de>
6631         * match.pd: Add BIT_FIELD_REF canonicalizations.
6633 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6635         PR c/86617
6636         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
6638 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6640         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
6641         terminated STRING_CST object.
6643 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6645         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
6647 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
6649         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
6650         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
6651         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
6652         the elements into a register.
6653         (rs6000_split_v4si_init_di_reg): Delete.
6654         (rs6000_split_v4si_init): Delete.
6655         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
6656         (vsx_init_v4si): Rewrite as a define_expand.
6658 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
6660         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
6661         zero_extend argument from memory): New.
6663 2018-07-22  Martin Sebor  <msebor@redhat.com>
6665         PR bootstrap/86621
6666         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
6667         diagnosing calls with unknown arguments unless -Walloca-larger-than
6668         is restricted to less than PTRDIFF_MAX bytes.
6670 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
6672         * doc/gcov.texi (Invoking Gcov): Editorial changes.
6674 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
6676         * pretty-print.c (text_info::set_location): Remove redundant
6677         "line_table" parameter from call to rich_location::set_range.
6679 2018-07-20  Martin Sebor  <msebor@redhat.com>
6681         PR middle-end/82063
6682         * builtins.c (expand_builtin_alloca): Adjust.
6683         * calls.c (alloc_max_size): Simplify.
6684         * cgraphunit.c (cgraph_node::expand): Adjust.
6685         * common.opt (larger_than_size, warn_frame_larger_than): Remove
6686         variables.
6687         (frame_larger_than_size): Same.
6688         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
6689         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
6690         Initialize.
6691         * doc/invoke.texi (GCC Command Options): Document option arguments.
6692         Explain byte-size arguments and suffixes.
6693         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
6694         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
6695         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
6696         * doc/options.texi (UInteger): Expand.
6697         (Host_Wide_Int, ByteSize): Document new properties.
6698         * final.c (final_start_function_1): Include sizes in an error message.
6699         * function.c (frame_offset_overflow): Same.
6700         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
6701         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
6702         Diagnose unbounded alloca calls only for limits of less than
6703         PTRDIFF_MAX.
6704         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
6705         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
6706         for alloca(0).
6707         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
6708         only for limits of less than PTRDIFF_MAX.
6709         * langhooks-def.h (lhd_handle_option): Change function argument
6710         to HOST_WIDE_INT.
6711         * langhooks.c (lhd_handle_option): Same.
6712         * langhooks.h (handle_option): Same.
6713         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
6714         ByteSize flags.
6715         (var_type, var_type_struct): Same.
6716         (var_set): Handle ByteSize flag.
6717         * optc-gen.awk: Add comments to output to ease debugging.  Make
6718         use of HOST_WIDE_INT where appropriate.
6719         * opts-gen-save.awk:  Use %lx to format unsigned long.
6720         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
6721         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
6722         arguments.  Parse bytes-size suffixes.
6723         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
6724         (enum_value_to_arg): Same.
6725         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
6726         (handle_option): Adjust.
6727         (generate_option): Change function argument to HOST_WIDE_INT.
6728         (cmdline_handle_error): Adjust.
6729         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
6730         (set_option): Change function argument to HOST_WIDE_INT.
6731         (option_enabled): Handle cl_host_wide_int.
6732         (get_option_state): Handle CLVC_SIZE.
6733         (control_warning_option): Same.
6734         * opts.c (common_handle_option): Change function argument to
6735         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
6736         OPT_Wvla_larger_than_.
6737         * opts.h (enum cl_var_type): Add an enumerator.
6738         * stor-layout.c (layout_decl): Print a more meaningful warning.
6739         * toplev.c (output_stack_usage): Adjust.
6741 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
6743         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
6744         call to inline_expand_builtin_string_cmp.
6745         (expand_builtin_strcmp): Likewise.
6746         (expand_builtin_strncmp): Likewise.
6747         (inline_string_cmp): Delete the last parameter, change char_type_node
6748         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
6749         two operands.
6750         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
6751         the inlining expansion on target where the type of the call has same or
6752         narrower precision than unsigned char.
6754 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
6756         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
6757         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
6758         * common.opt (fsave-optimization-record): New option.
6759         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
6760         * doc/invoke.texi (-fsave-optimization-record): New option.
6761         * dumpfile.c: Include "optinfo-emit-json.h".
6762         (struct kv_pair): Move to coretypes.h.
6763         (optgroup_options): Make non-static.
6764         (dump_context::end_scope): Call
6765         optimization_records_maybe_pop_dump_scope.
6766         * dumpfile.h (optgroup_options): New decl.
6767         * json.cc: New file.
6768         * json.h: New file.
6769         * optinfo-emit-json.cc: New file.
6770         * optinfo-emit-json.h: New file.
6771         * optinfo.cc: Include "optinfo-emit-json.h".
6772         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
6773         (optinfo_enabled_p): Check optimization_records_enabled_p.
6774         (optinfo_wants_inlining_info_p): Likewise.
6775         * optinfo.h: Update comment.
6776         * profile-count.c (profile_quality_as_string): New function.
6777         * profile-count.h (profile_quality_as_string): New decl.
6778         (profile_count::quality): New accessor.
6779         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
6780         and optinfo_emit_json_cc_tests.
6781         * selftest.h (selftest::json_cc_tests): New decl.
6782         (selftest::optinfo_emit_json_cc_tests): New decl.
6783         * toplev.c: Include "optinfo-emit-json.h".
6784         (compile_file): Call optimization_records_finish.
6785         (do_compile): Call optimization_records_start.
6786         * tree-ssa-live.c: Include optinfo.h.
6787         (remove_unused_scope_block_p): Retain inlining information if
6788         optinfo_wants_inlining_info_p returns true.
6790 2018-07-20  Richard Biener  <rguenther@suse.de>
6792         PR debug/86585
6793         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
6794         to cover -flto-partition=none.
6796 2018-07-20  Martin Liska  <mliska@suse.cz>
6798         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
6799         (get_decl_source_range): Remove unused function.
6801 2018-07-20  Richard Biener  <rguenther@suse.de>
6803         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
6804         (struct vn_phi_s): Likewise.
6805         (struct vn_reference_s): Likewise.
6806         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
6807         for searching the slot of an entry known to be in the hash itself.
6808         (vn_phi_hasher::equal): Likewise.
6809         (vn_reference_hasher::equal): Likewise.
6810         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
6811         globals.
6812         (optimistic_info, current_info): Remove, keeping only valid_info.
6813         (vn_reference_lookup_1): Remove fallback lookup.
6814         (vn_reference_lookup_2): Likewise.
6815         (vn_nary_op_lookup_1): Likewise.
6816         (vn_phi_lookup): Likewise.
6817         (vn_nary_build_or_lookup_1): Make sure to not chain the built
6818         hash element.
6819         (vn_reference_insert): Adjust, chain the inserted hash element
6820         at last_inserted_ref.
6821         (vn_reference_insert_pieces): Likewise.
6822         (visit_reference_op_call): Likewise.
6823         (vn_nary_op_insert_into): Chain the inserted hash element at
6824         last_inserted_nary.
6825         (vn_nary_op_insert_pieces): Adjust.
6826         (vn_nary_op_insert): Likewise.
6827         (vn_nary_op_insert_stmt): Likewise.
6828         (vn_phi_insert): Adjust, chain the inserted hash element at
6829         last_inserted_phi.
6830         (process_scc): Remove clearing and copying the optimistic
6831         table.  Instead remove elements inserted during an optimistic
6832         iteration from the single table we maintain.
6833         (init_scc_vn): Adjust.
6834         (free_scc_vn): Likewise.
6835         (sccvn_dom_walker::record_cond): Likewise.
6836         (sccvn_dom_walker::after_dom_children): Likewise.
6838 2018-07-19  Martin Sebor  <msebor@redhat.com>
6840         PR tree-optimization/84047
6841         PR tree-optimization/83776
6842         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
6843         (check_array_bounds): Call it.
6845 2018-07-19  Martin Sebor  <msebor@redhat.com>
6847         * align.h (align_flags): Use member initialization.
6849 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
6851         * Makefile.in (OBJS): Add optinfo.o.
6852         * coretypes.h (class symtab_node): New forward decl.
6853         (struct cgraph_node): New forward decl.
6854         (class varpool_node): New forward decl.
6855         * dump-context.h: New file.
6856         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
6857         "tree-pass.h".
6858         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
6859         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
6860         (set_alt_dump_file): Likewise.
6861         (dump_context::~dump_context): New dtor.
6862         (dump_gimple_stmt): Move implementation to...
6863         (dump_context::dump_gimple_stmt): ...this new member function.
6864         Add the stmt to any pending optinfo, creating one if need be.
6865         (dump_gimple_stmt_loc): Move implementation to...
6866         (dump_context::dump_gimple_stmt_loc): ...this new member function.
6867         Start a new optinfo and add the stmt to it.
6868         (dump_gimple_expr): Move implementation to...
6869         (dump_context::dump_gimple_expr): ...this new member function.
6870         Add the stmt to any pending optinfo, creating one if need be.
6871         (dump_gimple_expr_loc): Move implementation to...
6872         (dump_context::dump_gimple_expr_loc): ...this new member function.
6873         Start a new optinfo and add the stmt to it.
6874         (dump_generic_expr): Move implementation to...
6875         (dump_context::dump_generic_expr): ...this new member function.
6876         Add the tree to any pending optinfo, creating one if need be.
6877         (dump_generic_expr_loc): Move implementation to...
6878         (dump_context::dump_generic_expr_loc): ...this new member
6879         function.  Add the tree to any pending optinfo, creating one if
6880         need be.
6881         (dump_printf): Move implementation to...
6882         (dump_context::dump_printf_va): ...this new member function.  Add
6883         the text to any pending optinfo, creating one if need be.
6884         (dump_printf_loc): Move implementation to...
6885         (dump_context::dump_printf_loc_va): ...this new member function.
6886         Start a new optinfo and add the stmt to it.
6887         (dump_dec): Move implementation to...
6888         (dump_context::dump_dec): ...this new member function.  Add the
6889         value to any pending optinfo, creating one if need be.
6890         (dump_context::dump_symtab_node): New member function.
6891         (dump_context::get_scope_depth): New member function.
6892         (dump_context::begin_scope): New member function.
6893         (dump_context::end_scope): New member function.
6894         (dump_context::ensure_pending_optinfo): New member function.
6895         (dump_context::begin_next_optinfo): New member function.
6896         (dump_context::end_any_optinfo): New member function.
6897         (dump_context::s_current): New global.
6898         (dump_context::s_default): New global.
6899         (dump_scope_depth): Delete global.
6900         (dumpfile_ensure_any_optinfo_are_flushed): New function.
6901         (dump_symtab_node): New function.
6902         (get_dump_scope_depth): Reimplement in terms of dump_context.
6903         (dump_begin_scope): Likewise.
6904         (dump_end_scope): Likewise.
6905         (selftest::temp_dump_context::temp_dump_context): New ctor.
6906         (selftest::temp_dump_context::~temp_dump_context): New dtor.
6907         (selftest::verify_item): New function.
6908         (ASSERT_IS_TEXT): New macro.
6909         (ASSERT_IS_TREE): New macro.
6910         (ASSERT_IS_GIMPLE): New macro.
6911         (selftest::test_capture_of_dump_calls): New test.
6912         (selftest::dumpfile_c_tests): Call it.
6913         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
6914         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
6915         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
6916         descriptive comment.
6917         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
6918         (dump_node, dump_bb): Move these unrelated decls.
6919         (class dump_manager): Add leading comment.
6920         * optinfo.cc: New file.
6921         * optinfo.h: New file.
6923 2018-07-19  Michael Collison  <michael.collison@arm.com>
6924             Richard Henderson <rth@redhat.com>
6926         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
6927         (subti): Handle op1 zero.
6928         (subvti4, usub4ti4): New.
6929         (*sub<GPI>3_compare1_imm): New.
6930         (sub<GPI>3_carryinCV): New.
6931         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
6932         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
6934 2018-07-19  Michael Collison  <michael.collison@arm.com>
6935             Richard Henderson <rth@redhat.com>
6937         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
6938         (addti3): Create simpler code if low part is already known to be 0.
6939         (addvti4, uaddvti4): New.
6940         (*add<GPI>3_compareC_cconly_imm): New.
6941         (*add<GPI>3_compareC_cconly): New.
6942         (*add<GPI>3_compareC_imm): New.
6943         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
6944         handle constants within this pattern..
6945         (*add<GPI>3_compareV_cconly_imm): New.
6946         (*add<GPI>3_compareV_cconly): New.
6947         (*add<GPI>3_compareV_imm): New.
6948         (add<GPI>3_compareV): New.
6949         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
6950         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
6951         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
6952         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
6953         with 'comparison' operator.
6954         (*add<GPI>3_compareV_cconly_imm): Ditto.
6955         (*add<GPI>3_compareV_cconly): Ditto.
6956         (*add<GPI>3_compareV_imm): Ditto.
6957         (add<GPI>3_compareV): Ditto.
6958         (add<mode>3_carryinC): Ditto.
6959         (*add<mode>3_carryinC_zero): Ditto.
6960         (*add<mode>3_carryinC): Ditto.
6961         (add<mode>3_carryinV): Ditto.
6962         (*add<mode>3_carryinV_zero): Ditto.
6963         (*add<mode>3_carryinV): Ditto.
6965 2018-07-19  Michael Collison  <michael.collison@arm.com>
6966             Richard Henderson <rth@redhat.com>
6968         * config/aarch64/aarch64-modes.def (CC_V): New.
6969         * config/aarch64/aarch64-protos.h
6970         (aarch64_addti_scratch_regs): Declare
6971         (aarch64_subvti_scratch_regs): Declare.
6972         (aarch64_expand_subvti): Declare.
6973         (aarch64_gen_unlikely_cbranch): Declare
6974         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
6975         for signed overflow using CC_Vmode.
6976         (aarch64_get_condition_code_1): Handle CC_Vmode.
6977         (aarch64_gen_unlikely_cbranch): New function.
6978         (aarch64_addti_scratch_regs): New function.
6979         (aarch64_subvti_scratch_regs): New function.
6980         (aarch64_expand_subvti): New function.
6982 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6984         * config/aarch64/aarch64-option-extensions.def: New entry for profile
6985         extension.
6986         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
6987         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
6988         extension.
6990 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6992         PR target/83009
6993         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6994         address check not strict.
6996 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6998         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
6999         Umq with Umn.
7000         (store_pair_lanes<mode>): Likewise.
7001         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7002         enum value 'ADDR_QUERY_LDP_STP_N'.
7003         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7004         (aarch64_print_address_internal): Add declaration.
7005         (aarch64_print_ldpstp_address): Remove.
7006         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7007         (aarch64_print_operand): Change printing of 'y'.
7008         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7009         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7010         'true' rather than '1'.
7011         * config/aarch64/constraints.md (Uml): Likewise.
7012         (Uml): Rename to Umn.
7013         (Umq): Remove.
7015 2018-07-19  Richard Biener  <rguenther@suse.de>
7017         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7018         a trailing array.
7019         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7020         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7021         (vn_reference_hasher): Likewise.
7022         (struct vn_tables_s): Remove obstack and alloc-pool members.
7023         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7024         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7025         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7026         (vn_reference_insert_pieces): Likewise.
7027         (alloc_vn_nary_op_noinit): Adjust.
7028         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7029         (vn_phi_eq): Adjust.
7030         (shared_lookup_phiargs): Remove.
7031         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7032         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7033         (visit_reference_op_call): Likewise.
7034         (copy_nary, copy_phi, copy_reference): Remove.
7035         (process_scc): Rewind the obstack when iterating.  Do not
7036         copy the elements to valid_info but just move them from one
7037         hashtable to the other.
7038         (allocate_vn_table): Adjust.
7039         (free_vn_table): Likewise.
7040         (init_scc_vn): Likewise.
7041         (free_scc_vn): Likewise.
7043 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
7045         PR target/86560
7046         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7047         indirect_return as function type attribute.
7048         (ix86_attribute_table): Change indirect_return to function
7049         type attribute.
7050         * doc/extend.texi: Update indirect_return attribute.
7052 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
7054         * wide-int.h (widest2_int): New.
7055         * gimple-fold.c (arith_overflowed_p): Use it.
7056         * tree.h (widest2_int_cst): New.
7057         * tree-vrp.c (wide_int_binop_overflow): Rename from
7058         vrp_int_const_binop.
7059         Rewrite to work on trees.
7060         (extract_range_from_multiplicative_op_1): Abstract code to...
7061         (wide_int_range_min_max): ...here.
7062         (wide_int_range_cross_product): ...and here.
7063         (extract_range_from_binary_expr_1): Abstract overflow code to...
7064         (wide_int_range_mult_wrapping): ...here.
7065         * tree-vrp.h (wide_int_range_cross_product): New.
7066         (wide_int_range_mult_wrapping): New.
7068 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
7069             Julia Koval  <julia.koval@intel.com>
7071         * config/i386/x86-tune-costs.h (skylake_memcpy,
7072         skylake_memset): Replace rep_prefix with unrolling for size 512.
7074 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
7076         PR middle-end/86544
7077         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7078         comparision with EQ_EXPR in last stmt.
7080 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7082         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7083         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7084         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7085         previously known as "PowerPC AltiVec Built-in Functions".  Move
7086         some material to new subsubsections "PowerPC AltiVec Built-in
7087         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7088         ISA 2.07".
7089         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7090         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7091         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7092         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7094 2018-07-18  Richard Biener  <rguenther@suse.de>
7096         PR tree-optimization/86557
7097         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7098         EXACT_DIV_EXPR.
7100 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
7102         * config/s390/s390.c (s390_function_profiler): Generate CFI.
7104 2018-07-17  Jeff Law  <law@redhat.com>
7106         * config/arm/arm.c (get_label_padding): Update for recent
7107         changes to label_to_alignment.
7109         PR tree-optimization/86010
7110         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7112         * config/mips/mips.c (vr4130_align_insns): Update for recent
7113         changes to label_to_alignment.
7115         * config/frv/frv.c (frv_label_align): Update for recent changes
7116         to label_to_alignment.
7118         * config/nios2/nios2.c (nios2_label_align): Update for recent
7119         changes which dropped ALIGN_LABELS_LOG.
7121 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
7123         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7124         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7126 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
7128         * config/arc/arc.c (arc_label_align): Use align_labels instead of
7129         deprecated align_labels_log.
7131 2018-07-17  Richard Biener  <rguenther@suse.de>
7133         PR lto/86456
7134         * dwarf2out.c (init_sections_and_labels): Always generate
7135         a debug_line_str_section for early LTO debug.
7136         (dwarf2out_finish): Reset debug_line_str_hash output early.
7137         Bump counter for extra dwarf5 .debug_loc labels to not conflict
7138         with fat LTO part.
7139         (dwarf2out_early_finish): Output debug_line_str.
7141 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7143         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7144         index register on z196 or later.
7146 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
7148         * config/s390/s390.c (s390_default_align): Set default function
7149         alignment to 16.
7150         (s390_override_options_after_change): Call s390_default align.
7151         (s390_option_override_internal): Call s390_default_align.
7152         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
7154 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
7156         PR middle-end/86542
7157         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
7158         to _looptemp_ clauses, other than the first two.
7160 2018-07-17  Martin Liska  <mliska@suse.cz>
7162         * opts.c: Do not enable OPT_falign_* for -Os.
7164 2018-07-17  Martin Liska  <mliska@suse.cz>
7166         * align.h (MAX_CODE_ALIGN): New.
7167         (MAX_CODE_ALIGN_VALUE): New.
7168         * common/config/i386/i386-common.c (ix86_handle_option):
7169         (MAX_CODE_ALIGN): Moved to align.h.
7170         * final.c (MAX_CODE_ALIGN): Likewise.
7171         * opts.c (parse_and_check_align_values):
7172         (MAX_CODE_ALIGN): Likewise.
7173         (MAX_CODE_ALIGN_VALUE): Likewise.
7175 2018-07-17  Martin Liska  <mliska@suse.cz>
7177         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
7178         in order to fulfil coding style.
7179         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
7180         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7181         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7182         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
7183         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
7184         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
7185         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
7186         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
7187         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7189 2018-07-17  Martin Liska  <mliska@suse.cz>
7191         * align.h: New file.
7192         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
7193         directly.
7194         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
7195         align_flags of label_to_alignment.
7196         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
7197         align_flags class.
7198         * config/m68k/m68k.c: Do not use removed align_labels_value and
7199         align_loops_value.
7200         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
7201         (LOOP_ALIGN): Likewise.
7202         (LABEL_ALIGN): Likewise.
7203         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7204         Remove not used macro.
7205         (rs6000_loop_align): Change return type to align_flags.
7206         (rs6000_loop_align_max_skip): Remove.
7207         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
7208         Change return type to align_flags.
7209         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7210         Remove not used macro.
7211         (rs6000_loop_align):  Change return type to align_flags.
7212         (rs6000_loop_align_max_skip): Remove.
7213         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
7214         * config/rx/rx-protos.h (rx_align_for_label): Make it
7215         static function.
7216         * config/rx/rx.c (rx_align_for_label): Change return type
7217         to align_flags.
7218         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
7219         macro definitions.
7220         into align_flags class.
7221         (LABEL_ALIGN): Likewise.
7222         (LOOP_ALIGN): Likewise.
7223         * config/s390/s390.c (s390_label_align): Use align_flags
7224         class member.
7225         (s390_asm_output_function_label): Likewise.
7226         * config/sh/sh.c (sh_override_options_after_change):
7227         Use align_flags class directly without macros.
7228         (find_barrier): Likewise.
7229         (barrier_align): Likewise.
7230         (sh_loop_align): Likewise.
7231         * config/spu/spu.c (spu_option_override):
7232         Use align_flags_tuple::get_value instead of removed macros.
7233         (spu_sched_init): Likewise.
7234         * config/spu/spu.h (GTY): Likewise.
7235         * config/visium/visium.c (visium_option_override):
7236         Set "8" as default secondary alignment.
7237         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
7238         in order to guarantee secondary alignment of 8.
7239         * coretypes.h: Include align.h header file.
7240         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
7241         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
7242         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
7243         * doc/tm.texi.in: Likewise.
7244         * final.c (struct label_alignment): Remove not used structure.
7245         (LABEL_ALIGN): Change type to align_flags.
7246         (LOOP_ALIGN): Likewise.
7247         (JUMP_ALIGN): Likewise.
7248         (default_loop_align_max_skip): Remove.
7249         (default_label_align_max_skip): Likewise.
7250         (default_jump_align_max_skip): Likewise.
7251         (default_label_align_after_barrier_max_skip):
7252         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
7253         (LABEL_TO_MAX_SKIP): Remove.
7254         (label_to_alignment): Return align_flags type instead of integer.
7255         (label_to_max_skip): Remove.
7256         (align_fuzz): Use align_flags type.
7257         (compute_alignments): Use align_flags type and use align_flags::max
7258         to combine multiple alignments.
7259         (grow_label_align): Grow vec instead of C array.
7260         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
7261         (shorten_branches):  Use align_flags type and use align_flags::max
7262         to combine multiple alignments.
7263         (final_scan_insn_1): Remove usage of secondary alignment that comes
7264         from label alignment, but instead use proper secondary alignment
7265         which is computed in grow_label_align.
7266         * flags.h (struct align_flags_tuple): Move to align.h.
7267         (struct align_flags): Likewise.
7268         (state_align_loops): Rename to align_loops.
7269         (state_align_jumps): Rename to align_jumps.
7270         (state_align_labels): Rename to align_labels.
7271         (state_align_functions): Rename to align_functions.
7272         (align_loops_log): Remove.
7273         (align_jumps_log): Remove.
7274         (align_labels_log): Remove.
7275         (align_functions_log): Remove.
7276         (align_loops_max_skip): Remove.
7277         (align_jumps_max_skip): Remove.
7278         (align_labels_max_skip): Remove.
7279         (align_functions_max_skip): Remove.
7280         (align_loops_value): Remove.
7281         (align_jumps_value): Remove.
7282         (align_labels_value): Remove.
7283         (align_functions_value): Remove.
7284         * output.h (label_to_alignment): Change return type to align_flags.
7285         (label_to_max_skip): Remove.
7286         * target.def: Remove loop_align_max_skip, label_align_max_skip,
7287         jump_align_max_skip macros.
7288         * targhooks.h (default_loop_align_max_skip): Remove.
7289         (default_label_align_max_skip): Likewise.
7290         (default_jump_align_max_skip): Likewise.
7291         (default_label_align_after_barrier_max_skip): Remove.
7292         * toplev.c (read_log_maxskip): Use ::normalize function.
7293         (parse_N_M): Remove not used argument and also call ::normalize.
7294         (parse_alignment_opts): Do not pass unused arguments.
7295         * varasm.c (assemble_start_function): Use directly align_functions
7296         instead of removed macros.
7297         * system.h: Do not poison removed macros.
7299 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
7301         PR middle-end/86539
7302         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
7303         and cond temporaries don't have reference type if iterator has
7304         pointer type.  For init use &for_pre_body instead of pre_p if
7305         for_pre_body is non-empty.
7307 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
7309         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
7310         double-double modes to SFmode directly directly.
7311         (trunc<mode>sf2_fprs): Delete.
7313 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
7315         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
7316         for conversions between IFmode and the decimal floating point modes.
7317         (init_float128_ieee): Use the correct names for conversions between
7318         KFmode and the decimal floating point modes.
7320 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
7322         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
7323         for the conversions between TDmode and IFmode.
7324         (init_float128_ieee): Use more correct names for the conversions
7325         between TDmode and KFmode.
7327 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
7329         PR tree-optimization/86526
7330         * builtins.c (expand_builtin_memcmp): Formatting fixes.
7331         (inline_expand_builtin_string_cmp): Likewise.
7332         (inline_string_cmp): Likewise.  Use c_readstr instead of
7333         builtin_memcpy_read_str.  Add unit_mode temporary.
7335 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7337         PR middle-end/86528
7338         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
7339         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
7341 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7343         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
7344         Alphabetize prototypes of built-in functions, separating out
7345         built-in functions that are listed in this section but should be
7346         described elsewhere.
7348 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
7350         PR target/86511
7351         * expmed.c (emit_store_flag): Do not emit setcc followed by a
7352         conditional move when trapping comparison was split to a
7353         non-trapping one (and vice versa).
7355 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
7357         * config/s390/s390.c (s390_function_profiler): Generate nops
7358         instead of profiler call sequences.
7359         * config/s390/s390.opt: Add the new option.
7361 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
7363         * config/s390/s390.c (s390_function_profiler): Generate
7364         __mcount_loc section.
7365         * config/s390/s390.opt: Add the new option.
7367 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
7369         * common.opt: Add the new warning.
7370         * config/s390/s390.c (s390_function_profiler): Emit "brasl
7371         %r0,__fentry__" when -mfentry is specified.
7372         (s390_option_override_internal): Disallow -mfentry for 31-bit
7373         CPUs.
7374         * config/s390/s390.opt: Add the new option.
7376 2018-07-16  Richard Biener  <rguenther@suse.de>
7378         PR lto/86523
7379         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
7380         for function-local FUNCTION_DECL and RESULT_DECL immediately.
7382 2018-07-16  Martin Liska  <mliska@suse.cz>
7384         PR ipa/86529
7385         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
7386         to ::get_create.
7388 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
7390         * config/arc/arcHS.md: Update ARCHS scheduling rules.
7392 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
7394         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
7395         for ARCHS4x.
7396         * config/arc/arc-cpus.def (hs4x): New cpu.
7397         (hs4xd): Likewise.
7398         * config/arc/arc-tables.opt: Regenerate.
7399         * config/arc/arc.c (arc_sched_issue_rate): New function.
7400         (TARGET_SCHED_ISSUE_RATE): Define.
7401         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
7402         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
7403         fpu_cvt.
7404         (attr tune): Add ARCHS4x tune values.
7405         (attr tune_dspmpy): Define.
7406         (*tst): Correct instruction type.
7407         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
7408         * config/arc/arcHS4x.md: New file.
7409         * config/arc/fpu.md: Update instruction type attributes.
7410         * config/arc/t-multilib: Regenerate.
7412 2018-07-16  Tom de Vries  <tdevries@suse.de>
7414         PR debug/86455
7415         * var-tracking.c (vt_initialize): Fix pre_dec handling.
7417 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7419         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
7420         early clobber.
7422 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
7424         PR tree-optimization/86514
7425         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
7426         conversion to a boolean type from a type with greater precision.
7428 2018-07-16  Tom de Vries  <tdevries@suse.de>
7430         * var-tracking.c (vt_initialize): Print adjusted insn slim if
7431         dump_flags request TDF_SLIM.
7433 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
7435         * fold-const.c (int_const_binop_1): Abstract...
7436         (wide_int_binop): ...wide int code here.
7437         (poly_int_binop): ...poly int code here.
7438         Abstract the rest of int_const_binop_1 into int_const_binop.
7439         * fold-const.h (wide_int_binop): New.
7440         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
7441         Remove useless PLUS/MINUS_EXPR case.
7442         (zero_nonzero_bits_from_vr): Move wide int code...
7443         (zero_nonzero_bits_from_bounds): ...here.
7444         (extract_range_from_binary_expr_1): Move mask optimization code...
7445         (range_easy_mask_min_max): ...here.
7446         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
7447         (range_easy_mask_min_max): New.
7449 2018-07-15  Jeff Law  <law@redhat.com>
7451         PR target/85993
7452         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
7453         block.
7455 2018-07-14  Jim Wilson  <jimw@sifive.com>
7457         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
7459 2018-07-14  Paul Koning  <ni1d@arrl.net>
7461         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
7463 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
7465         * lto-streamer-out.c (copy_function_or_variable): Dump info about
7466         copying section.
7468 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
7469             Steve Munroe  <munroesj52@gmail.com>
7471         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
7472         (_mm_andnot_si128): Likewise.
7473         (_mm_or_si128): Likewise.
7474         (_mm_xor_si128): Likewise.
7476 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
7478         PR middle-end/78809
7479         * builtins.c (expand_builtin_memcmp): Inline the calls first
7480         when result_eq is false.
7481         (expand_builtin_strcmp): Inline the calls first.
7482         (expand_builtin_strncmp): Likewise.
7483         (inline_string_cmp): New routine. Expand a string compare
7484         call by using a sequence of char comparison.
7485         (inline_expand_builtin_string_cmp): New routine. Inline expansion
7486         a call to str(n)cmp/memcmp.
7487         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
7488         New option.
7489         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
7491 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
7493         * config/arm/driver-arm.c: Include arm-native.h.
7494         (host_detect_local_cpu): Use auto-generated data tables.
7495         (vendors, arm_cpu_table): Delete.  Move part information to ...
7496         * config/arm/arm-cpus.in: ... here.
7497         * config/arm/parsecpu.awk (gen_native): New function.
7498         (vendor, part): New CPU fields.
7499         (END): Add support for building the native CPU detection tables.
7500         * config/arm/t-arm (arm-native.h): Add build rule.
7501         (driver-arm.o): Add dependency on arm-native.h.
7503 2018-07-13  Richard Biener  <rguenther@suse.de>
7505         PR middle-end/85974
7506         * match.pd (addr1 - addr2): Allow either of the operand to
7507         have a conversion.
7509 2018-07-13  Tom de Vries  <tdevries@suse.de>
7511         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
7512         in remap_ssa_name.
7514 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
7516         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
7517         arrays instead of numbered variables.
7519 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
7521         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
7522         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
7524 2018-07-13  Richard Biener  <rguenther@suse.de>
7526         PR debug/86452
7527         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
7528         instead of get_context_die.
7530 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
7531             Richard Biener  <rguenther@suse.de>
7533         PR middle-end/86489
7534         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
7535         that the loop latch destination where phi is defined.
7537 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
7539         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
7540         (riscv_expand_epilogue): Add assertion to check interrupt mode.
7541         (riscv_set_current_function): Extract getting interrupt type to new
7542         function.
7543         (riscv_get_interrupt_type): New function.
7544         (riscv_merge_decl_attributes): New function, checking interrupt type is
7545         same.
7546         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
7548 2018-07-12  Paul Koning  <ni1d@arrl.net>
7550         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
7551         directive.
7553 2018-07-12  Paul Koning  <ni1d@arrl.net>
7555         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
7556         zero reference, add doloop_end instead.
7557         * doc/md.texi (decrement_and_branch_until_zero): Remove.
7558         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
7559         detail for doloop_end.
7561 2018-07-12  Martin Sebor  <msebor@redhat.com>
7563         PR c/86453
7564         * attribs.c (decl_attributes): Reject conflicting attributes before
7565         calling attribute handlers.
7567 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
7569         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
7570          parameter.
7571         (gcc::dump_manager::get_dump_file_name): likewise.
7572         (dump_begin): Likewise.
7573         * dumpfile.h (dump_begin): Update prototype.
7574         (gcc::dump_manager::get_dump_file_name,
7575         gcc::dump_manager::get_dump_file_name): Update prototype.
7577 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7579         * internal-fn.h (vectorizable_internal_fn_p): New function.
7580         * tree-vect-slp.c (compatible_calls_p): Likewise.
7581         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
7582         to internal functions.
7583         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
7585 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7587         * fold-const.h (inverse_conditions_p): Declare.
7588         * fold-const.c (inverse_conditions_p): New function.
7589         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
7590         that test the inverse condition of a conditional internal function.
7591         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
7592         * internal-fn.c (internal_fn_mask_index): Handle conditional
7593         internal functions.
7594         (vectorized_internal_fn_supported_p): New function.
7595         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
7596         (any_pred_load_store): Replace with...
7597         (need_to_predicate): ...this new variable.
7598         (redundant_ssa_names): New variable.
7599         (ifcvt_can_use_mask_load_store): Move initial checks to...
7600         (ifcvt_can_predicate): ...this new function.  Handle tree codes
7601         for which a conditional internal function exists.
7602         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
7603         instead of ifcvt_can_use_mask_load_store.  Update after variable
7604         name change.
7605         (predicate_load_or_store): New function, split out from
7606         predicate_mem_writes.
7607         (check_redundant_cond_expr): New function.
7608         (value_available_p): Likewise.
7609         (predicate_rhs_code): Likewise.
7610         (predicate_mem_writes): Rename to...
7611         (predicate_statements): ...this.  Use predicate_load_or_store
7612         and predicate_rhs_code.
7613         (combine_blocks, tree_if_conversion): Update after above name changes.
7614         (ifcvt_local_dce): Handle redundant_ssa_names.
7615         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
7616         general conditional functions.
7617         * tree-vect-stmts.c (vectorizable_call): Likewise.
7619 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7620             Alan Hayward  <alan.hayward@arm.com>
7621             David Sherwood  <david.sherwood@arm.com>
7623         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
7624         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
7625         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
7626         plus and minus and convert them into IFN_COND_FMA-based sequences.
7627         (convert_mult_to_fma): Handle conditional plus and minus.
7629 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7631         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
7632         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
7633         (cond_fnms_optab): New optabs.
7634         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
7635         internal functions.
7636         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
7637         * internal-fn.h (get_conditional_internal_fn): Declare.
7638         (get_unconditional_internal_fn): Likewise.
7639         * internal-fn.c (cond_ternary_direct): New macro.
7640         (expand_cond_ternary_optab_fn): Likewise.
7641         (direct_cond_ternary_optab_supported_p): Likewise.
7642         (FOR_EACH_COND_FN_PAIR): Likewise.
7643         (get_conditional_internal_fn): New function.
7644         (get_unconditional_internal_fn): Likewise.
7645         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
7646         (gimple_match_op::gimple_match_op): Add a new overload for 5
7647         operands.
7648         (gimple_match_op::set_op): Likewise.
7649         (gimple_resimplify5): Declare.
7650         * genmatch.c (decision_tree::gen): Generate simplifications for
7651         5 operands.
7652         * gimple-match-head.c (gimple_simplify): Define an overload for
7653         5 operands.  Handle calls with 5 arguments in the top-level overload.
7654         (convert_conditional_op): Handle conversions from unconditional
7655         internal functions to conditional ones.
7656         (gimple_resimplify5): New function.
7657         (build_call_internal): Pass a fifth operand.
7658         (maybe_push_res_to_seq): Likewise.
7659         (try_conditional_simplification): Try converting conditional
7660         internal functions to unconditional internal functions.
7661         Handle 3-operand unconditional forms.
7662         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
7663         Define ternary equivalents of the current rules for binary conditional
7664         internal functions.
7665         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
7666         ternary operations.
7667         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
7668         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
7669         (optab): Handle them.
7670         (SVE_COND_FP_TERNARY): New int iterator.
7671         (sve_fmla_op, sve_fmad_op): New int attributes.
7672         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
7673         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
7674         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
7676 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
7678         * target.def (preferred_else_value): New target hook.
7679         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
7680         * doc/tm.texi: Regenerate.
7681         * targhooks.h (default_preferred_else_value): Declare.
7682         * targhooks.c (default_preferred_else_value): New function.
7683         * internal-fn.h (conditional_internal_fn_code): Declare.
7684         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
7685         (get_conditional_internal_fn): Use it.
7686         (conditional_internal_fn_code): New function.
7687         * gimple-match.h (gimple_match_cond): New struct.
7688         (gimple_match_op): Add a cond member function.
7689         (gimple_match_op::gimple_match_op): Update all forms to take a
7690         gimple_match_cond.
7691         * genmatch.c (expr::gen_transform): Use the same condition as res_op
7692         for the suboperation, but don't specify a particular else_value.
7693         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
7694         (visit_nary_op, visit_reference_op_load): Pass
7695         gimple_match_cond::UNCOND to the gimple_match_op constructor.
7696         * gimple-match-head.c: Include tree-eh.h
7697         (convert_conditional_op): New function.
7698         (maybe_resimplify_conditional_op): Likewise.
7699         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
7700         (gimple_resimplify2): Likewise.
7701         (gimple_resimplify3): Likewise.
7702         (gimple_resimplify4): Likewise.
7703         (maybe_push_res_to_seq): Return null for conditional operations.
7704         (try_conditional_simplification): New function.
7705         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
7706         constructor.
7707         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
7708         IFN_COND_* call.
7709         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
7710         function.
7711         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
7713 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
7715         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7716         DECL_FCONTEXT
7717         (hash_tree): Do not hash DECL_FCONTEXT
7718         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
7719         Do not stream DECL_FCONTEXT.
7720         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
7721         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
7723 2018-07-12  Richard Biener  <rguenther@suse.de>
7725         PR debug/86462
7726         * dwarf2out.c (gen_block_die): Only output blocks when they have
7727         at least one !DECL_IGNORED_P variable.
7729 2018-07-12  Richard Biener  <rguenther@suse.de>
7731         PR target/84829
7732         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
7733         Remove -mieee-fp handling.
7735 2018-07-12  Richard Biener  <rguenther@suse.de>
7737         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
7738         left-over from last patch.
7740 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
7742         PR tree-optimization/86492
7743         * gimple-ssa-store-merging.c
7744         (imm_store_chain_info::coalesce_immediate_stores): Call
7745         check_no_overlap even for the merge_overlapping case.  Formatting fix.
7747 2018-07-12  Richard Biener  <rguenther@suse.de>
7749         PR middle-end/86479
7750         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
7751         move possibly trapping operations into the conditional.
7753 2018-07-12  Richard Biener  <rguenther@suse.de>
7755         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
7756         (vn_lookup_simplify_result): Remove recursion limit applied
7757         here.
7758         (vn_nary_build_or_lookup_1): Adjust.
7759         (try_to_simplify): Likewise.
7760         * gimple-match-head.c (gimple_resimplify1): Instead apply one
7761         here.
7762         (gimple_resimplify2): Likewise.
7763         (gimple_resimplify3): Likewise.
7764         (gimple_resimplify4): Likewise.
7766 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
7768         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
7769         Use __mmask64 type instead of __mmask8 for __M argument.
7770         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
7771         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
7772         __U argument.
7773         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
7774         __mmask16 for __M argument.
7775         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
7776         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
7777         to __mmask16 instead of __mmask8.
7778         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
7779         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
7780         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
7781         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
7782         instead of __mmask16 for __U argument.
7783         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
7784         __mmask16 instead of __mmask8 for __U argument.
7785         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
7786         __U argument.
7787         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
7788         __mmask16.
7789         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
7790         argument.
7791         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
7792         __U argument.
7793         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
7794         __mmask16.
7795         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
7796         of __mmask16.
7797         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
7798         __U argument.
7799         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
7800         __U argument.
7801         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
7802         __U argument.
7803         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
7804         __U argument.
7805         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
7806         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
7807         return type as well as __M argument type and all casts from __mmask8
7808         to __mmask32.
7809         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
7810         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
7811         return type as well as __M argument type and all casts from __mmask8
7812         to __mmask16.
7813         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
7814         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
7815         return type as well as __M argument type and all casts from __mmask8
7816         to __mmask32.
7817         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
7818         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
7819         return type as well as __M argument type and all casts from __mmask8
7820         to __mmask16.
7821         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
7822         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
7823         __mmask16.
7825 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
7827         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
7828         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
7829         for __U argument.
7831 2018-07-11  Paul Koning  <ni1d@arrl.net>
7833         * doc/md.texi (define_subst): Document how multiple occurrences of
7834         the same argument in the replacement pattern are handled.
7836 2018-07-11  Paul Koning  <ni1d@arrl.net>
7838         * doc/extend.texi (Common Variable Attributes): Move "mode" into
7839         alphabetical order.
7840         (Common Type Attributes): Add "mode" attribute.
7842 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
7844         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
7845         stream DECL_ORIGINAL_TYPE.
7846         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
7847         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
7848         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
7849         Do not walk original type.
7850         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
7851         external decls.
7852         (write_ts_decl_non_common_tree_pointers): Do not stream
7853         DECL_ORIGINAL_TYPE
7854         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
7855         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
7857 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
7859         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
7860         thread twice from the same starting edge.
7862 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
7864         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
7865         * gimple.c (gimple_call_nonnull_result_p): ...here...
7866         (gimple_call_nonnull_arg): ...and here.
7867         * gimple.h (gimple_call_nonnull_result_p): New.
7868         (gimple_call_nonnull_arg): New.
7870 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
7872         * config/arm/arm-cpus.in: Move information from fpu field of each
7873         cpu definition to the isa field.
7874         * config/arm/parsecpu.awk (fpu): Delete match rule.
7875         (gen_comm_data): Don't add bits from the CPU's FPU entry.
7877 2018-07-11  Richard Biener  <rguenther@suse.de>
7879         PR debug/86457
7880         * dwarf2out.c (init_sections_and_labels): Use
7881         output_asm_line_debug_info consistently.
7882         (dwarf2out_early_finish): Likewise.
7883         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
7884         type units.
7886 2018-07-11  Richard Biener  <rguenther@suse.de>
7888         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
7889         Rework father_bb setting in a way to avoid propagating constants
7890         multiple times on a loop body.
7892 2018-07-10  Mark Wielaard  <mark@klomp.org>
7894         PR debug/86459
7895         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
7897 2018-07-10  Richard Biener  <rguenther@suse.de>
7899         * hash-map.h (hash_map::iterator::operator*): Return
7900         references to key and value.
7902 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
7904         PR c++/86443
7905         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
7906         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
7907         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
7908         (gimplify_omp_for): For composite loops, move outer
7909         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
7910         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
7911         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
7912         TREE_LIST for both the original class iterator and the "last" helper
7913         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
7914         loop, remember has_decl_expr from outer composite loops for the
7915         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
7917 2018-07-09  Martin Sebor  <msebor@redhat.com>
7919         PR middle-end/77357
7920         PR middle-end/86428
7921         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
7922         accessing implicitly initialized array elements.
7923         * expr.c (string_constant): Handle string initializers of
7924         character arrays within aggregates.
7925         * gimple-fold.c (fold_array_ctor_reference): Add argument.
7926         Store element offset.  As a special case, handle zero size.
7927         (fold_nonarray_ctor_reference): Same.
7928         (fold_ctor_reference): Add argument.  Store subobject offset.
7929         * gimple-fold.h (fold_ctor_reference): Add argument.
7931 2018-07-09  Paul Koning  <ni1d@arrl.net>
7933         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
7934         (pdp11_insn_cost): New function.
7935         (pdp11_md_asm_adjust): New function.
7936         (TARGET_INVALID_WITHIN_DOLOOP): Define.
7937         (pdp11_rtx_costs): Update to match machine better.
7938         (output_addr_const_pdp11): Correct format mismatch warnings.
7939         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
7940         * config/pdp11/pdp11.md: General change to add base_cost and/or
7941         length attributes for use by new pdp11_insn_cost function.
7942         (MIN_BRANCH): Correct definition.
7943         (MIN_SOB): Ditto.
7944         (doloop_end): Use standard pattern name for looping pattern.
7945         (doloop_end_nocc): New.
7946         (movsf): Add another constraint alternative.
7947         (zero_extendqihi2): Add constraint alternatives for not in place
7948         extend.
7949         (zero_extendhisi2): Remove.
7950         (shift patterns): Add CC handling variants.
7951         (bswaphi2): New.
7952         (bswapsi2): New.
7953         (rothi3): New.
7954         (define_peephole2): New peephole to recognize mov that sets CC for
7955         subsequent test.
7957 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7959         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
7960         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
7961         wi::add.
7963 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
7965         PR c/86420
7966         * real.c (real_nextafter): Return true if result is denormal.
7968 2018-07-09  Martin Liska  <mliska@suse.cz>
7970         * common.opt: Add back wrongly removed attribute.
7972 2018-07-09  Richard Biener  <rguenther@suse.de>
7974         PR debug/86413
7975         * dwarf2out.c (gen_block_die): For an early generated DIE
7976         always output high/low PC attributes.
7978 2018-07-09  Tom de Vries  <tdevries@suse.de>
7980         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
7981         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
7982         onto VAR_DECL with abstract origin.
7984 2018-07-07  Jim Wilson  <jimw@sifive.com>
7986         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
7988 2018-07-07  Tom de Vries  <tdevries@suse.de>
7990         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
7992 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
7994         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
7995         overflow_type.
7996         (combine_bound): Use wide-int overflow calculation instead of
7997         rolling our own.
7998         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
7999         overflow_type.
8000         * fold-const.c (int_const_binop_2): Same.
8001         (extract_muldiv_1): Same.
8002         (fold_div_compare): Same.
8003         (fold_abs_const): Same.
8004         * match.pd: Same.
8005         * poly-int.h (add): Same.
8006         (sub): Same.
8007         (neg): Same.
8008         (mul): Same.
8009         * predict.c (predict_iv_comparison): Same.
8010         * profile-count.c (slow_safe_scale_64bit): Same.
8011         * simplify-rtx.c (simplify_const_binary_operation): Same.
8012         * tree-chrec.c (tree_fold_binomial): Same.
8013         * tree-data-ref.c (split_constant_offset_1): Same.
8014         * tree-if-conv.c (idx_within_array_bound): Same.
8015         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8016         * tree-ssa-phiopt.c (minmax_replacement): Same.
8017         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8018         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8019         * vr-values.c (vr_values::adjust_range_with_scev): Same.
8020         * wide-int.cc (wi::add_large): Same.
8021         (wi::mul_internal): Same.
8022         (wi::sub_large): Same.
8023         (wi::divmod_internal): Same.
8024         * wide-int.h: Change overflow type to overflow_type for neg, add,
8025         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8026         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8027         mul_internal, divmod_internal.
8028         (overflow_type): New enum.
8029         (accumulate_overflow): New.
8031 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
8033         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8034         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8036 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8038         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8039         argument is checked for zero before entering loop, avoid checking again.
8041 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
8043         * gimplify.h (generic_expr_could_trap_p): Set as global function.
8044         * gimplify.h (generic_expr_could_trap_p): Likwise.
8045         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8047 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
8049         PR tree-optimization/86401
8050         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8051         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8052         (fold_bit_and_mask): ... here.  New helper function for match.pd.
8053         * fold-const.h (fold_bit_and_mask): Declare.
8054         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8056 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
8058         PR target/86324
8059         * target.def (translate_mode_attribute): New hook.
8060         * targhooks.h (default_translate_mode_attribute): Declare.
8061         * targhooks.c (default_translate_mode_attribute): New function.
8062         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8063         * doc/tm.texi: Regenerate.
8064         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8065         (rs6000_translate_mode_attribute): New function.
8067 2018-07-06  Paul Koning  <ni1d@arrl.net>
8069         * doc/md.texi (define_split): Document DONE and FAIL.
8070         (define_peephole2): Ditto.
8072 2018-07-05  Jeff Law  <law@redhat.com>
8074         PR tree-optimization/86010
8075         * tree-ssa-dse.c (compute_trims): More aggressively trim at
8076         both the head and tail of mem* and str* calls.
8078 2018-07-05  Jim Wilson  <jimw@sifive.com>
8080         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8082 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
8084         * config/aarch64/aarch64-simd.md: correct flags text for
8085         MIN_EXPR replacement.
8087 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
8089         * configure: Regenerated.
8091 2018-07-05  Carl Love  <cel@us.ibm.com>
8093         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8094         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8095         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8096         VSX_BUILTIN_DOUBLEL_V4SF.
8098 2018-07-05  Martin Sebor  <msebor@redhat.com>
8100         PR c++/86400
8101         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8102         than its domain to compute its the upper bound of a char array.
8104 2018-07-05  Nathan Sidwell  <nathan@acm.org>
8106         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8107         * doc/cpp.texi: Update comment.
8108         * doc/tm.texi: Rebuilt.
8109         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8110         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8111         * doc/extend.texi (Backwards Compatibility): Clarify it is system
8112         headers affected by extern "C".
8113         * system.h: Poison NO_IMPLICIT_EXTERN_C.
8114         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8115         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8116         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8117         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8118         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8119         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8120         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8121         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8122         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8123         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8124         config/sparc/sp64-elf.h, config/spu/spu.h,
8125         config/stormy16/stormy16.h, config/v850/v850.h,
8126         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8127         define NO_IMPLICIT_EXTERN_C.
8128         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8130 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8132         PR target/84711
8133         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8134         instead of GET_MODE_SIZE when comparing Units.
8136 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8138         PR target/84711
8139         * rtlanal.c (set_noop_p): Constrain on mode change,
8140         include hard-reg-set.h
8142 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
8144         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8146 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
8148         Revert
8149         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8151         PR sanitizer/84250
8152         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8153         libasan.
8154         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8156 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
8158         PR sanitizer/84250
8159         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8160         libasan.
8161         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8163 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
8165         PR middle-end/86380
8166         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
8168 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
8170         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
8171         neg_*_op* variables.
8173 2018-07-04  Martin Liska  <mliska@suse.cz>
8175         * tree-switch-conversion.c: Define
8176         max_ratio_for_speed and max_ratio_for_size constants.
8178 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
8179             Martin Liska  <mliska@suse.cz>
8181         PR middle-end/66240
8182         PR target/45996
8183         PR c/84100
8184         * common.opt: Rename align options with 'str_' prefix.
8185         * common/config/i386/i386-common.c (set_malign_value): New
8186         function.
8187         (ix86_handle_option): Use it to set -falign-* options/
8188         * config/aarch64/aarch64-protos.h (struct tune_params): Change
8189         type from int to string.
8190         * config/aarch64/aarch64.c: Update default values from int
8191         to string.
8192         * config/alpha/alpha.c (alpha_override_options_after_change):
8193         Likewise.
8194         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
8195         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8196         max skip conditionally.
8197         * config/i386/freebsd.h (SUBALIGN_LOG): New.
8198         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8199         max skip conditionally.
8200         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8201         max skip conditionally.
8202         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
8203         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8204         max skip conditionally.
8205         * config/i386/i386.c (struct ptt): Change type from int to
8206         string.
8207         (ix86_default_align): Set default values.
8208         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
8209         max skip conditionally.
8210         * config/i386/iamcu.h (SUBALIGN_LOG): New.
8211         (ASM_OUTPUT_MAX_SKIP_ALIGN):
8212         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
8213         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8214         max skip conditionally.
8215         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
8216         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
8217         * config/i386/x86-64.h (SUBALIGN_LOG): New.
8218         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8219         max skip conditionally.
8220         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8221         * config/ia64/ia64.c (ia64_option_override): Set default values
8222         for alignment options.
8223         * config/m68k/m68k.c: Handle new str_align_* options.
8224         * config/mips/mips.c (mips_set_compression_mode): Change
8225         type of constants.
8226         (mips_option_override): Set default values for options.
8227         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8228         Likewise.
8229         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8230         Likewise.
8231         * config/rx/rx.c (rx_option_override): Likewise.
8232         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
8233         (LABEL_ALIGN): Use align_labels_log.
8234         (LOOP_ALIGN): Use align_loops_align.
8235         * config/s390/s390.c (s390_asm_output_function_label): Use new
8236         macros.
8237         * config/sh/sh.c (sh_override_options_after_change):
8238         Change type of constants.
8239         * config/spu/spu.c (spu_sched_init): Likewise.
8240         * config/sparc/sparc.c (sparc_option_override): Set default
8241         values for options.
8242         * config/visium/visium.c (visium_option_override): Likewise.
8243         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
8244         emit p2align format with last argument if it's not needed.
8245         * doc/invoke.texi: Document extended format of -falign-*.
8246         * final.c: Use align_labels alignment.
8247         * flags.h (struct target_flag_state): Change type to use
8248         align_flags.
8249         (struct align_flags_tuple): New.
8250         (struct align_flags): Likewise.
8251         (align_loops_log): Redefine macro to use new types.
8252         (align_loops_max_skip): Redefine macro to use new types.
8253         (align_jumps_log): Redefine macro to use new types.
8254         (align_jumps_max_skip): Redefine macro to use new types.
8255         (align_labels_log): Redefine macro to use new types.
8256         (align_labels_max_skip): Redefine macro to use new types.
8257         (align_functions_log): Redefine macro to use new types.
8258         (align_loops): Redefine macro to use new types.
8259         (align_jumps): Redefine macro to use new types.
8260         (align_labels): Redefine macro to use new types.
8261         (align_functions): Redefine macro to use new types.
8262         (align_functions_max_skip): Redefine macro to use new types.
8263         (align_loops_value): New macro.
8264         (align_jumps_value): New macro.
8265         (align_labels_value): New macro.
8266         (align_functions_value): New macro.
8267         * function.c (invoke_set_current_function_hook): Propagate
8268         alignment values from flags to global variables default in
8269         topleev.h.
8270         * ipa-icf.c (sem_function::equals_wpa): Use
8271         cl_optimization_option_eq instead of memcmp.
8272         * lto-streamer.h (cl_optimization_stream_out): Support streaming
8273         of string types.
8274         (cl_optimization_stream_in): Likewise.
8275         * optc-save-gen.awk: Support strings in cl_optimization.
8276         * opth-gen.awk: Likewise.
8277         * opts.c (finish_options): Remove error checking of invalid
8278         value ranges.
8279         (MAX_CODE_ALIGN): Remove.
8280         (MAX_CODE_ALIGN_VALUE): Likewise.
8281         (parse_and_check_align_values): New function.
8282         (check_alignment_argument): Likewise.
8283         (common_handle_option): Use check_alignment_argument.
8284         * opts.h (parse_and_check_align_values): Declare.
8285         * toplev.c (init_alignments): Remove.
8286         (read_log_maxskip): New.
8287         (parse_N_M): Likewise.
8288         (parse_alignment_opts): Likewise.
8289         (backend_init_target): Remove usage of init_alignments.
8290         * toplev.h (parse_alignment_opts): Declare.
8291         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
8292         argument.
8293         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
8294         * tree.c (cl_option_hasher::equal): New.
8295         * varasm.c: Use new global macros.
8297 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
8299         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
8300         Use a simpler align directive also if MAXSKIP = ALIGN-1.
8301         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8302         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8303         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8304         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8305         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
8306         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
8307         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
8308         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8309         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8310         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8311         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8313 2018-07-04  Martin Liska  <mliska@suse.cz>
8314             Jonathan Wakely  <jwakely@redhat.com>
8316         * coverage.c: Use correct type.
8317         * doc/invoke.texi: Language correction.
8319 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
8321         PR target/85620
8322         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
8323         ENDBRANCH for non-tail call which may return via indirect branch.
8324         * doc/extend.texi: Document indirect_return attribute.
8326 2018-07-03  Martin Sebor  <msebor@redhat.com>
8328         PR tree-optimization/86274
8329         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
8330         precondition.
8331         (format_floating): Correct handling of infinities and NaNs.
8333 2018-07-03  Martin Sebor  <msebor@redhat.com>
8335         * print-tree.c (print_real_cst): New function.
8336         (print_node_brief): Call it.
8337         (print_node): Ditto.
8339 2018-07-03  Jeff Law  <law@redhat.com>
8341         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
8342         into a single pattern.
8344         * config/h8300/h8300.md (ors code_iterator): New.
8345         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
8346         a single pattern and single splitter.
8347         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
8348         (iorqi3_1, xorqi3_1): Likewise.
8349         (iorqi3, xorqi3 expanders): Similarly.
8351         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
8352         (movmd_internal) into a single pattern using the P mode iterator.
8353         (movmd splitters): Similarly.
8354         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
8355         (movsd splitters): Similarly.
8357         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
8358         ADDB, ADDW and ADDL into a single ADD attribute which selects the
8359         right table based on the size of the operand.
8360         * config/h8300/h8300.md (length_table): Corresponding changes. All
8361         references to "addb", "addw" and "addl" changed to "add".
8362         (btst patterns): Merge two variants into a single pattern.
8363         (tstqi, tsthi): Likewise.
8364         (addhi3_incdec, addsi3_incdec): Likewise.
8365         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
8366         (mulhi3, mulsi3): Likewise.
8367         (udivhi3, udivsi3): Likewise.
8368         (divhi3, divsi3): Likewise.
8369         (andorqi3, andorhi3, andorsi3): Likewise.
8371 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
8373         PR target/85694
8374         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
8375         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
8377 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8379         PR tree-optimization/85694
8380         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
8381         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
8382         UNSPEC_URHADD.
8383         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
8384         (<u>avg<mode>3_ceil): New patterns.
8386 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
8388         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
8389         scan-tree-dump directive.
8390         * gcc.dg/vect/slp-perm-2.c: Likewise.
8391         * gcc.dg/vect/slp-perm-3.c: Likewise.
8392         * gcc.dg/vect/slp-perm-5.c: Likewise.
8393         * gcc.dg/vect/slp-perm-6.c: Likewise.
8394         * gcc.dg/vect/slp-perm-7.c: Likewise.
8395         * gcc.dg/vect/slp-perm-8.c: Likewise.
8397 2018-07-03  Marek Polacek  <polacek@redhat.com>
8399         PR middle-end/86202
8400         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
8402 2018-07-03  Richard Biener  <rguenther@suse.de>
8404         PR ipa/86389
8405         * tree-ssa-structalias.c (find_func_clobbers): Properly
8406         handle indirect calls.
8408 2018-07-03  Jeff Law  <law@redhat.com>
8410         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
8411         (shifts): New code iterator.
8412         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
8413         expander.  Fix HImode handling on H8/SX.
8414         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
8415         (subqi3, subhi3, subsi3 expanders): Likewise.
8416         (andqi3, andhi3, andsi3 expanders): Likewise.
8417         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
8418         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
8419         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
8420         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
8421         (zero_extendqihi2, zero_extendqisi2): Likewise.
8422         (extendqihi2, extendqisi2): Likewise.
8423         (rotlqi3, rotlhi3, rotlsi3): Likewise.
8424         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
8425         (rotlqi3_1, rotlhi3_1): Likewise.
8426         (logicalhi3_sn, logicalsi3_sn): Likewise.
8427         (logicalhi3, logicalsi3): Likewise.
8429 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8431         * tree-vect-patterns.c (vect_recog_rotate_pattern)
8432         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
8433         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
8434         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
8435         type to append_pattern_def_seq instead of creating a stmt_vec_info
8436         directly.
8437         (build_mask_conversion): Likewise.  Remove vinfo argument.
8438         (vect_add_conversion_to_patterm): Likewise, renaming to...
8439         (vect_add_conversion_to_pattern): ...this.
8440         (vect_recog_mask_conversion_pattern): Update call to
8441         build_mask_conversion.  Pass the vector type to
8442         append_pattern_def_seq here too.
8443         (vect_recog_gather_scatter_pattern): Update call to
8444         vect_add_conversion_to_pattern.
8446 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8448         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
8449         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8450         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
8451         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
8452         STMT_VINFO_PATTERN_DEF_SEQ to null here.
8453         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
8454         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
8455         append_pattern_def_seq instead of new_pattern_def_seq.
8456         (vect_recog_divmod_pattern): Do both of the above.
8457         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
8458         is null.
8460 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8462         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
8463         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
8464         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
8465         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
8466         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
8467         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
8468         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
8469         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8470         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8471         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
8472         parameter with a single stmt_vec_info.
8473         (vect_recog_func_ptr): Likewise.
8474         (vect_recog_gather_scatter_pattern): Likewise, folding in...
8475         (vect_try_gather_scatter_pattern): ...this.
8476         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
8477         the stmt_vec_info of the statement to be matched.  Don't clear
8478         STMT_VINFO_RELATED_STMT.
8479         (vect_pattern_recog): Update call accordingly.
8481 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8483         PR tree-optimization/85694
8484         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
8485         (uavgM3_ceil): Document new optabs.
8486         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
8487         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
8488         functions.
8489         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
8490         (savg_ceil_optab): New optabs.
8491         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
8492         (vect_vect_recog_func_ptrs): Add it.
8493         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
8494         constant directly from the associated lhs.
8496 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8498         * tree-vect-patterns.c (vect_split_statement): New function.
8499         (vect_convert_input): Use it to try to split an existing cast.
8501 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8503         * poly-int.h (print_hex): New function.
8504         * dumpfile.h (dump_dec, dump_hex): Declare.
8505         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
8506         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
8507         min_input_precision, operation_precision and operation_sign.
8508         * tree-vect-patterns.c (vect_get_range_info): New function.
8509         (vect_same_loop_or_bb_p, vect_single_imm_use)
8510         (vect_operation_fits_smaller_type): Delete.
8511         (vect_look_through_possible_promotion): Add an optional
8512         single_use_p parameter.
8513         (vect_recog_over_widening_pattern): Rewrite to use new
8514         stmt_vec_info infomration.  Handle one operation at a time.
8515         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
8516         (vect_truncatable_operation_p, vect_set_operation_type)
8517         (vect_set_min_input_precision): New functions.
8518         (vect_determine_min_output_precision_1): Likewise.
8519         (vect_determine_min_output_precision): Likewise.
8520         (vect_determine_precisions_from_range): Likewise.
8521         (vect_determine_precisions_from_users): Likewise.
8522         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
8523         (vect_vect_recog_func_ptrs): Put over_widening first.
8524         Add cast_forwprop.
8525         (vect_pattern_recog): Call vect_determine_precisions.
8527 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
8529         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
8530         statements that have been replaced by further pattern statements.
8531         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
8533 2018-07-03  Richard Biener  <rguenther@suse.de>
8535         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
8536         always set *dt.  Dump vectype in vectype overload.
8537         * dumpfile.h (dump_gimple_expr): New function.
8538         (dump_gimple_expr_loc): Likewise.
8539         * dumpfile.c (dump_gimple_expr): New function.
8540         (dump_gimple_expr_loc): Likewise.
8542 2018-07-02  Jeff Law  <law@redhat.com>
8544         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
8545         the H8/300, H8/300H and H8/S variants into a single pattern.
8546         (movhi_h8300, movqi_h8300hs): Similarly.
8547         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
8548         (QHI mode iterator): New.
8550         * config/h8300/h8300.md: Remove trailing whitespace.
8552 2018-07-02  Jim Wilson  <jimw@sifive.com>
8554         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
8555         instead of emit_insn for interrupt returns.
8556         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
8557         (riscv_sret, riscv_uret): Likewise.
8559 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
8561         * pretty-print.c (selftest::test_pp_format): Move save and restore
8562         of quotes to class auto_fix_quotes, and add an instance.
8563         * selftest.c: Include "intl.h".
8564         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
8565         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
8566         * selftest.h (selftest::auto_fix_quotes): New class.
8568 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
8570         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
8571         (aarch64_sve_prepare_conditional_op): Remove.
8572         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
8573         Allow aarch64_simd_reg_or_zero as select operand; remove
8574         the aarch64_sve_prepare_conditional_op call.
8575         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
8576         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
8577         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
8578         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
8579         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
8580         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
8581         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
8582         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
8583         and a splitters to match all of the *_any patterns.
8584         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
8586         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
8587         (SVE_COND_FP_BINARY_REV): Remove.
8588         (sve_int_op_rev, sve_fp_op_rev): New.
8589         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
8590         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
8591         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
8592         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
8593         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
8594         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
8595         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
8596         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
8597         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
8599         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
8600         Remove match_dup 1 from the inner unspec.
8601         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
8603         * config/aarch64/aarch64.md (movprfx): New attr.
8604         (length): Default movprfx to 8.
8605         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
8606         (*madd<SVE_I>, *msub<SVE_I): Likewise.
8607         (*<su>mul<SVE_I>3_highpart): Likewise.
8608         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
8609         (*v<ASHIFT><SVE_I>3): Likewise.
8610         (*<su><MAXMIN><SVE_I>3): Likewise.
8611         (*<su><MAXMIN><SVE_F>3): Likewise.
8612         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
8613         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
8614         (*div<SVE_F>4): Likewise.
8616 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
8618         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
8619         in dump string.
8621 2018-07-02  Richard Biener  <rguenther@suse.de>
8623         PR tree-optimization/86363
8624         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
8625         memset argument refers to a non-variable address.
8627 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
8629         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
8630         {PLUS,MINUS}_EXPR code to...
8631         (adjust_symbolic_bound): ...here,
8632         (combine_bound): ...here,
8633         (set_value_range_with_overflow): ...and here.
8635 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
8637         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
8638         code...
8639         (extract_range_from_abs_expr): ...here.
8641 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
8643         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
8644         -fno-omit-frame-pointer when not optimizing.
8646 2018-07-02  Martin Liska  <mliska@suse.cz>
8648         PR ipa/86279
8649         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
8650         (propagate_nothrow): Likewise.
8652 2018-07-02  Martin Liska  <mliska@suse.cz>
8654         PR ipa/86323
8655         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
8657 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
8659         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
8660         function in r262149, changing "loc" param from source_location to
8661         const dump_location_t &.
8662         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
8663         declaration, as above.
8665 2018-07-01  Paul Koning  <ni1d@arrl.net>
8667         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
8668         -munit-asm, -mgnu-asm, -mdec-asm.
8669         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
8670         (pdp11_output_labelref): New.
8671         (pdp11_output_def): New.
8672         (pdp11_output_addr_vec_elt): New.
8673         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
8674         %# and %@ format codes.
8675         (pdp11_option_override): New.
8676         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
8677         (pdp11_output_ident): New.
8678         (pdp11_asm_named_section): New.
8679         (pdp11_asm_init_sections): New.
8680         (pdp11_file_start): New.
8681         (pdp11_file_end): New.
8682         (output_ascii): Use .ascii/.asciz for -mdec-asm.
8683         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
8684         %o, like %c but octal.
8685         (pdp11_option_override): New.
8686         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
8687         -mdec-asm.
8688         (DATA_SECTION_ASM_OP): Ditto.
8689         (READONLY_DATA_SECTION_ASM_OP): New.
8690         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
8691         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
8692         (ASM_OUTPUT_LABELREF): Ditto.
8693         (ASM_OUTPUT_DEF): Ditto.
8694         (ASM_OUTPUT_EXTERNAL): New.
8695         (ASM_OUTPUT_SOURCE_FILENAME): New.
8696         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
8697         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
8698         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
8699         %# and %@ format codes.
8700         * config/pdp11/pdp11.opt (mgnu-asm): New.
8701         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
8702         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
8703         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
8705 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
8707         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
8708         dereferencing path[] beyond its length.
8709         (debug_path): New.
8710         (debug_all_paths): New.
8711         (rewire_first_differing_edge): New.
8712         (adjust_paths_after_duplication): New.
8713         (duplicate_thread_path): Call adjust_paths_after_duplication.
8714         Add new argument.
8715         (thread_through_all_blocks): Add new argument to
8716         duplicate_thread_path.
8718 2018-06-30  Jim Wilson  <jimw@sifive.com>
8720         * config/riscv/predicates.md (p2m1_shift_operand): New.
8721         (high_mask_shift_operand): New.
8722         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
8723         pattern using p2m1_shift_operand.
8724         (lshsi3_zero_extend_3+2): New combiner pattern using
8725         high_mask_shift_operand.
8727 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8729         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
8730         split out from...
8731         (vect_recog_rotate_pattern): ...here.
8732         (vect_convert_input): Try to insert casts of invariants in the
8733         preheader.
8734         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
8735         preheader to be empty.
8737 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8739         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
8740         vector type.  If given, install it in the new statement's
8741         STMT_VINFO_VECTYPE.
8742         (vect_element_precision): New function.
8743         (vect_unpromoted_value): New struct.
8744         (vect_unpromoted_value::vect_unpromoted_value): New function.
8745         (vect_unpromoted_value::set_op): Likewise.
8746         (vect_look_through_possible_promotion): Likewise.
8747         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
8748         (vect_widened_op_tree, vect_convert_input): Likewise.
8749         (vect_convert_inputs, vect_convert_output): Likewise.
8750         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
8751         to handle the optional cast of the multiplication result and
8752         vect_widened_op_tree to detect the widened multiplication itself.
8753         Do not require the input and output of promotion casts to have
8754         the same sign, but base the signedness of the operation on the
8755         input rather than the result.  If the pattern includes two
8756         promotions, check that those promotions have the same sign.
8757         Do not restrict the MULT_EXPR handling to a double-width result;
8758         handle quadruple-width results and wider.  Use vect_convert_inputs
8759         to convert the inputs to the common type.
8760         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
8761         to handle the optional cast of the ABS result.  Also allow a sign
8762         change or a sign extension between the ABS and MINUS.
8763         Use vect_widened_op_tree to detect the widened subtraction and use
8764         vect_convert_inputs to convert the inputs to the common type.
8765         (vect_handle_widen_op_by_const): Delete.
8766         (vect_recog_widen_op_pattern): New function.
8767         (vect_recog_widen_mult_pattern): Use it.
8768         (vect_recog_widen_shift_pattern): Likewise.
8769         (vect_recog_widen_sum_pattern): Use
8770         vect_look_through_possible_promotion to handle the promoted
8771         PLUS_EXPR operand.
8773 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8775         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
8776         the containing gimple_seq *.
8777         * gimple-iterator.h (gsi_for_stmt): Declare it.
8778         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
8779         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
8780         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
8781         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
8782         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
8783         checks.
8784         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
8785         split out from...
8786         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
8787         statement being replaced is part of an existing pattern
8788         definition sequence, inserting the new pattern statements before
8789         the original one.
8790         (vect_pattern_recog_1): Don't return a bool.  If the statement
8791         is already part of a pattern, instead apply pattern matching
8792         to the pattern definition statements.  Don't clear the
8793         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
8794         (vect_pattern_recog): Don't break after the first match;
8795         continue processing the pattern definition statements instead.
8796         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
8798 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8800         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
8801         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8802         (vect_recog_widen_sum_pattern): Use it.
8804 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8806         * tree-vect-loop.c (vectorizable_reduction): Assert that the
8807         phi is not a pattern statement and has not been replaced by
8808         a pattern statement.
8809         * tree-vect-patterns.c (type_conversion_p): Don't check
8810         STMT_VINFO_IN_PATTERN_P.
8811         (vect_recog_vector_vector_shift_pattern): Likewise.
8812         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
8813         the pattern statement rather than the original statement; check
8814         directly for a WIDEN_MULT_EXPR here.
8815         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
8816         vect_is_simple_use to return the pattern statement rather
8817         than the original statement; use is_pattern_stmt_p to check
8818         for such a pattern statement.
8819         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
8820         to return the pattern statement rather than the original statement;
8821         don't do the same transformation here.
8822         (vect_is_simple_use): If the defining statement has been replaced
8823         by a pattern statement, return the pattern statement instead.
8824         Remove the corresponding (local) transformation from the vectype
8825         overload.
8827 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
8829         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
8830         end and default to null.
8831         * tree-vect-loop.c (vect_create_epilog_for_reduction)
8832         (vectorizable_reduction): Update calls accordingly, dropping the
8833         gimple ** argument if the passed-back statement isn't needed.
8834         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
8835         (vect_recog_rotate_pattern): Likewise.
8836         (vect_recog_mask_conversion_pattern): Likewise.
8837         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8838         (vect_mask_constant_operand_p): Likewise.
8839         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
8840         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
8841         (get_group_load_store_type, get_load_store_type): Likewise.
8842         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
8843         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
8844         (vectorizable_conversion, vectorizable_assignment): Likewise.
8845         (vectorizable_shift, vectorizable_operation): Likewise.
8846         (vectorizable_store, vect_is_simple_cond): Likewise.
8847         (vectorizable_condition, vectorizable_comparison): Likewise.
8848         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
8849         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
8850         and move it to the end.  Cope with null def_stmt_outs.
8852 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8854         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
8856 2018-06-29  Jeff Law  <law@redhat.com>
8858         * config/v850/v850.c (v850_legitimate_address_p): Handle large
8859         displacements for TARGET_V850E2V3 and newer.
8860         (TARGET_LRA_P): Remove.  Defaults to LRA now.
8861         * config/v850/v850.md (sign23byte_load): Remove.
8862         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
8863         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
8865 2018-06-29  Martin Liska  <mliska@suse.cz>
8867         PR lto/85759
8868         * coverage.c (coverage_init): Mangle full path name.
8869         * doc/invoke.texi: Document the change.
8870         * gcov-io.c (mangle_path): New.
8871         * gcov-io.h (mangle_path): Likewise.
8872         * gcov.c (mangle_name): Use mangle_path for path mangling.
8874 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8876         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
8877         if starting source register is not even.
8879 2018-06-29  Martin Liska  <mliska@suse.cz>
8881         PR tree-optimization/86263
8882         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
8883         Make edge redirection.
8885 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
8887         * dumpfile.c (dump_loc): Add indentation based on scope depth.
8888         (dump_scope_depth): New variable.
8889         (get_dump_scope_depth): New function.
8890         (dump_begin_scope): New function.
8891         (dump_end_scope): New function.
8892         * dumpfile.h (get_dump_scope_depth): New declaration.
8893         (dump_begin_scope): New declaration.
8894         (dump_end_scope): New declaration.
8895         (class auto_dump_scope): New class.
8896         (AUTO_DUMP_SCOPE): New macro.
8897         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
8898         AUTO_DUMP_SCOPE.
8900 2018-06-29  Richard Biener  <rguenther@suse.de>
8902         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
8903         compute_all_dependences succeeds.
8904         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
8905         exceed --param loop-max-datarefs-for-datadeps.
8907 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
8909         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
8911 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
8913         PR target/86348
8914         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
8915         alternative 0 in preferred_for_speed attribute.
8917 2018-06-28  Paul Koning  <ni1d@arrl.net>
8919         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
8920         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
8921         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
8922         * config/pdp11/pdp11.md: Correct "length" attribute calculation
8923         for shift insn patterns.
8925 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
8927         * cgraph.c (cgraph_node::get_body): Replace assignments to
8928         "dump_file" with calls to set_dump_file.
8929         * dumpfile.c (alt_dump_file): Make static, and group with...
8930         (alt_flags): ...this definition.
8931         (dumps_are_enabled): New variable.
8932         (refresh_dumps_are_enabled): New function.
8933         (set_dump_file): New function.
8934         (set_alt_dump_file): New function.
8935         (gcc::dump_manager::dump_start): Replace assignments to
8936         "dump_file" and "alt_dump_file" with calls to set_dump_file and
8937         set_alt_dump_file.
8938         (gcc::dump_manager::dump_finish): Likewise.
8939         * dumpfile.h (alt_dump_file): Delete decl.
8940         (dumps_are_enabled): New variable decl.
8941         (set_dump_file): New function decl.
8942         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
8943         global.
8944         * tree-nested.c (lower_nested_functions): Replace assignments to
8945         "dump_file" with calls to set_dump_file.
8947 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
8949         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
8950         goto_locus of each outgoing edge of each basic block.
8952 2018-06-28  Richard Biener  <rguenther@suse.de>
8954         * dwarf2out.c (decl_scope_table): Remove.
8955         (push_decl_scope): Likewise.
8956         (pop_decl_scope): Likewise.
8957         (gen_type_die_for_member): Do not call push/pop_decl_scope.
8958         (gen_struct_or_union_type_die): Likewise.
8959         (gen_tagged_type_die): Likewise.
8960         (dwarf2out_init): Do not initialize decl_scope_table.
8961         (dwarf2out_c_finalize): Do not free it.
8963 2018-06-28  Richard Biener  <rguenther@suse.de>
8965         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
8966         deciding whether to not re-use a DIE.
8968 2018-06-28  Richard Biener  <rguenther@suse.de>
8970         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
8971         DW_AT_abstract_origin attribute.
8973 2018-06-28  Martin Liska  <mliska@suse.cz>
8975         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8976         Use newly introduced constants.
8977         * tree-switch-conversion.h (struct jump_table_cluster):
8978         Define max_ratio_for_size and max_ratio_for_speed.
8980 2018-06-28  Martin Liska  <mliska@suse.cz>
8982         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8983         Add new checking assert to catch invalid state.
8984         (jump_table_cluster::can_be_handled): Handle single case
8985         clusters.
8986         (jump_table_cluster::is_beneficial): Bail out for such case.
8987         (bit_test_cluster::find_bit_tests):
8988         Add new checking assert to catch invalid state.
8989         (bit_test_cluster::can_be_handled): Handle single case
8990         clusters.
8991         (bit_test_cluster::is_beneficial): Bail out for such case.
8992         (switch_decision_tree::analyze_switch_statement):
8993         Fix comment.
8995 2018-06-28  Martin Liska  <mliska@suse.cz>
8997         * common.opt: Introduce -completion option.
8998         * gcc.c (driver_handle_option): Handle it.
8999         (driver::main): Print completions if completion
9000         is set.
9001         * opt-suggestions.c (option_proposer::get_completions):
9002         New function.
9003         (option_proposer::suggest_completion): Likewise.
9004         (option_proposer::find_param_completions): Likewise.
9005         (verify_autocompletions): Likewise.
9006         (test_completion_valid_options): Likewise.
9007         (test_completion_valid_params): Likewise.
9008         (in_completion_p): Likewise.
9009         (empty_completion_p): Likewise.
9010         (test_completion_partial_match): Likewise.
9011         (test_completion_garbage): Likewise.
9012         (opt_proposer_c_tests): Likewise.
9013         * opt-suggestions.h: Declare new functions.
9014         * opts.c (common_handle_option): Handle OPT__completion_.
9015         * selftest-run-tests.c (selftest::run_tests): Add
9016         opt_proposer_c_tests.
9017         * selftest.c (assert_str_startswith): New.
9018         * selftest.h (assert_str_startswith): Likewise.
9019         (opt_proposer_c_tests): New.
9020         (ASSERT_STR_STARTSWITH): Likewise.
9022 2018-06-28  Martin Liska  <mliska@suse.cz>
9024         * Makefile.in: Add opt-suggestions.o.
9025         * gcc-main.c: Include opt-suggestions.h.
9026         * gcc.c (driver::driver): Likewise.
9027         (driver::~driver): Remove m_option_suggestions.
9028         (driver::build_option_suggestions): Moved to option_proposer.
9029         (driver::suggest_option): Likewise.
9030         (driver::handle_unrecognized_options): Use option_proposer.
9031         * gcc.h (class driver): Add new memver m_option_proposer.
9032         * opt-suggestions.c: New file.
9033         * opt-suggestions.h: New file.
9035 2018-06-28  Martin Liska  <mliska@suse.cz>
9037         * vec.h (class auto_string_vec): New (moved from auto_argvec).
9038         (auto_string_vec::~auto_string_vec): Likewise.
9040 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
9042         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9043         prevent_decl_creation_for_types fields up and add reset_location field.
9044         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9045         statement if id->reset_location is true.
9046         (copy_edges_for_bb): Do not set goto_locus on the new edges if
9047         id->reset_location is true.
9048         (copy_phis_for_bb): Force input_location on the arguments if
9049         id->reset_location is true.
9050         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9051         is set on the function to be inlined.
9053 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
9055         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9057 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
9059         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9060         registers for Pmode.
9061         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9062         hard registers for the clobbered pseudo.
9064 2018-06-27  Paul Koning  <ni1d@arrl.net>
9066         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9067         mutually exclusive options.
9068         * config/pdp11/constraints.md (h): New constraint.
9069         (O): Update definition to match shift code generation.
9070         (D): New constraint.
9071         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9072         (CCFP): Remove.
9073         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9074         function.
9075         (output_jump): Change arguments.
9076         (pdp11_fixed_cc_regs): New function.
9077         (pdp11_cc_mode): Ditto.
9078         (pdp11_expand_shift): Ditto.
9079         (pdp11_assemble_shift): Ditto.
9080         (pdp11_small_shift): Ditto.
9081         (pdp11_branch_cost): Remove.
9082         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9083         from output.
9084         (pdp11_register_move_cost): Update for CC registers.
9085         (pdp11_rtx_costs): Add case for LSHIFTRT.
9086         (pdp11_output_jump): Add CCNZ mode conditional branches.
9087         (notice_update_cc_on_set): Remove.
9088         (pdp11_cc_mode): New function.
9089         (simple_memory_operand): Correct pre/post decrement case.
9090         (no_side_effect_operand): New function.
9091         (pdp11_regno_reg_class): Add CC_REGS class.
9092         (pdp11_fixed_cc_regs): New function.
9093         (pdp11_small_shift): New function.
9094         (pdp11_expand_shift): New function to expand shift insns.
9095         (pdp11_assemble_shift): New function to output shifts.
9096         (pdp11_branch_cost): Remove.
9097         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9098         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9099         (WCHAR_TYPE): Ditto.
9100         (PTRDIFF_TYPE): Ditto.
9101         (ADJUST_INSN_LENGTH): New macro.
9102         (FIXED_REGISTERS): Add CC registers.
9103         (CALL_USED_REGISTERS): Ditto.
9104         (reg_class): Ditto.
9105         (REG_CLASS_NAMES): Ditto.
9106         (REG_CLASS_CONTENTS): Ditto.
9107         (SELECT_CC_MODE): Use new function.
9108         (TARGET_FLAGS_REGNUM): New macro.
9109         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9110         (cc0_reg_rtx): Remove.
9111         (CC_STATUS_MDEP): Remove.
9112         (CC_STATUS_MDEFP_INIT): Remove.
9113         (CC_IN_FPU): Remove.
9114         (NOTICE_UPDATE_CC): Remove.
9115         (REGISTER_NAMES): Add CC registers.
9116         (BRANCH_COST): Change to constant 1.
9117         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9118         handling.
9119         * config/pdp11/pdp11.opt (mbcopy): Remove.
9120         (mbcopy-builtin): Remove.
9121         (mbranch-cheap): Remove.
9122         (mbranch-expensive): Remove.
9123         * config/pdp11/predicates.md (expand_shift_operand): Update to
9124         match shift code generation.
9125         (ccnz_operator): New predicate.
9126         * doc/invoke.texi (PDP-11 Options): Remove deleted options
9127         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9128         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
9129         exclusive options.
9130         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
9131         description of O constraint.
9133 2018-06-27  Jeff Law  <law@redhat.com>
9134             Austin Law  <austinklaw@gmail.com>
9136         * config/v850/v850.md (addsi3_set_flags): New pattern.
9137         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9138         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9139         (zero_extendhisi2_v850_set_flags): Likewise.
9140         (zero_extendqisi2_v850_set_flags): Likewise.
9141         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9142         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9143         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9145         * config/v850/v850-protos.h (notice_update_cc): Remove.
9146         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9147         (v850_print_operand): Handle 'D' and "d".
9148         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9149         Add handling of arithmetic/logical operations compared against zero.
9150         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9151         Do not look at v850_compare_op, instead get mode from last argument.
9152         (v850_gen_compare): Remove
9153         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
9154         after reload for prologue insns.
9155         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
9156         patterns.
9157         (construct_save_jarl): Likewise.
9158         (TARGET_FLAGS_REGNUM): Define.
9159         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
9160         (NOTICE_UPDATE_CC): Remove.
9161         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
9162         than cc0.  Conditionalize on reload_completed.
9163         (cmpsi_insn, setfcc_insn): Likewise.
9164         (tst1 splitter): Turn into define_and_split which sets the flags
9165         after reload.
9166         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
9167         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
9168         (cstoresf4, cstoredf4): Clobber the flags.
9169         (cmpsi, cmpsf, cmpdf): Remove expanders.
9170         (setf_insn): Remove pattern.
9171         (addsi3): Turn into define_and_split which clobbers the flags after
9172         reload and a suitable pattern (addsi3_clobber_flags) for use after
9173         reload.
9174         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
9175         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
9176         (ashrsi3, ashrsi3_v850e2): Likewise.
9177         (bins): Clobber the flags.
9178         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
9179         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
9180         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
9181         (call_value_internal_short, call_value_internal_long): Likewise.
9182         (callt_save_interrupt, callt_return_interrupt): Likewise.
9183         (save_interrupt, return_interrupt): Likewise.
9184         (callt_save_all_interrupt, save_all_interrupt): Likewise.
9185         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
9186         (restore_all_interrupt, _restore_all_interrupt): Likewise.
9187         (All FP comparisons): Only allow after reload has completed.
9188         (trfsr): Likewise.
9189         (divh, divhu): Tweak output template.
9190         (branch_z_normal, branch_z_invert): Remove
9191         (branch_nz_normal, branch_nz_invert): Likewise.
9192         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
9194         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
9195         * config/v850/v850.c (notice_update_cc): Remove.
9196         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
9197         (CC_NO_CARRY): Likewise.
9198         (NOTICE_UPDATE_CC): Define to nothing.
9199         * config/v850/v850.md: Remove block comment on cc0 handling
9200         Remove "cc" attribute from all patterns.  Remove cc_status handling
9201         from all patterns.  Minor formatting fixes.
9203 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9205         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
9206         (cortex-a76.cortex-a55): Likewise.
9207         * config/aarch64/aarch64-tune.md: Regenerate.
9208         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
9209         cortex-a76.cortex-a55.
9211 2018-06-27  Jeff Law  <law@redhat.com>
9213         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
9214         (MULTILIB_DIRNAMES): Similarly.
9216 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
9218         * gimple.h (gimple_return_retbnd): Delete.
9219         (gimple_return_set_retbnd): Likewise.
9220         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
9221         gimple_return_set_retbnd.
9222         * gimple-pretty-print.c (dump_gimple_return): Remove call to
9223         gimple_return_retbnd and adjust.
9224         * tree-inline.h (struct copy_body_data): Remove retbnd field.
9225         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
9226         Explicitly return NULL in a couple more cases.  Move assertion
9227         on debug statements and remove unreachable code.
9228         (reset_debug_binding): Do not test id->retbnd.
9229         (expand_call_inline): Do not set it.
9231 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9233         * configure.ac: Add --disable-gcov option.
9234         * configure: Regenerate.
9235         * Makefile.in: Honour @enable_gcov@.
9236         * doc/install.texi: Document --disable-gcov.
9238 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9240         * config/arm/arm-cpus.in (cortex-a76): New entry.
9241         (cortex-a76.cortex-a55): Likewise.
9242         * config/arm/arm-tables.opt: Regenerate.
9243         * config/arm/arm-tune.md: Likewise.
9244         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
9245         * doc/invoke.texi (ARM Options): Document cortex-a76 and
9246         cortex-a76.cortex-a55.
9248 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
9250         PR target/85769
9251         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
9253 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9255         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
9256         comment.
9257         (EPILOGUE_USES): Likewise.
9259 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
9261         * tree-inline.c (remap_location): New function extracted from...
9262         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
9263         (copy_phis_for_bb): ...here.  Call remap_location.
9264         (copy_cfg_body): Adjust call to copy_edges_for_bb.
9266 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
9268         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
9269         unaligned vsx for 16B memset.
9271 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
9273         PR target/86285
9274         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
9275         ieee128_float_type_node to long_double_type_node unless
9276         TARGET_LONG_DOUBLE_128 is set.
9278 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
9280         * cfgloop.c (get_loop_location): Convert return type from
9281         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
9282         by implicit construction from rtx_insn *, and using
9283         dump_user_location_t::from_function_decl for the fallback case.
9284         * cfgloop.h (get_loop_location): Convert return type from
9285         location_t to dump_user_location_t.
9286         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
9287         dump_printf_loc to pass in a dump_location_t rather than a
9288         location_t, via the gimple stmt.
9289         * coverage.c (get_coverage_counts): Update calls to
9290         dump_printf_loc to pass in dump_location_t rather than a
9291         location_t.
9292         * doc/optinfo.texi (Dump types): Convert example of
9293         dump_printf_loc from taking "locus" to taking "insn".  Update
9294         description of the "_loc" calls to cover dump_location_t.
9295         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
9296         "selftest.h".
9297         (dump_user_location_t::dump_user_location_t): New constructors,
9298         from gimple *stmt and rtx_insn *.
9299         (dump_user_location_t::from_function_decl): New function.
9300         (dump_loc): Make static.
9301         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
9302         const dump_location_t &.
9303         (dump_generic_expr_loc): Delete.
9304         (dump_printf_loc): Convert param "loc" from location_t to
9305         const dump_location_t &.
9306         (selftest::test_impl_location): New function.
9307         (selftest::dumpfile_c_tests): New function.
9308         * dumpfile.h: Include "profile-count.h".
9309         (class dump_user_location_t): New class.
9310         (struct dump_impl_location_t): New struct.
9311         (class dump_location_t): New class.
9312         (dump_printf_loc): Convert 2nd param from source_location to
9313         const dump_location_t &.
9314         (dump_generic_expr_loc): Delete.
9315         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
9316         const dump_location_t &.
9317         * gimple-fold.c (fold_gimple_assign): Update call to
9318         dump_printf_loc to pass in a dump_location_t rather than a
9319         location_t, via the gimple stmt.
9320         (gimple_fold_call): Likewise.
9321         * gimple-loop-interchange.cc
9322         (loop_cand::analyze_iloop_reduction_var): Update for change to
9323         check_reduction_path.
9324         (tree_loop_interchange::interchange): Update for change to
9325         find_loop_location.
9326         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
9327         change in return-type of find_loop_location.
9328         (graphite_regenerate_ast_isl): Likewise.
9329         * graphite-optimize-isl.c (optimize_isl): Likewise.
9330         * graphite.c (graphite_transform_loops): Likewise.
9331         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
9332         pass in a dump_location_t rather than a location_t, via the
9333         gimple stmt.
9334         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9335         * ipa.c (walk_polymorphic_call_targets): Likewise.
9336         * loop-unroll.c (report_unroll): Convert "locus" param from
9337         location_t to dump_location_t.
9338         (decide_unrolling): Update for change to get_loop_location's
9339         return type.
9340         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
9341         location_t to dump_user_location_t.
9342         (grid_find_single_omp_among_assignments_1): Updates calls to
9343         dump_printf_loc to pass in a dump_location_t rather than a
9344         location_t, via the gimple stmt.
9345         (grid_parallel_clauses_gridifiable): Convert "tloc" from
9346         location_t to dump_location_t.  Updates calls to dump_printf_loc
9347         to pass in a dump_location_t rather than a location_t, via the
9348         gimple stmt.
9349         (grid_inner_loop_gridifiable_p): Likewise.
9350         (grid_dist_follows_simple_pattern): Likewise.
9351         (grid_gfor_follows_tiling_pattern): Likewise.
9352         (grid_target_follows_gridifiable_pattern): Likewise.
9353         (grid_attempt_target_gridification): Convert initialization
9354         of local "grid" from memset to zero-initialization; FIXME: does
9355         this require C++11?  Update call to dump_printf_loc to pass in a
9356         optinfo_location rather than a location_t, via the gimple stmt.
9357         * profile.c (read_profile_edge_counts): Updates call to
9358         dump_printf_loc to pass in a dump_location_t rather than a
9359         location_t
9360         (compute_branch_probabilities): Likewise.
9361         * selftest-run-tests.c (selftest::run_tests): Call
9362         dumpfile_c_tests.
9363         * selftest.h (dumpfile_c_tests): New decl.
9364         * tree-loop-distribution.c (pass_loop_distribution::execute):
9365         Update for change in return type of find_loop_location.
9366         * tree-parloops.c (parallelize_loops): Likewise.
9367         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
9368         "locus" from location_t to dump_user_location_t.
9369         (canonicalize_loop_induction_variables): Likewise.
9370         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
9371         for change in return type of find_loop_location.
9372         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
9373         to dump_printf_loc to pass in a dump_location_t rather than a
9374         location_t, via the stmt.
9375         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
9376         Likewise.
9377         * tree-vect-loop-manip.c (find_loop_location): Convert return
9378         type from source_location to dump_user_location_t.
9379         (vect_do_peeling): Update for above change.
9380         (vect_loop_versioning): Update for change in type of
9381         vect_location.
9382         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
9383         from location_t to dump_user_location_t.
9384         (vect_estimate_min_profitable_iters): Update for change in type
9385         of vect_location.
9386         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
9387         location_t to dump_location_t.
9388         (vect_slp_bb): Update for change in type of vect_location.
9389         * tree-vectorizer.c (vect_location): Convert from source_location
9390         to dump_user_location_t.
9391         (try_vectorize_loop_1): Update for change in vect_location's type.
9392         (vectorize_loops): Likewise.
9393         (increase_alignment): Likewise.
9394         * tree-vectorizer.h (vect_location): Convert from source_location
9395         to dump_user_location_t.
9396         (find_loop_location): Convert return type from source_location to
9397         dump_user_location_t.
9398         (check_reduction_path): Convert 1st param from location_t to
9399         dump_user_location_t.
9400         * value-prof.c (check_counter): Update call to dump_printf_loc to
9401         pass in a dump_user_location_t rather than a location_t; update
9402         call to error_at for change in type of "locus".
9403         (check_ic_target): Update call to dump_printf_loc to
9404         pass in a dump_user_location_t rather than a location_t, via the
9405         call_stmt.
9407 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
9409         * config/s390/s390.h (enum processor_flags): Do not use
9410         default tune parameter when -march was specified.
9412 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
9414         PR target/86314
9415         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
9416         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
9417         operands.
9419 2018-06-26  Richard Biener  <rguenther@suse.de>
9421         PR tree-optimization/86287
9422         PR bootstrap/86316
9423         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
9424         (vect_analyze_loop): Initialize n_stmts.
9426 2018-06-26  Richard Biener  <rguenther@suse.de>
9428         PR middle-end/86271
9429         * fold-const.c (fold_convertible_p): Pointer extension
9430         isn't valid.
9432 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
9434         PR debug/86064
9435         * dwarf2out.c (loc_list_has_views): Adjust comments.
9436         (dw_loc_list): Split single cross-partition range with
9437         nonzero locview.
9439 2018-06-25  Jeff Law  <law@redhat.com>
9441         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
9442         on -mbig-switch by default.
9444         * config/v850/predicates.md (const_float_1_operand): Fix match_code
9445         test.
9446         (const_float_0_operand): Remove unused predicate.
9447         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
9448         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
9449         (recipsf2): New expander.  Original pattern now called
9450         (recipsf2_insn).
9451         (recipdf2, recipdf2_insn): Similarly.
9452         (rsqrtsf2, rsqrtsf2_insn): Similarly
9453         (rsqrtdf2, rsqrtdf2_insn): Similarly
9455 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
9457         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
9458         Simplify logic for FreeBSD (twice).
9460 2018-06-25  Martin Sebor  <msebor@redhat.com>
9462         PR tree-optimization/86204
9463         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
9464         a strnlen result if it's less than the length of the string.
9466 2018-06-25  Martin Sebor  <msebor@redhat.com>
9468         PR tree-optimization/85700
9469         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
9470         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
9471         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
9473 2018-06-25  Martin Sebor  <msebor@redhat.com>
9475         * doc/extend.texi (Zero-length arrays): Update and clarify.
9477 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
9479         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
9480         added IEEE/IBM long double multilib support on PowerPC little
9481         endian Linux systems.
9482         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
9483         (MULTILIB_DEFAULTS): Likewise.
9484         * config/rs6000/rs6000.c (rs6000_option_override_internal):
9485         Likewise.
9486         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
9487         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
9488         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
9490 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
9492         PR middle-end/86311
9493         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
9494         (REORDER_45): Likewise.
9496 2018-06-25  Jeff Law  <law@redhat.com>
9498         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
9499         dividend to 32 bits.  Adjust length.
9500         (udivmodhi4): Cleanup output template.  Fix length.
9502 2018-06-25  Carl Love  <cel@us.ibm.com>
9504         * config/rs6000/vsx.md: Change word selector to prefered location.
9506 2018-06-25  Richard Biener  <rguenther@suse.de>
9508         PR tree-optimization/86304
9509         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
9510         epilogue-if-converted loops as well.
9512 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
9514         * lto-section-out.c (lto_begin_section): Do not print section
9515         name for noaddr and unnumbered dumps.
9517 2018-06-25  Richard Biener  <rguenther@suse.de>
9519         * tree-vectorizer.h (struct vec_info_shared): New structure
9520         with parts split out from struct vec_info and loop_nest from
9521         struct _loop_vec_info.
9522         (struct vec_info): Adjust accordingly.
9523         (struct _loop_vec_info): Likewise.
9524         (LOOP_VINFO_LOOP_NEST): Adjust.
9525         (LOOP_VINFO_DATAREFS): Likewise.
9526         (LOOP_VINFO_DDRS): Likewise.
9527         (struct _bb_vec_info): Likewise.
9528         (BB_VINFO_DATAREFS): Likewise.
9529         (BB_VINFO_DDRS): Likewise.
9530         (struct _stmt_vec_info): Add dr_aux member.
9531         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
9532         (DR_MISALIGNMENT_UNINITIALIZED): New.
9533         (set_dr_misalignment): Adjust.
9534         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
9535         (vect_analyze_loop): Adjust prototype.
9536         (vect_analyze_loop_form): Likewise.
9537         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
9538         Compute dependences lazily.
9539         (vect_record_base_alignments): Use shared datarefs/ddrs.
9540         (vect_verify_datarefs_alignment): Likewise.
9541         (vect_analyze_data_refs_alignment): Likewise.
9542         (vect_analyze_data_ref_accesses): Likewise.
9543         (vect_analyze_data_refs): Likewise.
9544         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
9545         constructor parameter for shared part.
9546         (vect_analyze_loop_form): Pass in shared part and adjust.
9547         (vect_analyze_loop_2): Pass in storage for the number of
9548         stmts.  Move loop nest finding to the caller.  Compute
9549         datarefs lazily.
9550         (vect_analyze_loop): Pass in shared part.
9551         (vect_transform_loop): Verify shared datarefs are unchanged.
9552         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
9553         constructor parameter for shared part.
9554         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
9555         (vect_slp_bb): Verify shared datarefs are unchanged before
9556         transform.
9557         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
9558         change.
9559         (new_stmt_vec_info): Initialize DR_AUX misalignment to
9560         DR_MISALIGNMENT_UNINITIALIZED.
9561         * tree-vectorizer.c (vec_info::vec_info): Add constructor
9562         parameter for shared part.
9563         (vec_info::~vec_info): Adjust.
9564         (vec_info_shared::vec_info_shared): New.
9565         (vec_info_shared::~vec_info_shared): Likewise.
9566         (vec_info_shared::save_datarefs): Likewise.
9567         (vec_info_shared::check_datarefs): Likewise.
9568         (try_vectorize_loop_1): Construct shared part live for analyses
9569         of a single loop for multiple vector sizes.
9570         * tree-parloops.c (gather_scalar_reductions): Adjust.
9572 2018-06-25  Richard Biener  <rguenther@suse.de>
9574         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
9575         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
9576         (vect_analyze_data_refs): Remove similar code from here and
9577         simplify accordingly.
9579 2018-06-25  Richard Biener  <rguenther@suse.de>
9581         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
9582         for reverse storage order accesses rather than asserting
9583         they cannot happen here.
9585 2018-06-25  Tom de Vries  <tdevries@suse.de>
9587         PR debug/86257
9588         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
9589         Use data16 instead of .byte for insn prefix.
9591 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
9593         PR C++/86082
9594         * parser.c (make_char_string_pack): Pass this literal chars
9595         through cpp_interpret_string.
9596         (cp_parser_userdef_numeric_literal): Check the result of
9597         make_char_string_pack.
9599 2018-06-24  Maya Rashish  <coypu@sdf.org>
9601         * ginclude/stddef.h: Simplify conditions around avoiding
9602         re-definition of __size_t.
9604 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
9606         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
9607         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
9609 2018-06-22  Maya Rashish  <coypu@sdf.org>
9611         * doc/invoke.texi (mno-fancy-math-387): Update for changes
9612         made to OpenBSD and NetBSD through the years.
9614 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9616         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
9617         behavior of vec_pack (vector double, vector double) to match
9618         behavior of vec_float2 (vector double, vector double).
9620 2018-06-22  Olivier Hainque  <hainque@adacore.com>
9622         * gimplify.c (gimplify_function_tree): Prevent creation
9623         of a trampoline for the address of the current function
9624         passed to entry/exit instrumentation hooks.
9626 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
9628         PR target/86222
9629         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
9630         correctly.
9632 2018-06-22  Martin Liska  <mliska@suse.cz>
9634         PR tree-optimization/86263
9635         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9636         Bail out if is_enabled is false.
9637         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
9638         New declaration.
9639         (jump_table_cluster::is_enabled): New function.
9641 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
9643         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
9644         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
9645         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
9646         (lto_input_ts_binfo_tree_pointers): Likewise.
9647         * tree-streamer-out.c (streamer_write_tree_bitfields,
9648         write_ts_binfo_tree_pointers): Likewise.
9649         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
9651 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
9653         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
9655 2018-06-22  Martin Liska  <mliska@suse.cz>
9657         * symbol-summary.h (get): Make it pure and inline move
9658         functionality from ::get function.
9659         (get): Remove and inline into ::get and ::get_create.
9660         (get_create): Move code from ::get function.
9662 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9664         PR target/85994
9665         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
9666         -x assembler-with-cpp.
9668 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9670         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
9671         _FILE_OFFSET_BITS=64 for C++.
9673 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
9675         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
9676         conversion insn that shows up when pr85657-3.c is compiled using
9677         IEEE 128-bit long double.
9678         (neg<mode>2_internal): Use the correct mode to check whether the
9679         mode is IBM extended.
9680         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
9681         multiply and divide external functions from being created more
9682         than once.
9684 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9686         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
9687         functions.
9688         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
9689         the edge can be forwarded.
9690         (cfg_layout_merge_blocks): Likewise.
9692 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9694         * except.c (finish_eh_generation): Commit edge insertions only after
9695         the EH edges have been redirected from post-landing to landing pads.
9697 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9699         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
9700         create_tmp_var_for to create the FRAME decl.
9701         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
9703 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
9705         * tree-inline.c (copy_edges_for_bb): Minor tweak.
9706         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
9707         debug statement when resetting its value.
9708         (expand_call_inline): Copy the locus of the call onto the assignment
9709         of the return value, if any.  Use local variable in more cases.
9711 2018-06-21  Martin Liska  <mliska@suse.cz>
9713         * ipa-pure-const.c (propagate_nothrow): Use
9714         funct_state_summaries->get.
9715         (dump_malloc_lattice): Likewise.
9716         (propagate_malloc): Likewise.
9718 2018-06-21  Richard Biener  <rguenther@suse.de>
9720         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
9721         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
9722         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
9723         comment.
9724         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
9725         BLOCK_ABSTRACT_ORIGIN unconditionally.
9727 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
9729         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
9730         deleting it.
9731         * ipa-reference.c (ipa_reference_c_finalize): Delete
9732         ipa_ref_opt_sum_summaries and set it to NULL.
9734 2018-06-21  Tom de Vries  <tdevries@suse.de>
9736         PR tree-optimization/85859
9737         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
9738         test with comment from bb_no_side_effects_p.
9740 2018-06-21  Richard Biener  <rguenther@suse.de>
9742         PR tree-optimization/86232
9743         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
9744         max for constant niter.
9746 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9748         * config/aarch64/aarch64-simd.md
9749         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
9751 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9753         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
9754         Make opernads of the unspec commutative.
9756 2018-06-21  Richard Biener  <rguenther@suse.de>
9758         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
9759         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
9760         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
9761         (vect_analyze_data_ref_dependence): Re-order checks to deal with
9762         NULL DR_STEP.
9763         (vect_record_base_alignments): Do not record base alignment
9764         for gathers or scatters.
9765         (vect_compute_data_ref_alignment): Drop return value that is always
9766         true.  Bail out early for gathers or scatters.
9767         (vect_enhance_data_refs_alignment): Bail out early for gathers
9768         or scatters.
9769         (vect_find_same_alignment_drs): Likewise.
9770         (vect_analyze_data_refs_alignment): Remove dead code.
9771         (vect_slp_analyze_and_verify_node_alignment): Likewise.
9772         (vect_analyze_data_refs): For possible gathers or scatters do
9773         not create an alternate DR, just check their possible validity
9774         and mark them.  Adjust DECL_NONALIASED handling to not rely
9775         on DR_BASE_ADDRESS.
9776         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
9777         update inits of gathers or scatters.
9778         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
9779         Also copy gather/scatter flag to pattern vinfo.
9781 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9783         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
9784         behavior of vec_packsu (vector unsigned long long, vector unsigned
9785         long long) to match behavior of vec_packs with same signature.
9787 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
9788             Thomas Schwinge <thomas@codesourcery.com>
9789             Cesar Philippidis  <cesar@codesourcery.com>
9791         * gimplify.c (gimplify_scan_omp_clauses): Add support for
9792         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
9793         (gimplify_adjust_omp_clauses): Likewise.
9794         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
9795         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
9796         (gimplify_omp_target_update): Update handling of acc update and
9797         enter/exit data.
9798         * omp-low.c (install_var_field): Remove unused parameter
9799         base_pointers_restrict.
9800         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
9801         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
9802         FINALIZE}
9803         (omp_target_base_pointers_restrict_p): Delete.
9804         (scan_omp_target): Update call to scan_sharing_clauses.
9805         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
9806         FINALIZE}.
9807         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
9808         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
9809         (convert_local_omp_clauses): Likewise.
9810         * tree-pretty-print.c (dump_omp_clause): Likewise.
9811         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
9812         FINALIZE}.
9813         (omp_clause_code_name): Likewise.
9815 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
9817         PR debug/86194
9818         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
9819         be narrowed.
9821         PR tree-optimization/86231
9822         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
9823         anti-range don't overwrite *vr0min before using it to compute *vr0max.
9825 2018-06-20  Tom de Vries  <tdevries@suse.de>
9827         PR tree-optimization/86097
9828         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
9829         iv type if signedness of iv type is not the same as that of *nit.
9831 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
9833         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
9834         EDGE_EH edges, verify they are all EDGE_EH.
9836 2018-06-20  Maya Rashish  <coypu@sdf.org>
9838         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
9840 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9842         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
9843         * config/aarch64/aarch64.c (xgene1_tunings): Add
9844         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
9845         (aarch64_mode_valid_for_sched_fusion_p):
9846         Allow 16-byte modes.
9847         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
9848         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
9849         128-bit modes.
9850         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
9851         New pattern.
9852         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
9853         * config/aarch64/iterators.md (VQ2): New mode iterator.
9855 2018-06-20  Martin Liska  <mliska@suse.cz>
9857         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9858         Change default ratio from 10 to 8.
9860 2018-06-20  Martin Liska  <mliska@suse.cz>
9862         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9863         New.
9864         (bit_test_cluster::find_bit_tests): Likewise.
9865         (switch_decision_tree::analyze_switch_statement): Find clusters.
9866         * tree-switch-conversion.h (struct jump_table_cluster): Document
9867         hierarchy.
9869 2018-06-20  Martin Liska  <mliska@suse.cz>
9871         * tree-switch-conversion.c (switch_conversion::collect):
9872         Record m_uniq property.
9873         (switch_conversion::expand): Bail out for special conditions.
9874         (group_cluster::~group_cluster): New.
9875         (group_cluster::group_cluster): Likewise.
9876         (group_cluster::dump): Likewise.
9877         (jump_table_cluster::emit): New.
9878         (switch_decision_tree::fix_phi_operands_for_edges): New.
9879         (struct case_node): Remove struct.
9880         (jump_table_cluster::can_be_handled): New.
9881         (case_values_threshold): Moved to header.
9882         (reset_out_edges_aux): Likewise.
9883         (jump_table_cluster::is_beneficial): New.
9884         (bit_test_cluster::can_be_handled): Likewise.
9885         (add_case_node): Remove.
9886         (bit_test_cluster::is_beneficial): New.
9887         (case_bit_test::cmp): New.
9888         (bit_test_cluster::emit): New.
9889         (expand_switch_as_decision_tree_p): Remove.
9890         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
9891         (fix_phi_operands_for_edge): Likewise.
9892         (switch_decision_tree::analyze_switch_statement): New.
9893         (compute_cases_per_edge): Move ...
9894         (switch_decision_tree::compute_cases_per_edge): ... here.
9895         (try_switch_expansion): Likewise.
9896         (switch_decision_tree::try_switch_expansion): Likewise.
9897         (record_phi_operand_mapping): Likewise.
9898         (switch_decision_tree::record_phi_operand_mapping): Likewise.
9899         (emit_case_decision_tree): Likewise.
9900         (switch_decision_tree::emit): Likewise.
9901         (balance_case_nodes): Likewise.
9902         (switch_decision_tree::balance_case_nodes): Likewise.
9903         (dump_case_nodes): Likewise.
9904         (switch_decision_tree::dump_case_nodes): Likewise.
9905         (emit_jump): Likewise.
9906         (switch_decision_tree::emit_jump): Likewise.
9907         (emit_cmp_and_jump_insns): Likewise.
9908         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
9909         (emit_case_nodes): Likewise.
9910         (switch_decision_tree::emit_case_nodes): Likewise.
9911         (conditional_probability): Remove.
9912         * tree-switch-conversion.h (enum cluster_type): New.
9913         (PRINT_CASE): New.
9914         (struct cluster): Likewise.
9915         (cluster::cluster): Likewise.
9916         (struct simple_cluster): Likewise.
9917         (simple_cluster::simple_cluster): Likewise.
9918         (struct group_cluster): Likewise.
9919         (struct jump_table_cluster): Likewise.
9920         (struct bit_test_cluster): Likewise.
9921         (struct min_cluster_item): Likewise.
9922         (struct case_tree_node): Likewise.
9923         (case_tree_node::case_tree_node): Likewise.
9924         (jump_table_cluster::case_values_threshold): Likewise.
9925         (struct case_bit_test): Likewise.
9926         (struct switch_decision_tree): Likewise.
9927         (struct switch_conversion): Likewise.
9928         (switch_decision_tree::reset_out_edges_aux): Likewise.
9930 2018-06-20  Martin Liska  <mliska@suse.cz>
9932         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
9933         (hoist_edge_and_branch_if_true): Likewise.
9934         (expand_switch_using_bit_tests_p): Likewise.
9935         (struct case_bit_test): Likewise.
9936         (case_bit_test_cmp): Likewise.
9937         (emit_case_bit_tests): Likewise.
9938         (switch_conversion::switch_conversion): New class.
9939         (struct switch_conv_info): Remove old struct.
9940         (collect_switch_conv_info): More to ...
9941         (switch_conversion::collect): ... this.
9942         (check_range): Likewise.
9943         (switch_conversion::check_range): Likewise.
9944         (check_all_empty_except_final): Likewise.
9945         (switch_conversion::check_all_empty_except_final): Likewise.
9946         (check_final_bb): Likewise.
9947         (switch_conversion::check_final_bb): Likewise.
9948         (create_temp_arrays): Likewise.
9949         (switch_conversion::create_temp_arrays): Likewise.
9950         (free_temp_arrays): Likewise.
9951         (gather_default_values): Likewise.
9952         (switch_conversion::gather_default_values): Likewise.
9953         (build_constructors): Likewise.
9954         (switch_conversion::build_constructors): Likewise.
9955         (constructor_contains_same_values_p): Likewise.
9956         (switch_conversion::contains_same_values_p): Likewise.
9957         (array_value_type): Likewise.
9958         (switch_conversion::array_value_type): Likewise.
9959         (build_one_array): Likewise.
9960         (switch_conversion::build_one_array): Likewise.
9961         (build_arrays): Likewise.
9962         (switch_conversion::build_arrays): Likewise.
9963         (gen_def_assigns): Likewise.
9964         (switch_conversion::gen_def_assigns): Likewise.
9965         (prune_bbs): Likewise.
9966         (switch_conversion::prune_bbs): Likewise.
9967         (fix_phi_nodes): Likewise.
9968         (switch_conversion::fix_phi_nodes): Likewise.
9969         (gen_inbound_check): Likewise.
9970         (switch_conversion::gen_inbound_check): Likewise.
9971         (process_switch): Use the newly created class.
9972         (switch_conversion::expand): New.
9973         (switch_conversion::~switch_conversion): New.
9974         * tree-switch-conversion.h: New file.
9976 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
9978         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
9979         tree-vect-patterns.c.
9980         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
9981         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
9982         (vect_recog_sad_pattern): Likewise.
9983         (vect_recog_widen_sum_pattern): Likewise.
9984         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
9985         (vect_recog_widen_shift_pattern): Remove the type_in argument.
9986         (vect_recog_rotate_pattern): Likewise.
9987         (vect_recog_mult_pattern): Likewise.
9988         (vect_recog_vector_vector_shift_pattern): Likewise.
9989         (vect_recog_divmod_pattern): Likewise.
9990         (vect_recog_mixed_size_cond_pattern): Likewise.
9991         (vect_recog_bool_pattern): Likewise.
9992         (vect_recog_mask_conversion_pattern): Likewise.
9993         (vect_try_gather_scatter_pattern): Likewise.
9994         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
9995         (vect_recog_over_widening_pattern): Likewise.
9996         (vect_recog_gather_scatter_pattern): Likewise.
9997         (vect_recog_func_ptr): Move from tree-vectorizer.h
9998         (vect_vect_recog_func_ptrs): Move further down the file.
9999         (vect_recog_func): Likewise.  Remove the third argument.
10000         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10001         (vect_pattern_recog_1): Expect the pattern function to do any
10002         necessary target tests.  Also expect it to provide a vector type.
10003         Remove the type_in handling.
10005 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10007         * tree-vect-patterns.c (vect_pattern_detected): New function.
10008         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10009         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10010         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10011         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10012         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10013         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10014         (vect_recog_mask_conversion_pattern)
10015         (vect_try_gather_scatter_pattern): Likewise.
10017 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10019         * tree-vect-patterns.c (vect_get_internal_def): New function.
10020         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10021         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10022         (search_type_for_mask_1): Use it.
10024 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10026         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10027         redundant WIDEN_SUM_EXPR handling.
10028         (vect_recog_sad_pattern): Likewise.
10030 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10032         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10033         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10034         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10035         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10036         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10038 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10040         * tree-vect-stmts.c (vectorizable_call): Make sure that we
10041         use the stmt_vec_info of the original bb statement for the
10042         new zero assignment, even if the call is part of a pattern.
10044 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10046         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10047         that the sequence is attached to the original statement rather
10048         than the pattern statement.
10049         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10050         PATTERN_DEF_SEQ from the original statement rather than
10051         the main pattern statement.
10052         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10053         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10054         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10056 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
10058         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10059         definition statements before the early exit for statements that aren't
10060         live or relevant.
10061         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10062         split out from...
10063         (vect_transform_loop): ...here.  Process pattern definition
10064         statements without first checking whether the main pattern
10065         statement is live or relevant.
10067 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10069         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10070         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10072 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
10074         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10075         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10076         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10077         (expand_block_compare): Change select_block_compare_mode call.
10078         (expand_strncmp_align_check): Use new functions, fix comment.
10079         (emit_final_str_compare_gpr): New function.
10080         (expand_strn_compare): Refactor and clean up code.
10081         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10083 2018-06-19  Tony Reix  <tony.reix@atos.com>
10084             Damien Bergamini  <damien.bergamini@atos.com>
10085             David Edelsohn  <dje.gcc@gmail.com>
10087         * collect2.c (static_obj): New variable.
10088         (static_libs): New variable.
10089         (is_in_list): Uncomment declaration.
10090         (main): Track AIX libraries linked statically.
10091         (is_in_list): Uncomment definition.
10092         (scan_prog_file): Don't add AIX shared libraries initializer
10093         to constructor list if linking statically.
10095 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
10097         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10098         constant.
10099         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10101 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
10103         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10104         blocks.
10106 2018-06-19  Martin Liska  <mliska@suse.cz>
10108         * config/i386/i386.c (ix86_can_inline_p): Do not use
10109         ipa_fn_summaries::get_create.
10110         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10111         get.
10112         (devirtualization_time_bonus): Likewise.
10113         (ipcp_propagate_stage): Likewise.
10114         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10115         (edge_set_predicate): Likewise.
10116         (evaluate_conditions_for_known_args): Likewise.
10117         (evaluate_properties_for_edge): Likewise.
10118         (ipa_call_summary::reset): Tranform to ...
10119         (ipa_call_summary::~ipa_call_summary): ... this.
10120         (ipa_fn_summary::reset): Transform to ...
10121         (ipa_fn_summary::~ipa_fn_summary): ... this.
10122         (ipa_fn_summary_t::remove): Rename to ...
10123         (ipa_fn_summary_t::remove_callees): ... this.
10124         (ipa_fn_summary_t::duplicate): Use placement new
10125         instead of memory copy.
10126         (ipa_call_summary_t::duplicate): Likewise.
10127         (ipa_call_summary_t::remove): Remove.
10128         (dump_ipa_call_summary): Change get_create to get.
10129         (ipa_dump_fn_summary): Dump only when summary exists.
10130         (analyze_function_body): Use symbol_summary::get instead
10131         of get_create.
10132         (compute_fn_summary): Likewise.
10133         (estimate_edge_devirt_benefit): Likewise.
10134         (estimate_edge_size_and_time): Likewise.
10135         (inline_update_callee_summaries): Likewise.
10136         (remap_edge_change_prob): Likewise.
10137         (remap_edge_summaries): Likewise.
10138         (ipa_merge_fn_summary_after_inlining): Likewise.
10139         (write_ipa_call_summary): Likewise.
10140         (ipa_fn_summary_write): Likewise.
10141         (ipa_free_fn_summary): Likewise.
10142         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10143         (struct ipa_call_summary): Likewise.
10144         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10145         of get_create.
10146         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10147         (estimate_size_after_inlining): Likewise.
10148         (estimate_growth): Likewise.
10149         (growth_likely_positive): Likewise.
10150         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10151         (inline_call): Likewise.
10152         * ipa-inline.c (caller_growth_limits): Likewise.
10153         (can_inline_edge_p): Likewise.
10154         (can_inline_edge_by_limits_p): Likewise.
10155         (compute_uninlined_call_time): Likewise.
10156         (compute_inlined_call_time): Likewise.
10157         (want_inline_small_function_p): Likewise.
10158         (edge_badness): Likewise.
10159         (update_caller_keys): Likewise.
10160         (update_callee_keys): Likewise.
10161         (inline_small_functions): Likewise.
10162         (inline_to_all_callers_1): Likewise.
10163         (dump_overall_stats): Likewise.
10164         (early_inline_small_functions): Likewise.
10165         (early_inliner): Likewise.
10166         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10167         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10168         * ipa-pure-const.c (malloc_candidate_p): Likewise.
10169         * ipa-split.c (execute_split_functions): Likewise.
10170         * symbol-summary.h: Likewise.
10171         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10173 2018-06-19  Richard Biener  <rguenther@suse.de>
10175         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
10176         (vectorize_loops): ... here.  Fix dbgcnt handling.
10177         (try_vectorize_loop): Wrap try_vectorize_loop_1.
10179 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
10181         PR target/86197
10182         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
10183         ieee128 argument takes up only one (vector) register, not two (floating
10184         point) registers.
10186 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
10188         * gimplify.c (gimplify_init_constructor): Really never clear for an
10189         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
10191 2018-06-19  Richard Biener  <rguenther@suse.de>
10193         PR tree-optimization/86179
10194         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
10195         after failed recognition.
10197 2018-06-18  Martin Sebor  <msebor@redhat.com>
10199         PR middle-end/85602
10200         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
10201         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
10202         Handle integer subtraction.
10203         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
10204         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
10206 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
10208         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
10209         param from rtx to rtx_insn *.
10210         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
10211         param.
10212         (frv_ifcvt_modify_insn): Likwise.
10213         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
10214         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
10215         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
10216         as_a <rtx_insn *> cast to local "unprotected_region" once
10217         it's been established that it's not NULL or pc_rtx.
10218         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
10219         param "sethi" from rtx to rtx_insn *.
10220         (nds32_group_float_insns): Likewise for param "insn".
10221         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
10222         param.
10223         (vax_output_int_subtract): Likewise.
10224         * config/vax/vax.c (vax_output_int_add): Likewise for param
10225         "insn".
10226         (vax_output_int_subtract): Likewise.
10227         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
10228         (emit_pattern_after): Likewise for param "after".
10229         (emit_insn_after): Likewise.
10230         (emit_jump_insn_after): Likewise.
10231         (emit_call_insn_after): Likewise.
10232         (emit_debug_insn_after): Likewise.
10233         (emit_pattern_before): Likewise for param "before".
10234         (emit_insn_before): Likewise.
10235         (emit_jump_insn_before): Likewise.
10236         * final.c (get_insn_template): Likewise for param "insn", removing
10237         a cast.
10238         * output.h (get_insn_template): Likewise for 2nd param.
10239         * rtl.h (emit_insn_before): Likewise.
10240         (emit_jump_insn_before): Likewise.
10241         (emit_debug_insn_before_noloc): Likewise.
10242         (emit_insn_after): Likewise.
10243         (emit_jump_insn_after): Likewise.
10244         (emit_call_insn_after): Likewise.
10245         (emit_debug_insn_after): Likewise.
10246         (set_insn_deleted): Likewise for param.
10248 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
10250         PR target/85358
10251         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
10252         floating point modes, so that IFmode is numerically greater than
10253         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
10254         to declare the ordering.  This prevents IFmode from being
10255         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
10256         machine.  Include rs6000-modes.h to share the fractional values
10257         between genmodes* and the rest of the compiler.
10258         (IFmode): Likewise.
10259         (KFmode): Likewise.
10260         (TFmode): Likewise.
10261         * config/rs6000/rs6000-modes.h: New file.
10262         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
10263         meaning of rs6000_long_double_size so that 126..128 selects an
10264         appropriate 128-bit floating point type.
10265         (rs6000_option_override_internal): Likewise.
10266         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
10267         (TARGET_LONG_DOUBLE_128): Change the meaning of
10268         rs6000_long_double_size so that 126..128 selects an appropriate
10269         128-bit floating point type.
10270         (LONG_DOUBLE_TYPE_SIZE): Update comment.
10271         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
10272         source and destination to match the standard usage.
10273         (truncifkf2): Likewise.
10274         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
10275         ISA 2.07 to use an explicit clobber, instead of passing in a
10276         temporary.
10277         (copysign<mode>3_soft): Likewise.
10279 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
10281         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10282         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
10283         (vect_slp_analyze_instance_dependence): Likewise.
10284         (vect_enhance_data_refs_alignment): Likewise.
10285         (vect_analyze_data_refs_alignment): Likewise.
10286         (vect_slp_analyze_and_verify_instance_alignment
10287         (vect_analyze_data_ref_accesses): Likewise.
10288         (vect_prune_runtime_alias_test_list): Likewise.
10289         (vect_analyze_data_refs): Likewise.
10290         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
10291         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
10292         (vect_analyze_scalar_cycles_1): Likewise.
10293         (vect_get_loop_niters): Likewise.
10294         (vect_analyze_loop_form_1): Likewise.
10295         (vect_update_vf_for_slp): Likewise.
10296         (vect_analyze_loop_operations): Likewise.
10297         (vect_analyze_loop): Likewise.
10298         (vectorizable_induction): Likewise.
10299         (vect_transform_loop): Likewise.
10300         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
10301         * tree-vect-slp.c (vect_analyze_slp): Likewise.
10302         (vect_make_slp_decision): Likewise.
10303         (vect_detect_hybrid_slp): Likewise.
10304         (vect_slp_analyze_operations): Likewise.
10305         (vect_slp_bb): Likewise.
10306         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
10307         (vectorizable_bswap): Likewise.
10308         (vectorizable_call): Likewise.
10309         (vectorizable_simd_clone_call): Likewise.
10310         (vectorizable_conversion): Likewise.
10311         (vectorizable_assignment): Likewise.
10312         (vectorizable_shift): Likewise.
10313         (vectorizable_operation): Likewise.
10314         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
10316 2018-06-18  Martin Sebor  <msebor@redhat.com>
10318         PR tree-optimization/81384
10319         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
10320         * builtins.c (expand_builtin_strnlen): New function.
10321         (expand_builtin): Call it.
10322         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
10323         * builtins.def (BUILT_IN_STRNLEN): New.
10324         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
10325         Warn for bounds in excess of maximum object size.
10326         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
10327         single-value ranges.  Handle strnlen.
10328         (handle_builtin_strlen): Handle strnlen.
10329         (strlen_check_and_optimize_stmt): Same.
10330         * doc/extend.texi (Other Builtins): Document strnlen.
10332 2018-06-18  Maya Rashish  <coypu@sdf.org>
10334         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
10335         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
10336         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
10338         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
10339         here to ...
10340         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
10342 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10344         * tree.c (escaped_string::escape): Replace cast to char * by
10345         const_cast<char *> (unescaped).
10347 2018-06-18  Nick Clifton  <nickc@redhat.com>
10349         PR 84195
10350         * tree.c (escaped_string): New class.  Converts an unescaped
10351         string into its escaped equivalent.
10352         (warn_deprecated_use): Use the new class to convert the
10353         deprecation message, if present.
10354         (test_escaped_strings): New self test.
10355         (test_c_tests): Add test_escaped_strings.
10356         * doc/extend.texi (deprecated): Add a note that the
10357         deprecation message is affected by the -fmessage-length
10358         option, and that control characters will be escaped.
10359         (#pragma GCC error): Document this pragma.
10360         (#pragma GCC warning): Likewise.
10361         * doc/invoke.texi (-fmessage-length): Document this option's
10362         effect on the #warning and #error preprocessor directives and
10363         the deprecated attribute.
10365 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
10367         * tree.c (decl_value_expr_lookup): Revert latest change.
10368         (decl_value_expr_insert): Likewise.
10370 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
10372         * gimplify.c (nonlocal_vlas): Delete.
10373         (nonlocal_vla_vars): Likewise.
10374         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
10375         referenced VLAs.
10376         (gimplify_body): Do not create and destroy nonlocal_vlas.
10377         * tree-nested.c: Include diagnostic.h.
10378         (use_pointer_in_frame): Tweak.
10379         (lookup_field_for_decl): Add assertion and declare the transformation.
10380         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
10381         internal error when the reference is in a wrong context.  Do not
10382         create a debug decl by default.
10383         (note_nonlocal_block_vlas): Delete.
10384         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
10385         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
10386         create a debug decl by default.
10387         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
10388         call is in a wrong context.
10389         (fixup_vla_decls): New function.
10390         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
10391         debug variables were created.
10392         * tree.c (decl_value_expr_lookup): Add checking assertion.
10393         (decl_value_expr_insert): Likewise.
10395 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
10397         PR middle-end/82479
10398         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
10399         * tree-scalar-evolution.c (interpret_expr): Likewise.
10400         (expression_expensive_p): Likewise.
10401         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
10402         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
10403         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
10404         (ssa_defined_by_minus_one_stmt_p): New.
10406 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
10408         PR middle-end/64946
10409         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
10410         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
10411         * dojump.c (do_jump): Likewise.
10412         * expr.c (expand_expr_real_2): Check operand type's sign.
10413         * fold-const.c (const_unop): Handle ABSU_EXPR.
10414         (fold_abs_const): Likewise.
10415         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
10416         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
10417         (strip_sign_op_1): Likesise.
10418         * match.pd: Add new pattern to generate ABSU_EXPR.
10419         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
10420         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10421         * tree-eh.c (operation_could_trap_helper_p): Likewise.
10422         * tree-inline.c (estimate_operator_cost): Likewise.
10423         * tree-pretty-print.c (dump_generic_node): Likewise.
10424         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
10425         * tree.def (ABSU_EXPR): New.
10427 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
10429         PR middle-end/86095
10430         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
10431         documented as preserved for backward compatibility only.
10432         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
10434         PR rtl-optimization/86108
10435         * bb-reorder.c (create_forwarder_block): Renamed to ...
10436         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
10437         jump from new landing pad to the second part.
10438         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
10439         Adjust callers.
10441 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
10443         PR middle-end/85878
10444         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
10445         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
10446         Only call store_expr for halves if the mode is the same.
10448         PR middle-end/86123
10449         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
10450         Fix up comment formatting.
10452 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10454         * typed-splay-tree.h (typed_splay_tree::remove): New function.
10455         (typed_splay_tree::closure,
10456         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
10457         (typed_splay_tree::typed_splay_tree,
10458         typed_splay_tree::operator =): Declared private.
10459         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
10460         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
10461         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
10462         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
10463         typed_splay_tree::splay_tree_splay,
10464         typed_splay_tree::splay_tree_foreach_helper,
10465         typed_splay_tree::splay_tree_insert,
10466         typed_splay_tree::splay_tree_remove,
10467         typed_splay_tree::splay_tree_lookup,
10468         typed_splay_tree::splay_tree_predecessor,
10469         typed_splay_tree::splay_tree_successor,
10470         typed_splay_tree::splay_tree_min,
10471         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
10472         (typed_splay_tree::root, typed_splay_tree::comp,
10473         typed_splay_tree::delete_key,
10474         typed_splay_tree::delete_value): New data members.
10475         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
10476         typed_splay_tree::remove.
10478 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
10480         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
10481         -mginv and -mno-ginv to the assembler.
10482         * config/mips/mips.opt (-mcrc): New option.
10483         (-mginv): Likewise.
10484         * doc/invoke.text (-mcrc): Document.
10485         (-mginv): Likewise.
10487 2018-06-15  Nick Clifton  <nickc@redhat.com>
10489         PR 84195
10490         * tree.c (escaped_string): New class.  Converts an unescaped
10491         string into its escaped equivalent.
10492         (warn_deprecated_use): Use the new class to convert the
10493         deprecation message, if present.
10494         (test_escaped_strings): New self test.
10495         (test_c_tests): Add test_escaped_strings.
10496         * doc/extend.texi (deprecated): Add a note that the
10497         deprecation message is affected by the -fmessage-length
10498         option, and that control characters will be escaped.
10499         (#pragma GCC error): Document this pragma.
10500         (#pragma GCC warning): Likewise.
10501         * doc/invoke.texi (-fmessage-length): Document this option's
10502         effect on the #warning and #error preprocessor directives and
10503         the deprecated attribute.
10505 2018-06-15  Richard Biener  <rguenther@suse.de>
10507         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
10508         here, also noting vector size used.
10509         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
10510         size used in MSG_OPTIMIZED_LOCATIONS dump.
10511         (pass_slp_vectorize::execute): Adjust.
10513 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
10515         PR target/85968
10516         * config/arc/arc.c (arc_return_address_register): Fix
10517         if-condition.
10519 2018-06-15  Richard Biener  <rguenther@suse.de>
10521         PR middle-end/86159
10522         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
10523         leave useless conversion stripping to force_gimple_operand_gsi.
10524         (gimplify_build2): Likewise.
10525         (gimplify_build1): Likewise.
10527 2018-06-15  Richard Biener  <rguenther@suse.de>
10529         PR middle-end/86076
10530         * tree-cfg.c (move_stmt_op): unshare invariant addresses
10531         before adjusting their block.
10533 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10535         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
10536         multilibs for *-*-rtems*.
10537         * config/riscv/t-rtems: New file.
10539 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
10541         PR middle-end/86122
10542         * match.pd ((A +- CST1) +- CST2): Punt if last resort
10543         unsigned_type_for returns NULL.
10545         PR target/85945
10546         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
10547         subregs of multi-word pseudos unless the float mode has word size.
10549 2018-06-14  Richard Biener  <rguenther@suse.de>
10551         PR middle-end/86139
10552         * tree-vect-generic.c (build_word_mode_vector_type): Remove
10553         duplicate and harmful type_hash_canon.
10554         * tree.c (type_hash_canon): Assert we didn't find ourselves.
10556 2018-06-14  Richard Biener  <rguenther@suse.de>
10558         PR ipa/86124
10559         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
10560         NULL cgraph_node.
10562 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10564         * config/rtems.h (STDINT_LONG32): Define.
10566 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
10567             Prachi Godbole  <prachi.godbole@imgtec.com>
10569         * config/mips/mips-cpus.def: Define P6600.
10570         * config/mips/mips-tables.opt: Regenerate.
10571         * config/mips/mips.c (mips_ucbranch_type): New enum.
10572         (mips_rtx_cost_data): Add support for P6600.
10573         (mips_issue_rate): Likewise.
10574         (mips_multipass_dfa_lookahead): Likewise.
10575         (mips_avoid_hazard): Likewise.
10576         (mips_reorg_process_insns): Likewise.
10577         (mips_classify_branch_p6600): New function.
10578         * config/mips/mips.h (TUNE_P6600): New define.
10579         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
10580         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
10581         * config/mips/mips.md: Include p6600.md.
10582         (processor): Add p6600.
10583         * config/mips/p6600.md: New file.
10584         * doc/invoke.texi: Add p6600 to supported architectures.
10586 2018-06-13  Martin Sebor  <msebor@redhat.com>
10588         PR tree-optimization/86114
10589         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
10590         of integer types.
10591         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
10593 2018-06-13  Richard Biener  <rguenther@suse.de>
10595         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
10596         Properly set vector type of the intermediate stmt.
10597         * tree-vect-stmts.c (vectorizable_operation): The destination
10598         var always has vectype_out type.
10600 2018-06-13  Jeff Law  <law@redhat.com>
10602         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
10603         integer 0 for argument to print_rtl_with_bb.
10604         (rl78_reorg): Likewise.
10606 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
10608         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
10609         from rtx to rtx_insn *.
10610         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
10611         "label".
10612         (add_sched_insns_for_speculation): Likewise for local "target",
10613         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
10614         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
10615         from rtx_insn ** to rtx_code_label **.
10616         (reorg_emit_nops): Likewise.
10617         (c6x_reorg): Likewise for local "call_labels".
10618         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
10619         rtx to rtx_insn *.
10620         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
10621         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
10622         the loops over LABEL_REFS.
10623         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
10624         braf_label.
10625         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
10626         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
10627         (split_branches): Strengthen local "olabel" from rtx to
10628         rtx_insn *, adding a safe_as_a cast.
10629         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
10630         to "rtx_insn *".
10631         (add_insn_after): Likewise for first two params.
10632         (add_insn_before): Likewise.
10633         (remove_insn): Likewise for param.
10634         (emit_pattern_before_noloc): Likewise for second and third params.
10635         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
10636         (emit_call_insn_before_noloc): Likewise.
10637         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
10638         to "rtx_insn *".
10639         (emit_barrier_before): Likewise.
10640         (emit_label_before): Strengthen "label" param from "rtx" to
10641         "rtx_code_label *".  Strengthen "before" param from "rtx" to
10642         "rtx_insn *".
10643         (emit_insn_after_1): Strengthen "after" param from "rtx" to
10644         "rtx_insn *".
10645         (emit_pattern_after_noloc): Likewise.
10646         (emit_insn_after_noloc): Likewise.
10647         (emit_jump_insn_after_noloc): Likewise.
10648         (emit_call_insn_after_noloc): Likewise.
10649         (emit_debug_insn_after_noloc): Likewise.
10650         (emit_barrier_after): Likewise.
10651         (emit_label_after): Likewise for both params.
10652         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
10653         "loc" param from "int" to "location_t".
10654         (emit_insn_after_setloc): Likewise.
10655         (emit_jump_insn_after_setloc): Likewise.
10656         (emit_call_insn_after_setloc): Likewise.
10657         (emit_debug_insn_after_setloc): Likewise.
10658         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
10659         "loc" param from "int" to "location_t".
10660         (emit_pattern_before): Convert NULL_RTX to NULL.
10661         (emit_insn_before_setloc): Convert "loc" param from "int" to
10662         "location_t".
10663         (emit_jump_insn_before_setloc): Likewise.
10664         (emit_call_insn_before_setloc): Likewise.
10665         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
10666         rtx_insn *.  Convert "loc" param from "int" to "location_t".
10667         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
10668         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
10669         Convert 3rd param from "int" to "location_t".
10670         (emit_barrier_before, emit_barrier_after, next_real_insn):
10671         Strengthen param from rtx to rtx_insn *.
10672         (emit_label_before): Strengthen 1st param from "rtx" to
10673         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
10674         "rtx_insn *".
10675         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
10676         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
10677         Strengthen 2nd param from "rtx" to "rtx_insn *".
10678         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
10679         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
10680         Likewise. Convert 3rd param from "int" to "location_t".
10681         (emit_label_after): Strengthen 1st param from "rtx" to
10682         "rtx_code_label *".
10683         (next_real_insn, remove_insn): Strengthen param from "rtx" to
10684         "rtx_insn *".
10685         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
10686         from "rtx" to "rtx_insn *".
10688 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
10690         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
10691         bodies streamed in with -Q.
10692         * dumpfile.c (dump_files): Add lto-stream-out dump file.
10693         * dumpfile.h (tree_dump_index): Add lto_stream_out.
10694         * gimple-streamer-out.c: Include gimple-pretty-print.h
10695         (output_bb): Dump stmts streamed.
10696         * lto-section-out.c: Include print-tree.h
10697         (lto_begin_section): Dump sections created.
10698         (lto_output_decl_index): Dump decl encoded.
10699         * lto-streamer-out.c: Include print-tree.h
10700         (create_output_block): Dump output block created.
10701         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
10702         (output_function): Dump function output.
10703         (output_constructor): Dump constructor streamed.
10704         (write_global_stream): Output indexes encoded.
10705         (produce_asm_for_decls): Dump streams encoded.
10706         * lto-streamer.c (streamer_dump_file): New global var.
10707         * lto-streamer.h (streamer_dump_file): Declare.
10708         * passes.c (ipa_write_summaries): Initialize streamer dump.
10709         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
10710         in.
10712 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
10714         PR target/86048
10715         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
10716         offsets for register save directives.  Emit a second batch of save
10717         directives, if need be, when the function accesses prior frames.
10719 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10721         * config/arc/fpu.md (fmasf4): Force operand to register.
10722         (fnmasf4): Likewise.
10724 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10726         * config/arc/arc-protos.h (arc_pad_return): Remove.
10727         * config/arc/arc.c (machine_function): Remove force_short_suffix
10728         and size_reason.
10729         (arc_print_operand): Adjust printing of '&'.
10730         (arc_verify_short): Remove conditional printing of short suffix.
10731         (arc_final_prescan_insn): Remove reference to size_reason.
10732         (pad_return): New function.
10733         (arc_reorg): Call pad_return.
10734         (arc_pad_return): Remove.
10735         (arc_init_machine_status): Remove reference to force_short_suffix.
10736         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
10737         (attr length): When attribute iscompact is true force to 2
10738         regardless; in the case of maybe check if we want to force the
10739         instruction to have 4 bytes length.
10740         (nopv): Change it to generate 4 byte long nop as well.
10741         (blockage): New pattern.
10742         (simple_return): Remove call to arc_pad_return.
10743         (p_return_i): Likewise.
10745 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10747         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
10749 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10751         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
10752         ARC cores.
10754 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10756         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
10757         for ARC700 and ARCv2.
10759 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
10761         PR target/86076
10762         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
10763         operands[2] instead of operands[1].
10766 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
10768         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
10769         case, check whether the outer register overlaps an unallocatable
10770         register, not just whether it fits the required class.
10772 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
10774         * poly-int.h (can_div_trunc_p): Add new overload in which all values
10775         are poly_ints.
10776         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
10777         (memrefs_conflict_p): Likewise.
10778         (init_alias_analysis): Likewise.
10779         * cfgexpand.c (expand_debug_expr): Likewise.
10780         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
10781         * cse.c (fold_rtx): Likewise.
10782         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
10783         * expr.c (emit_block_move_hints): Likewise.
10784         (clear_storage_hints, push_block, emit_push_insn): Likewise.
10785         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
10786         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
10787         (emit_group_store): Likewise.
10788         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
10789         to read the PRE/POST_MODIFY increment.
10790         * calls.c (store_one_arg): Use strip_offset.
10791         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
10792         poly_int_rtx_p.
10793         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
10794         by a VEC_SELECT.
10795         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
10796         (simplify_binary_operation_1): Extend CONST_INT handling to
10797         poly_int_rtx_p.
10798         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
10799         than a HOST_WIDE_INT.
10800         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
10801         poly_int64.
10802         (adjust_mems, add_stores): Update accodingly.
10803         (vt_canonicalize_addr): Track polynomial offsets.
10804         (emit_note_insn_var_location): Likewise.
10805         (vt_add_function_parameter): Likewise.
10806         (vt_initialize): Likewise.
10808 2018-06-12  Jeff Law  <law@redhat.com>
10810         * config.gcc (alpha*-*-freebsd*): Remove.
10811         * config/alpha/freebsd.h: Remove.
10813 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
10815         PR other/69968
10816         * spellcheck-tree.c (levenshtein_distance): Rename to...
10817         (get_edit_distance): ...this, and update for underlying renaming.
10818         * spellcheck-tree.h (levenshtein_distance): Rename to...
10819         (get_edit_distance): ...this.
10820         * spellcheck.c (levenshtein_distance): Rename to...
10821         (get_edit_distance): ...this.  Convert from Levenshtein distance
10822         to Damerau-Levenshtein distance by supporting transpositions of
10823         adjacent characters.  Rename "v1" to "v_next" and "v0" to
10824         "v_one_ago".
10825         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
10826         (selftest::test_edit_distance_unit_test_oneway): ...this, and
10827         update for underlying renaming.
10828         (selftest::levenshtein_distance_unit_test): Rename to...
10829         (selftest::test_get_edit_distance_unit): ...this, and update for
10830         underlying renaming.
10831         (selftest::test_find_closest_string): Add example from PR 69968
10832         where transposition helps
10833         (selftest::test_metric_conditions): Update for renaming.
10834         (selftest::test_metric_conditions): Likewise.
10835         (selftest::spellcheck_c_tests): Likewise.
10836         * spellcheck.h (levenshtein_distance): Rename both overloads to...
10837         (get_edit_distance): ...this.
10838         (best_match::consider): Update for renaming.
10840 2018-06-12  Martin Sebor  <msebor@redhat.com>
10842         PR tree-optimization/85259
10843         * builtins.c (compute_objsize): Handle constant offsets.
10844         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
10845         true iff a warning has been issued.
10846         * gimple.h (gimple_nonartificial_location): New function.
10847         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
10848         gimple_nonartificial_location and handle -Wno-system-headers.
10849         (handle_builtin_stxncpy): Same.
10851 2018-06-12  Martin Sebor  <msebor@redhat.com>
10853         PR c/85931
10854         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
10856 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
10858         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
10859         BUILTIN_VEC_XST entries for pointer to double and long long.
10861 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
10863         PR target/85990
10864         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
10865         Update comments.
10866         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
10867         Likewise.
10869 2018-06-12  Martin Liska  <mliska@suse.cz>
10871         * doc/options.texi: Document IntegerRange.
10873 2018-06-12  Martin Liska  <mliska@suse.cz>
10875         * config/i386/i386.opt: Make MPX-related options as Deprecated.
10876         * opt-functions.awk: Handle Deprecated flag.
10877         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
10878         and report error.
10879         (read_cmdline_option): Report warning for a deprecated option.
10880         * opts.h (struct cl_option): Add new field cl_deprecated.
10881         (CL_ERR_DEPRECATED): New.
10883 2018-06-12  Martin Liska  <mliska@suse.cz>
10885         * doc/options.texi: Document Deprecated option flag.
10887 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10889         * config/arc/arc-arch.h (arc_extras): New enum.
10890         (arc_cpu_t):Add field extra.
10891         (arc_cpu_types): Consider the extras.
10892         * config/arc/arc-cpus.def: Add extras info.
10893         * config/arc/arc-opts.h (processor_type): Consider extra field.
10894         * config/arc/arc.c (arc_override_options): Handle extra field.
10896 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
10898         * config/arc/arc-arch.h: Update ARC_OPTX macro.
10899         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
10900         field.
10901         * config/arc/arc.c (arc_init): Update pic warning.
10902         (irq_range): Update irq range parsing warnings.
10903         (arc_override_options): Update various warning messages.
10904         (arc_handle_aux_attribute): Likewise.
10906 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
10908         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
10910 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10912         * doc/sourcebuild.texi: Document usage of line number 0 in verify
10913         compiler messages directives.
10915 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
10917         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
10918         * config/mips/mips-tables.opt: Regenerate.
10919         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
10920         mips64r6.
10921         * doc/invoke.texi: Document -march=i6500.
10923 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
10925         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
10926         (i6400_gpmul): Add cpu_unit.
10927         (i6400_gpdiv): Likewise.
10928         (i6400_msa_add_d): Update reservations.
10929         (i6400_msa_int_add) Likewise.
10930         (i6400_msa_short_logic3) Likewise.
10931         (i6400_msa_short_logic2) Likewise.
10932         (i6400_msa_short_logic) Likewise.
10933         (i6400_msa_move) Likewise.
10934         (i6400_msa_cmp) Likewise.
10935         (i6400_msa_short_float2) Likewise.
10936         (i6400_msa_div_d) Likewise.
10937         (i6400_msa_long_logic1) Likewise.
10938         (i6400_msa_long_logic2) Likewise.
10939         (i6400_msa_mult) Likewise.
10940         (i6400_msa_long_float2) Likewise.
10941         (i6400_msa_long_float4) Likewise.
10942         (i6400_msa_long_float5) Likewise.
10943         (i6400_msa_long_float8) Likewise.
10944         (i6400_fpu_fadd): Include frint type.
10945         (i6400_fpu_store): New define_insn_reservation.
10946         (i6400_fpu_load): Likewise.
10947         (i6400_fpu_move): Likewise.
10948         (i6400_fpu_fcmp): Likewise.
10949         (i6400_fpu_fmadd): Likewise.
10950         (i6400_int_mult): Include imul3nc type and update reservation.
10951         (i6400_int_div): Include idiv3 type and update reservation.
10952         (i6400_int_load): Update to check type not move_type.
10953         (i6400_int_store): Likewise.
10954         (i6400_int_prefetch): Set zero latency.
10956 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
10958         * gcc.c: Document new %@{...} sequence.
10959         (LINK_COMMAND_SPEC): Use it for the -L switches.
10960         (cpp_unique_options): Use it for the -I switches.
10961         (at_file_argbuf): New global variable.
10962         (in_at_file): Likewise.
10963         (alloc_args): Create at_file_argbuf.
10964         (clear_args): Truncate at_file_argbuf.
10965         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
10966         (open_at_file): New function.
10967         (close_at_file): Likewise.
10968         (create_at_file): Delete.
10969         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
10970         <'o'>: Likewise.
10971         <'@'>: New case.
10972         (validate_switches_from_spec): Deal with %@{...} sequence.
10973         (validate_switches): Likewise.
10974         (driver::finalize): Call clear_args.
10976 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
10978         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
10980 2018-06-11  Martin Sebor  <msebor@redhat.com>
10982         * doc/invoke.texi (-Wall): List -Wc++17-compat.
10983         (Wno-class-memaccess): Add @opindex.
10984         (Wno-templates, Wno-multiple-inheritance): Same.
10985         (Wno-virtual-inheritance, Wno-namespaces): Same.
10986         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
10987         (Wno-format-overflow, Wno-format-truncation): Same.
10988         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
10989         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
10990         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
10991         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
10992         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
10993         (Wno-misspelled-isr): Same.
10995 2018-06-11  Martin Sebor  <msebor@redhat.com>
10997         * PR tree-optimization/86083
10998         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11000 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
11002         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11004 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
11006         PR target/85755
11007         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11008         on the correct operand.
11009         (*movdi_internal64): Ditto.
11011 2018-06-11  Martin Liska  <mliska@suse.cz>
11013         PR tree-optimization/86089
11014         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11016 2018-06-11  Julia Koval  <julia.koval@intel.com>
11018         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11019         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11020         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11022 2018-06-11  Olivier Hainque  <hainque@adacore.com>
11024         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11025         for Ada with strict dwarf2.
11027 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
11029         PR target/85755
11030         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11031         addresses.
11033 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
11035         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11037 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
11039         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11040         TARGET_ELF.
11042 2018-06-08  Martin Liska  <mliska@suse.cz>
11044         * tree-cfg.h (debug_function): Fix argument type to match
11045         implementation.
11047 2018-06-08  Martin Liska  <mliska@suse.cz>
11049         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11050         Remove usage of MPX-related (and removed) fields.
11051         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11053 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
11055         * cfg.c (debug): Use TDF_NONE rather than 0.
11056         * cfghooks.c (debug): Likewise.
11057         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11058         (struct dump_option_value_info): Convert to...
11059         (struct kv_pair): ...this template type.
11060         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11061         rather than 0.
11062         (optinfo_verbosity_options): Likewise.
11063         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11064         OPTGROUP_NONE.
11065         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11066         than int for "optgroup_flags" param.
11067         (dump_generic_expr_loc): Use dump_flags_t rather than int for
11068         "dump_kind" param.
11069         (dump_dec): Likewise.
11070         (dump_finish): Use TDF_NONE rather than 0.
11071         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11072         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
11073         than 0.  Update for change to option_ptr.
11074         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11075         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
11076         0.  Update for changes to optinfo_verbosity_options and
11077         optgroup_options.
11078         (opt_info_switch_p): Convert optgroup_flags from int to
11079         optgroup_flags_t.
11080         (dump_basic_block): Use dump_flags_t rather than int
11081         for "dump_kind" param.
11082         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11083         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11084         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11085         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11086         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11087         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11088         TDF_NONE): Convert from macros to...
11089         (enum dump_flag): ...this new enum.
11090         (dump_flags_t): Update to use enum.
11091         (operator|, operator&, operator~, operator|=, operator&=):
11092         Implement for dump_flags_t.
11093         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11094         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11095         Convert from macros to...
11096         (enum optgroup_flag): ...this new enum.
11097         (optgroup_flags_t): New typedef.
11098         (operator|, operator|=): Implement for optgroup_flags_t.
11099         (struct dump_file_info): Convert field "alt_flags" to
11100         dump_flags_t.  Convert field "optgroup_flags" to
11101         optgroup_flags_t.
11102         (dump_basic_block): Use dump_flags_t rather than int for param.
11103         (dump_generic_expr_loc): Likewise.
11104         (dump_dec): Likewise.
11105         (dump_register): Convert param "optgroup_flags" to
11106         optgroup_flags_t.
11107         (opt_info_enable_passes): Likewise.
11108         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11109         than 0.
11110         * gimple-pretty-print.c (debug): Likewise.
11111         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11112         (merged_store_group::apply_stores): Likewise.
11113         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11114         * gimple.c (verify_gimple_pp): Likewise.
11115         * graphite-poly.c (print_pbb_body): Likewise.
11116         * passes.c (pass_manager::register_one_dump_file): Convert
11117         local "optgroup_flags" to optgroup_flags_t.
11118         * print-tree.c (print_node): Use TDF_NONE rather than 0.
11119         (debug): Likewise.
11120         (debug_body): Likewise.
11121         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11122         to optgroup_flags_t.
11123         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11124         than 0.
11125         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11126         (convert_mult_to_fma): Likewise.
11127         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11128         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11129         * tree-vect-data-refs.c (dump_lower_bound): Convert param
11130         "dump_kind" to dump_flags_t.
11132 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11134         * config/rs6000/rs6000.c (min, max): Delete.
11136 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
11138         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11139         -mabi=spe and -mabi=no-spe.
11141 2018-06-08  Martin Liska  <mliska@suse.cz>
11143         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11144         where we expect an existing summary.
11146 2018-06-08  Martin Liska  <mliska@suse.cz>
11148         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11149         * ipa-inline.h (estimate_edge_growth): Likewise.
11151 2018-06-08  Martin Liska  <mliska@suse.cz>
11153         * cgraph.c (function_version_hasher::hash): Use
11154         cgraph_node::get_uid ().
11155         (function_version_hasher::equal):
11156         * cgraph.h (cgraph_node::get_uid): New method.
11157         * ipa-inline.c (update_caller_keys): Use
11158         cgraph_node::get_uid ().
11159         (update_callee_keys): Likewise.
11160         * ipa-utils.c (searchc): Likewise.
11161         (ipa_reduced_postorder): Likewise.
11162         * lto-cgraph.c (input_node): Likewise.
11163         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
11164         * symbol-summary.h (symtab_insertion): Likewise.
11165         (symtab_removal): Likewise.
11166         (symtab_duplication): Likewise.
11167         * tree-pretty-print.c (dump_function_header): Likewise.
11168         * tree-sra.c (convert_callers_for_node): Likewise.
11170 2018-06-08  Martin Liska  <mliska@suse.cz>
11172         * cgraph.c (symbol_table::create_edge): Always assign a new
11173         unique number.
11174         (symbol_table::free_edge): Do not recycle numbers.
11175         * cgraph.h (cgraph_edge::get): New method.
11176         * symbol-summary.h (symtab_removal): Use it.
11177         (symtab_duplication): Likewise.
11178         (call_summary::hashable_uid): Remove.
11180 2018-06-08  Martin Liska  <mliska@suse.cz>
11182         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
11183         (initialize_growth_caches): Remove.
11184         (free_growth_caches): Likewise.
11185         (do_estimate_edge_time): Use edge_growth_cache.
11186         (do_estimate_edge_size): Likewise.
11187         (do_estimate_edge_hints): Likewise.
11188         * ipa-inline.c (reset_edge_caches): Likewise.
11189         (recursive_inlining): Likewise.
11190         (inline_small_functions): Likewise.
11191         * ipa-inline.h (initialize_growth_caches): Remove.
11192         (estimate_edge_size): Likewise.
11193         (estimate_edge_time): Likewise.
11194         (estimate_edge_hints): Likewise.
11195         (reset_edge_growth_cache): Likewise.
11196         * symbol-summary.h (call_summary::remove): New method.
11198 2018-06-08  Martin Liska  <mliska@suse.cz>
11200         * ipa-cp.c (class edge_clone_summary): New summary.
11201         (grow_edge_clone_vectors): Remove.
11202         (ipcp_edge_duplication_hook): Remove.
11203         (class edge_clone_summary_t): New call_summary class.
11204         (ipcp_edge_removal_hook): Remove.
11205         (edge_clone_summary_t::duplicate): New function.
11206         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
11207         (create_specialized_node): Likewise.
11208         (ipcp_driver): Initialize edge_clone_summaries and do not
11209         register hooks.
11211 2018-06-08  Martin Liska  <mliska@suse.cz>
11213         * symbol-summary.h (get): New function.
11214         (call_summary::m_initialize_when_cloning): New class member.
11216 2018-06-08  Martin Liska  <mliska@suse.cz>
11218         * cgraph.c (cgraph_node::remove): Do not recycle uid.
11219         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
11220         (symbol_table::allocate_cgraph_symbol): Do not set uid.
11221         * passes.c (uid_hash_t): Record removed_nodes by their uids.
11222         (remove_cgraph_node_from_order): Use the removed_nodes set.
11223         (do_per_function_toporder): Likwise.
11224         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
11225         instead of summary_uid.
11226         (symtab_removal): Likewise.
11227         (symtab_duplication): Likewise.
11229 2018-06-08  Martin Liska  <mliska@suse.cz>
11231         * ipa-cp.c (ipcp_store_bits_results): Use
11232         ipcp_transformation_sum.
11233         (ipcp_store_vr_results): Likewise.
11234         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
11235         to ...
11236         (ipcp_transformation_initialize): ... this.
11237         (ipa_set_node_agg_value_chain):
11238         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
11239         (write_ipcp_transformation_info): Likewise.
11240         (read_ipcp_transformation_info): Likewise.
11241         (ipcp_update_bits): Likewise.
11242         (ipcp_update_vr): Likewise.
11243         (ipcp_transform_function): Likewise.
11244         * ipa-prop.h: Rename ipcp_transformation_summary to
11245         ipcp_transformation.
11246         (class ipcp_transformation_t): New function summary.
11247         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
11248         (ipa_get_agg_replacements_for_node): Likewise.
11250 2018-06-08  Martin Liska  <mliska@suse.cz>
11252         * ipa-pure-const.c (struct funct_state_d): Do it class instead
11253         of struct.
11254         (class funct_state_summary_t): New function_summary class.
11255         (has_function_state): Remove.
11256         (get_function_state): Likewise.
11257         (set_function_state): Likewise.
11258         (add_new_function): Likewise.
11259         (funct_state_summary_t::insert): New function.
11260         (duplicate_node_data): Remove.
11261         (remove_node_data): Remove.
11262         (funct_state_summary_t::duplicate): New function.
11263         (register_hooks): Create new funct_state_summaries.
11264         (pure_const_generate_summary): Use it.
11265         (pure_const_write_summary): Likewise.
11266         (pure_const_read_summary): Likewise.
11267         (propagate_pure_const): Likewise.
11268         (propagate_nothrow): Likewise.
11269         (dump_malloc_lattice): Likewise.
11270         (propagate_malloc): Likewise.
11271         (execute): Do not register hooks, just remove summary
11272         instead.
11273         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
11274         constructor.
11276 2018-06-08  Martin Liska  <mliska@suse.cz>
11278         * ipa-reference.c (remove_node_data): Remove.
11279         (duplicate_node_data): Likewise.
11280         (class ipa_ref_var_info_summary_t): New class.
11281         (class ipa_ref_opt_summary_t): Likewise.
11282         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
11283         (get_reference_optimization_summary): Use
11284         ipa_ref_opt_sum_summaries.
11285         (set_reference_vars_info): Remove.
11286         (set_reference_optimization_summary): Likewise.
11287         (ipa_init): Create summaries.
11288         (init_function_info): Use function summary.
11289         (ipa_ref_opt_summary_t::duplicate): New function.
11290         (ipa_ref_opt_summary_t::remove): New function.
11291         (get_read_write_all_from_node): Fix GNU coding style.
11292         (propagate): Use function summary.
11293         (write_node_summary_p): Fix GNU coding style.
11294         (stream_out_bitmap): Likewise.
11295         (ipa_reference_read_optimization_summary): Use function summary.
11296         (ipa_reference_c_finalize): Do not release hooks.
11298 2018-06-08  Martin Liska  <mliska@suse.cz>
11300         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
11301         (analyze_function_body): Extract multiple calls of get_create.
11302         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
11303         * ipa-inline.c (recursive_inlining): Use ::get method.
11304         * ipa-inline.h (estimate_edge_growth): Likewise.
11306 2018-06-08  Martin Liska  <mliska@suse.cz>
11308         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
11309         HSA_INVALID.
11310         (hsa_function_summary::hsa_function_summary): Use the new enum
11311         value.
11312         (hsa_gpu_implementation_p): Use hsa_summaries::get.
11313         * hsa-gen.c (hsa_get_host_function): Likewise.
11314         (get_brig_function_name): Likewise.
11315         * ipa-hsa.c (process_hsa_functions): Likewise.
11316         (ipa_hsa_write_summary): Likewise.
11317         * symbol-summary.h (symtab_duplication): Use ::get function/
11318         (get): New function.
11320 2018-06-08  Martin Liska  <mliska@suse.cz>
11322         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
11323         of get.
11324         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
11325         (hsa_register_kernel): Likewise.
11326         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
11327         * hsa-gen.c (hsa_get_host_function): Likewise.
11328         (get_brig_function_name): Likewise.
11329         (generate_hsa): Likewise.
11330         (pass_gen_hsail::execute): Likewise.
11331         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
11332         (devirtualization_time_bonus): Likewise.
11333         (ipcp_propagate_stage): Likewise.
11334         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11335         (edge_set_predicate): Likewise.
11336         (evaluate_conditions_for_known_args): Likewise.
11337         (evaluate_properties_for_edge): Likewise.
11338         (ipa_fn_summary::reset): Likewise.
11339         (ipa_fn_summary_t::duplicate): Likewise.
11340         (dump_ipa_call_summary): Likewise.
11341         (ipa_dump_fn_summary): Likewise.
11342         (analyze_function_body): Likewise.
11343         (compute_fn_summary): Likewise.
11344         (estimate_edge_devirt_benefit): Likewise.
11345         (estimate_edge_size_and_time): Likewise.
11346         (estimate_calls_size_and_time): Likewise.
11347         (estimate_node_size_and_time): Likewise.
11348         (inline_update_callee_summaries): Likewise.
11349         (remap_edge_change_prob): Likewise.
11350         (remap_edge_summaries): Likewise.
11351         (ipa_merge_fn_summary_after_inlining): Likewise.
11352         (ipa_update_overall_fn_summary): Likewise.
11353         (read_ipa_call_summary): Likewise.
11354         (inline_read_section): Likewise.
11355         (write_ipa_call_summary): Likewise.
11356         (ipa_fn_summary_write): Likewise.
11357         (ipa_free_fn_summary): Likewise.
11358         * ipa-hsa.c (process_hsa_functions): Likewise.
11359         (ipa_hsa_write_summary): Likewise.
11360         (ipa_hsa_read_section): Likewise.
11361         * ipa-icf.c (sem_function::merge): Likewise.
11362         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
11363         (do_estimate_edge_time): Likewise.
11364         (estimate_size_after_inlining): Likewise.
11365         (estimate_growth): Likewise.
11366         (growth_likely_positive): Likewise.
11367         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11368         (inline_call): Likewise.
11369         * ipa-inline.c (caller_growth_limits): Likewise.
11370         (can_inline_edge_p): Likewise.
11371         (can_inline_edge_by_limits_p): Likewise.
11372         (compute_uninlined_call_time): Likewise.
11373         (compute_inlined_call_time): Likewise.
11374         (want_inline_small_function_p): Likewise.
11375         (edge_badness): Likewise.
11376         (update_caller_keys): Likewise.
11377         (update_callee_keys): Likewise.
11378         (recursive_inlining): Likewise.
11379         (inline_small_functions): Likewise.
11380         (inline_to_all_callers_1): Likewise.
11381         (dump_overall_stats): Likewise.
11382         (early_inline_small_functions): Likewise.
11383         (early_inliner): Likewise.
11384         * ipa-inline.h (estimate_edge_growth): Likewise.
11385         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11386         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11387         * ipa-prop.h (IPA_NODE_REF): Likewise.
11388         (IPA_EDGE_REF): Likewise.
11389         * ipa-pure-const.c (malloc_candidate_p): Likewise.
11390         (propagate_malloc): Likewise.
11391         * ipa-split.c (execute_split_functions): Likewise.
11392         * symbol-summary.h: Rename get to get_create.
11393         (get): Likewise.
11394         (get_create): Likewise.
11395         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11397 2018-06-08  Martin Liska  <mliska@suse.cz>
11399         * symbol-summary.h (release): Move definition out of class
11400         declaration.
11401         (symtab_removal): Likewise.
11402         (symtab_duplication): Likewise.
11404 2018-06-08  Martin Liska  <mliska@suse.cz>
11406         * symbol-summary.h (function_summary): Move constructor
11407         implementation out of class declaration.
11408         (release): Likewise.
11409         (symtab_insertion): Likewise.
11410         (symtab_removal): Likewise.
11411         (symtab_duplication): Likewise.
11412         (get): Likewise.
11414 2018-06-08  Martin Liska  <mliska@suse.cz>
11416         * Makefile.in: Remove support for MPX (macros, related functions,
11417         fields in cgraph_node, ...).
11418         * builtin-types.def (BT_BND): Likewise.
11419         (BT_FN_BND_CONST_PTR): Likewise.
11420         (BT_FN_CONST_PTR_BND): Likewise.
11421         (BT_FN_VOID_PTR_BND): Likewise.
11422         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
11423         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
11424         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
11425         (expand_builtin_mempcpy_with_bounds): Likewise.
11426         (expand_builtin_memset_with_bounds): Likewise.
11427         (expand_builtin_memset_args): Likewise.
11428         (std_expand_builtin_va_start): Likewise.
11429         (expand_builtin): Likewise.
11430         (expand_builtin_with_bounds): Likewise.
11431         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
11432         (DEF_LIB_BUILTIN_CHKP): Likewise.
11433         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
11434         (DEF_CHKP_BUILTIN): Likewise.
11435         (BUILT_IN_MEMCPY): Likewise.
11436         (BUILT_IN_MEMMOVE): Likewise.
11437         (BUILT_IN_MEMPCPY): Likewise.
11438         (BUILT_IN_MEMSET): Likewise.
11439         (BUILT_IN_STPCPY): Likewise.
11440         (BUILT_IN_STRCAT): Likewise.
11441         (BUILT_IN_STRCHR): Likewise.
11442         (BUILT_IN_STRCPY): Likewise.
11443         (BUILT_IN_STRLEN): Likewise.
11444         (BUILT_IN_MEMCPY_CHK): Likewise.
11445         (BUILT_IN_MEMMOVE_CHK): Likewise.
11446         (BUILT_IN_MEMPCPY_CHK): Likewise.
11447         (BUILT_IN_MEMSET_CHK): Likewise.
11448         (BUILT_IN_STPCPY_CHK): Likewise.
11449         (BUILT_IN_STRCAT_CHK): Likewise.
11450         (BUILT_IN_STRCPY_CHK): Likewise.
11451         * calls.c (store_bounds): Likewise.
11452         (emit_call_1): Likewise.
11453         (special_function_p): Likewise.
11454         (maybe_warn_nonstring_arg): Likewise.
11455         (initialize_argument_information): Likewise.
11456         (finalize_must_preallocate): Likewise.
11457         (compute_argument_addresses): Likewise.
11458         (expand_call): Likewise.
11459         * cfgexpand.c (expand_call_stmt): Likewise.
11460         (expand_return): Likewise.
11461         (expand_gimple_stmt_1): Likewise.
11462         (pass_expand::execute): Likewise.
11463         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
11464         (cgraph_node::remove): Likewise.
11465         (cgraph_node::dump): Likewise.
11466         (cgraph_node::verify_node): Likewise.
11467         * cgraph.h (chkp_function_instrumented_p): Likewise.
11468         (symtab_node::get_alias_target): Likewise.
11469         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
11470         (cgraph_local_p): Likewise.
11471         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
11472         (cgraph_edge::rebuild_references): Likewise.
11473         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
11474         (walk_polymorphic_call_targets): Likewise.
11475         (cgraph_node::expand_thunk): Likewise.
11476         (symbol_table::output_weakrefs): Likewise.
11477         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
11478         (ix86_handle_option): Likewise.
11479         * config/i386/constraints.md: Likewise.
11480         * config/i386/i386-builtin-types.def (BND): Likewise.
11481         (VOID): Likewise.
11482         (PVOID): Likewise.
11483         (ULONG): Likewise.
11484         * config/i386/i386-builtin.def (BDESC_END): Likewise.
11485         (BDESC_FIRST): Likewise.
11486         (BDESC): Likewise.
11487         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
11488         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
11489         * config/i386/i386.c (enum reg_class): Likewise.
11490         (ix86_target_string): Likewise.
11491         (ix86_option_override_internal): Likewise.
11492         (ix86_conditional_register_usage): Likewise.
11493         (ix86_valid_target_attribute_inner_p): Likewise.
11494         (ix86_set_indirect_branch_type): Likewise.
11495         (ix86_set_current_function): Likewise.
11496         (ix86_function_arg_regno_p): Likewise.
11497         (init_cumulative_args): Likewise.
11498         (ix86_function_arg_advance): Likewise.
11499         (ix86_function_arg): Likewise.
11500         (ix86_pass_by_reference): Likewise.
11501         (ix86_function_value_regno_p): Likewise.
11502         (ix86_function_value_1): Likewise.
11503         (ix86_function_value_bounds): Likewise.
11504         (ix86_return_in_memory): Likewise.
11505         (ix86_setup_incoming_vararg_bounds): Likewise.
11506         (ix86_va_start): Likewise.
11507         (indirect_thunk_need_prefix): Likewise.
11508         (print_reg): Likewise.
11509         (ix86_print_operand): Likewise.
11510         (ix86_expand_call): Likewise.
11511         (ix86_output_function_return): Likewise.
11512         (reg_encoded_number): Likewise.
11513         (BDESC_VERIFYS): Likewise.
11514         (ix86_init_mpx_builtins): Likewise.
11515         (ix86_init_builtins): Likewise.
11516         (ix86_emit_cmove): Likewise.
11517         (ix86_emit_move_max): Likewise.
11518         (ix86_expand_builtin): Likewise.
11519         (ix86_builtin_mpx_function): Likewise.
11520         (ix86_get_arg_address_for_bt): Likewise.
11521         (ix86_load_bounds): Likewise.
11522         (ix86_store_bounds): Likewise.
11523         (ix86_load_returned_bounds): Likewise.
11524         (ix86_store_returned_bounds): Likewise.
11525         (ix86_class_likely_spilled_p): Likewise.
11526         (ix86_hard_regno_mode_ok): Likewise.
11527         (x86_order_regs_for_local_alloc): Likewise.
11528         (ix86_mitigate_rop): Likewise.
11529         (ix86_bnd_prefixed_insn_p): Likewise.
11530         (ix86_mpx_bound_mode): Likewise.
11531         (ix86_make_bounds_constant): Likewise.
11532         (ix86_initialize_bounds): Likewise.
11533         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
11534         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
11535         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
11536         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
11537         (TARGET_CHKP_BOUND_MODE): Likewise.
11538         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
11539         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
11540         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
11541         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
11542         * config/i386/i386.h (TARGET_MPX): Likewise.
11543         (TARGET_MPX_P): Likewise.
11544         (VALID_BND_REG_MODE): Likewise.
11545         (FIRST_BND_REG): Likewise.
11546         (LAST_BND_REG): Likewise.
11547         (enum reg_class): Likewise.
11548         (BND_REG_P): Likewise.
11549         (BND_REGNO_P): Likewise.
11550         (BNDmode): Likewise.
11551         (ADJUST_INSN_LENGTH): Likewise.
11552         * config/i386/i386.md: Likewise.
11553         * config/i386/i386.opt: Likewise.
11554         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
11555         (defined): Likewise.
11556         (LINK_MPX): Likewise.
11557         (MPX_SPEC): Likewise.
11558         (LIBMPX_SPEC): Likewise.
11559         (LIBMPXWRAPPERS_SPEC): Likewise.
11560         (CHKP_SPEC): Likewise.
11561         * config/i386/predicates.md: Likewise.
11562         * dbxout.c (dbxout_type): Likewise.
11563         * doc/extend.texi: Likewise.
11564         * doc/invoke.texi: Likewise.
11565         * doc/md.texi: Likewise.
11566         * doc/tm.texi: Likewise.
11567         * doc/tm.texi.in: Likewise.
11568         * dwarf2out.c (is_base_type): Likewise.
11569         (gen_formal_types_die): Likewise.
11570         (gen_subprogram_die): Likewise.
11571         (gen_type_die_with_usage): Likewise.
11572         (gen_decl_die): Likewise.
11573         (dwarf2out_late_global_decl): Likewise.
11574         * expr.c (expand_assignment): Likewise.
11575         (emit_storent_insn): Likewise.
11576         (store_expr_with_bounds): Likewise.
11577         (store_expr): Likewise.
11578         (expand_expr_real_1): Likewise.
11579         * expr.h (store_expr_with_bounds): Likewise.
11580         * function.c (use_register_for_decl): Likewise.
11581         (struct bounds_parm_data): Likewise.
11582         (assign_parms_augmented_arg_list): Likewise.
11583         (assign_parm_find_entry_rtl): Likewise.
11584         (assign_parm_is_stack_parm): Likewise.
11585         (assign_parm_load_bounds): Likewise.
11586         (assign_bounds): Likewise.
11587         (assign_parms): Likewise.
11588         (expand_function_start): Likewise.
11589         * gcc.c (CHKP_SPEC): Likewise.
11590         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
11591         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
11592         (wrestrict_dom_walker::check_call): Likewise.
11593         * gimple.c (gimple_build_call_from_tree): Likewise.
11594         * gimple.h (enum gf_mask): Likewise.
11595         (gimple_call_with_bounds_p): Likewise.
11596         (gimple_call_set_with_bounds): Likewise.
11597         * gimplify.c (gimplify_init_constructor): Likewise.
11598         * ipa-cp.c (initialize_node_lattices): Likewise.
11599         (propagate_constants_across_call): Likewise.
11600         (find_more_scalar_values_for_callers_subset): Likewise.
11601         * ipa-hsa.c (process_hsa_functions): Likewise.
11602         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
11603         * ipa-icf.c (sem_function::merge): Likewise.
11604         * ipa-inline.c (early_inliner): Likewise.
11605         * ipa-pure-const.c (warn_function_noreturn): Likewise.
11606         (warn_function_cold): Likewise.
11607         (propagate_pure_const): Likewise.
11608         * ipa-ref.h (enum GTY): Likewise.
11609         * ipa-split.c (find_retbnd): Likewise.
11610         (consider_split): Likewise.
11611         (split_function): Likewise.
11612         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
11613         * ipa.c (walk_polymorphic_call_targets): Likewise.
11614         (symbol_table::remove_unreachable_nodes): Likewise.
11615         (process_references): Likewise.
11616         (cgraph_build_static_cdtor_1): Likewise.
11617         * lto-cgraph.c (lto_output_node): Likewise.
11618         (output_refs): Likewise.
11619         (compute_ltrans_boundary): Likewise.
11620         (input_overwrite_node): Likewise.
11621         (input_node): Likewise.
11622         (input_cgraph_1): Likewise.
11623         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
11624         * passes.c (pass_manager::execute_early_local_passes): Likewise.
11625         (class pass_chkp_instrumentation_passes): Likewise.
11626         (make_pass_chkp_instrumentation_passes): Likewise.
11627         * passes.def: Likewise.
11628         * rtl.h (struct GTY): Likewise.
11629         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
11630         * stor-layout.c (layout_type): Likewise.
11631         * symtab.c: Likewise.
11632         * target.def: Likewise.
11633         * targhooks.c (default_chkp_bound_type): Likewise.
11634         (default_chkp_bound_mode): Likewise.
11635         (default_builtin_chkp_function): Likewise.
11636         (default_chkp_function_value_bounds): Likewise.
11637         (default_chkp_make_bounds_constant): Likewise.
11638         (default_chkp_initialize_bounds): Likewise.
11639         * targhooks.h (default_chkp_bound_type): Likewise.
11640         (default_chkp_bound_mode): Likewise.
11641         (default_builtin_chkp_function): Likewise.
11642         (default_chkp_function_value_bounds): Likewise.
11643         (default_chkp_make_bounds_constant): Likewise.
11644         (default_chkp_initialize_bounds): Likewise.
11645         * toplev.c (compile_file): Likewise.
11646         (process_options): Likewise.
11647         * tree-core.h (DEF_BUILTIN): Likewise.
11648         (DEF_BUILTIN_CHKP): Likewise.
11649         * tree-inline.c (declare_return_variable): Likewise.
11650         (remap_gimple_stmt): Likewise.
11651         (copy_bb): Likewise.
11652         (initialize_inlined_parameters): Likewise.
11653         (expand_call_inline): Likewise.
11654         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
11655         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
11656         (make_pass_ipa_chkp_produce_thunks): Likewise.
11657         (make_pass_chkp): Likewise.
11658         (make_pass_chkp_opt): Likewise.
11659         (make_pass_chkp_instrumentation_passes): Likewise.
11660         * tree-pretty-print.c (dump_generic_node): Likewise.
11661         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
11662         * tree-ssa-dce.c (propagate_necessity): Likewise.
11663         (eliminate_unnecessary_stmts): Likewise.
11664         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
11665         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
11666         * tree-ssa-sccvn.h: Likewise.
11667         * tree-ssa-strlen.c (get_string_length): Likewise.
11668         (valid_builtin_call): Likewise.
11669         (adjust_last_stmt): Likewise.
11670         (handle_builtin_strchr): Likewise.
11671         (handle_builtin_strcpy): Likewise.
11672         (handle_builtin_stxncpy): Likewise.
11673         (handle_builtin_memcpy): Likewise.
11674         (handle_builtin_strcat): Likewise.
11675         (strlen_check_and_optimize_stmt): Likewise.
11676         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
11677         * tree-streamer-in.c: Likewise.
11678         * tree-streamer.c (record_common_node): Likewise.
11679         * tree.c (tree_code_size): Likewise.
11680         (wide_int_to_tree_1): Likewise.
11681         (type_contains_placeholder_1): Likewise.
11682         (build_common_tree_nodes): Likewise.
11683         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
11684         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
11685         (POINTER_BOUNDS_P): Likewise.
11686         (BOUNDED_TYPE_P): Likewise.
11687         (BOUNDED_P): Likewise.
11688         (CALL_WITH_BOUNDS_P): Likewise.
11689         (pointer_bounds_type_node): Likewise.
11690         * value-prof.c (gimple_ic): Likewise.
11691         * var-tracking.c (vt_add_function_parameters): Likewise.
11692         * varasm.c (make_decl_rtl): Likewise.
11693         (assemble_start_function): Likewise.
11694         (output_constant): Likewise.
11695         (maybe_assemble_visibility): Likewise.
11696         * varpool.c (ctor_for_folding): Likewise.
11697         * chkp-builtins.def: Remove.
11698         * ipa-chkp.c: Remove.
11699         * ipa-chkp.h: Remove.
11700         * rtl-chkp.c: Remove.
11701         * rtl-chkp.h: Remove.
11702         * tree-chkp-opt.c: Remove.
11703         * tree-chkp.c: Remove.
11704         * tree-chkp.h: Remove.
11706 2018-06-07  Carl Love  <cel@us.ibm.com>
11708         * config/rs6000/vsx.md (vextract_fp_from_shorth,
11709         vextract_fp_from_shortl): Add BE support.
11711 2018-06-07  Paul Koning  <ni1d@arrl.net>
11713         * compare-elim.c (try_merge_compare): Don't merge compare if
11714         address contains a side effect.
11715         (try_eliminate_compare): Likewise.
11717 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
11719         * config.gcc: Support "tremont".
11720         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
11721         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11722         PROCESSOR_TREMONT.
11723         * config/i386/i386.c (m_TREMONT): Define.
11724         (processor_target_table): Add "tremont".
11725         (PTA_TREMONT): Define.
11726         (ix86_lea_outperforms): Add TARGET_TREMONT.
11727         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
11728         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
11729         and M_INTEL_GOLDMONT_PLUS.
11730         (fold_builtin_cpu): Add "tremont".
11731         (ix86_add_stmt_cost): Add TARGET_TREMONT.
11732         (ix86_option_override_internal): Add "tremont".
11733         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
11734         (processor_type): Add PROCESSOR_TREMONT.
11735         * config/i386/x86-tune.def: Add m_TREMONT.
11736         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
11738 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11740         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
11741         symbol defined for msp430i* devices to be lower case.
11743 2018-06-07  Richard Biener  <rguenther@suse.de>
11745         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
11746         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
11747         Properly wrap signed arithmetic if overflow wraps.
11749 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
11751         PR tree-optimization/69615
11752         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
11753         of a cast from a same precision integral SSA_NAME in a bb dominated
11754         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
11755         cast to utype if rhs2 has already a compatible type.
11757 2018-06-07  Richard Biener  <rguenther@suse.de>
11759         PR tree-optimization/85935
11760         * graphite-scop-detection.c (find_params_in_bb): Analyze
11761         condition operands with respect to the correct loop.  Assert
11762         the analysis doesn't fail.
11764 2018-06-04  Carl Love  <cel@us.ibm.com>
11766         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
11767         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
11768         as it is slightly cheaper.
11769         (first_match_or_eos_index_<mode>):
11770         Calculate index using natural element order.
11771         (first_match_index_<mode>):
11772         Calculate index using natural element order.
11773         (first_match_or_eos_index_<mode>):
11774         Calculate index using natural order.
11775         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
11776         for BE and LE modes.
11777         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
11778         P9V_BUILTIN_VCLZLSBB_V16QI.
11779         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
11780         specific.
11782 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11784         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
11785         indentation and line wrap for many prototypes.  Add missing
11786         @smallexample directives around block of prototypes for vec_xl and
11787         vec_xst.
11789 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
11791         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
11792         track if we pass or return IEEE 128-bit floating point.
11793         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
11794         C++ mangling that is compatible with GCC 8.1.
11795         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
11796         (init_cumulative_args): Note if we pass or return IEEE 128-bit
11797         floating point types.
11798         (rs6000_function_arg_advance_1): Likewise.
11799         (rs6000_mangle_type): Optionally generate mangled names that match
11800         what GCC 8.1 generated for IEEE 128-bit floating point types.
11801         (rs6000_globalize_decl_name): If we have an external function that
11802         passes or returns IEEE 128-bit types, generate a weak reference
11803         from the mangled name used in GCC 8.1 to the current mangled
11804         name.
11805         (rs6000_init_builtins): Make __ibm128 use the long double type if
11806         long double is IBM extended double.  Make __float128 use the long
11807         double type if long double is IEEE 128-bit.
11809         PR target/85657
11810         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
11811         macro for __ibm128 built-in functions.
11812         (PACK_IF): Add __ibm128 pack/unpack functions.
11813         (UNPACK_IF): Likewise.
11814         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
11815         enable long double built-in functions if long double is IEEE
11816         128-bit floating point.
11817         (rs6000_invalid_builtin): Update long double built-in function
11818         error message.
11819         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
11820         functions, adjust the built-in function to use the long double
11821         built-in function if __ibm128 and long double are the same type.
11822         * doc/extend.texi (PowerPC builtins): Update documention for
11823         __builtin_{,un}pack_longdouble.  Add documentation for
11824         __builtin_{,un}pack_ibm128.
11826 2018-06-06  Jim Wilson  <jimw@sifive.com>
11828         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
11829         (struct machine_function): New field interrupt_mode.
11830         (riscv_handle_type_attribute): New function.  Add forward declaration.
11831         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
11832         (riscv_expand_epilogue): Check interrupt_mode field.
11833         (riscv_set_current_function): Check interrupt attribute args and
11834         set interrupt_mode field.
11835         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
11836         (riscv_sret, riscv_uret): New.
11837         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
11838         new arguments to interrupt attribute.
11840 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
11842         PR target/63177
11843         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
11844         Don't handle -mcpu=power8 if -mpower9-vector is also used.
11846 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11848         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
11849         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
11850         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11851         several redundant entries.
11853 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
11855         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
11856         type from "rtx" to "rtx_insn *".
11857         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
11858         for local "call_insn", removing cast.
11859         (ix86_expand_call): Likewise, introducing a "call_insn" local.
11861 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
11863         PR tree-optimization/86066
11864         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
11865         for BIT_INSERT_EXPR stores.
11867 2018-06-06  Richard Biener  <rguenther@suse.de>
11869         PR tree-optimization/86062
11870         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11871         component refs ontop
11872         of to be offsetted base.
11874 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11876         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
11877         to be static and remove check on interrupt attribute name.
11879 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11881         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
11882         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
11884 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
11886         PR target/79924
11887         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
11888         second argument.
11889         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
11890         Remove second argument, change how error is called.
11891         (aarch64_layout_arg): Remove second argument from
11892         aarch64_err_no_fpadvsimd call.
11893         (aarch64_init_cumulative_args): Ditto.
11894         (aarch64_gimplify_va_arg_expr): Ditto.
11895         * config/aarch64/aarch64.md (mov<mode>): Ditto.
11897 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
11899         * config/i386/i386.md (simple_return_indirect_internal): New expander.
11900         (*simple_return_indirect_internal<mode>): Rename from
11901         simple_return_indirect_internal.  Use W mode iterator.
11902         (rstorssp): New expander.
11903         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
11904         (clrssbsy): New expander.
11905         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
11907 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11909         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
11910         __typeof__.
11911         (cmse_check_pointed_object): Likewise.
11913 2018-06-05  Martin Liska  <mliska@suse.cz>
11915         PR gcov-profile/47618
11916         * doc/invoke.texi: Document how -fprofile-dir format
11917         is extended.
11919 2018-06-05  Richard Biener  <rguenther@suse.de>
11921         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
11922         removal pretend DOM info isn't available so we do not update
11923         it and only remove edges, not dominated blocks.  Actually free
11924         DOM info in case we removed something.  Remove unreachable blocks.
11925         (mfb_keep_latches): Work with either DOM info or marked backedges.
11926         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
11927         first.  Mark backedges if DOM info isn't available.
11928         (Re-)compute DOM info after cleanup_control_flow_pre.
11930 2018-06-05  Richard Biener  <rguenther@suse.de>
11932         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
11933         (locus_discrim_hasher::hash): Adjust.
11934         (locus_discrim_hasher::equal): Likewise.
11935         (next_discriminator_for_locus): Work on line directly.
11936         (same_line_p): Pass in expanded locus1 as well.
11937         (assign_discriminators): Avoid redundant location expansions.
11939 2018-06-05  Richard Biener  <rguenther@suse.de>
11941         PR tree-optimization/86046
11942         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
11943         if required after clearing TREE_ADDRESSABLE.
11945 2018-06-05  Richard Biener  <rguenther@suse.de>
11947         PR tree-optimization/86047
11948         * tree-ssa-loop.c (for_each_index): Glob handling of all
11949         decls and constants and really handle all of them.
11951 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11953         PR target/81497
11954         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
11955         qualifier_void_pointer and qualifier_const_void_pointer.
11956         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
11957         (arm_init_builtins): Handle the above.
11958         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
11959         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
11960         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
11961         void intrinsics.
11963 2018-06-05  Martin Liska  <mliska@suse.cz>
11965         * auto-profile.c (read_autofdo_file): Do not use
11966         gcov_ctr_summary struct.
11967         (afdo_callsite_hot_enough_for_early_inline): Likewise.
11968         * coverage.c (struct counts_entry): Likewise.
11969         (read_counts_file): Read just single summary entry.
11970         (get_coverage_counts): Use gcov_summary struct.
11971         * coverage.h (get_coverage_counts): Likewise.
11972         * gcov-dump.c (dump_working_sets): Likewise.
11973         (tag_summary): Dump just single summary.
11974         * gcov-io.c (gcov_write_summary): Write just histogram
11975         summary.
11976         (gcov_read_summary): Read just single summary.
11977         (compute_working_sets): Use gcov_summary struct.
11978         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
11979         of GCOV_COUNTERS_SUMMABLE.
11980         (GCOV_COUNTERS_SUMMABLE): Remove.
11981         (GCOV_FIRST_VALUE_COUNTER): Replace with
11982         GCOV_COUNTER_V_INTERVAL.
11983         (struct gcov_ctr_summary): Remove.
11984         (struct gcov_summary): Directly use fields of former
11985         gcov_ctr_summary.
11986         (compute_working_sets): Use gcov_summary struct.
11987         * gcov.c (read_count_file): Do not use ctrs fields.
11988         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
11989         struct.
11990         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
11991         struct.
11992         * profile.c: Likewise.
11993         * profile.h: Likewise.
11995 2018-06-05  Martin Liska  <mliska@suse.cz>
11997         PR gcov-profile/84846
11998         * gcov.c (output_lines): Print working directory only
11999         in intermediate format.
12001 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
12003         * config/s390/s390-builtin-types.def: Add void function type.
12004         * config/s390/s390-builtins.def: Use the function type for the
12005         tbeginc builtin.
12007 2018-06-04  Jim Wilson  <jimw@sifive.com>
12009         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12010         to int.
12011         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12012         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
12013         handle EH_RETURN_DATA_REGNO registers properly.
12014         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12015         (riscv_expand_epilogue): Update comment.  Change argument name and
12016         type.  Update code to use new name and type.  Pass new args to
12017         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
12018         EXCEPTION_RETURN.
12019         * config/riscv/riscv.md (NORMAL_RETURN): New.
12020         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12021         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12022         (eh_return): Call gen_eh_return_internal and emit barrier.
12023         (eh_return_internal): Call riscv_expand_epilogue.
12025 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
12027         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12028         bit_insertion field and declare can_be_merged_into method.
12029         (merged_store_group::can_be_merged_into): New method.
12030         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12031         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
12032         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12034 2018-06-04  Richard Biener  <rguenther@suse.de>
12036         PR tree-optimization/85955
12037         * builtins.c (fold_builtin_sincos): Convert pointers to
12038         destination to appropriate type before dereferencing.
12040 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
12042         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12044 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
12046         * expr.c (expand_expr_real_1): Force the operand into memory if
12047         its TYPE_MODE is BLKmode and if there is no integer mode for
12048         the number of bits being extracted.
12050 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12052         PR target/85832
12053         PR target/86036
12054         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12055         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12057 2018-06-04  Richard Biener  <rguenther@suse.de>
12059         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12060         (cleanup_tree_cfg_noloop): ... single caller.  Do
12061         start_recording_case_labels later.
12063 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
12065         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12066         to _IMMINTRIN_H_INCLUDED.
12067         * config/i386/pconfigintrin.h: Ditto.
12068         * config/i386/waitpkgintrin.h: Ditto.
12069         * config/i386/immintrin.h: Add includes for sgxintrin.h,
12070         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12071         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12072         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12073         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12074         waitpkgintrin.h and cldemoteintrin.h.
12076 2018-06-04  Richard Biener  <rguenther@suse.de>
12078         PR tree-optimization/86038
12079         * tracer.c (find_best_successor): Check probability for
12080         being initialized, bail out if not.
12082 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
12084         PR target/86003
12085         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12086         of bits to ignore when comparing architectures.
12088 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
12090         PR tree-optimization/69615
12091         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12092         maximum or minimum of the type, try to merge it also as if
12093         range1 is + [-, x - 1] or + [x + 1, -].
12095         PR c++/86025
12096         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12098 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
12100         PR tree-optimization/86034
12101         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12102         the unsigned bitfield type in a bit insertion sequence if it does not
12103         have a larger precision than the bitfield size.
12104         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12106 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
12108         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12110 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12112         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12113         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12114         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12115         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12117 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12119         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12120         Disable -fdelete-null-pointer-checks for ELF toolchain.
12122 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12123             Kito Cheng  <kito.cheng@gmail.com>
12125         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12126         (nds32le-*-*, nds32be-*-*): Integrate checking process.
12127         (nds32*-*-*): Add glibc and uclibc conditions.
12128         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12129         (TARGET_EXCEPT_UNWIND_INFO): Define.
12130         * config/nds32/elf.h: New file.
12131         * config/nds32/linux.h: New file.
12132         * config/nds32/nds32-elf.opt: New file.
12133         * config/nds32/nds32-linux.opt: New file.
12134         * config/nds32/nds32-fp-as-gp.c
12135         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12136         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12137         TARGET_LINUX_ABI.
12138         (nds32_asm_file_end): Ditto.
12139         (nds32_print_operand): Ditto.
12140         (nds32_insert_attributes): Ditto.
12141         (nds32_init_libfuncs): New function.
12142         (TARGET_HAVE_TLS): Define.
12143         (TARGET_INIT_LIBFUNCS): Define.
12144         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12145         spec content.
12146         (TARGET_ELF): Apply different mcmodel setting.
12147         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12148         been migrated into elf.h and linux.h files.
12149         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12150         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12151         (mcmodel): The content has been migrated into nds32-elf.opt and
12152         nds32-linux.opt files.
12153         * config/nds32/t-elf: New file.
12154         * config/nds32/t-linux: New file.
12156 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12157             Shiva Chen  <shiva0217@gmail.com>
12159         * config/nds32/constants.md (unspec_volatile_element): Add
12160         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
12161         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
12162         optimization.
12163         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
12164         (make_pass_nds32_fp_as_gp): Declare.
12165         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
12166         optmization pass.
12167         (nds32_asm_function_end_prologue): Remove unused asm output.
12168         (nds32_asm_function_begin_epilogue): Remove unused asm output.
12169         (nds32_asm_file_start): Output necessary fp_as_gp information.
12170         (nds32_option_override): Adjust register usage.
12171         (nds32_expand_prologue): Consider fp_as_gp situation.
12172         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
12173         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
12174         (epilogue): Ditto.
12175         (return): Ditto.
12176         (simple_return): Ditto.
12177         (omit_fp_begin): Output special directive for fp_as_gp.
12178         (omit_fp_end): Output special directive for fp_as_gp.
12179         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
12180         mforbid-fp-as-gp): New options.
12182 2018-06-01  Mark Wielaard  <mark@klomp.org>
12184         * dwarf2out.c (dwarf2out_finish): Remove generation of
12185         DW_AT_loclists_base.
12187 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
12189         * gimple-ssa-store-merging.c: Include gimple-fold.h.
12190         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
12191         (struct merged_store_group): Add bit_insertion field.
12192         (dump_char_array): Use standard hexadecimal format.
12193         (merged_store_group::merged_store_group): Set bit_insertion to false.
12194         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
12195         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
12196         also print the mask in the dump file.
12197         (pass_store_merging::gate): Minor tweak.
12198         (imm_store_chain_info::coalesce_immediate): Fix wrong association
12199         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
12200         stores with INTEGER_CST stores.
12201         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
12202         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
12203         and use it throughout.  Generate bit insertion sequences if need be.
12204         (pass_store_merging::process_store): Remove redundant condition.
12205         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
12207 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
12209         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
12210         the 128-bit floating point types.  Fix function comment.
12212 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12214         * config/aarch64/aarch64-simd.md
12215         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
12216         mnemonics.
12217         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
12218         mnemonics.
12220 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
12222         PR tree-optimization/85989
12223         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
12224         variable.
12225         (backprop::intersect_uses): Check it when deciding whether this
12226         is a backedge reference.
12227         (backprop::process_block): Add each phi to m_visited_phis
12228         after visiting it, then clear it at the end.
12230 2018-06-01  Richard Biener  <rguenther@suse.de>
12232         * tree-vectorizer.h (vect_dr_stmt): New function.
12233         (vect_get_load_cost): Adjust.
12234         (vect_get_store_cost): Likewise.
12235         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
12236         Use vect_dr_stmt instead of DR_SMTT.
12237         (vect_record_base_alignments): Likewise.
12238         (vect_calculate_target_alignment): Likewise.
12239         (vect_compute_data_ref_alignment): Likewise and make static.
12240         (vect_update_misalignment_for_peel): Likewise.
12241         (vect_verify_datarefs_alignment): Likewise.
12242         (vector_alignment_reachable_p): Likewise.
12243         (vect_get_data_access_cost): Likewise.  Pass down
12244         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
12245         (vect_get_peeling_costs_all_drs): Likewise.
12246         (vect_peeling_hash_get_lowest_cost): Likewise.
12247         (vect_enhance_data_refs_alignment): Likewise.
12248         (vect_find_same_alignment_drs): Likewise.
12249         (vect_analyze_data_refs_alignment): Likewise.
12250         (vect_analyze_group_access_1): Likewise.
12251         (vect_analyze_group_access): Likewise.
12252         (vect_analyze_data_ref_access): Likewise.
12253         (vect_analyze_data_ref_accesses): Likewise.
12254         (vect_vfa_segment_size): Likewise.
12255         (vect_small_gap_p): Likewise.
12256         (vectorizable_with_step_bound_p): Likewise.
12257         (vect_prune_runtime_alias_test_list): Likewise.
12258         (vect_analyze_data_refs): Likewise.
12259         (vect_supportable_dr_alignment): Likewise.
12260         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12261         (vect_gen_prolog_loop_niters): Likewise.
12262         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12263         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
12264         modify DR_STMT.
12265         (vect_recog_mask_conversion_pattern): Likewise.
12266         (vect_try_gather_scatter_pattern): Likewise.
12267         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
12268         to vect_get_store_cost.
12269         (vect_get_store_cost): Get stmt_info instead of DR.
12270         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
12271         (vect_get_load_cost): Get stmt_info instead of DR.
12273 2018-06-01  Richard Biener  <rguenther@suse.de>
12275         PR middle-end/86017
12276         * gimple-fold.c (var_decl_component_p): Also allow offsetted
12277         vars wrapped in MEM_REFs.
12279 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
12281         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
12282         Fix subreg tests so that we only return a choice between
12283         GENERAL_REGS and FP_REGS if the original classes included both.
12285 2018-06-01  Richard Biener  <rguenther@suse.de>
12287         PR ipa/85960
12288         * tree-ssa-structalias.c (get_function_part_constraint):
12289         Handle NULL fi->decl.
12290         (find_func_aliases_for_call): Properly handle indirect
12291         fi from direct call.
12292         (find_func_clobbers): Likewise.
12293         (ipa_pta_execute): Likewise.
12294         (create_variable_info_for): For functions that are ifunc_resolver
12295         resolve to a varinfo that contains the result of the resolver call.
12296         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
12297         aliases.
12299 2018-05-31  Michael Collison  <michael.collison@arm.com>
12301         * config/aarch64/aarch64.md:
12302         (*fix_to_zero_extenddfdi2): New pattern.
12303         * gcc.target/aarch64/fix_extend1.c: New testcase.
12305 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
12307         PR middle-end/78809
12308         PR middle-end/83026
12309         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
12310         and BUILT_IN_STRNCMP_EQ.
12311         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
12312         BUILT_IN_STRNCMP_EQ.
12313         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
12314         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
12315         (gimple_fold_builtin): Likewise.
12316         * tree-ssa-strlen.c (compute_string_length): New function.
12317         (determine_min_obsize): New function.
12318         (handle_builtin_string_cmp): New function to handle calls to
12319         string compare functions.
12320         (strlen_optimize_stmt): Add handling to builtin string compare
12321         calls.
12322         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
12323         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
12324         * tree.c (build_common_builtin_nodes): Add new defines of
12325         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
12327 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
12329         PR target/85984
12330         * bb-reorder.c (pass_partition_blocks::gate): Return false for
12331         functions with naked attribute.
12333 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
12335         * config/i386/sse.md (avx_vec_concat<mode>):
12336         Substitute concat_tg_mode mode attribute with xtg_mode.
12337         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
12338         (concat_tg_mode): Remove mode attribute.
12340 2018-05-31  Martin Sebor  <msebor@redhat.com>
12342         PR c/82063
12343         * calls.c (alloc_max_size): Correct a logic error/typo.
12344         Treat excessive arguments as infinite.  Warn for invalid arguments.
12345         * doc/invoke.texi (-Walloc-size-larger-than): Update.
12347 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
12349         PR target/85829
12350         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
12351         and movx for Haswell.
12353 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
12354             Cesar Philippidis  <cesar@codesourcery.com>
12356         PR middle-end/85879
12357         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
12358         when emitting error on private/firstprivate reductions.
12359         * omp-low.c (lower_omp_target): Avoid reference-type processing
12360         on pointers for firstprivate clause.
12362 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
12364         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
12365         (st1x2): Likewise.
12366         (st1x3): Likewise.
12367         * config/aarch64/aarch64-simd.md
12368         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
12369         (aarch64_ld1_x3_<mode>): Likewise
12370         (aarch64_st1x2<VALLDIF:mode>): Likewise
12371         (aarch64_st1_x2_<mode>): Likewise
12372         (aarch64_st1x3<VALLDIF:mode>): Likewise
12373         (aarch64_st1_x3_<mode>): Likewise
12374         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
12375         (vld1_s8_x3): Likewise.
12376         (vld1_u16_x3): Likewise.
12377         (vld1_s16_x3): Likewise.
12378         (vld1_u32_x3): Likewise.
12379         (vld1_s32_x3): Likewise.
12380         (vld1_u64_x3): Likewise.
12381         (vld1_s64_x3): Likewise.
12382         (vld1_f16_x3): Likewise.
12383         (vld1_f32_x3): Likewise.
12384         (vld1_f64_x3): Likewise.
12385         (vld1_p8_x3): Likewise.
12386         (vld1_p16_x3): Likewise.
12387         (vld1_p64_x3): Likewise.
12388         (vld1q_u8_x3): Likewise.
12389         (vld1q_s8_x3): Likewise.
12390         (vld1q_u16_x3): Likewise.
12391         (vld1q_s16_x3): Likewise.
12392         (vld1q_u32_x3): Likewise.
12393         (vld1q_s32_x3): Likewise.
12394         (vld1q_u64_x3): Likewise.
12395         (vld1q_s64_x3): Likewise.
12396         (vld1q_f16_x3): Likewise.
12397         (vld1q_f32_x3): Likewise.
12398         (vld1q_f64_x3): Likewise.
12399         (vld1q_p8_x3): Likewise.
12400         (vld1q_p16_x3): Likewise.
12401         (vld1q_p64_x3): Likewise.
12402         (vst1_s64_x2): Likewise.
12403         (vst1_u64_x2): Likewise.
12404         (vst1_f64_x2): Likewise.
12405         (vst1_s8_x2): Likewise.
12406         (vst1_p8_x2): Likewise.
12407         (vst1_s16_x2): Likewise.
12408         (vst1_p16_x2): Likewise.
12409         (vst1_s32_x2): Likewise.
12410         (vst1_u8_x2): Likewise.
12411         (vst1_u16_x2): Likewise.
12412         (vst1_u32_x2): Likewise.
12413         (vst1_f16_x2): Likewise.
12414         (vst1_f32_x2): Likewise.
12415         (vst1_p64_x2): Likewise.
12416         (vst1q_s8_x2): Likewise.
12417         (vst1q_p8_x2): Likewise.
12418         (vst1q_s16_x2): Likewise.
12419         (vst1q_p16_x2): Likewise.
12420         (vst1q_s32_x2): Likewise.
12421         (vst1q_s64_x2): Likewise.
12422         (vst1q_u8_x2): Likewise.
12423         (vst1q_u16_x2): Likewise.
12424         (vst1q_u32_x2): Likewise.
12425         (vst1q_u64_x2): Likewise.
12426         (vst1q_f16_x2): Likewise.
12427         (vst1q_f32_x2): Likewise.
12428         (vst1q_f64_x2): Likewise.
12429         (vst1q_p64_x2): Likewise.
12430         (vst1_s64_x3): Likewise.
12431         (vst1_u64_x3): Likewise.
12432         (vst1_f64_x3): Likewise.
12433         (vst1_s8_x3): Likewise.
12434         (vst1_p8_x3): Likewise.
12435         (vst1_s16_x3): Likewise.
12436         (vst1_p16_x3): Likewise.
12437         (vst1_s32_x3): Likewise.
12438         (vst1_u8_x3): Likewise.
12439         (vst1_u16_x3): Likewise.
12440         (vst1_u32_x3): Likewise.
12441         (vst1_f16_x3): Likewise.
12442         (vst1_f32_x3): Likewise.
12443         (vst1_p64_x3): Likewise.
12444         (vst1q_s8_x3): Likewise.
12445         (vst1q_p8_x3): Likewise.
12446         (vst1q_s16_x3): Likewise.
12447         (vst1q_p16_x3): Likewise.
12448         (vst1q_s32_x3): Likewise.
12449         (vst1q_s64_x3): Likewise.
12450         (vst1q_u8_x3): Likewise.
12451         (vst1q_u16_x3): Likewise.
12452         (vst1q_u32_x3): Likewise.
12453         (vst1q_u64_x3): Likewise.
12454         (vst1q_f16_x3): Likewise.
12455         (vst1q_f32_x3): Likewise.
12456         (vst1q_f64_x3): Likewise.
12457         (vst1q_p64_x3): Likewise.
12459 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12461         * config/msp430/msp430.c (msp430_output_labelref): Prepend
12462         user_label_prefix to name.
12464         * tree-core.h: Update comment about the format of NAME string
12465         passed to handler in attribute_spec.
12467         * config/msp430/msp430.md: Remove erroneous subreg expression from
12468         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
12469         zero_extend{q,h}isi2.
12471 2018-05-30  Borislav Petkov  <bp@suse.de>
12473         * doc/extend.texi: Document some architecture specific
12474         constraints and sort entries.
12476 2018-05-30  Martin Sebor  <msebor@redhat.com>
12478         PR middle-end/85369
12479         * builtins.c (expand_builtin_stpcpy_1): New function.
12480         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
12481         only if the former succeeds.
12483 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
12485         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
12486         in saphira.
12488 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
12490         * doc/invoke.texi (-flinker-output): Document
12492 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
12494         * passes.c (ipa_write_summaries): Only modify statements if body
12495         is in memory.
12496         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
12497         incrementally linking.
12498         (ipa_passes): Likewise.
12499         * lto-cgraph.c (lto_output_node): When incrementally linking do not
12500         pass down resolution info.
12501         * common.opt (flag_incremental_link): Update info.
12502         * gcc.c (plugin specs): Turn flinker-output=* to
12503         -plugin-opt=-linker-output-known
12504         * toplev.c (compile_file): Also cut compilation when doing incremental
12505         link.
12506         * flag-types. (enum lto_partition_model): Add
12507         LTO_LINKER_OUTPUT_NOLTOREL.
12508         (invoke.texi): Add -flinker-output docs.
12509         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
12510         link same way as WPA; do not stream in dead initializers.
12512         * dwarf2out.c (dwarf2out_die_ref_for_decl,
12513         darf2out_register_external_decl): Support incremental link.
12515 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
12517         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
12519 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
12521         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
12522         it down to simple_object_copy_lto_debug_sections.
12523         (run_gcc): Determine incremental LTO link time and configure
12524         lto1 into non-wpa mode, disable renaming of debug sections.
12526 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12528         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12529         descriptions of various incorrectly documented functions.
12531 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12533         Revert:
12534         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12535         address check not strict.
12537 2018-05-30  Richard Biener  <rguenther@suse.de>
12539         PR tree-optimization/85964
12540         * tracer.c (better_p): Drop initialized count check, we only
12541         call the function with initialized counts now.
12542         (find_best_successor): Do find a best edge if one
12543         has uninitialized count.
12544         (find_best_predecessor): Likewise.  Do BB frequency check only
12545         if count is initialized.
12547 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
12549         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
12550         (aarch64_ldrstr_offset_compare): New.
12551         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
12552         load/store orderings.
12553         (aarch64_gen_adjusted_ldpstp): Likewise.
12555 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
12557         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
12558         Check for subset of GENERAL_REGS and FP_REGS.
12559         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
12560         r=w alternative.
12562 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
12564         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
12565         and wi::to_poly_offset.  Add the current offset and then check
12566         whether the sum fits, rather than using an unchecked addition of
12567         a checked term.  Check for a shwi rather than a uhwi.
12568         * expr.c (get_bit_range): Use tree_to_poly_uint64.
12569         (store_constructor): Use poly_int_tree_p.
12570         (expand_expr_real_1): Likewise.
12571         * function.c (assign_temp): Likewise.
12572         * fold-const.c (const_binop): Use poly_int_tree_p and
12573         wi::to_poly_offset.
12574         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
12575         division.
12576         * ipa-icf-gimple.c (func_checker::compare_operand): Use
12577         to_poly_offset for MEM offsets.
12578         * ipa-icf.c (sem_variable::equals): Likewise.
12579         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
12580         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
12581         wi::to_poly_offset for BIT_FIELD_REF offsets.
12582         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
12583         wi::to_poly_offset.
12584         * var-tracking.c (emit_note_insn_var_location): Use
12585         tree_to_poly_uint64.
12587 2018-05-29  Jim Wilson  <jimw@sifive.com>
12589         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
12591 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
12593         PR target/85950
12594         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
12595         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
12596         sequence.
12597         (sse4_1_round<mode>2): Use nonimmediate_operand
12598         for operand 1 predicate.
12600 2018-05-29  Martin Sebor  <msebor@redhat.com>
12601             Richard Biener  <rguenther@suse.de>
12603         PR testsuite/85888
12604         * calls.c (get_size_range): Call determine_value_range instead
12605         of get_value_range..
12606         * tree-vrp.h (determine_value_range): Declared new function.
12607         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
12609 2018-05-29  Richard Biener  <rguenther@suse.de>
12611         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
12612         sure to use non-pattern stmts for get_earlier_stmt arguments.
12613         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
12614         called on pattern stmts.
12615         (get_later_stmt): Likewise.
12617 2018-05-29  Martin Liska  <mliska@suse.cz>
12619         PR gcov-profile/85759
12620         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
12621         env variables.
12623 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
12625         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
12626         VEC_UNPACK_*_EXPR.
12627         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
12628         VEC_PACK_*_EXPR.
12630         PR target/85918
12631         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
12632         VEC_PACK_FLOAT_EXPR): New tree codes.
12633         * tree-pretty-print.c (op_code_prio): Handle
12634         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
12635         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
12636         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
12637         * tree-inline.c (estimate_operator_cost): Likewise.
12638         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
12639         * fold-const.c (const_binop): Likewise.
12640         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
12641         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
12642         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12643         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
12644         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
12645         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
12646         * expr.c (expand_expr_real_2): Likewise.
12647         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
12648         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
12649         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
12650         optabs.
12651         * optabs.c (expand_widen_pattern_expr): For
12652         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
12653         sign from result type rather than operand's type.
12654         (expand_binop_directly): For vec_packu_float_optab and
12655         vec_packs_float_optab allow result type to be different from operand's
12656         type.
12657         * optabs-tree.c (optab_for_tree_code): Handle
12658         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
12659         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
12660         * tree-vect-generic.c (expand_vector_operations_1):  Handle
12661         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
12662         VEC_PACK_FLOAT_EXPR.
12663         * tree-vect-stmts.c (supportable_widening_operation): Handle
12664         FIX_TRUNC_EXPR.
12665         (supportable_narrowing_operation): Handle FLOAT_EXPR.
12666         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
12667         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
12668         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
12669         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
12670         mode attributes.
12671         (vec_pack<floatprefix>_float_<mode>): New expander.
12672         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
12673         attributes.
12674         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
12675         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
12676         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
12677         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
12678         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
12679         Document.
12680         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
12681         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
12682         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
12683         VEC_PACK_FLOAT_EXPR): Document.
12685 2018-05-29  Richard Biener  <rguenther@suse.de>
12687         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
12688         member.
12689         (stmt_vec_info_vec): Make pointer.
12690         (init_stmt_vec_info_vec): Remove.
12691         (free_stmt_vec_info_vec): Likewise.
12692         (set_stmt_vec_info_vec): New function.
12693         (free_stmt_vec_infos): Likewise.
12694         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
12695         (set_vinfo_for_stmt): Likewise.
12696         (get_earlier_stmt): Likewise.
12697         (get_later_stmt): Likewise.
12698         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
12699         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
12700         (vec_info::~vec_info): Free stmt_vec_infos.
12701         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
12702         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
12703         (pass_slp_vectorize::execute): Likewise.
12704         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
12705         (free_stmt_vec_info_vec): Likewise.
12706         (set_stmt_vec_info_vec): New function.
12707         (free_stmt_vec_infos): Likewise.
12708         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
12709         the global stmt_vec_info_vec.
12710         * tree-parloops.c (gather_scalar_reductions): Use
12711         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
12712         vector.
12714 2018-05-29  Richard Biener  <rguenther@suse.de>
12716         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
12718 2018-05-29  Martin Liska  <mliska@suse.cz>
12719             David Malcolm  <dmalcolm@redhat.com>
12721         * vec.c (test_reverse): New.
12722         (vec_c_tests): Add new test.
12723         * vec.h (vl_ptr>::reverse): New function.
12725 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
12727         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
12729         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
12730         and later.
12732 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12734         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
12736 2018-05-28  Richard Biener  <rguenther@suse.de>
12738         PR tree-optimization/85933
12739         * tree-vect-data-refs.c (vect_record_base_alignments): Only
12740         look at stmts marked as vectorizable.
12742 2018-05-28  Richard Biener  <rguenther@suse.de>
12744         PR tree-optimization/85934
12745         * tree-vect-generic.c (expand_vector_operations_1): Hoist
12746         vector boolean check before scalar optimization.
12748 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
12750         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
12751         for armv5te.
12753 2018-05-28  Mark Wielaard  <mark@klomp.org>
12755         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
12756         if it is an expression containing a minus sign.
12758 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
12760         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
12762 2018-05-27  Paul Koning  <ni1d@arrl.net>
12764         * config/pdp11/pdp11.md (truncsihi2): Remove.
12766 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
12767             Chung-Ju Wu  <jasonwucj@gmail.com>
12769         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
12770         implementation.
12771         (unaligned_store_dw): Ditto.
12772         * config/nds32/nds32-memory-manipulation.c
12773         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
12774         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
12775         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
12776         (emit_setmem_word_loop): Rename to ...
12777         (emit_setmem_doubleword_loop): ... this.
12778         (nds32_gen_dup_4_byte_to_word_value): New function.
12779         (nds32_gen_dup_8_byte_to_double_word_value): New function.
12780         (nds32_expand_setmem_loop): Refine implementation.
12781         (nds32_expand_setmem_loop_v3m): Ditto.
12782         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
12783         pattern.
12785 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12787         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
12789 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12791         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
12792         (nds32_init_machine_status): Initialize machine->attr_naked_p and
12793         machine->attr_no_prologue_p.
12794         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
12795         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
12796         (nds32_expand_epilogue): Consider attr_naked_p.
12797         (nds32_expand_epilogue_v3pop): Likewise.
12798         (nds32_can_use_return_insn): Likewise.
12799         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
12800         attr_no_prologue_p fields.
12801         * config/nds32/nds32.opt (mret-in-naked-func): New option.
12803 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
12805         PR target/85918
12806         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
12807         attributes.
12808         * config/i386/sse.md
12809         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
12810         Rename to ...
12811         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
12812         ... this.
12813         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
12814         Rename to ...
12815         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
12816         ... this.
12817         (*<floatsuffix>floatv2div2sf2): Rename to ...
12818         (*float<floatunssuffix>v2div2sf2): ... this.
12819         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
12820         (float<floatunssuffix>v2div2sf2_mask): ... this.
12821         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
12822         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
12823         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
12824         to ...
12825         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
12826         ... this.
12827         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
12828         Rename to ...
12829         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
12830         ... this.
12831         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
12832         Rename to ...
12833         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
12834         ... this.
12835         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
12836         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
12837         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
12838         gen_ufix_truncv8dfv8si2.
12839         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
12840         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
12841         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
12842         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
12843         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
12844         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
12845         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
12846         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
12848 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
12850         PR target/85900
12851         PR target/85345
12852         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
12854 2018-05-25  Jim Wilson  <jimw@sifive.com>
12856         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
12857         * config/riscv/riscv.c (struct machine_function): Add
12858         interrupt_handler_p and attribute_checked_p fields.
12859         (riscv_attribute_table): Add interrupt.
12860         (riscv_interrupt_type_p): New.
12861         (riscv_save_reg_p): Save extra regs for interrupt handler.
12862         (riscv_use_save_libcall): Return false  for interrupt handler.
12863         (riscv_first_stack_step): Add forward declaration.
12864         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
12865         for interrupt handler with large frame.  Use it for saved reg list.
12866         (riscv_expand_prologue): Move flag_stack_usage_info support to
12867         eliminate duplication.
12868         (riscv_expand_epilogue): Generate mret for interrupt handler.
12869         (riscv_epilogue_uses): New.
12870         (riscv_can_use_return_insn): Return false for interrupt handler.
12871         (riscv_function_ok_for_sibcall): Likewise.
12872         (riscv_set_current_function): Add interrupt handler support.
12873         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
12874         * config/riscv/riscv.md (UNSPECV_MRET): New.
12875         (GP_REGNUM): New.
12876         (riscv_frflags, riscv_fsflags): Use tab after opcode.
12877         (riscv_mret): New.
12878         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
12880 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
12882         PR tree-optimization/85712
12883         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
12884         this candidate has already been replaced in-situ by a copy.
12886 2018-05-25  Jason Merrill  <jason@redhat.com>
12888         PR c++/80485 - inline function non-zero address.
12889         * symtab.c (nonzero_address): Check DECL_COMDAT.
12891 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
12893         PR target/83628
12894         * config/alpha/alpha.md (ashlsi3): New insn pattern.
12895         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
12896         extension of SImode operation.  Use const123_operand predicate.
12897         (*saddsi_1): Remove.
12898         (*saddl_se_1): Ditto.
12899         (*ssubsi_1): Ditto.
12900         (*ssubl_se_1): Ditto.
12901         * config/alpha/predicates.md (const123_operand): New predicate.
12902         * config/alpha/constraints.md (P): Use IN_RANGE.
12904 2018-05-25  Richard Biener  <rguenther@suse.de>
12906         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
12907         defaulted to true.
12908         (ref_maybe_used_by_stmt_p): Likewise.
12909         (stmt_may_clobber_ref_p): Likewise.
12910         (stmt_may_clobber_ref_p_1): Likewise.
12911         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
12912         and pass it along.
12913         (ref_maybe_used_by_stmt_p): Likewise.
12914         (stmt_may_clobber_ref_p): Likewise.
12915         (stmt_may_clobber_ref_p_1): Likewise.
12916         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
12917         the alias oracle to disambiguate DRs with stmts DR analysis
12918         couldn't handle.
12919         (vect_analyze_data_refs): Do not give up on not analyzable
12920         DRs for BB vectorization.  Remove code truncating the dataref
12921         vector.
12923 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
12925         PR target/85832
12926         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12927         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
12928         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
12930 2018-05-25  Richard Biener  <rguenther@suse.de>
12932         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
12933         function, combining stmt data ref gathering and fatal analysis
12934         parts.
12935         (vect_analyze_data_refs): Remove now redudnant code and simplify.
12936         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
12937         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
12938         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
12939         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
12941 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
12943         PR tree-optimization/85720
12944         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
12945         SCC if all partitions are builtins.
12946         (version_loop_by_alias_check): New parameter.  Generate cancelable
12947         runtime alias check if all partitions are builtins.
12948         (distribute_loop): Update call to above function.
12950 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
12952         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
12953         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
12954         (parm_default_def_partition_arg): Ditto.
12955         (set_parm_default_def_partition): Ditto.
12956         (get_parm_default_def_partitions): Ditto and make it static.
12957         (get_undefined_value_partitions): Ditto and make it static.
12958         (remove_ssa_form): Refactor call to init_var_map here.
12959         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
12960         computation for loop region.
12961         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
12962         (register_default_def): Delete.
12963         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
12964         (parm_default_def_partition_arg): Ditto.
12965         (set_parm_default_def_partition): Ditto.
12966         (get_parm_default_def_partitions): Ditto and make it static.
12967         (get_undefined_value_partitions): Ditto and make it static.
12968         (coalesce_with_default, coalesce_with_default): Update comment.
12969         (create_coalesce_list_for_region): New func factored out from
12970         create_outofssa_var_map.
12971         (populate_coalesce_list_for_outofssa): New func factored out from
12972         create_outofssa_var_map and coalesce_ssa_name.
12973         (create_outofssa_var_map): Delete.
12974         (coalesce_ssa_name): Refactor to support live range computation.
12975         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
12976         (get_parm_default_def_partitions): Delete.
12977         (get_undefined_value_partitions): Ditto.
12978         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
12979         computation for loop region.
12980         (new_tree_live_info, loe_visit_block): Ditto.
12981         (live_worklist, set_var_live_on_entry): Ditto.
12982         (calculate_live_on_exit, verify_live_on_entry): Ditto.
12983         * tree-ssa-live.h (struct _var_map): New fields.
12984         (init_var_map): Change decl.
12985         (region_contains_p): New.
12987 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
12989         * tree-ssa-live.h (live_merge_and_clear): Delete.
12991 2018-05-25  Richard Biener  <rguenther@suse.de>
12993         PR c++/85912
12994         * tree-dump.c (dequeue_and_dump): Remove access to removed
12995         operand 2 of a SWITCH_EXPR.
12997 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
12999         * doc/sourcebuild.texi (vect_double_cond_arith): Include
13000         multiplication and division.
13001         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13002         (cond_udiv@var{m}, cond_umod@var{m}): Document.
13003         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13004         (cond_udiv_optab, cond_umod_optab): New optabs.
13005         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13006         (IFN_COND_RDIV): New internal functions.
13007         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13008         TRUNC_MOD_EXPR and RDIV_EXPR.
13009         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13010         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13011         New unspecs.
13012         (SVE_INT_BINARY): Include mult.
13013         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13014         (optab, sve_int_op): Handle mult.
13015         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13016         UNSPEC_COND_DIV.
13017         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13018         for SVE_INT_BINARY_SD.
13020 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13022         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13023         (optab, sve_int_op): Handle div and udiv.
13024         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13025         for SVE_INT_BINARY_SD.
13026         (*<optab><mode>3): New insn for the same.
13028 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13030         * tree-vect-patterns.c: Include predict.h.
13031         (vect_recog_divmod_pattern): Restrict check for division support
13032         to when optimizing for size.
13034 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13036         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13037         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13038         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13039         (gimple_match_op::set_op): Likewise.
13040         (gimple_resimplify4): Declare.
13041         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13042         (expr::gen_transform): Likewise.
13043         (decision_tree::gen): Generate a simplification routine for 4 operands.
13044         * gimple-match-head.c (gimple_simplify): Add an overload for
13045         4 operands.  In the top-level function, handle up to 4 call
13046         arguments and call gimple_resimplify4.
13047         (gimple_resimplify4): New function.
13048         (build_call_internal): Pass a fourth operand.
13049         (maybe_push_to_seq): Likewise.
13050         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13051         Fold VEC_COND_EXPRs of an operation and a default value into
13052         an IFN_COND_* function if possible.
13053         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13054         New unspecs.
13055         (SVE_COND_FP_BINARY): Include them.
13056         (optab, sve_fp_op): Handle them.
13057         (SVE_INT_BINARY_REV): New code iterator.
13058         (SVE_COND_FP_BINARY_REV): New int iterator.
13059         (commutative): New int attribute.
13060         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13061         Declare.
13062         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13063         function.
13064         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13065         (*cond_<optab><mode>): New patterns for reversed operands.
13067 2018-05-25  Richard Biener  <rguenther@suse.de>
13069         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13070         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13071         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13072         (STMT_VINFO_GROUPED_ACCESS): Adjust.
13073         * tree-vect-data-refs.c (everywhere): Adjust users.
13074         * tree-vect-loop.c (everywhere): Likewise.
13075         * tree-vect-slp.c (everywhere): Likewise.
13076         * tree-vect-stmts.c (everywhere): Likewise.
13077         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13079 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13081         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13082         Rename to...
13083         (gcc_cv_as_section_exclude): ... this.
13084         Try Solaris as #exclude syntax.
13085         * configure: Regenerate.
13086         * config.in: Regenerate.
13087         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13088         SECTION_EXCLUDE.
13089         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13090         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13092         * varasm.c (default_elf_asm_named_section): Don't check if
13093         HAVE_GAS_SECTION_EXCLUDE is defined.
13095 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13097         * doc/md.texi: Update the documentation of the cond_* optabs
13098         to mention the new final operand.  Fix GET_MODE_NUNITS call.
13099         Describe the scalar case too.
13100         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13101         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13102         instead of 2.
13103         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13104         (get_conditional_internal_fn): Update comment.
13105         * tree-vect-loop.c (vectorizable_reduction): Pass the original
13106         accumulator value as a final argument to conditional functions.
13107         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13108         a define_expand and add an "else" operand.  Assert for now that
13109         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
13110         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13111         (*cond_<optab><mode>): New patterns.
13112         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13113         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13114         (UNSPEC_COND_EOR): Delete.
13115         (optab): Remove associated mappings.
13116         (SVE_INT_BINARY): New code iterator.
13117         (sve_int_op): Remove int attribute and add "minus" to the code
13118         attribute.
13119         (SVE_COND_INT_OP): Delete.
13120         (SVE_COND_FP_OP): Rename to...
13121         (SVE_COND_FP_BINARY): ...this.
13123 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
13125         * optabs.c (can_reuse_operands_p): New function.
13126         (maybe_legitimize_operands): Try to reuse the results for
13127         earlier operands.
13129 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13131         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13132         Add {q} suffix to insn mnemonic.
13134 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13136         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13137         (msp430_warn_func_return): New.
13139 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
13141         * fold-const.c (tree_nonzero_bits): New function.
13142         * fold-const.h (tree_nonzero_bits): Likewise.
13143         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13144         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13146 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
13148         PR target/85900
13149         PR target/85345
13150         * varasm.c (assemble_alias): Check ifunc_resolver only on
13151         FUNCTION_DECL.
13153 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
13155         PR target/85903
13156         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
13157         when memory input operand is handled.
13159 2018-05-24  Luis Machado  <luis.machado@linaro.org>
13161         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
13162         global.
13163         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
13165 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13167         * match.pd: Delay FMA folds until after vectorization.
13169 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13171         PR target/83009
13172         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13173         address check not strict.
13175 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
13177         * gimple-match.h (gimple_match_op): New class.
13178         (mprts_hook): Replace parameters with a gimple_match_op *.
13179         (maybe_build_generic_op): Likewise.
13180         (gimple_simplified_result_is_gimple_val): Replace parameters with
13181         a const gimple_match_op *.
13182         (gimple_simplify): Replace code_helper * and tree * parameters with
13183         a gimple_match_op * parameter.
13184         (gimple_resimplify1): Replace code_helper *, tree and tree *
13185         parameters with a gimple_match_op * parameter.
13186         (gimple_resimplify2): Likewise.
13187         (gimple_resimplify3): Likewise.
13188         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
13189         parameters with a gimple_match_op * parameter.
13190         * gimple-match-head.c (gimple_simplify): Change prototypes of
13191         auto-generated functions to take a gimple_match_op * instead of
13192         separate code_helper * and tree * parameters.  Make the same
13193         change in the top-level overload and update calls to the
13194         gimple_resimplify routines.  Update calls to the auto-generated
13195         functions and to maybe_push_res_to_seq in the publicly-facing
13196         operation-specific gimple_simplify overloads.
13197         (gimple_match_op::MAX_NUM_OPS): Define.
13198         (gimple_resimplify1): Replace rcode and ops with a single res_op
13199         parameter.  Update call to gimple_simplify.
13200         (gimple_resimplify2): Likewise.
13201         (gimple_resimplify3): Likewise.
13202         (mprts_hook): Replace parameters with a gimple_match_op *.
13203         (maybe_build_generic_op): Likewise.
13204         (build_call_internal): Replace type, nargs and ops with
13205         a gimple_match_op *.
13206         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
13207         with a single gimple_match_op *.  Update calls to mprts_hook,
13208         build_call_internal and gimple_simplified_result_is_gimple_val.
13209         Factor out code that is common to the tree_code and combined_fn cases.
13210         * genmatch.c (expr::gen_transform): Replace tem_code and
13211         tem_ops with a gimple_match_op called tem_op.  Update calls
13212         to the gimple_resimplify functions and maybe_push_res_to_seq.
13213         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
13214         res_ops.  Update call to the gimple_resimplify functions.
13215         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
13216         (decision_tree::gen): Make the functions take a gimple_match_op *
13217         called res_op instead of separate res_code and res_ops parameters.
13218         Update call accordingly.
13219         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
13220         and ops with a single res_op parameter.  Update calls to
13221         maybe_build_generic_op and maybe_push_res_to_seq.
13222         (fold_stmt_1): Update calls to gimple_simplify and
13223         replace_stmt_with_simplification.
13224         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
13225         and gimple_simplified_result_is_gimple_val.
13226         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
13227         gimple_simplify.
13228         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
13229         with a gimple_match_op *.
13230         (vn_nary_build_or_lookup): Likewise.  Update call to
13231         vn_nary_build_or_lookup_1.
13232         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
13233         gimple_match_op *.  Update calls to the gimple_resimplify routines
13234         and to gimple_simplified_result_is_gimple_val.
13235         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
13236         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
13237         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
13238         (visit_nary_op): Likewise.
13239         (visit_reference_op_load): Likewise.
13241 2018-05-23  Luis Machado  <luis.machado@linaro.org>
13243         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
13244         modifier for printing the step amount.
13246 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
13248         PR target/78849
13249         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
13250         types.
13252 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
13254         * doc/sourcebuild.texi (Endianness): New subsubsection.
13256 2018-05-23  Luis Machado  <luis.machado@linaro.org>
13258         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13259         <prefetch_dynamic_strides>: New const bool field.
13260         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13261         prefetch_dynamic_strides.
13262         (exynosm1_prefetch_tune): Likewise.
13263         (thunderxt88_prefetch_tune): Likewise.
13264         (thunderx_prefetch_tune): Likewise.
13265         (thunderx2t99_prefetch_tune): Likewise.
13266         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
13267         false.
13268         (aarch64_override_options_internal): Update to set
13269         PARAM_PREFETCH_DYNAMIC_STRIDES.
13270         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13271         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13272         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13273         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13274         prefetch-dynamic-strides setting.
13276 2018-05-23  Luis Machado  <luis.machado@linaro.org>
13278         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13279         <minimum_stride>: New const int field.
13280         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13281         minimum_stride field defaulting to -1.
13282         (exynosm1_prefetch_tune): Likewise.
13283         (thunderxt88_prefetch_tune): Likewise.
13284         (thunderx_prefetch_tune): Likewise.
13285         (thunderx2t99_prefetch_tune): Likewise.
13286         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
13287         <default_opt_level>: Set to 3.
13288         (aarch64_override_options_internal): Update to set
13289         PARAM_PREFETCH_MINIMUM_STRIDE.
13290         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13291         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13292         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13293         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13294         stride is constant and is below the minimum stride threshold.
13296 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13298         * config/arm/arm-cpus.in (mode26): Delete.
13299         (armv4): Delete mode26 reference.
13300         * config/arm/arm.c (arm_configure_build_target): Delete use of
13301         isa_bit_mode26.
13303 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
13305         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
13306         New insn pattern.
13307         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
13308         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
13309         for non-SSE modes.
13310         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
13311         (floatunsdidf2): Ditto.
13313 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
13315         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
13316         (fixuns_trunc<mode>si2_avx512f): Ditto.
13317         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
13318         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
13319         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
13321 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
13323         PR rtl-optimization/79985
13324         * df-scan.c (df_insn_refs_collect): Remove special case for
13325         global registers and asm statements.
13327 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
13329         * extend.texi (Global Register Variables): Rewrite the bullet list.
13330         Note that the register is available for allocation. Note that access
13331         via inline asm must use constraints. Add note about async-signal
13332         handlers. Remove paragraph about automagic register selection.
13334 2018-05-23  Richard Biener  <rguenther@suse.de>
13336         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
13337         of fixed offset from memset VN.
13339 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
13341         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
13342         first_interp field.
13343         (alloc_cand_and_find_basis): Initialize first_interp field.
13344         (slsr_process_mul): Modify first_interp field.
13345         (slsr_process_add): Likewise.
13346         (slsr_process_cast): Modify first_interp field for each new
13347         interpretation.
13348         (slsr_process_copy): Likewise.
13349         (dump_candidate): Dump first_interp field.
13350         (replace_mult_candidate): Process all interpretations, not just
13351         subsequent ones.
13352         (replace_rhs_if_not_dup): Likewise.
13353         (replace_one_candidate): Likewise.
13355 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
13357         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
13358         Add new boolean.
13359         (aarch64_needs_frame_chain): New function.
13360         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
13362 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
13364         PR target/84882
13365         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
13366         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
13367         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
13368         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
13369         as true for strict-align.
13370         (aarch64_can_inline_p): Perform checks even when callee has no
13371         attributes to check for strict alignment.
13372         * doc/extend.texi (AArch64 Function Attributes): Document
13373         no-strict-align.
13374         * doc/invoke.texi: (AArch64 Options): Likewise.
13376 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
13378         PR tree-optimization/85853
13379         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
13380         the handling of the root of the node to...
13381         (vect_slp_analyze_node_operations_1): ...this new function,
13382         and run the whole thing with the child nodes' def types
13383         set according to their SLP node's def type.
13385 2018-05-23  Richard Biener  <rguenther@suse.de>
13387         PR middle-end/85874
13388         * tree-data-ref.c (create_runtime_alias_checks): Defer
13389         and ignore overflow warnings.
13391 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
13393         PR tree-optimization/85822
13394         * tree-vrp.c (is_masked_range_test): Fix handling of negative
13395         constants.
13397 2018-05-23  Richard Biener  <rguenther@suse.de>
13399         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13400         memset constants via native_interpret_expr.
13402 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
13404         PR target/85345
13405         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
13406         attribute.
13407         (cgraph_node::create_alias): Likewise.
13408         (cgraph_node::get_availability): Check ifunc_resolver instead
13409         of looking up ifunc attribute.
13410         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
13411         * varasm.c (do_assemble_alias): Likewise.
13412         (assemble_alias): Likewise.
13413         (default_binds_local_p_3): Likewise.
13414         * cgraph.h (cgraph_node): Add ifunc_resolver.
13415         (cgraph_node::only_called_directly_or_aliased_p): Return false
13416         for IFUNC resolver.
13417         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
13418         attribute.
13419         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
13420         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
13421         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
13422         instead of looking up ifunc attribute.
13424 2018-05-22  Luis Machado  <luis.machado@linaro.org>
13426         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
13428 2018-05-22  Martin Sebor  <msebor@redhat.com>
13430         PR middle-end/85359
13431         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
13432         only when expasion succeeds.
13433         (expand_builtin_strcmp): Same.
13434         (expand_builtin_strncmp): Same.
13436 2018-05-22  Martin Sebor  <msebor@redhat.com>
13438         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
13440 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
13441             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13443         * config/aarch64/aarch64-ldpstp.md: Replace uses of
13444         aarch64_mem_pair_operand with memory_operand and delete operand swapping
13445         code.
13446         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
13447         Add check for legitimate_address.
13448         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
13449         (aarch64_swap_ldrstr_operands): New.
13450         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
13451         Define prototype.
13453 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
13454             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13456         * config/aarch64/aarch64.md: New patterns to generate stp
13457         and ldp.
13458         (store_pair_sw, store_pair_dw): New patterns to generate stp for
13459         single words and double words.
13460         (load_pair_sw, load_pair_dw): Likewise.
13461         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
13462         Delete.
13463         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
13464         Delete.
13465         * config/aarch64/aarch64-ldpstp.md: Modify peephole
13466         for different mode ldpstp and add peephole for merged zero stores.
13467         Likewise for loads.
13468         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
13469         Add size check.
13470         (aarch64_gen_store_pair): Rename calls to match new patterns.
13471         (aarch64_gen_load_pair): Rename calls to match new patterns.
13472         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
13473         (load_pair<DREG:mode><DREG2:mode>): ... This.
13474         (store_pair<mode>): Rename to...
13475         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
13476         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
13477         New mode iterators.
13478         (V_INT_EQUIV): Handle SImode.
13479         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
13480         New predicate.
13482 2018-05-22  Martin Sebor  <msebor@redhat.com>
13484         PR c/85623
13485         * calls.c (maybe_warn_nonstring_arg): Use string length to set
13486         or ajust the presumed bound on an operation to avoid unnecessary
13487         warnings.
13489 2018-05-22  Martin Sebor  <msebor@redhat.com>
13491         PR tree-optimization/85826
13492         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
13493         assuming that a DECL necesarily has a constant size.
13495 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
13497         PR middle-end/85862
13498         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
13500 2018-05-22  Richard Biener  <rguenther@suse.de>
13502         PR tree-optimization/85834
13503         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
13504         non-constant and non-zero memset arguments.
13506 2018-05-22  Martin Liska  <mliska@suse.cz>
13508         PR ipa/85607
13509         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
13511 2018-05-22  Richard Biener  <rguenther@suse.de>
13513         PR tree-optimization/85863
13514         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
13515         comparisons when vectype is specified.
13516         (vectorizable_condition): Do not specify vectype for
13517         vect_is_simple_cond when SLP vectorizing.
13519 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
13521         PR target/85657
13522         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
13523         define __ibm128 as long double.
13524         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
13525         as a distinct type when IEEE 128-bit support is enabled.
13526         (init_float128_ieee): Fix up conversions between IFmode and IEEE
13527         128-bit types to use the correct functions.
13528         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
13529         convert between 128-bit floating point types that have different
13530         modes but the same representation, instead of using gen_lowpart to
13531         makean alias.
13532         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
13533         KFmode.
13534         (IFKF_reg): New attributes to give the register constraints for
13535         IFmode and KFmode.
13536         (extend<mode>tf2_internal): New insns to mark an explicit
13537         conversion between 128-bit floating point types that have a
13538         different mode but share the same representation.
13540 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
13542         PR tree-optimization/85814
13543         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
13544         a null return from get_strinfo when unsharing the next
13545         strinfo in the chain.
13547 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
13549         PR gcc/84923
13550         * varasm.c (weak_finish): Clean up weak_decls.
13552 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13554         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
13555         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
13556         UNSPEC_UADALP values.
13557         * config/aarch64/iterators.md (ABAL): New int iterator.
13558         (ABDL2): Likewise.
13559         (ADALP): Likewise.
13560         (sur): Add mappings for the above.
13561         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
13562         New define_insn.
13563         (aarch64_<sur>abal<mode>_4): Likewise.
13564         (aarch64_<sur>adalp<mode>_3): Likewise.
13565         (<sur>sadv16qi): New define_expand.
13567 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
13569         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
13570         (*movdf_internal): Ditto.
13571         (*rcpsf2_sse): Ditto.
13572         (*rsqrtsf2_sse): Ditto.
13573         (*sqrt<mode>2_sse): Ditto.
13575 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
13577         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
13578         eor3q<mode>4.
13579         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
13580         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
13581         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
13582         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
13583         vbcaxq_s64): New.
13584         * config/aarch64/arm_neon.h: Likewise.
13585         * config/aarch64/iterators.md (VQ_I): New.
13587 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
13589         * config.gcc: Add arc/t-multilib-linux to tmake_file for
13590         arc*-*-linux*.
13591         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
13592         MULTILIB_DIRNAMES
13594 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
13596         * config/nds32/constraints.md (S): New constraint.
13597         * config/nds32/nds32.md (call_internal): Use constraint S.
13598         (call_value_internal): Likewise.
13599         (sibcall_internal): Likewise.
13600         (sibcall_value_internal): Likewise.
13602 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
13603             Chung-Ju Wu  <jasonwucj@gmail.com>
13605         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
13606         into consideration.
13608 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
13609             Chung-Ju Wu  <jasonwucj@gmail.com>
13611         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
13612         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
13613         (nds32_rtx_costs_impl): Simplify.
13614         (nds32_address_cost_impl): Simplify.
13615         (nds32_init_rtx_costs): New function.
13616         (nds32_rtx_costs_speed_prefer): Likewise.
13617         (nds32_rtx_costs_size_prefer): Likewise.
13618         (nds32_address_cost_speed_prefer): Likewise.
13619         (nds32_address_cost_speed_fwprop): Likewise.
13620         (nds32_address_cost_size_prefer): Likewise.
13621         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
13622         * config/nds32/nds32.c (nds32_option_override): Use
13623         nds32_init_rtx_costs function.
13625 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
13627         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
13628         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
13629         (TARGET_PIPELINE_N8): Likewise.
13630         (TARGET_PIPELINE_N10): Likewise.
13631         (TARGET_PIPELINE_N13): Likewise.
13632         (TARGET_PIPELINE_GRAYWOLF): Likewise.
13634 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
13636         * config/nds32/nds32-fpu.md: Update copyright year.
13638 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13640         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
13642 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13644         * config/nds32/nds32.c
13645         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
13646         * config/nds32/nds32.opt (minline-asm-r15): New option.
13648 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13650         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
13651         MASK_HW_ABS.
13652         * config/nds32/nds32.md (abssi2): New pattern.
13654 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
13656         * config/i386/i386.md (rex64namesuffix): New mode attribute.
13657         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
13658         Merge insn pattern from sse_cvtsi2ss<round_name> and
13659         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
13660         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
13661         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
13662         using SWI48 mode iterator.
13663         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
13664         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
13665         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
13666         pattern from sse_cvttss2si<round_saeonly_name>
13667         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
13668         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
13669         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
13670         using SWI48 mode iterator.
13671         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
13672         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
13673         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
13674         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
13675         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
13676         using SWI48 mode iterator.
13677         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
13678         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
13679         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
13680         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
13681         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
13682         SWI48 mode iterator.
13683         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
13684         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
13685         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
13686         pattern from sse_cvttsd2si<round_saeonly_name>
13687         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
13689 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13691         * config/nds32/nds32-md-auxiliary.c
13692         (nds32_valid_smw_lwm_base_p): Refine.
13693         (nds32_output_smw_single_word): Refine.
13694         (nds32_output_smw_double_word): New.
13695         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
13697 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13699         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
13700         (nds32_output_stack_pop): Refine.
13701         (nds32_expand_unaligned_load): Refine.
13702         (nds32_expand_unaligned_store): Refine.
13704 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
13705             Chung-Ju Wu  <jasonwucj@gmail.com>
13707         * config/nds32/constants.md: Add TP_REGNUM constant.
13708         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
13709         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
13710         UNSPEC_ADD32.
13711         * config/nds32/nds32-doubleword.md: Consider flag_pic.
13712         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
13713         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
13714         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
13715         and PIC code generation.
13716         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
13717         code generation.
13718         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
13719         optimization.
13720         * config/nds32/nds32.md: Support TLS and PIC.
13721         * config/nds32/nds32.c: Support TLS and PIC.
13722         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
13723         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
13724         predicate.
13726 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
13728         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
13729         mode with E_ prefix.
13731 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
13732             Chung-Ju Wu  <jasonwucj@gmail.com>
13734         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
13735         * config/nds32/nds32-md-auxiliary.c
13736         (symbolic_reference_mentioned_p): New.
13737         (nds32_legitimize_ict_address): New.
13738         (nds32_expand_ict_move): New.
13739         (nds32_indirect_call_referenced_p): New.
13740         (nds32_symbol_binds_local_p): Delete.
13741         (nds32_long_call_p): Modify.
13742         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
13743         * config/nds32/nds32-protos.h
13744         (symbolic_reference_mentioned_p): Declare.
13745         (nds32_legitimize_ict_address): Declare.
13746         (nds32_expand_ict_move): Declare.
13747         (nds32_indirect_call_referenced_p): Declare.
13748         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
13749         (nds32_relax_group): Use nds32_ict_const_p as condition.
13750         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
13751         (nds32_asm_file_start): Output ict_model directive in asm code.
13752         (nds32_legitimate_address_p): Consider indirect call.
13753         (nds32_print_operand): Consider indirect call.
13754         (nds32_print_operand_address): Consider indirect call.
13755         (nds32_insert_attributes): Handle "indirect_call" attribute.
13756         (TARGET_LEGITIMATE_ADDRESS_P): Define.
13757         (TARGET_LEGITIMATE_CONSTANT_P): Define.
13758         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
13759         (TARGET_DELEGITIMIZE_ADDRESS): Define.
13760         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
13761         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
13762         (TARGET_ICT_MODEL_SMALL): Define.
13763         (TARGET_ICT_MODEL_LARGE): Define.
13764         * config/nds32/nds32.md (movsi): Consider ict model.
13765         (call, call_value): Consider ict model.
13766         (sibcall, sibcall_value): Consider ict model.
13767         * config/nds32/nds32.opt (mict-model): New option.
13768         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
13769         model.
13771 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
13772             Monk Chiang  <sh.chiang04@gmail.com>
13773             Jim Wilson <jimw@sifive.com>
13775         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
13776         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
13777         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
13778         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
13779         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
13780         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
13781         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
13782         compute save_libcall_adjustment properly.
13783         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
13784         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
13785         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
13786         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
13787         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
13788         (ABI_SPEC): Handle mabi=ilp32e.
13789         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
13790         (RVE): Add RVE mask.
13791         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
13792         <-march>: Add rv32e as an example.
13794 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
13796         PR c++/82899
13797         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
13798         (intra_create_variable_infos): Handle C++ constructors.
13800 2018-05-18  Martin Liska  <mliska@suse.cz>
13802         * passes.def: Remove a redundant pass.
13804 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
13806         PR bootstrap/85838
13807         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
13809 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13811         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
13812         (ARMv4): Update.
13813         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
13814         (ARMv6m): Update.
13815         (armv2, armv2a, armv3, armv3m): Delete architectures.
13816         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
13817         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
13818         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
13819         Delete cpus.
13820         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
13821         (*mulsidi3adddi): Likewise.
13822         (mulsidi3): Likewise.
13823         (*mulsidi3_nov6): Likewise.
13824         (umulsidi3): Likewise.
13825         (umulsidi3_nov6): Likewise.
13826         (umaddsidi4): Likewise.
13827         (*umulsidi3adddi): Likewise.
13828         (smulsi3_highpart): Likewise.
13829         (*smulsi3_highpart_nov6): Likewise.
13830         (umulsi3_highpart): Likewise.
13831         (*umulsi3_highpart_nov6): Likewise.
13832         * config/arm/arm.h (arm_arch3m): Delete.
13833         * config/arm/arm.c (arm_arch3m): Delete.
13834         (arm_option_override_internal): Update armv3-related comment.
13835         (arm_configure_build_target): Delete use of isa_bit_mode32.
13836         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
13837         (arm_rtx_costs_internal): Delete check of arm_arch3m.
13838         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
13839         (mulsa3): Likewise.
13840         (mulusa3): Likewise.
13841         * config/arm/arm-protos.h (arm_arch3m): Delete.
13842         * config/arm/arm-tables.opt: Regenerate.
13843         * config/arm/arm-tune.md: Likewise.
13844         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
13845         deleted architectures.
13847 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13849         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
13850         (armv5t, armv5te): New features.
13851         (ARMv5, ARMv5e): Delete fgroups.
13852         (ARMv5t, ARMv5te): Adjust for above changes.
13853         (ARMv6m): Likewise.
13854         (armv5, armv5e): Delete arches.
13855         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
13856         arm_arch5.
13857         (*call_reg_arm): Likewise.
13858         (*call_value_reg_armv5): Likewise.
13859         (*call_value_reg_arm): Likewise.
13860         (*call_symbol): Likewise.
13861         (*call_value_symbol): Likewise.
13862         (*sibcall_insn): Likewise.
13863         (*sibcall_value_insn): Likewise.
13864         (clzsi2): Likewise.
13865         (prefetch): Likewise.
13866         (define_split and define_peephole2 dependent on arm_arch5):
13867         Likewise.
13868         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
13869         arm_arch5e.
13870         (TARGET_ARM_QBIT): Likewise.
13871         (TARGET_DSP_MULTIPLY): Likewise.
13872         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
13873         (arm_arch5, arm_arch5e): Delete.
13874         (arm_arch5t, arm_arch5te): Declare.
13875         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
13876         (arm_arch5t): Declare.
13877         (arm_option_reconfigure_globals): Update for the above.
13878         (arm_options_perform_arch_sanity_checks): Update comment, replace
13879         use of arm_arch5 with arm_arch5t.
13880         (use_return_insn): Likewise.
13881         (arm_emit_call_insn): Likewise.
13882         (output_return_instruction): Likewise.
13883         (arm_final_prescan_insn): Likewise.
13884         (arm_coproc_builtin_available): Likewise.
13885         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
13886         arm_arch5e with arm_arch5t and arm_arch5te.
13887         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
13888         (arm_arch5t, arm_arch5te): Declare.
13889         * config/arm/arm-tables.opt: Regenerate.
13890         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
13891         * config/arm/t-multilib: Likewise.
13892         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
13893         instead of arm_arch5.
13894         (*call_reg_thumb1): Likewise.
13895         (*call_value_reg_thumb1_v5): Likewise.
13896         (*call_value_reg_thumb1): Likewise.
13897         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
13898         unreachable path.
13899         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
13901 2018-05-18  Martin Liska  <mliska@suse.cz>
13903         PR gcov-profile/84846
13904         * doc/gcov.texi: Document -t option of gcov tool.
13906 2018-05-18  Martin Liska  <mliska@suse.cz>
13908         PR gcov-profile/84846
13909         * gcov.c (print_usage): Add new -t option.
13910         (process_args): Handle the option.
13911         (generate_results): Use stdout as output when requested by
13912         the option.
13914 2018-05-18  Martin Liska  <mliska@suse.cz>
13916         PR gcov-profile/84846
13917         * coverage.c (coverage_init): Write PWD to .gcno file.
13918         * doc/gcov.texi: Document how working directory is printed.
13919         * gcov-dump.c (dump_gcov_file): Print PWD.
13920         * gcov.c (output_intermediate_file): Likewise.
13921         (read_graph_file): Read PWD string.
13922         (output_lines): Print PWD.
13924 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13926         PR middle-end/85817
13927         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
13928         for retval and return false if all args to phi are zero.
13930 2018-05-18  Richard Biener  <rguenther@suse.de>
13932         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
13933         method.
13934         (evrp_dom_walker::before_dom_children): Call it.
13936 2018-05-18  Richard Biener  <rguenther@suse.de>
13938         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
13939         results when processing array refs with variable index.
13941 2018-05-18  Toon Moene  <toon@moene.org>
13943         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
13944         directly after that of -floop-interchange. Indicate that both
13945         options are enabled by default when specifying -O3.
13947 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13949         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
13950         iterator.  Delete separate integer-mode vec_set<mode> expander.
13951         (aarch64_simd_vec_setv2di): Delete.
13952         (vec_setv2di): Delete.
13953         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
13954         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
13955         the "w, r" alternative.
13957 2018-05-18  Martin Liska  <mliska@suse.cz>
13959         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
13960         * tree-pass.h (make_pass_lower_switch_O0): New function.
13961         * tree-switch-conversion.c (node_has_low_bound): Remove.
13962         (node_has_high_bound): Likewise.
13963         (node_is_bounded): Likewise.
13964         (class pass_lower_switch): Make it a template type and create
13965         two instances.
13966         (pass_lower_switch::execute): Add template argument.
13967         (make_pass_lower_switch): New function.
13968         (make_pass_lower_switch_O0): New function.
13969         (do_jump_if_equal): Remove.
13970         (emit_case_nodes): Simplify to just handle all 3 cases and leave
13971         all the hard work to tree optimization passes.
13973 2018-05-18  Martin Liska  <mliska@suse.cz>
13975         * dbgcnt.c (limit_low): Renamed from limit.
13976         (limit_high): New variable.
13977         (dbg_cnt_is_enabled): Check for upper limit.
13978         (dbg_cnt): Adjust dumping.
13979         (dbg_cnt_set_limit_by_index): Add new argument for high
13980         value.
13981         (dbg_cnt_set_limit_by_name): Likewise.
13982         (dbg_cnt_process_single_pair): Parse new format.
13983         (dbg_cnt_process_opt): Use strtok.
13984         (dbg_cnt_list_all_counters): Remove 'value' and add
13985         'limit_high'.
13986         * doc/invoke.texi: Document changes.
13988 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
13990         * doc/sourcebuild.texi (scalar_all_fma): Document.
13991         * tree.def (FMA_EXPR): Delete.
13992         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
13993         * internal-fn.c (ternary_direct): New macro.
13994         (expand_ternary_optab_fn): Likewise.
13995         (direct_ternary_optab_supported_p): Likewise.
13996         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
13997         * builtins.c (fold_builtin_fma): Delete.
13998         (fold_builtin_3): Don't call it.
13999         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14000         * expr.c (expand_expr_real_2): Likewise.
14001         * fold-const.c (operand_equal_p): Likewise.
14002         (fold_ternary_loc): Likewise.
14003         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14004         * gimple.c (DEFTREECODE): Likewise.
14005         * gimplify.c (gimplify_expr): Likewise.
14006         * optabs-tree.c (optab_for_tree_code): Likewise.
14007         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14008         * tree-eh.c (operation_could_trap_p): Likewise.
14009         (stmt_could_throw_1_p): Likewise.
14010         * tree-inline.c (estimate_operator_cost): Likewise.
14011         * tree-pretty-print.c (dump_generic_node): Likewise.
14012         (op_code_prio): Likewise.
14013         * tree-ssa-loop-im.c (stmt_cost): Likewise.
14014         * tree-ssa-operands.c (get_expr_operands): Likewise.
14015         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14016         * fold-const-call.h (fold_fma): Delete.
14017         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14018         CFN_FNMA and CFN_FNMS.
14019         (fold_fma): Delete.
14020         * genmatch.c (combined_fn): New enum.
14021         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14022         (commutative_op): New function.
14023         (commutate): Use it.  Handle more than 2 operands.
14024         (dt_operand::gen_gimple_expr): Use commutative_op.
14025         (parser::parse_expr): Allow :c to be used with non-binary
14026         operators if the commutative operand is known.
14027         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14028         CFN_FMS, CFN_FNMA and CFN_FNMS.
14029         (backprop::process_assign_use): Remove FMA_EXPR handling.
14030         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14031         (gen_hsa_fma): New function.
14032         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14033         IFN_FNMA and IFN_FNMS.
14034         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14035         * gimple-fold.h (follow_all_ssa_edges): Declare.
14036         * gimple-fold.c (follow_all_ssa_edges): New function.
14037         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14038         gimple_build interface and use follow_all_ssa_edges to fold the result.
14039         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14040         instead of checking for optabs directly.
14041         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14042         rather than FMA_EXPRs.
14043         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14044         call to IFN_FMA instead of an FMA_EXPR.
14046 2018-05-17  Jim Wilson  <jimw@sifive.com>
14048         * expr.c (do_tablejump): When converting index to Pmode, if we have a
14049         sign extended promoted subreg, and the range does not have the sign bit
14050         set, then do a sign extend.
14052         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14053         test, check for sign extended subreg and/or constant operands, and
14054         do a sign extend in that case.
14056 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
14058         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14059         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14060         Add untyped.
14061         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14062         Change logics_shift_reg to logics_shift_imm.
14063         (thunderx2t99_fp_loadpair_basic): Delete.
14064         (thunderx2t99_fp_storepair_basic): Delete.
14065         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14066         (thunderx2t99_asimd_polynomial): Delete.
14067         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14068         and neon_fp_mul_d_scalar_q.
14069         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14070         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14071         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14072         (thunderx2t99_asimd_lut): Add missing tbl types.
14073         (thunderx2t99_asimd_ext): Delete.
14074         (thunderx2t99_asimd_load1_1_mult): Delete.
14075         (thunderx2t99_asimd_load1_2_mult): Delete.
14076         (thunderx2t99_asimd_load1_ldp): New.
14077         (thunderx2t99_asimd_load1): New.
14078         (thunderx2t99_asimd_load2): Add missing *load2* types.
14079         (thunderx2t99_asimd_load3): New.
14080         (thunderx2t99_asimd_load4): New.
14081         (thunderx2t99_asimd_store1_1_mult): Delete.
14082         (thunderx2t99_asimd_store1_2_mult): Delete.
14083         (thunderx2t99_asimd_store2_mult): Delete.
14084         (thunderx2t99_asimd_store2_onelane): Delete.
14085         (thunderx2t99_asimd_store_stp): New.
14086         (thunderx2t99_asimd_store1): New.
14087         (thunderx2t99_asimd_store2): New.
14088         (thunderx2t99_asimd_store3): New.
14089         (thunderx2t99_asimd_store4): New.
14091 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
14093         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14094         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
14096 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
14097             Segher Boessenkool  <segher@kernel.crashing.org>
14099         PR target/85698
14100         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14101         operand.
14103 2018-05-17  Richard Biener  <rguenther@suse.de>
14105         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14106         for pruning loop and prune defs feeding only already visited PHIs.
14108 2018-05-17  Richard Biener  <rguenther@suse.de>
14110         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14112 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
14113             Richard Biener  <rguenther@suse.de>
14115         PR tree-optimization/85793
14116         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14117         for VMAT_ELEMENTWISE.
14119 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14121         * internal-fn.h (lookup_internal_fn): Declare
14122         * internal-fn.c (lookup_internal_fn): New function.
14123         * gimple.c (gimple_build_call_from_tree): Handle calls to
14124         internal functions.
14125         * gimple-pretty-print.c (dump_gimple_call): Print "." before
14126         internal function names.
14127         * tree-pretty-print.c (dump_generic_node): Likewise.
14128         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14130 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
14132         * gimple-fold.h (gimple_build): Make the function forms take
14133         combined_fn rather than built_in_function.
14134         (gimple_simplify): Likewise.
14135         * gimple-match-head.c (gimple_simplify): Likewise.
14136         * gimple-fold.c (gimple_build): Likewise.
14137         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14138         rather than gimple_build_call_internal.
14139         (get_initial_defs_for_reduction): Likewise.
14140         (vect_create_epilog_for_reduction): Likewise.
14141         (vectorizable_live_operation): Likewise.
14143 2018-05-17  Martin Liska  <mliska@suse.cz>
14145         * gimple-ssa-sprintf.c (format_directive): Do not use
14146         space in between 'G_' and '('.
14148 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
14150         PR target/85323
14151         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
14152         even if the mask is not all ones.
14154         PR target/85323
14155         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
14156         vector.
14157         (ix86_gimple_fold_builtin): Likewise.
14159         PR target/85323
14160         * config/i386/i386.c: Include tree-vector-builder.h.
14161         (ix86_vector_shift_count): New function.
14162         (ix86_fold_builtin): Fold shift builtins by scalar count.
14163         (ix86_gimple_fold_builtin): Likewise.
14165         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
14166         _mm512_setzero): New intrinsics.
14168 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
14169             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14171         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
14172         code generation for cases where splatting a value is not useful.
14173         * simplify-rtx.c (simplify_ternary_operation): Simplify
14174         vec_merge across a vec_duplicate and a paradoxical subreg forming
14175         a vector mode to a vec_concat.
14177 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
14179         * config.gcc: Support "goldmont-plus".
14180         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14181         "goldmont-plus".
14182         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14183         PROCESSOR_GOLDMONT_PLUS.
14184         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
14185         (processor_target_table): Add "goldmont-plus".
14186         (PTA_GOLDMONT_PLUS): Define.
14187         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
14188         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
14189         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
14190         (fold_builtin_cpu): Add "goldmont-plus".
14191         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
14192         (ix86_option_override_internal): Add "goldmont-plus".
14193         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
14194         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
14195         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
14196         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
14198 2018-05-17  Richard Biener  <rguenther@suse.de>
14200         PR tree-optimization/85757
14201         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
14202         remove defs that only feed that PHI from further processing.
14204 2018-05-16  Jim Wilson  <jimw@sifive.com>
14206         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
14207         asterisk to name.
14208         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
14210 2018-05-16  Mark Wielaard  <mark@klomp.org>
14212         * dwarf2out.c (count_index_strings): New function.
14213         (output_indirect_strings): Call count_index_strings and generate
14214         header for dwarf_version >= 5.
14216 2018-05-16  Mark Wielaard  <mark@klomp.org>
14218         * dwarf2out.c (dwarf_FORM): New function.
14219         (set_indirect_string): Use dwarf_FORM.
14220         (reset_indirect_string): Likewise.
14221         (size_of_die): Likewise.
14222         (value_format): Likewise.
14223         (output_die): Likewise.
14224         (add_skeleton_AT_string): Likewise.
14225         (output_macinfo_op): Likewise.
14226         (index_string): Likewise.
14227         (output_index_string_offset): Likewise.
14228         (output_index_string): Likewise.
14229         (count_index_strings): Likewise.
14231 2018-05-16  Carl Love  <cel@us.ibm.com>
14233         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14234         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
14236 2018-05-16  Martin Jambor  <mjambor@suse.cz>
14238         * ipa-prop.c (ipa_free_all_edge_args): Remove.
14239         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
14241 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
14243         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
14244         (fnma<mode>4): Likewise.
14245         (fms<mode>4): Likewise.
14246         (fnms<mode>4): Likewise.
14247         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
14248         (aarch64_fnma<mode>4): Likewise.
14249         (aarch64_fms<mode>4): Likewise.
14250         (aarch64_fnms<mode>4): Likewise.
14251         (aarch64_fnmadd<mode>4): Likewise.
14253 2018-05-16  Jason Merrill  <jason@redhat.com>
14255         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
14257 2018-05-16  Richard Biener  <rguenther@suse.de>
14259         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
14260         (dump_stmt_cost): Declare.
14261         (add_stmt_cost): Dump cost we add.
14262         (add_stmt_costs): New function.
14263         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
14264         No longer exported.
14265         (vect_analyze_stmt): Adjust prototype.
14266         (vectorizable_condition): Likewise.
14267         (vectorizable_live_operation): Likewise.
14268         (vectorizable_reduction): Likewise.
14269         (vectorizable_induction): Likewise.
14270         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
14271         cost vector to pass to vectorizable_ and record afterwards.
14272         (vect_model_reduction_cost): Take cost vector argument and adjust.
14273         (vect_model_induction_cost): Likewise.
14274         (vectorizable_reduction): Likewise.
14275         (vectorizable_induction): Likewise.
14276         (vectorizable_live_operation): Likewise.
14277         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
14278         SLP_TREE_NUMBER_OF_VEC_STMTS.
14279         (vect_analyze_slp_cost_1): Remove.
14280         (vect_analyze_slp_cost): Likewise.
14281         (vect_slp_analyze_node_operations): Take visited args and
14282         a target cost vector.  Avoid processing already visited stmt sets.
14283         (vect_slp_analyze_operations): Use a local cost vector to gather
14284         costs and register those of non-discarded instances.
14285         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
14286         (vect_schedule_slp_instance): Remove copying of
14287         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
14288         zero.
14289         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
14290         adding cost.  Record cost entry location.
14291         (vect_prologue_cost_for_slp_op): Function to compute cost of
14292         a constant or invariant generated for SLP vect in the prologue,
14293         split out from vect_analyze_slp_cost_1.
14294         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
14295         (vect_model_promotion_demotion_cost): Likewise.
14296         (vect_model_store_cost): Likewise, make static.
14297         (vect_model_load_cost): Likewise.
14298         (vectorizable_bswap): Add cost vector arg and adjust.
14299         (vectorizable_call): Likewise.
14300         (vectorizable_simd_clone_call): Likewise.
14301         (vectorizable_conversion): Likewise.
14302         (vectorizable_assignment): Likewise.
14303         (vectorizable_shift): Likewise.
14304         (vectorizable_operation): Likewise.
14305         (vectorizable_store): Likewise.
14306         (vectorizable_load): Likewise.
14307         (vectorizable_condition): Likewise.
14308         (vectorizable_comparison): Likewise.
14309         (can_vectorize_live_stmts): Likewise.
14310         (vect_analyze_stmt): Likewise.
14311         (vect_transform_stmt): Adjust calls to vectorizable_*.
14312         * tree-vectorizer.c: Include gimple-pretty-print.h.
14313         (dump_stmt_cost): New function.
14315 2018-05-16  Richard Biener  <rguenther@suse.de>
14317         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
14318         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
14319         * tree-ssa-dse.c: Include tree-ssa-loop.h.
14320         (check_name): New callback.
14321         (dse_classify_store): Track cycles via a visited bitmap of PHI
14322         defs and simplify handling of in-loop and across loop dead stores
14323         and properly fail for loop-variant refs.  Handle byte-tracking with
14324         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
14325         limiting the walk.
14327 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
14329         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
14330         (vect_get_mask_type_for_stmt): Likewise.
14331         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
14332         split out from...
14333         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
14334         to determine the statement's vector type and the vector type that
14335         should be used for calculating nunits.  Deal with cases in which
14336         the type has to be deferred.
14337         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
14338         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
14339         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
14340         (vect_determine_vf_for_stmt): New functions, split out from...
14341         (vect_determine_vectorization_factor): ...here.
14342         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
14343         (vect_get_mask_type_for_stmt): New functions, split out from
14344         vect_determine_vectorization_factor.
14346 2018-05-16  Richard Biener  <rguenther@suse.de>
14348         * tree-cfg.c (verify_gimple_assign_ternary): Properly
14349         verify the [VEC_]COND_EXPR embedded comparison.
14351 2018-05-15  Martin Sebor  <msebor@redhat.com>
14353         PR tree-optimization/85753
14354         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
14355         RECORD_TYPE in addition to ARRAY_TYPE.
14357 2018-05-15  Martin Sebor  <msebor@redhat.com>
14359         PR middle-end/85643
14360         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
14362 2018-05-15  Richard Biener  <rguenther@suse.de>
14364         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
14365         add by_clobber_p one.  Change algorithm to collect all defs
14366         representing uses we need to walk and try reducing them to
14367         a single one before failing.
14368         (dse_dom_walker::dse_optimize_stmt): Adjust.
14370 2018-05-13  Mark Wielaard  <mark@klomp.org>
14372         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
14373         (size_of_loc_descr): Likewise.
14374         (output_loc_operands): Likewise.
14375         (output_loc_operands_raw): Likewise.
14376         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
14377         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
14378         (hash_loc_operands): Likewise.
14379         (compare_loc_operands): Likewise.
14381 2018-05-14  Mark Wielaard  <mark@klomp.org>
14383         * dwarf2out.c (count_index_addrs): New function.
14384         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
14386 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14388         PR tree-optimization/83648
14389         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
14390         return value as malloc candidate.
14392 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14394         PR ipa/85734
14395         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
14396         param as true in call to suggest_attribute.
14398 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
14400         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
14401         -mreadonly-in-sdata.
14403 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14405         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
14406         New pattern.
14407         (aarch64_crypto_aesd_fused): Likewise.
14409 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
14411         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
14412         (movsi_aarch64): Likewise.
14413         (load_pairsi): Likewise.
14414         (load_pairdi): Likewise.
14415         (store_pairsi): Likewise.
14416         (store_pairdi): Likewise.
14417         (load_pairsf): Likewise.
14418         (load_pairdf): Likewise.
14419         (store_pairsf): Likewise.
14420         (store_pairdf): Likewise.
14421         (zero_extend): Likewise.
14422         (trunc): Swap alternatives.
14423         (fcvt_target): Add '?' to prefer w over r.
14425 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
14427         PR target/85756
14428         * config/i386/i386.md: Disallow non-commutative arithmetics in
14429         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
14430         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
14431         in the peephole2 before it.
14433 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
14435         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
14436         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
14437         (ix86_handle_option): Handle -mcldemote.
14438         * config.gcc: New header.
14439         * config/i386/cldemoteintrin.h: New file.
14440         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
14441         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14442         -mcldemote.
14443         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14444         OPTION_MASK_ISA_CLDEMOTE.
14445         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
14446         (ix86_valid_target_attribute_inner_p): Ditto.
14447         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
14448         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
14449         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
14450         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
14451         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
14452         (cldemote): New.
14453         * config/i386/i386.opt: Add -mcldemote.
14454         * config/i386/x86intrin.h: New header.
14455         * doc/invoke.texi: Add -mcldemote.
14457 2018-05-14  Richard Biener  <rguenther@suse.de>
14459         * doc/match-and-simplify.texi: Adjust :s documentation.
14461 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
14463         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
14464         intended memcpy size.
14465         (REORDER_45): Likewise.
14467 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
14469         * sort.cc: New file.
14470         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
14471         * vec.c (qsort_chk): Use gcc_qsort.
14472         * Makefile.in (OBJS-libcommon): Add sort.o.
14473         (build/sort.o): New target.  Use it...
14474         (BUILD_RTL): ... here, and...
14475         (build/gencfn-macros): ... here, and...
14476         (build/genmatch): ... here.
14478 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
14479             Chung-Ju Wu  <jasonwucj@gmail.com>
14481         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
14482         * config/nds32/nds32-graywolf.md: New file.
14483         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
14484         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
14485         pipeline.
14486         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
14487         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
14488         * config/nds32/nds32.md (pipeline_model): Add graywolf.
14489         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
14490         * config/nds32/pipelines.md: Include n15 settings.
14492 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
14493             Chung-Ju Wu  <jasonwucj@gmail.com>
14495         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
14496         * config/nds32/nds32-n13.md: New file.
14497         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
14498         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
14499         pipeline.
14500         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
14501         * config/nds32/nds32.md (pipeline_model): Add n13.
14502         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
14503         * config/nds32/pipelines.md: Include n13 settings.
14505 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
14506             Chung-Ju Wu  <jasonwucj@gmail.com>
14508         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
14509         * config/nds32/nds32-n10.md: New file.
14510         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
14511         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
14512         pipeline.
14513         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
14514         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
14515         * config/nds32/nds32.md (pipeline_model): Add n10.
14516         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
14517         * config/nds32/pipelines.md: Include n10 settings.
14519 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
14520             Kito Cheng  <kito.cheng@gmail.com>
14521             Chung-Ju Wu  <jasonwucj@gmail.com>
14523         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
14524         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14525         Add enum values for DSP extension instructions.
14526         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
14527         New constraints.
14528         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
14529         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
14530         New code iterators.
14531         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
14532         * config/nds32/nds32-dspext.md: New file for DSP implementation.
14533         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
14534         * config/nds32/nds32-intrinsic.md: Likewise.
14535         * config/nds32/nds32_intrinsic.h: Likewise.
14536         * config/nds32/nds32-md-auxiliary.c: Likewise.
14537         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
14538         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
14539         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
14540         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
14541         * config/nds32/nds32-protos.h: New declarations for DSP extension.
14542         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
14543         TYPE_DMAC in switch statement.
14544         * config/nds32/nds32.c: New checking and implementation for DSP
14545         extension instructions.
14546         * config/nds32/nds32.h: Likewise.
14547         * config/nds32/nds32.md: Likewise.
14548         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
14549         * config/nds32/predicates.md: Implement new predicates for DSP
14550         extension.
14552 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
14554         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
14555         Reformat alternatives and attributes so it is easier to identify
14556         which constraints/attributes go with which instruction.
14557         (mov<mode>_hardfloat32, FMOVE64): Likewise.
14558         (mov<mode>_softfloat32, FMOVE64): Likewise.
14559         (mov<mode>_hardfloat64, FMOVE64): Likewise.
14560         (mov<mode>_softfloat64, FMOVE64): Likewise.
14562 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14564         * doc/extend.texi (PowerPC Built-in Functions): Rename this
14565         subsection.
14566         (Basic PowerPC Built-in Functions): The new name of the
14567         subsection previously known as "PowerPC Built-in Functions".
14568         (Basic PowerPC Built-in Functions Available on all Configurations):
14569         New subsubsection.
14570         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
14571         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
14572         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
14573         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
14575 2018-05-11  Martin Jambor  <mjambor@suse.cz>
14577         PR ipa/85655
14578         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
14579         single const.
14581 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
14583         PR target/85733
14584         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
14586 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
14588         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
14589         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
14590         (ix86_handle_option): Handle -mwaitpkg.
14591         * config.gcc: New header.
14592         * config/i386/cpuid.h (bit_WAITPKG): New bit.
14593         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
14594         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
14595         function type.
14596         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14597         OPTION_MASK_ISA_WAITPKG.
14598         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
14599         (ix86_option_override_internal): Add PTA_WAITPKG.
14600         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
14601         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
14602         IX86_BUILTIN_TPAUSE.
14603         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
14604         __builtin_ia32_umwait and __builtin_ia32_tpause.
14605         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
14606         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
14607         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
14608         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
14609         UNSPECV_TPAUSE): New.
14610         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
14611         * config/i386/i386.opt: Add -mwaitpkg.
14612         * config/i386/waitpkgintrin.h: New file.
14613         * config/i386/x86intrin.h: New header.
14614         * doc/invoke.texi: Add -mwaitpkg.
14616 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
14618         PR target/85606
14619         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
14620         equivalent.
14621         (cortex-m0): Use armv6s-m isa.
14622         (cortex-m0plus): Likewise.
14623         (cortex-m1): Likewise.
14624         (cortex-m0.small-multiply): Likewise.
14625         (cortex-m0plus.small-multiply): Likewise.
14626         (cortex-m1.small-multiply): Likewise.
14628 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
14629             Jakub Jelinek  <jakub@redhat.com>
14631         PR tree-optimization/85692
14632         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
14633         source permute as well.
14635 2018-05-11  Martin Liska  <mliska@suse.cz>
14637         PR sanitizer/85556
14638         * doc/extend.texi: Document LLVM style format for no_sanitize
14639         attribute.
14641 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
14643         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
14644         mode_supports_vsx_dform_quad to mode_supports_dq_form.
14645         (mode_supports_vsx_dform_quad): Likewise.
14646         (mode_supports_vmx_dform): Move these functions to be next to the
14647         other mode_supports functions.
14648         (mode_supports_dq_form): Likewise.
14649         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
14650         mode_supports_dq_form.
14651         (reg_offset_addressing_ok_p): Likewise.
14652         (offsettable_ok_by_alignment): Likewise.
14653         (rs6000_legitimate_offset_address_p): Likewise.
14654         (legitimate_lo_sum_address_p): Likewise.
14655         (rs6000_legitimize_address): Likewise.
14656         (rs6000_legitimize_reload_address): Likewise.
14657         (rs6000_secondary_reload_inner): Likewise.
14658         (rs6000_preferred_reload_class): Likewise.
14659         (rs6000_output_move_128bit): Likewise.
14661 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
14663         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
14664         Generate SImode target register for null target.
14665         <case IX86_BUILTIN_XGETBV>: Ditto.
14666         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
14667         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
14669 2018-05-10  Carl Love  <cel@us.ibm.com>
14671         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14672         dcbtt and dcbtstt if operands[2] is 0.
14674 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
14676         PR target/85693
14677         * config/i386/sse.md (usadv64qi): New expander.
14679 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
14681         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
14682         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
14683         -maltivec=be support.
14684         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
14685         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
14686         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
14687         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
14688         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
14689         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
14690         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
14691         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
14692         altivec_vsumsws): Adjust.
14693         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
14694         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
14695         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
14696         support.
14697         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
14698         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
14699         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
14700         (altivec_lve<VI_char>x): Delete expand.
14701         (*altivec_lve<VI_char>x_internal): Rename to...
14702         (altivec_lve<VI_char>x): ... this.
14703         (altivec_lvxl_<mode>): Delete expand.
14704         (*altivec_lvxl_<mode>_internal): Rename to ...
14705         (altivec_lvxl_<mode>): ... this.
14706         (altivec_stvxl_<mode>): Delete expand.
14707         (*altivec_stvxl_<mode>_internal): Rename to ...
14708         (altivec_stvxl_<mode>): ... this.
14709         (altivec_stve<VI_char>x): Delete expand.
14710         (*altivec_stve<VI_char>x_internal): Rename to ...
14711         (altivec_stve<VI_char>x): ... this.
14712         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
14713         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
14714         reduc_plus_scal_<mode>): Adjust.
14715         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
14716         comment.
14717         (rs6000_cpu_cpp_builtins): Adjust.
14718         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
14719         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
14720         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
14721         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
14722         -maltivec=be support.
14723         (rs6000_split_vec_extract_var): Adjust.
14724         (rs6000_split_v4si_init): Adjust.
14725         (swap_selector_for_mode): Delete.
14726         (altivec_expand_lvx_be, altivec_expand_stvx_be,
14727         altivec_expand_stvex_be): Delete.
14728         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
14729         -maltivec=be support.
14730         (rs6000_gimple_fold_builtin): Ditto.
14731         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
14732         Adjust.
14733         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
14734         (TARGET_DIRECT_MOVE_64BIT): Adjust.
14735         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
14736         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
14737         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
14738         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
14739         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
14740         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
14741         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
14742         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
14743         anonymous split): Adjust.
14744         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
14745         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
14747 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
14749         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
14750         when --with-gxx-include-dir is also specified.
14751         * configure: Regenerate.
14753 2018-05-09  Jim Wilson  <jimw@sifive.com>
14755         PR target/84797
14756         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
14757         * config/riscv/t-withmultilib: New.
14758         * config/riscv/withmultilib.h: New.
14759         * doc/install.texi: Document RISC-V --with-multilib-list support.
14761 2018-05-09  Richard Biener  <rguenther@suse.de>
14763         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
14764         vector.
14765         (vect_bb_vectorization_profitable_p): Adjust.  Compute
14766         actual scalar cost using the cost vector and the add_stmt_cost
14767         machinery.
14769 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14771         PR rtl-optimization/85645
14772         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
14773         in the REG_CFA_REGISTER note for LR, don't leave it empty.
14775 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14777         PR rtl-optimization/85645
14778         * shrink-wrap.c (spread_components): Return a boolean saying if
14779         anything was changed.
14780         (try_shrink_wrapping_separate): Iterate spread_components until
14781         nothing changes anymore.
14783 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14785         PR rtl-optimization/85645
14786         * regrename.c (build_def_use): Also kill the chains that include the
14787         destination of a REG_CFA_REGISTER note.
14789 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
14791         PR rtl-optimization/85645
14792         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
14793         insn that has a REG_CFA_REGISTER note.
14795 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
14797         * cfgexpand.c (expand_clobber): New function.
14798         (expand_gimple_stmt_1): Use it.
14799         * tree-vect-stmts.c (vect_clobber_variable): New function,
14800         split out from...
14801         (vectorizable_simd_clone_call): ...here.
14802         (vectorizable_store): Emit a clobber either side of an
14803         IFN_STORE_LANES sequence.
14804         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
14806 2018-05-09  Tom de Vries  <tom@codesourcery.com>
14808         PR target/85626
14809         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
14810         (define_insn "trap_if_false"): Add exit after trap.
14812 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
14814         PR rtl-optimization/85638
14815         * bb-reorder.c: Include common/common-target.h.
14816         (create_forwarder_block): New function extracted from...
14817         (fix_up_crossing_landing_pad): ...here.  Rename into...
14818         (dw2_fix_up_crossing_landing_pad): ...this.
14819         (sjlj_fix_up_crossing_landing_pad): New function.
14820         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
14821         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
14822         from both partitions and exit the loop after one iteration.
14824 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14826         Revert:
14827         * doc/extend.texi (PowerPC Built-in Functions): Rename this
14828         subsection.
14829         (Basic PowerPC Built-in Functions): The new name of the
14830         subsection previously known as "PowerPC Built-in Functions".
14831         (Basic PowerPC Built-in Functions Available on all Configurations):
14832         New subsubsection.
14833         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
14834         subsubsection.
14835         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
14836         subsubsection.
14837         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
14838         subsubsection.
14839         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
14840         subsubsection.
14842 2018-05-08  Jim Wilson  <jimw@sifive.com>
14844         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
14845         (LD_EMUL_SUFFIX): New.
14846         (LINK_SPEC): Use it.
14848 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14850         * doc/extend.texi (PowerPC Built-in Functions): Rename this
14851         subsection.
14852         (Basic PowerPC Built-in Functions): The new name of the
14853         subsection previously known as "PowerPC Built-in Functions".
14854         (Basic PowerPC Built-in Functions Available on all Configurations):
14855         New subsubsection.
14856         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
14857         subsubsection.
14858         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
14859         subsubsection.
14860         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
14861         subsubsection.
14862         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
14863         subsubsection.
14865 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
14867         PR target/85683
14868         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
14869         after cmpelim optimization.
14871 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
14873         * config.gcc: Support "goldmont".
14874         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
14875         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14876         PROCESSOR_GOLDMONT.
14877         * config/i386/i386.c (m_GOLDMONT): Define.
14878         (processor_target_table): Add "goldmont".
14879         (PTA_GOLDMONT): Define.
14880         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
14881         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
14882         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
14883         (fold_builtin_cpu): Add "goldmont".
14884         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
14885         (ix86_option_override_internal): Add "goldmont".
14886         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
14887         (processor_type): Add PROCESSOR_GOLDMONT.
14888         * config/i386/i386.md: Add CPU "glm".
14889         * config/i386/glm.md: New file.
14890         * config/i386/x86-tune.def: Add m_GOLDMONT.
14891         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
14893 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
14895         PR target/85572
14896         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
14897         E_V4DImode.
14898         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
14899         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
14900         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
14902         PR target/85317
14903         * config/i386/i386.c (ix86_fold_builtin): Handle
14904         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
14906         PR target/85480
14907         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
14908         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
14910 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
14912         PR target/85658
14913         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
14914         (check_arch): Likewise.
14915         (check_fpu): Return the result rather than printing it.
14916         (end arch): Fix operator precedence.
14917         (end cpu): Likewise.
14918         (END): Print the result from check_fpu.
14920 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
14921             Alan Hayward  <alan.hayward@arm.com>
14922             David Sherwood  <david.sherwood@arm.com>
14924         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
14925         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
14926         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
14927         (*fcmuo<mode>_and): New patterns.
14929 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
14931         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
14932         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
14933         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
14934         (cmp_op, sve_imm_con): New code attributes.
14935         (SVE_COND_INT_CMP, imm_con): Delete.
14936         (cmp_op): Remove above unspecs from int attribute.
14937         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
14938         to...
14939         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
14940         comparison-specific unspecs.
14941         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
14942         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
14943         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
14944         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
14945         (*vec_fcm<cmp_op><mode>): Rename to...
14946         (*fcm<cmp_op><mode>): ...this and adjust likewise.
14947         (*vec_fcmuo<mode>): Rename to...
14948         (*fcmuo<mode>): ...this and adjust likewise.
14949         (*pred_fcm<cmp_op><mode>): New pattern.
14950         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
14951         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
14952         functions.
14953         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
14954         and UNORDERED.
14955         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
14956         (aarch64_emit_sve_predicated_cond): New function.
14957         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
14958         (aarch64_emit_unspec_cond_or): Replace with...
14959         (aarch64_emit_sve_or_conds): ...this new function.  Use
14960         aarch64_emit_sve_ptrue_op for the individual comparisons and
14961         aarch64_emit_binop to OR them together.
14962         (aarch64_emit_inverted_unspec_cond): Replace with...
14963         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
14964         aarch64_emit_sve_ptrue_op for the comparison and
14965         aarch64_emit_unop to invert the result.
14966         (aarch64_expand_sve_vec_cmp_float): Update after the above
14967         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
14969 2018-05-07  Nathan Sidwell  <nathan@acm.org>
14971         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
14972         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
14973         (Backwards Compatibility): Likewise.
14975 2018-05-07  Luis Machado  <luis.machado@linaro.org>
14977         PR bootstrap/85681
14978         Revert:
14979         2018-05-07  Luis Machado  <luis.machado@linaro.org>
14981         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14982         <prefetch_dynamic_strides>: New const bool field.
14983         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14984         prefetch_dynamic_strides.
14985         (exynosm1_prefetch_tune): Likewise.
14986         (thunderxt88_prefetch_tune): Likewise.
14987         (thunderx_prefetch_tune): Likewise.
14988         (thunderx2t99_prefetch_tune): Likewise.
14989         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
14990         to false.
14991         (aarch64_override_options_internal): Update to set
14992         PARAM_PREFETCH_DYNAMIC_STRIDES.
14993         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14994         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14995         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14996         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14997         prefetch-dynamic-strides setting.
14999         2018-05-07  Luis Machado  <luis.machado@linaro.org>
15001         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15002         <minimum_stride>: New const int field.
15003         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15004         minimum_stride field.
15005         (exynosm1_prefetch_tune): Likewise.
15006         (thunderxt88_prefetch_tune): Likewise.
15007         (thunderx_prefetch_tune): Likewise.
15008         (thunderx2t99_prefetch_tune): Likewise.
15009         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15010         (aarch64_override_options_internal): Update to set
15011         PARAM_PREFETCH_MINIMUM_STRIDE.
15012         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15013         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15014         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15015         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15016         stride is constant and is below the minimum stride threshold.
15018 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15020         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15021         to 512.
15023 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15025         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15026         <prefetch_dynamic_strides>: New const bool field.
15027         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15028         prefetch_dynamic_strides.
15029         (exynosm1_prefetch_tune): Likewise.
15030         (thunderxt88_prefetch_tune): Likewise.
15031         (thunderx_prefetch_tune): Likewise.
15032         (thunderx2t99_prefetch_tune): Likewise.
15033         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15034         to false.
15035         (aarch64_override_options_internal): Update to set
15036         PARAM_PREFETCH_DYNAMIC_STRIDES.
15037         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15038         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15039         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15040         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15041         prefetch-dynamic-strides setting.
15043 2018-05-07  Luis Machado  <luis.machado@linaro.org>
15045         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15046         <minimum_stride>: New const int field.
15047         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15048         minimum_stride field.
15049         (exynosm1_prefetch_tune): Likewise.
15050         (thunderxt88_prefetch_tune): Likewise.
15051         (thunderx_prefetch_tune): Likewise.
15052         (thunderx2t99_prefetch_tune): Likewise.
15053         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15054         (aarch64_override_options_internal): Update to set
15055         PARAM_PREFETCH_MINIMUM_STRIDE.
15056         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15057         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15058         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15059         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15060         stride is constant and is below the minimum stride threshold.
15062 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
15064         PR c++/85659
15065         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15066         the type is addressable.  Don't force op into register if it has
15067         BLKmode.
15069 2018-05-05  Roland McGrath  <mcgrathr@google.com>
15071         PR other/77609
15072         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15073         any section for which we don't know a specific type it should have,
15074         regardless of name.  Previously this was done only for the exact
15075         names ".init_array", ".fini_array", and ".preinit_array".
15076         (default_elf_asm_named_section): Add comment about
15077         relationship with default_section_type_flags and SECTION_NOTYPE.
15078         (get_section): Don't consider it a type conflict if one side has
15079         SECTION_NOTYPE and the other doesn't, as long as neither has the
15080         SECTION_BSS et al used in the default_section_type_flags logic.
15082 2018-05-05  Tom de Vries  <tom@codesourcery.com>
15084         PR target/85653
15085         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15086         (workaround_barsyncs): New function.
15087         (nvptx_reorg): Use workaround_barsyncs.
15088         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15089         (define_expand "nvptx_membar_cta"): New define_expand.
15090         (define_insn "*nvptx_membar_cta"): New insn.
15092 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
15094         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15095         To improve optimization opportunities.
15096         * builtin-types.def: The new needed builtin types for the above.
15098 2018-05-04  Richard Biener  <rguenther@suse.de>
15100         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15101         * gimple-ssa-store-merging.c
15102         (imm_store_chain_info::output_merged_store): Remove redundant create,
15103         release split_store vector contents on failure.
15104         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15105         scalar stmt vector on cache hit.
15107 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
15109         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15110         Xilinx FP support.
15111         * config.gcc (powerpc-xilinx-eabi*): Remove.
15112         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15113         support.
15114         (fusion_addis_mem_combo_load): Ditto.
15115         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15116         FP support.
15117         (rs6000_cpu_cpp_builtins): Ditto.
15118         * config/rs6000/rs6000-linux.c
15119         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15120         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15121         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15122         support.
15123         (rs6000_setup_reg_addr_masks): Ditto.
15124         (rs6000_init_hard_regno_mode_ok): Ditto.
15125         (rs6000_option_override_internal): Ditto.
15126         (legitimate_lo_sum_address_p): Ditto.
15127         (rs6000_legitimize_address): Ditto.
15128         (rs6000_legitimize_reload_address): Ditto.
15129         (rs6000_legitimate_address_p): Ditto.
15130         (abi_v4_pass_in_fpr): Ditto.
15131         (setup_incoming_varargs): Ditto.
15132         (rs6000_gimplify_va_arg): Ditto.
15133         (rs6000_split_multireg_move): Ditto.
15134         (rs6000_savres_strategy): Ditto.
15135         (rs6000_emit_prologue_components): Ditto.
15136         (rs6000_emit_epilogue_components): Ditto.
15137         (rs6000_emit_prologue): Ditto.
15138         (rs6000_emit_epilogue): Ditto.
15139         (rs6000_elf_file_end): Ditto.
15140         (rs6000_function_value): Ditto.
15141         (rs6000_libcall_value): Ditto.
15142         * config/rs6000/rs6000.h: Ditto.
15143         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15144         (TARGET_MINMAX): ... this.  New.
15145         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15146         * config/rs6000/rs6000.md: Remove Xilinx FP support.
15147         (*movsi_internal1_single): Delete.
15148         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15149         mfpu=, mxilinx-fpu): Delete.
15150         * config/rs6000/singlefp.h: Delete.
15151         * config/rs6000/sysv4.h: Remove Xilinx FP support.
15152         * config/rs6000/t-rs6000: Ditto.
15153         * config/rs6000/t-xilinx: Delete.
15154         * config/rs6000/titan.md: Adjust for fp_type removal.
15155         * config/rs6000/vsx.md: Remove Xilinx FP support.
15156         (VStype_simple): Delete.
15157         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
15158         * config/rs6000/xfpu.h: Delete.
15159         * config/rs6000/xfpu.md: Delete.
15160         * config/rs6000/xilinx.h: Delete.
15161         * config/rs6000/xilinx.opt: Delete.
15162         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
15163         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
15165 2018-05-04  Tom de Vries  <tom@codesourcery.com>
15167         PR libgomp/85639
15168         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
15169         if ignore == 0.
15171 2018-05-04  Richard Biener  <rguenther@suse.de>
15173         PR middle-end/85627
15174         * tree-complex.c (update_complex_assignment): We are always in SSA form.
15175         (expand_complex_div_wide): Likewise.
15176         (expand_complex_operations_1): Likewise.
15177         (expand_complex_libcall): Preserve EH info of the original stmt.
15178         (tree_lower_complex): Handle removed blocks.
15179         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
15180         on complex multiplication and division libcall builtins.
15182 2018-05-04  Richard Biener  <rguenther@suse.de>
15184         PR middle-end/85574
15185         * fold-const.c (negate_expr_p): Restrict negation of operand
15186         zero of a division to when we know that can happen without
15187         overflow.
15188         (fold_negate_expr_1): Likewise.
15190 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
15192         PR libstdc++/85466
15193         * real.h (real_nextafter): Declare.
15194         * real.c (real_nextafter): New function.
15195         * fold-const-call.c (fold_const_nextafter): New function.
15196         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
15197         CASE_CFN_NEXTTOWARD.
15198         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
15199         even when arg1_mode is different from arg0_mode.
15201 2018-05-03  Nathan Sidwell  <nathan@acm.org>
15203         * doc/extend.texi (Deprecated Features): Remove
15204         -ffriend-injection.
15205         (Backwards Compatibility): Likewise.
15206         * doc/invoke.texi (C++ Language Options): Likewise.
15207         (C++ Dialect Options): Likewise.
15209 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
15211         PR target/85530
15212         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
15213         _mm512_mask_mullox_epi64): New intrinsics.
15215 2018-05-03  Tom de Vries  <tom@codesourcery.com>
15217         PR testsuite/85106
15218         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15219         dump files): Add offload-tree.
15221 2018-05-03  Richard Biener  <rguenther@suse.de>
15223         PR tree-optimization/85615
15224         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
15225         to loops not nested in BBs loop father to avoid creating multi-entry
15226         loops.
15228 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15230         PR tree-optimization/70291
15231         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
15232         arguments.  Change return type to tree.  Emit libcall as a new
15233         statement rather than replacing existing one when inplace_p is true.
15234         (expand_complex_multiplication_components): New function.
15235         (expand_complex_multiplication): Expand floating-point complex
15236         multiplication using the above.
15237         (expand_complex_division): Rename inner_type parameter to type.
15238         Update expand_complex_libcall call-site.
15239         (expand_complex_operations_1): Update expand_complex_multiplication
15240         and expand_complex_division call-sites.
15242 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
15244         PR target/85582
15245         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15246         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15247         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
15248         the highest significant bit of the shift count mask is clear.  In
15249         check whether and[sq]i3 is needed verify that all significant bits
15250         of the shift count other than the highest are set.
15252 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15254         PR libgomp/82428
15255         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
15256         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
15257         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
15258         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
15259         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
15260         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
15261         __builtin_goacc_parlevel_size.
15263 2018-05-02  Richard Biener  <rguenther@suse.de>
15265         PR tree-optimization/85597
15266         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
15267         do not use split vect_get_vec_defs call but call vect_get_slp_defs
15268         directly.
15270 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15272         PR testsuite/85106
15273         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15274         dump files): Add ltrans-tree.
15276 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15278         PR testsuite/85106
15279         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15280         dump files): Add wpa-ipa.
15282 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
15284         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
15285         powerpc*-*-linux*paired* target.
15286         * config/rs6000/750cl.h: Delete.
15287         * config/rs6000/paired.h: Delete.
15288         * config/rs6000/paired.md: Delete.
15289         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
15290         float support.
15291         * config/rs6000/rs6000-builtin.def: Remove paired float support.
15292         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
15293         comment.  Remove paired float support.
15294         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
15295         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
15296         VECTOR_PAIRED.
15297         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
15298         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
15299         declarations.
15300         * config/rs6000/rs6000.c: Remove paired float support.
15301         (paired_expand_vector_init, paired_expand_vector_move,
15302         paired_emit_vector_compare, paired_emit_vector_cond_expr,
15303         (paired_expand_lv_builtin, paired_expand_stv_builtin,
15304         paired_expand_builtin, paired_expand_predicate_builtin,
15305         paired_init_builtins): Delete.
15306         * config/rs6000/rs6000.h: Remove paired float support.
15307         * config/rs6000/rs6000.md: Remove paired float support.
15308         (move_from_CR_ov_bit): Delete.
15309         * config/rs6000/rs6000.opt (mpaired): Delete.
15310         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
15311         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
15313 2018-05-02  Richard Biener  <rguenther@suse.de>
15315         PR middle-end/85567
15316         * gimplify.c (gimplify_save_expr): When in SSA form allow
15317         SAVE_EXPRs to compute to SSA vars.
15319 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
15321         PR target/85582
15322         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15323         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15324         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
15325         clobber operands[2], instead use a new pseudo.  Formatting fixes.
15327 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
15329         PR tree-optimization/85586
15330         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
15331         exit early for statements in the same group if the accesses are
15332         not strided.
15334 2018-05-02  Tom de Vries  <tom@codesourcery.com>
15336         PR lto/85451
15337         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
15338         error message.
15340 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
15342         PR tree-optimization/85143
15343         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
15345 2018-05-01  Tom de Vries  <tom@codesourcery.com>
15347         PR lto/85451
15348         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
15349         not found" error message.
15351 2018-05-01  Tom de Vries  <tom@codesourcery.com>
15353         PR other/83786
15354         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
15355         * vec.c (test_ordered_remove_if): New function.
15356         (vec_c_tests): Call test_ordered_remove_if.
15357         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
15358         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
15359         * tree-vect-patterns.c (vect_pattern_recog_1): Use
15360         VEC_ORDERED_REMOVE_IF.
15362 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15364         PR tree-optimization/82665
15365         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
15366         pointer subtraction where arguments come from a memchr call.
15368 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
15370         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
15371         --push-state --as-needed and --pop-state instead of --as-needed and
15372         --no-as-needed if ld supports it.
15373         * configure: Regenerated.
15375         PR web/85578
15376         * doc/install.texi2html: Replace _002d with - and _002a with * in
15377         generated html files using sed.
15379 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15381         PR c++/85523
15382         * gcc-rich-location.c (blank_line_before_p): New function.
15383         (use_new_line): New function.
15384         (gcc_rich_location::add_fixit_insert_formatted): New function.
15385         * gcc-rich-location.h
15386         (gcc_rich_location::add_fixit_insert_formatted): New function.
15388 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15390         * selftest.c (assert_streq): Rename "expected" and "actual" to
15391         "val1" and "val2".  Extend NULL-handling to cover both inputs
15392         symmetrically, while still requiring both to be non-NULL for a pass.
15393         * selftest.h (assert_streq): Rename "expected" and "actual" to
15394         "val1" and "val2".
15395         (ASSERT_EQ): Likewise.
15396         (ASSERT_EQ_AT): Likewise.
15397         (ASSERT_KNOWN_EQ): Likewise.
15398         (ASSERT_KNOWN_EQ_AT): Likewise.
15399         (ASSERT_NE): Likewise.
15400         (ASSERT_MAYBE_NE): Likewise.
15401         (ASSERT_MAYBE_NE_AT): Likewise.
15402         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
15403         the assertion to pass.
15404         (ASSERT_STREQ_AT): Likewise.
15406 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
15408         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
15409         interaction with -pie.
15411 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15413         * selftest.h: Fix alphabetization of per-source-file selftest
15414         declarations.
15416 2018-04-30  Jason Merrill  <jason@redhat.com>
15418         PR c++/61982 - dead stores to destroyed objects.
15419         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
15420         of clobber.
15422 2018-04-30  Jason Merrill  <jason@redhat.com>
15424         * tree.c (build_clobber): New.
15425         * tree.h: Declare it.
15426         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
15428 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15430         * diagnostic-show-locus.c (layout::layout): Update for
15431         location_get_source_line returning a char_span.
15432         (struct char_span): Move to input.h.
15433         (struct correction): Update for fields in char_span becoming
15434         private.
15435         (struct source_line): Update for location_get_source_line
15436         returning a char_span.
15437         (layout::print_line): Likewise.
15438         * edit-context.c (edited_file::print_content): Likewise.
15439         (edited_file::print_diff_hunk): Likewise.
15440         (edited_file::print_run_of_changed_lines): Likewise.
15441         (edited_file::get_num_lines): Likewise.
15442         (edited_line::edited_line): Likewise.
15443         * final.c (asm_show_source): Likewise.
15444         * input.c (location_get_source_line): Convert return type
15445         from const char * to char_span, losing the final "line_len"
15446         param.
15447         (dump_location_info): Update for the above.
15448         (get_substring_ranges_for_loc): Likewise.  Use a char_span
15449         when handling the literal within the line.
15450         (test_reading_source_line): Update for location_get_source_line
15451         returning a char_span.
15452         * input.h (class char_span): Move here from
15453         diagnostic-show-locus.c, converting from a struct to a class.
15454         Make data members private.
15455         (char_span::operator bool): New.
15456         (char_span::length): New.
15457         (char_span::get_buffer): New.
15458         (char_span::operator[]): New.
15459         (char_span::subspan): Make const.
15460         (char_span::xstrdup): New.
15461         (location_get_source_line): Convert return type from const char *
15462         to char_span, losing the final "line_size" param.
15464 2018-04-30  Jan Hubicka  <jh@suse.cz>
15466         * lto-wrapper.c (ltrans_priorities): New static var.
15467         (cmp_priority): New.
15468         (run_gcc): Read priorities and if doing parallel build order
15469         the Makefile by them.
15471 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
15473         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
15475 2018-04-30  Richard Biener  <rguenther@suse.de>
15477         * tree-cfg.c (verify_address): Remove base argument, add
15478         flag whether to check TREE_ADDRESSABLE and do that.
15479         (verify_expr): Remove.
15480         (verify_types_in_gimple_reference): Add pieces from verify_expr.
15481         (verify_gimple_assign_single): Likewise.
15482         (verify_gimple_switch): Likewise.
15483         (verify_expr_location_1): Dereference tp once.  Add (disabled)
15484         piece from verify_expr.
15485         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
15487 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
15489         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
15491 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
15493         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
15494         (small_data_pattern): Likewise.
15495         (arc_rewrite_small_data): Likewise.
15496         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
15497         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
15498         (get_symbol_alignment): New function.
15499         (legitimate_small_data_address_p): Likewise.
15500         (legitimate_scaled_address): Update, call
15501         legitimate_small_data_address_p.
15502         (output_sdata): New static variable.
15503         (arc_print_operand): Update how we handle small data operands.
15504         (arc_print_operand_address): Likewise.
15505         (arc_legitimate_address_p): Update, use
15506         legitimate_small_data_address_p.
15507         (arc_rewrite_small_data_p): Remove.
15508         (arc_rewrite_small_data_1): Likewise.
15509         (arc_rewrite_small_data): Likewise.
15510         (small_data_pattern): Likewise.
15511         (compact_sda_memory_operand): Update to use
15512         legitimate_small_data_address_p and get_symbol_alignment.
15513         (prepare_move_operands): Don't rewite sdata pattern.
15514         (prepare_extend_operands): Remove.
15515         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
15516         pattern.
15517         (zero_extendqisi2): Likewise.
15518         (zero_extendhisi2): Likewise.
15519         (extendqihi2): Likewise.
15520         (extendqisi2): Likewise.
15521         (extendhisi2): Likewise.
15522         (addsi3): Likewise.
15523         (subsi3): Likewise.
15524         (andsi3): Likewise.
15525         * config/arc/constraints.md (Usd): Change it to memory constraint.
15527 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
15529         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
15530         as source of std instructions.
15531         * config/arc/arc.md (movsi_insn): Update pattern predicate to
15532         allow 6-bit constants as source for store instructions.
15533         (movdi_insn): Update instruction pattern to allow 6-bit constants
15534         as source for store instructions.
15536 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
15538         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
15540 2018-04-30  Nathan Sidwell  <nathan@acm.org>
15541             Sandra Loosemore <sandra@codesourcery.com>
15543         * dumpfile.c (dump_open): Allow '-' for stdout.
15544         * doc/invoke.texi (Developer Options): Document dump filename
15545         determination early.  Document stdin/stdout selection.
15547 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
15549         Microblaze Target: PIC data text relative
15551         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
15552         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
15553         Add declaration.
15554         * config/microblaze/microblaze.h (microblaze_constant_address_p):
15555         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
15556         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
15557         New addressing mode for data-text relative position indepenedent code.
15558         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
15559         'ADDRESS_SYMBOLIC_TXT_REL'.
15560         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
15561         (microblaze_legitimate_pic_operand): Exclude function calls from
15562         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
15563         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
15564         addresses cases.
15565         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
15566         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
15567         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
15568         for 'address + offset'.
15569         (microblaze_expand_prologue): Add new function prologue call for
15570         'r20' assignation.
15571         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
15572         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
15573         table in case of TARGET_PIC_DATA_TEXT_REL.
15574         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
15575         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
15576         Add new macros 'UNSPEC_TEXT',
15577         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
15578         + exclude function calls from 'UNSPEC_PLT' in case of data text
15579         relative mode.
15580         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
15581         new target hook for generating address diff vector tables in case of
15582         flag_pic.
15583         * doc/tm.texi : Regenerate.
15584         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
15585         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
15586         of addr diff vector generation.
15587         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
15588         target hook definition.
15589         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
15590         Add default function for generate_pic_addr_diff_vec -> flag_pic.
15591         * doc/invoke.texi (Add new pic option): Add new microblaze pic
15592         option for data text relative.
15594 2018-04-30  Richard Biener  <rguenther@suse.de>
15596         * tree-chrec.h (evolution_function_is_constant_p): Remove
15597         redundant check.
15598         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
15600 2018-04-30  Richard Biener  <rguenther@suse.de>
15602         PR bootstrap/85571
15603         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
15605 2018-04-30  Richard Biener  <rguenther@suse.de>
15607         PR tree-optimization/28364
15608         PR tree-optimization/85275
15609         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
15610         copying first exit test.
15612 2018-04-28  Mark Wielaard  <mark@klomp.org>
15614         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
15615         dwarf_version >= 5.
15616         (dwarf_AT): Handle DW_AT_addr_base.
15617         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
15619 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
15621         PR target/84431
15622         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
15623         (*ashl<dwi>3_doubleword_mask_1): Ditto.
15624         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
15625         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
15627 2018-04-28  Richard Biener  <rguenther@suse.de>
15629         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
15630         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
15631         to reflect use.  Only add interesting stmts.
15633 2018-04-27  Martin Jambor  <mjambor@suse.cz>
15635         PR ipa/85549
15636         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
15637         the jump function allows for passing through aggregate values.
15639 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
15641         * input.h (in_system_header_at): Convert from macro to inline
15642         function.
15643         (from_macro_expansion_at): Likewise.
15644         (from_macro_definition_at): Likewise.
15646 2018-04-27  Jeff Law  <law@redhat.com>
15648         * config.gcc: Mark tile* targets as deprecated/obsolete.
15650 2018-04-27  Richard Biener  <rguenther@suse.de>
15652         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
15653         fix for ILP32.
15655 2018-04-27  Richard Biener  <rguenther@suse.de>
15657         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
15659 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
15661         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
15662         with Yd constraint. Set "preferred_for_speed" attribute from
15663         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
15664         with Yd constraint.
15665         (*movdi_internal): Ditto.
15666         (movti_interunit splitters): Remove
15667         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
15668         (movdi_interunit splitters): Ditto.
15669         * config/i386/constraints.md (Ye): Remove.
15670         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
15672 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15674         PR target/85512
15675         * config/aarch64/constraints.md (Usg): Limit to 31.
15676         (Usj): Limit to 63.
15678 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
15680         PR tree-optimization/85529
15681         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
15682         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
15683         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
15684         zero extension or masking of the MSB bit.
15685         (optimize_range_tests): Add FIRST_BB argument, pass it through
15686         to optimize_range_tests_var_bound.
15687         (maybe_optimize_range_tests, reassociate_bb): Adjust
15688         optimize_range_tests callers.
15690 2018-04-26  Richard Biener  <rguenther@suse.de>
15691             Jakub Jelinek  <jakub@redhat.com>
15693         * cgraph.h (symbol_table): Just declare debug method here.
15694         * symtab.c (symbol_table::debug): Define.
15696 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
15698         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
15700 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
15702         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
15703         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
15704         (*movdi_internal): Substitute Yi and Yj constraint with x
15705         and Ym and Yn constraint with y constraint.  Update "isa"
15706         attribute and set "preferred_for_speed" attribute from
15707         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
15708         (*movsi_internal): Ditto.
15709         (*movdf_internal): Ditto.
15710         (*movsf_internal): Ditto.
15711         (*zero_extendsidi2): Ditto.
15712         * config/i386/sse.md (vec_set<mode>_0): Ditto.
15713         (sse2_loadld): Ditto.
15714         (*vec_extract<ssevecmodelower>_0): Ditto.
15715         (*vec_extractv4si_0_zext_sse4): Ditto.
15716         (vec_concatv2di): Ditto.
15717         (*vec_dup<mode>): Ditto.
15718         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
15719         * config/i386/constraints.md (Yi): Remove.
15720         (Yj): Remove.
15721         (Ym): Remove.
15722         (Yn): Remove.
15724 2018-04-26  Nathan Sidwell  <nathan@acm.org>
15726         * dumpfile.c (dump_open): New.
15727         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
15728         (dump_finish): Detect stdio/stderr by value not name.
15730 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
15732         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
15734 2018-04-26  Tom de Vries  <tom@codesourcery.com>
15736         PR target/84952
15737         * config/nvptx/nvptx.c (verify_neutering_jumps)
15738         (verify_neutering_labels): New function
15739         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
15741 2018-04-26  Tom de Vries  <tom@codesourcery.com>
15743         PR target/84025
15744         * config/nvptx/nvptx.c (needs_neutering_p): New function.
15745         (nvptx_single): Use needs_neutering_p to skip over insns that do not
15746         need neutering.
15748 2018-04-26  Richard Biener <rguenther@suse.de>
15749             Tom de Vries  <tom@codesourcery.com>
15751         PR lto/85422
15752         * lto-streamer-out.c (output_function): Fixup loops if required to match
15753         discovery done in the reader.
15755 2018-04-26  Richard Biener  <rguenther@suse.de>
15757         PR tree-optimization/85116
15758         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
15759         have a loop exit from the single latch predecessor.  Remove
15760         case of header with just condition.
15761         (ch_base::copy_headers): Exclude infinite loops from any
15762         processing.
15763         (pass_ch::execute): Record exits.
15765 2018-04-26  Richard Biener  <rguenther@suse.de>
15767         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
15768         prologue cost vector and pass it to vect_get_load_cost.
15769         (vect_get_peeling_costs_all_drs): Likewise.
15770         (vect_peeling_hash_get_lowest_cost): Likewise.
15771         (vect_enhance_data_refs_alignment): Likewise.
15773 2018-04-26  Richard Biener  <rguenther@suse.de>
15775         PR middle-end/85450
15776         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
15777         checking of integer<->pointer conversions.
15778         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
15779         sign-/zero-extending pointer types.
15780         (expand_omp_for_static_chunk): Likewise.
15782 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
15783             Jean Lee  <xiaoyur347@gmail.com>
15785         * config/mips/mips.c (mips_asan_shadow_offset): New function.
15786         (TARGET_ASAN_SHADOW_OFFSET): Define.
15787         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
15788         true for -fsanitize=address.
15790 2018-04-25  Mark Wielaard  <mark@klomp.org>
15792         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
15793         shorter ones.
15795 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
15797         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
15798         than "alu", remove explicit "memory" and "imm_disp" attributes.
15799         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
15801         PR middle-end/85414
15802         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
15803         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
15804         gen_lowpart_no_emit.
15806 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
15808         PR target/85473
15809         * config/i386/i386.c (ix86_expand_builtin): Change memory
15810         operand to XI, extend p0 to Pmode.
15811         * config/i386/i386.md: Change unspec volatile and operand
15812         1 mode to XI, change operand 0 mode to P.
15814 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15816         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
15817         GET_MODE_MASK before any checking.
15818         (nds32_can_use_bset_p): Likewise.
15819         (nds32_can_use_btgl_p): Likewise.
15821 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15823         * config/nds32/nds32-doubleword.md: New define_split pattern for
15824         illegal register number.
15826 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15828         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
15830 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
15832         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
15834 2018-04-25  Richard Biener  <rguenther@suse.de>
15836         * lto-streamer.h (LTO_major_version): Bump to 8.
15838 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
15840         * BASE-VER: Set to 9.0.0.
15842 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
15844         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
15845         in __abskf2 and __powikf2.
15847 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15849         PR target/85512
15850         * config/aarch64/constraints.md (Usg, Usj): New constraints.
15851         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
15852         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
15853         Use the above on operand 2.  Reindent.
15854         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
15856 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
15858         PR target/85485
15859         * common/config/i386/i386-common.c (ix86_handle_option): Don't
15860         handle OPT_mcet.
15861         * config/i386/i386.opt (mcet): Removed.
15862         * doc/install.texi: Remove -mcet documentation.
15863         * doc/invoke.texi: Likewise.
15865 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
15867         PR target/85485
15868         * doc/install.texi: Remove -mcet from bootstrap-cet.
15870 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
15872         PR target/85511
15873         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
15874         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
15875         if TARGET_64BIT.
15877         PR target/85503
15878         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
15879         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
15880         containing a CONST_VECTOR.
15882 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
15884         * doc/install.texi: Update newlib dependency for nvptx.
15886 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
15888         PR target/85508
15889         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
15890         instead of INTVAL when shifting x left.
15892 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
15894         PR tree-optimization/85478
15895         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
15896         vect_grouped_store_supported for single element vectors.
15898 2018-04-24  Richard Biener  <rguenther@suse.de>
15900         PR target/85491
15901         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
15902         load cost increase to the case of non-constant step.
15904 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
15906         PR target/84828
15907         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
15908         destination if any_malformed_asm.
15910 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
15912         PR middle-end/85496
15913         * expr.c (store_field): In the bitfield case, if the value comes from
15914         a function call and is returned in registers by means of a PARALLEL,
15915         do not change the mode of the temporary unless BLKmode and VOIDmode.
15917 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
15919         PR rtl-optimization/85423
15920         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
15921         dependencies to debug insns when the previous insn is non-debug.
15923 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
15925         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
15926         enums into a single definition.
15927         (fls): Fix predicates and printing.
15928         (seti): Likewise.
15930 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
15932         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
15933         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
15934         and short u6 immediate.
15935         (check_if_valid_sleep_operand): Remove.
15936         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
15938 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15940         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
15941         flag_always_save_lp condition.
15942         * config/nds32/nds32.opt (malways-save-lp): New option.
15944 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
15946         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
15947         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
15948         * config/nds32/nds32.h
15949         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
15950         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
15952 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
15954         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
15955         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
15957 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
15958             Chung-Ju Wu  <jasonwucj@gmail.com>
15960         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
15961         Declare.
15962         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
15963         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
15965 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15967         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
15969 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15971         * config/nds32/nds32-protos.h (nds32_data_alignment,
15972         nds32_local_alignment): Declare.
15973         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
15974         nds32_local_alignment): New functions.
15975         (TARGET_CONSTANT_ALIGNMENT): Define.
15976         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
15978 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15980         * config/nds32/nds32.c
15981         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
15982         (TARGET_MODES_TIEABLE_P): Likewise.
15984 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
15986         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
15987         level Ofast and Og.
15989 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
15990             Chung-Ju Wu  <jasonwucj@gmail.com>
15992         * config/nds32/constants.md (unspec_volatile_element): Add enum values
15993         for unaligned access.
15994         * config/nds32/nds32-intrinsic.c: Implementation of expanding
15995         unaligned access.
15996         * config/nds32/nds32-intrinsic.md: Likewise.
15997         * config/nds32/nds32_intrinsic.h: Likewise.
15998         * config/nds32/nds32.h (nds32_builtins): Likewise.
15999         * config/nds32/nds32.opt (munaligned-access): New option.
16000         * config/nds32/nds32.c (nds32_asm_file_start): Display
16001         flag_unaligned_access status.
16003 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16005         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16006         -mno-relax is present.
16007         * config/riscv/linux.h (LINK_SPEC): Ditto.
16009 2018-04-20  Martin Sebor  <msebor@redhat.com>
16011         PR c/85365
16012         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16013         for null pointers.
16014         (gimple_fold_builtin_stxcpy_chk): Same.
16015         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16017 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
16019         PR target/85456
16020         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16021         __powikf2 when long double is IEEE 128-bit.
16023 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
16025         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16026         step to make sure stack always aligned.
16028 2018-04-20  Carl Love  <cel@us.ibm.com>
16030         PR target/83402
16031         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16032         size check for arg0.
16034 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16035             Tom de Vries  <tom@codesourcery.com>
16037         PR target/85445
16038         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16039         Emit insns for calls too.
16040         (nvptx_find_par): Always look for worker-level predecessor insn.
16041         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
16042         calls.
16043         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16044         (nvptx_process_pars): Propagate frames for calls.
16046 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
16048         PR target/85469
16049         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16050         Removed.
16051         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16052         (ix86_handle_option): Don't handle OPT_mibt.
16053         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16054         __SHSTK__.
16055         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16056         has_ibt and ibt.
16057         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16058         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16059         (ix86_target_macros): Define __CET__ with flag_cf_protection
16060         for -fcf-protection.
16061         * config/i386/i386.c (isa2_opts): Remove -mibt.
16062         * config/i386/i386.h (TARGET_IBT): Removed.
16063         (TARGET_IBT_P): Likewise.
16064         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16065         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16066         * config/i386/i386.opt (mcet): Update help message.
16067         (mshstk): Likewise.
16068         (mibt): Removed.
16069         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
16070         -mcet as an alias for -mshstk.
16072 2018-04-20  Richard Biener <rguenther@suse.de>
16074         PR middle-end/85475
16075         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16076         complexity by forcing a single use of the multiply operand.
16078 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16080         ipa/85449
16081         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16082         recursion dependency to only apply to non-clones.
16084 2018-04-20  Martin Jambor  <mjambor@suse.cz>
16086         ipa/85447
16087         * ipa-cp.c (create_specialized_node): Check that clones of
16088         self-recursive edges exist during IPA-CP.
16090 2018-04-19  Toon Moene  <toon@moene.org>
16092         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16093         by -O3.
16095 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16097         PR tree-optimization/85467
16098         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16099         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
16100         VECTOR_CST element to type.
16102 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16104         PR target/85397
16105         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16106         * config/i386/i386.md (builtin_setjmp_setup): Removed.
16107         (builtin_longjmp): Likewise.
16108         (save_stack_nonlocal): New pattern.
16109         (restore_stack_nonlocal): Likewise.
16111 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16113         PR target/85404
16114         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16115         Replace ASM_OUTPUT_LABEL with fprintf.
16117 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
16119         PR target/85417
16120         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16121         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16122         * config/i386/i386-c.c (ix86_target_macros_internal): Also
16123         define __IBT__ and __SHSTK__ for -fcf-protection.
16124         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16125         TARGET_IBT.
16126         (ix86_trampoline_init): Likewise.
16127         (x86_output_mi_thunk): Likewise.
16128         (ix86_notrack_prefixed_insn_p): Likewise.
16129         (ix86_option_override_internal): Don't disallow -fcf-protection.
16130         * config/i386/i386.md (rdssp<mode>): Also enable for
16131         -fcf-protection.
16132         (incssp<mode>): Likewise.
16133         (nop_endbr): Likewise.
16134         * config/i386/i386.opt (mcet): Change help message to built-in
16135         functions only.
16136         (mibt): Likewise.
16137         (mshstk): Likewise.
16138         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16139         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
16140         enable CET built-in functions.
16142 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
16144         * common/config/i386/i386-common.c
16145         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16146         OPTION_MASK_ISA_MOVDIRI_UNSET,
16147         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16148         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16149         * config.gcc (movdirintrin.h): New header.
16150         * config/i386/cpuid.h (bit_MOVDIRI,
16151         bit_MOVDIR64B): New bits.
16152         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
16153         and -mmvodir64b.
16154         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
16155         (VOID, PVOID, PCVOID)): New function types.
16156         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
16157         __builtin_ia32_directstoreu_u64,
16158         __builtin_ia32_movdir64b): New builtins.
16159         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
16160         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
16161         and -mmovdiri.
16162         (ix86_valid_target_attribute_inner_p): Ditto.
16163         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
16164         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
16165         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
16166         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
16167         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
16168         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
16169         (movdiri<mode>, movdir64b_<mode>): New.
16170         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
16171         * config/i386/immintrin.h: Include movdirintrin.h.
16172         * config/i386/movdirintrin.h: New file.
16173         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
16175 2018-04-19  Richard Biener  <rguenther@suse.de>
16177         PR middle-end/85455
16178         * cfg.c (clear_bb_flags): When loop state says we have
16179         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
16181 2018-04-19  Richard Biener  <rguenther@suse.de>
16183         PR tree-optimization/84737
16184         * tree-vect-data-refs.c (vect_copy_ref_info): New function
16185         copying restrict info.
16186         (vect_setup_realignment): Use it.
16187         * tree-vectorizer.h (vect_copy_ref_info): Declare.
16188         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
16189         the first DR to all generated stores.
16190         (vectorizable_load): Likewise for loads.
16192 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
16194         PR tree-optimization/85446
16195         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
16196         the integral and pointer types to have the same precision.
16198         * doc/install.texi: Document --disable-cet being the default and
16199         --enable-cet=auto.
16201 2018-04-18  Martin Liska  <mliska@suse.cz>
16203         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
16204         style.
16206 2018-04-18  Martin Liska  <mliska@suse.cz>
16208         Revert
16209         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
16211         PR ipa/83983
16212         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16213         arguments if they are comparable.
16215 2018-04-18  Martin Liska  <mliska@suse.cz>
16217         Revert
16218         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16220         PR lto/84805
16221         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16222         incomplete types.
16224 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
16226         PR target/85388
16227         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
16228         ENDBR after calling __morestack.
16230 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
16232         PR jit/85384
16233         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
16234         by using gcc_base_ver to generate a gcc_driver_version, and use
16235         it when generating GCC_DRIVER_NAME.
16236         * configure: Regenerate.
16238 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
16240         PR target/81084
16241         * config.gcc: Obsolete powerpc*-*-*spe*.
16243 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16245         PR debug/84637
16246         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
16247         (stabstr_D): Change type of unum from unsigned int to
16248         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
16249         type.
16251 2018-04-17  Jim Wilson  <jimw@sifive.com>
16253         PR 84856
16254         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
16255         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
16256         Set arg_pointer_offset after using pretend_args_size.
16258 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16260         PR rtl-optimization/85431
16261         * dse.c (record_store): Ignore zero width stores.
16263         PR sanitizer/85230
16264         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
16265         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
16266         __builtin_stack_restore rather than after it.
16267         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
16268         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
16269         argument instead of virtual_dynamic_stack_rtx.
16271 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16273         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
16274         New prototype.
16275         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16276         Add note to error message to explain internal mapping of overloaded
16277         built-in function name to non-overloaded built-in function name.
16278         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
16279         function.
16281 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
16283         PR target/85424
16284         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
16285         where the inputs overlap with the output.
16287 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16289         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
16290         (=v, v) alternative and explicit "memory" attribute.
16291         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
16292         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16293         attributes.
16294         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
16295         "sselog1" type instead of "sselog".
16296         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
16297         "sselog".  Remove explicit "memory" attribute.
16298         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
16299         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16300         attributes.
16301         (vec_extract_hi_v32hi): Merge all alternatives into one, use
16302         "sselog1" type instead of "sselog".  Remove explicit "memory"
16303         attribute.
16304         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
16305         use "sselog1" type instead of "sselog".  Remove explicit "memory"
16306         attribute.
16307         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
16308         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16309         attributes.
16310         (vec_extract_hi_v64qi): Merge all alternatives into one, use
16311         "sselog1" type instead of "sselog".  Remove explicit "memory"
16312         attribute.
16313         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
16314         use "sselog1" type instead of "sselog".  Remove explicit "memory"
16315         attribute.
16317         PR target/85430
16318         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
16320         PR middle-end/85414
16321         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
16322         on a SUBREG.
16324 2018-04-17  Martin Jambor  <mjambor@suse.cz>
16326         PR ipa/85421
16327         * ipa-cp.c (create_specialized_node): Call
16328         expand_all_artificial_thunks if necessary.
16330 2018-04-17  Martin Liska  <mliska@suse.cz>
16332         PR lto/85405
16333         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
16334         in message, remote space in between '_G' and '('.
16336 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
16338         PR target/85281
16339         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
16340         avx512f_vmcmp<mode>3<round_saeonly_name>,
16341         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
16342         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
16343         avx512f_rndscale<mode><round_saeonly_name>,
16344         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
16345         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
16346         Use %<iptr>2 instead of %2 for -masm=intel.
16347         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
16348         avx512f_vcvttss2usi<round_saeonly_name>,
16349         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
16350         -masm=intel.
16351         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
16352         avx512f_vcvttsd2usi<round_saeonly_name>,
16353         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
16354         Use %q1 instead of %1 for -masm=intel.
16355         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
16356         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
16357         of %3 for -masm=intel.
16358         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
16359         -masm=intel.
16360         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
16361         -masm=intel.
16362         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
16363         -masm=intel.
16364         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
16365         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
16366         %g1.
16367         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
16368         -masm=intel.
16369         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
16370         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
16371         %g1 and one with %0 and %1.
16372         (avx512er_vmrcp28<mode><round_saeonly_name>,
16373         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
16374         %1 for -masm=intel.
16375         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
16376         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
16377         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
16378         of %0 and %{%4%} for -masm=intel.
16379         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
16380         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
16381         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
16382         order of %0 and %{%5%}%{z%} for -masm=intel.
16384 2018-04-17  Jan Hubicka  <jh@suse.cz>
16386         PR lto/85405
16387         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
16389 2018-04-17  Martin Liska  <mliska@suse.cz>
16391         PR ipa/85329
16392         * multiple_target.c (create_dispatcher_calls): Set apostrophes
16393         for target_clone error message.  Make default implementation
16394         clone to be a local declaration.
16395         (separate_attrs): Add new argument and check for an empty
16396         string.
16397         (expand_target_clones): Handle it.
16398         (ipa_target_clone): Make redirection just for target_clones
16399         functions.
16401 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
16402             Tom de Vries  <tom@codesourcery.com>
16404         PR middle-end/84955
16405         * omp-expand.c (expand_oacc_for): Add dummy false branch for
16406         tiled basic blocks without omp continue statements.
16408 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
16410         PR target/83660
16411         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
16412         vec_extract expression as having side effects to make sure it gets
16413         a cleanup point.
16415 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
16417         PR target/85403
16418         * config/i386/i386.c (get_builtin_code_for_version): Check
16419         error_mark_node.
16421 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
16423         PR target/84331
16424         * config.gcc: Support "skylake".
16425         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16426         PROCESSOR_SKYLAKE.
16427         * config/i386/i386.c (m_SKYLAKE): Define.
16428         (processor_target_table): Add "skylake".
16429         (ix86_option_override_internal): Add "skylake".
16430         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
16431         PROCESSOR_CANNONLAKE.
16432         (get_builtin_code_for_version): Fix priority for
16433         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
16434         PROCESSOR_SKYLAKE-AVX512.
16435         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
16436         (processor_type): Add PROCESSOR_SKYLAKE.
16438 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
16439             Jason Merrill  <jason@redhat.com>
16441         PR c++/85112
16442         * convert.c (convert_to_integer_1): Use direct recursion for
16443         enumeral types and types with a precision less than the number
16444         of bits in their mode.
16446 2018-04-16  Julia Koval  <julia.koval@intel.com>
16448         PR target/84413
16449         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
16450         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
16452 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
16454         PR target/85293
16455         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
16456         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
16457         and -mno-direct-move.
16459 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
16461         PR target/83402
16462         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
16463         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
16464         Ensure negative shifts result in {0}.
16466 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
16468         PR rtl-optimization/79916
16469         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
16470         regs (if any) to define how to gnerate SD moves when LRA is in
16471         progress.
16473 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
16475         PR rtl-optimization/85393
16476         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
16477         * except.c (expand_dw2_landing_pad_for_region): Make static.
16478         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
16479         a label and unconditional jump to old_bb, rather than
16480         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
16481         basic block.
16483         PR rtl-optimization/85376
16484         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
16485         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
16486         instead of a specific value.
16488 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
16489             Bin Cheng  <bin.cheng@arm.com>
16491         PR tree-optimization/82965
16492         PR tree-optimization/83991
16493         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
16494         by_profile_only parameter.
16495         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
16496         information if the loop was predicted to iterate too many times.
16497         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
16499 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
16501         PR lto/71991
16502         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
16503         always inline.
16505 2018-04-13  Martin Liska  <mliska@suse.cz>
16506             Jakub Jelinek  <jakub@redhat.com>
16508         PR middle-end/81657
16509         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
16510         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
16511         * builtins.c (expand_builtin_memory_copy_args): Use
16512         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
16513         handle dest_addr == pc_rtx.
16515 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
16517         PR target/85291
16518         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
16519         asked to not generate direct moves.
16520         (fix_trunc<mode>si2_stfiwx): Similar.
16521         (fix_trunc<mode>si2_internal): Similar.
16523 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
16525         PR debug/83157
16526         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
16527         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
16528         lookup if dest in some wider mode is known to be const0_rtx and
16529         if so, record permanent equivalence for it to be ZERO_EXTEND of
16530         the narrower mode destination.
16532 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
16534         * lto-streamer-out.c (output_function): Revert 259346.
16535         * omp-expand.c (expand_oacc_for): Likewise.
16537 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
16539         PR rtl-optimization/85354
16540         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
16541         * sel-sched.c (sel_global_init): ... here.
16543 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
16545         PR target/85238
16546         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
16547         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
16548         mode for PE-COFF targets.
16549         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
16550         (i386_pe_asm_lto_end): Likewise.
16551         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
16552         (TARGET_ASM_LTO_END): Likewise.
16553         * config/i386/winnt.c (saved_debug_info_level): New static variable.
16554         (i386_pe_asm_lto_start): New function.
16555         (i386_pe_asm_lto_end): Likewise.
16557 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
16558             Richard Biener  <rguenther@suse.de>
16560         PR middle-end/84955
16561         * lto-streamer-out.c (output_function): Fix CFG loop state before
16562         streaming out.
16563         * omp-expand.c (expand_oacc_for): Handle calls to internal
16564         functions like regular functions.
16566 2018-04-12  Richard Biener  <rguenther@suse.de>
16568         PR lto/85371
16569         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
16570         for the early LTO debug to properly generate references to it
16571         during DIE emission.  Do not re-use that for the skeleton for
16572         split-dwarf.
16573         (dwarf2out_early_finish): Likewise.
16575 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
16577         PR target/85328
16578         * config/i386/sse.md
16579         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
16580         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
16581         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
16582         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
16583         and output is a reg, avoid creating invalid lowpart subreg, but
16584         instead split into a 512-bit move.  Don't split if not AVX512VL,
16585         input is xmm16+ reg and output is a mem.
16586         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
16587         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
16588         xmm16+ reg and output is a mem.
16590 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16592         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
16593         also for flag_dwarf2_cfi_asm.
16595 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
16597         PR rtl-optimization/85342
16598         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
16599         a bool scalar var inside of the loop instead.  Don't try to update
16600         recog_data.operand after failed apply_change_group.
16602 2018-04-12  Tom de Vries  <tom@codesourcery.com>
16604         PR target/85296
16605         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
16606         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
16607         array with flexible array member as array without given dimension.
16608         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
16609         argument for undefined param to true.
16611 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
16613         PR target/85321
16614         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
16615         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
16616         from PowerPC section.
16617         * config/rs6000/sysv4.opt (mcall-): Improve help text.
16618         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
16619         help text that is too long.
16620         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
16621         help text that is too long.
16622         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
16623         help text that is too long.
16625 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
16627         * config/alpha/alpha.md (stack_probe_internal): Rename
16628         from "probe_stack".  Update all callers.
16630 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
16632         PR rtl-optimization/84566
16633         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
16634         sched_macro_fuse_insns.
16636 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
16638         PR target/84301
16639         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
16640         (compute_block_dependences): ... from here.
16642 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
16644         PR tree-optimization/85331
16645         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
16646         from int to HOST_WIDE_INT.
16648 2018-04-11  Martin Jambor  <mjambor@suse.cz>
16650         PR ipa/84149
16651         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
16652         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
16653         not the same as the source val.
16654         (cgraph_edge_brings_value_p): New parameter.
16655         (gather_edges_for_value): Pass destination value to
16656         cgraph_edge_brings_value_p.
16657         (perhaps_add_new_callers): Likewise.
16658         (get_info_about_necessary_edges): Likewise and exclude values brought
16659         only by self-recursive edges.
16660         (create_specialized_node): Redirect only clones of self-calling edges.
16661         (+self_recursive_pass_through_p): New function.
16662         (find_more_scalar_values_for_callers_subset): Use it.
16663         (find_aggregate_values_for_callers_subset): Likewise.
16664         (known_aggs_to_agg_replacement_list): Removed.
16665         (decide_whether_version_node): Re-calculate known constants for all
16666         remaining context clones.
16668 2018-04-11  Richard Biener  <rguenther@suse.de>
16670         PR lto/85339
16671         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
16672         from early DWARF output.
16673         (dwarf2out_early_finish): Output line info unconditionally into
16674         early DWARF and add reference to it.
16676 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
16678         PR target/85281
16679         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
16680         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
16681         other than V2DFmode using iptr mode attribute.
16682         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
16684 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
16686         PR rtl-optimization/84659
16687         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
16689 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
16691         PR debug/85302
16692         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
16693         SIZEP is NULL.
16694         (output_loc_list): Pass address of a dummy size variable even in the
16695         locview handling loop.
16696         (index_location_lists): Add comment on why skip_loc_list_entry can't
16697         call size_of_locs.
16699 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16701         PR target/85261
16702         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
16703         into register.
16705 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
16707         PR target/85321
16708         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
16709         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
16710         and -mstring-compare-inline-limit.
16712 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16714         PR target/85287
16715         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
16716         for stack clash protection in a register whenever we need it to be in
16717         a register.
16719 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16721         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
16722         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
16724 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
16726         PR target/85321
16727         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
16728         the help text.
16729         (mlong-double-): Ditto.
16730         * config/rs6000/sysv4.opt (msdata=): Ditto.
16731         (mtls-size=): Ditto.
16733 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16735         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16736         erroneous entries for
16737         "vector int vec_ldl (int, long int *)", and
16738         "vector unsigned int vec_ldl (int, unsigned long int *)".
16739         Add comments and entries for
16740         "vector bool char vec_ldl (int, bool char *)",
16741         "vector bool short vec_ldl (int, bool short *)",
16742         "vector bool int vec_ldl (int, bool int *)",
16743         "vector bool long long vec_ldl (int, bool long long *)",
16744         "vector pixel vec_ldl (int, pixel *)",
16745         "vector long long vec_ldl (int, long long *)",
16746         "vector unsigned long long vec_ldl (int, unsigned long long *)".
16747         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
16748         type tree bool_long_long_type_node and correct definition of
16749         bool_V2DI_type_node to make reference to this new type tree.
16750         (rs6000_mangle_type): Replace erroneous reference to
16751         bool_long_type_node with bool_long_long_type_node.
16752         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
16753         comments to emphasize sign distinctions for char and int types and
16754         replace RS6000_BTI_bool_long constant with
16755         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
16756         use of RS6000_BTI_pixel.
16757         (bool_long_type_node): Remove this macro definition.
16758         (bool_long_long_type_node): New macro definition
16760 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
16762         PR rtl-optimization/85300
16763         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
16764         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
16765         simplify_unary_operation fails.
16767 2018-04-10  Martin Liska  <mliska@suse.cz>
16769         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
16770         cgraph_edge and ipa_ref.
16772 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
16774         PR target/85177
16775         PR target/85255
16776         * config/i386/sse.md
16777         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
16778         computation of the VEC_MERGE selector from mask.
16779         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
16780         Fix decoding of the VEC_MERGE selector into mask.
16782 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
16784         PR tree-optimization/85286
16785         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
16787 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
16789         * final.c (final_1): Set insn_last_address as well as
16790         insn_current_address.
16792 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16794         PR target/85173
16795         * explow.c (emit_stack_probe): Call validize_mem on memory location
16796         before passing it to gen_probe_stack.  Create address operand and
16797         legitimize it for the probe_stack_address case.
16799 2018-04-09  Jan Hubicka  <jh@suse.cz>
16801         PR lto/85078
16802         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
16803         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
16804         * tree.c (free_lang_data_in_type): Fix handling of binfos;
16805         walk basetypes.
16806         (free_lang_data): Rebuild type inheritance graph.
16808 2018-04-09  Martin Sebor  <msebor@redhat.com>
16810         * invoke.texi (-finline-small-functions): Mention other optimization
16811         options.
16812         (-findirect-inlining, -fpartial-inlining): Same.
16813         (-finline-functions-called-once): Same.
16814         (-freorder-blocks-and-partition): Same.
16816 2018-04-09  Jan Hubicka  <jh@suse.cz>
16818         PR rtl/84058
16819         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
16820         jumps; choose last target that matches the criteria (i.e.
16821         no partition changes for non-crossing jumps).
16822         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
16823         support for redirecting crossing jumps to non-crossing.
16825 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
16827         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
16828         also for naked functions.
16830 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
16832         * config/arc/arc.md (add_shift): New pattern.
16833         (add_shift2): Likewise.
16834         (sub_shift): Likewise.
16835         (sub_shift_cmp0_noout): Likewise.
16836         (compare_si_ashiftsi): Likewise.
16837         (xbfu_cmp0_noout): New combine pattern.
16838         (xbfu_cmp0"): Likewise.
16839         (movsi_set_cc_insn): Place the predicable variant first.
16840         (commutative_binary_cmp0_noout): Remove clobber.
16841         (commutative_binary_cmp0): New pattern.
16842         (noncommutative_binary_cmp0): Likewise.
16843         (noncommutative_binary_cmp0_noout): Likewise.
16844         (noncommutative_binary_comparison_result_used): Removed.
16845         (rsub_cmp0): New pattern.
16846         (rsub_cmp0_noout): Likewise.
16847         (extzvsi): Changed, keep only meaningful variants.
16848         (SQH, SEZ): New iterators.
16849         (SQH_postfix): New mode attribute.
16850         (SEZ_prefix): New code attribute.
16851         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
16852         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
16853         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
16854         of numerical value.
16855         (noncommutative_operator): Check the availability of barrel
16856         shifter option.
16858 2018-04-09  Richard Biener  <rguenther@suse.de>
16860         PR tree-optimization/85284
16861         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
16862         Only use the niter constraining form of simple_iv when the exit
16863         is always executed.
16865 2018-04-09  Tom de Vries  <tom@codesourcery.com>
16867         PR target/84041
16868         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16869         (define_expand "*memory_barrier"): New define_expand.
16870         (define_insn "memory_barrier"): New insn.
16872 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16874         PR rtl-optimization/80463
16875         PR rtl-optimization/83972
16876         PR rtl-optimization/83480
16878         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
16879         correct producer for the insn.
16880         (tidy_control_flow): Fixup seqnos in case of debug insns.
16882 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16884         PR rtl-optimization/83913
16886         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
16887         different sched-times when merging exprs.
16889 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16891         PR rtl-optimization/83962
16893         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
16894         tidy_fallthru_edge and tidy_control_flow.
16896 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
16898         PR rtl-optimization/83530
16900         * sel-sched.c (force_next_insn): New global variable.
16901         (remove_insn_for_debug): When force_next_insn is true, also leave only
16902         next insn in the ready list.
16903         (sel_sched_region): When the region wasn't scheduled, make another pass
16904         over it with force_next_insn set to 1.
16906 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
16908         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
16909         into tm_file.
16910         * config/nds32/constants.md (unspec_volatile_element): Add enum values
16911         for interrupt control.
16912         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
16913         functions for interrupt control.
16914         * config/nds32/nds32-intrinsic.md: Likewise.
16915         * config/nds32/nds32_intrinsic.h: Likewise.
16916         * config/nds32/nds32.h (nds32_builtins): Likewise.
16918 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
16920         * config/nds32/nds32.c (nds32_init_machine_status,
16921         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
16922         strict_aligned_p field.
16923         (nds32_expand_to_rtl_hook): New function.
16924         (TARGET_EXPAND_TO_RTL_HOOK): Define.
16925         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
16927 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
16928             Chung-Ju Wu  <jasonwucj@gmail.com>
16930         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
16931         * config/nds32/nds32-n7.md: New file.
16932         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
16933         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
16934         pipeline.
16935         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
16936         * config/nds32/nds32.md (pipeline_model): Add n7.
16937         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
16938         * config/nds32/pipelines.md: Include n7 settings.
16940 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
16941             Chung-Ju Wu  <jasonwucj@gmail.com>
16943         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
16944         * config/nds32/nds32-e8.md: New file.
16945         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
16946         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
16947         pipeline.
16948         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
16949         * config/nds32/nds32.md (pipeline_model): Add e8.
16950         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
16951         * config/nds32/pipelines.md: Include e8 settings.
16953 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
16954             Chung-Ju Wu  <jasonwucj@gmail.com>
16956         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
16957         * config/nds32/nds32-n8.md: New file.
16958         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
16959         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
16960         pipeline.
16961         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
16962         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
16963         * config/nds32/nds32.md (pipeline_model): Add n8.
16964         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
16965         * config/nds32/pipelines.md: Include n8 settings.
16967 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
16968             Chung-Ju Wu  <jasonwucj@gmail.com>
16970         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
16971         * config/nds32/nds32-n9-2r1w.md: New file.
16972         * config/nds32/nds32-n9-3r2w.md: New file.
16973         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
16974         nds32_register_ports): New or modify for cpu n9.
16975         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
16976         pipeline.
16977         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
16978         * config/nds32/nds32-utils.c: New file.
16979         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
16980         TARGET_MUL_SLOW): Define.
16981         * config/nds32/nds32.md (pipeline_model): New attribute.
16982         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
16983         New options that support cpu n9.
16984         * config/nds32/pipelines.md: Include n9 settings.
16985         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
16987 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
16989         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
16990         information if necessary.
16991         (output_cond_branch_compare_zero): Likewise.
16992         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
16993         (nds32_target_alignment): Refine for alignment.
16994         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
16995         (FUNCTION_BOUNDARY): Modify.
16996         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
16997         align case.
16998         * config/nds32/nds32.opt (malways-align, malign-functions): New.
17000 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
17002         * config/nds32/constants.md (unspec_volatile_element): Add values for
17003         TLB operation and data prefetch.
17004         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17005         functions for TLB operation and data prefetch.
17006         * config/nds32/nds32-intrinsic.md: Likewise.
17007         * config/nds32/nds32_intrinsic.h: Likewise.
17008         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17009         (nds32_print_operand): Likewise.
17010         * config/nds32/nds32.h (nds32_builtins): Likewise.
17012 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
17013         Andrew Pinski <pinsika@gcc.gnu.org>
17015         PR middle-end/82976
17016         * match.pd: Use constant_boolean_node of correct type instead of
17017         boolean_true_node or boolean_false_node for simplifying
17018         pointer comparisons to zero.
17020 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17022         PR tree-optimization/80021
17023         * tree.c (verify_type_variant): Make error call in verify_variant_match
17024         translatable and remove final full stop.
17026 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17028         * config/nds32/constants.md (unspec_volatile_element): Add
17029         UNSPEC_VOLATILE_EH_RETURN.
17030         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17031         nds32_output_stack_pop): Support dwarf exception handling process.
17032         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17033         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17034         exception handling process.
17035         (nds32_compute_stack_frame): Likewise.
17036         (nds32_return_addr_rtx): Likewise.
17037         (nds32_initial_elimination_offset): Likewise.
17038         (nds32_expand_prologue): Likewise.
17039         (nds32_expand_epilogue): Likewise.
17040         (nds32_dynamic_chain_address): New function.
17041         * config/nds32/nds32.h (machine_function): Add fields for dwarf
17042         exception handling.
17043         (DYNAMIC_CHAIN_ADDRESS): Define.
17044         (EH_RETURN_DATA_REGNO): Define.
17045         (EH_RETURN_STACKADJ_RTX): Define.
17046         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17047         patterns for dwarf exception handling.
17049 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17051         * config/nds32/nds32.h: Clean up obsolete macros.
17053 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17055         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17056         Add enum values for particular instructions.
17057         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17058         particular intrinsic functions.
17059         * config/nds32/nds32-intrinsic.md: Likewise.
17060         * config/nds32/nds32_intrinsic.h: Likewise.
17061         * config/nds32/nds32.h (nds32_builtins): Likewise.
17062         * config/nds32/nds32.md (type): Add pbsad and pbsada.
17063         (btst, ave): New patterns for particular instructions.
17065 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17067         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17068         Add enum values for atomic load/store and memory sync.
17069         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17070         and memory sync.
17071         * config/nds32/nds32-intrinsic.md: Likewise.
17072         * config/nds32/nds32_intrinsic.h: Likewise.
17073         * config/nds32/nds32.h (nds32_builtins): Likewise.
17075 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
17077         PR tree-optimization/85257
17078         * fold-const.c (native_encode_vector): If not all elts could fit
17079         and off is -1, return 0 rather than offset.
17080         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17081         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17082         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
17083         adjust buffer in native_interpret_expr call.
17085 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17087         * config/nds32/constants.md (unspec_volatile_element): Add cache
17088         control enum values.
17089         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17090         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17091         * config/nds32/nds32.c (nds32_cctl_names): New.
17092         (nds32_print_operand): Handle cache control register names.
17093         * config/nds32/nds32.h (nds32_builtins): New enum values.
17094         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17095         macros.
17096         * config/nds32/nds32.md (type): Add mmu.
17097         * config/nds32/pipelines.md (simple_insn): Add mmu.
17099 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17101         * config/nds32/nds32.md (type): Remove call.
17102         * config/nds32/pipelines.md (simple_insn): Likewise.
17104 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17106         * config/nds32/constants.md (unspec_volatile_element): Add
17107         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17108         UNSPEC_VOLATILE_FMFCFG.
17109         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17110         description for fmfcfg and fmfcsr.
17111         (bdesc_1arg): Add fmtcsr.
17112         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17113         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17114         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17115         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17116         unspec_fmfcfg): New patterns.
17117         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17118         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17119         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17120         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17121         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17122         __nds32__fmfcfg): Define.
17124 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
17126         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17127         intrinsic register names.
17128         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17129         intrinsic register enum values and macros.
17131 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
17133         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17134         for load/store addressing form.
17135         (nds32_print_operand_address): Likewise.
17137 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
17139         PR target/85196
17140         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17141         based on LABEL_REF.  Remove useless assertion.
17142         (pic_address_needs_scratch): Fix formatting.
17143         (sparc_legitimize_pic_address): Minor tweaks.
17144         (sparc_delegitimize_address): Adjust assertion accordingly.
17145         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17146         into symbolic_operand.
17147         (movsi_high_pic_label_ref): Likewise.
17148         (movsi_lo_sum_pic_label_ref): Likewise.
17149         (movdi_pic_label_ref): Likewise.
17150         (movdi_high_pic_label_ref): Likewise.
17151         (movdi_lo_sum_pic_label_ref): Likewise.
17153 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
17155         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
17156         custom LIB_SPEC setup.
17158 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
17159             Kito Cheng  <kito.cheng@gmail.com>
17161         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
17162         * config/riscv/freebsd.h: New.
17164 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17166         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
17167         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
17168         file.
17170 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17171             Kito Cheng  <kito.cheng@gmail.com>
17173         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
17174         nds32_output_call, nds32_symbol_binds_local_p): New functions.
17175         * config/nds32/nds32-protos.h (nds32_output_call,
17176         nds32_output_return): Declare.
17177         * config/nds32/nds32.md: Refine all the call and return patterns.
17179 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
17181         PR debug/85252
17182         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
17183         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
17185         PR rtl-optimization/84872
17186         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
17187         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
17188         EDGE_CROSSING edge.
17190 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
17192         * expr.c (copy_blkmode_to_reg): Revert 254862.
17193         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
17195 2018-04-06  Richard Biener  <rguenther@suse.de>
17197         PR middle-end/85244
17198         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
17199         after seeing a component reference with an adjacent field.  Treat
17200         refs to arrays at struct end of external decls similar to
17201         refs to unconstrained commons.
17203 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
17205         PR sanitizer/85213
17206         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
17207         look through SAVE_EXPRs with non-side-effects argument.  Adjust
17208         recursive calls.
17209         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
17210         save_p here.
17212 2018-04-06  Richard Biener  <rguenther@suse.de>
17214         PR middle-end/85180
17215         * alias.c (find_base_term): New wrapper around find_base_term
17216         unwinding CSELIB_VAL_PTR changes.
17217         (find_base_term): Do not restore CSELIB_VAL_PTR during the
17218         recursion.
17220 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17222         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
17223         instructions.
17224         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
17225         constant definitions.
17226         ("nop"): lr 0,0 -> nopr r0
17227         ("nop_lr0", "nop_lr1"): New insn definitions.
17229 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
17231         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
17232         NDS32_V3PUSH_AVAILABLE_P macro.
17234 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
17235             Chung-Ju Wu  <jasonwucj@gmail.com>
17237         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
17238         (nds32*-*-*): Add float and fpu_config into supported_defaults.
17239         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
17240         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
17241         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
17242         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
17243         * config/nds32/constraints.md: New constraints and checking for hard
17244         float configuration.
17245         * config/nds32/iterators.md: New mode iterator and attribute for hard
17246         float configuration.
17247         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
17248         patterns.
17249         * config/nds32/nds32-fpu.md: New file.
17250         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
17251         deal with hard float code generation.
17252         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
17253         ARCH_V3S.
17254         (abi_type, float_reg_number): New enum type.
17255         * config/nds32/nds32-predicates.c: New predicates for hard float.
17256         * config/nds32/nds32-protos.h: Declare functions for hard float.
17257         * config/nds32/nds32.c: Implementation for hard float configuration.
17258         * config/nds32/nds32.h: Definitions for hard float configuration.
17259         * config/nds32/nds32.md: Include hard float machine description and
17260         modify patterns for hard float configuration.
17261         * config/nds32/nds32.opt: New options for hard float configuration.
17262         * config/nds32/predicates.md: New predicates for hard float
17263         configuration.
17265 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
17267         * common/config/nds32/nds32-common.c
17268         (nds32_option_optimization_table): Enable -mreleax-hint by default.
17270 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
17272         PR middle-end/85195
17273         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
17274         CONSTRUCTOR_ELT (ctor, ...)->value.
17276 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
17278         PR target/85193
17279         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
17281 2018-04-05  Tom de Vries  <tom@codesourcery.com>
17283         PR target/85204
17284         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
17285         cond jump.
17287 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
17288             Kito Cheng  <kito.cheng@gmail.com>
17290         * config/nds32/constraints.md (U33): Fine-tune checking condition.
17291         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
17292         * config/nds32/nds32.h (nds32_16bit_address_type): Add
17293         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
17295 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
17296             Kito Cheng  <kito.cheng@gmail.com>
17298         * config/nds32/constraints.md (Ufe): New memory constraint.
17299         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
17300         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
17301         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
17302         operands.
17303         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
17304         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
17306 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17308         * config/nds32/nds32.md: Use optimize_size in the condition for
17309         alu-shift instructions.
17311 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17313         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
17315 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17317         * config/nds32/nds32.md (negsi2): Refine pattern.
17319 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
17320             Chung-Ju Wu  <jasonwucj@gmail.com>
17322         * config/nds32/iterators.md (shift_rotate): New code iterator.
17323         (shift): New code attribute.
17324         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
17325         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
17326         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
17327         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
17328         bit-wise operations.
17329         (andsi3, *andsi3): Ditto.
17330         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
17331         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
17332         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
17333         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
17334         nds32_ior_operand, nds32_xor_operand): New predicates.
17336 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17338         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
17339         (addsi3, subsi3): ... this.
17341 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17343         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
17345 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17347         * config/nds32/nds32.md: Adjust indention.
17349 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
17351         * config/nds32/nds32.md (feature): New attribute.
17353 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
17355         * config/nds32/nds32.md (subtype): New attribute.
17357 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17359         PR target/85203
17360         * config/arm/arm-builtins.c (arm_expand_builtin): Change
17361         expansion to perform a bitwise AND of the argument followed by a
17362         boolean negation of the result.
17364 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
17366         PR rtl-optimization/84878
17367         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
17368         the basic block.  Assert the use reference is not artificial and that
17369         it has an associated insn.
17371 2018-04-04  Michael Matz  <matz@suse.de>
17373         * builtins.c (compute_objsize): Pass correct operand
17374         to array_at_struct_end_p.
17376 2018-04-04  Richard Biener  <rguenther@suse.de>
17378         PR lto/85176
17379         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
17380         from contexts for DINFO_LEVEL_TERSE and below.
17382 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
17384         * config/nds32/nds32-doubleword.md (move_<mode>): Require
17385         resiter_operand condition.
17386         * config/nds32/nds32.md (*move<mode>): Ditto.
17388 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
17389             Monk Chiang  <sh.chiang04@gmail.com>
17391         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
17393 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
17395         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
17397 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
17398             Kito Cheng  <kito.cheng@gmail.com>
17400         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
17401         nds32_cond_code_str, output_cond_branch,
17402         output_cond_branch_compare_zero, nds32_expand_cbranch,
17403         nds32_expand_cstore, nds32_expand_movcc,
17404         nds32_output_cbranchsi4_equality_zero,
17405         nds32_output_cbranchsi4_equality_reg,
17406         nds32_output_cbranchsi4_equality_reg_or_const_int,
17407         nds32_output_cbranchsi4_greater_less_zero: New functions.
17408         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
17409         nds32_expand_cstore, nds32_expand_movcc,
17410         nds32_output_cbranchsi4_equality_zero,
17411         nds32_output_cbranchsi4_equality_reg,
17412         nds32_output_cbranchsi4_equality_reg_or_const_int,
17413         nds32_output_cbranchsi4_greater_less_zero): Declare.
17414         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
17415         nds32_rimm11s_operand): New predicates.
17416         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
17417         * config/nds32/nds32.md: Rewrite all the branch and conditional move
17418         patterns.
17420 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
17422         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
17423         * config/nds32/nds32.md: Ditto.
17424         * config/nds32/pipelines.md: Ditto.
17426 2018-04-04  Richard Biener  <rguenther@suse.de>
17428         PR tree-optimization/85168
17429         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
17430         propagating abnormals.
17432 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
17434         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
17436 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
17437             Kito Cheng  <kito.cheng@gmail.com>
17439         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
17440         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
17441         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
17442         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
17443         * config/nds32/nds32.md (sibcall_internal): New.
17444         (sibcall_register): Remove.
17445         (sibcall_immediate): Remove.
17446         (sibcall_value_internal): New.
17447         (sibcall_value_register): Remove.
17448         (sibcall_value_immediate): Remove.
17449         * config/nds32/predicates.md (nds32_general_register_operand): New.
17450         (nds32_call_address_operand): New.
17452 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
17454         PR rtl-optimization/85167
17455         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
17456         bb_defs if *split_p, instead preinitialize it to NULL.
17458         PR tree-optimization/85156
17459         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
17460         evaluating the argument multiple times.
17462 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
17464         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
17465         than vector.
17466         (_mm_cvtpd_ps): Likewise.
17467         (_mm_cvttpd_epi32): Likewise.
17468         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
17469         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
17470         vector, pixel, and bool following altivec.h include.
17472 2018-04-03  Martin Sebor  <msebor@redhat.com>
17474         * doc/extend.texi (Common Function Attributes): Clarify.
17475         (const attribute): Likewise.
17476         (pure attribute): Likewise.
17478 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
17480         PR target/85169
17481         * config/i386/i386.c (ix86_expand_vector_set): Use
17482         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
17484 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
17486         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
17487         instructions when changing rounding bits to preserve precision bits
17488         in the x87 control word.
17490 2018-04-03  Martin Liska  <mliska@suse.cz>
17492         PR tree-optimization/82491
17493         * rtl.h (strip_offset_and_add): Replace += suboffset with
17494         poly_uint64 () + suboffset.
17496 2018-03-29  Martin Liska  <mliska@suse.cz>
17497             Martin Jambor  <mjambor@suse.cz>
17499         PR ipa/84947
17500         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
17501         param_type is not an integral or pointer type.
17503 2018-04-03  Richard Biener  <rguenther@suse.de>
17505         * sese.h (recompute_all_dominators): Remove.
17507 2018-04-02  Martin Sebor  <msebor@redhat.com>
17509         * doc/invoke.texi (-Wrestrict): Fix typos.
17511 2018-04-02  Jim Wilson  <jimw@sifive.com>
17513         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
17514         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
17515         (<optab>di3, <optab>si3_extend): Likewise.
17516         (<optab>si3_mask, <optab>si3_mask_1): New.
17517         (<optab>di3_mask, <optab>di3_mask_1): New.
17518         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
17519         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
17520         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
17522 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
17524         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
17525         example.
17527 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
17529         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
17530         (nds32_canonicalize_comparison): New function.
17532 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
17533             Kito Cheng  <kito.cheng@gmail.com>
17534             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
17536         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
17537         * config/nds32/constants.md (unspec_volatile_element): Add
17538         UNSPEC_VOLATILE_RELAX_GROUP.
17539         * config/nds32/nds32-relax-opt.c: New file.
17540         * config/nds32/nds32-predicates.c
17541         (nds32_symbol_load_store_p): New function.
17542         * config/nds32/nds32-protos.h
17543         (nds32_symbol_load_store_p): Declare function.
17544         (make_pass_nds32_relax_opt): Declare new rtl pass function.
17545         * config/nds32/nds32.c
17546         (nds32_register_pass): New function to register pass.
17547         (nds32_register_passes): New function to register passes.
17548         * config/nds32/nds32.md (relax_group): New pattern.
17549         * config/nds32/nds32.opt (mrelax-hint): New option.
17550         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
17552 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
17554         * config/nds32/t-nds32: Modify files dependency.
17556 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
17558         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
17559         (PROFILE_HOOK): Define its implementation.
17561 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
17563         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
17564         type and 32-bit size.
17566 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
17568         PR middle-end/85090
17569         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
17570         (V_128_256): New mode iterator.
17571         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
17572         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
17573         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
17574         of V.
17575         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
17576         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
17578 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
17580         PR target/83315
17581         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
17582         NaN inputs correctly.
17584 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
17586         PR target/80546
17587         * config/rs6000/vsx.md (??r): New mode attribute.
17588         (*vsx_mov<mode>_64bit): Use it.
17589         (*vsx_mov<mode>_32bit): Likewise.
17591 2018-03-30  Martin Sebor  <msebor@redhat.com>
17593         PR tree-optimization/84818
17594         * builtins.c (check_access): Use warning_n.
17596 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17598         PR target/83822
17599         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
17600         condition.
17601         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
17602         condition.
17604 2018-03-30  Julia Koval  <julia.koval@intel.com>
17606         PR target/84413
17607         * x86-tune.def (movx, partial_reg_dependency): Enable for
17608         m_SKYLAKE_AVX512.
17610 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
17612         PR inline-asm/84985
17613         * lra-constraints.c (process_alt_operands): Move setting
17614         this_alternative_matches below.
17616 2018-03-29  Martin Liska  <mliska@suse.cz>
17618         PR lto/84995.
17619         * doc/invoke.texi: Document how LTO works with debug info.
17620         Describe auto-load support of binutils.  Mention 'x86-64'
17621         as valid option value of -march option.
17623 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
17625         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
17627         PR c/85094
17628         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
17629         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
17630         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
17631         checking.
17633 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
17635         PR target/84912
17636         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
17637         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
17638         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
17639         for RS6000_BTM_POWERPC64.
17640         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
17641         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
17642         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
17643         definition.
17644         (DIVDE): Use it.
17645         (DIVDEU): Likewise.
17647 2018-03-28  Carl Love  <cel@us.ibm.com>
17649         Revert
17650         2017-09-27  Carl Love  <cel@us.ibm.com>
17652         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
17653         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
17654         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
17655         fctiw instruction.
17657 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17659         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
17660         instead of __vector bool.
17661         (_mm_max_pu8): Likewise.
17662         (_mm_min_pi16): Likewise.
17664 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
17666         PR target/84912
17667         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
17668         (DIVWEUO): Likewise.
17669         (DIVDEO): Likewise.
17670         (DIVDEUO): Likewise.
17671         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
17672         DIVWEUO and DIVDEUO.
17673         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
17674         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
17675         (div_extend): Likewise.
17676         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
17677         builtin function.
17678         (__builtin_divweuo): Likewise.
17679         (__builtin_divdeo): Likewise.
17680         (__builtin_divdeuo): Likewise.
17682 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
17684         PR target/85095
17685         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
17686         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
17688         PR tree-optimization/82004
17689         * gimple-match-head.c (optimize_pow_to_exp): New function.
17690         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
17691         Don't fold to exp if optimize_pow_to_exp is false.
17693 2018-03-28  Martin Liska  <mliska@suse.cz>
17695         PR other/84819
17696         * calls.c (initialize_argument_information): Fix trailing space.
17697         * common.opt: Fix typo and provide better explanation for
17698         -fsanitize-coverage option.
17699         * config/i386/i386.opt: Fix typo.
17701 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
17702             Martin Liska  <mliska@suse.cz>
17704         PR sanitizer/85081
17705         * gimplify.c (asan_poison_variable): Don't do the check for
17706         gimplify_omp_ctxp here.
17707         (gimplify_decl_expr): Do it here.
17708         (gimplify_target_expr): Likewise.
17710 2018-03-28  Martin Liska  <mliska@suse.cz>
17712         PR target/84988
17713         * config/i386/i386.c (ix86_function_arg_advance): Do not call
17714         chkp_type_bounds_count if MPX is not enabled.
17716 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17718         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
17720 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
17722         PR target/84914
17723         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
17724         function to create the function decl for complex long double
17725         multiply and divide for -mabi=ieeelongdouble.
17726         (init_float128_ieee): Call it.
17728 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
17730         PR target/85044
17731         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
17732         -fcf-protection=branch -mibt.
17733         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
17735 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17737         PR target/81863
17738         * config/arm/arm.c (arm_valid_symbolic_address): Handle
17739         arm_word_relocations.
17741 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
17743         PR target/85056
17744         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
17745         extern array declarations.
17747 2018-03-27  Richard Biener  <rguenther@suse.de>
17749         PR middle-end/84067
17750         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
17751         explicit single_use checks.
17753 2018-03-27  Richard Biener  <rguenther@suse.de>
17755         PR tree-optimization/85082
17756         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
17757         Valueize the VUSE.
17759 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17761         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
17762         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
17763         Turn on fasynchronous-unwind-tables and funwind-tables.
17765 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
17767         PR target/85073
17768         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
17769         (*bmi_blsr_<mode>_ccz): Ditto.
17771 2018-03-26  Tom de Vries  <tom@codesourcery.com>
17773         PR tree-optimization/85063
17774         * omp-general.c (offloading_function_p): New function.  Factor out
17775         of ...
17776         * omp-offload.c (pass_omp_target_link::gate): ... here.
17777         * omp-general.h (offloading_function_p): Declare.
17778         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
17779         with attribute omp declare target for offloading functions.
17781 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
17783         PR tree-optimization/84005
17784         * tree-data-ref.h (get_base_for_alignment): Declare.
17785         * tree-data-ref.c (get_base_for_alignment_1): New function.
17786         (get_base_for_alignment): Likewise.
17787         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
17788         get_base_for_alignment to find a suitable base object, instead
17789         of always using drb->base_address.
17791 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
17793         PR inline-asm/85022
17794         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
17795         known size by default.
17797 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
17799         PR inline-asm/85030
17800         * lra-constraints.c (process_alt_operands): Don't match BLKmode
17801         and non BLKmode operands.
17803 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17805         PR target/85026
17806         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
17807         Clean up attributes.
17809 2018-03-23  Richard Biener  <rguenther@suse.de>
17811         PR debug/85020
17812         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
17813         we are going to emit early debug for LTO.
17815 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
17817         PR inline-asm/85034
17818         * function.c (match_asm_constraints_1): Don't optimize if input
17819         doesn't satisfy general_operand predicate for output's mode.
17821         PR inline-asm/85022
17822         * alias.c (write_dependence_p): Don't require for x_canonicalized
17823         non-VOIDmode if x has VOIDmode.
17825         PR sanitizer/85029
17826         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
17827         just don't try to optimize it rather than assert it never happens.
17829 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17831         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
17832         macro expansions for definition of ST_INTERNAL_<mode> and
17833         LD_INTERNAL_<mode> builtins.
17834         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
17835         Remove prototype.
17836         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
17837         function.
17838         (altivec_expand_st_builtin): Likewise.
17839         (altivec_expand_builtin): Remove calls to deleted functions.
17840         (rs6000_address_for_altivec): Delete this function.
17841         * config/rs6000/vector.md: Remove expands for
17842         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
17844 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
17846         PR target/84826
17847         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
17848         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
17849         re-computing once computed.
17850         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
17851         (arm_init_machine_status): Initialize
17852         machine->static_chain_stack_bytes.
17854 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17856         PR target/84760
17857         * doc/extend.texi: Add four new prototypes for vec_ld.
17858         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
17859         definitions for more logical presentation.
17860         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
17861         entries for V1TI variants of __builtin_altivec_ld builtin.
17862         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
17863         handling of V1TI variant of LVX icode pattern.
17864         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
17865         (rs6000_gimple_fold_builtin): Likewise.
17866         (altivec_init_builtins): Add code to define
17867         __builtin_altivec_lvx_v1ti function.
17869 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
17871         PR inline-asm/84941
17872         * function.c (match_asm_constraints_1): Don't do the optimization
17873         if input isn't a REG, SUBREG, MEM or constant.
17875 2018-03-22  Tom de Vries  <tom@codesourcery.com>
17877         PR tree-optimization/84956
17878         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
17879         bb_has_abnormal_pred.
17881 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
17883         PR sanitizer/85018
17884         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
17885         DECL_INITIAL (decl) to decl at the end.
17886         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
17887         adjust the comment.
17889 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
17891         * doc/extend.texi (__builtin_tgmath): Document when complex
17892         integer types are treated as _Complex _Float64.
17894 2018-03-21  Tom de Vries  <tom@codesourcery.com>
17896         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
17898 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
17900         PR tree-optimization/84960
17901         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
17902         if it is ENTRY block, move them into single succ of ENTRY in that case.
17904 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
17906         PR tree-optimization/84811
17907         * poly-int.h (poly_span_traits): Remove the T3 parameter and
17908         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
17909         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
17910         (known_subrange_p): Update accordingly.  Cast each value involved
17911         in the size comparison, rather than casting the result of the
17912         subtraction.
17914 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
17916         PR tree-optimization/84982
17917         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
17918         by flipping the least significant bit rather than all bits from
17919         bitpos to bitpos + bitsize - 1.
17921 2018-03-21  Nathan Sidwell  <nathan@acm.org>
17923         * doc/extend.texi (Deprecated Features): Remove mention of
17924         long-deleted deprecations.
17926 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17928         PR jit/84288
17929         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
17930         * configure: Regenerate.
17932 2018-03-21  Tom de Vries  <tom@codesourcery.com>
17934         PR tree-optimization/83126
17935         * tree-parloops.c (num_phis): New function.
17936         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
17938 2018-03-21  Nathan Sidwell  <nathan@acm.org>
17940         * doc/extend.texi (Deprecated Features): Update deprecated flags,
17941         mention anon-struct/union members and trailing attributes.
17943 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
17945         PR tree-optimization/84969
17946         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
17947         builtin memset partitions if they set different rhs values.
17949 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
17951         PR rtl-optimization/84989
17952         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
17953         VEC_DUPLICATE with scalar result mode.
17955 2018-03-21  Martin Liska  <mliska@suse.cz>
17957         PR ipa/84963
17958         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
17959         not intended return statement.
17961 2018-03-21  Martin Liska  <mliska@suse.cz>
17963         PR target/84988
17964         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
17965         (chkp_find_bound_slots_1): Limit number of iterations.
17967 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
17969         PR target/84838
17970         * Minor grammar fixes for x86 options.
17972 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
17974         PR debug/84875
17975         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
17976         holding REG_CFA_RESTORE notes, instead turn them into a USE.
17978 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
17980         PR target/83789
17981         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
17982         (altivec_lvx_<mode>_1op): Likewise.
17983         (altivec_stvx_<mode>_2op): Likewise.
17984         (altivec_stvx_<mode>_1op): Likewise.
17985         (altivec_lvx_<VM2:mode>): New define_expand.
17986         (altivec_stvx_<VM2:mode>): Likewise.
17987         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
17988         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17989         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
17990         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
17991         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
17992         (rs6000_gen_lvx): Likewise.
17993         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
17994         (altivec_expand_stv_builtin): Likewise.
17995         (altivec_expand_builtin): Likewise.
17996         * config/rs6000/vector.md: Likewise.
17998 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18000         PR target/82518
18001         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18002         BYTES_BIG_ENDIAN.
18004 2018-03-20  Richard Biener  <rguenther@suse.de>
18006         PR target/84986
18007         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18008         sign-conversions as zero, fall back to standard scalar_stmt
18009         cost for the rest.
18011 2018-03-20  Martin Liska  <mliska@suse.cz>
18013         PR ipa/84825
18014         * predict.c (rebuild_frequencies): Handle case when we have
18015         PROFILE_ABSENT, but flag_guess_branch_prob is false.
18017 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18019         PR target/84990
18020         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18021         flag_section_anchors.
18022         * varasm.c (use_blocks_for_decl_p): Remove hack for
18023         dw2_force_const_mem.
18025         PR target/84845
18026         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18027         to ...
18028         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
18029         be created, use lowpart_subreg of operands[0] rather than operands[0]
18030         itself.
18031         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18032         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18033         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18034         and n constraint instead of aarch64_shift_imm_di and Usd.
18035         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18036         (*aarch64_<optab>_reg_minus<mode>3): ... this.
18038 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
18040         PR target/82989
18041         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18042         to favor GPR over NEON registers.
18043         (<shift>di3_neon): Likewise.
18045 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18047         PR target/84952
18048         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18049         (nvptx_process_pars): Emit bar.sync asap and alap.
18051 2018-03-20  Tom de Vries  <tom@codesourcery.com>
18053         PR target/84954
18054         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18055         seen_label if seen_label is already set.
18057 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
18059         PR target/84945
18060         * config/i386/i386.c (fold_builtin_cpu): For features above 31
18061         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18062         Use 1U instead of 1.  Formatting fixes.
18064         PR c/84953
18065         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18066         instead of TREE_TYPE (s1) for the return value.
18068 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
18070         PR tree-optimization/84946
18071         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18072         bitsize + bitsize in poly_uint64 rather than poly_int64.
18074         PR sanitizer/78651
18075         * dwarf2asm.c: Include fold-const.c.
18076         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18077         of decl rather than decl itself.
18079         PR rtl-optimization/84643
18080         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18082 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
18084         PR sanitizer/78651
18085         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18086         calling assemble_variable.
18088 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
18090         PR target/81647
18091         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18092         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18094 2018-03-19  Jim Wilson  <jimw@sifive.com>
18096         PR bootstrap/84856
18097         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18098         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18099         (riscv_first_stack_step): Likewise.
18100         (riscv_option_override): Use STACK_BOUNDARY instead of
18101         MIN_STACK_BOUNDARY.
18102         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18103         MIN_STACK_BOUNDARY.
18104         (BIGGEST_ALIGNMENT): Set to 128.
18105         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18106         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18107         STACK_BOUNDARY.
18109 2018-03-19  Richard Biener  <rguenther@suse.de>
18111         PR tree-optimization/84933
18112         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18113         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18115 2018-03-19  Richard Biener  <rguenther@suse.de>
18117         PR tree-optimization/84859
18118         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18119         (cond_if_else_store_replacement): Perform sinking operation on
18120         single-store BBs regardless of MAX_STORES_TO_SINK setting.
18121         Generalize what a BB with a single eligible store is.
18123 2018-03-19  Richard Biener  <rguenther@suse.de>
18125         PR tree-optimization/84929
18126         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18127         chrec_is_positive against non-chrec arg.
18129 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
18131         PR target/84711
18132         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18134 2018-03-18  Martin Liska  <mliska@suse.cz>
18136         PR rtl-optimization/84635
18137         * regrename.c (build_def_use): Use matches_mode only when
18138         matches >= 0.
18140 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
18142         PR tree-optimization/84913
18143         * tree-vect-loop.c (vectorizable_reduction): Don't try to
18144         vectorize chains of COND_EXPRs.
18146 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18148         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18150 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18152         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
18154 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
18156         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
18158 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18159             Kito Cheng  <kito.cheng@gmail.com>
18161         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
18162         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
18163         (nds32_adjust_reg_alloc_order): New function.
18164         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
18166 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
18168         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
18169         nds32_print_operand, nds32_print_operand_address): Use
18170         HOST_WIDE_INT_PRINT_DEC instead.
18172 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
18174         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
18176 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
18178         PR target/84902
18179         * config/i386/i386.c (initial_ix86_tune_features,
18180         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
18181         unsigned long long.
18182         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
18183         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
18184         rather than 1u << ix86_tune.  Formatting fix.
18185         (ix86_option_override_internal): Change ix86_arch_mask from
18186         unsigned int to unsigned HOST_WIDE_INT, initialize to
18187         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
18188         (ix86_function_specific_restore): Likewise.
18190 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18192         PR target/84899
18193         * postreload.c (reload_combine_recognize_pattern): Perform
18194         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
18195         truncate_int_for_mode the result for the destination's mode.
18197         PR c/84909
18198         * hsa-gen.c (mem_type_for_type): Fix comment typo.
18199         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
18200         Likewise.
18201         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18202         Likewise.
18204 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
18206         PR target/84876
18207         * lra-assigns.c (lra_split_hard_reg_for): Don't use
18208         regno_allocno_class_array and sorted_pseudos.
18209         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
18210         insns where regno is used.
18212 2018-03-16  Martin Liska  <mliska@suse.cz>
18214         PR ipa/84833
18215         * multiple_target.c (create_dispatcher_calls): Redirect
18216         reference in the symbol table.
18218 2018-03-16  Martin Liska  <mliska@suse.cz>
18220         PR ipa/84722
18221         * multiple_target.c (create_dispatcher_calls): Redirect also
18222         an alias.
18224 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18226         PR c++/79937
18227         PR c++/82410
18228         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
18229         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
18230         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
18232 2018-03-16  Julia Koval  <julia.koval@intel.com>
18234         * doc/invoke.texi (Skylake Server): Add CLWB.
18235         Cannonlake): Remove CLWB.
18237 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
18239         PR tree-optimization/84841
18240         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
18241         1 << 3.
18242         (FLOAT_ONE_CONST_TYPE): Define.
18243         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
18244         (sort_by_operand_rank): Put entries with higher constant_type last
18245         rather than first to match comments.
18247 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
18249         * config/nios2/nios2.md (movsi_internal): Fix thinko in
18250         split predicate.
18252 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
18254         PR c++/79085
18255         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
18256         check and use address of target always.
18258 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
18260         PR target/84574
18261         * config/i386/i386.c (indirect_thunk_needed): Update comments.
18262         (indirect_thunk_bnd_needed): Likewise.
18263         (indirect_thunks_used): Likewise.
18264         (indirect_thunks_bnd_used): Likewise.
18265         (indirect_return_needed): New.
18266         (indirect_return_bnd_needed): Likewise.
18267         (output_indirect_thunk_function): Add a bool argument for
18268         function return.
18269         (output_indirect_thunk_function): Don't generate alias for
18270         function return thunk.
18271         (ix86_code_end): Call output_indirect_thunk_function to generate
18272         function return thunks.
18273         (ix86_output_function_return): Set indirect_return_bnd_needed
18274         and indirect_return_needed instead of indirect_thunk_bnd_needed
18275         and indirect_thunk_needed.
18277 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
18279         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
18280         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
18281         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
18283 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
18284             Paul Hua <paul.hua.gm@gmail.com>
18286         PR c/84852
18287         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
18289 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
18291         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
18292         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
18293         resp. SFmode cases.
18295 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
18297         PR target/84711
18298         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
18299         instead of GET_MODE_SIZE when comparing Units.
18301 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
18303         PR target/68256
18304         * varasm.c (hash_section): Return an unchangeble hash value
18305         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
18306         Return !aarch64_can_use_per_function_literal_pools_p ().
18308 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
18310         PR target/84860
18311         * optabs.c (emit_conditional_move): Pass address of cmode's copy
18312         rather than address of cmode as last argument to prepare_cmp_insn.
18314 2018-03-15  Julia Koval  <julia.koval@intel.com>
18316         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
18317         F_AVX512VNNI, F_AVX512BITALG): New.
18319 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
18321         PR target/83451
18322         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
18323         insn for floating-point loads and stores.
18325 2018-03-14  Carl Love  <cel@us.ibm.com>
18327         * config/rs6000/rs6000-c.c: Add macro definitions for
18328         ALTIVEC_BUILTIN_VEC_PERMXOR.
18329         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
18330         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
18331         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
18332         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
18333         UNSPEC_VPERMXOR.
18334         * config/doc/extend.texi: Add prototypes for vec_permxor.
18336 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
18338         PR c/84852
18339         * diagnostic-show-locus.c (class layout_point): Convert m_line
18340         from int to linenum_type.
18341         (line_span::comparator): Use linenum "compare" function when
18342         comparing line numbers.
18343         (test_line_span): New function.
18344         (layout_range::contains_point): Convert param "row" from int to
18345         linenum_type.
18346         (layout_range::intersects_line_p): Likewise.
18347         (layout::will_show_line_p): Likewise.
18348         (layout::print_source_line): Likewise.
18349         (layout::should_print_annotation_line_p): Likewise.
18350         (layout::print_annotation_line): Likewise.
18351         (layout::print_leading_fixits): Likewise.
18352         (layout::annotation_line_showed_range_p): Likewise.
18353         (struct line_corrections): Likewise for field m_row.
18354         (line_corrections::line_corrections): Likewise for param "row".
18355         (layout::print_trailing_fixits): Likewise.
18356         (layout::get_state_at_point): Likewise.
18357         (layout::get_x_bound_for_row): Likewise.
18358         (layout::print_line): Likewise.
18359         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
18360         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
18361         * input.c (selftest::test_linenum_comparisons): New function.
18362         (selftest::input_c_tests): Call it.
18363         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
18364         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
18365         * selftest.h (ASSERT_GT): New macro.
18366         (ASSERT_GT_AT): New macro.
18367         (ASSERT_LT): New macro.
18368         (ASSERT_LT_AT): New macro.
18370 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
18372         PR rtl-optimization/84780
18373         * combine.c (distribute_links): Don't make a link based on pc_rtx.
18375 2018-03-14  Martin Liska  <mliska@suse.cz>
18377         * tree.c (record_node_allocation_statistics): Use
18378         get_stats_node_kind.
18379         (get_stats_node_kind): New function extracted from
18380         record_node_allocation_statistics.
18381         (free_node): Use get_stats_node_kind.
18383 2018-03-14  Richard Biener  <rguenther@suse.de>
18385         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
18386         that the value-set of ANTIC_IN doesn't grow.
18388         Revert
18389         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
18390         member.
18391         (BB_VISITED_WITH_VISITED_SUCCS): New define.
18392         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
18394 2018-03-14  Julia Koval  <julia.koval@intel.com>
18396         * config.gcc (icelake-client, icelake-server): New.
18397         (icelake): Remove.
18398         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
18399         (initial_ix86_arch_features): Ditto.
18400         (PTA_SKYLAKE): Add SGX.
18401         (PTA_ICELAKE): Remove.
18402         (PTA_ICELAKE_CLIENT): New.
18403         (PTA_ICELAKE_SERVER): New.
18404         (ix86_option_override_internal): Split up icelake on icelake client and
18405         icelake server.
18406         (get_builtin_code_for_version): Ditto.
18407         (fold_builtin_cpu): Ditto.
18408         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
18409         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
18410         * config/i386/i386.h (processor_type): Ditto.
18411         * doc/invoke.texi: Ditto.
18413 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
18415         PR sanitizer/83392
18416         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
18417         INTEGER_CST offset, add it together with bitpos / 8 and
18418         sign extend based on POINTER_SIZE.
18420         PR target/84844
18421         Revert
18422         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
18424         PR target/78090
18425         * config/i386/constraints.md (Yc): New register constraint.
18426         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
18427         Use Yc constraint for alternative 2 of operand 0.  Remove
18428         preferred_for_speed attribute.
18430 2018-03-14  Richard Biener  <rguenther@suse.de>
18432         PR tree-optimization/84830
18433         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
18434         with the old one to avoid oscillations.
18436 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
18438         PR target/83712
18439         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
18440         pseudos.
18441         (assign_by_spills): Return a flag of reload assignment failure.
18442         Do not process the reload assignment failures.  Do not spill other
18443         reload pseudos if they has the same reg class.  Update n if
18444         necessary.
18445         (lra_assign): Add a return arg.  Set up from the result of
18446         assign_by_spills call.
18447         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18448         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
18449         usage_insns if it is not NULL.
18450         (spill_hard_reg_in_range): New function.
18451         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18452         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18453         function prototypes.
18454         (lra_assign): Change prototype.
18455         * lra.c (lra): Add code to deal with fails by splitting hard reg
18456         live ranges.
18458 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
18460         * config/riscv/riscv.opt (mrelax): New option.
18461         * config/riscv/riscv.c (riscv_file_start): Emit ".option
18462         "norelax" when riscv_mrelax is disabled.
18463         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
18465 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18467         PR target/84743
18468         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
18469         reassociation for int modes.
18471 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
18473         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
18474         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
18475         for big-endian.
18476         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
18477         * config/aarch64/aarch64-sve.md
18478         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
18479         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
18480         (*extend<mode><Vwide>2): Rename to...
18481         (aarch64_sve_extend<mode><Vwide>2): ...this.
18482         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
18483         renaming the old pattern to...
18484         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
18485         unsigned packs.
18486         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
18487         define_expand, renaming the old pattern to...
18488         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
18489         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
18490         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
18491         account when deciding which SVE instruction the optab should use.
18492         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
18494 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
18496         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
18497         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
18498         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
18499         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
18500         (tlsdesc_small_<mode>): Turn a define_expand and use
18501         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
18502         (tlsdesc_small_advsimd_<mode>): ...this.
18503         (tlsdesc_small_sve_<mode>): New pattern.
18505 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
18507         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
18508         (UNSPEC_UMUL_HIGHPART): New constants.
18509         (MUL_HIGHPART): New int iteraor.
18510         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
18511         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
18512         define_expand.
18513         (*<su>mul<mode>3_highpart): New define_insn.
18515 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
18517         PR lto/84805
18518         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18519         incomplete types.
18521 2018-03-13  Martin Liska  <mliska@suse.cz>
18523         PR ipa/84658.
18524         * (sem_item_optimizer::sem_item_optimizer): Initialize new
18525         vector.
18526         (sem_item_optimizer::~sem_item_optimizer): Release it.
18527         (sem_item_optimizer::merge_classes): Register variable aliases.
18528         (sem_item_optimizer::fixup_pt_set): New function.
18529         (sem_item_optimizer::fixup_points_to_sets): Likewise.
18530         * ipa-icf.h: Declare new variables and functions.
18532 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
18534         PR middle-end/84834
18535         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
18536         integer_pow2p@2 and test integer_pow2p in condition.
18537         (A < 0 ? C : 0): Similarly for @1.
18539         PR middle-end/84831
18540         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
18541         characters starting at p contain '\0' character, don't look beyond
18542         that.
18544         PR target/84827
18545         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
18546         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
18548         PR target/84828
18549         * reg-stack.c (change_stack): Change update_end var from int to
18550         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
18551         also call set_block_for_insn on the newly added insns and rescan.
18553         PR target/84786
18554         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
18555         on the last operand.
18557         PR c++/84704
18558         * tree.c (stabilize_reference_1): Return save_expr (e) for
18559         STATEMENT_LIST even if it doesn't have side-effects.
18561 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
18563         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
18565 2018-03-12  Renlin Li  <renlin.li@arm.com>
18567         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
18568         aarch64_output_scalar_simd_mov_immediate.
18570 2018-03-12  Martin Sebor  <msebor@redhat.com>
18572         PR tree-optimization/83456
18573         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
18574         for perfectly overlapping calls to memcpy.
18575         (gimple_fold_builtin_memory_chk): Same.
18576         (gimple_fold_builtin_strcpy): Handle no-warning.
18577         (gimple_fold_builtin_stxcpy_chk): Same.
18578         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
18580 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
18582         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
18583         parameter.  Use it for SFmode.
18584         (rs6000_function_arg_advance_1): Adjust.
18585         (rs6000_function_arg): Adjust.
18586         (rs6000_gimplify_va_arg): Pass false for that new parameter.
18588 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
18590         PR rtl-optimization/84169
18591         PR rtl-optimization/84780
18592         * combine.c (can_combine_p): Check for a 2-insn combination whether
18593         the destination register is used between the two insns, too.
18595 2018-03-12  Richard Biener  <rguenther@suse.de>
18597         PR tree-optimization/84803
18598         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
18599         for refs DR analysis didn't process.
18601 2018-03-12  Richard Biener  <rguenther@suse.de>
18603         PR tree-optimization/84777
18604         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
18605         force-vectorize loops ignore whether we are optimizing for size.
18607 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
18609         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
18610         (TARGET_MD_ASM_ADJUST): Define.
18612 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
18613             Kito Cheng  <kito.cheng@gmail.com>
18614             Chung-Ju Wu  <jasonwucj@gmail.com>
18616         * config/nds32/nds32.c (nds32_compute_stack_frame,
18617         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
18618         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
18619         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
18620         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
18621         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
18622         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
18623         * config/nds32/nds32.md (prologue, epilogue): Use macro
18624         NDS32_V3PUSH_AVAILABLE_P to do checking.
18626 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
18628         PR debug/58150
18629         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
18630         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
18631         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
18632         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
18633         addition of most attributes on !orig_type_die or the attribute not
18634         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
18636 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
18637             Chung-Ju Wu  <jasonwucj@gmail.com>
18639         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
18640         __NDS32_VH__ macro.
18641         * config/nds32/nds32.opt (mvh): New option.
18643 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
18644             Chung-Ju Wu  <jasonwucj@gmail.com>
18646         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
18647         function.
18648         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
18649         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
18650         definition.
18652 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
18653             Chung-Ju Wu  <jasonwucj@gmail.com>
18655         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
18656         function.
18657         * config/nds32/nds32-multiple.md (strlensi): New pattern.
18658         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
18660 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
18661             Kito Cheng  <kito.cheng@gmail.com>
18662             Chung-Ju Wu  <jasonwucj@gmail.com>
18664         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
18665         UNSPEC_FFMISM and UNSPEC_FLMISM.
18666         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
18667         for ffb, ffmism and flmism.
18668         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
18669         (unspec_ffmism): Ditto.
18670         (unspec_flmism): Ditto.
18671         (nds32_expand_builtin_impl): Check if string extension is available.
18672         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
18673         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
18675 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
18677         Reverting patch:
18678         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
18680         PR target/83712
18681         * lra-assigns.c (assign_by_spills): Return a flag of reload
18682         assignment failure.  Do not process the reload assignment
18683         failures.  Do not spill other reload pseudos if they has the same
18684         reg class.
18685         (lra_assign): Add a return arg.  Set up from the result of
18686         assign_by_spills call.
18687         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18688         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
18689         usage_insns if it is not NULL.
18690         (spill_hard_reg_in_range): New function.
18691         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18692         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18693         function prototypes.
18694         (lra_assign): Change prototype.
18695         * lra.c (lra): Add code to deal with fails by splitting hard reg
18696         live ranges.
18698 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
18700         PR target/84807
18701         * config/i386/i386.opt: Replace Enforcment with Enforcement.
18703 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
18705         PR debug/84620
18706         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
18707         (dw_val_node): Add val_symbolic_view.
18708         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
18709         (symview_upper_bound): New.
18710         (new_line_info_table): Initialize symviews_since_reset.
18711         (dwarf2out_source_line): Count symviews_since_reset and set
18712         symview_upper_bound.
18713         (dw_val_equal_p): Handle symview.
18714         (add_AT_symview): New.
18715         (print_dw_val): Handle symview.
18716         (attr_checksum, attr_checksum_ordered): Likewise.
18717         (same_dw_val_p, size_of_die): Likewise.
18718         (value_format, output_die): Likewise.
18719         (add_high_low_attributes): Use add_AT_symview for entry_view.
18720         (dwarf2out_finish): Reset symview_upper_bound, clear
18721         zero_view_p.
18723 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
18725         PR target/83969
18726         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
18727         Add strict argument and use it.
18728         (rs6000_split_multireg_move): Update for new strict argument.
18729         (mem_operand_gpr): Disallow all non-offsettable addresses.
18730         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
18732 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
18734         PR target/84772
18735         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
18736         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
18737         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
18739         PR c++/84767
18740         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
18741         decl, use remap_type if we want to use the type.
18743 2018-03-09  Martin Sebor  <msebor@redhat.com>
18745         PR tree-optimization/84526
18746         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18747         Remove dead code.
18748         (builtin_access::generic_overlap): Be prepared to handle non-array
18749         base objects.
18751 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
18753         PR rtl-optimization/84682
18754         * lra-constraints.c (process_address_1): Check is_address flag
18755         for address constraints.
18756         (process_alt_operands): Likewise.
18757         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
18758         preprocess_constraints.
18759         * recog.h (preprocess_constraints): Add oploc parameter.
18760         Adjust callers.
18761         * recog.c (preprocess_constraints): Test address_operand for
18762         CT_ADDRESS constraints.
18764 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
18766         PR target/83712
18767         * lra-assigns.c (assign_by_spills): Return a flag of reload
18768         assignment failure.  Do not process the reload assignment
18769         failures.  Do not spill other reload pseudos if they has the same
18770         reg class.
18771         (lra_assign): Add a return arg.  Set up from the result of
18772         assign_by_spills call.
18773         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
18774         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
18775         usage_insns if it is not NULL.
18776         (spill_hard_reg_in_range): New function.
18777         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
18778         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
18779         function prototypes.
18780         (lra_assign): Change prototype.
18781         * lra.c (lra): Add code to deal with fails by splitting hard reg
18782         live ranges.
18784 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18786         PR target/83193
18787         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
18788         Accept complain bool parameter.  Only emit errors if it is true.
18789         (arm_parse_cpu_option_name): Likewise.
18790         (arm_target_thumb_only): Adjust callers of the above.
18791         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
18792         prototype to take a default true bool parameter.
18793         (arm_parse_arch_option_name): Likewise.
18795 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
18796             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
18798         PR jit/64089
18799         PR jit/84288
18800         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
18801         * configure: Regenerate.
18802         * configure.ac ("linker --version-script option"): New.
18803         ("linker soname option"): New.
18805 2018-03-09  Richard Biener  <rguenther@suse.de>
18807         PR tree-optimization/84775
18808         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
18809         immediate uses of predicate stmts and mark them modified.
18811         Revert
18812         PR tree-optimization/84178
18813         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
18814         to caller.
18815         (version_loop_for_if_conversion): Delay update_ssa call.
18816         (tree_if_conversion): Delay update_ssa until after predicate
18817         insertion.
18819 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
18821         PR target/84763
18822         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
18823         when the function accesses prior frames.
18825 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
18827         PR debug/84456
18828         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
18829         gen_llsym, otherwise call maybe_gen_llsym.
18831         PR inline-asm/84742
18832         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
18833         has ',' character inside of it.
18835 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18837         PR target/84748
18838         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
18839         as clobbering CC_REGNUM.
18841 2018-03-08  Richard Biener  <rguenther@suse.de>
18843         PR middle-end/84552
18844         * tree-scalar-evolution.c: Include tree-into-ssa.h.
18845         (follow_copies_to_constant): Do not follow SSA names registered
18846         for update.
18848 2018-03-08  Richard Biener  <rguenther@suse.de>
18850         PR tree-optimization/84178
18851         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
18852         to caller.
18853         (version_loop_for_if_conversion): Delay update_ssa call.
18854         (tree_if_conversion): Delay update_ssa until after predicate
18855         insertion.
18857 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
18859         PR tree-optimization/84178
18860         * tree-if-conv.c (release_bb_predicate): Remove the
18861         the assertion that the stmts have NULL use_ops.
18862         Discard the statements, asserting that they haven't
18863         yet been added to a BB.
18865 2018-03-08  Richard Biener  <rguenther@suse.de>
18867         PR tree-optimization/84746
18868         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
18869         (phi_translate): Pass in destination ANTIC_OUT set.
18870         (phi_translate_1): Likewise.  For a simplified result lookup
18871         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
18872         (phi_translate_set): Adjust.
18873         (do_pre_regular_insertion): Likewise.
18874         (do_pre_partial_partial_insertion): Likewise.
18876 2018-03-08  Martin Liska  <mliska@suse.cz>
18878         PR gcov-profile/84735
18879         * doc/gcov.texi: Document usage of profile files.
18880         * gcov-io.h: Document changes in the format.
18882 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
18884         PR debug/84404
18885         PR debug/84408
18886         * dwarf2out.c (struct dw_line_info_table): Update comments for
18887         view == -1.
18888         (FORCE_RESET_NEXT_VIEW): New.
18889         (FORCE_RESETTING_VIEW_P): New.
18890         (RESETTING_VIEW_P): Check for -1 too.
18891         (ZERO_VIEW_P): Likewise.
18892         (new_line_info_table): Force-reset next view.
18893         (dwarf2out_begin_function): Likewise.
18894         (dwarf2out_source_line): Simplify zero_view_p initialization.
18895         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
18896         view directly.  Omit view when omitting .loc at line 0.
18898 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
18900         PR tree-optimization/84740
18901         * tree-switch-conversion.c (process_switch): Call build_constructors
18902         only if info.phi_count is non-zero.
18904         PR tree-optimization/84739
18905         * tree-tailcall.c (find_tail_calls): Check call arguments against
18906         DECL_ARGUMENTS (current_function_decl) rather than
18907         DECL_ARGUMENTS (func) when checking for tail recursion.
18909 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
18911         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
18912         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
18913         Volker Reichelt's entry and add entries for people that perform
18914         GCC fuzzy testing and report numerous bugs.
18916 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
18918         PR target/82411
18919         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
18920         readonly data in sdata, if that is disabled.
18921         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
18922         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
18923         -mreadonly-in-sdata option.
18925 2018-03-07  Martin Sebor  <msebor@redhat.com>
18927         PR tree-optimization/84468
18928         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
18929         basic block when looking for nul assignment.
18931 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
18933         PR target/84277
18934         * except.h (output_function_exception_table): Adjust prototype.
18935         * except.c (output_function_exception_table): Remove FNNAME parameter
18936         and add SECTION parameter.  Ouput one part of the table at a time.
18937         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
18938         the first part of the exception table and emit unwind directives.
18939         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
18940         (i386_pe_seh_cold_init): Likewise.
18941         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
18942         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
18943         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
18944         (ix86_output_call_insn): Emit a nop in one more case for SEH.
18945         * config/i386/winnt.c: Include except.h.
18946         (struct seh_frame_state): Add reg_offset, after_prologue and
18947         in_cold_section fields.
18948         (i386_pe_seh_end_prologue): Set seh->after_prologue.
18949         (i386_pe_seh_cold_init): New function.
18950         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
18951         to seh->in_cold_section.
18952         (seh_emit_push): Record the offset of the push.
18953         (seh_emit_save): Record the offet of the save.
18954         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
18955         Test seh->after_prologue to disregard the epilogue.
18956         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
18957         (i386_pe_end_cold_function): New function.
18959 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
18961         PR fortran/84565
18962         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
18963         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
18965         PR c++/84704
18966         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
18967         on tmp_var.
18968         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
18969         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
18971         PR middle-end/84723
18972         * multiple_target.c: Include tree-inline.h and intl.h.
18973         (expand_target_clones): Diagnose and fail if node->definition and
18974         !tree_versionable_function_p (node->decl).
18976 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
18978         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
18979         sprint_ul.
18980         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
18981         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18982         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
18984 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
18986         PR target/84710
18987         * combine.c (try_combine): Use reg_or_subregno instead of handling
18988         just paradoxical SUBREGs and REGs.
18990 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
18992         * config/arc/arc.c (arc_finalize_pic): Remove function.
18993         (arc_must_save_register): We use single base PIC register, remove
18994         checks to save/restore the PIC register.
18995         (arc_expand_prologue): Likewise.
18996         * config/arc/arc-protos.h (arc_set_default_type_attributes):
18997         Remove.
18998         (arc_verify_short): Likewise.
18999         (arc_attr_type): Likewise.
19000         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19001         (walk_stores): Likewise.
19002         (arc_address_cost): Make it static.
19003         (arc_verify_short): Likewise.
19004         (branch_dest): Likewise.
19005         (arc_attr_type): Likewise.
19006         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19007         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19008         (arc_final_prescan_insn): Remove inserting the nops due to
19009         hardware hazards.  It is done in reorg step.
19010         (insn_length_variant_t): Remove.
19011         (insn_length_parameters_t): Likewise.
19012         (arc_insn_length_parameters): Likewise.
19013         (arc_get_insn_variants): Likewise.
19014         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19016 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
19018         PR inline-asm/84683
19019         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19020         assertion failure.
19022         PR tree-optimization/84687
19023         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19024         on new_node->decl.
19025         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19027 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19029         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19030         Rename to ppc_speculation_barrier.
19031         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19032         __builtin_ppc_speculation_barrier.
19034 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19036         PR target/84700
19037         * combine.c (combine_simplify_rtx): Don't try to simplify if
19038         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19039         are equal to x.
19041 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
19043         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19044         to 32 bytes when compiling for POWER9.
19046 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
19048         PR target/84564
19049         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19050         regparm >= 3 with no arg reg available also for calls with
19051         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
19053         PR target/84524
19054         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19055         orig,vex.
19056         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
19058 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
19060         PR target/84264
19061         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19063 2018-03-05  Richard Biener  <rguenther@suse.de>
19065         PR tree-optimization/84486
19066         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19067         When inserting a __builtin_assume_aligned call set the LHS
19068         SSA name alignment info accordingly.
19070 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
19072         PR tree-optimization/84114
19073         * config/aarch64/aarch64.c (aarch64_reassociation_width)
19074         Avoid reassociation of FLOAT_MODE addition.
19076 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
19078         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19079         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19080         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19081         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19082         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19083         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19084         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19085         and -mwbnoinvd.
19086         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19087         __builtin_ia32_wbinvd): New builtins.
19088         (SPECIAL_ARGS2): New.
19089         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19090         (SPECIAL_ARGS2): New.
19091         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19092         (ix86_valid_target_attribute_inner_p): Ditto.
19093         (ix86_init_mmx_sse_builtins): Add special_args2.
19094         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19095         TARGET_WBNOINVD_P): New.
19096         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19097         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19098         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19099         * config/i386/immintrin.h (_wbinvd): New intrinsic.
19100         * config/i386/pconfigintrin.h: New file.
19101         * config/i386/wbnoinvdintrin.h: Ditto.
19102         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19103         wbnoinvdintrin.h.
19104         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19106 2018-03-05  Richard Biener  <rguenther@suse.de>
19108         PR tree-optimization/84670
19109         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19110         member.
19111         (BB_VISITED_WITH_VISITED_SUCCS): New define.
19112         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19113         (compute_antic_aux): Only assert the number of values in ANTIC_IN
19114         doesn't grow if all successors (recursively) were visited at least
19115         once.
19117 2018-03-05  Richard Biener  <rguenther@suse.de>
19119         PR tree-optimization/84650
19120         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19121         if executed in the loop pipeline.
19123 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
19125         * doc/configfiles.texi (Configuration Files): Move info about
19126         conditionalizing $target-protos.h to...
19127         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
19128         differs from $target-protos.h.
19130 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
19131             Chung-Ju Wu  <jasonwucj@gmail.com>
19133         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19134         * config/nds32/nds32-multiple.md (setmemsi): Define.
19135         * config/nds32/nds32-memory-manipulation.c
19136         (nds32_gen_dup_4_byte_to_word_value): New.
19137         (emit_setmem_word_loop): New.
19138         (emit_setmem_byte_loop): New.
19139         (nds32_expand_setmem_loop): New.
19140         (nds32_expand_setmem_loop_v3m): New.
19141         (nds32_expand_setmem_unroll): New.
19142         (nds32_expand_setmem): New.
19144 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19145             Chung-Ju Wu  <jasonwucj@gmail.com>
19147         * config/nds32/nds32-memory-manipulation.c
19148         (nds32_emit_load_store): New.
19149         (nds32_emit_post_inc_load_store): New.
19150         (nds32_emit_mem_move): New.
19151         (nds32_emit_mem_move_block): New.
19152         (nds32_expand_movmemsi_loop_unknown_size): New.
19153         (nds32_expand_movmemsi_loop_known_size): New.
19154         (nds32_expand_movmemsi_loop): New.
19155         (nds32_expand_movmemsi_unroll): New.
19156         (nds32_expand_movmemqi): Rename ...
19157         (nds32_expand_movmemsi): ... to this.
19158         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
19159         (movmemsi): ... to this.
19160         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
19161         (nds32_expand_movmemsi): ... to this.
19163 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19164             Monk Chiang  <sh.chiang04@gmail.com>
19165             Chung-Ju Wu  <jasonwucj@gmail.com>
19167         * config/nds32/nds32-protos.h
19168         (nds32_expand_load_multiple): New arguments.
19169         (nds32_expand_store_multiple): Ditto.
19170         (nds32_valid_multiple_load_store): Rename ...
19171         (nds32_valid_multiple_load_store_p): ... to this.
19172         * config/nds32/nds32-memory-manipulation.c
19173         (nds32_expand_load_multiple): Refine implementation.
19174         (nds32_expand_store_multiple): Ditto.
19175         * config/nds32/nds32-multiple.md
19176         (load_multiple): Update nds32_expand_load_multiple interface.
19177         (store_multiple): Update nds32_expand_store_multiple interface.
19178         * config/nds32/nds32-predicates.c
19179         (nds32_valid_multiple_load_store): Rename ...
19180         (nds32_valid_multiple_load_store_p): ... to this and refine
19181         implementation.
19182         * config/nds32/predicates.md
19183         (nds32_load_multiple_and_update_address_operation): New predicate.
19184         (nds32_store_multiple_and_update_address_operation): New predicate.
19186 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
19187             Chung-Ju Wu  <jasonwucj@gmail.com>
19189         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
19190         (combo): New attribute.
19191         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
19193 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19195         * config/nds32/nds32.opt: Change -mcmodel= default value.
19197 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
19198             Monk Chiang  <sh.chiang04@gmail.com>
19199             Chung-Ju Wu  <jasonwucj@gmail.com>
19201         * config/nds32/constants.md (unspec_element): New enum.
19202         * config/nds32/constraints.md (Umw): New constraint.
19203         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
19204         * config/nds32/nds32-intrinsic.md: Likewise.
19205         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
19206         (nds32_valid_smw_lwm_base_p): New.
19207         (nds32_output_smw_single_word): New.
19208         (nds32_output_lmw_single_word): New.
19209         (nds32_expand_unaligned_load): New.
19210         (nds32_expand_unaligned_store): New.
19211         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
19212         (nds32_output_smw_single_word): Declare.
19213         (nds32_output_lmw_single_word): Declare.
19214         (nds32_expand_unaligned_load): Declare.
19215         (nds32_expand_unaligned_store): Declare.
19216         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
19217         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
19218         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
19219         NDS32_BUILTIN_UASTORE_DW.
19220         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
19221         predicate.
19223 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
19224             Kito Cheng  <kito.cheng@gmail.com>
19225             Chung-Ju Wu  <jasonwucj@gmail.com>
19227         * config/nds32/nds32-intrinsic.c
19228         (nds32_expand_builtin_null_ftype_reg): Delete.
19229         (nds32_expand_builtin_reg_ftype_imm): Ditto.
19230         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
19231         (nds32_read_argument): New.
19232         (nds32_legitimize_target): Ditto.
19233         (nds32_legitimize_argument): Ditto.
19234         (nds32_check_constant_argument): Ditto.
19235         (nds32_expand_unop_builtin): Ditto.
19236         (nds32_expand_unopimm_builtin): Ditto.
19237         (nds32_expand_binop_builtin): Ditto.
19238         (nds32_builtin_decl_impl): Ditto.
19239         (builtin_description): Ditto.
19240         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
19241         (nds32_init_builtins_impl): Ditto.
19242         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
19243         (nds32_builtin_decl): New.
19244         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
19245         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
19247 2018-03-02  Jeff Law  <law@redhat.com>
19249         * reorg.c (stop_search_p): Handle DEBUG_INSN.
19250         (redundant_insn, fill_simple_delay_slots): Likewise.
19251         (fill_slots_from_thread): Likewise.
19252         * resource.c (mark_referenced_resources): Likewise.
19253         (mark_set_resources, find_dead_or_set_registers): Likewise.
19255 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19257         * substring-locations.h (format_warning_va): Formatting fix for
19258         ATTRIBUTE_GCC_DIAG.
19259         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
19260         argument.
19261         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
19262         * substring-locations.c: Include intl.h.
19263         (format_warning_va): Turned into small wrapper around
19264         format_warning_n_va, renamed to ...
19265         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
19266         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
19267         use ngettext.
19268         (format_warning_at_substring_n): New function.
19269         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
19270         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
19271         format_warning_at_substring with just a shorter name instead of
19272         const function pointer.
19273         (fmtwarn_n): New function.
19274         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
19275         appropriate, get rid of all the fmtstr temporaries, move conditionals
19276         with G_() wrapped string literals directly into fmtwarn arguments,
19277         cast dir.len to (int), formatting fixes.
19279 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
19281         * doc/invoke.texi: Remove "Cilk Plus" references.
19283 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19284             Richard Biener  <rguenther@suse.de>
19286         PR ipa/84628
19287         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
19288         for error or warning attributes if CALL_FROM_THUNK_P is set.
19289         Formatting fixes.
19291 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19293         PR target/56540
19294         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
19295         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
19297         PR target/56540
19298         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
19299         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
19301         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
19302         instead of -1U in last predictors element's probability member.
19304 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
19306         PR ipa/83983
19307         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19308         arguments if they are comparable.
19310 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
19312         PR tree-optimization/84634
19313         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
19314         masks and masked_loop_p with a single loop_masks, making sure it's
19315         null for bb vectorization.
19317 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
19319         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
19320         (vect_analyze_data_ref_access): Use loop->safe_len rather than
19321         loop->force_vectorize to check whether there is no alias.
19323 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
19325         PR target/84614
19326         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
19327         prototypes.
19328         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
19329         comments.
19330         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
19331         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
19332         instead of a loop around prev_real_insn.
19333         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
19334         prev_real_insn.
19336         PR inline-asm/84625
19337         * config/i386/i386.c (ix86_print_operand): Use conditional
19338         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
19339         zero vector.
19341 2018-03-02  Richard Biener  <rguenther@suse.de>
19343         PR tree-optimization/84427
19344         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
19345         (bitmap_set_subtract_values): Rewrite to handle multiple
19346         exprs per value.
19347         (clean): Likewise.
19348         (prune_clobbered_mems): Likewise.
19349         (phi_translate): Take edge instead of pred/phiblock.
19350         (phi_translate_1): Likewise.
19351         (phi_translate_set): Likewise.  Insert all translated
19352         exprs for a value into the set, keeping possibly multiple
19353         expressions per value.
19354         (compute_antic_aux): Adjust for phi_translate changes.
19355         When intersecting union the expressions and prune those
19356         not in the final value set, keeping possibly multiple
19357         expressions per value.  Do not use value-insertion
19358         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
19359         all expressions.  Add verification that the value-sets
19360         only shrink during iteration.
19361         (compute_partial_antic_aux): Adjust for the phi_translate changes.
19362         (do_pre_regular_insertion): Likewise.
19363         (do_pre_partial_partial_insertion): Likewise.
19365 2018-03-02  Richard Biener  <rguenther@suse.de>
19367         PR target/82005
19368         * config/darwin.c (saved_debug_info_level): New static global.
19369         (darwin_asm_lto_start): Disable debug info generation for LTO out.
19370         (darwin_asm_lto_end): Restore debug info generation settings.
19372 2018-03-01  Martin Liska  <mliska@suse.cz>
19374         PR sanitizer/82484
19375         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
19376         volatile arguments.
19378 2018-03-01  Richard Biener  <rguenther@suse.de>
19380         PR debug/84645
19381         * dwarf2out.c (gen_variable_die): Properly handle late VLA
19382         type annotation with LTO when debug was disabled at compile-time.
19384 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
19386         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
19387         XINT with INTVAL.
19388         (mips_final_postscan_insn): Likewise.
19390 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
19392         PR rtl-optimization/84528
19393         * alias.c (init_alias_target): Add commentary.
19394         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
19395         a unique base value if the frame pointer is not eliminated
19396         to the stack pointer.
19398 2018-03-01  Tom de Vries  <tom@codesourcery.com>
19400         PR rtl-optimization/83327
19401         * lra-int.h (hard_regs_spilled_into): Declare.
19402         * lra.c (hard_regs_spilled_into): Define.
19403         (init_reg_info): Init hard_regs_spilled_into.
19404         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
19405         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
19406         (process_bb_lives): Handle hard_regs_spilled_into.
19407         (lra_create_live_ranges_1): Before doing liveness propagation, clear
19408         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
19410 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
19412         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
19413         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
19414         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
19415         * config/rs6000/aix72.h: New file.
19417 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
19419         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
19420         instead of warning_at with conditional singular and plural messages
19421         where possible.
19423         PR target/52991
19424         * stor-layout.c (update_alignment_for_field): For
19425         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
19426         && !DECL_PACKED (field), do the alignment update, just use
19427         only desired_align instead of MAX (type_align, desired_align)
19428         as the alignment.
19429         (place_field): Don't do known_align < desired_align handling
19430         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
19431         is non-NULL, instead do it after rli->prev_field handling and
19432         only if not within a bitfield word.  For DECL_PACKED (field)
19433         use type_align of BITS_PER_UNIT.
19435 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
19437         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
19438         superfluous parentheses and trailing spaces.
19440 2018-02-28  Richard Biener  <rguenther@suse.de>
19442         PR tree-optimization/84584
19443         * graphite-scop-detection.c (scop_detection::add_scop): Discard
19444         SCoPs with fake exit edge.
19446 2018-02-28  Martin Liska  <mliska@suse.cz>
19448         PR testsuite/84597
19449         * timevar.c (timer::print): Fix format to properly print 100%
19450         values.
19452 2018-02-28  Richard Biener  <rguenther@suse.de>
19454         PR middle-end/84607
19455         * genmatch.c (capture_info::walk_match): Do not mark
19456         captured expressions without operands as expr_p given
19457         they act more like predicates and should be subject to
19458         "lost tail" side-effect preserving.
19460 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
19462         PR rtl-optimization/81611
19463         * auto-inc-dec.c (attempt_change): Move dead note from
19464         mem_insn if it's the next use of regno
19465         (find_address): Take address use of reg holding
19466         non-incremented value.  Add parm to limit search to the named
19467         reg only.
19468         (merge_in_block): Attempt to use a mem insn that is the next
19469         use of the original regno.
19471 2018-02-27  Martin Sebor  <msebor@redhat.com>
19473         PR c++/83871
19474         * doc/invoke.texi (-Wmissing-attributes): New option.
19475         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
19477 2018-02-27  Martin Sebor  <msebor@redhat.com>
19479         PR translation/84207
19480         * diagnostic-core.h (warning_n, error_n, inform_n): Change
19481         n argument to unsigned HOST_WIDE_INT.
19482         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
19483         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
19484         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
19485         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
19487 2018-02-27  Richard Biener  <rguenther@suse.de>
19489         PR tree-optimization/84512
19490         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
19491         Do not use the estimate returned from record_stmt_cost for
19492         the scalar iteration cost but sum properly using add_stmt_cost.
19494 2018-02-27  Richard Biener  <rguenther@suse.de>
19496         PR tree-optimization/84466
19497         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
19498         Adjust last change to less strictly validate use operands.
19500 2018-02-27  Martin Liska  <mliska@suse.cz>
19502         PR gcov-profile/84548
19503         * gcov.c (process_file): Allow partial overlap and consider it
19504         also as group functions.
19505         (output_lines): Properly calculate range of lines for a group.
19507 2018-02-27  Martin Liska  <mliska@suse.cz>
19509         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
19510         'ggc' suffixes.  Change first column width.
19511         (timer::print): Fix formatting of the column.
19513 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
19515         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
19516         preserve inline entry blocks for the sake of debug inline
19517         entry point markers alone.
19518         (remove_unused_locals): Suggest in comments a better place to
19519         force the preservation of inline entry blocks that are
19520         otherwise unused, but do not preserve them.
19522 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
19524         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
19526 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
19528         PR target/84039
19529         * config/i386/constraints.md (Bs): Replace
19530         ix86_indirect_branch_register with
19531         TARGET_INDIRECT_BRANCH_REGISTER.
19532         (Bw): Likewise.
19533         * config/i386/i386.md (indirect_jump): Likewise.
19534         (tablejump): Likewise.
19535         (*sibcall_memory): Likewise.
19536         (*sibcall_value_memory): Likewise.
19537         Peepholes of indirect call and jump via memory: Likewise.
19538         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
19539         (*sibcall_value_GOT_32): Likewise.
19540         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19541         (GOT_memory_operand): Likewise.
19542         (call_insn_operand): Likewise.
19543         (sibcall_insn_operand): Likewise.
19544         (GOT32_symbol_operand): Likewise.
19545         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
19547 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
19549         PR rtl-optimization/83496
19550         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
19551         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
19552         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
19553         redundant insn, if any.
19554         (relax_delay_slots): Likewise.
19555         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
19557 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
19559         PR tree-optimization/83965
19560         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
19561         that grouped statements are part of a reduction chain.  Return
19562         true if the statement is not marked as a reduction itself but
19563         is part of a group.
19564         (vect_recog_dot_prod_pattern): Don't check whether the statement
19565         is part of a group here.
19566         (vect_recog_sad_pattern): Likewise.
19567         (vect_recog_widen_sum_pattern): Likewise.
19569 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
19571         PR debug/84545
19572         * final.c (rest_of_clean_state): Also look for calls inside sequences.
19574 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
19576         PR target/84530
19577         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
19578         the bool argument.
19579         (ix86_output_indirect_function_return): New prototype.
19580         (ix86_split_simple_return_pop_internal): Likewise.
19581         * config/i386/i386.c (indirect_return_via_cx): New.
19582         (indirect_return_via_cx_bnd): Likewise.
19583         (indirect_thunk_name): Handle return va CX_REG.
19584         (output_indirect_thunk_function): Create alias for
19585         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
19586         (ix86_output_indirect_jmp): Remove the bool argument.
19587         (ix86_output_indirect_function_return): New function.
19588         (ix86_split_simple_return_pop_internal): Likewise.
19589         * config/i386/i386.md (*indirect_jump): Don't pass false
19590         to ix86_output_indirect_jmp.
19591         (*tablejump_1): Likewise.
19592         (simple_return_pop_internal): Change it to define_insn_and_split.
19593         Call ix86_split_simple_return_pop_internal to split it for
19594         -mfunction-return=.
19595         (simple_return_indirect_internal): Call
19596         ix86_output_indirect_function_return instead of
19597         ix86_output_indirect_jmp.
19599 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
19601         PR bootstrap/84405
19602         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
19603         memset and value initialization afterwards.
19605 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
19607         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
19609 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19611         PR target/84521
19612         * common/config/aarch64/aarch64-common.c
19613         (aarch_option_optimization_table[]): Switch
19614         off fomit-frame-pointer
19616 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
19617             Chung-Ju Wu  <jasonwucj@gmail.com>
19619         * config/nds32/nds32-multiple.md (load_multiple): Disallow
19620         volatile memory.
19621         (store_multiple): Ditto.
19623 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
19625         * config.gcc: Add --with-cpu support for nds32 target.
19626         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
19627         * config/nds32/nds32.opt: Add -mcpu= option.
19629 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
19631         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
19632         isel=yes): Warn for these deprecated options.
19634 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
19636         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
19637         ISA_2_5_MASKS_EMBEDDED.
19639 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
19641         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
19642         p->max as pointers rather than using iterative_hash_expr.
19644 2018-02-23  Carl Love  <cel@us.ibm.com>
19646         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
19647         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
19648         BU_P8V_OVERLOAD_2.
19649         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
19650         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
19651         P8V_BUILTIN_VEC_VUNSIGNED2.
19653 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
19655         PR target/81572
19656         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
19657         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
19658         LRA_UNKNOWN_ALT.
19659         * lra-constraints.c (curr_insn_transform): Set up
19660         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
19661         LRA_UNKNOWN_ALT.
19662         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
19663         * lra-eliminations.c (spill_pseudos): Ditto.
19664         (process_insn_for_elimination): Ditto.
19665         * lra-lives.c (reg_early_clobber_p): Use the new macros.
19666         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
19667         LRA_NON_CLOBBERED_ALT.
19669 2018-02-22  Martin Sebor  <msebor@redhat.com>
19671         PR tree-optimization/84480
19672         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
19673         to maybe_diag_stxncpy_trunc.  Call it.
19674         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
19675         from gimple_fold_builtin_strcpy.  Print inlining stack.
19676         (handle_builtin_stxncpy): Print inlining stack.
19677         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
19679 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
19681         PR target/84176
19682         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
19683         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
19684         and -fcheck-pointer-bounds are used together.
19685         (indirect_thunk_prefix): New enum.
19686         (indirect_thunk_need_prefix): New function.
19687         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
19688         "_nt" instead of "_bnd" for NOTRACK prefix.
19689         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
19690         (output_indirect_thunk_function): Likewise.
19691         (): Likewise.
19692         (ix86_code_end): Update output_indirect_thunk_function calls.
19693         (ix86_output_indirect_branch_via_reg): Replace
19694         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
19695         (ix86_output_indirect_branch_via_push): Likewise.
19696         (ix86_output_function_return): Likewise.
19697         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
19698         incompatible with -fcf-protection=branch and
19699         -fcheck-pointer-bounds.
19701 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
19703         PR target/83335
19704         * config/aarch64/aarch64.c (aarch64_print_address_internal):
19705         Change gcc_assert call to output_operand_lossage.
19707 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
19709         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
19711 2018-02-22  DJ Delorie  <dj@redhat.com>
19712             Sebastian Perta  <sebastian.perta@renesas.com>
19713             Oleg Endo  <olegendo@gcc.gnu.org>
19715         * config/rx/rx.c (rx_rtx_costs): New function.
19716         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
19718 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19720         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
19722 2018-02-22  Martin Liska  <mliska@suse.cz>
19724         PR driver/83193
19725         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
19726         Add "native" as a possible value.
19728 2018-02-22  Martin Liska  <mliska@suse.cz>
19730         PR driver/83193
19731         * config/i386/i386.c (ix86_option_override_internal):
19732         Add "native" as a possible value for -march and -mtune.
19734 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
19736         PR target/84502
19737         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
19738         to all type variants.
19740         PR tree-optimization/84503
19741         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
19742         width as info->bitpos + info->bitsize - start.
19743         (merged_store_group::merge_overlapping): Simplify width computation.
19744         (check_no_overlap): New function.
19745         (imm_store_chain_info::try_coalesce_bswap): Compute expected
19746         start + width and last_order of the group, fail if check_no_overlap
19747         fails.
19748         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
19749         to group if check_no_overlap fails.
19751 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
19753         * config/rs6000/altivec.md: Delete contraint arguments to
19754         define_expand, define_split, and define_peephole2, and in
19755         define_insn_and_split if always unused.
19756         * config/rs6000/darwin.md: Ditto.
19757         * config/rs6000/dfp.md: Ditto.
19758         * config/rs6000/rs6000.md: Ditto.
19759         * config/rs6000/sync.md: Ditto.
19760         * config/rs6000/vector.md: Ditto.
19761         * config/rs6000/vsx.md: Ditto.
19763 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
19765         * config/rs6000/altivec.md: Write output control strings as braced
19766         blocks instead of double-quoted strings.
19767         * config/rs6000/darwin.md: Ditto.
19768         * config/rs6000/rs6000.md: Ditto.
19769         * config/rs6000/vector.md: Ditto.
19770         * config/rs6000/vsx.md: Ditto.
19772 2018-02-21  Jason Merrill  <jason@redhat.com>
19774         PR c++/84314 - ICE with templates and fastcall attribute.
19775         * attribs.c (build_type_attribute_qual_variant): Remove assert.
19777 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
19779         * ipa-cp.c (determine_versionability): Fix comment typos.
19781 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
19783         PR c/84229
19784         * ipa-cp.c (determine_versionability): Do not version functions caling
19785         va_arg_pack.
19787 2018-02-21  Martin Liska  <mliska@suse.cz>
19789         PR driver/83193
19790         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
19791         Add "native" as a possible value.
19792         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
19793         the macro when native cpu detection is available.
19795 2018-02-21  Martin Liska  <mliska@suse.cz>
19797         PR driver/83193
19798         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
19799         Add "native" as a possible value.
19800         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
19801         when native cpu detection is available.
19803 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
19804             Martin Sebor  <msebor@redhat.com>
19806         PR tree-optimization/84478
19807         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
19808         false.
19809         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
19810         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
19811         support which is conservatively correct, for 2 only stay conservative
19812         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
19813         argument to the 2 argument get_range_strlen, adjust 6 arg
19814         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
19815         false.
19816         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
19817         (gimple_fold_builtin_strlen): Pass true as last argument to
19818         get_range_strlen.
19820 2018-02-20  Martin Sebor  <msebor@redhat.com>
19822         PR middle-end/84095
19823         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
19824         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
19825         (builtin_memref::builtin_memref): Factor out parts into
19826         set_base_and_offset and call it.
19828 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
19830         PR middle-end/84406
19831         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
19832         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
19833         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
19834         search at the associated MODE_INT.
19836 2018-02-20  Jeff Law  <law@redhat.com>
19838         PR middle-end/82123
19839         PR tree-optimization/81592
19840         PR middle-end/79257
19841         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
19842         for range data rather than using global data.
19843         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
19844         range data rather than using global data.
19845         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
19846         pass it to children as needed.
19847         (struct directive::fmtresult): Similarly.
19848         (struct directive::set_width): Similarly.
19849         (struct directive::set_precision): Similarly.
19850         (format_integer, format_directive, parse_directive): Similarly.
19851         (format_none): Accept unnamed vr_values parameter.
19852         (format_percent, format_floating, format_character): Similarly.
19853         (format_string, format_plain): Similarly.
19854         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
19855         the EVRP range analyzer for range data rather than using global data.
19856         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
19857         gimple-ssa-evrp-analyze.h
19858         (class sprintf_dom_walker): Add after_dom_children member function.
19859         Add evrp_range_analyzer member.
19860         (sprintf_dom_walker::before_dom_children): Call into the EVRP
19861         range analyzer as needed.
19862         (sprintf_dom_walker::after_dom_children): New member function.
19863         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
19864         if not optimizing.
19865         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
19866         (evrp_range_analyzer::pop_to_marker): Likewise.
19868 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
19870         PR tree-optimization/84419
19871         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
19872         with the required type if its current type is compatible but
19873         different.
19875 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
19877         PR middle-end/82004
19878         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
19879         after vectorization.
19881 2018-02-20  Martin Liska  <mliska@suse.cz>
19883         PR driver/83193
19884         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
19885         possible values if we don't have a hint.
19887 2018-02-20  Martin Liska  <mliska@suse.cz>
19889         PR c/84310
19890         PR target/79747
19891         * final.c (shorten_branches): Build align_tab array with one
19892         more element.
19893         * opts.c (finish_options): Add alignment option limit check.
19894         (MAX_CODE_ALIGN): Likewise.
19895         (MAX_CODE_ALIGN_VALUE): Likewise.
19896         * doc/invoke.texi: Document maximum allowed option value for
19897         all -falign-* options.
19899 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
19901         PR target/84146
19902         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
19903         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
19904         * var-tracking.c (emit_note_insn_var_location): Remove all references
19905         to NOTE_INSN_CALL_ARG_LOCATION.
19906         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
19907         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
19908         Use copy_rtx_if_shared.
19909         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
19910         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
19911         (dwarf2out_var_location): Remove handling of
19912         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
19913         on call_insn.
19914         * final.c (final_scan_insn): Remove all references to
19915         NOTE_INSN_CALL_ARG_LOCATION.
19916         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
19917         before dumping final insns.
19918         * except.c (emit_note_eh_region_end): Remove all references to
19919         NOTE_INSN_CALL_ARG_LOCATION.
19920         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
19921         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
19922         * config/arc/arc.c (hwloop_optimize): Likewise.
19923         * config/arm/arm.c (create_fix_barrier): Likewise.
19924         * config/s390/s390.c (s390_chunkify_start): Likewise.
19925         * config/sh/sh.c (find_barrier): Likewise.
19926         * config/i386/i386.c (rest_of_insert_endbranch,
19927         ix86_seh_fixup_eh_fallthru): Likewise.
19928         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
19929         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
19930         * config/frv/frv.c (frv_function_prologue): Likewise.
19931         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
19932         reg note.
19933         (note_outside_basic_block_p): Remove all references to
19934         NOTE_INSN_CALL_ARG_LOCATION.
19935         * gengtype.c (adjust_field_rtx_def): Likewise.
19936         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
19937         Likewise.
19938         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
19939         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
19941         PR c++/84444
19942         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
19943         is ADDR_EXPR.
19945         PR tree-optimization/84452
19946         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
19947         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
19948         is NULL.
19950 2018-02-19  Martin Liska  <mliska@suse.cz>
19952         PR sanitizer/82183
19953         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
19955 2018-02-19  Martin Liska  <mliska@suse.cz>
19956             Richard Sandiford  <richard.sandiford@linaro.org>
19958         PR tree-optimization/82491
19959         * gimple-fold.c (get_base_constructor): Make earlier bail out
19960         to prevent ubsan.
19962 2018-02-19  Carl Love  <cel@us.ibm.com>
19964         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
19965         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
19966         BU_P8V_OVERLOAD_1.
19967         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
19968         P8V_BUILTIN_VEC_NEG.
19970 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
19972         * config/rl78/rl78.md (movdf): New define expand.
19974 2018-02-19  Martin Liska  <mliska@suse.cz>
19976         PR other/80589
19977         * doc/invoke.texi: Fix typo.
19978         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
19980 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
19982         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
19983         handle rs6000_single_float and rs6000_double_float specially for
19984         e500 family CPUs.
19986 2018-02-16  Jeff Law  <law@redhat.com>
19988         * config/rx/rx.c (add_pop_cfi_notes): New function.;
19989         (pop_regs): Use it.
19991 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
19993         PR ipa/84425
19994         * ipa-inline.c (inline_small_functions): Fix a typo.
19996 2018-02-16  Nathan Sidwell  <nathan@acm.org>
19998         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20000 2018-02-16  Carl Love  <cel@us.ibm.com>
20002         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20003         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20004         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20005         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20006         expansion to P8V_BUILTIN_VEC_FLOAT2.
20008 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
20010         PR rtl-optimization/70023
20011         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20012         src_regno into account.
20014 2018-02-16  Carl Love  <cel@us.ibm.com>
20016         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20017         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20018         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20019         * config/rs6000/rs6000.c: Remove case statements for
20020         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20021         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20022         and P9V_BUILTIN_VEC_VINSERT4B.
20023         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20024         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20025         * config/rs6000/vsx.md:
20026         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20027         vec_insert4b.
20029 2018-02-16  Carl Love  <cel@us.ibm.com>
20031         * config/rs6000/altivec.h: Add builtin names vec_extract4b
20032         vec_insert4b.
20033         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20034         definitions.
20035         * config/rs6000/rs6000-c.c: Add the definitions for
20036         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20037         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20038         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20039         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
20040         definition for insert4b and define insn *insert3b_internal.
20041         * doc/extend.texi: Add documentation for vec_extract4b.
20043 2018-02-16  Nathan Sidwell  <nathan@acm.org>
20045         * doc/extend.texi (Backwards Compatibility): Mention friend
20046         injection.  Note for-scope is deprecated.
20047         * doc/invoke.texi (-ffriend-injection): Deprecate.
20049 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
20051         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20052         that moved to I2, also allow destinations that are a paradoxical
20053         subreg (instead of a normal reg).
20055 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
20057         PR target/83831
20058         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20059         to QImode.
20061 2018-02-16  Richard Biener  <rguenther@suse.de>
20063         PR tree-optimization/84037
20064         PR tree-optimization/84016
20065         PR target/82862
20066         * config/i386/i386.c (ix86_builtin_vectorization_cost):
20067         Adjust vec_construct for the fact we need additional higher latency
20068         128bit inserts for AVX256 and AVX512 vector builds.
20069         (ix86_add_stmt_cost): Scale vector construction cost for
20070         elementwise loads.
20072 2018-02-16  Richard Biener  <rguenther@suse.de>
20074         PR tree-optimization/84417
20075         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20076         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20077         (non_rewritable_lvalue_p): Likewise, use poly-ints.
20079 2018-02-16  Martin Liska  <mliska@suse.cz>
20081         PR sanitizer/84307
20082         * internal-fn.def (ASAN_CHECK): Set proper flags.
20083         (ASAN_MARK): Likewise.
20085 2018-02-16  Julia Koval  <julia.koval@intel.com>
20087         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20088         from PTA_CANNONLAKE.
20090 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
20092         PR target/84272
20093         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20094         Use ++iter rather than iter++ for std::list iterators.
20095         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
20096         defer deleting them until all nodes in the forest are processed.  Do
20097         free even leaf nodes.  Change to_process into auto_vec.
20099         PR bootstrap/84405
20100         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20101         * vec.h (vec_default_construct): Use memset instead of placement new
20102         if BROKEN_VALUE_INITIALIZATION is defined.
20103         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20104         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20105         is defined.
20107         PR rtl-optimization/83723
20108         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20109         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
20110         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
20111         recursive calls.
20112         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20113         callers.
20114         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20116 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
20118         PR rtl-optimization/81443
20119         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20120         from inner REGs to paradoxical SUBREGs.
20122 2018-02-16  Richard Biener  <rguenther@suse.de>
20124         PR tree-optimization/84399
20125         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20126         For operands we can analyze at their definition make sure we can
20127         analyze them at each use as well.
20129 2018-02-16  Richard Biener  <rguenther@suse.de>
20131         PR tree-optimization/84190
20132         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20133         volatile accesses if the decl isn't volatile.
20135 2018-02-15  Jason Merrill  <jason@redhat.com>
20137         PR c++/84314 - ICE with templates and fastcall attribute.
20138         * attribs.c (build_type_attribute_qual_variant): Don't clobber
20139         TYPE_CANONICAL on an existing type.
20141 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
20143         PR tree-optimization/84383
20144         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20145         dstoff nor call operand_equal_p if dstbase is NULL.
20147         PR tree-optimization/84334
20148         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20149         also a CONSTANT_CLASS_P, punt.
20151 2018-02-14  Jim Wilson  <jimw@sifive.com>
20153         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
20154         first SMALL_OPERAND check.  New local min_second_step.  Move assert
20155         to where locals are set.  Add TARGET_RVC support.
20156         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
20158 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
20160         * doc/invoke.texi: Correct -Wformat-overflow code sample.
20162 2018-02-14  Martin Sebor  <msebor@redhat.com>
20164         PR tree-optimization/83698
20165         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
20166         arrays constrain the offset range to their bounds.
20167         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
20168         (builtin_access::overlap): Avoid setting the size of overlap if it's
20169         already been set.
20170         (maybe_diag_overlap): Also consider arrays when deciding what values
20171         of offsets to include in diagnostics.
20173 2018-02-14  Martin Sebor  <msebor@redhat.com>
20175         PR c/84108
20176         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
20177         that correspond to the kind of a declaration.
20179 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
20181         PR target/83984
20182         * config/pa/pa.md: Load address of PIC label using the linkage table
20183         if the label is nonlocal.
20185 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20187         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
20188         warning message if user requests -maltivec=be.
20189         * doc/invoke.texi: Document deprecation of -maltivec=be.
20191 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
20193         PR target/84220
20194         * config/rs6000/rs6000-c.c: Update definitions for
20195         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
20196         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
20198 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
20200         PR target/84239
20201         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
20202         add _get_ssp intrinsics. Remove argument from
20203         __builtin_ia32_rdssp[d|q].
20204         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
20205         * config/i386/i386-builtin.def: Remove argument from
20206         __builtin_ia32_rdssp[d|q].
20207         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
20208         ix86_expand_special_args_builtin for _rdssp[d|q].
20209         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
20210         Clear register before usage.
20211         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
20212         Add documentation for new _get_ssp and _inc_ssp intrinsics.
20214 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
20216         PR tree-optimization/84357
20217         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
20218         operand 1 of an ARRAY_REF too.
20220 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
20222         PR target/83831
20223         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
20224         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20225         declarations.
20226         (set_of_reg): New struct.
20227         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
20228         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
20229         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20230         functions.
20231         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
20232         Split into bitclr, bitset, bitinvert patterns if appropriate.
20233         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
20234         use rx_fuse_in_memory_bitop.
20235         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
20236         to named insn, correct maximum insn length.
20238 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
20240         PR target/79242
20241         * machmode.def: Define a complex mode for PARTIAL_INT.
20242         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
20243         MODE_PARTIAL_INT.
20244         * doc/rtl.texi: Document CSPImode.
20245         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
20246         handling.
20247         (msp430_hard_regno_nregs_with_padding): Likewise.
20249 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
20251         PR target/84279
20252         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
20254 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
20256         PR rtl-optimization/84169
20257         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
20258         we generated a parallel as new i3 and we split that to new i2 and i3
20259         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
20260         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
20261         those to i2, not i1.  Partially rewrite this scan code.
20263 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
20265         PR c/82210
20266         * stor-layout.c (place_field): For variable length fields, adjust
20267         offset_align afterwards not just based on the field's alignment,
20268         but also on the size.
20270         PR middle-end/84309
20271         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
20272         of exps and logs in the use_exp2 case.
20274 2018-02-13  Jeff Law  <law@redhat.com>
20276         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
20277         entry for "vector".
20279         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
20280         ARGS as unused.
20282 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
20284         PR debug/84342
20285         PR debug/84319
20286         * common.opt (gas-loc-support, gas-locview-support): New.
20287         (ginline-points, ginternal-reset-location-views): New.
20288         * doc/invoke.texi: Document them.  Use @itemx where intended.
20289         (gvariable-location-views): Adjust.
20290         * target.def (reset_location_view): New.
20291         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
20292         (TARGET_RESET_LOCATION_VIEW): New.
20293         * doc/tm.texi: Rebuilt.
20294         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
20295         (dwarf2out_default_as_locview_support): New.
20296         (output_asm_line_debug_info): Use option variables.
20297         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
20298         (output_loc_list): Likewise.
20299         (add_high_low_attributes): Check option variables.
20300         Don't output entry view attribute in strict mode.
20301         (gen_inlined_subroutine_die): Check option variables.
20302         (dwarf2out_inline_entry): Likewise.
20303         (init_sections_and_labels): Likewise.
20304         (dwarf2out_early_finish): Likewise.
20305         (maybe_reset_location_view): New, from...
20306         (dwarf2out_var_location): ... here.  Call it.
20307         * debug.h (dwarf2out_default_as_loc_support): Declare.
20308         (dwarf2out_default_as_locview_support): Declare.
20309         * hooks.c (hook_int_rtx_insn_0): New.
20310         * hooks.h (hook_int_rtx_insn_0): Declare.
20311         * toplev.c (process_options): Take -gas-loc-support and
20312         -gas-locview-support from dwarf2out.  Enable
20313         -gvariable-location-views by default only with locview
20314         assembler support.  Enable -ginternal-reset-location-views by
20315         default only if the target defines the corresponding hook.
20316         Enable -ginline-points by default if location views are
20317         enabled; force it disabled if statement frontiers are
20318         disabled.
20319         * tree-inline.c (expand_call_inline): Check option variables.
20320         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
20322 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
20324         PR tree-optimization/84321
20325         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
20326         handling.  Also check whether the anti-range contains any values
20327         that satisfy the mask; switch to a VR_RANGE if not.
20329 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
20331         PR sanitizer/84340
20332         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
20334 2018-02-13  Martin Jambor  <mjambor@suse.cz>
20336         PR c++/83990
20337         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
20338         of call statements, also set location of a load to a temporary.
20340 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
20342         * config/rl78/rl78.c (add_vector_labels): New function.
20343         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
20344         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
20345         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
20346         which checks that no arguments are passed.
20347         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
20348         * doc/extend.texi: Documentation for the new attribute.
20350 2018-02-13  Andreas Schwab  <schwab@suse.de>
20352         * config/riscv/linux.h (CPP_SPEC): Define.
20354 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
20356         PR target/84335
20357         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
20358         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
20359         OPTION_MASK_ISA_AES as first argument to def_builtin_const
20360         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
20361         instead of OPTION_MASK_ISA_PCLMUL as first argument to
20362         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
20363         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
20364         temporarily for AES and PCLMUL builtins.
20366         PR tree-optimization/84339
20367         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
20368         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
20369         Formatting fixes.
20371         PR middle-end/84309
20372         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
20373         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
20374         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
20375         inline function.
20376         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
20377         inline function.
20378         * omp-simd-clone.h: New file.
20379         * omp-simd-clone.c: Include omp-simd-clone.h.
20380         (expand_simd_clones): No longer static.
20381         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
20382         cgraph.h and omp-simd-clone.h.
20383         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
20384         (vect_recog_widen_shift_pattern): Formatting fix.
20385         (vect_pattern_recog_1): Don't check optab for calls.
20387         PR target/84336
20388         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
20389         operands[2] into a REG before using gen_lowpart on it.
20391 2018-02-12  Jeff Law  <law@redhat.com>
20393         PR target/83760
20394         * config/sh/sh.c (find_barrier): Consider a sibling call
20395         a barrier as well.
20397         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
20398         successfully back substituting a reg.
20400 2018-02-12  Richard Biener  <rguenther@suse.de>
20402         PR tree-optimization/84037
20403         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
20404         parameter, move visited init to caller.
20405         (vect_slp_analyze_operations): Separate cost from validity
20406         check, initialize visited once for all instances.
20407         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
20408         for all instances.
20409         * tree-vect-stmts.c (vect_model_simple_cost): Make early
20410         out an assert.
20411         (vect_model_promotion_demotion_cost): Likewise.
20412         (vectorizable_bswap): Guard cost modeling with !slp_node
20413         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
20414         SLP stmts.
20415         (vectorizable_call): Likewise.
20416         (vectorizable_conversion): Likewise.
20417         (vectorizable_assignment): Likewise.
20418         (vectorizable_shift): Likewise.
20419         (vectorizable_operation): Likewise.
20420         (vectorizable_store): Likewise.
20421         (vectorizable_load): Likewise.
20422         (vectorizable_condition): Likewise.
20423         (vectorizable_comparison): Likewise.
20425 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
20427         PR sanitizer/84307
20428         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
20429         (ASAN_MARK): Fix fnspec to account for return value, change pointer
20430         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
20432 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
20434         PR middle-end/83665
20435         * params.def (inline-min-speedup): Increase from 8 to 15.
20436         (max-inline-insns-auto): Decrease from 40 to 30.
20437         * ipa-split.c (consider_split): Add some buffer for function to
20438         be considered inlining candidate.
20439         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
20440         default values.
20442 2018-02-12  Richard Biener  <rguenther@suse.de>
20444         PR tree-optimization/84037
20445         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
20446         matched stmts if we cannot swap the non-matched ones.
20448 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
20450         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
20451         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
20452         _mm_maskz_scalef_round_ss): New intrinsics.
20453         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
20454         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
20455         __builtin_ia32_scalefss_round): Remove.
20456         (__builtin_ia32_scalefsd_mask_round,
20457         __builtin_ia32_scalefss_mask_round): New intrinsics.
20458         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
20459         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
20460         ((match_operand:VF_128 2 "<round_nimm_predicate>"
20461         "<round_constraint>")): Changed to ...
20462         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
20463         "<round_scalar_constraint>")): ... this.
20464         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
20465         %0, %1, %2<round_op3>}"): Changed to ...
20466         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
20467         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
20468         %2<round_scalar_mask_op3>}"): ... this.
20469         * config/i386/subst.md (round_scalar_nimm_predicate): New.
20471 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
20473         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
20474         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
20475         (_mm_maskz_sqrt_round_ss): New intrinsics.
20476         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
20477         (__builtin_ia32_sqrtsd_mask_round)
20478         (__builtin_ia32_sqrtss_mask_round): New builtins.
20479         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
20480         (__builtin_ia32_sqrtss_round): Remove.
20481         (__builtin_ia32_sqrtsd_mask_round)
20482         (__builtin_ia32_sqrtss_mask_round): New builtins.
20483         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
20484         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
20485         ((match_operand:VF_128 1 "vector_operand"
20486         "xBm,<round_constraint>")): Changed to ...
20487         ((match_operand:VF_128 1 "vector_operand"
20488         "xBm,<round_scalar_constraint>")): ... this.
20489         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
20490         %0, %2, %<iptr>1<round_op3>}): Changed to ...
20491         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
20492         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
20493         %<iptr>1<round_scalar_mask_op3>}): ... this.
20494         ((set_attr "prefix" "<round_prefix>")): Changed to ...
20495         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
20497 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
20499         PR target/84266
20500         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
20501         Cast vec_cmpeq result to correct type.
20502         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
20503         Cast vec_cmpgt result to correct type.
20505 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
20507         * final.c (final_scan_insn_1): Renamed from...
20508         (final_scan_insn): ... this.  New wrapper, to recover
20509         seen from the outermost call in recursive ones.
20510         * config/sparc/sparc.c (output_return): Drop seen from call.
20511         (output_sibcall): Likewise.
20512         * config/visium/visium.c (output_branch): Likewise.
20514 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
20516         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
20517         function label.
20519 2018-02-10  Alan Modra  <amodra@gmail.com>
20521         PR target/84300
20522         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
20523         Specify LR as an input.
20525 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
20527         PR sanitizer/83987
20528         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
20529         remove_member_access_dummy_vars): New functions.
20530         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
20531         lower_omp_1, execute_lower_omp): Use them.
20533         PR rtl-optimization/84308
20534         * shrink-wrap.c (spread_components): Release todo vector.
20536 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
20538         PR rtl-optimization/57193
20539         * ira-color.c (struct allocno_color_data): Add member
20540         conflict_allocno_hard_prefs.
20541         (update_conflict_allocno_hard_prefs): New.
20542         (bucket_allocno_compare_func): Add a preference based on
20543         conflict_allocno_hard_prefs.
20544         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
20545         (color_allocnos): Remove a dead code.  Initiate
20546         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
20548 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
20550         PR target/84226
20551         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
20552         constraint from =wa to wa.  Avoid a subreg on the output operand,
20553         instead use a pseudo and subreg it in a move.
20554         (p9_xxbrd_<mode>): Changed to ...
20555         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
20556         (p9_xxbrd_v2df): New expander.
20557         (p9_xxbrw_<mode>): Changed to ...
20558         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
20559         (p9_xxbrw_v4sf): New expander.
20561 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
20563         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
20565 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
20567         PR target/83926
20568         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
20569         multiply in 32-bit mode.
20570         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
20571         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
20572         mode.
20574 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
20576         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
20577         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
20578         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
20579         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
20581 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
20583         PR lto/84213
20584         * dwarf2out.c (is_trivial_indirect_ref): New function.
20585         (dwarf2out_late_global_decl): Do not generate a location
20586         attribute for variables that have a non-trivial DECL_VALUE_EXPR
20587         and that are not defined in the current unit.
20589 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
20591         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
20592         instead of a libcall for UNORDERED.
20594 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
20596         PR target/82641
20597         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
20598         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
20600 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20602         PR target/PR84295
20603         * config/s390/s390.c (s390_set_current_function): Invoke
20604         s390_indirect_branch_settings also if fndecl didn't change.
20606 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
20608         * config/rs6000/rs6000.md (blockage): Set length to zero.
20610 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
20612         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
20614 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
20616         PR sanitizer/84285
20617         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
20618         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
20619         -static-lib*san.
20621         PR debug/84252
20622         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
20623         PARALLEL incoming that failed vt_get_decl_and_offset check.
20625         PR middle-end/84237
20626         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
20627         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
20628         TREE_READONLY bit.
20629         (get_variable_section): For decls in named .bss* sections pass true as
20630         second argument to bss_initializer_p.
20632 2018-02-09  Marek Polacek  <polacek@redhat.com>
20633             Jakub Jelinek  <jakub@redhat.com>
20635         PR c++/83659
20636         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
20637         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
20638         Sync some changes from cxx_fold_indirect_ref.
20640 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
20642         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
20643         markers.
20644         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
20645         (BLOCK_INLINE_ENTRY_LABEL): New.
20646         (dwarf2out_var_location): Disregard inline entry markers.
20647         (inline_entry_data): New struct.
20648         (inline_entry_data_hasher): New hashtable type.
20649         (inline_entry_data_hasher::hash): New.
20650         (inline_entry_data_hasher::equal): New.
20651         (inline_entry_data_table): New variable.
20652         (add_high_low_attributes): Add DW_AT_entry_pc and
20653         DW_AT_GNU_entry_view attributes if a pending entry is found
20654         in inline_entry_data_table.  Add old entry_pc attribute only
20655         if debug nonbinding markers are disabled.
20656         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
20657         markers are enabled.
20658         (block_within_block_p, dwarf2out_inline_entry): New.
20659         (dwarf2out_finish): Check that no entries remained in
20660         inline_entry_data_table.
20661         * final.c (reemit_insn_block_notes): Handle inline entry notes.
20662         (final_scan_insn, notice_source_line): Likewise.
20663         (rest_of_clean_state): Skip inline entry markers.
20664         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
20665         markers.
20666         * gimple.c (gimple_build_debug_inline_entry): New.
20667         * gimple.h (enum gimple_debug_subcode): Add
20668         GIMPLE_DEBUG_INLINE_ENTRY.
20669         (gimple_build_debug_inline_entry): Declare.
20670         (gimple_debug_inline_entry_p): New.
20671         (gimple_debug_nonbind_marker_p): Adjust.
20672         * insn-notes.def (INLINE_ENTRY): New.
20673         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
20674         inline entry marker notes.
20675         (print_insn): Likewise.
20676         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
20677         (INSN_DEBUG_MARKER_KIND): Likewise.
20678         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
20679         * tree-inline.c (expand_call_inline): Build and insert
20680         debug_inline_entry stmt.
20681         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
20682         inline entry blocks early, if nonbind markers are enabled.
20683         (dump_scope_block): Dump fragment info.
20684         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
20685         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
20686         (gimple_build_debug_inline_entry): New.
20687         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
20688         Enable/disable inline entry points too.
20689         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
20690         (DEBUG_INSN): Describe inline entry markers.
20692         * common.opt (gvariable-location-views): New.
20693         (gvariable-location-views=incompat5): New.
20694         * config.in: Rebuilt.
20695         * configure: Rebuilt.
20696         * configure.ac: Test assembler for view support.
20697         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
20698         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
20699         * dwarf2out.c (var_loc_view): New typedef.
20700         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
20701         (dwarf2out_locviews_in_attribute): New.
20702         (dwarf2out_locviews_in_loclist): New.
20703         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
20704         (enum dw_line_info_opcode): Add LI_adv_address.
20705         (struct dw_line_info_table): Add view.
20706         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
20707         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
20708         (zero_view_p): New variable.
20709         (ZERO_VIEW_P): New macro.
20710         (output_asm_line_debug_info): New.
20711         (struct var_loc_node): Add view.
20712         (add_AT_view_list, AT_loc_list): New.
20713         (add_var_loc_to_decl): Add view param.  Test it against last.
20714         (new_loc_list): Add view params.  Record them.
20715         (AT_loc_list_ptr): Handle loc and view lists.
20716         (view_list_to_loc_list_val_node): New.
20717         (print_dw_val): Handle dw_val_class_view_list.
20718         (size_of_die): Likewise.
20719         (value_format): Likewise.
20720         (loc_list_has_views): New.
20721         (gen_llsym): Set vl_symbol too.
20722         (maybe_gen_llsym, skip_loc_list_entry): New.
20723         (dwarf2out_maybe_output_loclist_view_pair): New.
20724         (output_loc_list): Output view list or entries too.
20725         (output_view_list_offset): New.
20726         (output_die): Handle dw_val_class_view_list.
20727         (output_dwarf_version): New.
20728         (output_compilation_unit_header): Use it.
20729         (output_skeleton_debug_sections): Likewise.
20730         (output_rnglists, output_line_info): Likewise.
20731         (output_pubnames, output_aranges): Update version comments.
20732         (output_one_line_info_table): Output view numbers in asm comments.
20733         (dw_loc_list): Determine current endview, pass it to new_loc_list.
20734         Call maybe_gen_llsym.
20735         (loc_list_from_tree_1): Adjust.
20736         (add_AT_location_description): Create view list attribute if
20737         needed, check it's absent otherwise.
20738         (convert_cfa_to_fb_loc_list): Adjust.
20739         (maybe_emit_file): Call output_asm_line_debug_info for test.
20740         (dwarf2out_var_location): Reset views as needed.  Precompute
20741         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
20742         attribute.  Set view.
20743         (new_line_info_table): Reset next view.
20744         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
20745         (dwarf2out_source_line): Likewise.  Output view resets and labels to
20746         the assembler, or select appropriate line info opcodes.
20747         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
20748         (optimize_string_length): Catch it.  Adjust.
20749         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
20750         dw_val_class_view_list, and remove it if no longer needed.
20751         (hash_loc_list): Hash view numbers.
20752         (loc_list_hasher::equal): Compare them.
20753         (optimize_location_lists): Check whether a view list symbol is
20754         needed, and whether the locview attribute is present, and
20755         whether they match.  Remove the locview attribute if no longer
20756         needed.
20757         (index_location_lists): Call skip_loc_list_entry for test.
20758         (dwarf2out_finish): Call output_asm_line_debug_info for test.
20759         Use output_dwarf_version.
20760         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
20761         (struct dw_val_node): Add val_view_list.
20762         * final.c (SEEN_NEXT_VIEW): New.
20763         (set_next_view_needed): New.
20764         (clear_next_view_needed): New.
20765         (maybe_output_next_view): New.
20766         (final_start_function): Rename to...
20767         (final_start_function_1): ... this.  Take pointer to FIRST,
20768         add SEEN parameter.  Emit param bindings in the initial view.
20769         (final_start_function): Reintroduce SEEN-less interface.
20770         (final): Rename to...
20771         (final_1): ... this.  Take SEEN parameter.  Output final pending
20772         next view at the end.
20773         (final): Reintroduce seen-less interface.
20774         (final_scan_insn): Output pending next view before switching
20775         sections or ending a block.  Mark the next view as needed when
20776         outputting variable locations.  Notify debug backend of section
20777         changes, and of location view changes.
20778         (rest_of_handle_final): Adjust.
20779         * toplev.c (process_options): Autodetect value for debug variable
20780         location views option.  Warn on incompat5 without -gdwarf-5.
20781         * doc/invoke.texi (gvariable-location-views): New.
20782         (gvariable-location-views=incompat5): New.
20783         (gno-variable-location-views): New.
20785 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
20787         PR tree-optimization/84136
20788         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
20789         that the result of find_edge is non-NULL.
20791 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
20793         PR target/83008
20794         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
20795         storing integer register in SImode.  Fix cost of 256 and 512
20796         byte aligned SSE register store.
20798 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
20800         * config/i386/i386.c (ix86_multiplication_cost): Fix
20801         multiplication cost for TARGET_AVX512DQ.
20803 2018-02-08  Marek Polacek  <polacek@redhat.com>
20805         PR tree-optimization/84238
20806         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
20807         get_range_strlen.
20809 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
20811         PR tree-optimization/84265
20812         * tree-vect-stmts.c (vectorizable_store): Don't treat
20813         VMAT_CONTIGUOUS accesses as grouped.
20814         (vectorizable_load): Likewise.
20816 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
20818         PR tree-optimization/81635
20819         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
20820         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
20821         (test_round_for_mask): New functions.
20822         (wide_int_cc_tests): Call test_round_for_mask.
20823         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
20824         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
20825         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
20826         range returned by get_range_info.
20828 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
20830         PR ipa/81360
20831         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
20832         * symtab.c: Include builtins.h
20833         (symtab_node::output_to_lto_symbol_table_p): Move here
20834         from lto-streamer-out.c:output_symbol_p.
20835         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
20836         (output_symbol_p): Move all logic to symtab.c
20837         (produce_symtab): Update.
20839 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20841         * config/s390/s390-opts.h (enum indirect_branch): Define.
20842         * config/s390/s390-protos.h (s390_return_addr_from_memory)
20843         (s390_indirect_branch_via_thunk)
20844         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
20845         (enum s390_indirect_branch_type): Define.
20846         * config/s390/s390.c (struct s390_frame_layout, struct
20847         machine_function): Remove.
20848         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
20849         (indirect_branch_table_label_no, indirect_branch_table_name):
20850         Define variables.
20851         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
20852         (enum s390_indirect_branch_option): Define.
20853         (s390_return_addr_from_memory): New function.
20854         (s390_handle_string_attribute): New function.
20855         (s390_attribute_table): Add new attribute handler.
20856         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
20857         (s390_indirect_branch_via_thunk): New function.
20858         (s390_indirect_branch_via_inline_thunk): New function.
20859         (s390_function_ok_for_sibcall): When jumping via thunk disallow
20860         sibling call optimization for non z10 compiles.
20861         (s390_emit_call): Force indirect branch target to be a single
20862         register.  Add r1 clobber for non-z10 compiles.
20863         (s390_emit_epilogue): Emit return jump via return_use expander.
20864         (s390_reorg): Handle JUMP_INSNs as execute targets.
20865         (s390_option_override_internal): Perform validity checks for the
20866         new command line options.
20867         (s390_indirect_branch_attrvalue): New function.
20868         (s390_indirect_branch_settings): New function.
20869         (s390_set_current_function): Invoke s390_indirect_branch_settings.
20870         (s390_output_indirect_thunk_function):  New function.
20871         (s390_code_end): Implement target hook.
20872         (s390_case_values_threshold): Implement target hook.
20873         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
20874         macros.
20875         * config/s390/s390.h (struct s390_frame_layout)
20876         (struct machine_function): Move here from s390.c.
20877         (TARGET_INDIRECT_BRANCH_NOBP_RET)
20878         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
20879         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
20880         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
20881         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
20882         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
20883         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
20884         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
20885         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
20886         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
20887         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
20888         (mnemonic attribute): Add values which aren't recognized
20889         automatically.
20890         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
20891         pattern for branch conversion.  Fix mnemonic attribute.
20892         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
20893         indirect branch via thunk if requested.
20894         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
20895         ("*indirect_jump"): Disable for branch conversion using out of
20896         line thunks.
20897         ("indirect_jump_via_thunk<mode>_z10")
20898         ("indirect_jump_via_thunk<mode>")
20899         ("indirect_jump_via_inlinethunk<mode>_z10")
20900         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
20901         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
20902         ("casesi_jump_via_inlinethunk<mode>_z10")
20903         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
20904         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
20905         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
20906         ("*indirect2_jump"): Disable for branch conversion.
20907         ("casesi_jump"): Turn into expander and expand patterns for branch
20908         conversion.
20909         ("return_use"): New expander.
20910         ("*return"): Emit return via thunk and rename it to ...
20911         ("*return<mode>"): ... this one.
20912         * config/s390/s390.opt: Add new options and and enum for the
20913         option values.
20915 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
20917         * lra-constraints.c (match_reload): Unconditionally use
20918         gen_lowpart_SUBREG, rather than selecting between that
20919         and equivalent gen_rtx_SUBREG code.
20921 2018-02-08  Richard Biener  <rguenther@suse.de>
20923         PR tree-optimization/84233
20924         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
20925         changed flag instead of boguously re-using phi_inserted.
20927 2018-02-08  Martin Jambor  <mjambor@suse.cz>
20929         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
20930         static local variables.
20932 2018-02-08  Richard Biener  <rguenther@suse.de>
20934         PR tree-optimization/84278
20935         * tree-vect-stmts.c (vectorizable_store): When looking for
20936         smaller vector types to perform grouped strided loads/stores
20937         make sure the mode is supported by the target.
20938         (vectorizable_load): Likewise.
20940 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
20942         * config/aarch64/aarch64.c (aarch64_components_for_bb):
20943         Increase LDP/STP opportunities by adding adjacent callee-saves.
20945 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
20947         PR rtl-optimization/84068
20948         PR rtl-optimization/83459
20949         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
20951 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
20953         PR tree-optimization/84224
20954         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
20955         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
20956         non-zero arguments.
20958 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
20960         PR target/84113
20961         * config/rs6000/altivec.md (*restore_world): Remove LR use.
20962         * config/rs6000/predicates.md (restore_world_operation): Adjust op
20963         count, remove one USE.
20965 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
20967         * doc/install.texi (Configuration): Document the
20968         --with-long-double-format={ibm,ieee} PowerPC configuration
20969         options.
20971         PR target/84154
20972         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
20973         Convert from define_expand to be define_insn_and_split.  Rework
20974         float/double/_Float128 conversions to QI/HI/SImode to work with
20975         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
20976         conversions to QI/HImode types did a store and then a load to
20977         truncate the value.  For conversions to VSX registers, don't split
20978         the insn, instead emit the code directly.  Use the code iterator
20979         any_fix to combine signed and unsigned conversions.
20980         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
20981         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
20982         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20983         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
20984         (fix_<mode>di2_hw): Likewise.
20985         (fixuns_<mode>di2_hw): Likewise.
20986         (fix_<mode>si2_hw): Likewise.
20987         (fixuns_<mode>si2_hw): Likewise.
20988         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
20989         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
20990         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
20991         fix<uns>_trunc<SFDF:mode>si2_p8.
20992         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
20993         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
20994         (fix<uns>_<mode>_mem): Likewise.
20995         (fctiw<u>z_<mode>_mem): Likewise.
20996         (fix<uns>_<mode>_mem): Likewise.
20997         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
20998         the register allocator from doing a direct move to the GPRs to do
20999         a store, and instead use the ISA 3.0 store byte/half-word from
21000         vector register instruction.  For IEEE 128-bit floating point,
21001         also optimize stores of 32-bit ints.
21002         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21004 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
21006         * genextract.c (push_pathstr_operand): New function to support
21007         [a-zA-Z].
21008         (walk_rtx): Call push_pathstr_operand.
21009         (print_path): Support [a-zA-Z].
21011 2018-02-07  Richard Biener  <rguenther@suse.de>
21013         PR tree-optimization/84037
21014         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21015         (cse_and_gimplify_to_preheader): Declare.
21016         (vect_get_place_in_interleaving_chain): Likewise.
21017         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21018         ivexpr_map.
21019         (_loop_vec_info::~_loop_vec_info): Delete it.
21020         (cse_and_gimplify_to_preheader): New function.
21021         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21022         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21023         (vectorizable_load): Likewise.  For grouped stores always base
21024         the IV on the first element.
21025         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21026         condition before gimplifying.
21028 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21030         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21031         *DIV_EXPR and *MOD_EXPR.
21033 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
21035         PR target/84248
21036         * config/i386/i386.c (ix86_option_override_internal): Mask out
21037         the CF_SET bit when checking -fcf-protection.
21039 2018-02-07  Tom de Vries  <tom@codesourcery.com>
21041         PR libgomp/84217
21042         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21043         enough.
21045 2018-02-07  Richard Biener  <rguenther@suse.de>
21047         PR tree-optimization/84204
21048         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21049         this place.
21051         PR tree-optimization/84205
21052         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21053         special-case isl_ast_op_zdiv_r.
21055         PR tree-optimization/84223
21056         * graphite-scop-detection.c (gather_bbs::before_dom_children):
21057         Only add conditions from within the region.
21058         (gather_bbs::after_dom_children): Adjust.
21060 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
21062         PR target/84209
21063         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21064         * config/avr/avr.md: Only post-reload split REG-REG moves if
21065         either register is GENERAL_REG_P.
21067 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
21069         PR tree-optimization/84235
21070         * tree-ssa-scopedtables.c
21071         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21072         if the subtraction is performed in floating point type where NaNs are
21073         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21074         build 1.  Formatting fix.
21076 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
21078         PR target/84146
21079         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21080         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21081         and skip it regardless of bb boundaries.  Use CALL_P macro,
21082         don't test INSN_P (insn) together with CALL_P or JUMP_P check
21083         unnecessarily, formatting fix.
21085 2018-02-06  Michael Collison  <michael.collison@arm.com>
21087         * config/arm/thumb2.md:
21088         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21089         (*thumb_mov_notscc): Ditto.
21091 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
21093         PR target/84154
21094         * config/rs6000/rs6000.md (su code attribute): Use "u" for
21095         unsigned_fix, not "s".
21097 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21099         * configure.ac (gcc_fn_eh_frame_ro): New function.
21100         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21101         correct .eh_frame permissions.
21102         * configure: Regenerate.
21104 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
21106         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21107         irrelevant options.
21109 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21111         * config/rs6000/rs6000.c (rs6000_option_override_internal):
21112         Display warning message for -mno-speculate-indirect-jumps.
21114 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
21116         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21117         Undocumented.
21118         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21120 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
21122         PR tree-optimization/84225
21123         * tree-eh.c (find_trapping_overflow): Only call
21124         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21126 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21128         PR target/84145
21129         * config/i386/i386.c: Reimplement the check of possible options
21130         -mibt/-mshstk conbination. Change error messages.
21131         * doc/invoke.texi: Fix a typo: remove extra '='.
21133 2018-02-06  Marek Polacek  <polacek@redhat.com>
21135         PR tree-optimization/84228
21136         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21138 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
21140         PR target/82641
21141         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21142         emitted arch directives.
21143         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21144         __ARM_FEATURE_COPROC before changing architectures.
21146 2018-02-06  Richard Biener  <rguenther@suse.de>
21148         * config/i386/i386.c (print_reg): Fix typo.
21149         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21151 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
21153         * configure: Regenerate.
21155 2018-02-05  Martin Sebor  <msebor@redhat.com>
21157         PR tree-optimization/83369
21158         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
21159         inlining context.
21161 2018-02-05  Martin Liska  <mliska@suse.cz>
21163         * doc/invoke.texi: Cherry-pick upstream r323995.
21165 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
21167         * ira.c (ira_init_register_move_cost): Adjust comment.
21169 2018-02-05  Martin Liska  <mliska@suse.cz>
21171         PR gcov-profile/84137
21172         * doc/gcov.texi: Fix typo in documentation.
21174 2018-02-05  Martin Liska  <mliska@suse.cz>
21176         PR gcov-profile/83879
21177         * doc/gcov.texi: Document necessity of --dynamic-list-data when
21178         using dlopen functionality.
21180 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
21182         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
21183         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
21184         _mm_maskz_range_ss, _mm_mask_range_round_ss,
21185         _mm_maskz_range_round_ss): New intrinsics.
21186         (__builtin_ia32_rangesd128_round)
21187         (__builtin_ia32_rangess128_round): Remove.
21188         (__builtin_ia32_rangesd128_mask_round,
21189         __builtin_ia32_rangess128_mask_round): New builtins.
21190         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
21191         __builtin_ia32_rangess128_round): Remove.
21192         (__builtin_ia32_rangesd128_mask_round,
21193         __builtin_ia32_rangess128_mask_round): New builtins.
21194         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
21195         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
21196         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
21197         "<round_saeonly_constraint>")): Changed to ...
21198         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
21199         "<round_saeonly_scalar_constraint>")): ... this.
21200         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
21201         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
21202         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
21203         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
21204         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
21206 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
21208         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
21209         options.
21210         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
21211         Remove all values except native, 8540 and 8548.
21213 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
21215         * config/i386/i386.c (ix86_output_function_return): Pass
21216         INVALID_REGNUM, instead of -1, as invalid register number to
21217         indirect_thunk_name and output_indirect_thunk.
21219 2018-02-02  Julia Koval  <julia.koval@intel.com>
21221         * config.gcc: Add -march=icelake.
21222         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
21223         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
21224         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
21225         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
21226         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
21227         (processor_target_table): Add icelake.
21228         (ix86_option_override_internal): Handle new PTAs.
21229         (get_builtin_code_for_version): Handle icelake.
21230         (M_INTEL_COREI7_ICELAKE): New.
21231         (fold_builtin_cpu): Handle icelake.
21232         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
21233         * doc/invoke.texi: Add -march=icelake.
21235 2018-02-02  Julia Koval  <julia.koval@intel.com>
21237         * config/i386/i386.c (ix86_option_override_internal): Change flags type
21238         to wide_int_bitmask.
21239         * wide-int-bitmask.h: New.
21241 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21243         PR target/84066
21244         * config/i386/i386.md: Replace Pmode with word_mode in
21245         builtin_setjmp_setup and builtin_longjmp to support x32.
21247 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
21249         PR target/56010
21250         PR target/83743
21251         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
21252         #include "opts.h".
21253         (rs6000_supported_cpu_names): New static variable.
21254         (linux_cpu_translation_table): Likewise.
21255         (elf_platform) <cpu>: Define new static variable and use it.
21256         Translate kernel AT_PLATFORM name to canonical name if needed.
21257         Error if platform name is unknown.
21259 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
21261         PR target/84089
21262         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
21264 2018-02-01  Jeff Law  <law@redhat.com>
21266         PR target/84128
21267         * config/i386/i386.c (release_scratch_register_on_entry): Add new
21268         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
21269         the scratch if RELEASE_VIA_POP is false.
21270         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
21271         If we have to save a temporary register, decrement SIZE appropriately.
21272         Pass new arguments to release_scratch_register_on_entry.
21273         (ix86_adjust_stack_and_probe): Likewise.
21274         (ix86_emit_probe_stack_range): Pass new arguments to
21275         release_scratch_register_on_entry.
21277 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
21279         PR rtl-optimization/84157
21280         * combine.c (change_zero_ext): Use REG_P predicate in
21281         front of HARD_REGISTER_P predicate.
21283 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
21285         * config/avr/avr.c (avr_option_override): Move disabling of
21286         -fdelete-null-pointer-checks to...
21287         * common/config/avr/avr-common.c (avr_option_optimization_table):
21288         ...here.
21290 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21292         PR tree-optimization/81635
21293         * tree-data-ref.c (split_constant_offset_1): For types that
21294         wrap on overflow, try to use range info to prove that wrapping
21295         cannot occur.
21297 2018-02-01  Renlin Li  <renlin.li@arm.com>
21299         PR target/83370
21300         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
21301         TAILCALL_ADDR_REGS.
21302         (aarch64_register_move_cost): Likewise.
21303         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
21304         TAILCALL_ADDR_REGS.
21305         (REG_CLASS_NAMES): Likewise.
21306         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
21307         TAILCALL_ADDR_REGS. Remove IP registers.
21308         * config/aarch64/aarch64.md (Ucs): Update register constraint.
21310 2018-02-01  Richard Biener  <rguenther@suse.de>
21312         * domwalk.h (dom_walker::dom_walker): Add additional constructor
21313         for specifying RPO order and allow NULL for that.
21314         * domwalk.c (dom_walker::dom_walker): Likewise.
21315         (dom_walker::walk): Handle NULL RPO order.
21316         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
21317         in RPO order.
21318         (rewrite_update_dom_walker): Likewise.
21319         (mark_def_dom_walker): Likewise.
21321 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21323         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
21324         (aarch64_maybe_expand_sve_subreg_move): Declare.
21325         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
21326         * config/aarch64/predicates.md (aarch64_any_register_operand): New
21327         predicate.
21328         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
21329         that are semantically a reverse operation.
21330         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
21331         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
21332         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
21333         functions.
21334         (aarch64_can_change_mode_class): For big-endian, forbid changes
21335         between two SVE modes if they have different element sizes.
21337 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21339         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
21340         the TImode handling for big-endian targets.
21342 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21344         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
21345         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
21346         not just bytes.
21347         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
21348         Remove BSWAP handing for big-endian targets and use the form of
21349         LD1RQ appropariate for the mode.
21351 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21353         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
21354         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
21355         duplicated element.
21357 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
21359         PR tearget/83845
21360         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
21361         check for operands that need to go through aarch64_sve_reload_be.
21363 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
21365         PR tree-optimization/81661
21366         PR tree-optimization/84117
21367         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
21368         * tree-eh.c: Include gimplify.h.
21369         (find_trapping_overflow, replace_trapping_overflow,
21370         rewrite_to_non_trapping_overflow): New functions.
21371         * tree-vect-loop.c: Include tree-eh.h.
21372         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
21373         * tree-data-ref.c: Include tree-eh.h.
21374         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
21376 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
21378         PR rtl-optimization/84123
21379         * combine.c (change_zero_ext): Check if hard register satisfies
21380         can_change_dest_mode before calling gen_lowpart_SUBREG.
21382 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
21384         PR target/82444
21385         * ira.c (ira_init_register_move_cost): Remove assert.
21387 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
21389         PR rtl-optimization/84071
21390         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
21391         * doc/tm.texi: Regenerate.
21393 2018-01-31  Richard Biener  <rguenther@suse.de>
21395         PR tree-optimization/84132
21396         * tree-data-ref.c (analyze_miv_subscript): Properly
21397         check whether evolution_function_is_affine_multivariate_p
21398         before calling gcd_of_steps_may_divide_p.
21400 2018-01-31  Julia Koval  <julia.koval@intel.com>
21402         PR target/83618
21403         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
21404         * config/i386/i386.md (rdpid_rex64) New.
21405         (rdpid): Make 32bit only.
21407 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
21409         PR lto/84105
21410         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
21411         an IDENTIFIER_NODE for FUNCTION_TYPE's.
21413 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
21415         Revert
21416         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
21418         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21420 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
21422         PR rtl-optimization/84071
21423         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
21424         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
21426 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
21428         * config/arc/arc.c (arc_handle_aux_attribute): New function.
21429         (arc_attribute_table): Add 'aux' attribute.
21430         (arc_in_small_data_p): Consider aux like variables.
21431         (arc_is_aux_reg_p): New function.
21432         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
21433         (arc_get_aux_arg): New function.
21434         (prepare_move_operands): Handle aux-register access.
21435         (arc_handle_aux_attribute): New function.
21436         * doc/extend.texi (ARC Variable attributes): Add subsection.
21438 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
21440         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
21441         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
21442         (arc_attribute_table): Add 'uncached' attribute.
21443         (arc_print_operand): Print '.di' flag for uncached memory
21444         accesses.
21445         (arc_in_small_data_p): Do not consider for small data the uncached
21446         types.
21447         (arc_is_uncached_mem_p): New function.
21448         * config/arc/predicates.md (compact_store_memory_operand): Check
21449         for uncached memory accesses.
21450         (nonvol_nonimm_operand): Likewise.
21451         * doc/extend.texi (ARC Type Attribute): New subsection.
21453 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
21455         PR c/84100
21456         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
21457         falign-loops=): Add Optimization flag.
21459 2018-01-30  Jeff Law  <law@redhat.com>
21461         PR target/84064
21462         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
21463         INT_REGISTERS_SAVED.  Check it prior to calling
21464         get_scratch_register_on_entry.
21465         (ix86_adjust_stack_and_probe): Similarly.
21466         (ix86_emit_probe_stack_range): Similarly.
21467         (ix86_expand_prologue): Corresponding changes.
21469 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21471         PR target/40411
21472         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
21473         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
21475 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
21477         PR target/84112
21478         * lra-constraints.c (curr_insn_transform): Process AND in the
21479         address.
21481 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
21483         PR rtl-optimization/83986
21484         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
21485         dependence against last_pending_memory_flush in addition to
21486         pending_jump_insns.
21488 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
21490         PR tree-optimization/81611
21491         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
21492         copies.
21494 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21496         PR target/83758
21497         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
21498         a reg rtx.
21500 2018-01-30  Richard Biener  <rguenther@suse.de>
21501             Jakub Jelinek  <jakub@redhat.com>
21503         PR tree-optimization/84111
21504         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
21505         inner loops added during recursion, as they don't have up-to-date
21506         SSA form.
21508 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
21510         PR ipa/81360
21511         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
21512         (can_inline_edge_by_limits_p): ... here.
21513         (can_early_inline_edge_p, check_callers,
21514         update_caller_keys, update_callee_keys, recursive_inlining,
21515         add_new_edges_to_heap, speculation_useful_p,
21516         inline_small_functions,
21517         inline_small_functions, flatten_function,
21518         inline_to_all_callers_1): Update.
21520 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
21522         * profile-count.c (profile_count::combine_with_ipa_count): Handle
21523         zeros correctly.
21525 2018-01-30  Richard Biener  <rguenther@suse.de>
21527         PR tree-optimization/83008
21528         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
21529         invariant and constant vector uses in stmts when they need
21530         more than one stmt.
21532 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21534         PR bootstrap/84017
21535         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
21536         * configure: Regenerate.
21538 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
21540         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
21541         pattern.
21542         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
21543         Use gen_rtx_REG rather than gen_lowpart.
21545 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
21547         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
21548         rather than 0 when creating partial subregs.
21550 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
21552         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
21553         of usage.
21555 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
21557         PR target/81550
21558         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
21559         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
21560         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
21561         flags.  This restores the settings used before the 2017-07-24.
21562         Turning off pre increment/decrement/modify allows IVOPTS to
21563         optimize DF/SF loops where the index is an int.
21565 2018-01-29  Richard Biener  <rguenther@suse.de>
21566             Kelvin Nilsen  <kelvin@gcc.gnu.org>
21568         PR bootstrap/80867
21569         * tree-vect-stmts.c (vectorizable_call): Don't call
21570         targetm.vectorize_builtin_md_vectorized_function if callee is
21571         NULL.
21573 2018-01-22  Carl Love  <cel@us.ibm.com>
21575         * doc/extend.tex: Fix typo in second arg in
21576         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
21578 2018-01-29  Richard Biener  <rguenther@suse.de>
21580         PR tree-optimization/84086
21581         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
21582         (flush_ssaname_freelist): When SSA names were released reset
21583         the SCEV hash table.
21585 2018-01-29  Richard Biener  <rguenther@suse.de>
21587         PR tree-optimization/84057
21588         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
21589         removed paths when removing edges.
21591 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
21593         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
21594         -mfunction-return=@var{choice}.
21596 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
21598         PR diagnostic/84034
21599         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
21600         Handle CR like TAB.
21601         (layout::print_source_line): Likewise.
21602         (test_get_line_width_without_trailing_whitespace): Add test cases.
21604 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
21606         PR middle-end/84040
21607         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
21608         debug insns.
21610 2018-01-26  Jim Wilson  <jimw@sifive.com>
21612         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
21614         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
21615         specified.
21617 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21619         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
21620         and CMP + SUB-immediate -> SUBS.
21622 2018-01-26  Martin Sebor  <msebor@redhat.com>
21624         PR tree-optimization/83896
21625         * tree-ssa-strlen.c (get_string_len): Rename...
21626         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
21627         Avoid assuming length is constant.
21628         (handle_char_store): Use HOST_WIDE_INT for string length.
21630 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
21632         PR target/81763
21633         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
21634         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
21636 2018-01-26  Richard Biener  <rguenther@suse.de>
21638         PR rtl-optimization/84003
21639         * dse.c (record_store): Only record redundant stores when
21640         the earlier store aliases at least all accesses the later one does.
21642 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
21644         PR rtl-optimization/83985
21645         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
21646         REG_CFA_RESTORE insns.
21647         (delete_unmarked_insns): Don't ignore separate shrink wrapping
21648         REG_CFA_RESTORE insns here.
21650         PR c/83989
21651         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
21652         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
21654 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21656         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
21657         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
21658         (arc_init): Likewise.
21659         (arc_override_options): Likewise.
21660         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
21661         value.
21662         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
21663         support.
21664         * config/arc/arc.h (TARGET_DBNZ): Define.
21665         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
21666         properly set the tune attribute.
21667         (dbnz): Use TARGET_DBNZ guard.
21668         * config/arc/arc.opt (mtune): Add core3 option.
21670 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21672         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
21673         recognize new pic like addresses.
21674         (arc_delegitimize_address): Clean up.
21676 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21678         * config/arc/arc-arches.def: Option mrf16 valid for all
21679         architectures.
21680         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
21681         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
21682         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
21683         * config/arc/arc-tables.opt: Regenerate.
21684         * config/arc/arc.c (arc_conditional_register_usage): Handle
21685         reduced register file case.
21686         (arc_file_start): Set must have build attributes.
21687         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
21688         mrf16 option value.
21689         * config/arc/arc.opt (mrf16): Add new option.
21690         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
21691         * config/arc/genmultilib.awk: Handle new mrf16 option.
21692         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
21693         * config/arc/t-multilib: Regenerate.
21694         * doc/invoke.texi (ARC Options): Document mrf16 option.
21696 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21698         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
21699         * config/arc/arc.c (arc_handle_secure_attribute): New function.
21700         (arc_attribute_table): Add 'secure_call' attribute.
21701         (arc_print_operand): Print secure call operand.
21702         (arc_function_ok_for_sibcall): Don't optimize tail calls when
21703         secure.
21704         (arc_is_secure_call_p): New function.  * config/arc/arc.md
21705         (call_i): Add support for sjli instruction.
21706         (call_value_i): Likewise.
21707         * config/arc/constraints.md (Csc): New constraint.
21709 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
21710             John Eric Martin  <John.Martin@emmicro-us.com>
21712         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
21713         * config/arc/arc.c (_arc_jli_section): New struct.
21714         (arc_jli_section): New type.
21715         (rc_jli_sections): New static variable.
21716         (arc_handle_jli_attribute): New function.
21717         (arc_attribute_table): Add jli_always and jli_fixed attribute.
21718         (arc_file_end): New function.
21719         (TARGET_ASM_FILE_END): Define.
21720         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
21721         (arc_add_jli_section): New function.
21722         (jli_call_scan): Likewise.
21723         (arc_reorg): Call jli_call_scan.
21724         (arc_output_addsi): Remove 'S' from printing asm operand.
21725         (arc_is_jli_call_p): New function.
21726         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
21727         operand.
21728         (movhi_insn): Likewise.
21729         (movsi_insn): Likewise.
21730         (movsi_set_cc_insn): Likewise.
21731         (loadqi_update): Likewise.
21732         (load_zeroextendqisi_update): Likewise.
21733         (load_signextendqisi_update): Likewise.
21734         (loadhi_update): Likewise.
21735         (load_zeroextendhisi_update): Likewise.
21736         (load_signextendhisi_update): Likewise.
21737         (loadsi_update): Likewise.
21738         (loadsf_update): Likewise.
21739         (movsicc_insn): Likewise.
21740         (bset_insn): Likewise.
21741         (bxor_insn): Likewise.
21742         (bclr_insn): Likewise.
21743         (bmsk_insn): Likewise.
21744         (bicsi3_insn): Likewise.
21745         (cmpsi_cc_c_insn): Likewise.
21746         (movsi_ne): Likewise.
21747         (movsi_cond_exec): Likewise.
21748         (clrsbsi2): Likewise.
21749         (norm_f): Likewise.
21750         (normw): Likewise.
21751         (swap): Likewise.
21752         (divaw): Likewise.
21753         (flag): Likewise.
21754         (sr): Likewise.
21755         (kflag): Likewise.
21756         (ffs): Likewise.
21757         (ffs_f): Likewise.
21758         (fls): Likewise.
21759         (call_i): Remove 'S' asm letter, add jli instruction.
21760         (call_value_i): Likewise.
21761         * config/arc/arc.op (mjli-always): New option.
21762         * config/arc/constraints.md (Cji): New constraint.
21763         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
21764         operand.
21765         (subsf3_fpx): Likewise.
21766         (mulsf3_fpx): Likewise.
21767         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
21768         asm operand.
21769         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
21770         function attrbutes.
21771         * doc/invoke.texi (ARC): Document mjli-always option.
21773 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
21775         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
21776         avoid addition with 0 and use incw and decw where possible.
21778 2018-01-26  Richard Biener  <rguenther@suse.de>
21780         PR tree-optimization/81082
21781         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
21782         association if it requires casting to unsigned.
21783         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
21784         from fold_plusminus_mult_expr to catch important cases late when
21785         range info is available.
21787 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21789         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
21790         * configure.ac (hidden_linkonce): New test.
21791         * configure: Regenerate.
21792         * config.in: Regenerate.
21794 2018-01-26  Julia Koval  <julia.koval@intel.com>
21796         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
21797         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
21798         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
21799         _mm_mask_bitshuffle_epi64_mask): Fix type.
21800         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
21801         USI_FTYPE_V4DI_V4DI_USI): Remove.
21802         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
21803         __builtin_ia32_vpshufbitqmb256_mask,
21804         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
21805         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
21806         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
21808 2018-01-26  Alan Modra  <amodra@gmail.com>
21810         PR target/84033
21811         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
21812         UNSPEC_VBPERMQ.  Sort other unspecs.
21814 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
21816         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
21818 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
21820         PR middle-end/83055
21821         * predict.c (drop_profile): Do not push/pop cfun; update also
21822         node->count.
21823         (handle_missing_profiles): Fix logic looking for zero profiles.
21825 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
21827         PR middle-end/83977
21828         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
21829         on functions with #pragma omp declare simd or functions with simd
21830         attribute.
21831         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
21832         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
21833         Remove trailing \n from warning_at calls.
21835 2018-01-25  Tom de Vries  <tom@codesourcery.com>
21837         PR target/84028
21838         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21839         for neutered workers.
21841 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
21843         PR target/68467
21844         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
21845         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
21847 2018-01-24  Jeff Law  <law@redhat.com>
21849         PR target/83994
21850         * i386.c (get_probe_interval): Move to earlier point.
21851         (ix86_compute_frame_layout): If -fstack-clash-protection and
21852         the frame is larger than the probe interval, then use pushes
21853         to save registers rather than reg->mem moves.
21854         (ix86_expand_prologue): Remove conditional for int_registers_saved
21855         assertion.
21857 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
21859         PR target/84014
21860         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
21861         min/max for never referenced object.
21863 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
21865         PR middle-end/83977
21866         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
21867         here.
21868         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
21869         attributes from DECL_ATTRIBUTES (decl) without affecting
21870         DECL_ATTRIBUTES (current_function_decl).
21871         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
21872         functions with non-NULL DECL_ABSTRACT_ORIGIN.
21874 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
21876         PR tree-optimization/83979
21877         * fold-const.c (fold_comparison): Use constant_boolean_node
21878         instead of boolean_{true,false}_node.
21880 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
21882         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
21883         with zero counts.
21885 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21887         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
21888         Simplify the clause that sets the length attribute.
21889         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
21890         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
21891         clause that sets the length attribute.
21892         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
21894 2018-01-24  Tom de Vries  <tom@codesourcery.com>
21896         PR target/83589
21897         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
21898         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
21899         Add strict parameter.
21900         (prevent_branch_around_nothing): Insert dummy insn between branch to
21901         label and label with no ptx insn inbetween.
21902         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
21904 2018-01-24  Tom de Vries  <tom@codesourcery.com>
21906         PR target/81352
21907         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
21908         for neutered threads in warp.
21909         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
21911 2018-01-24  Richard Biener  <rguenther@suse.de>
21913         PR tree-optimization/83176
21914         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
21915         operands.
21917 2018-01-24  Richard Biener  <rguenther@suse.de>
21919         PR tree-optimization/82819
21920         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
21921         code generating pluses that are no-ops in the target precision.
21923 2018-01-24  Richard Biener  <rguenther@suse.de>
21925         PR middle-end/84000
21926         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
21928 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
21930         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
21931         to merge probabilities.
21932         * predict.c (probably_never_executed): Also mark as cold functions
21933         with global 0 profile and guessed local profile.
21934         * profile-count.c (profile_probability::combine_with_count): New
21935         member function.
21936         * profile-count.h (profile_probability::operator*,
21937         profile_probability::operator*=, profile_probability::operator/,
21938         profile_probability::operator/=): Reduce precision to adjusted
21939         and set value to guessed on contradictory divisions.
21940         (profile_probability::combine_with_freq): Remove.
21941         (profile_probability::combine_wiht_count): Declare.
21942         (profile_count::force_nonzero):: Set to adjusted.
21943         (profile_count::probability_in):: Set quality to adjusted.
21944         * tree-ssa-tail-merge.c (replace_block_by): Use
21945         combine_with_count.
21947 2018-01-23  Andrew Waterman  <andrew@sifive.com>
21948             Jim Wilson  <jimw@sifive.com>
21950         * config/riscv/riscv.c (riscv_stack_boundary): New.
21951         (riscv_option_override): Set riscv_stack_boundary.  Handle
21952         riscv_preferred_stack_boundary_arg.
21953         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
21954         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
21955         (STACK_BOUNDARY): Set to riscv_stack_boundary.
21956         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
21957         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
21958         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
21960 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
21962         PR target/83905
21963         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
21964         of struct ix86_frame.
21965         (ix86_expand_epilogue): Likewise.  Add a local variable for
21966         the reg_save_offset field in struct ix86_frame.
21968 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
21970         PR tree-optimization/82604
21971         * tree-loop-distribution.c (enum partition_kind): New enum item
21972         PKIND_PARTIAL_MEMSET.
21973         (partition_builtin_p): Support above new enum item.
21974         (generate_code_for_partition): Ditto.
21975         (compute_access_range): Differentiate cases that equality can be
21976         proven at all loops, the innermost loops or no loops.
21977         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
21978         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
21979         (finalize_partitions, distribute_loop): Don't fuse partition of
21980         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
21981         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
21982         parloop is enabled.
21984 2018-01-23  Martin Liska  <mliska@suse.cz>
21986         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
21987         order to ignore the predictor.
21988         (PRED_POLYMORPHIC_CALL): Likewise.
21989         (PRED_RECURSIVE_CALL): Likewise.
21991 2018-01-23  Martin Liska  <mliska@suse.cz>
21993         * tree-profile.c (tree_profiling): Print function header to
21994         aware reader which function we are working on.
21995         * value-prof.c (gimple_find_values_to_profile): Do not print
21996         not interesting value histograms.
21998 2018-01-23  Martin Liska  <mliska@suse.cz>
22000         * profile-count.h (enum profile_quality): Add
22001         profile_uninitialized as the first value. Do not number values
22002         as they are zero based.
22003         (profile_count::verify): Update sanity check.
22004         (profile_probability::verify): Likewise.
22006 2018-01-23  Nathan Sidwell  <nathan@acm.org>
22008         * doc/invoke.texi (ffor-scope): Deprecate.
22010 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22012         PR tree-optimization/83510
22013         * domwalk.c (set_all_edges_as_executable): New function.
22014         (dom_walker::dom_walker): Convert bool param
22015         "skip_unreachable_blocks" to enum reachability.  Move setup of
22016         edge flags to set_all_edges_as_executable and only do it when
22017         reachability is REACHABLE_BLOCKS.
22018         * domwalk.h (enum dom_walker::reachability): New enum.
22019         (dom_walker::dom_walker): Convert bool param
22020         "skip_unreachable_blocks" to enum reachability.
22021         (set_all_edges_as_executable): New decl.
22022         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
22023         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22024         "reachability".
22025         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22026         but converting true to REACHABLE_BLOCKS.
22027         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22028         * tree-vrp.c
22029         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22030         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22031         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22032         REACHABLE_BLOCKS.
22033         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22034         if check_all_array_refs will be called.
22036 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22038         * tree.c (selftest::test_location_wrappers): Add more test
22039         coverage.
22041 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
22043         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22044         (selftest::test_bit_in_range): Likewise.
22046 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22048         PR testsuite/83888
22049         * doc/sourcebuild.texi (vect_float): Say that the selector
22050         only describes the situation when -funsafe-math-optimizations is on.
22051         (vect_float_strict): Document.
22053 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
22055         PR tree-optimization/83965
22056         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22057         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22058         instead of checking only for a reduction.
22059         (vect_recog_widen_sum_pattern): Likewise.
22061 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22063         * predict.c (probably_never_executed): Only use precise profile info.
22064         (compute_function_frequency): Skip after inlining hack since we now
22065         have quality checking.
22067 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
22069         * profile-count.h (profile_probability::very_unlikely,
22070         profile_probability::unlikely, profile_probability::even): Set
22071         precision to guessed.
22073 2018-01-23  Richard Biener  <rguenther@suse.de>
22075         PR tree-optimization/83963
22076         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22077         Properly terminate dominator walk when crossing the exit edge not
22078         when visiting its source block.
22080 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
22082         PR c++/83918
22083         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22084         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22086 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
22088         PR tree-optimization/83957
22089         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
22090         semicolon after for body surrounded by braces.
22092         PR tree-optimization/83081
22093         * profile-count.h (profile_probability::split): New method.
22094         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22095         Use profile_probability::split.
22096         (do_compare_rtx_and_jump): Fix adjustment of probabilities
22097         when splitting a single conditional jump into 2.
22099 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
22101         PR tree-optimization/69452
22102         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22103         decl.
22105 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22107         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22108         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22109         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22111 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22113         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22114         declaration.
22115         * config/rl78/rl78.md (movdi): New define_expand.
22116         * config/rl78/rl78.c (rl78_split_movdi): New function.
22118 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
22120         PR target/83862
22121         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22122         no longer used.
22123         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22124         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22125         128-bit to produce an UNSPEC move to get the double word with the
22126         signbit and then a shift directly to do signbit.
22127         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22128         implementation with a new version that just does either a direct
22129         move or a regular move.  Move memory interface to separate insns.
22130         Move insns so they are next to the expander.
22131         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22132         with signbit move.  Split big and little endian case.
22133         (signbit<mode>2_dm_mem_le): Likewise.
22134         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22135         (signbit<mode>2_dm2): Likewise.
22137 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22139         * config/rl78/rl78.md (anddi3): New define_expand.
22141 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22143         * config/rl78/rl78.md (umindi3): New define_expand.
22145 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22147         * config/rl78/rl78.md (smindi3): New define_expand.
22149 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22151         * config/rl78/rl78.md (smaxdi3): New define_expand.
22153 2018-01-22  Carl Love  <cel@us.ibm.com>
22155         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
22156         LVX_V1TI): Add macro expansion.
22157         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
22158         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
22159         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
22160         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
22161         Change check to determine if the instruction is a byte reversing
22162         entry.  Fix typo in comment.
22163         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
22164         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
22165         Add def_builtin calls for new builtins.
22166         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
22167         Add define_insn expansion.
22169 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22171         * config/rl78/rl78.md (umaxdi3): New define_expand.
22173 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
22175         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
22176         for non-QImode registers.
22178 2018-01-22  Richard Biener  <rguenther@suse.de>
22180         PR tree-optimization/83963
22181         * graphite-scop-detection.c (scop_detection::get_sese): Delay
22182         including the loop exit block.
22183         (scop_detection::merge_sese): Likewise.
22184         (scop_detection::add_scop): Do it here instead.
22186 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22188         * doc/sourcebuild.texi (arm_softfloat): Document.
22190 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
22192         PR gcc/77734
22193         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
22194         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
22195         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
22197 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22198             David Edelsohn  <dje.gcc@gmail.com>
22200         PR target/83946
22201         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22202         Change "crset eq" to "crset 2".
22203         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22204         (*call_indirect_aix<mode>_nospec): Likewise.
22205         (*call_value_indirect_aix<mode>_nospec): Likewise.
22206         (*call_indirect_elfv2<mode>_nospec): Likewise.
22207         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
22208         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
22209         change assembly output from . to $.
22210         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22211         (indirect_jump<mode>_nospec): Change assembly output from . to $.
22212         (*tablejump<mode>_internal1_nospec): Likewise.
22214 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
22216         PR target/80870
22217         * config/sh/sh_optimize_sett_clrt.cc:
22218         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
22220 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
22222         PR tree-optimization/83940
22223         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
22224         offset_dt to vect_constant_def rather than vect_unknown_def_type.
22225         (vect_check_load_store_mask): Add a mask_dt_out parameter and
22226         use it to pass back the definition type.
22227         (vect_check_store_rhs): Likewise rhs_dt_out.
22228         (vect_build_gather_load_calls): Add a mask_dt argument and use
22229         it instead of a call to vect_is_simple_use.
22230         (vectorizable_store): Update calls to vect_check_load_store_mask
22231         and vect_check_store_rhs.  Use the dt returned by the latter instead
22232         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
22233         instead of calls to vect_is_simple_use.  Pass the scalar rather
22234         than the vector operand to vect_is_simple_use when handling
22235         second and subsequent copies of an rhs value.
22236         (vectorizable_load): Update calls to vect_check_load_store_mask
22237         and vect_build_gather_load_calls.  Use the cached mask_dt and
22238         gs_info.offset_dt instead of calls to vect_is_simple_use.
22240 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
22242         PR middle-end/83945
22243         * tree-emutls.c: Include gimplify.h.
22244         (lower_emutls_2): New function.
22245         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
22246         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
22247         it before further processing.
22249         PR target/83930
22250         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
22251         UINTVAL (trueop1) instead of INTVAL (op1).
22253 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
22255         PR debug/81570
22256         PR debug/83728
22257         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
22258         INCOMING_FRAME_SP_OFFSET if not defined.
22259         (scan_trace): Add ENTRY argument.  If true and
22260         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
22261         emit a note to adjust the CFA offset.
22262         (create_cfi_notes): Adjust scan_trace callers.
22263         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
22264         INCOMING_FRAME_SP_OFFSET in the CIE.
22265         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
22266         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
22267         Likewise.
22268         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
22269         * doc/tm.texi: Regenerated.
22271 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22273         PR rtl-optimization/83147
22274         * lra-constraints.c (remove_inheritance_pseudos): Use
22275         lra_substitute_pseudo_within_insn.
22277 2018-01-19  Tom de Vries  <tom@codesourcery.com>
22278             Cesar Philippidis  <cesar@codesourcery.com>
22280         PR target/83920
22281         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
22283 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
22285         PR target/83790
22286         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
22287         spaces for function labels.
22289 2018-01-19  Martin Liska  <mliska@suse.cz>
22291         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
22292         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
22293         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
22294         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
22295         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
22296         (PRED_CONST_RETURN): Change from 69 to 65.
22297         (PRED_NULL_RETURN): Change from 91 to 71.
22298         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
22299         (PRED_LOOP_GUARD): Change from 66 to 73.
22301 2018-01-19  Martin Liska  <mliska@suse.cz>
22303         * predict.c (predict_insn_def): Add new assert.
22304         (struct branch_predictor): Change type to signed integer.
22305         (test_prediction_value_range): Amend test to cover
22306         PROB_UNINITIALIZED.
22307         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
22308         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
22309         (PRED_LOOP_ITERATIONS_MAX): Likewise.
22310         (PRED_LOOP_IV_COMPARE): Likewise.
22311         * predict.h (PROB_UNINITIALIZED): Define new constant.
22313 2018-01-19  Martin Liska  <mliska@suse.cz>
22315         * predict.c (dump_prediction): Add new format for
22316         analyze_brprob.py script which is enabled with -details
22317         suboption.
22318         * profile-count.h (precise_p): New function.
22320 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
22322         PR tree-optimization/83922
22323         * tree-vect-loop.c (vect_verify_full_masking): Return false if
22324         there are no statements that need masking.
22325         (vect_active_double_reduction_p): New function.
22326         (vect_analyze_loop_operations): Use it when handling phis that
22327         are not in the loop header.
22329 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
22331         PR tree-optimization/83914
22332         * tree-vect-loop.c (vectorizable_induction): Don't convert
22333         init_expr or apply the peeling adjustment for inductions
22334         that are nested within the vectorized loop.
22336 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22338         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
22339         instead of NEG.
22341 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
22343         PR sanitizer/81715
22344         PR testsuite/83882
22345         * function.h (gimplify_parameters): Add gimple_seq * argument.
22346         * function.c: Include gimple.h and options.h.
22347         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
22348         for the added local temporaries if needed.
22349         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
22350         if there are any parameter cleanups, wrap whole body into a
22351         try/finally with the cleanups.
22353 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
22355         PR target/82964
22356         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
22357         Use GET_MODE_CLASS for scalar floating point.
22359 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
22361         PR ipa/82256
22362         patch by PaX Team
22363         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
22364         Fix call of call_cgraph_insertion_hooks.
22366 2018-01-18  Martin Sebor  <msebor@redhat.com>
22368         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
22370 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
22372         PR ipa/83619
22373         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
22374         frequencies.
22376 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
22378         PR other/70268
22379         * common.opt: (-ffile-prefix-map): New option.
22380         * opts.c (common_handle_option): Defer it.
22381         * opts-global.c (handle_common_deferred_options): Handle it.
22382         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
22383         * file-prefix-map.h: New file.
22384         (remap_debug_filename, add_debug_prefix_map): ...here.
22385         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
22386         * final.c (debug_prefix_map, add_debug_prefix_map
22387         remap_debug_filename): Move to...
22388         * file-prefix-map.c: New file.
22389         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
22390         generalize, get rid of alloca(), use strrchr() instead of strchr().
22391         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
22392         Implement in terms of add_prefix_map().
22393         (remap_macro_filename, remap_debug_filename): Implement in term of
22394         remap_filename().
22395         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
22396         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
22397         * dbxout.c: Include file-prefix-map.h.
22398         * varasm.c: Likewise.
22399         * vmsdbgout.c: Likewise.
22400         * xcoffout.c: Likewise.
22401         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
22402         * doc/cppopts.texi (-fmacro-prefix-map): Document.
22403         * doc/invoke.texi (-ffile-prefix-map): Document.
22404         (-fdebug-prefix-map): Update description.
22406 2018-01-18  Martin Liska  <mliska@suse.cz>
22408         * config/i386/i386.c (indirect_thunk_name): Document that also
22409         lfence is emitted.
22410         (output_indirect_thunk): Document why both instructions
22411         (pause and lfence) are generated.
22413 2018-01-18  Richard Biener  <rguenther@suse.de>
22415         PR tree-optimization/83887
22416         * graphite-scop-detection.c
22417         (scop_detection::get_nearest_dom_with_single_entry): Remove.
22418         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
22419         (scop_detection::merge_sese): Re-implement with a flood-fill
22420         algorithm that properly finds a SESE region if it exists.
22422 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
22424         PR c/61240
22425         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
22426         pointer_diff optimizations use view_convert instead of convert.
22428 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22430         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22431         Generate different code for -mno-speculate-indirect-jumps.
22432         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22433         (*call_indirect_aix<mode>): Disable for
22434         -mno-speculate-indirect-jumps.
22435         (*call_indirect_aix<mode>_nospec): New define_insn.
22436         (*call_value_indirect_aix<mode>): Disable for
22437         -mno-speculate-indirect-jumps.
22438         (*call_value_indirect_aix<mode>_nospec): New define_insn.
22439         (*sibcall_nonlocal_sysv<mode>): Generate different code for
22440         -mno-speculate-indirect-jumps.
22441         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22443 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
22445         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
22446         long double type, set the flags for noting the default long double
22447         type, even if we don't pass or return a long double type.
22449 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
22451         PR ipa/83051
22452         * ipa-inline.c (flatten_function): Do not overwrite final inlining
22453         failure.
22455 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
22457         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
22458         support for merge[hl].
22459         (fold_mergehl_helper): New helper function.
22460         (tree-vector-builder.h): New #include for tree_vector_builder usage.
22461         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
22462         (altivec_vmrglw_direct): Add xxmrglw insn.
22464 2018-01-17  Andrew Waterman  <andrew@sifive.com>
22466         * config/riscv/riscv.c (riscv_conditional_register_usage): If
22467         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
22469 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
22471         PR lto/83121
22472         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
22473         call the lto_location_cache before reading the
22474         DECL_SOURCE_LOCATION of the types.
22476 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
22477             Richard Sandiford  <richard.sandiford@linaro.org>
22479         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
22480         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
22481         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
22482         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
22483         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
22484         Add declaration.
22485         * config/aarch64/constraints.md (aarch64_movti_operand):
22486         Limit immediates.
22487         * config/aarch64/predicates.md (Uti): Add new constraint.
22489 2018-01-17  Carl Love  <cel@us.ibm.com>
22491         * config/rs6000/vsx.md (define_expand xl_len_r,
22492         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
22493         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
22494         lxvll.
22495         (define_expand, define_insn): Move the shift left from  the
22496         define_insn to the define_expand for lxvl and stxvl instructions.
22497         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
22498         and XL_LEN_R definitions to PURE.
22500 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
22502         * config/i386/i386.c (indirect_thunk_name): Declare regno
22503         as unsigned int.  Compare regno with INVALID_REGNUM.
22504         (output_indirect_thunk): Ditto.
22505         (output_indirect_thunk_function): Ditto.
22506         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
22507         in the call to output_indirect_thunk_function.
22509 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
22511         PR middle-end/83884
22512         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
22513         rather than the size of inner_type to determine the stack slot size
22514         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
22516 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
22518         PR target/83546
22519         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
22520         to PTA_SILVERMONT.
22522 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
22524         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
22525         endian Linux systems to optionally enable multilibs for selecting
22526         the long double type if the user configured an explicit type.
22527         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
22528         have no long double multilibs if not defined.
22529         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
22530         warn if the user used -mabi={ieee,ibm}longdouble and we built
22531         multilibs for long double.
22532         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
22533         appropriate multilib option.
22534         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
22535         multilib options.
22536         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
22537         for building long double multilibs.
22538         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
22540 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
22542         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
22543         copies.
22545         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
22546         64 bits.
22547         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
22548         128 bits.
22550         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
22551         variables.
22553         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
22554         return value.
22556 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
22558         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
22559         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
22561 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22563         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
22564         different rtl trees depending on TARGET_64BIT.
22565         (rs6000_gen_lvx): Likewise.
22567 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
22569         * config/visium/visium.md (nop): Tweak comment.
22570         (hazard_nop): Likewise.
22572 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22574         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
22575         -mspeculate-indirect-jumps.
22576         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
22577         for -mno-speculate-indirect-jumps.
22578         (*call_indirect_elfv2<mode>_nospec): New define_insn.
22579         (*call_value_indirect_elfv2<mode>): Disable for
22580         -mno-speculate-indirect-jumps.
22581         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
22582         (indirect_jump): Emit different RTL for
22583         -mno-speculate-indirect-jumps.
22584         (*indirect_jump<mode>): Disable for
22585         -mno-speculate-indirect-jumps.
22586         (*indirect_jump<mode>_nospec): New define_insn.
22587         (tablejump): Emit different RTL for
22588         -mno-speculate-indirect-jumps.
22589         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
22590         (tablejumpsi_nospec): New define_expand.
22591         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
22592         (tablejumpdi_nospec): New define_expand.
22593         (*tablejump<mode>_internal1): Disable for
22594         -mno-speculate-indirect-jumps.
22595         (*tablejump<mode>_internal1_nospec): New define_insn.
22596         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
22597         option.
22599 2018-01-16  Artyom Skrobov tyomitch@gmail.com
22601         * caller-save.c (insert_save): Drop unnecessary parameter.  All
22602         callers updated.
22604 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
22605             Richard Biener  <rguenth@suse.de>
22607         PR libgomp/83590
22608         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
22609         return early, inline manually is_gimple_sizepos.  Make sure if we
22610         call gimplify_expr we don't end up with a gimple constant.
22611         * tree.c (variably_modified_type_p): Don't return true for
22612         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
22613         * gimplify.h (is_gimple_sizepos): Remove.
22615 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22617         PR tree-optimization/83857
22618         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
22619         vectorizable_live_operation for pure SLP statements.
22620         (vectorizable_live_operation): Handle PHIs.
22622 2018-01-16  Richard Biener  <rguenther@suse.de>
22624         PR tree-optimization/83867
22625         * tree-vect-stmts.c (vect_transform_stmt): Precompute
22626         nested_in_vect_loop_p since the scalar stmt may get invalidated.
22628 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
22630         PR c/83844
22631         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
22632         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
22633         If off is not INTEGER_CST, issue a may not be aligned warning
22634         rather than isn't aligned.  Use isn%'t rather than isn't.
22635         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
22636         into MULT_EXPR.
22637         <case MULT_EXPR>: Improve the case when bottom and one of the
22638         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
22639         operand, in that case check if the other operand is multiple of
22640         bottom divided by the INTEGER_CST operand.
22642 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22644         PR target/83858
22645         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
22646         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
22647         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
22648         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
22649         * config/pa/pa.c (pa_function_arg_advance): Likewise.
22650         (pa_function_arg, pa_arg_partial_bytes): Likewise.
22651         (pa_function_arg_size): New function.
22653 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22655         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
22656         in a separate statement.
22658 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
22660         PR tree-optimization/83847
22661         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
22662         group gathers and scatters.
22664 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
22666         PR rtl-optimization/86620
22667         * params.def (max-sched-ready-insns): Bump minimum value to 1.
22669         PR rtl-optimization/83213
22670         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
22671         to last if both are JUMP_INSNs.
22673         PR tree-optimization/83843
22674         * gimple-ssa-store-merging.c
22675         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
22676         store_immediate_info for bswap/nop orig_stores.
22678 2018-01-15  Andrew Waterman  <andrew@sifive.com>
22680         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
22681         !TARGET_MUL.
22682         <UDIV>: Increase cost if !TARGET_DIV.
22684 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
22686         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
22687         (define_attr "cr_logical_3op"): New.
22688         (cceq_ior_compare): Adjust.
22689         (cceq_ior_compare_complement): Adjust.
22690         (*cceq_rev_compare): Adjust.
22691         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
22692         (is_cracked_insn): Adjust.
22693         (insn_must_be_first_in_group): Adjust.
22694         * config/rs6000/40x.md: Adjust.
22695         * config/rs6000/440.md: Adjust.
22696         * config/rs6000/476.md: Adjust.
22697         * config/rs6000/601.md: Adjust.
22698         * config/rs6000/603.md: Adjust.
22699         * config/rs6000/6xx.md: Adjust.
22700         * config/rs6000/7450.md: Adjust.
22701         * config/rs6000/7xx.md: Adjust.
22702         * config/rs6000/8540.md: Adjust.
22703         * config/rs6000/cell.md: Adjust.
22704         * config/rs6000/e300c2c3.md: Adjust.
22705         * config/rs6000/e500mc.md: Adjust.
22706         * config/rs6000/e500mc64.md: Adjust.
22707         * config/rs6000/e5500.md: Adjust.
22708         * config/rs6000/e6500.md: Adjust.
22709         * config/rs6000/mpc.md: Adjust.
22710         * config/rs6000/power4.md: Adjust.
22711         * config/rs6000/power5.md: Adjust.
22712         * config/rs6000/power6.md: Adjust.
22713         * config/rs6000/power7.md: Adjust.
22714         * config/rs6000/power8.md: Adjust.
22715         * config/rs6000/power9.md: Adjust.
22716         * config/rs6000/rs64.md: Adjust.
22717         * config/rs6000/titan.md: Adjust.
22719 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22721         * config/i386/predicates.md (indirect_branch_operand): Rewrite
22722         ix86_indirect_branch_register logic.
22724 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22726         * config/i386/constraints.md (Bs): Update
22727         ix86_indirect_branch_register check.  Don't check
22728         ix86_indirect_branch_register with GOT_memory_operand.
22729         (Bw): Likewise.
22730         * config/i386/predicates.md (GOT_memory_operand): Don't check
22731         ix86_indirect_branch_register here.
22732         (GOT32_symbol_operand): Likewise.
22734 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22736         * config/i386/predicates.md (constant_call_address_operand):
22737         Rewrite ix86_indirect_branch_register logic.
22738         (sibcall_insn_operand): Likewise.
22740 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22742         * config/i386/constraints.md (Bs): Replace
22743         ix86_indirect_branch_thunk_register with
22744         ix86_indirect_branch_register.
22745         (Bw): Likewise.
22746         * config/i386/i386.md (indirect_jump): Likewise.
22747         (tablejump): Likewise.
22748         (*sibcall_memory): Likewise.
22749         (*sibcall_value_memory): Likewise.
22750         Peepholes of indirect call and jump via memory: Likewise.
22751         * config/i386/i386.opt: Likewise.
22752         * config/i386/predicates.md (indirect_branch_operand): Likewise.
22753         (GOT_memory_operand): Likewise.
22754         (call_insn_operand): Likewise.
22755         (sibcall_insn_operand): Likewise.
22756         (GOT32_symbol_operand): Likewise.
22758 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
22760         PR middle-end/83837
22761         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
22762         type rather than type addr's type points to.
22763         (expand_omp_atomic_mutex): Likewise.
22764         (expand_omp_atomic): Likewise.
22766 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
22768         PR target/83839
22769         * config/i386/i386.c (output_indirect_thunk_function): Use
22770         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
22771         for  __x86_return_thunk.
22773 2018-01-15  Richard Biener  <rguenther@suse.de>
22775         PR middle-end/83850
22776         * expmed.c (extract_bit_field_1): Fix typo.
22778 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22780         PR target/83687
22781         * config/arm/iterators.md (VF): New mode iterator.
22782         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
22783         Remove integer-related logic from pattern.
22784         (neon_vabd<mode>_3): Likewise.
22786 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
22788         PR middle-end/82694
22789         * common.opt (fstrict-overflow): No longer an alias.
22790         (fwrapv-pointer): New option.
22791         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
22792         also for pointer types based on flag_wrapv_pointer.
22793         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
22794         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
22795         opts->x_flag_wrapv got set.
22796         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
22797         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
22798         POINTER_TYPE_OVERFLOW_UNDEFINED.
22799         * match.pd: Likewise in address comparison pattern.
22800         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
22802 2018-01-15  Richard Biener  <rguenther@suse.de>
22804         PR lto/83804
22805         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
22806         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
22807         Reset type names to their identifier if their TYPE_DECL doesn't
22808         have linkage (and thus is used for ODR and devirt).
22809         (save_debug_info_for_decl): Remove.
22810         (save_debug_info_for_type): Likewise.
22811         (add_tree_to_fld_list): Adjust.
22812         * tree-pretty-print.c (dump_generic_node): Make dumping of
22813         type names more robust.
22815 2018-01-15  Richard Biener  <rguenther@suse.de>
22817         * BASE-VER: Bump to 8.0.1.
22819 2018-01-14  Martin Sebor  <msebor@redhat.com>
22821         PR other/83508
22822         * builtins.c (check_access): Avoid warning when the no-warning bit
22823         is set.
22825 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
22827         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
22828         * ira-color (allocno_hard_regs_compare): Likewise.
22830 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
22832         PR target/83013
22833         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
22834         Use .pushsection/.popsection.
22836 2018-01-14  Martin Sebor  <msebor@redhat.com>
22838         PR c++/81327
22839         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
22841 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
22843         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
22844         entry from extra_headers.
22845         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
22846         extra_headers, make the list bitwise identical to the i?86-*-* one.
22848 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22850         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
22851         -mcmodel=large with -mindirect-branch=thunk,
22852         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
22853         -mfunction-return=thunk-extern.
22854         * doc/invoke.texi: Document -mcmodel=large is incompatible with
22855         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
22856         -mfunction-return=thunk and -mfunction-return=thunk-extern.
22858 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22860         * config/i386/i386.c (print_reg): Print the name of the full
22861         integer register without '%'.
22862         (ix86_print_operand): Handle 'V'.
22863         * doc/extend.texi: Document 'V' modifier.
22865 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22867         * config/i386/constraints.md (Bs): Disallow memory operand for
22868         -mindirect-branch-register.
22869         (Bw): Likewise.
22870         * config/i386/predicates.md (indirect_branch_operand): Likewise.
22871         (GOT_memory_operand): Likewise.
22872         (call_insn_operand): Likewise.
22873         (sibcall_insn_operand): Likewise.
22874         (GOT32_symbol_operand): Likewise.
22875         * config/i386/i386.md (indirect_jump): Call convert_memory_address
22876         for -mindirect-branch-register.
22877         (tablejump): Likewise.
22878         (*sibcall_memory): Likewise.
22879         (*sibcall_value_memory): Likewise.
22880         Disallow peepholes of indirect call and jump via memory for
22881         -mindirect-branch-register.
22882         (*call_pop): Replace m with Bw.
22883         (*call_value_pop): Likewise.
22884         (*sibcall_pop_memory): Replace m with Bs.
22885         * config/i386/i386.opt (mindirect-branch-register): New option.
22886         * doc/invoke.texi: Document -mindirect-branch-register option.
22888 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22890         * config/i386/i386-protos.h (ix86_output_function_return): New.
22891         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
22892         set function_return_type.
22893         (indirect_thunk_name): Add ret_p to indicate thunk for function
22894         return.
22895         (output_indirect_thunk_function): Pass false to
22896         indirect_thunk_name.
22897         (ix86_output_indirect_branch_via_reg): Likewise.
22898         (ix86_output_indirect_branch_via_push): Likewise.
22899         (output_indirect_thunk_function): Create alias for function
22900         return thunk if regno < 0.
22901         (ix86_output_function_return): New function.
22902         (ix86_handle_fndecl_attribute): Handle function_return.
22903         (ix86_attribute_table): Add function_return.
22904         * config/i386/i386.h (machine_function): Add
22905         function_return_type.
22906         * config/i386/i386.md (simple_return_internal): Use
22907         ix86_output_function_return.
22908         (simple_return_internal_long): Likewise.
22909         * config/i386/i386.opt (mfunction-return=): New option.
22910         (indirect_branch): Mention -mfunction-return=.
22911         * doc/extend.texi: Document function_return function attribute.
22912         * doc/invoke.texi: Document -mfunction-return= option.
22914 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
22916         * config/i386/i386-opts.h (indirect_branch): New.
22917         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
22918         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
22919         with local indirect jump when converting indirect call and jump.
22920         (ix86_set_indirect_branch_type): New.
22921         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
22922         (indirectlabelno): New.
22923         (indirect_thunk_needed): Likewise.
22924         (indirect_thunk_bnd_needed): Likewise.
22925         (indirect_thunks_used): Likewise.
22926         (indirect_thunks_bnd_used): Likewise.
22927         (INDIRECT_LABEL): Likewise.
22928         (indirect_thunk_name): Likewise.
22929         (output_indirect_thunk): Likewise.
22930         (output_indirect_thunk_function): Likewise.
22931         (ix86_output_indirect_branch_via_reg): Likewise.
22932         (ix86_output_indirect_branch_via_push): Likewise.
22933         (ix86_output_indirect_branch): Likewise.
22934         (ix86_output_indirect_jmp): Likewise.
22935         (ix86_code_end): Call output_indirect_thunk_function if needed.
22936         (ix86_output_call_insn): Call ix86_output_indirect_branch if
22937         needed.
22938         (ix86_handle_fndecl_attribute): Handle indirect_branch.
22939         (ix86_attribute_table): Add indirect_branch.
22940         * config/i386/i386.h (machine_function): Add indirect_branch_type
22941         and has_local_indirect_jump.
22942         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
22943         to true.
22944         (tablejump): Likewise.
22945         (*indirect_jump): Use ix86_output_indirect_jmp.
22946         (*tablejump_1): Likewise.
22947         (simple_return_indirect_internal): Likewise.
22948         * config/i386/i386.opt (mindirect-branch=): New option.
22949         (indirect_branch): New.
22950         (keep): Likewise.
22951         (thunk): Likewise.
22952         (thunk-inline): Likewise.
22953         (thunk-extern): Likewise.
22954         * doc/extend.texi: Document indirect_branch function attribute.
22955         * doc/invoke.texi: Document -mindirect-branch= option.
22957 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
22959         PR ipa/83051
22960         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
22962 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
22964         * ipa-inline.c (want_inline_small_function_p): Return false if
22965         inlining has already failed with CIF_FINAL_ERROR.
22966         (update_caller_keys): Call want_inline_small_function_p before
22967         can_inline_edge_p.
22968         (update_callee_keys): Likewise.
22970 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22972         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
22973         New function.
22974         (rs6000_quadword_masked_address_p): Likewise.
22975         (quad_aligned_load_p): Likewise.
22976         (quad_aligned_store_p): Likewise.
22977         (const_load_sequence_p): Add comment to describe the outer-most loop.
22978         (mimic_memory_attributes_and_flags): New function.
22979         (rs6000_gen_stvx): Likewise.
22980         (replace_swapped_aligned_store): Likewise.
22981         (rs6000_gen_lvx): Likewise.
22982         (replace_swapped_aligned_load): Likewise.
22983         (replace_swapped_load_constant): Capitalize argument name in
22984         comment describing this function.
22985         (rs6000_analyze_swaps): Add a third pass to search for vector loads
22986         and stores that access quad-word aligned addresses and replace
22987         with stvx or lvx instructions when appropriate.
22988         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
22989         New function prototype.
22990         (rs6000_quadword_masked_address_p): Likewise.
22991         (rs6000_gen_lvx): Likewise.
22992         (rs6000_gen_stvx): Likewise.
22993         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
22994         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
22995         when memory address is aligned.
22996         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
22997         this split to select lvx instruction when memory address is aligned.
22998         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
22999         instruction when memory address is aligned.
23000         (*vsx_le_perm_load_v16qi): Likewise.
23001         (four unnamed splitters): Modify to select the stvx instruction
23002         when memory is aligned.
23004 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
23006         * predict.c (determine_unlikely_bbs): Handle correctly BBs
23007         which appears in the queue multiple times.
23009 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23010             Alan Hayward  <alan.hayward@arm.com>
23011             David Sherwood  <david.sherwood@arm.com>
23013         * tree-vectorizer.h (vec_lower_bound): New structure.
23014         (_loop_vec_info): Add check_nonzero and lower_bounds.
23015         (LOOP_VINFO_CHECK_NONZERO): New macro.
23016         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23017         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23018         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23019         fields.  Make seg_len the distance travelled, not including the
23020         access size.
23021         (dr_direction_indicator): Declare.
23022         (dr_zero_step_indicator): Likewise.
23023         (dr_known_forward_stride_p): Likewise.
23024         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23025         tree-ssanames.h.
23026         (runtime_alias_check_p): Allow runtime alias checks with
23027         variable strides.
23028         (operator ==): Compare access_size and align.
23029         (prune_runtime_alias_test_list): Rework for new distinction between
23030         the access_size and seg_len.
23031         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
23032         segment lengths.
23033         (get_segment_min_max): New function.
23034         (create_intersect_range_checks): Use it.
23035         (dr_step_indicator): New function.
23036         (dr_direction_indicator): Likewise.
23037         (dr_zero_step_indicator): Likewise.
23038         (dr_known_forward_stride_p): Likewise.
23039         * tree-loop-distribution.c (data_ref_segment_size): Return
23040         DR_STEP * (niters - 1).
23041         (compute_alias_check_pairs): Update call to the dr_with_seg_len
23042         constructor.
23043         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23044         (vect_preserves_scalar_order_p): New function, split out from...
23045         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
23046         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23047         (vect_vfa_access_size): New function.
23048         (vect_vfa_align): Likewise.
23049         (vect_compile_time_alias): Take access_size_a and access_b arguments.
23050         (dump_lower_bound): New function.
23051         (vect_check_lower_bound): Likewise.
23052         (vect_small_gap_p): Likewise.
23053         (vectorizable_with_step_bound_p): Likewise.
23054         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23055         depencies if the vectorization factor is 1.  Convert the checks
23056         for nonzero steps into checks on the bounds of DR_STEP.  Try using
23057         a bunds check for variable steps if the minimum required step is
23058         relatively small. Update calls to the dr_with_seg_len
23059         constructor and to vect_compile_time_alias.
23060         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23061         function.
23062         (vect_loop_versioning): Call it.
23063         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23064         when retrying.
23065         (vect_estimate_min_profitable_iters): Account for any bounds checks.
23067 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23068             Alan Hayward  <alan.hayward@arm.com>
23069             David Sherwood  <david.sherwood@arm.com>
23071         * doc/sourcebuild.texi (vect_scatter_store): Document.
23072         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23073         optabs.
23074         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23075         Document.
23076         * genopinit.c (main): Add supports_vec_scatter_store and
23077         supports_vec_scatter_store_cached to target_optabs.
23078         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23079         IFN_MASK_SCATTER_STORE.
23080         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23081         functions.
23082         * internal-fn.h (internal_store_fn_p): Declare.
23083         (internal_fn_stored_value_index): Likewise.
23084         * internal-fn.c (scatter_store_direct): New macro.
23085         (expand_scatter_store_optab_fn): New function.
23086         (direct_scatter_store_optab_supported_p): New macro.
23087         (internal_store_fn_p): New function.
23088         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23089         IFN_MASK_SCATTER_STORE.
23090         (internal_fn_mask_index): Likewise.
23091         (internal_fn_stored_value_index): New function.
23092         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23093         for scatter stores.
23094         * optabs-query.h (supports_vec_scatter_store_p): Declare.
23095         * optabs-query.c (supports_vec_scatter_store_p): New function.
23096         * tree-vectorizer.h (vect_get_store_rhs): Declare.
23097         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23098         true for scatter stores.
23099         (vect_gather_scatter_fn_p): Handle scatter stores too.
23100         (vect_check_gather_scatter): Consider using scatter stores if
23101         supports_vec_scatter_store_p.
23102         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23103         scatter stores too.
23104         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23105         internal_fn_stored_value_index.
23106         (check_load_store_masking): Handle scatter stores too.
23107         (vect_get_store_rhs): Make public.
23108         (vectorizable_call): Use internal_store_fn_p.
23109         (vectorizable_store): Handle scatter store internal functions.
23110         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23111         when deciding whether the end of the group has been reached.
23112         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23113         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23114         (mask_scatter_store<mode>): New insns.
23116 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23117             Alan Hayward  <alan.hayward@arm.com>
23118             David Sherwood  <david.sherwood@arm.com>
23120         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23121         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23122         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23123         function.
23124         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23125         Use vect_truncate_gather_scatter_offset if we can't treat the
23126         operation as a normal gather load or scatter store.
23127         (get_group_load_store_type): Take the gather_scatter_info
23128         as argument.  Try using a gather load or scatter store for
23129         single-element groups.
23130         (get_load_store_type): Update calls to get_group_load_store_type
23131         and vect_use_strided_gather_scatters_p.
23133 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23134             Alan Hayward  <alan.hayward@arm.com>
23135             David Sherwood  <david.sherwood@arm.com>
23137         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23138         optional tree argument.
23139         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23140         null target hooks.
23141         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23142         but continue to use the current value as a fallback.
23143         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23144         to compare the updates.
23145         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23146         (get_load_store_type): Use it when handling a strided access.
23147         (vect_get_strided_load_store_ops): New function.
23148         (vect_get_data_ptr_increment): Likewise.
23149         (vectorizable_load): Handle strided gather loads.  Always pass
23150         a step to vect_create_data_ref_ptr and bump_vector_ptr.
23152 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23153             Alan Hayward  <alan.hayward@arm.com>
23154             David Sherwood  <david.sherwood@arm.com>
23156         * doc/md.texi (gather_load@var{m}): Document.
23157         (mask_gather_load@var{m}): Likewise.
23158         * genopinit.c (main): Add supports_vec_gather_load and
23159         supports_vec_gather_load_cached to target_optabs.
23160         * optabs-tree.c (init_tree_optimization_optabs): Use
23161         ggc_cleared_alloc to allocate target_optabs.
23162         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
23163         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
23164         functions.
23165         * internal-fn.h (internal_load_fn_p): Declare.
23166         (internal_gather_scatter_fn_p): Likewise.
23167         (internal_fn_mask_index): Likewise.
23168         (internal_gather_scatter_fn_supported_p): Likewise.
23169         * internal-fn.c (gather_load_direct): New macro.
23170         (expand_gather_load_optab_fn): New function.
23171         (direct_gather_load_optab_supported_p): New macro.
23172         (direct_internal_fn_optab): New function.
23173         (internal_load_fn_p): Likewise.
23174         (internal_gather_scatter_fn_p): Likewise.
23175         (internal_fn_mask_index): Likewise.
23176         (internal_gather_scatter_fn_supported_p): Likewise.
23177         * optabs-query.c (supports_at_least_one_mode_p): New function.
23178         (supports_vec_gather_load_p): Likewise.
23179         * optabs-query.h (supports_vec_gather_load_p): Declare.
23180         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
23181         and memory_type field.
23182         (NUM_PATTERNS): Bump to 15.
23183         * tree-vect-data-refs.c: Include internal-fn.h.
23184         (vect_gather_scatter_fn_p): New function.
23185         (vect_describe_gather_scatter_call): Likewise.
23186         (vect_check_gather_scatter): Try using internal functions for
23187         gather loads.  Recognize existing calls to a gather load function.
23188         (vect_analyze_data_refs): Consider using gather loads if
23189         supports_vec_gather_load_p.
23190         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
23191         (vect_get_gather_scatter_offset_type): Likewise.
23192         (vect_convert_mask_for_vectype): Likewise.
23193         (vect_add_conversion_to_patterm): Likewise.
23194         (vect_try_gather_scatter_pattern): Likewise.
23195         (vect_recog_gather_scatter_pattern): New pattern recognizer.
23196         (vect_vect_recog_func_ptrs): Add it.
23197         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23198         internal_fn_mask_index and internal_gather_scatter_fn_p.
23199         (check_load_store_masking): Take the gather_scatter_info as an
23200         argument and handle gather loads.
23201         (vect_get_gather_scatter_ops): New function.
23202         (vectorizable_call): Check internal_load_fn_p.
23203         (vectorizable_load): Likewise.  Handle gather load internal
23204         functions.
23205         (vectorizable_store): Update call to check_load_store_masking.
23206         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
23207         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
23208         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
23209         (aarch64_gather_scale_operand_d): New predicates.
23210         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
23211         (mask_gather_load<mode>): New insns.
23213 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23214             Alan Hayward  <alan.hayward@arm.com>
23215             David Sherwood  <david.sherwood@arm.com>
23217         * optabs.def (fold_left_plus_optab): New optab.
23218         * doc/md.texi (fold_left_plus_@var{m}): Document.
23219         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
23220         * internal-fn.c (fold_left_direct): Define.
23221         (expand_fold_left_optab_fn): Likewise.
23222         (direct_fold_left_optab_supported_p): Likewise.
23223         * fold-const-call.c (fold_const_fold_left): New function.
23224         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
23225         * tree-parloops.c (valid_reduction_p): New function.
23226         (gather_scalar_reductions): Use it.
23227         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
23228         (vect_finish_replace_stmt): Declare.
23229         * tree-vect-loop.c (fold_left_reduction_fn): New function.
23230         (needs_fold_left_reduction_p): New function, split out from...
23231         (vect_is_simple_reduction): ...here.  Accept reductions that
23232         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
23233         (vect_force_simple_reduction): Also store the reduction type in
23234         the assignment's STMT_VINFO_REDUC_TYPE.
23235         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
23236         (merge_with_identity): New function.
23237         (vect_expand_fold_left): Likewise.
23238         (vectorize_fold_left_reduction): Likewise.
23239         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
23240         scalar phi in place for it.  Check for target support and reject
23241         cases that would reassociate the operation.  Defer the transform
23242         phase to vectorize_fold_left_reduction.
23243         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
23244         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
23245         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
23247 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23249         * tree-if-conv.c (predicate_mem_writes): Remove redundant
23250         call to ifc_temp_var.
23252 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23253             Alan Hayward  <alan.hayward@arm.com>
23254             David Sherwood  <david.sherwood@arm.com>
23256         * target.def (legitimize_address_displacement): Take the original
23257         offset as a poly_int.
23258         * targhooks.h (default_legitimize_address_displacement): Update
23259         accordingly.
23260         * targhooks.c (default_legitimize_address_displacement): Likewise.
23261         * doc/tm.texi: Regenerate.
23262         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
23263         as an argument, moving assert of ad->disp == ad->disp_term to...
23264         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
23265         Try calling targetm.legitimize_address_displacement before expanding
23266         the address rather than afterwards, and adjust for the new interface.
23267         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
23268         Match the new hook interface.  Handle SVE addresses.
23269         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
23270         new hook interface.
23272 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23274         * Makefile.in (OBJS): Add early-remat.o.
23275         * target.def (select_early_remat_modes): New hook.
23276         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
23277         * doc/tm.texi: Regenerate.
23278         * targhooks.h (default_select_early_remat_modes): Declare.
23279         * targhooks.c (default_select_early_remat_modes): New function.
23280         * timevar.def (TV_EARLY_REMAT): New timevar.
23281         * passes.def (pass_early_remat): New pass.
23282         * tree-pass.h (make_pass_early_remat): Declare.
23283         * early-remat.c: New file.
23284         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
23285         function.
23286         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
23288 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23289             Alan Hayward  <alan.hayward@arm.com>
23290             David Sherwood  <david.sherwood@arm.com>
23292         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
23293         vfm1 with a bound_epilog parameter.
23294         (vect_do_peeling): Update calls accordingly, and move the prologue
23295         call earlier in the function.  Treat the base bound_epilog as 0 for
23296         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
23297         this base when peeling for gaps.
23298         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
23299         with fully-masked loops.
23300         (vect_estimate_min_profitable_iters): Handle the single peeled
23301         iteration in that case.
23303 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23304             Alan Hayward  <alan.hayward@arm.com>
23305             David Sherwood  <david.sherwood@arm.com>
23307         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
23308         single-element interleaving even if the size is not a power of 2.
23309         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
23310         accesses for single-element interleaving if the group size is
23311         not a power of 2.
23313 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23314             Alan Hayward  <alan.hayward@arm.com>
23315             David Sherwood  <david.sherwood@arm.com>
23317         * doc/md.texi (fold_extract_last_@var{m}): Document.
23318         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
23319         * optabs.def (fold_extract_last_optab): New optab.
23320         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
23321         * internal-fn.c (fold_extract_direct): New macro.
23322         (expand_fold_extract_optab_fn): Likewise.
23323         (direct_fold_extract_optab_supported_p): Likewise.
23324         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
23325         * tree-vect-loop.c (vect_model_reduction_cost): Handle
23326         EXTRACT_LAST_REDUCTION.
23327         (get_initial_def_for_reduction): Do not create an initial vector
23328         for EXTRACT_LAST_REDUCTION reductions.
23329         (vectorizable_reduction): Leave the scalar phi in place for
23330         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
23331         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
23332         epilogue code for EXTRACT_LAST_REDUCTION and defer the
23333         transform phase to vectorizable_condition.
23334         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
23335         split out from...
23336         (vect_finish_stmt_generation): ...here.
23337         (vect_finish_replace_stmt): New function.
23338         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
23339         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
23340         pattern.
23341         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
23343 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23344             Alan Hayward  <alan.hayward@arm.com>
23345             David Sherwood  <david.sherwood@arm.com>
23347         * doc/md.texi (extract_last_@var{m}): Document.
23348         * optabs.def (extract_last_optab): New optab.
23349         * internal-fn.def (EXTRACT_LAST): New internal function.
23350         * internal-fn.c (cond_unary_direct): New macro.
23351         (expand_cond_unary_optab_fn): Likewise.
23352         (direct_cond_unary_optab_supported_p): Likewise.
23353         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
23354         loops using EXTRACT_LAST.
23355         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
23356         (extract_last_<mode>): ...this optab.
23357         (vec_extract<mode><Vel>): Update accordingly.
23359 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23360             Alan Hayward  <alan.hayward@arm.com>
23361             David Sherwood  <david.sherwood@arm.com>
23363         * target.def (empty_mask_is_expensive): New hook.
23364         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
23365         * doc/tm.texi: Regenerate.
23366         * targhooks.h (default_empty_mask_is_expensive): Declare.
23367         * targhooks.c (default_empty_mask_is_expensive): New function.
23368         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
23369         if the target says that empty masks are expensive.
23370         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
23371         New function.
23372         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
23374 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23375             Alan Hayward  <alan.hayward@arm.com>
23376             David Sherwood  <david.sherwood@arm.com>
23378         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
23379         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
23380         (vect_use_loop_mask_for_alignment_p): New function.
23381         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
23382         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
23383         niters_skip argument.  Make sure that the first niters_skip elements
23384         of the first iteration are inactive.
23385         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
23386         Update call to vect_set_loop_masks_directly.
23387         (get_misalign_in_elems): New function, split out from...
23388         (vect_gen_prolog_loop_niters): ...here.
23389         (vect_update_init_of_dr): Take a code argument that specifies whether
23390         the adjustment should be added or subtracted.
23391         (vect_update_init_of_drs): Likewise.
23392         (vect_prepare_for_masked_peels): New function.
23393         (vect_do_peeling): Skip prologue peeling if we're using a mask
23394         instead.  Update call to vect_update_inits_of_drs.
23395         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23396         mask_skip_niters.
23397         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
23398         alignment.  Do not include the number of peeled iterations in
23399         the minimum threshold in that case.
23400         (vectorizable_induction): Adjust the start value down by
23401         LOOP_VINFO_MASK_SKIP_NITERS iterations.
23402         (vect_transform_loop): Call vect_prepare_for_masked_peels.
23403         Take the number of skipped iterations into account when calculating
23404         the loop bounds.
23405         * tree-vect-stmts.c (vect_gen_while_not): New function.
23407 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23408             Alan Hayward  <alan.hayward@arm.com>
23409             David Sherwood  <david.sherwood@arm.com>
23411         * doc/sourcebuild.texi (vect_fully_masked): Document.
23412         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
23413         default value to 0.
23414         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
23415         split out from...
23416         (vect_analyze_loop_2): ...here. Don't check the vectorization
23417         factor against the number of loop iterations if the loop is
23418         fully-masked.
23420 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23421             Alan Hayward  <alan.hayward@arm.com>
23422             David Sherwood  <david.sherwood@arm.com>
23424         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
23425         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
23426         (dump_groups): Update accordingly.
23427         (iv_use::mem_type): New member variable.
23428         (address_p): New function.
23429         (record_use): Add a mem_type argument and initialize the new
23430         mem_type field.
23431         (record_group_use): Add a mem_type argument.  Use address_p.
23432         Remove obsolete null checks of base_object.  Update call to record_use.
23433         (find_interesting_uses_op): Update call to record_group_use.
23434         (find_interesting_uses_cond): Likewise.
23435         (find_interesting_uses_address): Likewise.
23436         (get_mem_type_for_internal_fn): New function.
23437         (find_address_like_use): Likewise.
23438         (find_interesting_uses_stmt): Try find_address_like_use before
23439         calling find_interesting_uses_op.
23440         (addr_offset_valid_p): Use the iv mem_type field as the type
23441         of the addressed memory.
23442         (add_autoinc_candidates): Likewise.
23443         (get_address_cost): Likewise.
23444         (split_small_address_groups_p): Use address_p.
23445         (split_address_groups): Likewise.
23446         (add_iv_candidate_for_use): Likewise.
23447         (autoinc_possible_for_pair): Likewise.
23448         (rewrite_groups): Likewise.
23449         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
23450         (determine_group_iv_cost): Update after split of USE_ADDRESS.
23451         (get_alias_ptr_type_for_ptr_address): New function.
23452         (rewrite_use_address): Rewrite address uses in calls that were
23453         identified by find_address_like_use.
23455 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23456             Alan Hayward  <alan.hayward@arm.com>
23457             David Sherwood  <david.sherwood@arm.com>
23459         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
23460         TARGET_MEM_REFs.
23461         * gimple-expr.h (is_gimple_addressable: Likewise.
23462         * gimple-expr.c (is_gimple_address): Likewise.
23463         * internal-fn.c (expand_call_mem_ref): New function.
23464         (expand_mask_load_optab_fn): Use it.
23465         (expand_mask_store_optab_fn): Likewise.
23467 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23468             Alan Hayward  <alan.hayward@arm.com>
23469             David Sherwood  <david.sherwood@arm.com>
23471         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
23472         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
23473         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
23474         (cond_umax@var{mode}): Document.
23475         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
23476         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
23477         (cond_umin_optab, cond_umax_optab): New optabs.
23478         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
23479         (COND_IOR, COND_XOR): New internal functions.
23480         * internal-fn.h (get_conditional_internal_fn): Declare.
23481         * internal-fn.c (cond_binary_direct): New macro.
23482         (expand_cond_binary_optab_fn): Likewise.
23483         (direct_cond_binary_optab_supported_p): Likewise.
23484         (get_conditional_internal_fn): New function.
23485         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
23486         Cope with reduction statements that are vectorized as calls rather
23487         than assignments.
23488         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
23489         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
23490         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
23491         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
23492         (UNSPEC_COND_EOR): New unspecs.
23493         (optab): Add mappings for them.
23494         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
23495         (sve_int_op, sve_fp_op): New int attributes.
23497 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23498             Alan Hayward  <alan.hayward@arm.com>
23499             David Sherwood  <david.sherwood@arm.com>
23501         * optabs.def (while_ult_optab): New optab.
23502         * doc/md.texi (while_ult@var{m}@var{n}): Document.
23503         * internal-fn.def (WHILE_ULT): New internal function.
23504         * internal-fn.h (direct_internal_fn_supported_p): New override
23505         that takes two types as argument.
23506         * internal-fn.c (while_direct): New macro.
23507         (expand_while_optab_fn): New function.
23508         (convert_optab_supported_p): Likewise.
23509         (direct_while_optab_supported_p): New macro.
23510         * wide-int.h (wi::udiv_ceil): New function.
23511         * tree-vectorizer.h (rgroup_masks): New structure.
23512         (vec_loop_masks): New typedef.
23513         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
23514         and fully_masked_p.
23515         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
23516         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
23517         (vect_max_vf): New function.
23518         (slpeel_make_loop_iterate_ntimes): Delete.
23519         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
23520         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
23521         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
23522         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
23523         internal-fn.h, stor-layout.h and optabs-query.h.
23524         (vect_set_loop_mask): New function.
23525         (add_preheader_seq): Likewise.
23526         (add_header_seq): Likewise.
23527         (interleave_supported_p): Likewise.
23528         (vect_maybe_permute_loop_masks): Likewise.
23529         (vect_set_loop_masks_directly): Likewise.
23530         (vect_set_loop_condition_masked): Likewise.
23531         (vect_set_loop_condition_unmasked): New function, split out from
23532         slpeel_make_loop_iterate_ntimes.
23533         (slpeel_make_loop_iterate_ntimes): Rename to..
23534         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
23535         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
23536         (vect_do_peeling): Update call accordingly.
23537         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
23538         loops.
23539         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23540         mask_compare_type, can_fully_mask_p and fully_masked_p.
23541         (release_vec_loop_masks): New function.
23542         (_loop_vec_info): Use it to free the loop masks.
23543         (can_produce_all_loop_masks_p): New function.
23544         (vect_get_max_nscalars_per_iter): Likewise.
23545         (vect_verify_full_masking): Likewise.
23546         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
23547         retries, and free the mask rgroups before retrying.  Check loop-wide
23548         reasons for disallowing fully-masked loops.  Make the final decision
23549         about whether use a fully-masked loop or not.
23550         (vect_estimate_min_profitable_iters): Do not assume that peeling
23551         for the number of iterations will be needed for fully-masked loops.
23552         (vectorizable_reduction): Disable fully-masked loops.
23553         (vectorizable_live_operation): Likewise.
23554         (vect_halve_mask_nunits): New function.
23555         (vect_double_mask_nunits): Likewise.
23556         (vect_record_loop_mask): Likewise.
23557         (vect_get_loop_mask): Likewise.
23558         (vect_transform_loop): Handle the case in which the final loop
23559         iteration might handle a partial vector.  Call vect_set_loop_condition
23560         instead of slpeel_make_loop_iterate_ntimes.
23561         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
23562         (check_load_store_masking): New function.
23563         (prepare_load_store_mask): Likewise.
23564         (vectorizable_store): Handle fully-masked loops.
23565         (vectorizable_load): Likewise.
23566         (supportable_widening_operation): Use vect_halve_mask_nunits for
23567         booleans.
23568         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
23569         (vect_gen_while): New function.
23570         * config/aarch64/aarch64.md (umax<mode>3): New expander.
23571         (aarch64_uqdec<mode>): New insn.
23573 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23574             Alan Hayward  <alan.hayward@arm.com>
23575             David Sherwood  <david.sherwood@arm.com>
23577         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
23578         (reduc_xor_scal_optab): New optabs.
23579         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
23580         (reduc_xor_scal_@var{m}): Document.
23581         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
23582         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
23583         internal functions.
23584         * fold-const-call.c (fold_const_call): Handle them.
23585         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
23586         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
23587         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
23588         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
23589         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
23590         (UNSPEC_XORV): New unspecs.
23591         (optab): Add entries for them.
23592         (BITWISEV): New int iterator.
23593         (bit_reduc_op): New int attributes.
23595 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23596             Alan Hayward  <alan.hayward@arm.com>
23597             David Sherwood  <david.sherwood@arm.com>
23599         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
23600         * internal-fn.def (VEC_SHL_INSERT): New internal function.
23601         * optabs.def (vec_shl_insert_optab): New optab.
23602         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
23603         (duplicate_and_interleave): Likewise.
23604         * tree-vect-loop.c: Include internal-fn.h.
23605         (neutral_op_for_slp_reduction): New function, split out from
23606         get_initial_defs_for_reduction.
23607         (get_initial_def_for_reduction): Handle option 2 for variable-length
23608         vectors by loading the neutral value into a vector and then shifting
23609         the initial value into element 0.
23610         (get_initial_defs_for_reduction): Replace the code argument with
23611         the neutral value calculated by neutral_op_for_slp_reduction.
23612         Use gimple_build_vector for constant-length vectors.
23613         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
23614         but the first group_size elements have a neutral value.
23615         Use duplicate_and_interleave otherwise.
23616         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
23617         Update call to get_initial_defs_for_reduction.  Handle SLP
23618         reductions for variable-length vectors by creating one vector
23619         result for each scalar result, with the elements associated
23620         with other scalar results stubbed out with the neutral value.
23621         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
23622         Require IFN_VEC_SHL_INSERT for double reductions on
23623         variable-length vectors, or SLP reductions that have
23624         a neutral value.  Require can_duplicate_and_interleave_p
23625         support for variable-length unchained SLP reductions if there
23626         is no neutral value, such as for MIN/MAX reductions.  Also require
23627         the number of vector elements to be a multiple of the number of
23628         SLP statements when doing variable-length unchained SLP reductions.
23629         Update call to vect_create_epilog_for_reduction.
23630         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
23631         and remove initial values.
23632         (duplicate_and_interleave): Make public.
23633         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
23634         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
23636 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23637             Alan Hayward  <alan.hayward@arm.com>
23638             David Sherwood  <david.sherwood@arm.com>
23640         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
23641         (can_duplicate_and_interleave_p): New function.
23642         (vect_get_and_check_slp_defs): Take the vector of statements
23643         rather than just the current one.  Remove excess parentheses.
23644         Restriction rejectinon of vect_constant_def and vect_external_def
23645         for variable-length vectors to boolean types, or types for which
23646         can_duplicate_and_interleave_p is false.
23647         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
23648         (duplicate_and_interleave): New function.
23649         (vect_get_constant_vectors): Use gimple_build_vector for
23650         constant-length vectors and suitable variable-length constant
23651         vectors.  Use duplicate_and_interleave for other variable-length
23652         vectors.  Don't defer the update when inserting new statements.
23654 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23655             Alan Hayward  <alan.hayward@arm.com>
23656             David Sherwood  <david.sherwood@arm.com>
23658         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
23659         min_profitable_iters doesn't go negative.
23661 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23662             Alan Hayward  <alan.hayward@arm.com>
23663             David Sherwood  <david.sherwood@arm.com>
23665         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
23666         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
23667         * optabs.def (vec_mask_load_lanes_optab): New optab.
23668         (vec_mask_store_lanes_optab): Likewise.
23669         * internal-fn.def (MASK_LOAD_LANES): New internal function.
23670         (MASK_STORE_LANES): Likewise.
23671         * internal-fn.c (mask_load_lanes_direct): New macro.
23672         (mask_store_lanes_direct): Likewise.
23673         (expand_mask_load_optab_fn): Handle masked operations.
23674         (expand_mask_load_lanes_optab_fn): New macro.
23675         (expand_mask_store_optab_fn): Handle masked operations.
23676         (expand_mask_store_lanes_optab_fn): New macro.
23677         (direct_mask_load_lanes_optab_supported_p): Likewise.
23678         (direct_mask_store_lanes_optab_supported_p): Likewise.
23679         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
23680         parameter.
23681         (vect_load_lanes_supported): Likewise.
23682         * tree-vect-data-refs.c (strip_conversion): New function.
23683         (can_group_stmts_p): Likewise.
23684         (vect_analyze_data_ref_accesses): Use it instead of checking
23685         for a pair of assignments.
23686         (vect_store_lanes_supported): Take a masked_p parameter.
23687         (vect_load_lanes_supported): Likewise.
23688         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
23689         vect_store_lanes_supported and vect_load_lanes_supported.
23690         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
23691         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
23692         parameter.  Don't allow gaps for masked accesses.
23693         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
23694         and vect_load_lanes_supported.
23695         (get_load_store_type): Take a masked_p parameter and update
23696         call to get_group_load_store_type.
23697         (vectorizable_store): Update call to get_load_store_type.
23698         Handle IFN_MASK_STORE_LANES.
23699         (vectorizable_load): Update call to get_load_store_type.
23700         Handle IFN_MASK_LOAD_LANES.
23702 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23703             Alan Hayward  <alan.hayward@arm.com>
23704             David Sherwood  <david.sherwood@arm.com>
23706         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
23707         modes for SVE.
23708         * config/aarch64/aarch64-protos.h
23709         (aarch64_sve_struct_memory_operand_p): Declare.
23710         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
23711         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
23712         (VPRED, vpred): Handle SVE structure modes.
23713         * config/aarch64/constraints.md (Utx): New constraint.
23714         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
23715         (aarch64_sve_struct_nonimmediate_operand): New predicates.
23716         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
23717         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
23718         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
23719         structure modes.  Split into pieces after RA.
23720         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
23721         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
23722         New patterns.
23723         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
23724         SVE structure modes.
23725         (aarch64_classify_address): Likewise.
23726         (sizetochar): Move earlier in file.
23727         (aarch64_print_operand): Handle SVE register lists.
23728         (aarch64_array_mode): New function.
23729         (aarch64_sve_struct_memory_operand_p): Likewise.
23730         (TARGET_ARRAY_MODE): Redefine.
23732 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23733             Alan Hayward  <alan.hayward@arm.com>
23734             David Sherwood  <david.sherwood@arm.com>
23736         * target.def (array_mode): New target hook.
23737         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
23738         * doc/tm.texi: Regenerate.
23739         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
23740         * hooks.c (hook_optmode_mode_uhwi_none): New function.
23741         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
23742         targetm.array_mode.
23743         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
23744         type sizes.
23746 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23747             Alan Hayward  <alan.hayward@arm.com>
23748             David Sherwood  <david.sherwood@arm.com>
23750         * fold-const.c (fold_binary_loc): Check the argument types
23751         rather than the result type when testing for a vector operation.
23753 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23755         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
23756         * doc/tm.texi: Regenerate.
23758 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
23759             Alan Hayward  <alan.hayward@arm.com>
23760             David Sherwood  <david.sherwood@arm.com>
23762         * doc/invoke.texi (-msve-vector-bits=): Document new option.
23763         (sve): Document new AArch64 extension.
23764         * doc/md.texi (w): Extend the description of the AArch64
23765         constraint to include SVE vectors.
23766         (Upl, Upa): Document new AArch64 predicate constraints.
23767         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
23768         enum.
23769         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
23770         (msve-vector-bits=): New option.
23771         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
23772         SVE when these are disabled.
23773         (sve): New extension.
23774         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
23775         modes.  Adjust their number of units based on aarch64_sve_vg.
23776         (MAX_BITSIZE_MODE_ANY_MODE): Define.
23777         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
23778         aarch64_addr_query_type.
23779         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
23780         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
23781         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
23782         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
23783         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
23784         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
23785         (aarch64_simd_imm_zero_p): Delete.
23786         (aarch64_check_zero_based_sve_index_immediate): Declare.
23787         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23788         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23789         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23790         (aarch64_sve_float_mul_immediate_p): Likewise.
23791         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23792         rather than an rtx.
23793         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
23794         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
23795         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
23796         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
23797         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
23798         (aarch64_regmode_natural_size): Likewise.
23799         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
23800         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
23801         left one place.
23802         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
23803         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
23804         for VG and the SVE predicate registers.
23805         (V_ALIASES): Add a "z"-prefixed alias.
23806         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
23807         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
23808         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
23809         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
23810         (REG_CLASS_NAMES): Add entries for them.
23811         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
23812         and the predicate registers.
23813         (aarch64_sve_vg): Declare.
23814         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
23815         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
23816         (REGMODE_NATURAL_SIZE): Define.
23817         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
23818         SVE macros.
23819         * config/aarch64/aarch64.c: Include cfgrtl.h.
23820         (simd_immediate_info): Add a constructor for series vectors,
23821         and an associated step field.
23822         (aarch64_sve_vg): New variable.
23823         (aarch64_dbx_register_number): Handle VG and the predicate registers.
23824         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
23825         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
23826         (VEC_ANY_DATA, VEC_STRUCT): New constants.
23827         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
23828         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
23829         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
23830         (aarch64_get_mask_mode): New functions.
23831         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
23832         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
23833         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
23834         predicate modes and predicate registers.  Explicitly restrict
23835         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
23836         to store a vector mode if it is recognized by
23837         aarch64_classify_vector_mode.
23838         (aarch64_regmode_natural_size): New function.
23839         (aarch64_hard_regno_caller_save_mode): Return the original mode
23840         for predicates.
23841         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
23842         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
23843         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
23844         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
23845         functions.
23846         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
23847         does not overlap dest if the function is frame-related.  Handle
23848         SVE constants.
23849         (aarch64_split_add_offset): New function.
23850         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
23851         them aarch64_add_offset.
23852         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
23853         and update call to aarch64_sub_sp.
23854         (aarch64_add_cfa_expression): New function.
23855         (aarch64_expand_prologue): Pass extra temporary registers to the
23856         functions above.  Handle the case in which we need to emit new
23857         DW_CFA_expressions for registers that were originally saved
23858         relative to the stack pointer, but now have to be expressed
23859         relative to the frame pointer.
23860         (aarch64_output_mi_thunk): Pass extra temporary registers to the
23861         functions above.
23862         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
23863         IP0 and IP1 values for SVE frames.
23864         (aarch64_expand_vec_series): New function.
23865         (aarch64_expand_sve_widened_duplicate): Likewise.
23866         (aarch64_expand_sve_const_vector): Likewise.
23867         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
23868         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
23869         into the register, rather than emitting a SET directly.
23870         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
23871         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
23872         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
23873         (offset_9bit_signed_scaled_p): New functions.
23874         (aarch64_replicate_bitmask_imm): New function.
23875         (aarch64_bitmask_imm): Use it.
23876         (aarch64_cannot_force_const_mem): Reject expressions involving
23877         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
23878         (aarch64_classify_index): Handle SVE indices, by requiring
23879         a plain register index with a scale that matches the element size.
23880         (aarch64_classify_address): Handle SVE addresses.  Assert that
23881         the mode of the address is VOIDmode or an integer mode.
23882         Update call to aarch64_classify_symbol.
23883         (aarch64_classify_symbolic_expression): Update call to
23884         aarch64_classify_symbol.
23885         (aarch64_const_vec_all_in_range_p): New function.
23886         (aarch64_print_vector_float_operand): Likewise.
23887         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
23888         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
23889         and the FP immediates 1.0 and 0.5.
23890         (aarch64_print_address_internal): Handle SVE addresses.
23891         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
23892         (aarch64_regno_regclass): Handle predicate registers.
23893         (aarch64_secondary_reload): Handle big-endian reloads of SVE
23894         data modes.
23895         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
23896         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
23897         (aarch64_convert_sve_vector_bits): New function.
23898         (aarch64_override_options): Use it to handle -msve-vector-bits=.
23899         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
23900         rather than an rtx.
23901         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
23902         Handle SVE vector and predicate modes.  Accept VL-based constants
23903         that need only one temporary register, and VL offsets that require
23904         no temporary registers.
23905         (aarch64_conditional_register_usage): Mark the predicate registers
23906         as fixed if SVE isn't available.
23907         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
23908         Return true for SVE vector and predicate modes.
23909         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
23910         rather than an unsigned int.  Handle SVE modes.
23911         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
23912         SVE modes.
23913         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
23914         if SVE is enabled.
23915         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
23916         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
23917         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
23918         (aarch64_sve_float_mul_immediate_p): New functions.
23919         (aarch64_sve_valid_immediate): New function.
23920         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
23921         Explicitly reject structure modes.  Check for INDEX constants.
23922         Handle PTRUE and PFALSE constants.
23923         (aarch64_check_zero_based_sve_index_immediate): New function.
23924         (aarch64_simd_imm_zero_p): Delete.
23925         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
23926         vector modes.  Accept constants in the range of CNT[BHWD].
23927         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
23928         ask for an Advanced SIMD mode.
23929         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
23930         (aarch64_simd_vector_alignment): Handle SVE predicates.
23931         (aarch64_vectorize_preferred_vector_alignment): New function.
23932         (aarch64_simd_vector_alignment_reachable): Use it instead of
23933         the vector size.
23934         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
23935         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
23936         functions.
23937         (MAX_VECT_LEN): Delete.
23938         (expand_vec_perm_d): Add a vec_flags field.
23939         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
23940         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
23941         (aarch64_evpc_ext): Don't apply a big-endian lane correction
23942         for SVE modes.
23943         (aarch64_evpc_rev): Rename to...
23944         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
23945         (aarch64_evpc_rev_global): New function.
23946         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
23947         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
23948         MAX_VECT_LEN.
23949         (aarch64_evpc_sve_tbl): New function.
23950         (aarch64_expand_vec_perm_const_1): Update after rename of
23951         aarch64_evpc_rev.  Handle SVE permutes too, trying
23952         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
23953         than aarch64_evpc_tbl.
23954         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
23955         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
23956         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
23957         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
23958         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
23959         (aarch64_expand_sve_vcond): New functions.
23960         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
23961         of aarch64_vector_mode_p.
23962         (aarch64_dwarf_poly_indeterminate_value): New function.
23963         (aarch64_compute_pressure_classes): Likewise.
23964         (aarch64_can_change_mode_class): Likewise.
23965         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
23966         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
23967         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
23968         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
23969         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
23970         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
23971         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
23972         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
23973         constraints.
23974         (Dn, Dl, Dr): Accept const as well as const_vector.
23975         (Dz): Likewise.  Compare against CONST0_RTX.
23976         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
23977         of "vector" where appropriate.
23978         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
23979         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
23980         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
23981         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
23982         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
23983         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
23984         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
23985         (v_int_equiv): Extend to SVE modes.
23986         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
23987         mode attributes.
23988         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
23989         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
23990         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
23991         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
23992         (SVE_COND_FP_CMP): New int iterators.
23993         (perm_hilo): Handle the new unpack unspecs.
23994         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
23995         attributes.
23996         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
23997         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
23998         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
23999         (aarch64_equality_operator, aarch64_constant_vector_operand)
24000         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24001         (aarch64_sve_nonimmediate_operand): Likewise.
24002         (aarch64_sve_general_operand): Likewise.
24003         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24004         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24005         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24006         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24007         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24008         (aarch64_sve_float_arith_immediate): Likewise.
24009         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24010         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24011         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24012         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24013         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24014         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24015         (aarch64_sve_float_arith_operand): Likewise.
24016         (aarch64_sve_float_arith_with_sub_operand): Likewise.
24017         (aarch64_sve_float_mul_operand): Likewise.
24018         (aarch64_sve_vec_perm_operand): Likewise.
24019         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24020         (aarch64_mov_operand): Accept const_poly_int and const_vector.
24021         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24022         as well as const_vector.
24023         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24024         in file.  Use CONST0_RTX and CONSTM1_RTX.
24025         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
24026         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24027         Use aarch64_simd_imm_zero.
24028         * config/aarch64/aarch64-sve.md: New file.
24029         * config/aarch64/aarch64.md: Include it.
24030         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24031         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24032         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24033         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24034         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24035         (sve): New attribute.
24036         (enabled): Disable instructions with the sve attribute unless
24037         TARGET_SVE.
24038         (movqi, movhi): Pass CONST_POLY_INT operaneds through
24039         aarch64_expand_mov_immediate.
24040         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24041         CNT[BHSD] immediates.
24042         (movti): Split CONST_POLY_INT moves into two halves.
24043         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24044         Split additions that need a temporary here if the destination
24045         is the stack pointer.
24046         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24047         (*add<mode>3_poly_1): New instruction.
24048         (set_clobber_cc): New expander.
24050 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24052         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24053         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
24054         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24055         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24056         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
24057         Change innermode from fixed_mode_size to machine_mode.
24058         (simplify_subreg): Update call accordingly.  Handle a constant-sized
24059         subreg of a variable-length CONST_VECTOR.
24061 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24062             Alan Hayward  <alan.hayward@arm.com>
24063             David Sherwood  <david.sherwood@arm.com>
24065         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24066         (add_offset_to_base): New function, split out from...
24067         (create_mem_ref): ...here.  When handling a scale other than 1,
24068         check first whether the address is valid without the offset.
24069         Add it into the base if so, leaving the index and scale as-is.
24071 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24073         PR c++/83778
24074         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24075         fold_for_warn before checking if arg2 is INTEGER_CST.
24077 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
24079         * config/rs6000/predicates.md (load_multiple_operation): Delete.
24080         (store_multiple_operation): Delete.
24081         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24082         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24083         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24084         guarded by TARGET_STRING.
24085         (rs6000_output_load_multiple): Delete.
24086         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24087         OPTION_MASK_STRING / TARGET_STRING handling.
24088         (print_operand) <'N', 'O'>: Add comment that these are unused now.
24089         (const rs6000_opt_masks) <"string">: Change mask to 0.
24090         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24091         (MASK_STRING): Delete.
24092         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24093         parts.  Simplify.
24094         (load_multiple): Delete.
24095         (*ldmsi8): Delete.
24096         (*ldmsi7): Delete.
24097         (*ldmsi6): Delete.
24098         (*ldmsi5): Delete.
24099         (*ldmsi4): Delete.
24100         (*ldmsi3): Delete.
24101         (store_multiple): Delete.
24102         (*stmsi8): Delete.
24103         (*stmsi7): Delete.
24104         (*stmsi6): Delete.
24105         (*stmsi5): Delete.
24106         (*stmsi4): Delete.
24107         (*stmsi3): Delete.
24108         (movmemsi_8reg): Delete.
24109         (corresponding unnamed define_insn): Delete.
24110         (movmemsi_6reg): Delete.
24111         (corresponding unnamed define_insn): Delete.
24112         (movmemsi_4reg): Delete.
24113         (corresponding unnamed define_insn): Delete.
24114         (movmemsi_2reg): Delete.
24115         (corresponding unnamed define_insn): Delete.
24116         (movmemsi_1reg): Delete.
24117         (corresponding unnamed define_insn): Delete.
24118         * config/rs6000/rs6000.opt (mno-string): New.
24119         (mstring): Replace by deprecation warning stub.
24120         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24122 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
24124         * regrename.c (regrename_do_replace): If replacing the same
24125         reg multiple times, try to reuse last created gen_raw_REG.
24127         PR debug/81155
24128         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24129         main to workaround a bug in GDB.
24131 2018-01-12  Tom de Vries  <tom@codesourcery.com>
24133         PR target/83737
24134         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24136 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
24138         PR rtl-optimization/80481
24139         * ira-color.c (get_cap_member): New function.
24140         (allocnos_conflict_by_live_ranges_p): Use it.
24141         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24142         (setup_slot_coalesced_allocno_live_ranges): Ditto.
24144 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
24146         PR target/83628
24147         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24148         (*saddl_se_1): Ditto.
24149         (*ssubsi_1): Ditto.
24150         (*ssubl_se_1): Ditto.
24152 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24154         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
24155         rather than wi::to_widest for DR_INITs.
24156         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
24157         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
24158         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
24159         INTEGER_CSTs.
24160         (vect_analyze_group_access_1): Note that here.
24162 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24164         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
24165         polynomial type sizes.
24167 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
24169         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
24170         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
24171         (gimple_add_tmp_var): Likewise.
24173 2018-01-12  Martin Liska  <mliska@suse.cz>
24175         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
24176         (gimple_alloc_sizes): Likewise.
24177         (dump_gimple_statistics): Use PRIu64 in printf format.
24178         * gimple.h: Change uint64_t to int.
24180 2018-01-12  Martin Liska  <mliska@suse.cz>
24182         * tree-core.h: Use uint64_t instead of int.
24183         * tree.c (tree_node_counts): Likewise.
24184         (tree_node_sizes): Likewise.
24185         (dump_tree_statistics): Use PRIu64 in printf format.
24187 2018-01-12  Martin Liska  <mliska@suse.cz>
24189         * Makefile.in: As qsort_chk is implemented in vec.c, add
24190         vec.o to linkage of gencfn-macros.
24191         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
24192         passing the info to record_node_allocation_statistics.
24193         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
24194         and pass the info.
24195         * ggc-common.c (struct ggc_usage): Add operator== and use
24196         it in operator< and compare function.
24197         * mem-stats.h (struct mem_usage): Likewise.
24198         * vec.c (struct vec_usage): Remove operator< and compare
24199         function. Can be simply inherited.
24201 2018-01-12  Martin Jambor  <mjambor@suse.cz>
24203         PR target/81616
24204         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
24205         * tree-ssa-math-opts.c: Include domwalk.h.
24206         (convert_mult_to_fma_1): New function.
24207         (fma_transformation_info): New type.
24208         (fma_deferring_state): Likewise.
24209         (cancel_fma_deferring): New function.
24210         (result_of_phi): Likewise.
24211         (last_fma_candidate_feeds_initial_phi): Likewise.
24212         (convert_mult_to_fma): Added deferring logic, split actual
24213         transformation to convert_mult_to_fma_1.
24214         (math_opts_dom_walker): New type.
24215         (math_opts_dom_walker::after_dom_children): New method, body moved
24216         here from pass_optimize_widening_mul::execute, added deferring logic
24217         bits.
24218         (pass_optimize_widening_mul::execute): Moved most of code to
24219         math_opts_dom_walker::after_dom_children.
24220         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
24221         * config/i386/i386.c (ix86_option_override_internal): Added
24222         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
24224 2018-01-12  Richard Biener  <rguenther@suse.de>
24226         PR debug/83157
24227         * dwarf2out.c (gen_variable_die): Do not reset old_die for
24228         inline instance vars.
24230 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
24232         PR target/81819
24233         * config/rx/rx.c (rx_is_restricted_memory_address):
24234         Handle SUBREG case.
24236 2018-01-12  Richard Biener  <rguenther@suse.de>
24238         PR tree-optimization/80846
24239         * target.def (split_reduction): New target hook.
24240         * targhooks.c (default_split_reduction): New function.
24241         * targhooks.h (default_split_reduction): Declare.
24242         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
24243         target requests first reduce vectors by combining low and high
24244         parts.
24245         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
24246         (get_vectype_for_scalar_type_and_size): Export.
24247         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
24248         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
24249         * doc/tm.texi: Regenerate.
24250         * config/i386/i386.c (ix86_split_reduction): Implement
24251         TARGET_VECTORIZE_SPLIT_REDUCTION.
24253 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
24255         PR target/83368
24256         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
24257         in PIC mode except for TARGET_VXWORKS_RTP.
24258         * config/sparc/sparc.c: Include cfgrtl.h.
24259         (TARGET_INIT_PIC_REG): Define.
24260         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
24261         (sparc_pic_register_p): New predicate.
24262         (sparc_legitimate_address_p): Use it.
24263         (sparc_legitimize_pic_address): Likewise.
24264         (sparc_delegitimize_address): Likewise.
24265         (sparc_mode_dependent_address_p): Likewise.
24266         (gen_load_pcrel_sym): Remove 4th parameter.
24267         (load_got_register): Adjust call to above.  Remove obsolete stuff.
24268         (sparc_expand_prologue): Do not call load_got_register here.
24269         (sparc_flat_expand_prologue): Likewise.
24270         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
24271         (sparc_use_pseudo_pic_reg): New function.
24272         (sparc_init_pic_reg): Likewise.
24273         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24274         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
24276 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
24278         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
24279         Add item for branch_cost.
24281 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
24283         PR rtl-optimization/83565
24284         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
24285         not extend the result to a larger mode for rotate operations.
24286         (num_sign_bit_copies1): Likewise.
24288 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24290         PR target/40411
24291         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
24292         -symbolic.
24293         Use values-Xc.o for -pedantic.
24294         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
24296 2018-01-12  Martin Liska  <mliska@suse.cz>
24298         PR ipa/83054
24299         * ipa-devirt.c (final_warning_record::grow_type_warnings):
24300         New function.
24301         (possible_polymorphic_call_targets): Use it.
24302         (ipa_devirt): Likewise.
24304 2018-01-12  Martin Liska  <mliska@suse.cz>
24306         * profile-count.h (enum profile_quality): Use 0 as invalid
24307         enum value of profile_quality.
24309 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
24311         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
24312         -mext-string options.
24314 2018-01-12  Richard Biener  <rguenther@suse.de>
24316         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
24317         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
24318         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
24319         Likewise.
24320         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
24322 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
24324         * configure.ac (--with-long-double-format): Add support for the
24325         configuration option to change the default long double format on
24326         PowerPC systems.
24327         * config.gcc (powerpc*-linux*-*): Likewise.
24328         * configure: Regenerate.
24329         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
24330         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
24331         used without modification.
24333 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24335         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
24336         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
24337         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
24338         MISC_BUILTIN_SPEC_BARRIER.
24339         (rs6000_init_builtins): Likewise.
24340         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
24341         enum value.
24342         (speculation_barrier): New define_insn.
24343         * doc/extend.texi: Document __builtin_speculation_barrier.
24345 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
24347         PR target/83203
24348         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
24349         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
24350         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
24351         iterators.
24352         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
24353         integral modes instead of "ss" and "sd".
24354         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
24355         vectors with 32-bit and 64-bit elements.
24356         (vecdupssescalarmodesuffix): New mode attribute.
24357         (vec_dup<mode>): Use it.
24359 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
24361         PR target/83330
24362         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
24363         frame if argument is passed on stack.
24365 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
24367         PR target/82682
24368         * ree.c (combine_reaching_defs): Optimize also
24369         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
24370         reg2=any_extend(exp); reg1=reg2;, formatting fix.
24372 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
24374         PR middle-end/83189
24375         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
24377 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
24379         PR middle-end/83718
24380         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
24381         after they are computed.
24383 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
24385         PR tree-optimization/83695
24386         * gimple-loop-linterchange.cc
24387         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
24388         reset cached scev information after interchange.
24389         (pass_linterchange::execute): Remove call to scev_reset_htab.
24391 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24393         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
24394         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
24395         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
24396         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
24397         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
24398         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
24399         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
24400         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
24401         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
24402         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
24403         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
24404         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
24405         (V_lane_reg): Likewise.
24406         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
24407         New define_expand.
24408         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
24409         (vfmal_lane_low<mode>_intrinsic,
24410         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
24411         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
24412         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
24413         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
24414         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
24415         vfmsl_lane_high<mode>_intrinsic): New define_insns.
24417 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24419         * config/arm/arm-cpus.in (fp16fml): New feature.
24420         (ALL_SIMD): Add fp16fml.
24421         (armv8.2-a): Add fp16fml as an option.
24422         (armv8.3-a): Likewise.
24423         (armv8.4-a): Add fp16fml as part of fp16.
24424         * config/arm/arm.h (TARGET_FP16FML): Define.
24425         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
24426         when appropriate.
24427         * config/arm/arm-modes.def (V2HF): Define.
24428         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
24429         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
24430         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
24431         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
24432         vfmsl_low, vfmsl_high): New set of builtins.
24433         * config/arm/iterators.md (PLUSMINUS): New code iterator.
24434         (vfml_op): New code attribute.
24435         (VFMLHALVES): New int iterator.
24436         (VFML, VFMLSEL): New mode attributes.
24437         (V_reg): Define mapping for V2HF.
24438         (V_hi, V_lo): New mode attributes.
24439         (VF_constraint): Likewise.
24440         (vfml_half, vfml_half_selector): New int attributes.
24441         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
24442         define_expand.
24443         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
24444         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
24445         New define_insn.
24446         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
24447         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
24448         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
24449         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
24450         documentation.
24451         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
24452         Document new effective target and option set.
24454 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24456         * config/arm/arm-cpus.in (armv8_4): New feature.
24457         (ARMv8_4a): New fgroup.
24458         (armv8.4-a): New arch.
24459         * config/arm/arm-tables.opt: Regenerate.
24460         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
24461         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
24462         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
24463         Add matching rules for -march=armv8.4-a and extensions.
24464         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
24466 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
24468         PR target/81821
24469         * config/rx/rx.md (BW): New mode attribute.
24470         (sync_lock_test_and_setsi): Add mode suffix to insn output.
24472 2018-01-11  Richard Biener  <rguenther@suse.de>
24474         PR tree-optimization/83435
24475         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
24476         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
24477         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
24479 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24480             Alan Hayward  <alan.hayward@arm.com>
24481             David Sherwood  <david.sherwood@arm.com>
24483         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
24484         field.
24485         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
24486         (aarch64_print_address_internal): Use it to check for a zero offset.
24488 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24489             Alan Hayward  <alan.hayward@arm.com>
24490             David Sherwood  <david.sherwood@arm.com>
24492         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
24493         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
24494         Return a poly_int64 rather than a HOST_WIDE_INT.
24495         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
24496         rather than a HOST_WIDE_INT.
24497         * config/aarch64/aarch64.h (aarch64_frame): Protect with
24498         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
24499         hard_fp_offset, frame_size, initial_adjust, callee_offset and
24500         final_offset from HOST_WIDE_INT to poly_int64.
24501         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
24502         to_constant when getting the number of units in an Advanced SIMD
24503         mode.
24504         (aarch64_builtin_vectorized_function): Check for a constant number
24505         of units.
24506         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
24507         GET_MODE_SIZE.
24508         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
24509         attribute instead of GET_MODE_NUNITS.
24510         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
24511         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
24512         GET_MODE_SIZE for fixed-size registers.
24513         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
24514         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
24515         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
24516         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
24517         (aarch64_print_operand, aarch64_print_address_internal)
24518         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
24519         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
24520         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
24521         Handle polynomial GET_MODE_SIZE.
24522         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
24523         wider than SImode without modification.
24524         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
24525         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
24526         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
24527         passing and returning SVE modes.
24528         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
24529         rather than GEN_INT.
24530         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
24531         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
24532         (aarch64_allocate_and_probe_stack_space): Likewise.
24533         (aarch64_layout_frame): Cope with polynomial offsets.
24534         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
24535         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
24536         polynomial offsets.
24537         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
24538         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
24539         poly_int64 rather than a HOST_WIDE_INT.
24540         (aarch64_get_separate_components, aarch64_process_components)
24541         (aarch64_expand_prologue, aarch64_expand_epilogue)
24542         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
24543         (aarch64_anchor_offset): New function, split out from...
24544         (aarch64_legitimize_address): ...here.
24545         (aarch64_builtin_vectorization_cost): Handle polynomial
24546         TYPE_VECTOR_SUBPARTS.
24547         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
24548         GET_MODE_NUNITS.
24549         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
24550         number of elements from the PARALLEL rather than the mode.
24551         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
24552         rather than GET_MODE_BITSIZE.
24553         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
24554         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
24555         (aarch64_expand_vec_perm_const_1): Handle polynomial
24556         d->perm.length () and d->perm elements.
24557         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
24558         Apply to_constant to d->perm elements.
24559         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
24560         polynomial CONST_VECTOR_NUNITS.
24561         (aarch64_move_pointer): Take amount as a poly_int64 rather
24562         than an int.
24563         (aarch64_progress_pointer): Avoid temporary variable.
24564         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
24565         the mode attribute instead of GET_MODE.
24567 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24568             Alan Hayward  <alan.hayward@arm.com>
24569             David Sherwood  <david.sherwood@arm.com>
24571         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
24572         x exists before using it.
24573         (aarch64_add_constant_internal): Rename to...
24574         (aarch64_add_offset_1): ...this.  Replace regnum with separate
24575         src and dest rtxes.  Handle the case in which they're different,
24576         including when the offset is zero.  Replace scratchreg with an rtx.
24577         Use 2 additions if there is no spare register into which we can
24578         move a 16-bit constant.
24579         (aarch64_add_constant): Delete.
24580         (aarch64_add_offset): Replace reg with separate src and dest
24581         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
24582         Use aarch64_add_offset_1.
24583         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
24584         an rtx rather than an int.  Take the delta as a poly_int64
24585         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
24586         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
24587         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
24588         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
24589         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
24590         and aarch64_add_sp.
24591         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
24592         aarch64_add_constant.
24594 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24596         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
24597         Use scalar_float_mode.
24599 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24601         * config/aarch64/aarch64-simd.md
24602         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
24603         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
24604         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
24605         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
24606         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
24607         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
24608         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
24609         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
24610         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
24611         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
24613 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24615         PR target/83514
24616         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
24617         targ_options->x_arm_arch_string is non NULL.
24619 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
24621         * config/aarch64/aarch64.h
24622         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
24624 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
24626         PR target/82096
24627         * expmed.c (emit_store_flag_force): Swap if const op0
24628         and change VOIDmode to mode of op0.
24630 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
24632         PR rtl-optimization/83761
24633         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
24634         than bytes to mode_for_size.
24636 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
24638         PR middle-end/83189
24639         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
24640         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
24641         profile.
24643 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
24645         PR middle-end/83575
24646         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
24647         when in layout mode.
24648         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
24649         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
24650         partition fixup.
24652 2018-01-10  Michael Collison  <michael.collison@arm.com>
24654         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
24655         * config/aarch64/aarch64-option-extension.def: Add
24656         AARCH64_OPT_EXTENSION of 'fp16fml'.
24657         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24658         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
24659         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
24660         * config/aarch64/constraints.md (Ui7): New constraint.
24661         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
24662         (VFMLA_SEL_W): Ditto.
24663         (f16quad): Ditto.
24664         (f16mac1): Ditto.
24665         (VFMLA16_LOW): New int iterator.
24666         (VFMLA16_HIGH): Ditto.
24667         (UNSPEC_FMLAL): New unspec.
24668         (UNSPEC_FMLSL): Ditto.
24669         (UNSPEC_FMLAL2): Ditto.
24670         (UNSPEC_FMLSL2): Ditto.
24671         (f16mac): New code attribute.
24672         * config/aarch64/aarch64-simd-builtins.def
24673         (aarch64_fmlal_lowv2sf): Ditto.
24674         (aarch64_fmlsl_lowv2sf): Ditto.
24675         (aarch64_fmlalq_lowv4sf): Ditto.
24676         (aarch64_fmlslq_lowv4sf): Ditto.
24677         (aarch64_fmlal_highv2sf): Ditto.
24678         (aarch64_fmlsl_highv2sf): Ditto.
24679         (aarch64_fmlalq_highv4sf): Ditto.
24680         (aarch64_fmlslq_highv4sf): Ditto.
24681         (aarch64_fmlal_lane_lowv2sf): Ditto.
24682         (aarch64_fmlsl_lane_lowv2sf): Ditto.
24683         (aarch64_fmlal_laneq_lowv2sf): Ditto.
24684         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
24685         (aarch64_fmlalq_lane_lowv4sf): Ditto.
24686         (aarch64_fmlsl_lane_lowv4sf): Ditto.
24687         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
24688         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
24689         (aarch64_fmlal_lane_highv2sf): Ditto.
24690         (aarch64_fmlsl_lane_highv2sf): Ditto.
24691         (aarch64_fmlal_laneq_highv2sf): Ditto.
24692         (aarch64_fmlsl_laneq_highv2sf): Ditto.
24693         (aarch64_fmlalq_lane_highv4sf): Ditto.
24694         (aarch64_fmlsl_lane_highv4sf): Ditto.
24695         (aarch64_fmlalq_laneq_highv4sf): Ditto.
24696         (aarch64_fmlsl_laneq_highv4sf): Ditto.
24697         * config/aarch64/aarch64-simd.md:
24698         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
24699         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
24700         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
24701         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
24702         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
24703         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
24704         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
24705         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
24706         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
24707         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
24708         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
24709         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
24710         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
24711         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
24712         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
24713         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
24714         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
24715         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
24716         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
24717         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
24718         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
24719         (vfmlsl_low_u32): Ditto.
24720         (vfmlalq_low_u32): Ditto.
24721         (vfmlslq_low_u32): Ditto.
24722         (vfmlal_high_u32): Ditto.
24723         (vfmlsl_high_u32): Ditto.
24724         (vfmlalq_high_u32): Ditto.
24725         (vfmlslq_high_u32): Ditto.
24726         (vfmlal_lane_low_u32): Ditto.
24727         (vfmlsl_lane_low_u32): Ditto.
24728         (vfmlal_laneq_low_u32): Ditto.
24729         (vfmlsl_laneq_low_u32): Ditto.
24730         (vfmlalq_lane_low_u32): Ditto.
24731         (vfmlslq_lane_low_u32): Ditto.
24732         (vfmlalq_laneq_low_u32): Ditto.
24733         (vfmlslq_laneq_low_u32): Ditto.
24734         (vfmlal_lane_high_u32): Ditto.
24735         (vfmlsl_lane_high_u32): Ditto.
24736         (vfmlal_laneq_high_u32): Ditto.
24737         (vfmlsl_laneq_high_u32): Ditto.
24738         (vfmlalq_lane_high_u32): Ditto.
24739         (vfmlslq_lane_high_u32): Ditto.
24740         (vfmlalq_laneq_high_u32): Ditto.
24741         (vfmlslq_laneq_high_u32): Ditto.
24742         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
24743         (AARCH64_FL_FOR_ARCH8_4): New.
24744         (AARCH64_ISA_F16FML): New ISA flag.
24745         (TARGET_F16FML): New feature flag for fp16fml.
24746         (doc/invoke.texi): Document new fp16fml option.
24748 2018-01-10  Michael Collison  <michael.collison@arm.com>
24750         * config/aarch64/aarch64-builtins.c:
24751         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
24752         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24753         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
24754         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
24755         (AARCH64_ISA_SHA3): New ISA flag.
24756         (TARGET_SHA3): New feature flag for sha3.
24757         * config/aarch64/iterators.md (sha512_op): New int attribute.
24758         (CRYPTO_SHA512): New int iterator.
24759         (UNSPEC_SHA512H): New unspec.
24760         (UNSPEC_SHA512H2): Ditto.
24761         (UNSPEC_SHA512SU0): Ditto.
24762         (UNSPEC_SHA512SU1): Ditto.
24763         * config/aarch64/aarch64-simd-builtins.def
24764         (aarch64_crypto_sha512hqv2di): New builtin.
24765         (aarch64_crypto_sha512h2qv2di): Ditto.
24766         (aarch64_crypto_sha512su0qv2di): Ditto.
24767         (aarch64_crypto_sha512su1qv2di): Ditto.
24768         (aarch64_eor3qv8hi): Ditto.
24769         (aarch64_rax1qv2di): Ditto.
24770         (aarch64_xarqv2di): Ditto.
24771         (aarch64_bcaxqv8hi): Ditto.
24772         * config/aarch64/aarch64-simd.md:
24773         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
24774         (aarch64_crypto_sha512su0qv2di): Ditto.
24775         (aarch64_crypto_sha512su1qv2di): Ditto.
24776         (aarch64_eor3qv8hi): Ditto.
24777         (aarch64_rax1qv2di): Ditto.
24778         (aarch64_xarqv2di): Ditto.
24779         (aarch64_bcaxqv8hi): Ditto.
24780         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
24781         (vsha512h2q_u64): Ditto.
24782         (vsha512su0q_u64): Ditto.
24783         (vsha512su1q_u64): Ditto.
24784         (veor3q_u16): Ditto.
24785         (vrax1q_u64): Ditto.
24786         (vxarq_u64): Ditto.
24787         (vbcaxq_u16): Ditto.
24788         * config/arm/types.md (crypto_sha512): New type attribute.
24789         (crypto_sha3): Ditto.
24790         (doc/invoke.texi): Document new sha3 option.
24792 2018-01-10  Michael Collison  <michael.collison@arm.com>
24794         * config/aarch64/aarch64-builtins.c:
24795         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
24796         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24797         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
24798         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
24799         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
24800         (AARCH64_ISA_SM4): New ISA flag.
24801         (TARGET_SM4): New feature flag for sm4.
24802         * config/aarch64/aarch64-simd-builtins.def
24803         (aarch64_sm3ss1qv4si): Ditto.
24804         (aarch64_sm3tt1aq4si): Ditto.
24805         (aarch64_sm3tt1bq4si): Ditto.
24806         (aarch64_sm3tt2aq4si): Ditto.
24807         (aarch64_sm3tt2bq4si): Ditto.
24808         (aarch64_sm3partw1qv4si): Ditto.
24809         (aarch64_sm3partw2qv4si): Ditto.
24810         (aarch64_sm4eqv4si): Ditto.
24811         (aarch64_sm4ekeyqv4si): Ditto.
24812         * config/aarch64/aarch64-simd.md:
24813         (aarch64_sm3ss1qv4si): Ditto.
24814         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
24815         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
24816         (aarch64_sm4eqv4si): Ditto.
24817         (aarch64_sm4ekeyqv4si): Ditto.
24818         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
24819         (sm3part_op): Ditto.
24820         (CRYPTO_SM3TT): Ditto.
24821         (CRYPTO_SM3PART): Ditto.
24822         (UNSPEC_SM3SS1): New unspec.
24823         (UNSPEC_SM3TT1A): Ditto.
24824         (UNSPEC_SM3TT1B): Ditto.
24825         (UNSPEC_SM3TT2A): Ditto.
24826         (UNSPEC_SM3TT2B): Ditto.
24827         (UNSPEC_SM3PARTW1): Ditto.
24828         (UNSPEC_SM3PARTW2): Ditto.
24829         (UNSPEC_SM4E): Ditto.
24830         (UNSPEC_SM4EKEY): Ditto.
24831         * config/aarch64/constraints.md (Ui2): New constraint.
24832         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
24833         * config/arm/types.md (crypto_sm3): New type attribute.
24834         (crypto_sm4): Ditto.
24835         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
24836         (vsm3tt1aq_u32): Ditto.
24837         (vsm3tt1bq_u32): Ditto.
24838         (vsm3tt2aq_u32): Ditto.
24839         (vsm3tt2bq_u32): Ditto.
24840         (vsm3partw1q_u32): Ditto.
24841         (vsm3partw2q_u32): Ditto.
24842         (vsm4eq_u32): Ditto.
24843         (vsm4ekeyq_u32): Ditto.
24844         (doc/invoke.texi): Document new sm4 option.
24846 2018-01-10  Michael Collison  <michael.collison@arm.com>
24848         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
24849         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
24850         (AARCH64_FL_FOR_ARCH8_4): New.
24851         (AARCH64_FL_V8_4): New flag.
24852         (doc/invoke.texi): Document new armv8.4-a option.
24854 2018-01-10  Michael Collison  <michael.collison@arm.com>
24856         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
24857         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
24858         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
24859         * config/aarch64/aarch64-option-extension.def: Add
24860         AARCH64_OPT_EXTENSION of 'sha2'.
24861         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
24862         (crypto): Disable sha2 and aes if crypto disabled.
24863         (crypto): Enable aes and sha2 if enabled.
24864         (simd): Disable sha2 and aes if simd disabled.
24865         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
24866         New flags.
24867         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
24868         (TARGET_SHA2): New feature flag for sha2.
24869         (TARGET_AES): New feature flag for aes.
24870         * config/aarch64/aarch64-simd.md:
24871         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
24872         conditional on TARGET_AES.
24873         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
24874         (aarch64_crypto_sha1hsi): Make pattern conditional
24875         on TARGET_SHA2.
24876         (aarch64_crypto_sha1hv4si): Ditto.
24877         (aarch64_be_crypto_sha1hv4si): Ditto.
24878         (aarch64_crypto_sha1su1v4si): Ditto.
24879         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
24880         (aarch64_crypto_sha1su0v4si): Ditto.
24881         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
24882         (aarch64_crypto_sha256su0v4si): Ditto.
24883         (aarch64_crypto_sha256su1v4si): Ditto.
24884         (doc/invoke.texi): Document new aes and sha2 options.
24886 2018-01-10  Martin Sebor  <msebor@redhat.com>
24888         PR tree-optimization/83781
24889         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
24890         as string arrays.
24892 2018-01-11  Martin Sebor  <msebor@gmail.com>
24893             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24895         PR tree-optimization/83501
24896         PR tree-optimization/81703
24898         * tree-ssa-strlen.c (get_string_cst): Rename...
24899         (get_string_len): ...to this.  Handle global constants.
24900         (handle_char_store): Adjust.
24902 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
24903             Jim Wilson  <jimw@sifive.com>
24905         * config/riscv/riscv-protos.h (riscv_output_return): New.
24906         * config/riscv/riscv.c (struct machine_function): New naked_p field.
24907         (riscv_attribute_table, riscv_output_return),
24908         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
24909         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
24910         (riscv_compute_frame_info): Only compute frame->mask if not a naked
24911         function.
24912         (riscv_expand_prologue): Add early return for naked function.
24913         (riscv_expand_epilogue): Likewise.
24914         (riscv_function_ok_for_sibcall): Return false for naked function.
24915         (riscv_set_current_function): New.
24916         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
24917         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
24918         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
24919         * doc/extend.texi (RISC-V Function Attributes): New.
24921 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
24923         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
24924         check for 128-bit long double before checking TCmode.
24925         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
24926         128-bit long doubles before checking TFmode or TCmode.
24927         (FLOAT128_IBM_P): Likewise.
24929 2018-01-10  Martin Sebor  <msebor@redhat.com>
24931         PR tree-optimization/83671
24932         * builtins.c (c_strlen): Unconditionally return zero for the empty
24933         string.
24934         Use -Warray-bounds for warnings.
24935         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
24936         for non-constant array indices with COMPONENT_REF, arrays of
24937         arrays, and pointers to arrays.
24938         (gimple_fold_builtin_strlen): Determine and set length range for
24939         non-constant character arrays.
24941 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
24943         PR middle-end/81897
24944         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
24945         empty blocks.
24947 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
24949         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
24951 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
24953         PR target/83399
24954         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
24955         VECTOR_MEM_ALTIVEC_OR_VSX_P.
24956         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
24957         indexed_or_indirect_operand predicate.
24958         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
24959         (*vsx_le_perm_load_v8hi): Likewise.
24960         (*vsx_le_perm_load_v16qi): Likewise.
24961         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
24962         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
24963         (*vsx_le_perm_store_v8hi): Likewise.
24964         (*vsx_le_perm_store_v16qi): Likewise.
24965         (eight unnamed splitters): Likewise.
24967 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
24969         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
24970         * config/rs6000/emmintrin.h: Likewise.
24971         * config/rs6000/mmintrin.h: Likewise.
24972         * config/rs6000/xmmintrin.h: Likewise.
24974 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
24976         PR c++/43486
24977         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
24978         "public_flag".
24979         * tree.c (tree_nop_conversion): Return true for location wrapper
24980         nodes.
24981         (maybe_wrap_with_location): New function.
24982         (selftest::check_strip_nops): New function.
24983         (selftest::test_location_wrappers): New function.
24984         (selftest::tree_c_tests): Call it.
24985         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
24986         (maybe_wrap_with_location): New decl.
24987         (EXPR_LOCATION_WRAPPER_P): New macro.
24988         (location_wrapper_p): New inline function.
24989         (tree_strip_any_location_wrapper): New inline function.
24991 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
24993         PR target/83735
24994         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
24995         stack_realign_offset for the largest alignment of stack slot
24996         actually used.
24997         (ix86_find_max_used_stack_alignment): New function.
24998         (ix86_finalize_stack_frame_flags): Use it.  Set
24999         max_used_stack_alignment if we don't realign stack.
25000         * config/i386/i386.h (machine_function): Add
25001         max_used_stack_alignment.
25003 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
25005         * config/arm/arm.opt (-mbranch-cost): New option.
25006         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25007         account.
25009 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
25011         PR target/83629
25012         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25013         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25015 2018-01-10  Richard Biener  <rguenther@suse.de>
25017         PR debug/83765
25018         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25019         early out so it also covers the case where we have a non-NULL
25020         origin.
25022 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25024         PR tree-optimization/83753
25025         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25026         for non-strided grouped accesses if the number of elements is 1.
25028 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
25030         PR target/81616
25031         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25032         * i386.h (TARGET_USE_GATHER): Define.
25033         * x86-tune.def (X86_TUNE_USE_GATHER): New.
25035 2018-01-10  Martin Liska  <mliska@suse.cz>
25037         PR bootstrap/82831
25038         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25039         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25040         partitioning.
25041         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25042         CLEANUP_NO_PARTITIONING is not set.
25044 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
25046         * doc/rtl.texi: Remove documentation of (const ...) wrappers
25047         for vectors, as a partial revert of r254296.
25048         * rtl.h (const_vec_p): Delete.
25049         (const_vec_duplicate_p): Don't test for vector CONSTs.
25050         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25051         * expmed.c (make_tree): Likewise.
25053         Revert:
25054         * common.md (E, F): Use CONSTANT_P instead of checking for
25055         CONST_VECTOR.
25056         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25057         checking for CONST_VECTOR.
25059 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25061         PR middle-end/83575
25062         * predict.c (force_edge_cold): Handle in more sane way edges
25063         with no prediction.
25065 2018-01-09  Carl Love  <cel@us.ibm.com>
25067         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25068         V4SI, V4SF types.
25069         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25070         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25071         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25072         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
25073         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25074         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
25075         * config/rs6000/rs6000-protos.h: Add extern defition for
25076         rs6000_generate_float2_double_code.
25077         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25078         function.
25079         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25080         (float2_v2df): Add define_expand.
25082 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
25084         PR target/83628
25085         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25086         op_mode in the force_to_mode call.
25088 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25090         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25091         instead of checking each element individually.
25092         (aarch64_evpc_uzp): Likewise.
25093         (aarch64_evpc_zip): Likewise.
25094         (aarch64_evpc_ext): Likewise.
25095         (aarch64_evpc_rev): Likewise.
25096         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25097         instead of checking each element individually.  Return true without
25098         generating rtl if
25099         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25100         whether all selected elements come from the same input, instead of
25101         checking each element individually.  Remove calls to gen_rtx_REG,
25102         start_sequence and end_sequence and instead assert that no rtl is
25103         generated.
25105 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25107         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25108         order of HIGH and CONST checks.
25110 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
25112         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25113         if the destination isn't an SSA_NAME.
25115 2018-01-09  Richard Biener  <rguenther@suse.de>
25117         PR tree-optimization/83668
25118         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25119         move prologue...
25120         (canonicalize_loop_form): ... here, renamed from ...
25121         (canonicalize_loop_closed_ssa_form): ... this and amended to
25122         swap successor edges for loop exit blocks to make us use
25123         the RPO order we need for initial schedule generation.
25125 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
25127         PR tree-optimization/64811
25128         * match.pd: When optimizing comparisons with Inf, avoid
25129         introducing or losing exceptions from comparisons with NaN.
25131 2018-01-09  Martin Liska  <mliska@suse.cz>
25133         PR sanitizer/82517
25134         * asan.c (shadow_mem_size): Add gcc_assert.
25136 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
25138         Don't save registers in main().
25140         PR target/83738
25141         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25142         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25143         * config/avr/avr.c (avr_set_current_function): Don't error if
25144         naked, OS_task or OS_main are specified at the same time.
25145         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25146         OS_main.
25147         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25148         attribute.
25149         * common/config/avr/avr-common.c (avr_option_optimization_table):
25150         Switch on -mmain-is-OS_task for optimizing compilations.
25152 2018-01-09  Richard Biener  <rguenther@suse.de>
25154         PR tree-optimization/83572
25155         * graphite.c: Include cfganal.h.
25156         (graphite_transform_loops): Connect infinite loops to exit
25157         and remove fake edges at the end.
25159 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25161         * ipa-inline.c (edge_badness): Revert accidental checkin.
25163 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
25165         PR ipa/80763
25166         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
25167         symbols; not inline clones.
25169 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
25171         PR target/83507
25172         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
25173         hard registers.  Formatting fixes.
25175         PR preprocessor/83722
25176         * gcc.c (try_generate_repro): Pass
25177         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
25178         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
25179         do_report_bug.
25181 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
25182             Kito Cheng  <kito.cheng@gmail.com>
25184         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
25185         (riscv_leaf_function_p): Delete.
25186         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
25188 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25190         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
25191         function.
25192         (do_ifelse): New function.
25193         (do_isel): New function.
25194         (do_sub3): New function.
25195         (do_add3): New function.
25196         (do_load_mask_compare): New function.
25197         (do_overlap_load_compare): New function.
25198         (expand_compare_loop): New function.
25199         (expand_block_compare): Call expand_compare_loop() when appropriate.
25200         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
25201         option description.
25202         (-mblock-compare-inline-loop-limit): New option.
25204 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25206         PR target/83677
25207         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
25208         Reverse order of second and third operands in first alternative.
25209         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
25210         of first and second elements in UNSPEC_VPERMR vector.
25211         (altivec_expand_vec_perm_le): Likewise.
25213 2018-01-08  Jeff Law  <law@redhat.com>
25215         PR rtl-optimizatin/81308
25216         * tree-switch-conversion.c (cfg_altered): New file scoped static.
25217         (process_switch): If group_case_labels makes a change, then set
25218         cfg_altered.
25219         (pass_convert_switch::execute): If a switch is converted, then
25220         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
25222         PR rtl-optimization/81308
25223         * recog.c (split_all_insns): Conditionally cleanup the CFG after
25224         splitting insns.
25226 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
25228         PR target/83663 - Revert r255946
25229         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
25230         generation for cases where splatting a value is not useful.
25231         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
25232         across a vec_duplicate and a paradoxical subreg forming a vector
25233         mode to a vec_concat.
25235 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25237         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
25238         -march=armv8.3-a variants.
25239         * config/arm/t-multilib: Likewise.
25240         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
25242 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25244         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
25245         to generate rtl.
25246         (cceq_ior_compare_complement): Give it a name so I can use it, and
25247         change boolean_or_operator predicate to boolean_operator so it can
25248         be used to generate a crand.
25249         (eqne): New code iterator.
25250         (bd/bd_neg): New code_attrs.
25251         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
25252         a single define_insn.
25253         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
25254         decrement (bdnzt/bdnzf/bdzt/bdzf).
25255         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
25256         with the new names of the branch decrement patterns, and added the
25257         names of the branch decrement conditional patterns.
25259 2018-01-08  Richard Biener  <rguenther@suse.de>
25261         PR tree-optimization/83563
25262         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
25263         cache.
25265 2018-01-08  Richard Biener  <rguenther@suse.de>
25267         PR middle-end/83713
25268         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
25270 2018-01-08  Richard Biener  <rguenther@suse.de>
25272         PR tree-optimization/83685
25273         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
25274         references to abnormals.
25276 2018-01-08  Richard Biener  <rguenther@suse.de>
25278         PR lto/83719
25279         * dwarf2out.c (output_indirect_strings): Handle empty
25280         skeleton_debug_str_hash.
25281         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
25283 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
25285         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
25286         (emit_store_direct): Likewise.
25287         (arc_trampoline_adjust_address): Likewise.
25288         (arc_asm_trampoline_template): New function.
25289         (arc_initialize_trampoline): Use asm_trampoline_template.
25290         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
25291         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
25292         * config/arc/arc.md (flush_icache): Delete pattern.
25294 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
25296         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
25297         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
25298         munaligned-access.
25300 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
25302         PR target/83681
25303         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
25304         by not USED_FOR_TARGET.
25305         (make_pass_resolve_sw_modes): Likewise.
25307 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
25309         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
25310         USED_FOR_TARGET.
25312 2018-01-08  Richard Biener  <rguenther@suse.de>
25314         PR middle-end/83580
25315         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
25317 2018-01-08  Richard Biener  <rguenther@suse.de>
25319         PR middle-end/83517
25320         * match.pd ((t * 2) / 2) -> t): Add missing :c.
25322 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
25324         PR middle-end/81897
25325         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
25326         basic blocks with a small number of successors.
25327         (convert_control_dep_chain_into_preds): Improve handling of
25328         forwarder blocks.
25329         (dump_predicates): Split apart into...
25330         (dump_pred_chain): ...here...
25331         (dump_pred_info): ...and here.
25332         (can_one_predicate_be_invalidated_p): Add debugging printfs.
25333         (can_chain_union_be_invalidated_p): Improve check for invalidation
25334         of paths.
25335         (uninit_uses_cannot_happen): Avoid unnecessary if
25336         convert_control_dep_chain_into_preds yielded nothing.
25338 2018-01-06  Martin Sebor  <msebor@redhat.com>
25340         PR tree-optimization/83640
25341         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
25342         subtracting negative offset from size.
25343         (builtin_access::overlap): Adjust offset bounds of the access to fall
25344         within the size of the object if possible.
25346 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
25348         PR rtl-optimization/83699
25349         * expmed.c (extract_bit_field_1): Restrict the vector usage of
25350         extract_bit_field_as_subreg to cases in which the extracted
25351         value is also a vector.
25353         * lra-constraints.c (process_alt_operands): Test for the equivalence
25354         substitutions when detecting a possible reload cycle.
25356 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
25358         PR debug/83480
25359         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
25360         by default if flag_selective_schedling{,2}.  Formatting fixes.
25362         PR rtl-optimization/83682
25363         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
25364         if it has non-VECTOR_MODE element mode.
25365         (vec_duplicate_p): Likewise.
25367         PR middle-end/83694
25368         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
25369         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
25371 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
25373         PR target/83604
25374         * config/i386/i386-builtin.def
25375         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
25376         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
25377         Require also OPTION_MASK_ISA_AVX512F in addition to
25378         OPTION_MASK_ISA_GFNI.
25379         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
25380         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
25381         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
25382         to OPTION_MASK_ISA_GFNI.
25383         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
25384         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
25385         OPTION_MASK_ISA_AVX512BW.
25386         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
25387         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
25388         addition to OPTION_MASK_ISA_GFNI.
25389         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
25390         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
25391         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
25392         to OPTION_MASK_ISA_GFNI.
25393         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
25394         a requirement for all ISAs rather than any of them with a few
25395         exceptions.
25396         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
25397         processing.
25398         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
25399         bitmasks to be enabled with 3 exceptions, instead of requiring any
25400         enabled ISA with lots of exceptions.
25401         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
25402         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
25403         Change avx512bw in isa attribute to avx512f.
25404         * config/i386/sgxintrin.h: Add license boilerplate.
25405         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
25406         to __AVX512F__ and __AVX512VL to __AVX512VL__.
25407         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
25408         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
25409         defined.
25410         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
25411         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
25412         temporarily sse2 rather than sse if not enabled already.
25414         PR target/83604
25415         * config/i386/sse.md (VI248_VLBW): Rename to ...
25416         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
25417         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
25418         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
25419         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
25420         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
25421         mode iterator instead of VI248_VLBW.
25423 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
25425         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
25426         (record_modified): Skip clobbers; add debug output.
25427         (param_change_prob): Use sreal frequencies.
25429 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
25431         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
25432         punt for user-aligned variables.
25434 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
25436         * tree-chrec.c (chrec_contains_symbols): Return true for
25437         POLY_INT_CST.
25439 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
25441         PR target/82439
25442         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
25443         of (x|y) == x for BICS pattern.
25445 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
25447         PR tree-optimization/83605
25448         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
25449         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
25450         can throw.
25452 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
25454         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
25455         * config/epiphany/rtems.h: New file.
25457 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
25458             Uros Bizjak  <ubizjak@gmail.com>
25460         PR target/83554
25461         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
25462         QIreg_operand instead of register_operand predicate.
25463         * config/i386/i386.c (ix86_rop_should_change_byte_p,
25464         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
25465         comments instead of -fmitigate[-_]rop.
25467 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25469         PR bootstrap/81926
25470         * cgraphunit.c (symbol_table::compile): Switch to text_section
25471         before calling assembly_start debug hook.
25472         * run-rtl-passes.c (run_rtl_passes): Likewise.
25473         Include output.h.
25475 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25477         * tree-vrp.c (extract_range_from_binary_expr_1): Check
25478         range_int_cst_p rather than !symbolic_range_p before calling
25479         extract_range_from_multiplicative_op_1.
25481 2018-01-04  Jeff Law  <law@redhat.com>
25483         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
25484         redundant test in assertion.
25486 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25488         * doc/rtl.texi: Document machine_mode wrapper classes.
25490 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25492         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
25493         using tree_to_uhwi.
25495 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25497         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
25498         the VEC_PERM_EXPR fold to fail.
25500 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
25502         PR debug/83585
25503         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
25504         to switched_sections.
25506 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25508         PR target/83680
25509         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
25510         test for d.testing.
25512 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
25514         PR target/83387
25515         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
25516         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
25518 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
25520         PR debug/83666
25521         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
25522         is BLKmode and bitpos not zero or mode change is needed.
25524 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
25526         PR target/83675
25527         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
25528         TARGET_VIS2.
25530 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
25532         PR target/83628
25533         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
25534         instead of MULT rtx.  Update all corresponding splitters.
25535         (*saddl_se): Ditto.
25536         (*ssub<modesuffix>): Ditto.
25537         (*ssubl_se): Ditto.
25538         (*cmp_sadd_di): Update split patterns.
25539         (*cmp_sadd_si): Ditto.
25540         (*cmp_sadd_sidi): Ditto.
25541         (*cmp_ssub_di): Ditto.
25542         (*cmp_ssub_si): Ditto.
25543         (*cmp_ssub_sidi): Ditto.
25544         * config/alpha/predicates.md (const23_operand): New predicate.
25545         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
25546         Look for ASHIFT, not MULT inner operand.
25547         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
25549 2018-01-04  Martin Liska  <mliska@suse.cz>
25551         PR gcov-profile/83669
25552         * gcov.c (output_intermediate_file): Add version to intermediate
25553         gcov file.
25554         * doc/gcov.texi: Document new field 'version' in intermediate
25555         file format. Fix location of '-k' option of gcov command.
25557 2018-01-04  Martin Liska  <mliska@suse.cz>
25559         PR ipa/82352
25560         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
25562 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
25564         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
25566 2018-01-03  Martin Sebor  <msebor@redhat.com>
25568         PR tree-optimization/83655
25569         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
25570         checking calls with invalid arguments.
25572 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25574         * tree-vect-stmts.c (vect_get_store_rhs): New function.
25575         (vectorizable_mask_load_store): Delete.
25576         (vectorizable_call): Return false for masked loads and stores.
25577         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
25578         instead of gimple_assign_rhs1.
25579         (vectorizable_load): Handle IFN_MASK_LOAD.
25580         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
25582 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25584         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
25585         split out from..,
25586         (vectorizable_mask_load_store): ...here.
25587         (vectorizable_load): ...and here.
25589 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25591         * tree-vect-stmts.c (vect_build_all_ones_mask)
25592         (vect_build_zero_merge_argument): New functions, split out from...
25593         (vectorizable_load): ...here.
25595 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25597         * tree-vect-stmts.c (vect_check_store_rhs): New function,
25598         split out from...
25599         (vectorizable_mask_load_store): ...here.
25600         (vectorizable_store): ...and here.
25602 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25604         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
25605         split out from...
25606         (vectorizable_mask_load_store): ...here.
25608 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25610         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
25611         (vect_model_store_cost): Take a vec_load_store_type instead of a
25612         vect_def_type.
25613         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
25614         (vect_model_store_cost): Take a vec_load_store_type instead of a
25615         vect_def_type.
25616         (vectorizable_mask_load_store): Update accordingly.
25617         (vectorizable_store): Likewise.
25618         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
25620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25622         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
25623         IFN_MASK_LOAD calls here rather than...
25624         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
25626 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25627             Alan Hayward  <alan.hayward@arm.com>
25628             David Sherwood  <david.sherwood@arm.com>
25630         * expmed.c (extract_bit_field_1): For vector extracts,
25631         fall back to extract_bit_field_as_subreg if vec_extract
25632         isn't available.
25634 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25635             Alan Hayward  <alan.hayward@arm.com>
25636             David Sherwood  <david.sherwood@arm.com>
25638         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
25639         they are variable or constant sized.
25640         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
25641         slots for constant-sized data.
25643 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25644             Alan Hayward  <alan.hayward@arm.com>
25645             David Sherwood  <david.sherwood@arm.com>
25647         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
25648         handling COND_EXPRs with boolean comparisons, try to find a better
25649         basis for the mask type than the boolean itself.
25651 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25653         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
25654         is calculated and how it can be overridden.
25655         * genmodes.c (max_bitsize_mode_any_mode): New variable.
25656         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
25657         if defined.
25658         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
25659         if nonzero.
25661 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25662             Alan Hayward  <alan.hayward@arm.com>
25663             David Sherwood  <david.sherwood@arm.com>
25665         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
25666         Remove the mode argument.
25667         (aarch64_simd_valid_immediate): Remove the mode and inverse
25668         arguments.
25669         * config/aarch64/iterators.md (bitsize): New iterator.
25670         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
25671         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
25672         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
25673         aarch64_simd_valid_immediate.
25674         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
25675         (aarch64_reg_or_bic_imm): Likewise.
25676         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
25677         with an insn_type enum and msl with a modifier_type enum.
25678         Replace element_width with a scalar_mode.  Change the shift
25679         to unsigned int.  Add constructors for scalar_float_mode and
25680         scalar_int_mode elements.
25681         (aarch64_vect_float_const_representable_p): Delete.
25682         (aarch64_can_const_movi_rtx_p)
25683         (aarch64_simd_scalar_immediate_valid_for_move)
25684         (aarch64_simd_make_constant): Update call to
25685         aarch64_simd_valid_immediate.
25686         (aarch64_advsimd_valid_immediate_hs): New function.
25687         (aarch64_advsimd_valid_immediate): Likewise.
25688         (aarch64_simd_valid_immediate): Remove mode and inverse
25689         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
25690         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
25691         and aarch64_float_const_representable_p on the result.
25692         (aarch64_output_simd_mov_immediate): Remove mode argument.
25693         Update call to aarch64_simd_valid_immediate and use of
25694         simd_immediate_info.
25695         (aarch64_output_scalar_simd_mov_immediate): Update call
25696         accordingly.
25698 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25699             Alan Hayward  <alan.hayward@arm.com>
25700             David Sherwood  <david.sherwood@arm.com>
25702         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
25703         (mode_nunits): Likewise CONST_MODE_NUNITS.
25704         * machmode.def (ADJUST_NUNITS): Document.
25705         * genmodes.c (mode_data::need_nunits_adj): New field.
25706         (blank_mode): Update accordingly.
25707         (adj_nunits): New variable.
25708         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
25709         parameter.
25710         (emit_mode_size_inline): Set need_bytesize_adj for all modes
25711         listed in adj_nunits.
25712         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
25713         listed in adj_nunits.  Don't emit case statements for such modes.
25714         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
25715         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
25716         nothing if adj_nunits is nonnull.
25717         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
25718         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
25719         (emit_mode_fbit): Update use of print_maybe_const_decl.
25720         (emit_move_size): Likewise.  Treat the array as non-const
25721         if adj_nunits.
25722         (emit_mode_adjustments): Handle adj_nunits.
25724 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25726         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
25727         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
25728         (VECTOR_MODES): Use it.
25729         (make_vector_modes): Take the prefix as an argument.
25731 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25732             Alan Hayward  <alan.hayward@arm.com>
25733             David Sherwood  <david.sherwood@arm.com>
25735         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
25736         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
25737         for MODE_VECTOR_BOOL.
25738         * machmode.def (VECTOR_BOOL_MODE): Document.
25739         * genmodes.c (VECTOR_BOOL_MODE): New macro.
25740         (make_vector_bool_mode): New function.
25741         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
25742         MODE_VECTOR_BOOL.
25743         * lto-streamer-in.c (lto_input_mode_table): Likewise.
25744         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
25745         Likewise.
25746         * stor-layout.c (int_mode_for_mode): Likewise.
25747         * tree.c (build_vector_type_for_mode): Likewise.
25748         * varasm.c (output_constant_pool_2): Likewise.
25749         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
25750         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
25751         for MODE_VECTOR_BOOL.
25752         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
25753         of mode class checks.
25754         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
25755         instead of a list of mode class checks.
25756         (expand_vector_scalar_condition): Likewise.
25757         (type_for_widest_vector_mode): Handle BImode as an inner mode.
25759 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25760             Alan Hayward  <alan.hayward@arm.com>
25761             David Sherwood  <david.sherwood@arm.com>
25763         * machmode.h (mode_size): Change from unsigned short to
25764         poly_uint16_pod.
25765         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
25766         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
25767         or if measurement_type is not polynomial.
25768         (fixed_size_mode::includes_p): Check for constant-sized modes.
25769         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
25770         return a poly_uint16 rather than an unsigned short.
25771         (emit_mode_size): Change the type of mode_size from unsigned short
25772         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
25773         (emit_mode_adjustments): Cope with polynomial vector sizes.
25774         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25775         for GET_MODE_SIZE.
25776         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25777         for GET_MODE_SIZE.
25778         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
25779         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
25780         * caller-save.c (setup_save_areas): Likewise.
25781         (replace_reg_with_saved_mem): Likewise.
25782         * calls.c (emit_library_call_value_1): Likewise.
25783         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
25784         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
25785         (gen_lowpart_for_combine): Likewise.
25786         * convert.c (convert_to_integer_1): Likewise.
25787         * cse.c (equiv_constant, cse_insn): Likewise.
25788         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
25789         (cselib_subst_to_values): Likewise.
25790         * dce.c (word_dce_process_block): Likewise.
25791         * df-problems.c (df_word_lr_mark_ref): Likewise.
25792         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
25793         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
25794         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
25795         (rtl_for_decl_location): Likewise.
25796         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
25797         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
25798         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
25799         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
25800         (expand_expr_real_1): Likewise.
25801         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
25802         (pad_below): Likewise.
25803         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
25804         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
25805         * ira.c (get_subreg_tracking_sizes): Likewise.
25806         * ira-build.c (ira_create_allocno_objects): Likewise.
25807         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
25808         (ira_sort_regnos_for_alter_reg): Likewise.
25809         * ira-costs.c (record_operand_costs): Likewise.
25810         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
25811         (resolve_simple_move): Likewise.
25812         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
25813         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
25814         (lra_constraints): Likewise.
25815         (CONST_POOL_OK_P): Reject variable-sized modes.
25816         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
25817         (add_pseudo_to_slot, lra_spill): Likewise.
25818         * omp-low.c (omp_clause_aligned_alignment): Likewise.
25819         * optabs-query.c (get_best_extraction_insn): Likewise.
25820         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
25821         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
25822         (expand_mult_highpart, valid_multiword_target_p): Likewise.
25823         * recog.c (offsettable_address_addr_space_p): Likewise.
25824         * regcprop.c (maybe_mode_change): Likewise.
25825         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
25826         * regrename.c (build_def_use): Likewise.
25827         * regstat.c (dump_reg_info): Likewise.
25828         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
25829         (find_reloads, find_reloads_subreg_address): Likewise.
25830         * reload1.c (eliminate_regs_1): Likewise.
25831         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
25832         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
25833         (simplify_binary_operation_1, simplify_subreg): Likewise.
25834         * targhooks.c (default_function_arg_padding): Likewise.
25835         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
25836         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
25837         (verify_gimple_assign_ternary): Likewise.
25838         * tree-inline.c (estimate_move_cost): Likewise.
25839         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25840         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
25841         (get_address_cost_ainc): Likewise.
25842         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
25843         (vect_supportable_dr_alignment): Likewise.
25844         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25845         (vectorizable_reduction): Likewise.
25846         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
25847         (vectorizable_operation, vectorizable_load): Likewise.
25848         * tree.c (build_same_sized_truth_vector_type): Likewise.
25849         * valtrack.c (cleanup_auto_inc_dec): Likewise.
25850         * var-tracking.c (emit_note_insn_var_location): Likewise.
25851         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
25852         (ADDR_VEC_ALIGN): Likewise.
25854 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25855             Alan Hayward  <alan.hayward@arm.com>
25856             David Sherwood  <david.sherwood@arm.com>
25858         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
25859         unsigned short.
25860         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
25861         or if measurement_type is polynomial.
25862         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
25863         * combine.c (make_extraction): Likewise.
25864         * dse.c (find_shift_sequence): Likewise.
25865         * dwarf2out.c (mem_loc_descriptor): Likewise.
25866         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
25867         (extract_bit_field, extract_low_bits): Likewise.
25868         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
25869         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
25870         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
25871         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
25872         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
25873         * reload.c (find_reloads): Likewise.
25874         * reload1.c (alter_reg): Likewise.
25875         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
25876         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
25877         * tree-if-conv.c (predicate_mem_writes): Likewise.
25878         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
25879         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
25880         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
25881         * valtrack.c (dead_debug_insert_temp): Likewise.
25882         * varasm.c (mergeable_constant_section): Likewise.
25883         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
25885 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25886             Alan Hayward  <alan.hayward@arm.com>
25887             David Sherwood  <david.sherwood@arm.com>
25889         * expr.c (expand_assignment): Cope with polynomial mode sizes
25890         when assigning to a CONCAT.
25892 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25893             Alan Hayward  <alan.hayward@arm.com>
25894             David Sherwood  <david.sherwood@arm.com>
25896         * machmode.h (mode_precision): Change from unsigned short to
25897         poly_uint16_pod.
25898         (mode_to_precision): Return a poly_uint16 rather than an unsigned
25899         short.
25900         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
25901         or if measurement_type is not polynomial.
25902         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
25903         in which the mode is already known to be a scalar_int_mode.
25904         * genmodes.c (emit_mode_precision): Change the type of mode_precision
25905         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
25906         initializer.
25907         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
25908         for GET_MODE_PRECISION.
25909         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
25910         for GET_MODE_PRECISION.
25911         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
25912         as polynomial.
25913         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
25914         (expand_field_assignment, make_extraction): Likewise.
25915         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
25916         (get_last_value): Likewise.
25917         * convert.c (convert_to_integer_1): Likewise.
25918         * cse.c (cse_insn): Likewise.
25919         * expr.c (expand_expr_real_1): Likewise.
25920         * lra-constraints.c (simplify_operand_subreg): Likewise.
25921         * optabs-query.c (can_atomic_load_p): Likewise.
25922         * optabs.c (expand_atomic_load): Likewise.
25923         (expand_atomic_store): Likewise.
25924         * ree.c (combine_reaching_defs): Likewise.
25925         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
25926         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
25927         * tree.h (type_has_mode_precision_p): Likewise.
25928         * ubsan.c (instrument_si_overflow): Likewise.
25930 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25931             Alan Hayward  <alan.hayward@arm.com>
25932             David Sherwood  <david.sherwood@arm.com>
25934         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
25935         polynomial numbers of units.
25936         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
25937         (valid_vector_subparts_p): New function.
25938         (build_vector_type): Remove temporary shim and take the number
25939         of units as a poly_uint64 rather than an int.
25940         (build_opaque_vector_type): Take the number of units as a
25941         poly_uint64 rather than an int.
25942         * tree.c (build_vector_from_ctor): Handle polynomial
25943         TYPE_VECTOR_SUBPARTS.
25944         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
25945         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
25946         (build_vector_from_val): If the number of units is variable,
25947         use build_vec_duplicate_cst for constant operands and
25948         VEC_DUPLICATE_EXPR otherwise.
25949         (make_vector_type): Remove temporary is_constant ().
25950         (build_vector_type, build_opaque_vector_type): Take the number of
25951         units as a poly_uint64 rather than an int.
25952         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
25953         VECTOR_CST_NELTS.
25954         * cfgexpand.c (expand_debug_expr): Likewise.
25955         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
25956         (store_constructor, expand_expr_real_1): Likewise.
25957         (const_scalar_mask_from_tree): Likewise.
25958         * fold-const-call.c (fold_const_reduction): Likewise.
25959         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
25960         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
25961         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
25962         (fold_relational_const): Likewise.
25963         (native_interpret_vector): Likewise.  Change the size from an
25964         int to an unsigned int.
25965         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
25966         TYPE_VECTOR_SUBPARTS.
25967         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
25968         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
25969         duplicating a non-constant operand into a variable-length vector.
25970         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
25971         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
25972         * ipa-icf.c (sem_variable::equals): Likewise.
25973         * match.pd: Likewise.
25974         * omp-simd-clone.c (simd_clone_subparts): Likewise.
25975         * print-tree.c (print_node): Likewise.
25976         * stor-layout.c (layout_type): Likewise.
25977         * targhooks.c (default_builtin_vectorization_cost): Likewise.
25978         * tree-cfg.c (verify_gimple_comparison): Likewise.
25979         (verify_gimple_assign_binary): Likewise.
25980         (verify_gimple_assign_ternary): Likewise.
25981         (verify_gimple_assign_single): Likewise.
25982         * tree-pretty-print.c (dump_generic_node): Likewise.
25983         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25984         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
25985         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
25986         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
25987         (vect_shift_permute_load_chain): Likewise.
25988         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
25989         (expand_vector_condition, optimize_vector_constructor): Likewise.
25990         (lower_vec_perm, get_compute_type): Likewise.
25991         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
25992         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
25993         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
25994         (vect_recog_mask_conversion_pattern): Likewise.
25995         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
25996         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
25997         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25998         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
25999         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26000         (vectorizable_shift, vectorizable_operation, vectorizable_store)
26001         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26002         (supportable_widening_operation): Likewise.
26003         (supportable_narrowing_operation): Likewise.
26004         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26005         Likewise.
26006         * varasm.c (output_constant): Likewise.
26008 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26009             Alan Hayward  <alan.hayward@arm.com>
26010             David Sherwood  <david.sherwood@arm.com>
26012         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26013         so that both the length == 3 and length != 3 cases set up their
26014         own permute vectors.  Add comments explaining why we know the
26015         number of elements is constant.
26016         (vect_permute_load_chain): Likewise.
26018 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26019             Alan Hayward  <alan.hayward@arm.com>
26020             David Sherwood  <david.sherwood@arm.com>
26022         * machmode.h (mode_nunits): Change from unsigned char to
26023         poly_uint16_pod.
26024         (ONLY_FIXED_SIZE_MODES): New macro.
26025         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26026         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26027         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26028         New typedefs.
26029         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26030         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26031         or if measurement_type is not polynomial.
26032         * genmodes.c (ZERO_COEFFS): New macro.
26033         (emit_mode_nunits_inline): Make mode_nunits_inline return a
26034         poly_uint16.
26035         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26036         Use ZERO_COEFFS when emitting initializers.
26037         * data-streamer.h (bp_pack_poly_value): New function.
26038         (bp_unpack_poly_value): Likewise.
26039         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26040         for GET_MODE_NUNITS.
26041         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26042         for GET_MODE_NUNITS.
26043         * tree.c (make_vector_type): Remove temporary shim and make
26044         the real function take the number of units as a poly_uint64
26045         rather than an int.
26046         (build_vector_type_for_mode): Handle polynomial nunits.
26047         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26048         * emit-rtl.c (const_vec_series_p_1): Likewise.
26049         (gen_rtx_CONST_VECTOR): Likewise.
26050         * fold-const.c (test_vec_duplicate_folding): Likewise.
26051         * genrecog.c (validate_pattern): Likewise.
26052         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26053         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26054         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26055         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26056         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26057         * rtlanal.c (subreg_get_info): Likewise.
26058         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26059         (vect_grouped_load_supported): Likewise.
26060         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26061         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26062         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26063         (simplify_const_unary_operation, simplify_binary_operation_1)
26064         (simplify_const_binary_operation, simplify_ternary_operation)
26065         (test_vector_ops_duplicate, test_vector_ops): Likewise.
26066         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26067         instead of CONST_VECTOR_NUNITS.
26068         * varasm.c (output_constant_pool_2): Likewise.
26069         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26070         explicit-encoded elements in the XVEC for variable-length vectors.
26072 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26074         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26076 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26077             Alan Hayward  <alan.hayward@arm.com>
26078             David Sherwood  <david.sherwood@arm.com>
26080         * coretypes.h (fixed_size_mode): Declare.
26081         (fixed_size_mode_pod): New typedef.
26082         * builtins.h (target_builtins::x_apply_args_mode)
26083         (target_builtins::x_apply_result_mode): Change type to
26084         fixed_size_mode_pod.
26085         * builtins.c (apply_args_size, apply_result_size, result_vector)
26086         (expand_builtin_apply_args_1, expand_builtin_apply)
26087         (expand_builtin_return): Update accordingly.
26089 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26091         * cse.c (hash_rtx_cb): Hash only the encoded elements.
26092         * cselib.c (cselib_hash_rtx): Likewise.
26093         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26094         CONST_VECTOR encoding.
26096 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26097             Jeff Law  <law@redhat.com>
26099         PR target/83641
26100         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26101         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26102         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26103         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26105         PR target/83641
26106         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26107         explicitly probe *sp in a noreturn function if there were any callee
26108         register saves or frame pointer is needed.
26110 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26112         PR debug/83621
26113         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26114         BLKmode for ternary, binary or unary expressions.
26116         PR debug/83645
26117         * var-tracking.c (delete_vta_debug_insn): New inline function.
26118         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26119         insns from get_insns () to NULL instead of each bb separately.
26120         Use delete_vta_debug_insn.  No longer static.
26121         (vt_debug_insns_local, variable_tracking_main_1): Adjust
26122         delete_vta_debug_insns callers.
26123         * rtl.h (delete_vta_debug_insns): Declare.
26124         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26125         instead of variable_tracking_main.
26127 2018-01-03  Martin Sebor  <msebor@redhat.com>
26129         PR tree-optimization/83603
26130         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26131         arguments past the endof the argument list in functions declared
26132         without a prototype.
26133         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26134         Avoid checking when arguments are null.
26136 2018-01-03  Martin Sebor  <msebor@redhat.com>
26138         PR c/83559
26139         * doc/extend.texi (attribute const): Fix a typo.
26140         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26141         issuing -Wsuggest-attribute for void functions.
26143 2018-01-03  Martin Sebor  <msebor@redhat.com>
26145         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26146         offset_int::from instead of wide_int::to_shwi.
26147         (maybe_diag_overlap): Remove assertion.
26148         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26149         * gimple-ssa-sprintf.c (format_directive): Same.
26150         (parse_directive): Same.
26151         (sprintf_dom_walker::compute_format_length): Same.
26152         (try_substitute_return_value): Same.
26154 2018-01-03  Jeff Law  <law@redhat.com>
26156         PR middle-end/83654
26157         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
26158         non-constant residual for zero at runtime and avoid probing in
26159         that case.  Reorganize code for trailing problem to mirror handling
26160         of the residual.
26162 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26164         PR tree-optimization/83501
26165         * tree-ssa-strlen.c (get_string_cst): New.
26166         (handle_char_store): Call get_string_cst.
26168 2018-01-03  Martin Liska  <mliska@suse.cz>
26170         PR tree-optimization/83593
26171         * tree-ssa-strlen.c: Include tree-cfg.h.
26172         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
26173         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
26174         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
26175         to false.
26176         (strlen_dom_walker::before_dom_children): Call
26177         gimple_purge_dead_eh_edges. Dump tranformation with details
26178         dump flags.
26179         (strlen_dom_walker::before_dom_children): Update call by adding
26180         new argument cleanup_eh.
26181         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
26183 2018-01-03  Martin Liska  <mliska@suse.cz>
26185         PR ipa/83549
26186         * cif-code.def (VARIADIC_THUNK): New enum value.
26187         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
26188         thunks.
26190 2018-01-03  Jan Beulich  <jbeulich@suse.com>
26192         * sse.md (mov<mode>_internal): Tighten condition for when to use
26193         vmovdqu<ssescalarsize> for TI and OI modes.
26195 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26197         Update copyright years.
26199 2018-01-03  Martin Liska  <mliska@suse.cz>
26201         PR ipa/83594
26202         * ipa-visibility.c (function_and_variable_visibility): Skip
26203         functions with noipa attribure.
26205 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
26207         * gcc.c (process_command): Update copyright notice dates.
26208         * gcov-dump.c (print_version): Ditto.
26209         * gcov.c (print_version): Ditto.
26210         * gcov-tool.c (print_version): Ditto.
26211         * gengtype.c (create_file): Ditto.
26212         * doc/cpp.texi: Bump @copying's copyright year.
26213         * doc/cppinternals.texi: Ditto.
26214         * doc/gcc.texi: Ditto.
26215         * doc/gccint.texi: Ditto.
26216         * doc/gcov.texi: Ditto.
26217         * doc/install.texi: Ditto.
26218         * doc/invoke.texi: Ditto.
26220 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26222         * vector-builder.h (vector_builder::m_full_nelts): Change from
26223         unsigned int to poly_uint64.
26224         (vector_builder::full_nelts): Update prototype accordingly.
26225         (vector_builder::new_vector): Likewise.
26226         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
26227         (vector_builder::operator ==): Likewise.
26228         (vector_builder::finalize): Likewise.
26229         * int-vector-builder.h (int_vector_builder::int_vector_builder):
26230         Take the number of elements as a poly_uint64 rather than an
26231         unsigned int.
26232         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
26233         from unsigned int to poly_uint64.
26234         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
26235         (vec_perm_indices::new_vector): Likewise.
26236         (vec_perm_indices::length): Likewise.
26237         (vec_perm_indices::nelts_per_input): Likewise.
26238         (vec_perm_indices::input_nelts): Likewise.
26239         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
26240         number of elements per input as a poly_uint64 rather than an
26241         unsigned int.  Use the original encoding for variable-length
26242         vectors, rather than clamping each individual element.
26243         For the second and subsequent elements in each pattern,
26244         clamp the step and base before clamping their sum.
26245         (vec_perm_indices::series_p): Handle polynomial element counts.
26246         (vec_perm_indices::all_in_range_p): Likewise.
26247         (vec_perm_indices_to_tree): Likewise.
26248         (vec_perm_indices_to_rtx): Likewise.
26249         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
26250         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
26251         (tree_vector_builder::new_binary_operation): Handle polynomial
26252         element counts.  Return false if we need to know the number
26253         of elements at compile time.
26254         * fold-const.c (fold_vec_perm): Punt if the number of elements
26255         isn't known at compile time.
26257 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26259         * vec-perm-indices.h (vec_perm_builder): Change element type
26260         from HOST_WIDE_INT to poly_int64.
26261         (vec_perm_indices::element_type): Update accordingly.
26262         (vec_perm_indices::clamp): Handle polynomial element_types.
26263         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26264         (vec_perm_indices::all_in_range_p): Likewise.
26265         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
26266         than shwi trees.
26267         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
26268         polynomial vec_perm_indices element types.
26269         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
26270         * fold-const.c (fold_vec_perm): Likewise.
26271         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
26272         * tree-vect-generic.c (lower_vec_perm): Likewise.
26273         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26274         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
26275         element type to HOST_WIDE_INT.
26277 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26278             Alan Hayward  <alan.hayward@arm.com>
26279             David Sherwood  <david.sherwood@arm.com>
26281         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
26282         rather than an int.  Use plus_constant.
26283         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
26284         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
26286 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26287             Alan Hayward  <alan.hayward@arm.com>
26288             David Sherwood  <david.sherwood@arm.com>
26290         * calls.c (emit_call_1, expand_call): Change struct_value_size from
26291         a HOST_WIDE_INT to a poly_int64.
26293 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26294             Alan Hayward  <alan.hayward@arm.com>
26295             David Sherwood  <david.sherwood@arm.com>
26297         * calls.c (load_register_parameters): Cope with polynomial
26298         mode sizes.  Require a constant size for BLKmode parameters
26299         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
26300         forces a parameter to be padded at the lsb end in order to
26301         fill a complete number of words, require the parameter size
26302         to be ordered wrt UNITS_PER_WORD.
26304 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26305             Alan Hayward  <alan.hayward@arm.com>
26306             David Sherwood  <david.sherwood@arm.com>
26308         * reload1.c (spill_stack_slot_width): Change element type
26309         from unsigned int to poly_uint64_pod.
26310         (alter_reg): Treat mode sizes as polynomial.
26312 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26313             Alan Hayward  <alan.hayward@arm.com>
26314             David Sherwood  <david.sherwood@arm.com>
26316         * reload.c (complex_word_subreg_p): New function.
26317         (reload_inner_reg_of_subreg, push_reload): Use it.
26319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26320             Alan Hayward  <alan.hayward@arm.com>
26321             David Sherwood  <david.sherwood@arm.com>
26323         * lra-constraints.c (process_alt_operands): Reject matched
26324         operands whose sizes aren't ordered.
26325         (match_reload): Refer to this check here.
26327 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26328             Alan Hayward  <alan.hayward@arm.com>
26329             David Sherwood  <david.sherwood@arm.com>
26331         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
26332         that the mode size is in the set {1, 2, 4, 8, 16}.
26334 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26335             Alan Hayward  <alan.hayward@arm.com>
26336             David Sherwood  <david.sherwood@arm.com>
26338         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
26339         Use plus_constant instead of gen_rtx_PLUS.
26341 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26342             Alan Hayward  <alan.hayward@arm.com>
26343             David Sherwood  <david.sherwood@arm.com>
26345         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
26346         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
26347         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
26348         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
26349         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
26350         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
26351         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
26352         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
26353         * config/i386/i386.c (ix86_push_rounding): ...this new function.
26354         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
26355         a poly_int64.
26356         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
26357         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
26358         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
26359         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
26360         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
26361         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
26362         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
26363         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
26364         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
26365         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
26366         function.
26367         * expr.c (emit_move_resolve_push): Treat the input and result
26368         of PUSH_ROUNDING as a poly_int64.
26369         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
26370         (emit_push_insn): Likewise.
26371         * lra-eliminations.c (mark_not_eliminable): Likewise.
26372         * recog.c (push_operand): Likewise.
26373         * reload1.c (elimination_effects): Likewise.
26374         * rtlanal.c (nonzero_bits1): Likewise.
26375         * calls.c (store_one_arg): Likewise.  Require the padding to be
26376         known at compile time.
26378 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26379             Alan Hayward  <alan.hayward@arm.com>
26380             David Sherwood  <david.sherwood@arm.com>
26382         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
26383         Use plus_constant instead of gen_rtx_PLUS.
26385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26386             Alan Hayward  <alan.hayward@arm.com>
26387             David Sherwood  <david.sherwood@arm.com>
26389         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
26390         rather than an int.
26392 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26393             Alan Hayward  <alan.hayward@arm.com>
26394             David Sherwood  <david.sherwood@arm.com>
26396         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
26397         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
26398         via stack temporaries.  Treat the mode size as polynomial too.
26400 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26401             Alan Hayward  <alan.hayward@arm.com>
26402             David Sherwood  <david.sherwood@arm.com>
26404         * expr.c (expand_expr_real_2): When handling conversions involving
26405         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
26406         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
26407         as a poly_uint64 too.
26409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26410             Alan Hayward  <alan.hayward@arm.com>
26411             David Sherwood  <david.sherwood@arm.com>
26413         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
26415 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26416             Alan Hayward  <alan.hayward@arm.com>
26417             David Sherwood  <david.sherwood@arm.com>
26419         * combine.c (can_change_dest_mode): Handle polynomial
26420         REGMODE_NATURAL_SIZE.
26421         * expmed.c (store_bit_field_1): Likewise.
26422         * expr.c (store_constructor): Likewise.
26423         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
26424         and polynomial REGMODE_NATURAL_SIZE.
26425         (gen_lowpart_common): Likewise.
26426         * reginfo.c (record_subregs_of_mode): Likewise.
26427         * rtlanal.c (read_modify_subreg_p): Likewise.
26429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26430             Alan Hayward  <alan.hayward@arm.com>
26431             David Sherwood  <david.sherwood@arm.com>
26433         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
26434         numbers of elements.
26436 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26437             Alan Hayward  <alan.hayward@arm.com>
26438             David Sherwood  <david.sherwood@arm.com>
26440         * match.pd: Cope with polynomial numbers of vector elements.
26442 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26443             Alan Hayward  <alan.hayward@arm.com>
26444             David Sherwood  <david.sherwood@arm.com>
26446         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
26447         in a POINTER_PLUS_EXPR.
26449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26450             Alan Hayward  <alan.hayward@arm.com>
26451             David Sherwood  <david.sherwood@arm.com>
26453         * omp-simd-clone.c (simd_clone_subparts): New function.
26454         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
26455         (ipa_simd_modify_function_body): Likewise.
26457 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26458             Alan Hayward  <alan.hayward@arm.com>
26459             David Sherwood  <david.sherwood@arm.com>
26461         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
26462         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
26463         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
26464         (expand_vector_condition, vector_element): Likewise.
26465         (subparts_gt): New function.
26466         (get_compute_type): Use subparts_gt.
26467         (count_type_subparts): Delete.
26468         (expand_vector_operations_1): Use subparts_gt instead of
26469         count_type_subparts.
26471 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26472             Alan Hayward  <alan.hayward@arm.com>
26473             David Sherwood  <david.sherwood@arm.com>
26475         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
26476         (vect_compile_time_alias): ...this new function.  Do the calculation
26477         on poly_ints rather than trees.
26478         (vect_prune_runtime_alias_test_list): Update call accordingly.
26480 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26481             Alan Hayward  <alan.hayward@arm.com>
26482             David Sherwood  <david.sherwood@arm.com>
26484         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
26485         numbers of units.
26486         (vect_schedule_slp_instance): Likewise.
26488 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26489             Alan Hayward  <alan.hayward@arm.com>
26490             David Sherwood  <david.sherwood@arm.com>
26492         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
26493         constant and extern definitions for variable-length vectors.
26494         (vect_get_constant_vectors): Note that the number of units
26495         is known to be constant.
26497 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26498             Alan Hayward  <alan.hayward@arm.com>
26499             David Sherwood  <david.sherwood@arm.com>
26501         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
26502         of units as polynomial.  Choose between WIDE and NARROW based
26503         on multiple_p.
26505 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26506             Alan Hayward  <alan.hayward@arm.com>
26507             David Sherwood  <david.sherwood@arm.com>
26509         * tree-vect-stmts.c (simd_clone_subparts): New function.
26510         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
26512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26513             Alan Hayward  <alan.hayward@arm.com>
26514             David Sherwood  <david.sherwood@arm.com>
26516         * tree-vect-stmts.c (vectorizable_call): Treat the number of
26517         vectors as polynomial.  Use build_index_vector for
26518         IFN_GOMP_SIMD_LANE.
26520 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26521             Alan Hayward  <alan.hayward@arm.com>
26522             David Sherwood  <david.sherwood@arm.com>
26524         * tree-vect-stmts.c (get_load_store_type): Treat the number of
26525         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
26526         for variable-length vectors.
26527         (vectorizable_mask_load_store): Treat the number of units as
26528         polynomial, asserting that it is constant if the condition has
26529         already been enforced.
26530         (vectorizable_store, vectorizable_load): Likewise.
26532 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26533             Alan Hayward  <alan.hayward@arm.com>
26534             David Sherwood  <david.sherwood@arm.com>
26536         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
26537         of units as polynomial.  Punt if we can't tell at compile time
26538         which vector contains the final result.
26540 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26541             Alan Hayward  <alan.hayward@arm.com>
26542             David Sherwood  <david.sherwood@arm.com>
26544         * tree-vect-loop.c (vectorizable_induction): Treat the number
26545         of units as polynomial.  Punt on SLP inductions.  Use an integer
26546         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
26547         cast of such a series for variable-length floating-point
26548         reductions.
26550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26551             Alan Hayward  <alan.hayward@arm.com>
26552             David Sherwood  <david.sherwood@arm.com>
26554         * tree.h (build_index_vector): Declare.
26555         * tree.c (build_index_vector): New function.
26556         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
26557         of units as polynomial, forcibly converting it to a constant if
26558         vectorizable_reduction has already enforced the condition.
26559         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
26560         to create a {1,2,3,...} vector.
26561         (vectorizable_reduction): Treat the number of units as polynomial.
26562         Choose vectype_in based on the largest scalar element size rather
26563         than the smallest number of units.  Enforce the restrictions
26564         relied on above.
26566 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26567             Alan Hayward  <alan.hayward@arm.com>
26568             David Sherwood  <david.sherwood@arm.com>
26570         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
26571         number of units as polynomial.
26573 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26574             Alan Hayward  <alan.hayward@arm.com>
26575             David Sherwood  <david.sherwood@arm.com>
26577         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
26578         * target.def (autovectorize_vector_sizes): Return the vector sizes
26579         by pointer, using vector_sizes rather than a bitmask.
26580         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
26581         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
26582         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
26583         Likewise.
26584         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
26585         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
26586         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
26587         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
26588         * omp-general.c (omp_max_vf): Likewise.
26589         * omp-low.c (omp_clause_aligned_alignment): Likewise.
26590         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
26591         * tree-vect-loop.c (vect_analyze_loop): Likewise.
26592         * tree-vect-slp.c (vect_slp_bb): Likewise.
26593         * doc/tm.texi: Regenerate.
26594         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
26595         to a poly_uint64.
26596         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
26597         the vector size as a poly_uint64 rather than an unsigned int.
26598         (current_vector_size): Change from an unsigned int to a poly_uint64.
26599         (get_vectype_for_scalar_type): Update accordingly.
26600         * tree.h (build_truth_vector_type): Take the size and number of
26601         units as a poly_uint64 rather than an unsigned int.
26602         (build_vector_type): Add a temporary overload that takes
26603         the number of units as a poly_uint64 rather than an unsigned int.
26604         * tree.c (make_vector_type): Likewise.
26605         (build_truth_vector_type): Take the number of units as a poly_uint64
26606         rather than an unsigned int.
26608 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26609             Alan Hayward  <alan.hayward@arm.com>
26610             David Sherwood  <david.sherwood@arm.com>
26612         * target.def (get_mask_mode): Take the number of units and length
26613         as poly_uint64s rather than unsigned ints.
26614         * targhooks.h (default_get_mask_mode): Update accordingly.
26615         * targhooks.c (default_get_mask_mode): Likewise.
26616         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
26617         * doc/tm.texi: Regenerate.
26619 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26620             Alan Hayward  <alan.hayward@arm.com>
26621             David Sherwood  <david.sherwood@arm.com>
26623         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
26624         * omp-general.c (omp_max_vf): Likewise.
26625         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
26626         (expand_omp_simd): Handle polynomial safelen.
26627         * omp-low.c (omplow_simd_context): Add a default constructor.
26628         (omplow_simd_context::max_vf): Change from int to poly_uint64.
26629         (lower_rec_simd_input_clauses): Update accordingly.
26630         (lower_rec_input_clauses): Likewise.
26632 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26633             Alan Hayward  <alan.hayward@arm.com>
26634             David Sherwood  <david.sherwood@arm.com>
26636         * tree-vectorizer.h (vect_nunits_for_cost): New function.
26637         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
26638         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
26639         (vect_analyze_slp_cost): Likewise.
26640         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
26641         (vect_model_load_cost): Likewise.
26643 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26644             Alan Hayward  <alan.hayward@arm.com>
26645             David Sherwood  <david.sherwood@arm.com>
26647         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
26648         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
26649         from an unsigned int * to a poly_uint64_pod *.
26650         (calculate_unrolling_factor): New function.
26651         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
26653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26654             Alan Hayward  <alan.hayward@arm.com>
26655             David Sherwood  <david.sherwood@arm.com>
26657         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
26658         from an unsigned int to a poly_uint64.
26659         (_loop_vec_info::slp_unrolling_factor): Likewise.
26660         (_loop_vec_info::vectorization_factor): Change from an int
26661         to a poly_uint64.
26662         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
26663         (vect_get_num_vectors): New function.
26664         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
26665         (vect_get_num_copies): Use vect_get_num_vectors.
26666         (vect_analyze_data_ref_dependences): Change max_vf from an int *
26667         to an unsigned int *.
26668         (vect_analyze_data_refs): Change min_vf from an int * to a
26669         poly_uint64 *.
26670         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
26671         than an unsigned HOST_WIDE_INT.
26672         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
26673         (vect_analyze_data_ref_dependence): Change max_vf from an int *
26674         to an unsigned int *.
26675         (vect_analyze_data_ref_dependences): Likewise.
26676         (vect_compute_data_ref_alignment): Handle polynomial vf.
26677         (vect_enhance_data_refs_alignment): Likewise.
26678         (vect_prune_runtime_alias_test_list): Likewise.
26679         (vect_shift_permute_load_chain): Likewise.
26680         (vect_supportable_dr_alignment): Likewise.
26681         (dependence_distance_ge_vf): Take the vectorization factor as a
26682         poly_uint64 rather than an unsigned HOST_WIDE_INT.
26683         (vect_analyze_data_refs): Change min_vf from an int * to a
26684         poly_uint64 *.
26685         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
26686         vfm1 as a poly_uint64 rather than an int.  Make the same change
26687         for the returned bound_scalar.
26688         (vect_gen_vector_loop_niters): Handle polynomial vf.
26689         (vect_do_peeling): Likewise.  Update call to
26690         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
26691         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
26692         be constant.
26693         * tree-vect-loop.c (vect_determine_vectorization_factor)
26694         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
26695         (vect_get_known_peeling_cost): Likewise.
26696         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
26697         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
26698         (vect_transform_loop): Likewise.  Use the lowest possible VF when
26699         updating the upper bounds of the loop.
26700         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
26701         rather than an int.
26702         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
26703         polynomial unroll factors.
26704         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
26705         (vect_make_slp_decision): Likewise.
26706         (vect_supported_load_permutation_p): Likewise, and polynomial
26707         vf too.
26708         (vect_analyze_slp_cost): Handle polynomial vf.
26709         (vect_slp_analyze_node_operations): Likewise.
26710         (vect_slp_analyze_bb_1): Likewise.
26711         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
26712         than an unsigned HOST_WIDE_INT.
26713         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
26714         (vectorizable_load): Handle polynomial vf.
26715         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
26716         a poly_uint64.
26717         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
26719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26720             Alan Hayward  <alan.hayward@arm.com>
26721             David Sherwood  <david.sherwood@arm.com>
26723         * match.pd: Handle bit operations involving three constants
26724         and try to fold one pair.
26726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
26728         * tree-vect-loop-manip.c: Include gimple-fold.h.
26729         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
26730         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
26731         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
26732         Add a path that uses a step of VF instead of 1, but disable it
26733         for now.
26734         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
26735         and niters_no_overflow parameters.  Update calls to
26736         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
26737         Create a new SSA name if the latter choses to use a ste other
26738         than zero, and return it via niters_vector_mult_vf_var.
26739         * tree-vect-loop.c (vect_transform_loop): Update calls to
26740         vect_do_peeling, vect_gen_vector_loop_niters and
26741         slpeel_make_loop_iterate_ntimes.
26742         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
26743         (vect_gen_vector_loop_niters): Update declarations after above changes.
26745 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
26747         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
26748         128-bit round to integer instructions.
26749         (ceil<mode>2): Likewise.
26750         (btrunc<mode>2): Likewise.
26751         (round<mode>2): Likewise.
26753 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26755         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
26756         unaligned VSX load/store on P8/P9.
26757         (expand_block_clear): Allow the use of unaligned VSX
26758         load/store on P8/P9.
26760 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26762         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
26763         New function.
26764         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
26765         swap associated with both a load and a store.
26767 2018-01-02  Andrew Waterman  <andrew@sifive.com>
26769         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
26770         * config/riscv/riscv.md (clear_cache): Use it.
26772 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
26774         * web.c: Remove out-of-date comment.
26776 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26778         * expr.c (fixup_args_size_notes): Check that any existing
26779         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
26780         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
26781         (emit_single_push_insn): ...here.
26783 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26785         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
26786         (const_vector_encoded_nelts): New function.
26787         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
26788         (const_vector_int_elt, const_vector_elt): Declare.
26789         * emit-rtl.c (const_vector_int_elt_1): New function.
26790         (const_vector_elt): Likewise.
26791         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
26792         of CONST_VECTOR_ELT.
26794 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26796         * expr.c: Include rtx-vector-builder.h.
26797         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
26798         directly on the tree encoding.
26799         (const_vector_from_tree): Likewise.
26800         * optabs.c: Include rtx-vector-builder.h.
26801         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
26802         sequence of "u" values.
26803         * vec-perm-indices.c: Include rtx-vector-builder.h.
26804         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
26805         directly on the vec_perm_indices encoding.
26807 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26809         * doc/rtl.texi (const_vector): Describe new encoding scheme.
26810         * Makefile.in (OBJS): Add rtx-vector-builder.o.
26811         * rtx-vector-builder.h: New file.
26812         * rtx-vector-builder.c: Likewise.
26813         * rtl.h (rtx_def::u2): Add a const_vector field.
26814         (CONST_VECTOR_NPATTERNS): New macro.
26815         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
26816         (CONST_VECTOR_DUPLICATE_P): Likewise.
26817         (CONST_VECTOR_STEPPED_P): Likewise.
26818         (CONST_VECTOR_ENCODED_ELT): Likewise.
26819         (const_vec_duplicate_p): Check for a duplicated vector encoding.
26820         (unwrap_const_vec_duplicate): Likewise.
26821         (const_vec_series_p): Check for a non-duplicated vector encoding.
26822         Say that the function only returns true for integer vectors.
26823         * emit-rtl.c: Include rtx-vector-builder.h.
26824         (gen_const_vec_duplicate_1): Delete.
26825         (gen_const_vector): Call gen_const_vec_duplicate instead of
26826         gen_const_vec_duplicate_1.
26827         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
26828         (gen_const_vec_duplicate): Use rtx_vector_builder.
26829         (gen_const_vec_series): Likewise.
26830         (gen_rtx_CONST_VECTOR): Likewise.
26831         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
26832         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
26833         Build a new vector rather than modifying a CONST_VECTOR in-place.
26834         (handle_special_swappables): Update call accordingly.
26835         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
26836         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
26837         Build a new vector rather than modifying a CONST_VECTOR in-place.
26838         (handle_special_swappables): Update call accordingly.
26840 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26842         * simplify-rtx.c (simplify_const_binary_operation): Use
26843         CONST_VECTOR_ELT instead of XVECEXP.
26845 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26847         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
26848         the selector elements to be different from the data elements
26849         if the selector is a VECTOR_CST.
26850         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
26851         ssizetype for the selector.
26853 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26855         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
26856         before testing each element individually.
26857         * tree-vect-generic.c (lower_vec_perm): Likewise.
26859 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26861         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
26862         * selftest-run-tests.c (selftest::run_tests): Call it.
26863         * vector-builder.h (vector_builder::operator ==): New function.
26864         (vector_builder::operator !=): Likewise.
26865         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
26866         (vec_perm_indices::all_from_input_p): New function.
26867         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26868         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
26869         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
26870         instead of reading the VECTOR_CST directly.  Detect whether both
26871         vector inputs are the same before constructing the vec_perm_indices,
26872         and update the number of inputs argument accordingly.  Use the
26873         utility functions added above.  Only construct sel2 if we need to.
26875 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26877         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
26878         the broadcast of the low byte.
26879         (expand_mult_highpart): Use an explicit encoding for the permutes.
26880         * optabs-query.c (can_mult_highpart_p): Likewise.
26881         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
26882         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26883         (vectorizable_bswap): Likewise.
26884         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
26885         explicit encoding for the power-of-2 permutes.
26886         (vect_permute_store_chain): Likewise.
26887         (vect_grouped_load_supported): Likewise.
26888         (vect_permute_load_chain): Likewise.
26890 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26892         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
26893         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
26894         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
26895         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26896         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
26897         (vect_gen_perm_mask_any): Likewise.
26899 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26901         * int-vector-builder.h: New file.
26902         * vec-perm-indices.h: Include int-vector-builder.h.
26903         (vec_perm_indices): Redefine as an int_vector_builder.
26904         (auto_vec_perm_indices): Delete.
26905         (vec_perm_builder): Redefine as a stand-alone class.
26906         (vec_perm_indices::vec_perm_indices): New function.
26907         (vec_perm_indices::clamp): Likewise.
26908         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
26909         (vec_perm_indices::new_vector): New function.
26910         (vec_perm_indices::new_expanded_vector): Update for new
26911         vec_perm_indices class.
26912         (vec_perm_indices::rotate_inputs): New function.
26913         (vec_perm_indices::all_in_range_p): Operate directly on the
26914         encoded form, without computing elided elements.
26915         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
26916         encoding.  Update for new vec_perm_indices class.
26917         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
26918         the given vec_perm_builder.
26919         (expand_vec_perm_var): Update vec_perm_builder constructor.
26920         (expand_mult_highpart): Use vec_perm_builder instead of
26921         auto_vec_perm_indices.
26922         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
26923         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
26924         or double series encoding as appropriate.
26925         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
26926         vec_perm_indices instead of auto_vec_perm_indices.
26927         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26928         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26929         (vect_permute_store_chain): Likewise.
26930         (vect_grouped_load_supported): Likewise.
26931         (vect_permute_load_chain): Likewise.
26932         (vect_shift_permute_load_chain): Likewise.
26933         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
26934         (vect_transform_slp_perm_load): Likewise.
26935         (vect_schedule_slp_instance): Likewise.
26936         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26937         (vectorizable_mask_load_store): Likewise.
26938         (vectorizable_bswap): Likewise.
26939         (vectorizable_store): Likewise.
26940         (vectorizable_load): Likewise.
26941         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
26942         vec_perm_indices instead of auto_vec_perm_indices.  Use
26943         tree_to_vec_perm_builder to read the vector from a tree.
26944         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
26945         vec_perm_builder instead of a vec_perm_indices.
26946         (have_whole_vector_shift): Use vec_perm_builder and
26947         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
26948         truncation to calc_vec_perm_mask_for_shift.
26949         (vect_create_epilog_for_reduction): Likewise.
26950         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
26951         from auto_vec_perm_indices to vec_perm_indices.
26952         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26953         instead of changing individual elements.
26954         (aarch64_vectorize_vec_perm_const): Use new_vector to install
26955         the vector in d.perm.
26956         * config/arm/arm.c (expand_vec_perm_d::perm): Change
26957         from auto_vec_perm_indices to vec_perm_indices.
26958         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
26959         instead of changing individual elements.
26960         (arm_vectorize_vec_perm_const): Use new_vector to install
26961         the vector in d.perm.
26962         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
26963         Update vec_perm_builder constructor.
26964         (rs6000_expand_interleave): Likewise.
26965         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
26966         (rs6000_expand_interleave): Likewise.
26968 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26970         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
26971         to qimode could truncate the indices.
26972         * optabs.c (expand_vec_perm_var): Likewise.
26974 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
26976         * Makefile.in (OBJS): Add vec-perm-indices.o.
26977         * vec-perm-indices.h: New file.
26978         * vec-perm-indices.c: Likewise.
26979         * target.h (vec_perm_indices): Replace with a forward class
26980         declaration.
26981         (auto_vec_perm_indices): Move to vec-perm-indices.h.
26982         * optabs.h: Include vec-perm-indices.h.
26983         (expand_vec_perm): Delete.
26984         (selector_fits_mode_p, expand_vec_perm_var): Declare.
26985         (expand_vec_perm_const): Declare.
26986         * target.def (vec_perm_const_ok): Replace with...
26987         (vec_perm_const): ...this new hook.
26988         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
26989         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
26990         * doc/tm.texi: Regenerate.
26991         * optabs.def (vec_perm_const): Delete.
26992         * doc/md.texi (vec_perm_const): Likewise.
26993         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
26994         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
26995         expand_vec_perm for constant permutation vectors.  Assert that
26996         the mode of variable permutation vectors is the integer equivalent
26997         of the mode that is being permuted.
26998         * optabs-query.h (selector_fits_mode_p): Declare.
26999         * optabs-query.c: Include vec-perm-indices.h.
27000         (selector_fits_mode_p): New function.
27001         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27002         is defined, instead of checking whether the vec_perm_const_optab
27003         exists.  Use targetm.vectorize.vec_perm_const instead of
27004         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
27005         fit in the vector mode before using a variable permute.
27006         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27007         vec_perm_indices instead of an rtx.
27008         (expand_vec_perm): Replace with...
27009         (expand_vec_perm_const): ...this new function.  Take the selector
27010         as a vec_perm_indices rather than an rtx.  Also take the mode of
27011         the selector.  Update call to shift_amt_for_vec_perm_mask.
27012         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27013         Use vec_perm_indices::new_expanded_vector to expand the original
27014         selector into bytes.  Check whether the indices fit in the vector
27015         mode before using a variable permute.
27016         (expand_vec_perm_var): Make global.
27017         (expand_mult_highpart): Use expand_vec_perm_const.
27018         * fold-const.c: Includes vec-perm-indices.h.
27019         * tree-ssa-forwprop.c: Likewise.
27020         * tree-vect-data-refs.c: Likewise.
27021         * tree-vect-generic.c: Likewise.
27022         * tree-vect-loop.c: Likewise.
27023         * tree-vect-slp.c: Likewise.
27024         * tree-vect-stmts.c: Likewise.
27025         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27026         Delete.
27027         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27028         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27029         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27030         (aarch64_vectorize_vec_perm_const): ...this new function.
27031         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27032         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27033         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27034         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27035         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27036         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27037         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27038         into...
27039         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
27040         check for NEON modes.
27041         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27042         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27043         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27044         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27045         into...
27046         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
27047         the old VEC_PERM_CONST conditions.
27048         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27049         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27050         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27051         (ia64_vectorize_vec_perm_const_ok): Merge into...
27052         (ia64_vectorize_vec_perm_const): ...this new function.
27053         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27054         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27055         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27056         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27057         * config/mips/mips.c (mips_expand_vec_perm_const)
27058         (mips_vectorize_vec_perm_const_ok): Merge into...
27059         (mips_vectorize_vec_perm_const): ...this new function.
27060         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27061         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27062         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27063         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27064         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27065         (rs6000_expand_vec_perm_const): Delete.
27066         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27067         Delete.
27068         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27069         (altivec_expand_vec_perm_const_le): Take each operand individually.
27070         Operate on constant selectors rather than rtxes.
27071         (altivec_expand_vec_perm_const): Likewise.  Update call to
27072         altivec_expand_vec_perm_const_le.
27073         (rs6000_expand_vec_perm_const): Delete.
27074         (rs6000_vectorize_vec_perm_const_ok): Delete.
27075         (rs6000_vectorize_vec_perm_const): New function.
27076         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27077         an element count and rtx array.
27078         (rs6000_expand_extract_even): Update call accordingly.
27079         (rs6000_expand_interleave): Likewise.
27080         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27081         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27082         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27083         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27084         (rs6000_expand_vec_perm_const): Delete.
27085         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27086         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27087         (altivec_expand_vec_perm_const_le): Take each operand individually.
27088         Operate on constant selectors rather than rtxes.
27089         (altivec_expand_vec_perm_const): Likewise.  Update call to
27090         altivec_expand_vec_perm_const_le.
27091         (rs6000_expand_vec_perm_const): Delete.
27092         (rs6000_vectorize_vec_perm_const_ok): Delete.
27093         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
27094         reference to the SPE evmerge intructions.
27095         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27096         an element count and rtx array.
27097         (rs6000_expand_extract_even): Update call accordingly.
27098         (rs6000_expand_interleave): Likewise.
27099         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27100         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27101         new function.
27102         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27104 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27106         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27107         vector mode and that that mode matches the mode of the data
27108         being permuted.
27109         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27110         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
27111         directly using expand_vec_perm_1 when forcing selectors into
27112         registers.
27113         (expand_vec_perm_var): New function, split out from expand_vec_perm.
27115 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27117         * optabs-query.h (can_vec_perm_p): Delete.
27118         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27119         * optabs-query.c (can_vec_perm_p): Split into...
27120         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27121         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27122         particular selector is valid.
27123         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27124         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27125         (vect_grouped_load_supported): Likewise.
27126         (vect_shift_permute_load_chain): Likewise.
27127         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27128         (vect_transform_slp_perm_load): Likewise.
27129         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27130         (vectorizable_bswap): Likewise.
27131         (vect_gen_perm_mask_checked): Likewise.
27132         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
27133         implementations of variable permutation vectors into account
27134         when deciding which selector to use.
27135         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27136         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27137         with a false third argument.
27138         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27139         to test whether the constant selector is valid and can_vec_perm_var_p
27140         to test whether a variable selector is valid.
27142 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27144         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27145         * optabs-query.c (can_vec_perm_p): Likewise.
27146         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27147         instead of vec_perm_indices.
27148         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27149         (vect_gen_perm_mask_checked): Likewise,
27150         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27151         (vect_gen_perm_mask_checked): Likewise,
27153 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
27155         * optabs-query.h (qimode_for_vec_perm): Declare.
27156         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
27157         (qimode_for_vec_perm): ...this new function.
27158         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
27160 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27162         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
27163         does not have a conditional at the top.
27165 2018-01-02  Richard Biener  <rguenther@suse.de>
27167         * ipa-inline.c (big_speedup_p): Fix expression.
27169 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
27171         PR target/81616
27172         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
27173         for generic 4->6.
27175 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
27177         PR target/81616
27178         Generic tuning.
27179         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
27180         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
27181         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
27182         cond_taken_branch_cost 3->4.
27184 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
27186         PR tree-optimization/83581
27187         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
27188         TODO_cleanup_cfg if any changes have been made.
27190         PR middle-end/83608
27191         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
27192         convert_modes if target mode has the right side, but different mode
27193         class.
27195         PR middle-end/83609
27196         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
27197         last argument when extracting from CONCAT.  If either from_real or
27198         from_imag is NULL, use expansion through memory.  If result is not
27199         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
27200         the parts directly to inner mode, if even that fails, use expansion
27201         through memory.
27203         PR middle-end/83623
27204         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
27205         check for bswap in mode rather than HImode and use that in expand_unop
27206         too.
27208 Copyright (C) 2018 Free Software Foundation, Inc.
27210 Copying and distribution of this file, with or without modification,
27211 are permitted in any medium without royalty provided the copyright
27212 notice and this notice are preserved.